# Maintainer: Andy Postnikov pkgname=php82-pecl-swoole _extname=swoole pkgver=5.0.3 pkgrel=0 pkgdesc="Event-driven asynchronous and concurrent networking engine with high performance for PHP 8.2 - PECL" url="https://pecl.php.net/package/swoole" arch="all" license="Apache-2.0" depends="php82-curl php82-mysqlnd php82-openssl php82-sockets" makedepends="php82-dev openssl-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" case "$CARCH" in ppc64le|s390x) makedepends="$makedepends libucontext-dev" ;; esac build() { case "$CARCH" in ppc64le|s390x) export LDFLAGS="$LDFLAGS -lucontext" ;; esac phpize82 ./configure --prefix=/usr \ --with-php-config=php-config82 \ --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 php82 -d extension=modules/swoole.so --ri swoole } package() { make INSTALL_ROOT="$pkgdir" install local _confdir="$pkgdir"/etc/php82/conf.d install -d $_confdir echo "extension=$_extname" > $_confdir/50_$_extname.ini } sha512sums=" db106d90901513a141e54785cbfaa97eb33ea5ae69ec1875d0128d1586cc3226db9f26ed4efe4399d1e474486a4e6437a438c42bae0c0b57cf7e0bd3ae301412 php-pecl-swoole-5.0.3.tgz "