Skip to content

Commit 64b5a2e

Browse files
committed
dev-libs/libbsd: sync with gx86
Signed-off-by: Fabian Groffen <[email protected]>
1 parent f6632ea commit 64b5a2e

File tree

3 files changed

+98
-40
lines changed

3 files changed

+98
-40
lines changed

dev-libs/libbsd/libbsd-0.11.8.ebuild

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/guillemjover.asc
7+
inherit flag-o-matic multilib multilib-minimal verify-sig
8+
9+
DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
10+
HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
11+
SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
12+
SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
13+
14+
LICENSE="BEER-WARE BSD BSD-2 BSD-4 ISC MIT"
15+
SLOT="0"
16+
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
17+
IUSE="static-libs"
18+
19+
RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
20+
DEPEND="
21+
${RDEPEND}
22+
|| ( >=sys-kernel/linux-headers-3.17 virtual/os-headers )
23+
"
24+
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
25+
26+
multilib_src_configure() {
27+
# Broken (still) with lld-17 (bug #922342, bug #915068)
28+
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
29+
30+
# bug #911726
31+
filter-flags -fno-semantic-interposition
32+
33+
# The build system will install libbsd-ctor.a despite USE="-static-libs"
34+
# which is correct, see:
35+
# https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
36+
ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
37+
}
38+
39+
multilib_src_install() {
40+
emake DESTDIR="${D}" install
41+
42+
find "${ED}" -type f -name "*.la" -delete || die
43+
44+
# ld scripts on standalone prefix (RAP) systems should have the prefix
45+
# stripped from any paths, as the sysroot is automatically prepended.
46+
local ldscript=${ED}/usr/$(get_libdir)/${PN}$(get_libname)
47+
if use prefix && ! use prefix-guest && grep -qIF "ld script" "${ldscript}" 2>/dev/null; then
48+
sed -i "s|${EPREFIX}/|/|g" "${ldscript}" || die
49+
fi
50+
}

dev-libs/libbsd/libbsd-0.12.1.ebuild

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/guillemjover.asc
7+
inherit flag-o-matic multilib multilib-minimal verify-sig
8+
9+
DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
10+
HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
11+
SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
12+
SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
13+
14+
LICENSE="BEER-WARE BSD BSD-2 BSD-4 ISC MIT"
15+
SLOT="0"
16+
# Unkeyworded until figured out a solution for bug #925663
17+
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
18+
IUSE="static-libs"
19+
20+
RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
21+
DEPEND="
22+
${RDEPEND}
23+
|| ( >=sys-kernel/linux-headers-3.17 virtual/os-headers )
24+
"
25+
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
26+
27+
multilib_src_configure() {
28+
# bug #911726
29+
filter-flags -fno-semantic-interposition
30+
31+
# The build system will install libbsd-ctor.a despite USE="-static-libs"
32+
# which is correct, see:
33+
# https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
34+
ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
35+
}
36+
37+
multilib_src_install() {
38+
emake DESTDIR="${D}" install
39+
40+
find "${ED}" -type f -name "*.la" -delete || die
41+
42+
# ld scripts on standalone prefix (RAP) systems should have the prefix
43+
# stripped from any paths, as the sysroot is automatically prepended.
44+
local ldscript=${ED}/usr/$(get_libdir)/${PN}$(get_libname)
45+
if use prefix && ! use prefix-guest && grep -qIF "ld script" "${ldscript}" 2>/dev/null; then
46+
sed -i "s|${EPREFIX}/|/|g" "${ldscript}" || die
47+
fi
48+
}

dev-libs/libbsd/libbsd-0.9.1.ebuild

-40
This file was deleted.

0 commit comments

Comments
 (0)