mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
Update to 4.2.1, and ignore php56.
This commit is contained in:
parent
d862d40fca
commit
cf600bb49e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481822
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
@ -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;
|
Loading…
Reference in New Issue
Block a user