summaryrefslogtreecommitdiff
path: root/sys-libs/libseccomp
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/libseccomp')
-rw-r--r--sys-libs/libseccomp/Manifest3
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild109
-rw-r--r--sys-libs/libseccomp/libseccomp-9999.ebuild26
3 files changed, 123 insertions, 15 deletions
diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest
index 61e903a79336..b9b10f72a6e5 100644
--- a/sys-libs/libseccomp/Manifest
+++ b/sys-libs/libseccomp/Manifest
@@ -4,6 +4,7 @@ AUX libseccomp-2.6.0-python-shared.patch 778 BLAKE2B 343bcb6c8e8cfc9bab3e0439d39
AUX libseccomp-python-shared.patch 759 BLAKE2B e2c42e18ca93fe5fddbc3a5b47ac0e6a29e566292fd62b87e6b45f6cb230570a2d1907a8b192e80b32c1900d069a4f10a866fa50bd9b88f5b78abff4206bd4cb SHA512 74548c7969869ff8f937a75eac720f1c654fad87dc17aed1c041bcb765586b4ee978a3ff7c6281be03277f6c74f2ec32624f91beb55afec3066a06a9e51483e2
DIST libseccomp-2.5.5-loongarch64-20231204.patch.xz 41236 BLAKE2B 7831b28c275771bb675b4b5045e657d96c254e69cee7188a19f4812bc83343e0041772c20be1e7392ec88387726b49f34aa670a906b922dba531a0d35e548b1e SHA512 7870e536d834360dfec446493815b675a305f6bec1b79d0caae6fb546d2f694e77ce52e547bbcdb22cda272272bf3d5a427960b4aa76fb987d06ab035298007d
DIST libseccomp-2.5.5.tar.gz 642445 BLAKE2B d770cee1f3e02fbbcd9f25655b360ab38160ad800e2829a67f2b9da62b095a90be99ac851a67344cf95bd6810a6268da4655dc1d37d996e58239c4999eb41998 SHA512 f630e7a7e53a21b7ccb4d3e7b37616b89aeceba916677c8e3032830411d77a14c2d74dcf594cd193b1acc11f52595072e28316dc44300e54083d5d7b314a38da
+EBUILD libseccomp-2.5.5-r1.ebuild 2949 BLAKE2B cfbcebb4291024f624fced03f62decebcccb78ba5b3907b9c84c828a6cb63471cf88ff1aa0fef8aca1fc40523a9c6cabe56fb00bdfd8eb7fd3aa83de4f71b870 SHA512 b681eb60ec7be4daf01afde5bdc14e07aae6a7d4e7e2ab9268b3e84b362d156cc7926a74ea4168358ae2ec41299f4fb496e7500bb98df0a8eac56d1769b1ed5f
EBUILD libseccomp-2.5.5.ebuild 2933 BLAKE2B d2b8b53e01877d343de0b6838b2bf4b3addeec676fbd89fae289788da03fb4b9b7af89e193e17621361bb39e33f77f80393a7807887010016dc7d49120653b1d SHA512 9f911a3647dac012b5cad4c919ba1a286fbc9348320810f7b772125da4250c4d26ae5cb870caf96a45930f3f040296f375b31818e69c0ccee826b497208d7d86
-EBUILD libseccomp-9999.ebuild 2396 BLAKE2B 0669f79001818ee3ac920bf4ebaa7e911c8cd0c47f0c4108f71810b59a33ff944b63bb67224faeaae14be66c278b93ce8545f5818a7653f5a1a89e5a5a4fcd98 SHA512 e81b38e62402d9e0c2da6df354aa37efca073156c6cfeda581f6d3770070dd138fa3ce70a22ddc748a86c21973d526c73a5421488cb21c7a07d0bd352111a7a6
+EBUILD libseccomp-9999.ebuild 2405 BLAKE2B 0a9c3bfdd38a571fbec6aed093ca8827fe5e9ffce520a57fba2cebecc5793a9176ddf05793a68f182b8cd227ac81c5a680bad618d646dcc9514e7c57d47bc06d SHA512 eb49628f82d2094948b5f168b63e2d81e682e699aa20e59e879f7c194d947136c90b875f792f91a3cca902f1d4e1c4f3e4c8cabb16194c2a60e9ba3f18c0eda7
MISC metadata.xml 506 BLAKE2B 44dc13629234226f9314270c05d5c7c87575639fe12282e73697ead63d016ee9b52a89d673be5881bfcbf4d605024ecfcc3e19510581d334a6d5737df6a36b50 SHA512 93b0a53783499eab6b6264867a049830d765ee56d19b0c60e764f6651dff9f0d11efbec0783fdeb17c2c64d3f409bb4b1b1f74f267022775b992b61a1df03100
diff --git a/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild b/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
new file mode 100644
index 000000000000..d935008bb87f
--- /dev/null
+++ b/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit distutils-r1 multilib-minimal
+
+DESCRIPTION="High level interface to Linux seccomp filter"
+HOMEPAGE="https://github.com/seccomp/libseccomp"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git"
+ PRERELEASE="2.6.0"
+ inherit autotools git-r3
+else
+ SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz
+ experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/${PN}-2.5.5-loongarch64-20231204.patch.xz )"
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="experimental-loong python static-libs test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# We need newer kernel headers; we don't keep strict control of the exact
+# version here, just be safe and pull in the latest stable ones. bug #551248
+DEPEND=">=sys-kernel/linux-headers-5.15
+ python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+BDEPEND="${DEPEND}
+ dev-util/gperf
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}"/libseccomp-python-shared.patch
+ "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
+ "${FILESDIR}"/libseccomp-2.5.5-which-hunt.patch
+)
+
+src_prepare() {
+ if use experimental-loong; then
+ PATCHES+=( "${WORKDIR}/${PN}-2.5.5-loongarch64-20231204.patch" )
+ fi
+
+ default
+
+ if use experimental-loong; then
+ # touch generated files to avoid activating maintainer mode
+ # remove when loong-fix-build.patch is no longer necessary
+ touch ./aclocal.m4 ./configure ./configure.h.in || die
+ find . -name Makefile.in -exec touch {} + || die
+ fi
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
+
+ eautoreconf
+ fi
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ --disable-python
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && use python ; then
+ # setup.py expects libseccomp.so to live in "../.libs"
+ # Copy the python files to the right place for this.
+ rm -r "${BUILD_DIR}"/src/python || die
+ cp -r "${S}"/src/python "${BUILD_DIR}"/src/python || die
+ local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}"
+
+ # setup.py reads VERSION_RELEASE from the environment
+ local -x VERSION_RELEASE=${PRERELEASE-${PV}}
+
+ pushd "${BUILD_DIR}/src/python" >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use python ; then
+ distutils-r1_src_install
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -type f -name "${PN}.la" -delete || die
+
+ einstalldocs
+}
diff --git a/sys-libs/libseccomp/libseccomp-9999.ebuild b/sys-libs/libseccomp/libseccomp-9999.ebuild
index 5cf5976ca5ff..1969eef9f5ea 100644
--- a/sys-libs/libseccomp/libseccomp-9999.ebuild
+++ b/sys-libs/libseccomp/libseccomp-9999.ebuild
@@ -1,14 +1,16 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
inherit distutils-r1 multilib-minimal
-DESCRIPTION="high level interface to Linux seccomp filter"
+DESCRIPTION="High level interface to Linux seccomp filter"
HOMEPAGE="https://github.com/seccomp/libseccomp"
if [[ ${PV} == *9999 ]] ; then
@@ -60,15 +62,6 @@ multilib_src_configure() {
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
-do_python() {
- # setup.py reads VERSION_RELEASE from the environment
- local -x VERSION_RELEASE=${PRERELEASE-${PV}}
-
- pushd "${BUILD_DIR}/src/python" >/dev/null || die
- "$@"
- popd >/dev/null || die
-}
-
multilib_src_compile() {
emake
@@ -79,7 +72,12 @@ multilib_src_compile() {
cp -r "${S}"/src/python "${BUILD_DIR}"/src/python || die
local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}"
- do_python distutils-r1_src_compile
+ # setup.py reads VERSION_RELEASE from the environment
+ local -x VERSION_RELEASE=${PRERELEASE-${PV}}
+
+ pushd "${BUILD_DIR}/src/python" >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
fi
}
@@ -87,7 +85,7 @@ multilib_src_install() {
emake DESTDIR="${D}" install
if multilib_is_native_abi && use python ; then
- do_python distutils-r1_src_install
+ distutils-r1_src_install
fi
}