aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Liske <thomas@fiasko-nw.net>2021-03-18 07:40:02 +0100
committerLeo <thinkabit.ukim@gmail.com>2021-03-21 05:56:32 +0000
commit6d9426901458616b5d4088ac229c26e843752a3f (patch)
tree9558d31eb36c7c56ae20b711f9c7880ef0018617
parent852c2350f26fbb22aed5c71a15854f968e1cf90a (diff)
downloadaports-6d9426901458616b5d4088ac229c26e843752a3f.tar.gz
aports-6d9426901458616b5d4088ac229c26e843752a3f.tar.bz2
aports-6d9426901458616b5d4088ac229c26e843752a3f.tar.xz
main/libseccomp: enable python bindings
-rw-r--r--main/libseccomp/APKBUILD17
1 files changed, 14 insertions, 3 deletions
diff --git a/main/libseccomp/APKBUILD b/main/libseccomp/APKBUILD
index 01ec64af91..da672bf83e 100644
--- a/main/libseccomp/APKBUILD
+++ b/main/libseccomp/APKBUILD
@@ -3,15 +3,15 @@
# Contributor: Dan Williams <dan@ma.ssive.co>
pkgname=libseccomp
pkgver=2.5.1
-pkgrel=0
+pkgrel=1
pkgdesc="An interface to the Linux Kernel's syscall filtering mechanism"
url="https://github.com/seccomp/libseccomp"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="linux-headers"
-makedepends="$depends_dev gperf"
+makedepends="$depends_dev gperf cython python3 python3-dev"
checkdepends="bash"
-subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
+subpackages="$pkgname-static $pkgname-dev $pkgname-doc py3-$pkgname:py3"
source="https://github.com/seccomp/libseccomp/releases/download/v$pkgver/libseccomp-$pkgver.tar.gz
remove-redefinition-prctl.patch
"
@@ -32,6 +32,7 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
+ --enable-python \
--enable-static \
--localstatedir=/var
make
@@ -44,6 +45,9 @@ check() {
ppc64le|s390x) rm -f tests/36-sim-ipc_syscalls.tests \
tests/37-sim-ipc_syscalls_be.tests;;
esac
+ # fix python shebang
+ sed -i -e 's@cmd /usr/bin/env python @cmd /usr/bin/env python3 @' tests/regression
+ sed -i -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' tests/*.py
make check
}
@@ -51,5 +55,12 @@ package() {
make DESTDIR="$pkgdir" install
}
+py3() {
+ pkgdesc="Python 3 bindings for $pkgname"
+ depends="$depends $pkgname python3"
+
+ amove usr/lib/python3*
+}
+
sha512sums="2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af libseccomp-2.5.1.tar.gz
f2c31dcafdc9a1ad78e32e76b75e1c1603071eaa3f979e1f2483b879a34ad07e0a4ef3642196a695415cdf81e1ed2bf325175872fb4e203ef9d0e668c287493f remove-redefinition-prctl.patch"