1 |
commit: 3aff69cf5a9cb540cfde8a3617774b93a676d319 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 20 10:18:25 2020 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 20 10:22:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3aff69cf |
7 |
|
8 |
sys-libs/libapparmor: bump EAPI, python compat, and LICENSE fix |
9 |
|
10 |
Closes: https://bugs.gentoo.org/704878 |
11 |
Thanks-to: Jason Chan <graysonchsi <AT> gmail.com> |
12 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
13 |
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org> |
14 |
|
15 |
sys-libs/libapparmor/libapparmor-2.13.3-r1.ebuild | 98 +++++++++++++++++++++++ |
16 |
1 file changed, 98 insertions(+) |
17 |
|
18 |
diff --git a/sys-libs/libapparmor/libapparmor-2.13.3-r1.ebuild b/sys-libs/libapparmor/libapparmor-2.13.3-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..e47d13d2ba5 |
21 |
--- /dev/null |
22 |
+++ b/sys-libs/libapparmor/libapparmor-2.13.3-r1.ebuild |
23 |
@@ -0,0 +1,98 @@ |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+DISTUTILS_OPTIONAL=1 |
30 |
+PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} ) |
31 |
+GENTOO_DEPEND_ON_PERL="no" |
32 |
+ |
33 |
+inherit autotools distutils-r1 perl-functions |
34 |
+ |
35 |
+MY_PV="$(ver_cut 1-2)" |
36 |
+ |
37 |
+DESCRIPTION="Library to support AppArmor userspace utilities" |
38 |
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home" |
39 |
+SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-2 LGPL-2.1" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
44 |
+IUSE="doc +perl +python static-libs" |
45 |
+ |
46 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
47 |
+ |
48 |
+RDEPEND="perl? ( dev-lang/perl:= ) |
49 |
+ python? ( ${PYTHON_DEPS} )" |
50 |
+DEPEND="${RDEPEND} |
51 |
+ sys-devel/autoconf-archive |
52 |
+ sys-devel/bison |
53 |
+ sys-devel/flex |
54 |
+ doc? ( dev-lang/perl ) |
55 |
+ perl? ( dev-lang/swig ) |
56 |
+ python? ( dev-lang/swig )" |
57 |
+ |
58 |
+S=${WORKDIR}/apparmor-${PV}/libraries/${PN} |
59 |
+ |
60 |
+PATCHES=( "${FILESDIR}/${PN}-2.10-symbol_visibility.patch" ) |
61 |
+ |
62 |
+# depends on the package already being installed |
63 |
+RESTRICT="test" |
64 |
+ |
65 |
+src_prepare() { |
66 |
+ rm -r m4 || die "failed to remove bundled macros" |
67 |
+ default |
68 |
+ eautoreconf |
69 |
+ use python && distutils-r1_src_prepare |
70 |
+} |
71 |
+ |
72 |
+src_configure() { |
73 |
+ econf \ |
74 |
+ $(use_enable static-libs static) \ |
75 |
+ $(use_with perl) \ |
76 |
+ $(use_with python) |
77 |
+} |
78 |
+ |
79 |
+src_compile() { |
80 |
+ emake -C src |
81 |
+ emake -C include |
82 |
+ use doc && emake -C doc |
83 |
+ use perl && emake -C swig/perl |
84 |
+ |
85 |
+ if use python ; then |
86 |
+ pushd swig/python > /dev/null |
87 |
+ emake libapparmor_wrap.c |
88 |
+ distutils-r1_src_compile |
89 |
+ popd > /dev/null |
90 |
+ fi |
91 |
+} |
92 |
+ |
93 |
+src_install() { |
94 |
+ emake DESTDIR="${D}" -C src install |
95 |
+ emake DESTDIR="${D}" -C include install |
96 |
+ use doc && emake DESTDIR="${D}" -C doc install |
97 |
+ |
98 |
+ if use perl ; then |
99 |
+ emake DESTDIR="${D}" -C swig/perl install |
100 |
+ perl_set_version |
101 |
+ insinto "${VENDOR_ARCH}" |
102 |
+ doins swig/perl/LibAppArmor.pm |
103 |
+ |
104 |
+ # bug 620886 |
105 |
+ perl_delete_localpod |
106 |
+ perl_fix_packlist |
107 |
+ fi |
108 |
+ |
109 |
+ if use python ; then |
110 |
+ pushd swig/python > /dev/null |
111 |
+ distutils-r1_src_install |
112 |
+ |
113 |
+ python_moduleinto LibAppArmor |
114 |
+ python_foreach_impl python_domodule LibAppArmor.py |
115 |
+ popd > /dev/null |
116 |
+ fi |
117 |
+ |
118 |
+ dodoc AUTHORS ChangeLog NEWS README |
119 |
+ |
120 |
+ find "${D}" -name '*.la' -delete || die |
121 |
+} |