Index: head/devel/pecl-swoole/Makefile =================================================================== --- head/devel/pecl-swoole/Makefile (revision 481628) +++ head/devel/pecl-swoole/Makefile (revision 481629) @@ -1,27 +1,27 @@ # Created by: vanilla@ # $FreeBSD$ PORTNAME= swoole PORTVERSION= 1.10.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel net MAINTAINER= vanilla@FreeBSD.org COMMENT= Asynchronous & concurrent & distributed networking framework LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= compiler:c11 localbase:ldflags php:pecl ssl USE_PHP= pcre OPTIONS_DEFINE= HTTP2 REDIS 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 SOCKETS_USE= PHP=sockets:build SOCKETS_DESC= Use native php sockets extension SOCKETS_CONFIGURE_ON= --enable-sockets .include Index: head/devel/pecl-swoole/files/patch-config.m4 =================================================================== --- head/devel/pecl-swoole/files/patch-config.m4 (revision 481628) +++ head/devel/pecl-swoole/files/patch-config.m4 (revision 481629) @@ -1,11 +1,11 @@ ---- config.m4.orig 2017-09-26 08:30:45 UTC +--- config.m4.orig 2018-05-14 10:43:31 UTC +++ config.m4 -@@ -255,7 +255,7 @@ if test "$PHP_SWOOLE" != "no"; then +@@ -278,7 +278,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])) Index: head/devel/pecl-swoole/files/patch-php7__wrapper.h =================================================================== --- head/devel/pecl-swoole/files/patch-php7__wrapper.h (nonexistent) +++ head/devel/pecl-swoole/files/patch-php7__wrapper.h (revision 481629) @@ -0,0 +1,14 @@ +--- php7_wrapper.h.orig 2018-10-09 11:57:28 UTC ++++ php7_wrapper.h +@@ -456,7 +456,11 @@ static inline int sw_zend_register_class + + zend_string *_interned_name = zend_new_interned_string(_name); + ++#if PHP_VERSION_ID >= 70300 ++ return zend_register_class_alias_ex(_interned_name->val, _interned_name->len, ce, 1); ++#else + return zend_register_class_alias_ex(_interned_name->val, _interned_name->len, ce); ++#endif + } + + static inline char* sw_http_build_query(zval *data, zend_size_t *length, smart_str *formstr TSRMLS_DC) Property changes on: head/devel/pecl-swoole/files/patch-php7__wrapper.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/pecl-swoole/files/patch-swoole__serialize.c =================================================================== --- head/devel/pecl-swoole/files/patch-swoole__serialize.c (nonexistent) +++ head/devel/pecl-swoole/files/patch-swoole__serialize.c (revision 481629) @@ -0,0 +1,67 @@ +--- swoole_serialize.c.orig 2018-05-14 10:43:31 UTC ++++ swoole_serialize.c +@@ -658,11 +658,17 @@ static void* swoole_unserialize_arr(void + ht->nNumUsed = nNumOfElements; + ht->nNumOfElements = nNumOfElements; + ht->nNextFreeElement = 0; ++#ifdef HASH_FLAG_APPLY_PROTECTION + ht->u.flags = HASH_FLAG_APPLY_PROTECTION; ++#endif + ht->nTableMask = -(ht->nTableSize); + ht->pDestructor = ZVAL_PTR_DTOR; + ++#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(ht) = 1; ++#else ++ GC_SET_REFCOUNT(ht, 1); ++#endif + GC_TYPE_INFO(ht) = IS_ARRAY; + // if (ht->nNumUsed) + //{ +@@ -985,8 +991,9 @@ try_again: + { + zend_array *ht = Z_ARRVAL_P(data); + +- if (ZEND_HASH_GET_APPLY_COUNT(ht) > 1) ++ if (GC_IS_RECURSIVE(ht)) + { ++ ((SBucketType*) (buffer->buffer + p))->data_type = IS_NULL; //reset type null + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "you array have cycle ref"); + } + else +@@ -994,9 +1001,9 @@ try_again: + seria_array_type(ht, buffer, p, buffer->offset); + if (ZEND_HASH_APPLY_PROTECTION(ht)) + { +- ZEND_HASH_INC_APPLY_COUNT(ht); ++ GC_PROTECT_RECURSION(ht); + swoole_serialize_arr(buffer, ht); +- ZEND_HASH_DEC_APPLY_COUNT(ht); ++ GC_UNPROTECT_RECURSION(ht); + } + else + { +@@ -1022,9 +1029,9 @@ try_again: + + if (ZEND_HASH_APPLY_PROTECTION(Z_OBJPROP_P(data))) + { +- ZEND_HASH_INC_APPLY_COUNT(Z_OBJPROP_P(data)); ++ GC_PROTECT_RECURSION(Z_OBJPROP_P(data)); + swoole_serialize_object(buffer, data, p); +- ZEND_HASH_DEC_APPLY_COUNT(Z_OBJPROP_P(data)); ++ GC_UNPROTECT_RECURSION(Z_OBJPROP_P(data)); + } + else + { +@@ -1405,7 +1412,11 @@ PHPAPI zend_string* php_swoole_serialize + z_str->val[str.offset] = '\0'; + z_str->len = str.offset - _STR_HEADER_SIZE; + z_str->h = 0; ++#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(z_str) = 1; ++#else ++ GC_SET_REFCOUNT(z_str, 1); ++#endif + GC_TYPE_INFO(z_str) = IS_STRING_EX; + + return z_str; Property changes on: head/devel/pecl-swoole/files/patch-swoole__serialize.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property