public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-php/pecl-gnupg/files/, dev-php/pecl-gnupg/
@ 2021-11-22 20:13 Brian Evans
  0 siblings, 0 replies; only message in thread
From: Brian Evans @ 2021-11-22 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e394a0879f914db4af9107b6059878b8ab2ef321
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 22 20:13:10 2021 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 20:13:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e394a087

dev-php/pecl-gnupg: Add PHP 8.1 support

Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 .../pecl-gnupg/files/php-8.1-support-1.5.0.patch   | 55 ++++++++++++++++++++++
 dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild         |  4 +-
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/dev-php/pecl-gnupg/files/php-8.1-support-1.5.0.patch b/dev-php/pecl-gnupg/files/php-8.1-support-1.5.0.patch
new file mode 100644
index 000000000000..c755ccd0c5b8
--- /dev/null
+++ b/dev-php/pecl-gnupg/files/php-8.1-support-1.5.0.patch
@@ -0,0 +1,55 @@
+diff --git a/phpc.h b/phpc.h
+index 4b55747..70fb317 100644
+--- a/phpc/phpc.h
++++ b/phpc/phpc.h
+@@ -51,6 +51,12 @@
+ 	memcpy(&PHPC_OBJ_GET_HANDLER_VAR_NAME(_name), \
+ 		zend_get_std_object_handlers(), sizeof(zend_object_handlers))
+ 
++/* for arginfo */
++#ifndef ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX
++#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
++        ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args)
++#endif
++
+ /* ZEND_ACC_CTOR and ZEND_ACC_DTOR is removed in 7.4 */
+ #ifndef ZEND_ACC_CTOR
+ #define ZEND_ACC_CTOR 0
+diff --git a/gnupg_keylistiterator.c b/gnupg_keylistiterator.c
+index 215aaa0..9b285ee 100644
+--- a/gnupg_keylistiterator.c
++++ b/gnupg_keylistiterator.c
+@@ -90,14 +90,28 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_gnupg_void_iterator_method, 0, 0, 0)
+ ZEND_END_ARG_INFO()
+ /* }}} */
+ 
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_current, 0, 0, IS_MIXED, 0)
++ZEND_END_ARG_INFO()
++
++#define arginfo_gnupg_key arginfo_gnupg_current
++
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_valid, 0, 0, _IS_BOOL, 0)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_next, 0, 0, IS_VOID, 0)
++ZEND_END_ARG_INFO()
++
++#define arginfo_gnupg_rewind  arginfo_gnupg_next
++
++
+ /* {{{ method list gnupg_keylistiterator */
+ static zend_function_entry gnupg_keylistiterator_methods[] = {
+ 	PHP_ME(gnupg_keylistiterator, __construct, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
+-	PHP_ME(gnupg_keylistiterator, current, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
+-	PHP_ME(gnupg_keylistiterator, key, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
+-	PHP_ME(gnupg_keylistiterator, next, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
+-	PHP_ME(gnupg_keylistiterator, rewind, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
+-	PHP_ME(gnupg_keylistiterator, valid, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
++	PHP_ME(gnupg_keylistiterator, current, arginfo_gnupg_current, ZEND_ACC_PUBLIC)
++	PHP_ME(gnupg_keylistiterator, key, arginfo_gnupg_key, ZEND_ACC_PUBLIC)
++	PHP_ME(gnupg_keylistiterator, next, arginfo_gnupg_next, ZEND_ACC_PUBLIC)
++	PHP_ME(gnupg_keylistiterator, rewind, arginfo_gnupg_rewind, ZEND_ACC_PUBLIC)
++	PHP_ME(gnupg_keylistiterator, valid, arginfo_gnupg_valid, ZEND_ACC_PUBLIC)
+ 	PHPC_FE_END
+ };
+ /* }}} */

diff --git a/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild b/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild
index b489fe2f6453..8d3304139c7a 100644
--- a/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild
+++ b/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild
@@ -10,7 +10,7 @@ PHP_EXT_ZENDEXT="no"
 PHP_EXT_PECL_FILENAME="${MY_P}.tgz"
 PHP_EXT_S="${WORKDIR}/${MY_P}"
 
-USE_PHP="php7-3 php7-4 php8-0"
+USE_PHP="php7-3 php7-4 php8-0 php8-1"
 
 inherit php-ext-pecl-r3
 
@@ -24,3 +24,5 @@ IUSE=""
 
 DEPEND="app-crypt/gpgme app-crypt/gnupg"
 RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/php-8.1-support-1.5.0.patch" )


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-22 20:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-22 20:13 [gentoo-commits] repo/gentoo:master commit in: dev-php/pecl-gnupg/files/, dev-php/pecl-gnupg/ Brian Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox