aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php81-pecl-swoole/APKBUILD
blob: 995b08ceb1b3fd5201e47fdaf83494b3b2b9cb16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php81-pecl-swoole
_extname=swoole
pkgver=4.8.5
pkgrel=0
pkgdesc="Event-driven asynchronous and concurrent networking engine with high performance for PHP 8.1 - PECL"
url="https://pecl.php.net/package/swoole"
arch="all"
license="Apache-2.0"
depends="php81-curl php81-mysqlnd php81-openssl php81-sockets"
makedepends="php81-dev openssl1.1-compat-dev nghttp2-dev c-ares-dev curl-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir"/$_extname-$pkgver
subpackages="$pkgname-dev"
replaces="php81-pecl-openswoole"

case "$CARCH" in
	ppc64le|s390x) makedepends="$makedepends libucontext-dev" ;;
esac


build() {
	case "$CARCH" in
		ppc64le|s390x) export LDFLAGS="$LDFLAGS -lucontext" ;;
	esac
	phpize81
	./configure --prefix=/usr \
		--with-php-config=php-config81 \
		--enable-mysqlnd \
		--enable-openssl --with-openssl-dir=/usr \
		--enable-sockets \
		--enable-swoole-curl \
		--enable-swoole-json \
		--enable-cares \
		--enable-http2
	make
}

check() {
	# needs extra services to test all suite
	php81 -d extension=modules/swoole.so --ri swoole
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/php81/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/50_$_extname.ini
}

sha512sums="
9a21f92943049b573d8261d8d4b0678357ab22ece348d0183793111b227b7b842968df9a80dd5f88dc57c7bd49fa3306b33818360da5c35a40a5a21c5257b53a  php-pecl-swoole-4.8.5.tgz
"