diff options
author | Brian Evans <grknight@gentoo.org> | 2021-01-11 09:20:57 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2021-01-11 09:20:57 -0500 |
commit | f8c51deb2c03da5813679a78894228dc603ab1f4 (patch) | |
tree | 8e0233dc692cecdd9396a12d3b42867e94f04bf5 /dev-php/pecl-yaz | |
parent | games-arcade/supertux: Fixed dependencies (diff) | |
download | gentoo-f8c51deb2c03da5813679a78894228dc603ab1f4.tar.gz gentoo-f8c51deb2c03da5813679a78894228dc603ab1f4.tar.bz2 gentoo-f8c51deb2c03da5813679a78894228dc603ab1f4.zip |
dev-php/pecl-yaz: Revbump with patches for new PHP targets
Retrieved from upstream repo
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'dev-php/pecl-yaz')
-rw-r--r-- | dev-php/pecl-yaz/files/1.2.3/0001-arginfo_php8-support.patch | 245 | ||||
-rw-r--r-- | dev-php/pecl-yaz/files/1.2.3/0002-arginfo-fixes.patch | 39 | ||||
-rw-r--r-- | dev-php/pecl-yaz/pecl-yaz-1.2.3-r1.ebuild | 30 |
3 files changed, 314 insertions, 0 deletions
diff --git a/dev-php/pecl-yaz/files/1.2.3/0001-arginfo_php8-support.patch b/dev-php/pecl-yaz/files/1.2.3/0001-arginfo_php8-support.patch new file mode 100644 index 000000000000..8cc9929f06c3 --- /dev/null +++ b/dev-php/pecl-yaz/files/1.2.3/0001-arginfo_php8-support.patch @@ -0,0 +1,245 @@ +From e629fb640e11f2358c04fe72d50afbd0a004596c Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 23 Sep 2020 16:44:57 +0200 +Subject: [PATCH] add arginfo for all functions - drop support for PHP 4.x - + add compatibility with PHP 8 + +--- + .gitignore | 2 + + package.xml | 2 +- + php_yaz.c | 209 +++++++++++++++++++++++++++++++++++++++------------- + 3 files changed, 162 insertions(+), 51 deletions(-) + +diff --git a/php_yaz.c b/php_yaz.c +index e157815..64b5079 100644 +--- a/php_yaz.c ++++ b/php_yaz.c +@@ -18,6 +18,12 @@ + + #include "php_yaz.h" + ++/* for PHP 8+ */ ++#ifndef TSRMLS_CC ++#define TSRMLS_CC ++#define TSRMLS_DC ++#endif ++ + #ifndef YAZ_VERSIONL + #error YAZ version 3.0.2 or later must be used. + #elif YAZ_VERSIONL < 0x030020 +@@ -138,62 +144,165 @@ static int le_link; + ZEND_GET_MODULE(yaz) + #endif + +-#ifdef ZEND_BEGIN_ARG_INFO +- ZEND_BEGIN_ARG_INFO(first_argument_force_ref, 0) +- ZEND_ARG_PASS_INFO(1) +- ZEND_END_ARG_INFO(); ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_connect, 0, 0, 1) ++ ZEND_ARG_INFO(0, url) ++ ZEND_ARG_INFO(0, options) ++ZEND_END_ARG_INFO(); + +- ZEND_BEGIN_ARG_INFO(second_argument_force_ref, 0) +- ZEND_ARG_PASS_INFO(0) +- ZEND_ARG_PASS_INFO(1) +- ZEND_END_ARG_INFO(); +- +- ZEND_BEGIN_ARG_INFO(third_argument_force_ref, 0) +- ZEND_ARG_PASS_INFO(0) +- ZEND_ARG_PASS_INFO(0) +- ZEND_ARG_PASS_INFO(1) +- ZEND_END_ARG_INFO(); +-#else +-static unsigned char first_argument_force_ref[] = { +- 1, BYREF_FORCE }; +-static unsigned char second_argument_force_ref[] = { +- 2, BYREF_NONE, BYREF_FORCE }; +-static unsigned char third_argument_force_ref[] = { +- 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; +-#endif ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_close, 0, 0, 1) ++ ZEND_ARG_INFO(0, id) ++ZEND_END_ARG_INFO(); ++ ++#define arginfo_yaz_present arginfo_yaz_close ++ ++#define arginfo_yaz_errno arginfo_yaz_close ++ ++#define arginfo_yaz_error arginfo_yaz_close ++ ++#define arginfo_yaz_addinfo arginfo_yaz_close ++ ++#define arginfo_yaz_es_result arginfo_yaz_close ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_search, 0, 0, 3) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, type) ++ ZEND_ARG_INFO(0, query) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_wait, 0, 0, 0) ++ ZEND_ARG_INFO(1, options) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_hits, 0, 0, 1) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(1, searchresult) ++ ZEND_ARG_INFO(0, query) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_record, 0, 0, 3) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, pos) ++ ZEND_ARG_INFO(0, type) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_syntax, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, syntax) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_element, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, elementsetname) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_schema, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, schema) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_set_option, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, options_or_name) ++ ZEND_ARG_INFO(0, value) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_get_option, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, name) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_range, 0, 0, 3) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, start) ++ ZEND_ARG_INFO(0, number) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_sort, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, sortspec) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_itemorder, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, package) ++ZEND_END_ARG_INFO(); ++ ++#define arginfo_yaz_ccl_conf arginfo_yaz_itemorder ++ ++#define arginfo_yaz_cql_conf arginfo_yaz_itemorder ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_es, 0, 0, 3) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, type) ++ ZEND_ARG_INFO(0, package) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_scan, 0, 0, 3) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, type) ++ ZEND_ARG_INFO(0, query) ++ ZEND_ARG_INFO(0, flags) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_scan_result, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(1, options) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_ccl_parse, 0, 0, 3) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, query) ++ ZEND_ARG_INFO(1, result) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_cql_parse, 0, 0, 4) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, cql) ++ ZEND_ARG_INFO(1, result) ++ ZEND_ARG_INFO(0, rev) ++ZEND_END_ARG_INFO(); ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_databases, 0, 0, 2) ++ ZEND_ARG_INFO(0, id) ++ ZEND_ARG_INFO(0, package) ++ZEND_END_ARG_INFO(); + + + zend_function_entry yaz_functions [] = { +- PHP_FE(yaz_connect, NULL) +- PHP_FE(yaz_close, NULL) +- PHP_FE(yaz_search, NULL) +- PHP_FE(yaz_wait, first_argument_force_ref) +- PHP_FE(yaz_errno, NULL) +- PHP_FE(yaz_error, NULL) +- PHP_FE(yaz_addinfo, NULL) +- PHP_FE(yaz_hits, second_argument_force_ref) +- PHP_FE(yaz_record, NULL) +- PHP_FE(yaz_syntax, NULL) +- PHP_FE(yaz_element, NULL) +- PHP_FE(yaz_range, NULL) +- PHP_FE(yaz_itemorder, NULL) +- PHP_FE(yaz_es_result, NULL) +- PHP_FE(yaz_scan, NULL) +- PHP_FE(yaz_scan_result, second_argument_force_ref) +- PHP_FE(yaz_present, NULL) +- PHP_FE(yaz_ccl_conf, NULL) +- PHP_FE(yaz_ccl_parse, third_argument_force_ref) ++ PHP_FE(yaz_connect, arginfo_yaz_connect) ++ PHP_FE(yaz_close, arginfo_yaz_close) ++ PHP_FE(yaz_search, arginfo_yaz_search) ++ PHP_FE(yaz_wait, arginfo_yaz_wait) ++ PHP_FE(yaz_errno, arginfo_yaz_errno) ++ PHP_FE(yaz_error, arginfo_yaz_error) ++ PHP_FE(yaz_addinfo, arginfo_yaz_addinfo) ++ PHP_FE(yaz_hits, arginfo_yaz_hits) ++ PHP_FE(yaz_record, arginfo_yaz_record) ++ PHP_FE(yaz_syntax, arginfo_yaz_syntax) ++ PHP_FE(yaz_element, arginfo_yaz_element) ++ PHP_FE(yaz_range, arginfo_yaz_range) ++ PHP_FE(yaz_itemorder, arginfo_yaz_itemorder) ++ PHP_FE(yaz_es_result, arginfo_yaz_es_result) ++ PHP_FE(yaz_scan, arginfo_yaz_scan) ++ PHP_FE(yaz_scan_result, arginfo_yaz_scan_result) ++ PHP_FE(yaz_present, arginfo_yaz_present) ++ PHP_FE(yaz_ccl_conf, arginfo_yaz_ccl_conf) ++ PHP_FE(yaz_ccl_parse, arginfo_yaz_ccl_parse) + #if YAZ_VERSIONL >= 0x050100 +- PHP_FE(yaz_cql_parse, third_argument_force_ref) +- PHP_FE(yaz_cql_conf, NULL) +-#endif +- PHP_FE(yaz_database, NULL) +- PHP_FE(yaz_sort, NULL) +- PHP_FE(yaz_schema, NULL) +- PHP_FE(yaz_set_option, NULL) +- PHP_FE(yaz_get_option, NULL) +- PHP_FE(yaz_es, NULL) ++ PHP_FE(yaz_cql_parse, arginfo_yaz_cql_parse) ++ PHP_FE(yaz_cql_conf, arginfo_yaz_cql_conf) ++#endif ++ PHP_FE(yaz_database, arginfo_databases) ++ PHP_FE(yaz_sort, arginfo_yaz_sort) ++ PHP_FE(yaz_schema, arginfo_yaz_schema) ++ PHP_FE(yaz_set_option, arginfo_yaz_set_option) ++ PHP_FE(yaz_get_option, arginfo_yaz_get_option) ++ PHP_FE(yaz_es, arginfo_yaz_es) ++#ifdef PHP_FE_END ++ PHP_FE_END ++#else + {NULL, NULL, NULL} ++#endif + }; + + static void get_assoc(INTERNAL_FUNCTION_PARAMETERS, zval *id, Yaz_Association *assocp) diff --git a/dev-php/pecl-yaz/files/1.2.3/0002-arginfo-fixes.patch b/dev-php/pecl-yaz/files/1.2.3/0002-arginfo-fixes.patch new file mode 100644 index 000000000000..53cde0a92769 --- /dev/null +++ b/dev-php/pecl-yaz/files/1.2.3/0002-arginfo-fixes.patch @@ -0,0 +1,39 @@ +From 323962299bae3b2085dde44790785a39878f5f9a Mon Sep 17 00:00:00 2001 +From: Adam Dickmeiss <adam@indexdata.dk> +Date: Thu, 24 Sep 2020 19:45:58 +0200 +Subject: [PATCH] Fixes for arg info + +--- + php_yaz.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/php_yaz.c b/php_yaz.c +index 64b5079..de9693d 100644 +--- a/php_yaz.c ++++ b/php_yaz.c +@@ -176,7 +176,6 @@ ZEND_END_ARG_INFO(); + ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_hits, 0, 0, 1) + ZEND_ARG_INFO(0, id) + ZEND_ARG_INFO(1, searchresult) +- ZEND_ARG_INFO(0, query) + ZEND_END_ARG_INFO(); + + ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_record, 0, 0, 3) +@@ -244,7 +243,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_scan, 0, 0, 3) + ZEND_ARG_INFO(0, flags) + ZEND_END_ARG_INFO(); + +-ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_scan_result, 0, 0, 2) ++ZEND_BEGIN_ARG_INFO_EX(arginfo_yaz_scan_result, 0, 0, 1) + ZEND_ARG_INFO(0, id) + ZEND_ARG_INFO(1, options) + ZEND_END_ARG_INFO(); +@@ -264,7 +263,7 @@ ZEND_END_ARG_INFO(); + + ZEND_BEGIN_ARG_INFO_EX(arginfo_databases, 0, 0, 2) + ZEND_ARG_INFO(0, id) +- ZEND_ARG_INFO(0, package) ++ ZEND_ARG_INFO(0, databases) + ZEND_END_ARG_INFO(); + + diff --git a/dev-php/pecl-yaz/pecl-yaz-1.2.3-r1.ebuild b/dev-php/pecl-yaz/pecl-yaz-1.2.3-r1.ebuild new file mode 100644 index 000000000000..1b66eaf384cc --- /dev/null +++ b/dev-php/pecl-yaz/pecl-yaz-1.2.3-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PHP_EXT_NAME="yaz" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +DOCS=( README ) + +USE_PHP="php7-3 php7-4 php8-0" + +inherit php-ext-pecl-r3 + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" + +DESCRIPTION="This extension implements a Z39.50 client for PHP using the YAZ toolkit" +LICENSE="BSD" +SLOT="0" +IUSE="" + +DEPEND=">=dev-libs/yaz-3.0.2:0=" +RDEPEND="${DEPEND}" + +# Needs network access +RESTRICT="test" + +PHP_EXT_ECONF_ARGS="--with-yaz=/usr" + +PATCHES=( "${FILESDIR}/${PV}" ) |