[gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/, sys-libs/libapparmor/

2024-03-14 Thread Sam James
commit: 195d4c82c66a72c929422c18a979e61ef83bfe01
Author: LinuxUserGD  gmail  com>
AuthorDate: Sun Mar 10 16:00:27 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar 15 02:33:24 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=195d4c82

sys-libs/libapparmor: test compiler support of flto-partition flag

[sam: Drop revbump.]
[sam: Fix $() -> ${} in patch.]

Closes: https://bugs.gentoo.org/919463
Upstream-PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1155
Upstream-Commit: 
https://gitlab.com/apparmor/apparmor/-/commit/d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e
Signed-off-by: LinuxUserGD  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29512
Closes: https://github.com/gentoo/gentoo/pull/35697
Signed-off-by: Sam James  gentoo.org>

 .../libapparmor-3.1.4-clang-flto-partition.patch   | 33 ++
 sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild   |  4 +++
 2 files changed, 37 insertions(+)

diff --git 
a/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch 
b/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch
new file mode 100644
index ..6cb3528ea4db
--- /dev/null
+++ b/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch
@@ -0,0 +1,33 @@
+https://gitlab.com/apparmor/apparmor/-/commit/d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e
+From d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e Mon Sep 17 00:00:00 2001
+From: John Johansen 
+Date: Sun, 25 Feb 2024 03:31:01 +
+Subject: [PATCH] Merge makefiles: test for support of flto-partition flag
+--- a/configure.ac
 b/configure.ac
+@@ -92,6 +92,13 @@ if test "$ac_cv_prog_cc_c99" = "no"; then
+   AC_MSG_ERROR([C99 mode is required to build libapparmor])
+ fi
+ 
++EXTRA_CFLAGS="-Wall ${EXTRA_WARNINGS} -fPIC"
++AX_CHECK_COMPILE_FLAG([-flto-partition=none], , , [-Werror])
++AS_VAR_IF([ax_cv_check_cflags__Werror__flto_partition_none], [yes],
++  [EXTRA_CFLAGS="$EXTRA_CFLAGS -flto-partition=none"]
++  ,)
++AC_SUBST([AM_CFLAGS], ["$EXTRA_CFLAGS"])
++
+ AC_OUTPUT(
+ Makefile
+ doc/Makefile
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -39,7 +39,6 @@ include $(COMMONDIR)/Make.rules
+ BUILT_SOURCES = grammar.h scanner.h af_protos.h
+ AM_LFLAGS = -v
+ AM_YFLAGS = -d -p aalogparse_
+-AM_CFLAGS = -Wall $(EXTRA_WARNINGS) -fPIC -flto-partition=none
+ AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/include/
+ scanner.h: scanner.l
+   $(LEX) -v $<
+-- 
+GitLab

diff --git a/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild 
b/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild
index 0b01f9a89d00..30cc21d16aee 100644
--- a/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild
+++ b/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild
@@ -46,6 +46,10 @@ BDEPEND="
)
 "
 
+PATCHES=(
+   "${FILESDIR}"/${PN}-3.1.4-clang-flto-partition.patch
+)
+
 src_prepare() {
default
 



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/

2021-06-24 Thread Michael Palimaka
commit: e763966bd80e1500488196cae08012f8c87e8c6e
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Sat Jun 19 18:52:34 2021 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Thu Jun 24 07:54:41 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e763966b

sys-libs/libapparmor: remove unused patch(es)

Closes: https://github.com/gentoo/gentoo/pull/21336
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Michael Palimaka  gentoo.org>

 .../files/libapparmor-3.0.0-symbol_visibility.patch  | 20 
 1 file changed, 20 deletions(-)

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
deleted file mode 100644
index d5002461462..000
--- a/sys-libs/libapparmor/files/libapparmor-3.0.0-symbol_visibility.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-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:
-   *;
- };



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/, sys-libs/libapparmor/

2020-10-10 Thread Michael Palimaka
commit: fed65024dca1aeb59251d9ff0201cf49edde0048
Author: Michael Palimaka  gentoo  org>
AuthorDate: Sat Oct 10 09:13:15 2020 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Sat Oct 10 09:44:03 2020 +
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  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 000..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 000..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
+   

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/, sys-libs/libapparmor/

2017-06-03 Thread Michael Palimaka
commit: d9a0d0ee5d936ad82432e9dd00ac731b197fe0ee
Author: Michael Palimaka  gentoo  org>
AuthorDate: Sat Jun  3 12:53:15 2017 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Sat Jun  3 12:53:27 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9a0d0ee

sys-libs/libapparmor: remove 2.10.1-r1

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sys-libs/libapparmor/Manifest  |  1 -
 .../files/libapparmor-2.10.1-import-path.patch | 46 ---
 sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild  | 88 --
 3 files changed, 135 deletions(-)

diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index c564ea3a69c..b3f6af57495 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1,2 +1 @@
-DIST apparmor-2.10.1.tar.gz 4494037 SHA256 
07a76f338304baadc4ad69d025fe000b1ab4779a251ae8f338afdc13ef1e0f24 SHA512 
93992c25f77bb46389160df8324c811b4c2f0fad4b425902b30ce31d6e1f3a0efe6b359c6f8348ef646f8b527584e1f19eb4f46b27fb1ba742489ad09d171278
 WHIRLPOOL 
d59d935db520d3c59bd0398727a1151b3280c2bf56e8f978c3595f50ff06cb70aaddc0313a7d16705b8eadeb2018aeef7ce585423c3a6ed7c34dfd4e06df9c25
 DIST apparmor-2.11.0.tar.gz 5013297 SHA256 
b1c489ea11e7771b8e6b181532cafbf9ebe6603e3cb00e2558f21b7a5bdd739a SHA512 
86b33c1cbbd256028dd5fdfaddc764c225845acd19c833223fce5cdd6164f997fe010d7b642791f834a3417b4ea847d77175fdfd89ea99ab2111933790d42b55
 WHIRLPOOL 
2a3ca9a943694fba0f225cffc2bac3782545c0970b490189585a87cccf18047128eaab754e53003e03d535a5851a3198b0738a89c6547e88d081f6ad31f066d5

diff --git a/sys-libs/libapparmor/files/libapparmor-2.10.1-import-path.patch 
b/sys-libs/libapparmor/files/libapparmor-2.10.1-import-path.patch
deleted file mode 100644
index ff18c37753e..000
--- a/sys-libs/libapparmor/files/libapparmor-2.10.1-import-path.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Add patch from openSUSE fixing python module import failure when built with
-dev-lang/swig-3.0.10.
-
-https://bugzilla.opensuse.org/show_bug.cgi?id=987607
-
-Gentoo-bug: 594238
-
 a/swig/python/Makefile.am
-+++ b/swig/python/Makefile.am
-@@ -6,9 +6,8 @@ SUBDIRS = test
- 
- libapparmor_wrap.c: $(srcdir)/../SWIG/libapparmor.i
-   $(SWIG) -python -I$(srcdir)/../../include -module LibAppArmor -o $@ 
$(srcdir)/../SWIG/libapparmor.i
--  mv LibAppArmor.py __init__.py
- 
--MOSTLYCLEANFILES=libapparmor_wrap.c __init__.py
-+MOSTLYCLEANFILES=libapparmor_wrap.c LibAppArmor.py
- 
- all-local: libapparmor_wrap.c setup.py
-   if test ! -f libapparmor_wrap.c; then cp $(srcdir)/libapparmor_wrap.c . 
; fi
-
 a/dev/null
-+++ b/swig/python/__init__.py
-@@ -0,0 +1 @@
-+from LibAppArmor.LibAppArmor import *
-
 a/swig/python/Makefile.in
-+++ b/swig/python/Makefile.in
-@@ -326,7 +326,7 @@ top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- @HAVE_PYTHON_TRUE@EXTRA_DIST = libapparmor_wrap.c
- @HAVE_PYTHON_TRUE@SUBDIRS = test
--@HAVE_PYTHON_TRUE@MOSTLYCLEANFILES = libapparmor_wrap.c __init__.py
-+@HAVE_PYTHON_TRUE@MOSTLYCLEANFILES = libapparmor_wrap.c LibAppArmor.py
- all: all-recursive
- 
- .SUFFIXES:
-@@ -648,7 +648,6 @@ uninstall-am:
- 
- @HAVE_PYTHON_TRUE@libapparmor_wrap.c: $(srcdir)/../SWIG/libapparmor.i
- @HAVE_PYTHON_TRUE@$(SWIG) -python -I$(srcdir)/../../include -module 
LibAppArmor -o $@ $(srcdir)/../SWIG/libapparmor.i
--@HAVE_PYTHON_TRUE@mv LibAppArmor.py __init__.py
- 
- @HAVE_PYTHON_TRUE@all-local: libapparmor_wrap.c setup.py
- @HAVE_PYTHON_TRUE@if test ! -f libapparmor_wrap.c; then cp 
$(srcdir)/libapparmor_wrap.c . ; fi
-

diff --git a/sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild 
b/sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild
deleted file mode 100644
index 2d12451a726..000
--- a/sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=1
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python{2_7,3_4} )
-GENTOO_DEPEND_ON_PERL="no"
-
-inherit autotools-utils distutils-r1 perl-module versionator
-
-DESCRIPTION="Library to support AppArmor userspace utilities"
-HOMEPAGE="http://apparmor.net/;
-SRC_URI="https://launchpad.net/apparmor/$(get_version_component_range 
1-2)/${PV}/+download/apparmor-${PV}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~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}
-
-src_prepare() {
-   rm -r m4 || die "failed to remove bundled macros"
-   epatch "${FILESDIR}"/${PN}-2.10-symbol_visibility.patch
-   epatch 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/, sys-libs/libapparmor/

2016-09-24 Thread Michael Palimaka
commit: 4930a1eb1971a0b1fde5b556d9e58104cc5a1176
Author: Michael Palimaka  gentoo  org>
AuthorDate: Sat Sep 24 17:55:02 2016 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Sat Sep 24 17:55:26 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4930a1eb

sys-libs/libapparmor: revision bump solving python module import failure with 
dev-lang/swig-3.0.10

Patch from openSUSE.

Gentoo-bug: 594238

Package-Manager: portage-2.3.1

 .../files/libapparmor-2.10.1-import-path.patch | 46 +++
 sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild  | 89 ++
 2 files changed, 135 insertions(+)

diff --git a/sys-libs/libapparmor/files/libapparmor-2.10.1-import-path.patch 
b/sys-libs/libapparmor/files/libapparmor-2.10.1-import-path.patch
new file mode 100644
index ..ff18c37
--- /dev/null
+++ b/sys-libs/libapparmor/files/libapparmor-2.10.1-import-path.patch
@@ -0,0 +1,46 @@
+Add patch from openSUSE fixing python module import failure when built with
+dev-lang/swig-3.0.10.
+
+https://bugzilla.opensuse.org/show_bug.cgi?id=987607
+
+Gentoo-bug: 594238
+
+--- a/swig/python/Makefile.am
 b/swig/python/Makefile.am
+@@ -6,9 +6,8 @@ SUBDIRS = test
+ 
+ libapparmor_wrap.c: $(srcdir)/../SWIG/libapparmor.i
+   $(SWIG) -python -I$(srcdir)/../../include -module LibAppArmor -o $@ 
$(srcdir)/../SWIG/libapparmor.i
+-  mv LibAppArmor.py __init__.py
+ 
+-MOSTLYCLEANFILES=libapparmor_wrap.c __init__.py
++MOSTLYCLEANFILES=libapparmor_wrap.c LibAppArmor.py
+ 
+ all-local: libapparmor_wrap.c setup.py
+   if test ! -f libapparmor_wrap.c; then cp $(srcdir)/libapparmor_wrap.c . 
; fi
+
+--- a/dev/null
 b/swig/python/__init__.py
+@@ -0,0 +1 @@
++from LibAppArmor.LibAppArmor import *
+
+--- a/swig/python/Makefile.in
 b/swig/python/Makefile.in
+@@ -326,7 +326,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ @HAVE_PYTHON_TRUE@EXTRA_DIST = libapparmor_wrap.c
+ @HAVE_PYTHON_TRUE@SUBDIRS = test
+-@HAVE_PYTHON_TRUE@MOSTLYCLEANFILES = libapparmor_wrap.c __init__.py
++@HAVE_PYTHON_TRUE@MOSTLYCLEANFILES = libapparmor_wrap.c LibAppArmor.py
+ all: all-recursive
+ 
+ .SUFFIXES:
+@@ -648,7 +648,6 @@ uninstall-am:
+ 
+ @HAVE_PYTHON_TRUE@libapparmor_wrap.c: $(srcdir)/../SWIG/libapparmor.i
+ @HAVE_PYTHON_TRUE@$(SWIG) -python -I$(srcdir)/../../include -module 
LibAppArmor -o $@ $(srcdir)/../SWIG/libapparmor.i
+-@HAVE_PYTHON_TRUE@mv LibAppArmor.py __init__.py
+ 
+ @HAVE_PYTHON_TRUE@all-local: libapparmor_wrap.c setup.py
+ @HAVE_PYTHON_TRUE@if test ! -f libapparmor_wrap.c; then cp 
$(srcdir)/libapparmor_wrap.c . ; fi
+

diff --git a/sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild 
b/sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild
new file mode 100644
index ..c38bb1c
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-2.10.1-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit autotools-utils distutils-r1 perl-module versionator
+
+DESCRIPTION="Library to support AppArmor userspace utilities"
+HOMEPAGE="http://apparmor.net/;
+SRC_URI="https://launchpad.net/apparmor/$(get_version_component_range 
1-2)/${PV}/+download/apparmor-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~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}
+
+src_prepare() {
+   rm -r m4 || die "failed to remove bundled macros"
+   epatch "${FILESDIR}"/${PN}-2.10-symbol_visibility.patch
+   epatch "${FILESDIR}"/${PN}-2.10.1-import-path.patch
+   autotools-utils_src_prepare
+   use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+   local myeconfargs=(
+   $(use_with perl) \
+   $(use_with python)
+   )
+
+   autotools-utils_src_configure
+}
+
+src_compile() {
+   autotools-utils_src_compile -C src
+   autotools-utils_src_compile -C include
+   use doc && autotools-utils_src_compile -C doc
+   use perl && autotools-utils_src_compile -C swig/perl
+
+   if use python ; then
+   pushd "${BUILD_DIR}"/swig/python > /dev/null
+   emake libapparmor_wrap.c
+   distutils-r1_src_compile
+   popd > /dev/null
+   fi
+}
+
+src_install() {
+   autotools-utils_src_install -C src
+   autotools-utils_src_install -C include
+   use doc && autotools-utils_src_install -C doc
+
+   if use perl ; then
+   

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libapparmor/files/, sys-libs/libapparmor/

2016-01-12 Thread Michael Palimaka
commit: 53ed41f7849121e27571d7e489487bc0d14eefa1
Author: George Kranis  users  noreply  github  
com>
AuthorDate: Sun Jan 10 09:22:34 2016 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Tue Jan 12 16:10:47 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53ed41f7

sys-libs/libapparmor: Bump to 2.10, expose private func in .so via patch

The patch is needed so that sys-apps/apparmor can dynamically
build against it.

 sys-libs/libapparmor/Manifest  |  1 +
 .../files/libapparmor-2.10-symbol_visibility.patch | 13 
 sys-libs/libapparmor/libapparmor-2.10.ebuild   | 85 ++
 3 files changed, 99 insertions(+)

diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index dbf34e8..7d9c922 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1,2 +1,3 @@
+DIST apparmor-2.10.tar.gz 2421759 SHA256 
4d0e224257a29671b694bd9054edf0dd213aa690fd02844ecf3329b86ac506f4 SHA512 
f659bc0efca3b0cf30dd5420427f0756a86bb9d5bbb12abe82aa60eb4a7ead7848a2b2d9d9ca9cea28161a9e998c9923cdea55d38755144e3d34da1a5ad52fdd
 WHIRLPOOL 
762e2e12c6b6a9110c91a11578ef4d83a9a774b3a882a3a08ab4a5af3a16e53f66211fc6b4e68c8ef2a47ec0c312287864584640b0d2fe3c327d95525be710f8
 DIST apparmor-2.8.3.tar.gz 1534245 SHA256 
84c2ca7fb6d170e5bb56270f01c9b78e78a991b9eee7fa53a9e6409ef0845c7e SHA512 
c1102206fc93e09865a8cbb239164298af298175d7043efa10ab7227c23e7aef664d38fa3b67e82e2263fba9dbc0567fa659233226633b7e26ac80e2c02c78fb
 WHIRLPOOL 
24ee03843c4cc08e63c4641784bd648f2b85e42b2528e03b3a7d80d5d6b96e1eec5ea9cfdd2d1243dc855c9a05d0661fa3336f8d95b460be3b2bceab51936086
 DIST apparmor-2.8.4.tar.gz 1539923 SHA256 
98cb81b2e2e17a8034005d2612ba6c33893486fdf995626f3bb94a4a082371d6 SHA512 
d9f15bbfb4cb8428cacc7669099a0ce8acf33cbf309a65fea601f1d23b6e741a403eb4f8d91a8897f1959862f8d2ca8843918e56f511f2230e88476037511177
 WHIRLPOOL 
0520a5295a1184754c4d4dafe8253f4c0b6c8d0145ee586f0ecdab2d86630b7d08f8fd8ae87658c5663d3410575838b01d8c1ad2faec74271153c0d7a510e35b

diff --git 
a/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch 
b/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch
new file mode 100644
index 000..beaf355
--- /dev/null
+++ b/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch
@@ -0,0 +1,13 @@
+Adds an aditional symbol to allow dynamic linking.
+
+--- src/libapparmor.map
 src/libapparmor.map
+@@ -94,6 +94,7 @@
+   _aa_autoclose;
+   _aa_autofclose;
+   _aa_dirat_for_each;
++  _aa_asprintf;
+   local:
+   *;
+ };
+

diff --git a/sys-libs/libapparmor/libapparmor-2.10.ebuild 
b/sys-libs/libapparmor/libapparmor-2.10.ebuild
new file mode 100644
index 000..49afee6
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-2.10.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit autotools-utils distutils-r1 perl-module versionator
+
+DESCRIPTION="Library to support AppArmor userspace utilities"
+HOMEPAGE="http://apparmor.net/;
+SRC_URI="https://launchpad.net/apparmor/$(get_version_component_range 
1-2)/${PV}/+download/apparmor-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~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}
+
+src_prepare() {
+   rm -r m4 || die "failed to remove bundled macros"
+   epatch "${FILESDIR}"/${PN}-2.10-symbol_visibility.patch
+   autotools-utils_src_prepare
+   use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+   local myeconfargs=(
+   $(use_with perl) \
+   $(use_with python)
+   )
+
+   autotools-utils_src_configure
+}
+
+src_compile() {
+   autotools-utils_src_compile -C src
+   autotools-utils_src_compile -C include
+   use doc && autotools-utils_src_compile -C doc
+   use perl && autotools-utils_src_compile -C swig/perl
+
+   if use python ; then
+   pushd "${BUILD_DIR}"/swig/python > /dev/null
+   emake libapparmor_wrap.c
+   distutils-r1_src_compile
+   popd > /dev/null
+   fi
+}
+
+src_install() {
+   autotools-utils_src_install -C src
+   autotools-utils_src_install -C include
+   use doc && autotools-utils_src_install -C doc
+
+   if use perl ; then
+   autotools-utils_src_install -C swig/perl
+   perl_set_version
+