mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-17 12:46:47 +02:00
76 lines
1.8 KiB
Text
76 lines
1.8 KiB
Text
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
|
|
pkgname=php81-pecl-swoole
|
|
_extname=swoole
|
|
pkgver=6.0.2
|
|
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 !x86 !armv7 !armhf" # no 32-bit support
|
|
license="Apache-2.0"
|
|
_phpv=81
|
|
_php=php$_phpv
|
|
depends="
|
|
$_php-pecl-brotli
|
|
$_php-curl
|
|
$_php-mysqlnd
|
|
$_php-openssl
|
|
$_php-pdo
|
|
$_php-sockets
|
|
"
|
|
makedepends="$_php-dev
|
|
brotli-dev
|
|
c-ares-dev
|
|
curl-dev
|
|
linux-headers
|
|
libpq-dev
|
|
liburing-dev
|
|
nghttp2-dev
|
|
openssl-dev
|
|
sqlite-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|loongarch64) makedepends="$makedepends libucontext-dev" ;;
|
|
esac
|
|
|
|
build() {
|
|
sed -i s/OS_SHOULD_HAVE_LIBRT=1/OS_SHOULD_HAVE_LIBRT=0/ config.m4
|
|
case "$CARCH" in
|
|
ppc64le|s390x|loongarch64) export LDFLAGS="$LDFLAGS -lucontext" ;;
|
|
esac
|
|
phpize$_phpv
|
|
./configure --prefix=/usr \
|
|
--with-php-config=php-config$_phpv \
|
|
--with-nghttp2_dir=/usr \
|
|
--enable-mysqlnd \
|
|
--enable-openssl --with-openssl-dir=/usr \
|
|
--enable-sockets \
|
|
--enable-swoole-curl \
|
|
--enable-swoole-pgsql \
|
|
--enable-swoole-sqlite \
|
|
--enable-brotli --with-brotli-dir=/usr \
|
|
--enable-zstd \
|
|
--enable-iouring \
|
|
--enable-cares
|
|
make
|
|
}
|
|
|
|
check() {
|
|
# needs extra services to test all suite
|
|
$_php -d extension=modules/swoole.so --ri swoole
|
|
}
|
|
|
|
package() {
|
|
make INSTALL_ROOT="$pkgdir" install
|
|
local _confdir="$pkgdir"/etc/$_php/conf.d
|
|
install -d $_confdir
|
|
echo "extension=$_extname" > $_confdir/50_$_extname.ini
|
|
}
|
|
|
|
sha512sums="
|
|
87f09ac0b10a372f9867bd2a5f34db20e6e210dd2de8463fd67783b757bfa95c53b0983c75979a2d9df28787bcb2c8a667faac45597c60ef8b8edac2fa57a952 php-pecl-swoole-6.0.2.tgz
|
|
"
|