From owner-svn-ports-all@freebsd.org Sun Oct 14 16:28:12 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 2282F10D9CA5; Sun, 14 Oct 2018 16:28:12 +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 C62058F191; Sun, 14 Oct 2018 16:28:11 +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 C131F20B34; Sun, 14 Oct 2018 16:28:11 +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 w9EGSB3K006420; Sun, 14 Oct 2018 16:28:11 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9EGSBRB006416; Sun, 14 Oct 2018 16:28:11 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201810141628.w9EGSBRB006416@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:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482055 - in head/databases/pecl-memcached: . files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: in head/databases/pecl-memcached: . files X-SVN-Commit-Revision: 482055 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:12 -0000 Author: sunpoet Date: Sun Oct 14 16:28:10 2018 New Revision: 482055 URL: https://svnweb.freebsd.org/changeset/ports/482055 Log: Fix build with PHP 7.3 Obtained from: https://github.com/php-memcached-dev/php-memcached/commit/8bfdbcc9063dafcb25fdb1d1705e07ee027d7379 Added: head/databases/pecl-memcached/files/ head/databases/pecl-memcached/files/patch-php_memcached.c (contents, props changed) head/databases/pecl-memcached/files/patch-php_memcached_private.h (contents, props changed) head/databases/pecl-memcached/files/patch-php_memcached_session.c (contents, props changed) Modified: head/databases/pecl-memcached/Makefile Modified: head/databases/pecl-memcached/Makefile ============================================================================== --- head/databases/pecl-memcached/Makefile Sun Oct 14 16:28:02 2018 (r482054) +++ head/databases/pecl-memcached/Makefile Sun Oct 14 16:28:10 2018 (r482055) @@ -18,10 +18,11 @@ OPTIONS_DEFINE= IGBINARY SASL OPTIONS_DEFAULT=SASL IGBINARY_DESC= Binary serializer support +USES= php:pecl pkgconfig +USE_PHP= json:build session:build + CONFIGURE_ARGS= --with-libmemcached-dir=${LOCALBASE} IGNORE_WITH_PHP=56 -USE_PHP= json:build session:build -USES= php:pecl pkgconfig IGBINARY_CONFIGURE_ENABLE= memcached-igbinary IGBINARY_USE= PHP=igbinary:build Added: head/databases/pecl-memcached/files/patch-php_memcached.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pecl-memcached/files/patch-php_memcached.c Sun Oct 14 16:28:10 2018 (r482055) @@ -0,0 +1,22 @@ +Obtained from: https://github.com/php-memcached-dev/php-memcached/commit/8bfdbcc9063dafcb25fdb1d1705e07ee027d7379 + +--- php_memcached.c.orig 2017-11-21 05:01:28 UTC ++++ php_memcached.c +@@ -1281,7 +1281,7 @@ static PHP_METHOD(Memcached, __construct + le.type = php_memc_list_entry(); + le.ptr = intern->memc; + +- GC_REFCOUNT(&le) = 1; ++ GC_SET_REFCOUNT(&le, 1); + + /* plist_key is not a persistent allocated key, thus we use str_update here */ + if (zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(plist_key), ZSTR_LEN(plist_key), &le, sizeof(le)) == NULL) { +@@ -3654,7 +3654,7 @@ PHP_METHOD(MemcachedServer, on) + + Z_TRY_ADDREF(fci.function_name); + if (fci.object) { +- GC_REFCOUNT(fci.object)++; ++ GC_ADDREF(fci.object); + } + } + RETURN_BOOL(rc); Added: head/databases/pecl-memcached/files/patch-php_memcached_private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pecl-memcached/files/patch-php_memcached_private.h Sun Oct 14 16:28:10 2018 (r482055) @@ -0,0 +1,18 @@ +Obtained from: https://github.com/php-memcached-dev/php-memcached/commit/8bfdbcc9063dafcb25fdb1d1705e07ee027d7379 + +--- php_memcached_private.h.orig 2017-11-21 05:01:28 UTC ++++ php_memcached_private.h +@@ -72,6 +72,13 @@ typedef unsigned long int uint32_t; + # endif + #endif + ++/* Backwards compatibility for GC API change in PHP 7.3 */ ++#if PHP_VERSION_ID < 70300 ++# define GC_ADDREF(p) ++GC_REFCOUNT(p) ++# define GC_DELREF(p) --GC_REFCOUNT(p) ++# define GC_SET_REFCOUNT(p, rc) GC_REFCOUNT(p) = rc ++#endif ++ + /**************************************** + Structures and definitions + ****************************************/ Added: head/databases/pecl-memcached/files/patch-php_memcached_session.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pecl-memcached/files/patch-php_memcached_session.c Sun Oct 14 16:28:10 2018 (r482055) @@ -0,0 +1,13 @@ +Obtained from: https://github.com/php-memcached-dev/php-memcached/commit/8bfdbcc9063dafcb25fdb1d1705e07ee027d7379 + +--- php_memcached_session.c.orig 2017-11-21 05:01:28 UTC ++++ php_memcached_session.c +@@ -376,7 +376,7 @@ PS_OPEN_FUNC(memcached) + le.type = s_memc_sess_list_entry(); + le.ptr = memc; + +- GC_REFCOUNT(&le) = 1; ++ GC_SET_REFCOUNT(&le, 1); + + /* plist_key is not a persistent allocated key, thus we use str_update here */ + if (zend_hash_str_update_mem(&EG(persistent_list), plist_key, plist_key_len, &le, sizeof(le)) == NULL) {