diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch new file mode 100644 index 0000000000..d69f986875 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch @@ -0,0 +1,32 @@ +https://github.com/stevegrubb/libcap-ng/commit/75fe3714a8da28f0e2939c4402527782014401dd +https://github.com/stevegrubb/libcap-ng/pull/52 + +From b7d21b473badb349bc0d6246b3804a8a2d329f36 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Wed, 3 Apr 2024 17:32:04 -0700 +Subject: [PATCH] utils: link using libcap-ng.la + +When linking internal dependencies that were linked using $(LIBTOOL) the +ideal method is to use the generated libtool archive (.la) file. This +fixes the build with slibtool which doesn't find -lcap-ng during the +build and explicitly requires the .la file to be used. + +Gentoo Issue: https://bugs.gentoo.org/928450 +Signed-off-by: orbea +--- + utils/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/Makefile.am b/utils/Makefile.am +index f430454..97aa021 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -25,7 +25,7 @@ CONFIG_CLEAN_FILES = *.loT *.rej *.orig + AUTOMAKE_OPTIONS = no-dependencies + EXTRA_DIST = $(man_MANS) + AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src +-LIBS = -L${top_builddir}/src -lcap-ng ++LDADD = ${top_builddir}/src/libcap-ng.la + AM_CFLAGS = -W -Wall -Wshadow ${WFLAGS} -Wundef -D_GNU_SOURCE + bin_PROGRAMS = pscap netcap filecap captest + man_MANS = pscap.8 netcap.8 filecap.8 captest.8 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild index fdc6248bdb..ffb59a3726 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -6,7 +6,7 @@ EAPI=7 # Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches # Same maintainer in Fedora as upstream PYTHON_COMPAT=( python3_{9..11} ) -inherit autotools flag-o-matic python-r1 +inherit autotools flag-o-matic out-of-source-utils python-r1 DESCRIPTION="POSIX 1003.1e capabilities" HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild index f69c5049ed..f6c6b3dbba 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches # Same maintainer in Fedora as upstream PYTHON_COMPAT=( python3_{10..12} ) -inherit autotools flag-o-matic libtool python-r1 +inherit autotools flag-o-matic out-of-source-utils python-r1 DESCRIPTION="POSIX 1003.1e capabilities" HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" @@ -27,17 +27,14 @@ BDEPEND="python? ( >=dev-lang/swig-2 )" PATCHES=( "${FILESDIR}"/${P}-swig.patch + # https://bugs.gentoo.org/928450 + "${FILESDIR}"/${P}-slibtool.patch ) src_prepare() { default - if use prefix ; then - sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die - # bug #668722 - eautomake - fi - elibtoolize + eautoreconf } src_configure() { @@ -47,6 +44,7 @@ src_configure() { local myconf=( $(use_enable static-libs static) + --with-capability_header="${ESYSROOT}"/usr/include/linux/capability.h ) local pythonconf=( diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild index f0f688f287..cffaa6067d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches # Same maintainer in Fedora as upstream PYTHON_COMPAT=( python3_{10..12} ) -inherit autotools flag-o-matic python-r1 +inherit autotools flag-o-matic out-of-source-utils python-r1 DESCRIPTION="POSIX 1003.1e capabilities" HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/"