projects/aports·blob master · refs

76 lines · 1.8 KiB

1# Maintainer: Andy Postnikov <[email protected]>
2pkgname=php84-pecl-swoole
3_extname=swoole
4pkgver=6.2.2
5_pkgver=${pkgver/_rc/RC}
6pkgrel=0
7pkgdesc="Event-driven asynchronous and concurrent networking engine with high performance for PHP 8.4 - PECL"
8url="https://pecl.php.net/package/swoole"
9arch="all !x86 !armv7 !armhf" # no 32-bit support
10license="Apache-2.0"
11_phpv=84
12_php=php$_phpv
13depends="
14 $_php-pecl-brotli
15 $_php-curl
16 $_php-mysqlnd
17 $_php-openssl
18 $_php-pdo
19 $_php-sockets
20 "
21makedepends="$_php-dev
22 brotli-dev
23 c-ares-dev
24 curl-dev
25 linux-headers
26 libpq-dev
27 liburing-dev
28 nghttp2-dev
29 openssl-dev
30 sqlite-dev
31 "
32source="php-pecl-$_extname-$_pkgver.tgz::https://pecl.php.net/get/$_extname-$_pkgver.tgz"
33builddir="$srcdir"/$_extname-$_pkgver
34subpackages="$pkgname-dev"
35
36case "$CARCH" in
37 ppc64le|s390x|loongarch64) makedepends="$makedepends libucontext-dev" ;;
38esac
39
40build() {
41 sed -i s/OS_SHOULD_HAVE_LIBRT=1/OS_SHOULD_HAVE_LIBRT=0/ config.m4
42 case "$CARCH" in
43 ppc64le|s390x|loongarch64) export LDFLAGS="$LDFLAGS -lucontext" ;;
44 esac
45 phpize$_phpv
46 ./configure --prefix=/usr \
47 --with-php-config=php-config$_phpv \
48 --with-nghttp2_dir=/usr \
49 --enable-mysqlnd \
50 --enable-openssl --with-openssl-dir=/usr \
51 --enable-sockets \
52 --enable-swoole-curl \
53 --enable-swoole-pgsql \
54 --enable-swoole-sqlite \
55 --enable-brotli --with-brotli-dir=/usr \
56 --enable-zstd \
57 --enable-iouring \
58 --enable-cares
59 make
60}
61
62check() {
63 # needs extra services to test all suite
64 $_php -d extension=modules/swoole.so --ri swoole
65}
66
67package() {
68 make INSTALL_ROOT="$pkgdir" install
69 local _confdir="$pkgdir"/etc/$_php/conf.d
70 install -d $_confdir
71 echo "extension=$_extname" > $_confdir/50_$_extname.ini
72}
73
74sha512sums="
75e6c247458e4e5ea8f16de6690687eb0460a4787f49e6b446e5e924d1244a7d36266bf54567674e09a03e0f3af8057cc90e23d21cc3323f85f8e36d60d6078a9d php-pecl-swoole-6.2.2.tgz
76"