# Maintainer: Andy Postnikov pkgname=php81-pecl-swoole _extname=swoole pkgver=5.0.3 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 openssl-dev>3 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 \ --with-nghttp2_dir=/usr \ --enable-mysqlnd \ --enable-openssl --with-openssl-dir=/usr \ --enable-sockets \ --enable-swoole-curl \ --enable-brotli --with-brotli-dir=/usr \ --enable-cares 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=" db106d90901513a141e54785cbfaa97eb33ea5ae69ec1875d0128d1586cc3226db9f26ed4efe4399d1e474486a4e6437a438c42bae0c0b57cf7e0bd3ae301412 php-pecl-swoole-5.0.3.tgz "