aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2018-10-11 21:21:27 +0800
committervanilla <vanilla@FreeBSD.org>2018-10-11 21:21:27 +0800
commit346e341cc0c3fce99ce850a43c2bb99fc13f1599 (patch)
tree2dd41a9cb58cc9e2a88acf00d0bef8b322c229a1
parentdb55af7277c7e6c3454c8f125e38c70a101c50f1 (diff)
downloadfreebsd-ports-gnome-346e341cc0c3fce99ce850a43c2bb99fc13f1599.tar.gz
freebsd-ports-gnome-346e341cc0c3fce99ce850a43c2bb99fc13f1599.tar.zst
freebsd-ports-gnome-346e341cc0c3fce99ce850a43c2bb99fc13f1599.zip
Update to 4.2.1, and ignore php56.
-rw-r--r--devel/pecl-swoole/Makefile12
-rw-r--r--devel/pecl-swoole/distinfo6
-rw-r--r--devel/pecl-swoole/files/patch-config.m413
-rw-r--r--devel/pecl-swoole/files/patch-php7__wrapper.h14
-rw-r--r--devel/pecl-swoole/files/patch-swoole__serialize.c67
5 files changed, 22 insertions, 90 deletions
diff --git a/devel/pecl-swoole/Makefile b/devel/pecl-swoole/Makefile
index 38a0c201e906..2939df16e4fb 100644
--- a/devel/pecl-swoole/Makefile
+++ b/devel/pecl-swoole/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= swoole
-PORTVERSION= 1.10.5
-PORTREVISION= 2
+PORTVERSION= 4.2.1
CATEGORIES= devel net
MAINTAINER= vanilla@FreeBSD.org
@@ -13,9 +12,12 @@ LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= compiler:c11 localbase:ldflags php:pecl ssl
-USE_PHP= pcre
+USE_PHP= hash:build pcre
-OPTIONS_DEFINE= HTTP2 REDIS SOCKETS
+IGNORE_WITH_PHP= 56
+CONFIGURE_ARGS+= --enable-mysqlnd
+
+OPTIONS_DEFINE= HTTP2 REDIS SOCKETS PGSQL
HTTP2_LIB_DEPENDS= libnghttp2.so:www/libnghttp2
HTTP2_CONFIGURE_ON= --enable-http2 --enable-openssl
REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis
@@ -23,5 +25,7 @@ REDIS_CONFIGURE_ON= --enable-async-redis
SOCKETS_USE= PHP=sockets:build
SOCKETS_DESC= Use native php sockets extension
SOCKETS_CONFIGURE_ON= --enable-sockets
+PGSQL_USES= pgsql
+PGSQL_CONFIGURE_ON= --enable-coroutine-postgresql
.include <bsd.port.mk>
diff --git a/devel/pecl-swoole/distinfo b/devel/pecl-swoole/distinfo
index 4579b4013923..a844906ec646 100644
--- a/devel/pecl-swoole/distinfo
+++ b/devel/pecl-swoole/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1526396311
-SHA256 (PECL/swoole-1.10.5.tgz) = 5c1dc0b82772ca1c352de4ddf20deeb35f06e4c5a01beba5a446d78a1f747bd2
-SIZE (PECL/swoole-1.10.5.tgz) = 730797
+TIMESTAMP = 1539261659
+SHA256 (PECL/swoole-4.2.1.tgz) = b17e919bcb738f1de4c043694e49c3e7bd65645c30d40ded942636c32831e265
+SIZE (PECL/swoole-4.2.1.tgz) = 1007982
diff --git a/devel/pecl-swoole/files/patch-config.m4 b/devel/pecl-swoole/files/patch-config.m4
index 8bd1e9ca5842..db0508ea7026 100644
--- a/devel/pecl-swoole/files/patch-config.m4
+++ b/devel/pecl-swoole/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orig 2018-05-14 10:43:31 UTC
+--- config.m4.orig 2018-09-19 03:39:15 UTC
+++ config.m4
-@@ -278,7 +278,7 @@ if test "$PHP_SWOOLE" != "no"; then
+@@ -388,7 +388,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]))
@@ -9,3 +9,12 @@
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]))
+@@ -607,7 +607,7 @@ if test "$PHP_SWOOLE" != "no"; then
+ PHP_INSTALL_HEADERS([ext/swoole], [*.h config.h include/*.h])
+
+ PHP_REQUIRE_CXX()
+- PHP_ADD_LIBRARY(stdc++, 1, SWOOLE_SHARED_LIBADD)
++ PHP_ADD_LIBRARY(c++, 1, SWOOLE_SHARED_LIBADD)
+ CXXFLAGS="$CXXFLAGS -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11"
+
+ if test "$PHP_PICOHTTPPARSER" = "yes"; then
diff --git a/devel/pecl-swoole/files/patch-php7__wrapper.h b/devel/pecl-swoole/files/patch-php7__wrapper.h
deleted file mode 100644
index fdb758f509d5..000000000000
--- a/devel/pecl-swoole/files/patch-php7__wrapper.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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)
diff --git a/devel/pecl-swoole/files/patch-swoole__serialize.c b/devel/pecl-swoole/files/patch-swoole__serialize.c
deleted file mode 100644
index 5eda5a668574..000000000000
--- a/devel/pecl-swoole/files/patch-swoole__serialize.c
+++ /dev/null
@@ -1,67 +0,0 @@
---- 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;