1 |
commit: ca1ee8658964db3cafefd5692d90a8e8361232d0 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 29 01:47:53 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 01:48:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca1ee865 |
7 |
|
8 |
sys-libs/libcap: add 2.66 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-libs/libcap/Manifest | 1 + |
13 |
sys-libs/libcap/libcap-2.66.ebuild | 96 ++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 97 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest |
17 |
index eac0ea4e63a6..7bdbf7329d50 100644 |
18 |
--- a/sys-libs/libcap/Manifest |
19 |
+++ b/sys-libs/libcap/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST libcap-2.65.tar.xz 179852 BLAKE2B 9417c5c22fa2fc03df08667dca802c2e190f17af3cda86021de175bd315cbef8607cff51ee2a9c0b6cee7a09c536dbdc43c01549e0540c335966f0afaf9268c3 SHA512 de34cd7fecfe9b688ee08e56c71d4f39a3a05f6414f88577faaadfcd5111a0ae1824af3e76a5b8199131a8df6e87e47fdcb3570c364999e4626f2ab8fafb8671 |
22 |
+DIST libcap-2.66.tar.xz 181592 BLAKE2B e79bf10c6a3dbffe96dc97aad0bed67caa0b3805d9dcaff1e4a8a833396ee5c6da4f7f0d321b254e99a00073bc39021b9f3a4b350d93094d0df4d74889b3ca56 SHA512 ac005b622f6e065f30ce282a5c87240e7b9da75366ee537aa4835bc501b44bc242c10a4ba4dc070e2415fc7f635d1c3c4e45fbeeaf962cf7973dda82bf6377f0 |
23 |
|
24 |
diff --git a/sys-libs/libcap/libcap-2.66.ebuild b/sys-libs/libcap/libcap-2.66.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..8e216f0ec4fe |
27 |
--- /dev/null |
28 |
+++ b/sys-libs/libcap/libcap-2.66.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 ~loong ~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 |
+} |