From owner-svn-ports-all@freebsd.org Mon Oct 29 22:12:28 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 1965610EB9CF; Mon, 29 Oct 2018 22:12:28 +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 BBE0C8610F; Mon, 29 Oct 2018 22:12:27 +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 72EA714687; Mon, 29 Oct 2018 22:12:25 +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 w9TMCPwj076172; Mon, 29 Oct 2018 22:12:25 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9TMCPu9076171; Mon, 29 Oct 2018 22:12:25 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201810292212.w9TMCPu9076171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Mon, 29 Oct 2018 22:12:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r483406 - head/databases/php-xapian/files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: head/databases/php-xapian/files X-SVN-Commit-Revision: 483406 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.29 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: Mon, 29 Oct 2018 22:12:28 -0000 Author: sunpoet Date: Mon Oct 29 22:12:24 2018 New Revision: 483406 URL: https://svnweb.freebsd.org/changeset/ports/483406 Log: Fix build with PHP 7.3 Added: head/databases/php-xapian/files/ head/databases/php-xapian/files/patch-php7-php.i (contents, props changed) head/databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc (contents, props changed) Added: head/databases/php-xapian/files/patch-php7-php.i ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/php-xapian/files/patch-php7-php.i Mon Oct 29 22:12:24 2018 (r483406) @@ -0,0 +1,30 @@ +--- php7/php.i.orig 2018-10-26 05:08:02 UTC ++++ php7/php.i +@@ -177,9 +177,13 @@ fail: // Label which SWIG_PHP_Error need + %typemap(out) std::pair { + + ZVAL_NEW_ARR($result); ++#if PHP_VERSION_ID >= 70300 ++ array_init($result); ++#else + if (array_init($result) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (Xapian::TermIterator i = $1.first; i != $1.second; ++i) { + /* We have to cast away const here because the PHP API is rather +@@ -198,9 +202,13 @@ fail: // Label which SWIG_PHP_Error need + + %typemap(directorin) (size_t num_tags, const std::string tags[]) { + ZVAL_NEW_ARR($input); ++#if PHP_VERSION_ID >= 70300 ++ array_init($input); ++#else + if (array_init($input) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (size_t i = 0; i != num_tags; ++i) { + const string & term = tags[i]; Added: head/databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc Mon Oct 29 22:12:24 2018 (r483406) @@ -0,0 +1,30 @@ +--- php7/php7/xapian_wrap.cc.orig 2018-10-26 05:12:41 UTC ++++ php7/php7/xapian_wrap.cc +@@ -2533,9 +2533,13 @@ std::string SwigDirector_Compactor::reso + + { + ZVAL_NEW_ARR(&args[1]); ++#if PHP_VERSION_ID >= 70300 ++ array_init(&args[1]); ++#else + if (array_init(&args[1]) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (size_t i = 0; i != num_tags; ++i) { + const string & term = tags[i]; +@@ -16756,9 +16760,13 @@ ZEND_NAMED_FUNCTION(_wrap_Enquire_get_ma + } + { + ZVAL_NEW_ARR(return_value); ++#if PHP_VERSION_ID >= 70300 ++ array_init(return_value); ++#else + if (array_init(return_value) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (Xapian::TermIterator i = (&result)->first; i != (&result)->second; ++i) { + /* We have to cast away const here because the PHP API is rather