commit: cf84d1a2d6ece1914ced3ff6251283e427167ad9 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Oct 3 23:48:11 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Oct 4 00:22:44 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf84d1a2
sys-libs/libapparmor: partially fix tests; fix PERL_FEATURES wiring * Partially fix tests Needs libapparmor.a. I did start fixing it to use a split out convenience library but it wasn't worth the effort. Always build with --enable-static accordingly. This isn't so bad anyway given libapparmor is not an unreasonable thing to want a static library for. Add a missing dejagnu test dep too. The remaining issue is with USE=python. * Fix PERL_FEATURES use You have to inherit perl-modules for it to do anything... Fixes: bcc3b1b0a6abda84e45882aa8eb488771f72b9a1 Bug: https://bugs.gentoo.org/623550 Bug: https://bugs.gentoo.org/625448 Signed-off-by: Sam James <sam <AT> gentoo.org> ...4.0.3-r1.ebuild => libapparmor-4.0.3-r2.ebuild} | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/sys-libs/libapparmor/libapparmor-4.0.3-r1.ebuild b/sys-libs/libapparmor/libapparmor-4.0.3-r2.ebuild similarity index 86% rename from sys-libs/libapparmor/libapparmor-4.0.3-r1.ebuild rename to sys-libs/libapparmor/libapparmor-4.0.3-r2.ebuild index 2e143a5b8b7e..50f8f922974f 100644 --- a/sys-libs/libapparmor/libapparmor-4.0.3-r1.ebuild +++ b/sys-libs/libapparmor/libapparmor-4.0.3-r2.ebuild @@ -9,7 +9,7 @@ DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{11..13} ) GENTOO_DEPEND_ON_PERL="no" -inherit autotools distutils-r1 perl-functions +inherit autotools distutils-r1 dot-a perl-module MY_PV="$(ver_cut 1-2)" @@ -21,10 +21,10 @@ S=${WORKDIR}/apparmor-${PV}/libraries/${PN} LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="doc +perl +python static-libs ${GENTOO_PERL_USESTRING}" +IUSE="doc +perl +python ${GENTOO_PERL_USESTRING} test" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" # depends on the package already being installed -RESTRICT="test" +RESTRICT="!test? ( test ) test" RDEPEND=" perl? ( @@ -47,6 +47,9 @@ BDEPEND=" ${DISTUTILS_DEPS} dev-lang/swig ) + test? ( + dev-util/dejagnu + ) " src_prepare() { @@ -63,6 +66,8 @@ src_prepare() { } src_configure() { + lto-guarantee-fat + # Run configure through distutils-r1.eclass. Bug 764779 if use python; then distutils-r1_src_configure @@ -77,7 +82,8 @@ python_configure_all() { export YACC=yacc.bison local myeconfargs=( - $(use_enable static-libs static) + # Needed for tests, just always install them. + --enable-static $(use_with perl) $(use_with python) ) @@ -92,13 +98,18 @@ src_compile() { use perl && emake -C swig/perl if use python ; then - pushd swig/python > /dev/null + pushd swig/python > /dev/null || die emake libapparmor_wrap.c distutils-r1_src_compile - popd > /dev/null + popd > /dev/null || die fi } +src_test() { + # Avoid perl-module_src_test + default +} + src_install() { emake DESTDIR="${D}" -C src install emake DESTDIR="${D}" -C include install @@ -123,6 +134,7 @@ src_install() { dodoc AUTHORS ChangeLog NEWS README + strip-lto-bytecode find "${D}" -name '*.la' -delete || die }
