diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /dev-php/swoole/swoole-4.8.7.ebuild | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-php/swoole/swoole-4.8.7.ebuild')
-rw-r--r-- | dev-php/swoole/swoole-4.8.7.ebuild | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/dev-php/swoole/swoole-4.8.7.ebuild b/dev-php/swoole/swoole-4.8.7.ebuild new file mode 100644 index 000000000000..74dd612ea9a3 --- /dev/null +++ b/dev-php/swoole/swoole-4.8.7.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +PHP_EXT_NAME="swoole" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +PHP_EXT_SAPIS="cli" +PHP_EXT_NEEDED_USE="cli,sockets?" +DOCS=( README.md ) + +USE_PHP="php7-4 php8-0 php8-1" + +inherit php-ext-pecl-r3 + +HOMEPAGE="https://www.swoole.co.uk" +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="Event-driven asynchronous & concurrent & coroutine networking engine" +LICENSE="Apache-2.0" +SLOT="0" +# Tests require network access for composer libraries under tests/include/lib/vendor +RESTRICT="test" + +DEPEND=" + app-arch/brotli:0= + dev-libs/libpcre + sys-libs/zlib:0= + ssl? ( + dev-libs/openssl:0= + ) + mysql? ( + php_targets_php7-4? ( dev-lang/php:7.4[mysql,mysqli(+)] ) + php_targets_php8-0? ( dev-lang/php:8.0[mysql,mysqli(+)] ) + php_targets_php8-1? ( dev-lang/php:8.1[mysql,mysqli(+)] ) + ) +" + +RDEPEND="${DEPEND}" + +IUSE="debug http2 mysql sockets ssl" + +src_configure() { + # JEMalloc not included as it refuses to find a ${ESYSROOT}/usr/includes/jemalloc subdirectory + local PHP_EXT_ECONF_ARGS=( + --enable-swoole + $(use_enable debug) + $(use_enable http2) + $(use_enable mysql mysqlnd) + $(use_enable ssl openssl) + $(use_with ssl openssl-dir "${ESYSROOT}/usr") + $(use_enable sockets) + ) + + php-ext-source-r3_src_configure +} + +src_test() { + ulimit -n 16384 > /dev/null 2>&1 + local slot + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + cd tests || die + if has_version ">=dev-php/xdebug-3" ; then + sed -i 's/xdebug.default_enable=0/xdebug.mode=off/' run-tests || die + fi + PHPT=1 "${PHPCLI}" -d "memory_limit=1024m" ./run-tests swoole_* || die + done +} |