From owner-svn-ports-all@freebsd.org Sun Oct 14 16:28:29 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5876310D9CB3; Sun, 14 Oct 2018 16:28:29 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E5D98F309; Sun, 14 Oct 2018 16:28:29 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 092E120B37; Sun, 14 Oct 2018 16:28:29 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9EGSSSG006729; Sun, 14 Oct 2018 16:28:28 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9EGSSme006726; Sun, 14 Oct 2018 16:28:28 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201810141628.w9EGSSme006726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Sun, 14 Oct 2018 16:28:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482057 - in head/databases/php7-tarantool: . files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: in head/databases/php7-tarantool: . files X-SVN-Commit-Revision: 482057 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2018 16:28:29 -0000 Author: sunpoet Date: Sun Oct 14 16:28:27 2018 New Revision: 482057 URL: https://svnweb.freebsd.org/changeset/ports/482057 Log: Fix build with PHP 7.3 Added: head/databases/php7-tarantool/files/ head/databases/php7-tarantool/files/patch-src-tarantool.c (contents, props changed) head/databases/php7-tarantool/files/patch-src-tarantool_msgpack.c (contents, props changed) head/databases/php7-tarantool/files/patch-src-utils.c (contents, props changed) Modified: head/databases/php7-tarantool/Makefile Modified: head/databases/php7-tarantool/Makefile ============================================================================== --- head/databases/php7-tarantool/Makefile Sun Oct 14 16:28:19 2018 (r482056) +++ head/databases/php7-tarantool/Makefile Sun Oct 14 16:28:27 2018 (r482057) @@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE USES= php:ext CONFIGURE_ARGS= --with-tarantool -IGNORE_WITH_PHP=56 73 +IGNORE_WITH_PHP=56 USE_GITHUB= yes GH_PROJECT= ${PORTNAME}-php Added: head/databases/php7-tarantool/files/patch-src-tarantool.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/php7-tarantool/files/patch-src-tarantool.c Sun Oct 14 16:28:27 2018 (r482057) @@ -0,0 +1,14 @@ +--- src/tarantool.c.orig 2018-04-18 13:33:56 UTC ++++ src/tarantool.c +@@ -1151,7 +1151,11 @@ PHP_METHOD(Tarantool, __construct) { + memset(&le, 0, sizeof(zend_resource)); + le.type = php_tarantool_list_entry(); + le.ptr = obj; ++#if PHP_VERSION_ID >= 70300 ++ GC_SET_REFCOUNT(&le, 1); ++#else + GC_REFCOUNT(&le) = 1; ++#endif + + assert(plist_id != NULL); + if (zend_hash_update_mem(&EG(persistent_list), plist_id, Added: head/databases/php7-tarantool/files/patch-src-tarantool_msgpack.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/php7-tarantool/files/patch-src-tarantool_msgpack.c Sun Oct 14 16:28:27 2018 (r482057) @@ -0,0 +1,122 @@ +--- src/tarantool_msgpack.c.orig 2018-04-18 13:33:56 UTC ++++ src/tarantool_msgpack.c +@@ -123,15 +123,30 @@ void php_mp_pack_array_recursively(smart + for (; key_index < n; ++key_index) { + data = zend_hash_index_find(ht, key_index); + if (!data || data == val || (Z_TYPE_P(data) == IS_ARRAY && ++#if PHP_VERSION_ID >= 70300 ++ !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) && ++ GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) { ++#else + ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) && + Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) { ++#endif + php_mp_pack_nil(str); + } else { ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_PROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount++; ++#endif + php_mp_pack(str, data); ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount--; ++#endif + } + } + } +@@ -166,15 +181,30 @@ void php_mp_pack_hash_recursively(smart_ + } + data = zend_hash_get_current_data_ex(ht, &pos); + if (!data || data == val || (Z_TYPE_P(data) == IS_ARRAY && ++#if PHP_VERSION_ID >= 70300 ++ !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) && ++ GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) { ++#else + ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) && + Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) { ++#endif + php_mp_pack_nil(str); + } else { ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_PROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount++; ++#endif + php_mp_pack(str, data); ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount--; ++#endif + } + } + } +@@ -408,14 +438,28 @@ size_t php_mp_sizeof_array_recursively(z + for (; key_index < n; ++key_index) { + data = zend_hash_index_find(ht, key_index); + if (!data || data == val || ++#if PHP_VERSION_ID >= 70300 ++ (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) && GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) { ++#else + (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) && Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) { ++#endif + needed += php_mp_sizeof_nil(); + } else { ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_PROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount++; ++#endif + needed += php_mp_sizeof(data); ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount--; ++#endif + } + } + return needed; +@@ -452,14 +496,28 @@ size_t php_mp_sizeof_hash_recursively(zv + } + data = zend_hash_get_current_data_ex(ht, &pos); + if (!data || data == val || ++#if PHP_VERSION_ID >= 70300 ++ (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) && GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) { ++#else + (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) && Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) { ++#endif + needed += php_mp_sizeof_nil(); + } else { ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_PROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount++; ++#endif + needed += php_mp_sizeof(data); ++#if PHP_VERSION_ID >= 70300 ++ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE)) ++ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data)); ++#else + if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data))) + Z_ARRVAL_P(data)->u.v.nApplyCount--; ++#endif + } + } + return needed; Added: head/databases/php7-tarantool/files/patch-src-utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/php7-tarantool/files/patch-src-utils.c Sun Oct 14 16:28:27 2018 (r482057) @@ -0,0 +1,13 @@ +--- src/utils.c.orig 2018-04-18 13:33:56 UTC ++++ src/utils.c +@@ -29,8 +29,10 @@ const char *tutils_op_to_string(zval *ob + return "RESOURCE"; + case(IS_REFERENCE): + return "REFERENCE"; ++#if PHP_VERSION_ID < 70300 + case(IS_CONSTANT): + return "CONSTANT"; ++#endif + case(IS_CONSTANT_AST): + return "CONSTANT_AST"; + case(IS_CALLABLE):