summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Xuerui <xen0n@gentoo.org>2022-04-25 13:37:48 +0800
committerWANG Xuerui <xen0n@gentoo.org>2022-04-29 06:23:15 +0800
commit24321e22d76226e74760704d828567eb3042c8b0 (patch)
tree975d1371905b83024ef8442d6501d23bcae6c6a8
parentdev-libs/userspace-rcu: add support for loong (diff)
downloadgentoo-24321e22d76226e74760704d828567eb3042c8b0.tar.gz
gentoo-24321e22d76226e74760704d828567eb3042c8b0.tar.bz2
gentoo-24321e22d76226e74760704d828567eb3042c8b0.zip
sys-libs/libseccomp: add support for loong
The LoongArch patch is generated by diffing the original release tarball with the dist tarball, made with the LoongArch support PR [1] applied. Tests have passed on amd64 and loong. [1]: https://github.com/seccomp/libseccomp/pull/356 See: https://github.com/gentoo/gentoo/pull/25189 Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
-rw-r--r--profiles/arch/base/package.use.mask1
-rw-r--r--sys-libs/libseccomp/Manifest1
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.4.ebuild16
-rw-r--r--sys-libs/libseccomp/metadata.xml3
4 files changed, 19 insertions, 2 deletions
diff --git a/profiles/arch/base/package.use.mask b/profiles/arch/base/package.use.mask
index 2dad2e3c3a61..8d22c623dfd8 100644
--- a/profiles/arch/base/package.use.mask
+++ b/profiles/arch/base/package.use.mask
@@ -9,6 +9,7 @@
# want to have the flag enabled without hassle.
sys-kernel/linux-headers experimental-loong
sys-libs/glibc experimental-loong
+sys-libs/libseccomp experimental-loong
# James Le Cuirot <chewi@gentoo.org> (2022-02-24)
# These GRUB platforms are only for MIPS.
diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest
index 1199558b0162..e770c0df7ad7 100644
--- a/sys-libs/libseccomp/Manifest
+++ b/sys-libs/libseccomp/Manifest
@@ -1,3 +1,4 @@
DIST libseccomp-2.5.1.tar.gz 638811 BLAKE2B 683ae7536c0cba36f4d30640b42361171fc34b7cb04985ea56e64369df29c440361a0205385b14580cc0e481e0f9ffd0b0e8ebd4ac98817ed59298db6b274c35 SHA512 2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af
DIST libseccomp-2.5.3.tar.gz 637572 BLAKE2B cedf04b3a926f9fe5202e6169ddac6b983e755009c14fc1d645157b9c0bcdf65d4085f8ea7abad90f3a0c13ae4d66b5d8306e725168490863aad15976de1eae7 SHA512 00170fe2360f0c0b33293dccfcc33e98fabb99619f34ecefbcc92bfdaa249ba91e7433226545b842b71542a3b224b6e980ea2ae656c4addf07e84a0def1870a0
+DIST libseccomp-2.5.4-loongarch64-20220425.patch.xz 132768 BLAKE2B f3ab165b028b5f8b4c16574936b915595807ebeb49ef7365d6051f3dfafa7da46ef2a9de458e0a268298cb340152abe1f3c0c293446462a06696bc9ce92d2f72 SHA512 94f23c7a2cc2ea8acb01fef00ef184295c276b14b2b3ba0c65687fd72081df8478f3f04c51b0b391ba44529c4f914e6edbb4132af935e3be55902f641d478780
DIST libseccomp-2.5.4.tar.gz 637228 BLAKE2B 38b134cb578f9355667546f92950ebcf8c53ccaf98db568db9aadfa9629c054136849e03d4bf9f09f73998fe66a5e8a9038573d19740b2bddf5518a8a0119229 SHA512 92650bd7d1d48b383f402a536b97a017fd0f6ad1234daf4b938d01c92e8d134a01d2f2dd45fd9e2d025d7556bd1386ec360402145a87f20580c85949d62cea0e
diff --git a/sys-libs/libseccomp/libseccomp-2.5.4.ebuild b/sys-libs/libseccomp/libseccomp-2.5.4.ebuild
index fed0b3c8f425..4b5c83a4fcad 100644
--- a/sys-libs/libseccomp/libseccomp-2.5.4.ebuild
+++ b/sys-libs/libseccomp/libseccomp-2.5.4.ebuild
@@ -16,13 +16,14 @@ if [[ ${PV} == *9999 ]] ; then
PRERELEASE="2.6.0"
inherit autotools git-r3
else
- SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
+ SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz
+ experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/${P}-loongarch64-20220425.patch.xz )"
KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
fi
LICENSE="LGPL-2.1"
SLOT="0"
-IUSE="python static-libs test"
+IUSE="experimental-loong python static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -42,8 +43,19 @@ PATCHES=(
)
src_prepare() {
+ if use experimental-loong; then
+ PATCHES+=( "${WORKDIR}/${P}-loongarch64-20220425.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
diff --git a/sys-libs/libseccomp/metadata.xml b/sys-libs/libseccomp/metadata.xml
index dd20dd0473ec..75b652d43244 100644
--- a/sys-libs/libseccomp/metadata.xml
+++ b/sys-libs/libseccomp/metadata.xml
@@ -5,6 +5,9 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
+ <use>
+ <flag name="experimental-loong">Add experimental LoongArch patchset</flag>
+ </use>
<upstream>
<remote-id type="github">seccomp/libseccomp</remote-id>
<remote-id type="sourceforge">libseccomp</remote-id>