kcgi: enable ppc64 targets and a wider range of hosts
This assumed the build host was x86_64, now it should work on a wider range of hosts. It also patches in seccomp stuff for ppc64.
This commit is contained in:
parent
a14a606d31
commit
5b86383b98
15
srcpkgs/kcgi/patches/ppc64-sandbox.patch
Normal file
15
srcpkgs/kcgi/patches/ppc64-sandbox.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -438,6 +438,12 @@ if [ ${HAVE_SECCOMP_FILTER} -eq 1 ]; then
|
||||||
|
arm*)
|
||||||
|
echo "#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM"
|
||||||
|
;;
|
||||||
|
+ ppc64le)
|
||||||
|
+ echo "#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE"
|
||||||
|
+ ;;
|
||||||
|
+ ppc64)
|
||||||
|
+ echo "#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
@ -19,18 +19,27 @@ case "$XBPS_TARGET_MACHINE" in
|
|||||||
aarch64*) broken="sandbox-seccomp-filter.c:76:34: error: initializer element is not constant"
|
aarch64*) broken="sandbox-seccomp-filter.c:76:34: error: initializer element is not constant"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
seccomp_audit_get_suffix() {
|
||||||
|
case "$1" in
|
||||||
|
i686*) echo "X86" ;;
|
||||||
|
x86_64*) echo "X86_64" ;;
|
||||||
|
arm*) echo "ARM" ;;
|
||||||
|
aarch64*) echo "AARCH64" ;;
|
||||||
|
ppc64le*) echo "PPC64LE" ;;
|
||||||
|
ppc64*) echo "PPC64" ;;
|
||||||
|
*) echo "UNKNOWN" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
post_configure() {
|
post_configure() {
|
||||||
local suffix
|
local suffix origsuffix
|
||||||
case "${XBPS_TARGET_MACHINE}" in
|
suffix="$(seccomp_audit_get_suffix ${XBPS_TARGET_MACHINE})"
|
||||||
i686*) suffix="X86" ;;
|
origsuffix="$(seccomp_audit_get_suffix ${XBPS_MACHINE})"
|
||||||
x86_64*) suffix="X86_64" ;;
|
if [ "$suffix" != "UNKNOWN" ]; then
|
||||||
arm*) suffix="ARM" ;;
|
sed -i "s/AUDIT_ARCH_${origsuffix}/AUDIT_ARCH_${suffix}/" config.h
|
||||||
aarch64*) suffix="AARCH64" ;;
|
else
|
||||||
esac
|
sed -i "/AUDIT_ARCH_${origsuffix}/d" config.h
|
||||||
[ -z "$suffix" ] \
|
fi
|
||||||
&& sed -i "/AUDIT_ARCH_X86_64/d" config.h \
|
|
||||||
|| sed -i "s/AUDIT_ARCH_X86_64/AUDIT_ARCH_${suffix}/" config.h
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user