commit:     fed65024dca1aeb59251d9ff0201cf49edde0048
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 09:13:15 2020 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 09:44:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fed65024

sys-libs/libapparmor: version bump 3.0.0

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>

 sys-libs/libapparmor/Manifest                      |  1 +
 .../libapparmor-3.0.0-symbol_visibility.patch      | 20 +++++
 sys-libs/libapparmor/libapparmor-3.0.0.ebuild      | 99 ++++++++++++++++++++++
 3 files changed, 120 insertions(+)

diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index 6a8b5e50bbe..89bb054ab20 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1 +1,2 @@
 DIST apparmor-2.13.4.tar.gz 7390179 BLAKE2B 
49818a010d5e5757dd43710f2af925fbb62a9f8f9be74556ff31a9a8834bebac010762fc6bef3da8d295e487b65d0e0135f4be25bcb01a834846c5e5d65d92a4
 SHA512 
d42748bf36ae66849f79653a62d499e9d17a97c4d680fb653eb1c379d0593aaa09f7ddfc6f2fa0d2fb468bce05fb25444976f60a5ec24778fdd7ec20d1c13651
+DIST apparmor-3.0.0.tar.gz 7780686 BLAKE2B 
a9d9edb4fd2cb32b3db322a3f145aac7cea40fac3401b82947b2c5183598cc326d70859466823e3ac0a2227483c7ed7ba0b2f727e9fb7fbf532468716ef8d18f
 SHA512 
2465a8bc400e24e548b0589b7b022fb8325c53858429b9c54204f989d5589d7bd99c9507bde88a48f9965a55edcbac98efeeb6b93aeefe6a27afa0b7e851aea6

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
new file mode 100644
index 00000000000..d5002461462
--- /dev/null
+++ b/sys-libs/libapparmor/files/libapparmor-3.0.0-symbol_visibility.patch
@@ -0,0 +1,20 @@
+Adds aditional symbols to allow dynamic linking.
+
+--- a/src/libapparmor.map
++++ b/src/libapparmor.map
+@@ -117,6 +117,7 @@
+ 
+ APPARMOR_3.0 {
+   global:
++      aa_features_new_from_file;
+       aa_features_write_to_fd;
+       aa_features_value;
+   local:
+@@ -130,6 +131,7 @@
+               _aa_autoclose;
+               _aa_autofclose;
+               _aa_dirat_for_each;
++              _aa_asprintf;
+       local:
+               *;
+ };

diff --git a/sys-libs/libapparmor/libapparmor-3.0.0.ebuild 
b/sys-libs/libapparmor/libapparmor-3.0.0.ebuild
new file mode 100644
index 00000000000..ea23d83ed8c
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-3.0.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_SETUPTOOLS="no"
+PYTHON_COMPAT=( python3_{5,6,7,8} )
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit autotools distutils-r1 perl-functions
+
+MY_PV="$(ver_cut 1-2)"
+
+DESCRIPTION="Library to support AppArmor userspace utilities"
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home";
+SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${MY_PV}/+download/apparmor-${PV}.tar.gz";
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="doc +perl +python static-libs"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="perl? ( dev-lang/perl:= )
+       python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+       sys-devel/autoconf-archive
+       sys-devel/bison
+       sys-devel/flex
+       doc? ( dev-lang/perl )
+       perl? ( dev-lang/swig )
+       python? ( dev-lang/swig )"
+
+S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
+
+PATCHES=( "${FILESDIR}/${PN}-3.0.0-symbol_visibility.patch" )
+
+# depends on the package already being installed
+RESTRICT="test"
+
+src_prepare() {
+       rm -r m4 || die "failed to remove bundled macros"
+       default
+       eautoreconf
+       use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+       econf \
+               $(use_enable static-libs static) \
+               $(use_with perl) \
+               $(use_with python)
+}
+
+src_compile() {
+       emake -C src
+       emake -C include
+       use doc && emake -C doc
+       use perl && emake -C swig/perl
+
+       if use python ; then
+               pushd swig/python > /dev/null
+               emake libapparmor_wrap.c
+               distutils-r1_src_compile
+               popd > /dev/null
+       fi
+}
+
+src_install() {
+       emake DESTDIR="${D}" -C src install
+       emake DESTDIR="${D}" -C include install
+       use doc && emake DESTDIR="${D}" -C doc install
+
+       if use perl ; then
+               emake DESTDIR="${D}" -C swig/perl install
+               perl_set_version
+               insinto "${VENDOR_ARCH}"
+               doins swig/perl/LibAppArmor.pm
+
+               # bug 620886
+               perl_delete_localpod
+               perl_fix_packlist
+       fi
+
+       if use python ; then
+               pushd swig/python > /dev/null
+               distutils-r1_src_install
+
+               python_moduleinto LibAppArmor
+               python_foreach_impl python_domodule LibAppArmor.py
+               popd > /dev/null
+       fi
+
+       dodoc AUTHORS ChangeLog NEWS README
+
+       find "${D}" -name '*.la' -delete || die
+}

Reply via email to