Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/, sys-libs/libapparmor/
Date: Sat, 10 Oct 2020 09:44:14
Message-Id: 1602323043.fed65024dca1aeb59251d9ff0201cf49edde0048.kensington@gentoo
1 commit: fed65024dca1aeb59251d9ff0201cf49edde0048
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 10 09:13:15 2020 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 10 09:44:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fed65024
7
8 sys-libs/libapparmor: version bump 3.0.0
9
10 Package-Manager: Portage-3.0.4, Repoman-3.0.1
11 Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>
12
13 sys-libs/libapparmor/Manifest | 1 +
14 .../libapparmor-3.0.0-symbol_visibility.patch | 20 +++++
15 sys-libs/libapparmor/libapparmor-3.0.0.ebuild | 99 ++++++++++++++++++++++
16 3 files changed, 120 insertions(+)
17
18 diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
19 index 6a8b5e50bbe..89bb054ab20 100644
20 --- a/sys-libs/libapparmor/Manifest
21 +++ b/sys-libs/libapparmor/Manifest
22 @@ -1 +1,2 @@
23 DIST apparmor-2.13.4.tar.gz 7390179 BLAKE2B 49818a010d5e5757dd43710f2af925fbb62a9f8f9be74556ff31a9a8834bebac010762fc6bef3da8d295e487b65d0e0135f4be25bcb01a834846c5e5d65d92a4 SHA512 d42748bf36ae66849f79653a62d499e9d17a97c4d680fb653eb1c379d0593aaa09f7ddfc6f2fa0d2fb468bce05fb25444976f60a5ec24778fdd7ec20d1c13651
24 +DIST apparmor-3.0.0.tar.gz 7780686 BLAKE2B a9d9edb4fd2cb32b3db322a3f145aac7cea40fac3401b82947b2c5183598cc326d70859466823e3ac0a2227483c7ed7ba0b2f727e9fb7fbf532468716ef8d18f SHA512 2465a8bc400e24e548b0589b7b022fb8325c53858429b9c54204f989d5589d7bd99c9507bde88a48f9965a55edcbac98efeeb6b93aeefe6a27afa0b7e851aea6
25
26 diff --git a/sys-libs/libapparmor/files/libapparmor-3.0.0-symbol_visibility.patch b/sys-libs/libapparmor/files/libapparmor-3.0.0-symbol_visibility.patch
27 new file mode 100644
28 index 00000000000..d5002461462
29 --- /dev/null
30 +++ b/sys-libs/libapparmor/files/libapparmor-3.0.0-symbol_visibility.patch
31 @@ -0,0 +1,20 @@
32 +Adds aditional symbols to allow dynamic linking.
33 +
34 +--- a/src/libapparmor.map
35 ++++ b/src/libapparmor.map
36 +@@ -117,6 +117,7 @@
37 +
38 + APPARMOR_3.0 {
39 + global:
40 ++ aa_features_new_from_file;
41 + aa_features_write_to_fd;
42 + aa_features_value;
43 + local:
44 +@@ -130,6 +131,7 @@
45 + _aa_autoclose;
46 + _aa_autofclose;
47 + _aa_dirat_for_each;
48 ++ _aa_asprintf;
49 + local:
50 + *;
51 + };
52
53 diff --git a/sys-libs/libapparmor/libapparmor-3.0.0.ebuild b/sys-libs/libapparmor/libapparmor-3.0.0.ebuild
54 new file mode 100644
55 index 00000000000..ea23d83ed8c
56 --- /dev/null
57 +++ b/sys-libs/libapparmor/libapparmor-3.0.0.ebuild
58 @@ -0,0 +1,99 @@
59 +# Copyright 1999-2020 Gentoo Authors
60 +# Distributed under the terms of the GNU General Public License v2
61 +
62 +EAPI=7
63 +
64 +DISTUTILS_OPTIONAL=1
65 +DISTUTILS_USE_SETUPTOOLS="no"
66 +PYTHON_COMPAT=( python3_{5,6,7,8} )
67 +GENTOO_DEPEND_ON_PERL="no"
68 +
69 +inherit autotools distutils-r1 perl-functions
70 +
71 +MY_PV="$(ver_cut 1-2)"
72 +
73 +DESCRIPTION="Library to support AppArmor userspace utilities"
74 +HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
75 +SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${MY_PV}/+download/apparmor-${PV}.tar.gz"
76 +
77 +LICENSE="GPL-2 LGPL-2.1"
78 +SLOT="0"
79 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
80 +IUSE="doc +perl +python static-libs"
81 +
82 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
83 +
84 +RDEPEND="perl? ( dev-lang/perl:= )
85 + python? ( ${PYTHON_DEPS} )"
86 +DEPEND="${RDEPEND}
87 + sys-devel/autoconf-archive
88 + sys-devel/bison
89 + sys-devel/flex
90 + doc? ( dev-lang/perl )
91 + perl? ( dev-lang/swig )
92 + python? ( dev-lang/swig )"
93 +
94 +S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
95 +
96 +PATCHES=( "${FILESDIR}/${PN}-3.0.0-symbol_visibility.patch" )
97 +
98 +# depends on the package already being installed
99 +RESTRICT="test"
100 +
101 +src_prepare() {
102 + rm -r m4 || die "failed to remove bundled macros"
103 + default
104 + eautoreconf
105 + use python && distutils-r1_src_prepare
106 +}
107 +
108 +src_configure() {
109 + econf \
110 + $(use_enable static-libs static) \
111 + $(use_with perl) \
112 + $(use_with python)
113 +}
114 +
115 +src_compile() {
116 + emake -C src
117 + emake -C include
118 + use doc && emake -C doc
119 + use perl && emake -C swig/perl
120 +
121 + if use python ; then
122 + pushd swig/python > /dev/null
123 + emake libapparmor_wrap.c
124 + distutils-r1_src_compile
125 + popd > /dev/null
126 + fi
127 +}
128 +
129 +src_install() {
130 + emake DESTDIR="${D}" -C src install
131 + emake DESTDIR="${D}" -C include install
132 + use doc && emake DESTDIR="${D}" -C doc install
133 +
134 + if use perl ; then
135 + emake DESTDIR="${D}" -C swig/perl install
136 + perl_set_version
137 + insinto "${VENDOR_ARCH}"
138 + doins swig/perl/LibAppArmor.pm
139 +
140 + # bug 620886
141 + perl_delete_localpod
142 + perl_fix_packlist
143 + fi
144 +
145 + if use python ; then
146 + pushd swig/python > /dev/null
147 + distutils-r1_src_install
148 +
149 + python_moduleinto LibAppArmor
150 + python_foreach_impl python_domodule LibAppArmor.py
151 + popd > /dev/null
152 + fi
153 +
154 + dodoc AUTHORS ChangeLog NEWS README
155 +
156 + find "${D}" -name '*.la' -delete || die
157 +}