Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/
Date: Sat, 29 Jan 2022 16:52:34
Message-Id: 1643475134.9ba88694dbf731beac8e4c0d688c2535c3b4d4e5.soap@gentoo
1 commit: 9ba88694dbf731beac8e4c0d688c2535c3b4d4e5
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 29 16:52:14 2022 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 16:52:14 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ba88694
7
8 sys-libs/libcap: add 2.63
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 sys-libs/libcap/Manifest | 1 +
13 sys-libs/libcap/libcap-2.63.ebuild | 96 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 97 insertions(+)
15
16 diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
17 index 2f5d81e1e4b5..9c1dd9ed3ce2 100644
18 --- a/sys-libs/libcap/Manifest
19 +++ b/sys-libs/libcap/Manifest
20 @@ -1 +1,2 @@
21 DIST libcap-2.62.tar.xz 174772 BLAKE2B e3c86a5b88b9be932802ec8612f79e5f04912bf3e66f673eae2add85362292f4737c544d21b9e5adfd1a7a33c073568301b6532cdf0ea6c8b834d895b84323f1 SHA512 61ac004920c5cd3382a5443db2eacfc2041b7a8c0814b27084c1d111125639fe3950dea4325d0f7fb6bfb0d5de114452c3a62230cc958edb05ffdb83b213f9b3
22 +DIST libcap-2.63.tar.xz 175104 BLAKE2B a49a628f5b9ddf5a3d077428544a53b9cdedf62053ff296a0aa7d61e12ca05f9ba7597f20ee16a3843736bee2417a3d1585ad6b336651fcb3e4ee29b108cfa0f SHA512 832842b71ca32db8f53ca5f1a3010f14e7f42693f62f29632e9948c860f990899bb094165c37307ce8b9e5bc5eb1c833e780ebca98442df3e6d900e4b238834b
23
24 diff --git a/sys-libs/libcap/libcap-2.63.ebuild b/sys-libs/libcap/libcap-2.63.ebuild
25 new file mode 100644
26 index 000000000000..041fc1239fb0
27 --- /dev/null
28 +++ b/sys-libs/libcap/libcap-2.63.ebuild
29 @@ -0,0 +1,96 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit multilib-minimal toolchain-funcs pam usr-ldscript
36 +
37 +if [[ ${PV} == *9999 ]]; then
38 + inherit git-r3
39 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
40 +else
41 + SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
42 +
43 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
44 +fi
45 +
46 +DESCRIPTION="POSIX 1003.1e capabilities"
47 +HOMEPAGE="https://sites.google.com/site/fullycapable/"
48 +
49 +# it's available under either of the licenses
50 +LICENSE="|| ( GPL-2 BSD )"
51 +SLOT="0"
52 +IUSE="pam static-libs tools"
53 +
54 +# While the build system optionally uses gperf, we don't DEPEND on it because
55 +# the build automatically falls back when it's unavailable. #604802
56 +PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
57 +DEPEND="${PDEPEND}
58 + sys-kernel/linux-headers"
59 +BDEPEND="
60 + sys-apps/diffutils
61 + tools? ( dev-lang/go )"
62 +
63 +QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
64 +
65 +PATCHES=(
66 + "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
67 +)
68 +
69 +src_prepare() {
70 + default
71 + multilib_copy_sources
72 +}
73 +
74 +run_emake() {
75 + local args=(
76 + AR="$(tc-getAR)"
77 + CC="$(tc-getCC)"
78 + OBJCOPY="$(tc-getOBJCOPY)"
79 + RANLIB="$(tc-getRANLIB)"
80 + exec_prefix="${EPREFIX}"
81 + lib_prefix="${EPREFIX}/usr"
82 + lib="$(get_libdir)"
83 + prefix="${EPREFIX}/usr"
84 + PAM_CAP="$(usex pam yes no)"
85 + DYNAMIC=yes
86 + GOLANG="$(multilib_native_usex tools yes no)"
87 + )
88 + emake "${args[@]}" "$@"
89 +}
90 +
91 +src_configure() {
92 + tc-export_build_env BUILD_CC
93 + multilib-minimal_src_configure
94 +}
95 +
96 +multilib_src_compile() {
97 + run_emake
98 +}
99 +
100 +multilib_src_test() {
101 + run_emake test
102 +}
103 +
104 +multilib_src_install() {
105 + # no configure, needs explicit install line #444724#c3
106 + run_emake DESTDIR="${D}" install
107 +
108 + gen_usr_ldscript -a cap
109 + gen_usr_ldscript -a psx
110 + if ! use static-libs ; then
111 + rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
112 + fi
113 +
114 + # install pam plugins ourselves
115 + rm -rf "${ED}"/usr/$(get_libdir)/security || die
116 +
117 + if use pam ; then
118 + dopammod pam_cap/pam_cap.so
119 + dopamsecurity '' pam_cap/capability.conf
120 + fi
121 +}
122 +
123 +multilib_src_install_all() {
124 + dodoc CHANGELOG README doc/capability.notes
125 +}