aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pecl-swoole/APKBUILD
blob: 49aa72ab3dc8edb0916abb1dfa8b8358b9174c59 (plain)
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
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php7-pecl-swoole
_pkgreal=swoole
pkgver=4.5.0
pkgrel=0
pkgdesc="Event-driven asynchronous and concurrent networking engine with high performance for PHP."
url="https://pecl.php.net/package/swoole"
arch="all"
license="Apache-2.0"
depends="php7-openssl php7-sockets"
makedepends="php7-dev autoconf re2c openssl-dev nghttp2-dev libucontext-dev"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz
	fix32bit.patch"
builddir="$srcdir"/$_pkgreal-$pkgver
subpackages="$pkgname-dev"

build() {
	case "$CARCH" in
		ppc64le|s390x|x86) export LDFLAGS="$LDFLAGS -lucontext" ;;
	esac
	phpize7
	./configure --prefix=/usr \
		--with-php-config=php-config7 \
		--enable-openssl \
		--enable-sockets \
		--enable-http2
	make
}

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

package() {
	make INSTALL_ROOT="$pkgdir"/ install
	install -d "$pkgdir"/etc/php7/conf.d
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/50_$_pkgreal.ini
}

sha512sums="ae64d09fd6e548cad519c82152ecd68ef0eb3db5adcd2f264de558cc732dcde6591b6ed9f78dc6ea94a498eb822a2841dec02aa234e531f1c76581fc6ea13bcf  swoole-4.5.0.tgz
92acf2862a5e44079fdcf083e2464267ac837bcf55095dc60b6a2b5da793910069aa165b564c15e2b74e0156d2153068f7ab835a7401588ef14bde1a3de3f510  fix32bit.patch"