1 |
commit: 24321e22d76226e74760704d828567eb3042c8b0 |
2 |
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 25 05:37:48 2022 +0000 |
4 |
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 28 22:23:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24321e22 |
7 |
|
8 |
sys-libs/libseccomp: add support for loong |
9 |
|
10 |
The LoongArch patch is generated by diffing the original release |
11 |
tarball with the dist tarball, made with the LoongArch support |
12 |
PR [1] applied. Tests have passed on amd64 and loong. |
13 |
|
14 |
[1]: https://github.com/seccomp/libseccomp/pull/356 |
15 |
|
16 |
See: https://github.com/gentoo/gentoo/pull/25189 |
17 |
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org> |
18 |
|
19 |
profiles/arch/base/package.use.mask | 1 + |
20 |
sys-libs/libseccomp/Manifest | 1 + |
21 |
sys-libs/libseccomp/libseccomp-2.5.4.ebuild | 16 ++++++++++++++-- |
22 |
sys-libs/libseccomp/metadata.xml | 3 +++ |
23 |
4 files changed, 19 insertions(+), 2 deletions(-) |
24 |
|
25 |
diff --git a/profiles/arch/base/package.use.mask b/profiles/arch/base/package.use.mask |
26 |
index 2dad2e3c3a61..8d22c623dfd8 100644 |
27 |
--- a/profiles/arch/base/package.use.mask |
28 |
+++ b/profiles/arch/base/package.use.mask |
29 |
@@ -9,6 +9,7 @@ |
30 |
# want to have the flag enabled without hassle. |
31 |
sys-kernel/linux-headers experimental-loong |
32 |
sys-libs/glibc experimental-loong |
33 |
+sys-libs/libseccomp experimental-loong |
34 |
|
35 |
# James Le Cuirot <chewi@g.o> (2022-02-24) |
36 |
# These GRUB platforms are only for MIPS. |
37 |
|
38 |
diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest |
39 |
index 1199558b0162..e770c0df7ad7 100644 |
40 |
--- a/sys-libs/libseccomp/Manifest |
41 |
+++ b/sys-libs/libseccomp/Manifest |
42 |
@@ -1,3 +1,4 @@ |
43 |
DIST libseccomp-2.5.1.tar.gz 638811 BLAKE2B 683ae7536c0cba36f4d30640b42361171fc34b7cb04985ea56e64369df29c440361a0205385b14580cc0e481e0f9ffd0b0e8ebd4ac98817ed59298db6b274c35 SHA512 2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af |
44 |
DIST libseccomp-2.5.3.tar.gz 637572 BLAKE2B cedf04b3a926f9fe5202e6169ddac6b983e755009c14fc1d645157b9c0bcdf65d4085f8ea7abad90f3a0c13ae4d66b5d8306e725168490863aad15976de1eae7 SHA512 00170fe2360f0c0b33293dccfcc33e98fabb99619f34ecefbcc92bfdaa249ba91e7433226545b842b71542a3b224b6e980ea2ae656c4addf07e84a0def1870a0 |
45 |
+DIST libseccomp-2.5.4-loongarch64-20220425.patch.xz 132768 BLAKE2B f3ab165b028b5f8b4c16574936b915595807ebeb49ef7365d6051f3dfafa7da46ef2a9de458e0a268298cb340152abe1f3c0c293446462a06696bc9ce92d2f72 SHA512 94f23c7a2cc2ea8acb01fef00ef184295c276b14b2b3ba0c65687fd72081df8478f3f04c51b0b391ba44529c4f914e6edbb4132af935e3be55902f641d478780 |
46 |
DIST libseccomp-2.5.4.tar.gz 637228 BLAKE2B 38b134cb578f9355667546f92950ebcf8c53ccaf98db568db9aadfa9629c054136849e03d4bf9f09f73998fe66a5e8a9038573d19740b2bddf5518a8a0119229 SHA512 92650bd7d1d48b383f402a536b97a017fd0f6ad1234daf4b938d01c92e8d134a01d2f2dd45fd9e2d025d7556bd1386ec360402145a87f20580c85949d62cea0e |
47 |
|
48 |
diff --git a/sys-libs/libseccomp/libseccomp-2.5.4.ebuild b/sys-libs/libseccomp/libseccomp-2.5.4.ebuild |
49 |
index fed0b3c8f425..4b5c83a4fcad 100644 |
50 |
--- a/sys-libs/libseccomp/libseccomp-2.5.4.ebuild |
51 |
+++ b/sys-libs/libseccomp/libseccomp-2.5.4.ebuild |
52 |
@@ -16,13 +16,14 @@ if [[ ${PV} == *9999 ]] ; then |
53 |
PRERELEASE="2.6.0" |
54 |
inherit autotools git-r3 |
55 |
else |
56 |
- SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz" |
57 |
+ SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz |
58 |
+ experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/${P}-loongarch64-20220425.patch.xz )" |
59 |
KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux" |
60 |
fi |
61 |
|
62 |
LICENSE="LGPL-2.1" |
63 |
SLOT="0" |
64 |
-IUSE="python static-libs test" |
65 |
+IUSE="experimental-loong python static-libs test" |
66 |
RESTRICT="!test? ( test )" |
67 |
|
68 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
69 |
@@ -42,8 +43,19 @@ PATCHES=( |
70 |
) |
71 |
|
72 |
src_prepare() { |
73 |
+ if use experimental-loong; then |
74 |
+ PATCHES+=( "${WORKDIR}/${P}-loongarch64-20220425.patch" ) |
75 |
+ fi |
76 |
+ |
77 |
default |
78 |
|
79 |
+ if use experimental-loong; then |
80 |
+ # touch generated files to avoid activating maintainer mode |
81 |
+ # remove when loong-fix-build.patch is no longer necessary |
82 |
+ touch ./aclocal.m4 ./configure ./configure.h.in || die |
83 |
+ find . -name Makefile.in -exec touch {} + || die |
84 |
+ fi |
85 |
+ |
86 |
if [[ ${PV} == *9999 ]] ; then |
87 |
sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die |
88 |
|
89 |
|
90 |
diff --git a/sys-libs/libseccomp/metadata.xml b/sys-libs/libseccomp/metadata.xml |
91 |
index dd20dd0473ec..75b652d43244 100644 |
92 |
--- a/sys-libs/libseccomp/metadata.xml |
93 |
+++ b/sys-libs/libseccomp/metadata.xml |
94 |
@@ -5,6 +5,9 @@ |
95 |
<email>base-system@g.o</email> |
96 |
<name>Gentoo Base System</name> |
97 |
</maintainer> |
98 |
+ <use> |
99 |
+ <flag name="experimental-loong">Add experimental LoongArch patchset</flag> |
100 |
+ </use> |
101 |
<upstream> |
102 |
<remote-id type="github">seccomp/libseccomp</remote-id> |
103 |
<remote-id type="sourceforge">libseccomp</remote-id> |