1 |
commit: 0c090a8f5b41f48b6df18275a4cc80d121797731 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 21 11:26:48 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 21 11:26:48 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c090a8f |
7 |
|
8 |
sys-libs/libcap: pass prefix to make |
9 |
|
10 |
Also pass build variables instead of using sed. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/631734 |
13 |
Package-Manager: Portage-2.3.51_p14, Repoman-2.3.12_p5 |
14 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
15 |
|
16 |
sys-libs/libcap/libcap-2.26-r1.ebuild | 79 +++++++++++++++++++++++++++++++++++ |
17 |
1 file changed, 79 insertions(+) |
18 |
|
19 |
diff --git a/sys-libs/libcap/libcap-2.26-r1.ebuild b/sys-libs/libcap/libcap-2.26-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..ea415972d36 |
22 |
--- /dev/null |
23 |
+++ b/sys-libs/libcap/libcap-2.26-r1.ebuild |
24 |
@@ -0,0 +1,79 @@ |
25 |
+# Copyright 1999-2018 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=6 |
29 |
+ |
30 |
+inherit multilib multilib-minimal toolchain-funcs pam |
31 |
+ |
32 |
+DESCRIPTION="POSIX 1003.1e capabilities" |
33 |
+HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html" |
34 |
+SRC_URI="mirror://kernel/linux/libs/security/linux-privs/libcap2/${P}.tar.xz" |
35 |
+ |
36 |
+# it's available under either of the licenses |
37 |
+LICENSE="|| ( GPL-2 BSD )" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
40 |
+IUSE="pam static-libs" |
41 |
+ |
42 |
+# While the build system optionally uses gperf, we don't DEPEND on it because |
43 |
+# the build automatically falls back when it's unavailable. #604802 |
44 |
+RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] |
45 |
+ pam? ( virtual/pam )" |
46 |
+DEPEND="${RDEPEND} |
47 |
+ sys-kernel/linux-headers" |
48 |
+ |
49 |
+# Requires test suite being run as root (via sudo) |
50 |
+RESTRICT="test" |
51 |
+ |
52 |
+PATCHES=( |
53 |
+ "${FILESDIR}"/${PN}-2.25-build-system-fixes.patch |
54 |
+ "${FILESDIR}"/${PN}-2.26-no-perl.patch |
55 |
+ "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch |
56 |
+ "${FILESDIR}"/${PN}-2.21-include.patch |
57 |
+) |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ default |
61 |
+ multilib_copy_sources |
62 |
+} |
63 |
+ |
64 |
+run_emake() { |
65 |
+ local args=( |
66 |
+ prefix="${EPREFIX}/usr" |
67 |
+ lib="$(get_libdir)" |
68 |
+ PAM_CAP=$(multilib_native_usex pam yes no) |
69 |
+ DYNAMIC=yes |
70 |
+ ) |
71 |
+ emake "${args[@]}" "$@" |
72 |
+} |
73 |
+ |
74 |
+multilib_src_compile() { |
75 |
+ tc-export AR CC RANLIB |
76 |
+ local BUILD_CC |
77 |
+ tc-export_build_env BUILD_CC |
78 |
+ |
79 |
+ run_emake |
80 |
+} |
81 |
+ |
82 |
+multilib_src_install() { |
83 |
+ # no configure, needs explicit install line #444724#c3 |
84 |
+ run_emake DESTDIR="${D}" install |
85 |
+ |
86 |
+ gen_usr_ldscript -a cap |
87 |
+ if ! use static-libs ; then |
88 |
+ rm "${ED%/}"/usr/$(get_libdir)/libcap.a || die |
89 |
+ fi |
90 |
+ |
91 |
+ if [[ -d "${ED%/}"/usr/$(get_libdir)/security ]] ; then |
92 |
+ rm -r "${ED%/}"/usr/$(get_libdir)/security || die |
93 |
+ fi |
94 |
+ |
95 |
+ if multilib_is_native_abi && use pam; then |
96 |
+ dopammod pam_cap/pam_cap.so |
97 |
+ dopamsecurity '' pam_cap/capability.conf |
98 |
+ fi |
99 |
+} |
100 |
+ |
101 |
+multilib_src_install_all() { |
102 |
+ dodoc CHANGELOG README doc/capability.notes |
103 |
+} |