mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-25 03:12:08 +01:00
88 lines
2.1 KiB
Plaintext
88 lines
2.1 KiB
Plaintext
# Contributor: André Klitzing <aklitzing@gmail.com>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
|
|
pkgname=unit-php82
|
|
pkgver=1.35.0
|
|
pkgrel=0
|
|
pkgdesc="PHP 8.2 module for NGINX Unit"
|
|
url="https://unit.nginx.org/"
|
|
arch="all !ppc64le" # https://github.com/rust-lang/cc-rs/issues/1581
|
|
license="Apache-2.0"
|
|
_phpver=82
|
|
depends="unit"
|
|
_clang_ver=20
|
|
makedepends="
|
|
brotli-dev
|
|
clang$_clang_ver
|
|
linux-headers
|
|
openssl-dev>3
|
|
php$_phpver-dev
|
|
php$_phpver-embed
|
|
rust cargo
|
|
zlib-dev
|
|
zstd-dev
|
|
"
|
|
checkdepends="procps-ng
|
|
py3-openssl
|
|
py3-pytest
|
|
php$_phpver-opcache
|
|
"
|
|
#source="https://unit.nginx.org/download/unit-$pkgver.tar.gz
|
|
source="unit-$pkgver.tar.gz::https://github.com/nginx/unit/archive/refs/tags/$pkgver.tar.gz
|
|
phpver.patch
|
|
"
|
|
builddir="$srcdir/unit-$pkgver"
|
|
|
|
build() {
|
|
local _otel=--otel
|
|
case "$CARCH" in
|
|
arm*|x86) _otel='' ;;
|
|
esac
|
|
|
|
./configure \
|
|
--prefix="/usr" \
|
|
--localstatedir="/var" \
|
|
--runstatedir="/run" \
|
|
--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 \
|
|
--brotli --zlib --zstd \
|
|
$_otel \
|
|
--cc=clang-$_clang_ver \
|
|
--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="
|
|
3587a3520126015b165e76dfde2427930e33c51aad7238450bf05bab14c3a46167426879b60f234bcb1122b716e410f7581c3085ccc773214ce59757a4d82c4e unit-1.35.0.tar.gz
|
|
2fe9966f54fd5d23316810b0260d966e2093c303d8a9ecea693971fe2243c579ed5db0e41e01fc01e56801387bd19cc72f5b26c45d21e5d48084e9ded384965b phpver.patch
|
|
"
|