1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/guillemjover.asc
|
7 |
|
inherit multilib-minimal verify-sig
|
|
7 |
inherit autotools multilib multilib-minimal verify-sig
|
8 |
8 |
|
9 |
9 |
DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
|
10 |
10 |
HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
|
11 |
11 |
SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
|
12 |
12 |
SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
|
13 |
13 |
|
14 |
|
LICENSE="BSD BSD-2 BSD-4 ISC"
|
|
14 |
LICENSE="BEER-WARE BSD BSD-2 BSD-4 ISC MIT"
|
15 |
15 |
SLOT="0"
|
16 |
16 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
17 |
17 |
IUSE="static-libs"
|
... | ... | |
22 |
22 |
"
|
23 |
23 |
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
|
24 |
24 |
|
|
25 |
PATCHES=(
|
|
26 |
"${FILESDIR}/libbsd-build-Fix-version-script-linker-support-detection.patch"
|
|
27 |
"${FILESDIR}/libbsd-0.11.7-musl-lfs.patch"
|
|
28 |
)
|
|
29 |
|
|
30 |
src_prepare() {
|
|
31 |
default
|
|
32 |
|
|
33 |
# Drop on next release, only needed for lld patch
|
|
34 |
eautoreconf
|
|
35 |
}
|
|
36 |
|
25 |
37 |
multilib_src_configure() {
|
26 |
38 |
# The build system will install libbsd-ctor.a despite USE="-static-libs"
|
27 |
39 |
# which is correct, see:
|
... | ... | |
33 |
45 |
emake DESTDIR="${D}" install
|
34 |
46 |
|
35 |
47 |
find "${ED}" -type f -name "*.la" -delete || die
|
|
48 |
|
|
49 |
# ld scripts on standalone prefix (RAP) systems should have the prefix
|
|
50 |
# stripped from any paths, as the sysroot is automatically prepended.
|
|
51 |
local ldscript=${ED}/usr/$(get_libdir)/${PN}$(get_libname)
|
|
52 |
if use prefix && ! use prefix-guest && grep -qIF "ld script" "${ldscript}" 2>/dev/null; then
|
|
53 |
sed -i "s|${EPREFIX}/|/|g" "${ldscript}" || die
|
|
54 |
fi
|
36 |
55 |
}
|