summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2020-10-10 20:13:15 +1100
committerMichael Palimaka <kensington@gentoo.org>2020-10-10 20:44:03 +1100
commitfed65024dca1aeb59251d9ff0201cf49edde0048 (patch)
treebb99ed7705591c39113218d0d9a6bfa63bd782c2
parentsec-policy/apparmor-profiles: version bump 3.0.0 (diff)
downloadgentoo-fed65024dca1aeb59251d9ff0201cf49edde0048.tar.gz
gentoo-fed65024dca1aeb59251d9ff0201cf49edde0048.tar.bz2
gentoo-fed65024dca1aeb59251d9ff0201cf49edde0048.zip
sys-libs/libapparmor: version bump 3.0.0
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Michael Palimaka <kensington@gentoo.org>
-rw-r--r--sys-libs/libapparmor/Manifest1
-rw-r--r--sys-libs/libapparmor/files/libapparmor-3.0.0-symbol_visibility.patch20
-rw-r--r--sys-libs/libapparmor/libapparmor-3.0.0.ebuild99
3 files changed, 120 insertions, 0 deletions
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
+}