summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-06-24 19:56:38 -0400
committerBrian Evans <grknight@gentoo.org>2018-06-24 19:56:38 -0400
commitd0dcab484fbb7ebc073c95c91e1210683be6bef5 (patch)
treec43ce216da14e05ef1787a916c4fe056cd83d13a
parentsys-apps/apply-default-acl: new version 0.4.1. (diff)
downloadgentoo-d0dcab484fbb7ebc073c95c91e1210683be6bef5.tar.gz
gentoo-d0dcab484fbb7ebc073c95c91e1210683be6bef5.tar.bz2
gentoo-d0dcab484fbb7ebc073c95c91e1210683be6bef5.zip
dev-php/swoole: New Package
Swoole is an high-performance network framework using an event-driven, asynchronous, non-blocking I/O model which makes it scalable and efficient. It is written in C language without 3rd party libraries as PHP extension Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r--dev-php/swoole/Manifest1
-rw-r--r--dev-php/swoole/metadata.xml12
-rw-r--r--dev-php/swoole/swoole-4.0.1.ebuild68
3 files changed, 81 insertions, 0 deletions
diff --git a/dev-php/swoole/Manifest b/dev-php/swoole/Manifest
new file mode 100644
index 000000000000..a256dda4dea6
--- /dev/null
+++ b/dev-php/swoole/Manifest
@@ -0,0 +1 @@
+DIST swoole-4.0.1.tgz 899395 BLAKE2B 7e7320905cb83794115280977031cc5254a4947781fde05db6e7803f34ff0f5c0ecad84f8aa86adc3c21320b031fa3104fb6c953e9060791dbd9d5c497edbcfc SHA512 0df6ae1bf28ec52abebf1a597c0774e7e5de4bb8378c916a46896c7f84822c8466bbb0d3d188e671e7c39faafa94d2dc2245a468dacb2711c7f0fa617dc42aa8
diff --git a/dev-php/swoole/metadata.xml b/dev-php/swoole/metadata.xml
new file mode 100644
index 000000000000..067ddccde379
--- /dev/null
+++ b/dev-php/swoole/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>php-bugs@gentoo.org</email>
+<name>PHP Project</name>
+</maintainer>
+<use>
+<flag name="http2">Add support for HTTP/2 protocol via <pkg>net-libs/nghttp2</pkg></flag>
+<flag name="redis">Add support for redis via <pkg>dev-libs/hiredis</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/dev-php/swoole/swoole-4.0.1.ebuild b/dev-php/swoole/swoole-4.0.1.ebuild
new file mode 100644
index 000000000000..8a332f5938d2
--- /dev/null
+++ b/dev-php/swoole/swoole-4.0.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PHP_EXT_NAME="swoole"
+PHP_EXT_INI="yes"
+PHP_EXT_ZENDEXT="no"
+PHP_EXT_SAPIS="cli"
+DOCS=( README.md )
+
+USE_PHP="php7-0 php7-1 php7-2"
+
+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"
+
+DEPEND="
+ dev-libs/libaio
+ dev-libs/boost:0=
+ dev-libs/libpcre
+ http2? ( net-libs/nghttp2:0= )
+ redis? ( dev-libs/hiredis:0= )
+ ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) )
+ php_targets_php7-0? ( dev-lang/php:7.0[cli,sockets?] )
+ php_targets_php7-1? ( dev-lang/php:7.1[cli,sockets?] )
+ php_targets_php7-2? ( dev-lang/php:7.2[cli,sockets?] )
+ mysql? (
+ php_targets_php7-0? ( dev-lang/php:7.0[mysql,mysqli(+)] )
+ php_targets_php7-1? ( dev-lang/php:7.1[mysql,mysqli(+)] )
+ php_targets_php7-2? ( dev-lang/php:7.2[mysql,mysqli(+)] )
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+IUSE="debug http2 libressl mysql redis sockets ssl threads"
+
+src_configure() {
+ # PostgreSQL disabled due to Gentoo's slot system
+ local PHP_EXT_ECONF_ARGS=(
+ --with-swoole
+ --disable-coroutine-postgresql
+ $(use_enable debug swoole-debug)
+ $(use_enable http2)
+ $(use_enable mysql mysqlnd)
+ $(use_enable redis async_redis)
+ $(use_enable ssl openssl)
+ $(use_with ssl openssl-dir "${EROOT%/}/usr")
+ $(use_enable threads thread)
+ $(use_enable sockets)
+ )
+
+ php-ext-source-r3_src_configure
+}
+
+src_test() {
+ local slot
+ for slot in $(php_get_slots); do
+ php_init_slot_env "${slot}"
+ SKIP_ONLINE_TESTS="yes" NO_INTERACTION="yes" emake test
+ done
+}