5b86383b98
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.
48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
# Template file for 'kcgi'
|
|
pkgname=kcgi
|
|
version=0.10.10
|
|
revision=1
|
|
build_style=configure
|
|
configure_args="PREFIX=/usr MANDIR=/usr/share/man SBINDIR=/usr/bin"
|
|
make_cmd="bmake"
|
|
make_check_target="regress"
|
|
hostmakedepends="bmake"
|
|
checkdepends="pkg-config libcurl-devel"
|
|
short_desc="Minimal CGI library for web applications in C"
|
|
maintainer="Duncaen <duncaen@voidlinux.org>"
|
|
license="ISC"
|
|
homepage="http://kristaps.bsd.lv/kcgi/"
|
|
distfiles="http://kristaps.bsd.lv/kcgi/snapshots/kcgi-${version}.tgz"
|
|
checksum=ca254027809c3f4e730ec21fec92d76d709c2f2827aa7d1becc59572ead427a3
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
aarch64*) broken="sandbox-seccomp-filter.c:76:34: error: initializer element is not constant"
|
|
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() {
|
|
local suffix origsuffix
|
|
suffix="$(seccomp_audit_get_suffix ${XBPS_TARGET_MACHINE})"
|
|
origsuffix="$(seccomp_audit_get_suffix ${XBPS_MACHINE})"
|
|
if [ "$suffix" != "UNKNOWN" ]; then
|
|
sed -i "s/AUDIT_ARCH_${origsuffix}/AUDIT_ARCH_${suffix}/" config.h
|
|
else
|
|
sed -i "/AUDIT_ARCH_${origsuffix}/d" config.h
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
sed -n '2,16p' kcgi.c > LICENSE
|
|
vlicense LICENSE
|
|
}
|