aports/testing/unit-php81/APKBUILD
Andy Postnikov 18741e235f community/unit: remove php81 support
moved to testing/unit-php81: new aport
2024-04-10 18:02:27 +02:00

74 lines
1.9 KiB
Plaintext

# Contributor: André Klitzing <aklitzing@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=unit-php81
pkgver=1.32.1
pkgrel=0
pkgdesc="PHP 8.1 module for NGINX Unit"
url="https://unit.nginx.org/"
arch="all"
license="Apache-2.0"
_phpver=81
depends="unit"
makedepends="
linux-headers
openssl-dev>3
php$_phpver-dev
php$_phpver-embed
"
checkdepends="procps-ng
py3-openssl
py3-pytest
php$_phpver-opcache
"
source="https://unit.nginx.org/download/unit-$pkgver.tar.gz
phpver.patch
fix-tls-tests.patch
"
builddir="$srcdir/unit-$pkgver"
build() {
./configure \
--prefix="/usr" \
--localstatedir="/var" \
--statedir="/var/lib/unit" \
--control="unix:/run/control.unit.sock" \
--pid="/run/unit.pid" \
--log="/var/log/unit.log" \
--tmpdir=/tmp \
--modulesdir="/usr/lib/unit/modules" \
--openssl \
--user=unit \
--group=unit \
--tests
./configure php --module=php$_phpver --config=php-config$_phpver
make
make php$_phpver tests
}
check() {
# FIXME: some tests fail in CI or locally in checkroot too
local _fds=160 # fds leaking in tests
local _allow_fail=no
case "$CARCH" in
armhf | armv7) _allow_fail=yes ;; # segfault
esac
pytest test --fds-threshold=$_fds -k "
test_php \
and not test_php_isolation \
and not test_php_application_forbidden \
and not test_php_application_shared_opcache \
" || [ "$_allow_fail" = yes ]
}
package() {
make php$_phpver-install DESTDIR="$pkgdir"
}
sha512sums="
159b36f7afb8857188c9b64ee192e18d6990da3733caafcfb684b98e3f5182a7589ed2439f32af0cd3c763a3fa73f061f5a73ef01894182b1c12a4cd324c528a unit-1.32.1.tar.gz
2fe9966f54fd5d23316810b0260d966e2093c303d8a9ecea693971fe2243c579ed5db0e41e01fc01e56801387bd19cc72f5b26c45d21e5d48084e9ded384965b phpver.patch
aae610dd2e8056d278397af708926a8e24f282158dc539182f9dfd44582f6b8bba1a57df7769539572f4268db305d84f12eb9fe07dfeec9a8781a6f66ca28386 fix-tls-tests.patch
"