1 |
commit: e394a0879f914db4af9107b6059878b8ab2ef321 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 22 20:13:10 2021 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 22 20:13:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e394a087 |
7 |
|
8 |
dev-php/pecl-gnupg: Add PHP 8.1 support |
9 |
|
10 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
11 |
|
12 |
.../pecl-gnupg/files/php-8.1-support-1.5.0.patch | 55 ++++++++++++++++++++++ |
13 |
dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild | 4 +- |
14 |
2 files changed, 58 insertions(+), 1 deletion(-) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 000000000000..c755ccd0c5b8 |
19 |
--- /dev/null |
20 |
+++ b/dev-php/pecl-gnupg/files/php-8.1-support-1.5.0.patch |
21 |
@@ -0,0 +1,55 @@ |
22 |
+diff --git a/phpc.h b/phpc.h |
23 |
+index 4b55747..70fb317 100644 |
24 |
+--- a/phpc/phpc.h |
25 |
++++ b/phpc/phpc.h |
26 |
+@@ -51,6 +51,12 @@ |
27 |
+ memcpy(&PHPC_OBJ_GET_HANDLER_VAR_NAME(_name), \ |
28 |
+ zend_get_std_object_handlers(), sizeof(zend_object_handlers)) |
29 |
+ |
30 |
++/* for arginfo */ |
31 |
++#ifndef ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX |
32 |
++#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ |
33 |
++ ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args) |
34 |
++#endif |
35 |
++ |
36 |
+ /* ZEND_ACC_CTOR and ZEND_ACC_DTOR is removed in 7.4 */ |
37 |
+ #ifndef ZEND_ACC_CTOR |
38 |
+ #define ZEND_ACC_CTOR 0 |
39 |
+diff --git a/gnupg_keylistiterator.c b/gnupg_keylistiterator.c |
40 |
+index 215aaa0..9b285ee 100644 |
41 |
+--- a/gnupg_keylistiterator.c |
42 |
++++ b/gnupg_keylistiterator.c |
43 |
+@@ -90,14 +90,28 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_gnupg_void_iterator_method, 0, 0, 0) |
44 |
+ ZEND_END_ARG_INFO() |
45 |
+ /* }}} */ |
46 |
+ |
47 |
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_current, 0, 0, IS_MIXED, 0) |
48 |
++ZEND_END_ARG_INFO() |
49 |
++ |
50 |
++#define arginfo_gnupg_key arginfo_gnupg_current |
51 |
++ |
52 |
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_valid, 0, 0, _IS_BOOL, 0) |
53 |
++ZEND_END_ARG_INFO() |
54 |
++ |
55 |
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_next, 0, 0, IS_VOID, 0) |
56 |
++ZEND_END_ARG_INFO() |
57 |
++ |
58 |
++#define arginfo_gnupg_rewind arginfo_gnupg_next |
59 |
++ |
60 |
++ |
61 |
+ /* {{{ method list gnupg_keylistiterator */ |
62 |
+ static zend_function_entry gnupg_keylistiterator_methods[] = { |
63 |
+ PHP_ME(gnupg_keylistiterator, __construct, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) |
64 |
+- PHP_ME(gnupg_keylistiterator, current, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) |
65 |
+- PHP_ME(gnupg_keylistiterator, key, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) |
66 |
+- PHP_ME(gnupg_keylistiterator, next, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) |
67 |
+- PHP_ME(gnupg_keylistiterator, rewind, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) |
68 |
+- PHP_ME(gnupg_keylistiterator, valid, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) |
69 |
++ PHP_ME(gnupg_keylistiterator, current, arginfo_gnupg_current, ZEND_ACC_PUBLIC) |
70 |
++ PHP_ME(gnupg_keylistiterator, key, arginfo_gnupg_key, ZEND_ACC_PUBLIC) |
71 |
++ PHP_ME(gnupg_keylistiterator, next, arginfo_gnupg_next, ZEND_ACC_PUBLIC) |
72 |
++ PHP_ME(gnupg_keylistiterator, rewind, arginfo_gnupg_rewind, ZEND_ACC_PUBLIC) |
73 |
++ PHP_ME(gnupg_keylistiterator, valid, arginfo_gnupg_valid, ZEND_ACC_PUBLIC) |
74 |
+ PHPC_FE_END |
75 |
+ }; |
76 |
+ /* }}} */ |
77 |
|
78 |
diff --git a/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild b/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild |
79 |
index b489fe2f6453..8d3304139c7a 100644 |
80 |
--- a/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild |
81 |
+++ b/dev-php/pecl-gnupg/pecl-gnupg-1.5.0.ebuild |
82 |
@@ -10,7 +10,7 @@ PHP_EXT_ZENDEXT="no" |
83 |
PHP_EXT_PECL_FILENAME="${MY_P}.tgz" |
84 |
PHP_EXT_S="${WORKDIR}/${MY_P}" |
85 |
|
86 |
-USE_PHP="php7-3 php7-4 php8-0" |
87 |
+USE_PHP="php7-3 php7-4 php8-0 php8-1" |
88 |
|
89 |
inherit php-ext-pecl-r3 |
90 |
|
91 |
@@ -24,3 +24,5 @@ IUSE="" |
92 |
|
93 |
DEPEND="app-crypt/gpgme app-crypt/gnupg" |
94 |
RDEPEND="${DEPEND}" |
95 |
+ |
96 |
+PATCHES=( "${FILESDIR}/php-8.1-support-1.5.0.patch" ) |