# Maintainer: Andy Postnikov pkgname=php7-pecl-swoole _pkgreal=swoole pkgver=4.4.16 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" 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="7be4705967ed6b7a955f679f8c39585d34dc8c87ba608ac3ae2b0fc3cae9513d9639c8e9aac4278ce85acc215b500044626aab9b2aac725c9ffaef72dfb02dd7 swoole-4.4.16.tgz"