diff options
Diffstat (limited to 'devel/pecl-swoole')
-rw-r--r-- | devel/pecl-swoole/Makefile | 16 | ||||
-rw-r--r-- | devel/pecl-swoole/distinfo | 6 | ||||
-rw-r--r-- | devel/pecl-swoole/files/patch-config.m4 | 25 | ||||
-rw-r--r-- | devel/pecl-swoole/files/patch-include_swoole.h | 20 | ||||
-rw-r--r-- | devel/pecl-swoole/files/patch-src_network_Server.c | 16 | ||||
-rw-r--r-- | devel/pecl-swoole/files/patch-swoole__config.h | 2 | ||||
-rw-r--r-- | devel/pecl-swoole/files/patch-swoole__process.c | 15 | ||||
-rw-r--r-- | devel/pecl-swoole/pkg-descr | 2 |
8 files changed, 92 insertions, 10 deletions
diff --git a/devel/pecl-swoole/Makefile b/devel/pecl-swoole/Makefile index 6813d2b5f94c..38829bbea260 100644 --- a/devel/pecl-swoole/Makefile +++ b/devel/pecl-swoole/Makefile @@ -2,7 +2,8 @@ # $FreeBSD$ PORTNAME= swoole -PORTVERSION= 1.8.13 +PORTVERSION= 1.9.5 +PORTREVISION= 1 CATEGORIES= devel net MASTER_SITES= http://pecl.php.net/get/ PKGNAMEPREFIX= pecl- @@ -14,15 +15,20 @@ COMMENT= Asynchronous & concurrent & distributed networking framework LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -USES= php:ext ssl tar:tgz +USES= execinfo php:ext ssl tar:tgz CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib USE_PHP= pcre -OPTIONS_DEFINE= HTTP2 REDIS -HTTP2_LIB_DEPENDS= libnghttp2.so:www/nghttp2 +OPTIONS_DEFINE= HTTP2 REDIS RING_BUFFER SOCKETS +HTTP2_LIB_DEPENDS= libnghttp2.so:www/libnghttp2 HTTP2_CONFIGURE_ON= --enable-http2 --enable-openssl REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis -REDIS_CONFIGURE_ON= --enable-async-redis --enable-coroutine +REDIS_CONFIGURE_ON= --enable-async-redis +RING_BUFFER_DESC= Use ring buffer pool +RING_BUFFER_CONFIGURE_ON= --enable-ringbuffer +SOCKETS_USE= PHP=sockets:build +SOCKETS_DESC= Use native php sockets extension +SOCKETS_CONFIGURE_ON= --enable-sockets .include <bsd.port.mk> diff --git a/devel/pecl-swoole/distinfo b/devel/pecl-swoole/distinfo index a74c5888d516..4c0160d63c7d 100644 --- a/devel/pecl-swoole/distinfo +++ b/devel/pecl-swoole/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1477449966 -SHA256 (PECL/swoole-1.8.13.tgz) = 54ceae0287d1c3bb1aaa5ea4e16f40f9f2301afe1c517c16cc3b5e9876b682be -SIZE (PECL/swoole-1.8.13.tgz) = 523667 +TIMESTAMP = 1486302935 +SHA256 (PECL/swoole-1.9.5.tgz) = ffc11770606478938e7c5437b29e486d1737ddc3ebb4a8f51bcebe127c5d1a45 +SIZE (PECL/swoole-1.9.5.tgz) = 542481 diff --git a/devel/pecl-swoole/files/patch-config.m4 b/devel/pecl-swoole/files/patch-config.m4 new file mode 100644 index 000000000000..9d5e05d598d0 --- /dev/null +++ b/devel/pecl-swoole/files/patch-config.m4 @@ -0,0 +1,25 @@ +--- config.m4.orig 2017-01-24 02:05:48 UTC ++++ config.m4 +@@ -85,7 +85,13 @@ AC_DEFUN([AC_SWOOLE_CPU_AFFINITY], + AC_MSG_CHECKING([for cpu affinity]) + AC_TRY_COMPILE( + [ ++ #ifdef __FreeBSD__ ++ #include <sys/types.h> ++ #include <sys/cpuset.h> ++ typedef cpuset_t cpu_set_t; ++ #else + #include <sched.h> ++ #endif + ], [ + cpu_set_t cpu_set; + CPU_ZERO(&cpu_set); +@@ -178,7 +184,7 @@ if test "$PHP_SWOOLE" != "no"; then + AC_CHECK_LIB(c, poll, AC_DEFINE(HAVE_POLL, 1, [have poll])) + AC_CHECK_LIB(c, sendfile, AC_DEFINE(HAVE_SENDFILE, 1, [have sendfile])) + AC_CHECK_LIB(c, kqueue, AC_DEFINE(HAVE_KQUEUE, 1, [have kqueue])) +- AC_CHECK_LIB(c, backtrace, AC_DEFINE(HAVE_EXECINFO, 1, [have execinfo])) ++ AC_CHECK_LIB(execinfo, backtrace, AC_DEFINE(HAVE_EXECINFO, 1, [have execinfo])) + AC_CHECK_LIB(c, daemon, AC_DEFINE(HAVE_DAEMON, 1, [have daemon])) + AC_CHECK_LIB(c, mkostemp, AC_DEFINE(HAVE_MKOSTEMP, 1, [have mkostemp])) + AC_CHECK_LIB(c, inotify_init, AC_DEFINE(HAVE_INOTIFY, 1, [have inotify])) diff --git a/devel/pecl-swoole/files/patch-include_swoole.h b/devel/pecl-swoole/files/patch-include_swoole.h new file mode 100644 index 000000000000..2a661b1dd492 --- /dev/null +++ b/devel/pecl-swoole/files/patch-include_swoole.h @@ -0,0 +1,20 @@ +--- include/swoole.h.orig 2017-01-24 02:05:48 UTC ++++ include/swoole.h +@@ -40,7 +40,17 @@ extern "C" { + #include <assert.h> + #include <time.h> + #include <pthread.h> ++ ++#if defined(HAVE_CPU_AFFINITY) ++#ifdef __FreeBSD__ ++#include <sys/types.h> ++#include <sys/cpuset.h> ++#include <pthread_np.h> ++typedef cpuset_t cpu_set_t; ++#else + #include <sched.h> ++#endif ++#endif + + #include <arpa/inet.h> + #include <netinet/in.h> diff --git a/devel/pecl-swoole/files/patch-src_network_Server.c b/devel/pecl-swoole/files/patch-src_network_Server.c new file mode 100644 index 000000000000..0dae3fa5df46 --- /dev/null +++ b/devel/pecl-swoole/files/patch-src_network_Server.c @@ -0,0 +1,16 @@ +--- src/network/Server.c.orig 2017-02-06 09:30:50 UTC ++++ src/network/Server.c +@@ -522,7 +522,13 @@ int swServer_worker_init(swServer *serv, + { + CPU_SET(SwooleWG.id % SW_CPU_NUM, &cpu_set); + } ++ ++#ifdef __FreeBSD__ ++ if (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, ++ sizeof(cpu_set), &cpu_set) < 0) ++#else + if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set) < 0) ++#endif + { + swSysError("sched_setaffinity() failed."); + } diff --git a/devel/pecl-swoole/files/patch-swoole__config.h b/devel/pecl-swoole/files/patch-swoole__config.h index c6a481322de9..8579d544d183 100644 --- a/devel/pecl-swoole/files/patch-swoole__config.h +++ b/devel/pecl-swoole/files/patch-swoole__config.h @@ -1,4 +1,4 @@ ---- swoole_config.h.orig 2015-09-03 15:27:08 UTC +--- swoole_config.h.orig 2017-01-24 02:05:48 UTC +++ swoole_config.h @@ -19,7 +19,7 @@ #ifndef __clang__ diff --git a/devel/pecl-swoole/files/patch-swoole__process.c b/devel/pecl-swoole/files/patch-swoole__process.c new file mode 100644 index 000000000000..ddd1d1678bb2 --- /dev/null +++ b/devel/pecl-swoole/files/patch-swoole__process.c @@ -0,0 +1,15 @@ +--- swoole_process.c.orig 2017-02-06 09:32:48 UTC ++++ swoole_process.c +@@ -963,7 +963,12 @@ static PHP_METHOD(swoole_process, setaff + CPU_SET(Z_LVAL_P(value), &cpu_set); + SW_HASHTABLE_FOREACH_END(); + ++#ifdef __FreeBSD__ ++ if (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, ++ sizeof(cpu_set), &cpu_set) < 0) ++#else + if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set) < 0) ++#endif + { + swoole_php_sys_error(E_WARNING, "sched_setaffinity() failed."); + RETURN_FALSE; diff --git a/devel/pecl-swoole/pkg-descr b/devel/pecl-swoole/pkg-descr index 3cdc3fd5b166..2063f5dafd1a 100644 --- a/devel/pecl-swoole/pkg-descr +++ b/devel/pecl-swoole/pkg-descr @@ -11,4 +11,4 @@ Asynchronous & concurrent & distributed networking framework for PHP. * async dns lookup * support IPv4/IPv6/UnixSocket/TCP/UDP -WWW: http://pecl.php.net/package/swoole +WWW: https://pecl.php.net/package/swoole |