Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libbsd/
Date: Thu, 29 Dec 2022 21:31:20
Message-Id: 1672349456.a3b99a29c763bbef6a741b5a364dca74ac8ecd43.chewi@gentoo
1 commit: a3b99a29c763bbef6a741b5a364dca74ac8ecd43
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 27 14:13:51 2022 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 29 21:30:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3b99a29
7
8 dev-libs/libbsd: Force a libbsd.so symlink instead of unnecessary ld script
9
10 The path in the libbsd.so ld script would need the prefix stripped, but we don't
11 need it for applying --as-needed anyway, so force a symlink instead.
12
13 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
14
15 dev-libs/libbsd/libbsd-0.11.7-r1.ebuild | 44 +++++++++++++++++++++++++++++++++
16 1 file changed, 44 insertions(+)
17
18 diff --git a/dev-libs/libbsd/libbsd-0.11.7-r1.ebuild b/dev-libs/libbsd/libbsd-0.11.7-r1.ebuild
19 new file mode 100644
20 index 000000000000..d8b229e11d3e
21 --- /dev/null
22 +++ b/dev-libs/libbsd/libbsd-0.11.7-r1.ebuild
23 @@ -0,0 +1,44 @@
24 +# Copyright 1999-2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=8
28 +
29 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/guillemjover.asc
30 +inherit multilib-minimal verify-sig
31 +
32 +DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
33 +HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
34 +SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
35 +SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
36 +
37 +LICENSE="BSD BSD-2 BSD-4 ISC"
38 +SLOT="0"
39 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
40 +IUSE="static-libs"
41 +
42 +RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
43 +DEPEND="${RDEPEND}
44 + >=sys-kernel/linux-headers-3.17
45 +"
46 +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
47 +
48 +src_prepare() {
49 + default
50 +
51 + # The path in the libbsd.so ld script would need the prefix stripped, but we
52 + # don't need it for applying --as-needed anyway, so force a symlink instead.
53 + sed -ri "s:(need_transparent_libmd)=yes:\1=no:g" configure || die
54 +}
55 +
56 +multilib_src_configure() {
57 + # The build system will install libbsd-ctor.a despite USE="-static-libs"
58 + # which is correct, see:
59 + # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
60 + ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
61 +}
62 +
63 +multilib_src_install() {
64 + emake DESTDIR="${D}" install
65 +
66 + find "${ED}" -type f -name "*.la" -delete || die
67 +}