summaryrefslogtreecommitdiff
path: root/dev-php/pecl-radius
diff options
context:
space:
mode:
Diffstat (limited to 'dev-php/pecl-radius')
-rw-r--r--dev-php/pecl-radius/Manifest3
-rw-r--r--dev-php/pecl-radius/files/1.4.0-php8.patch289
-rw-r--r--dev-php/pecl-radius/pecl-radius-1.4.0_beta1-r3.ebuild10
3 files changed, 300 insertions, 2 deletions
diff --git a/dev-php/pecl-radius/Manifest b/dev-php/pecl-radius/Manifest
index f040769a5e93..428fa3dffeb3 100644
--- a/dev-php/pecl-radius/Manifest
+++ b/dev-php/pecl-radius/Manifest
@@ -1,3 +1,4 @@
+AUX 1.4.0-php8.patch 9226 BLAKE2B 35055bd21ee2763c1d4eb01b8df1f4c26c5a6f519d920fe1aa14e032f4b33d67cc94a423e712680097928301a4824f643f7573487c280a09ca610b08054fee74 SHA512 e99360b81b88ceeb5a965e3ff9c262bd2dcd6980442b039187967c3e3ad5989710c1044d002f5a207ee1513b14b25cab899873718b6e94cc266e13344d62ddcf
DIST radius-1.4.0b1.tgz 50953 BLAKE2B 1f6f2a4c4cfa7600a37b8bc30e4d263b899a687becac83fd01bac2466de08cad4233984ca694dc73eaf20b64ef94e1e6a6ca7f843474c8f0c9de2c39df9d9705 SHA512 db6ebe928673db1ff4c565338010ef5acf6029844994eb240f2e8eaeda4aff734ed300a7ddf16c09e245671aad377283f99cf1c485569b3bad0c7c7b24a19664
-EBUILD pecl-radius-1.4.0_beta1-r3.ebuild 544 BLAKE2B 68835bc7ee0e55b4bda86a38790419b2130f40743f993a7cdb4ff56a2aa757320653ff3e4efea183a5e784886b26e917c8b4c3994a462b0901e1f1864247c6f0 SHA512 5a9ecd067cdb8b92eeefb3d750814b941d8ac95b21adfdf25eca8e91a6007e476536152743d2aa6835e9adf8eccd0cc93c8496ecacbf0246f8dd5f03d78003a1
+EBUILD pecl-radius-1.4.0_beta1-r3.ebuild 698 BLAKE2B 28961f98130b68be6d3a0fb27abe9205fc2704f294a588df067e4466c0d774dba49843ae73b0b1086ce684650ba271ad6e3cb328b700666dbade88082d03862b SHA512 8287208db6df1d92bab519e51c211966777a4edbd360924a48def39e5a1cd64c7e537fb3e3648cbc0eeb4bdad128356349ffe6f605b3368071596c8fa91d8576
MISC metadata.xml 240 BLAKE2B f60f325331d493a555e53c29c7cf2742a415356da28a467505f1441f3fd790fd0d59050df84854bdc379d19d94a46121216479807975a2922d5a2fefde83416b SHA512 fada9d69055f2be962b95aac82f260ec5db7a3f4392d10f0458a1d125938fa17539f7ec486000f3a95cff85a3fbb6bbf1f6f4fe6c2de7aa420a7543a3e89d03e
diff --git a/dev-php/pecl-radius/files/1.4.0-php8.patch b/dev-php/pecl-radius/files/1.4.0-php8.patch
new file mode 100644
index 000000000000..08ff55866beb
--- /dev/null
+++ b/dev-php/pecl-radius/files/1.4.0-php8.patch
@@ -0,0 +1,289 @@
+From 6cfaa16a21780f09f76a7703da255e07910b8b4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bruno=20Pr=C3=A9mont?= <bruno.premont@restena.lu>
+Date: Mon, 25 Jan 2021 19:37:14 +0100
+Subject: [PATCH] Fix compatibility with PHP-8
+
+With PHP-7.x missing arginfo has been triggering warnings:
+ NOTICE: PHP message: PHP Warning: Missing arginfo for radius_auth_open() in Unknown on line 0
+With PHP-8 this has become mandatory.
+---
+ radius.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 188 insertions(+), 28 deletions(-)
+
+diff --git a/radius.c b/radius.c
+index 89ee0d6..4bfb429 100644
+--- a/radius.c
++++ b/radius.c
+@@ -61,39 +61,199 @@ ZEND_DECLARE_MODULE_GLOBALS(radius)
+ /* True global resources - no need for thread safety here */
+ static int le_radius;
+
++/* {{{ arginfo */
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_auth_open, 0, 0, 0)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_acct_open, 0, 0, 0)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_close, 0, 0, 1)
++ ZEND_ARG_INFO(0, radius_handle)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_strerror, 0, 0, 1)
++ ZEND_ARG_INFO(0, radius_handle)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_config, 0, 0, 2)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, file)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_add_server, 0, 0, 6)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, hostname)
++ ZEND_ARG_INFO(0, port)
++ ZEND_ARG_INFO(0, secret)
++ ZEND_ARG_INFO(0, timeout)
++ ZEND_ARG_INFO(0, max_tries)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_create_request, 0, 0, 2)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, type)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_string, 0, 0, 3)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, value)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_int, 0, 0, 3)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, value)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_attr, 0, 0, 3)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, value)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_addr, 0, 0, 3)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, addr)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_vendor_string, 0, 0, 4)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, vendor)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, value)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_vendor_int, 0, 0, 4)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, vendor)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, value)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_vendor_attr, 0, 0, 4)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, vendor)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, value)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_put_vendor_addr, 0, 0, 4)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, vendor)
++ ZEND_ARG_INFO(0, type)
++ ZEND_ARG_INFO(0, addr)
++ ZEND_ARG_INFO(0, options)
++ ZEND_ARG_INFO(0, tag)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_send_request, 0, 0, 1)
++ ZEND_ARG_INFO(0, radius_handle)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_get_attr, 0, 0, 1)
++ ZEND_ARG_INFO(0, radius_handle)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_get_tagged_attr_data, 0, 0, 1)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_get_tagged_attr_tag, 0, 0, 1)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_get_vendor_attr, 0, 0, 1)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_cvt_addr, 0, 0, 1)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_cvt_int, 0, 0, 1)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_cvt_string, 0, 0, 1)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_salt_encrypt_attr, 0, 0, 2)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, data)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_request_authenticator, 0, 0, 1)
++ ZEND_ARG_INFO(0, radius_handle)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_server_secret, 0, 0, 1)
++ ZEND_ARG_INFO(0, radius_handle)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_demangle, 0, 0, 2)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, mangled)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_radius_demangle_mppe_key, 0, 0, 2)
++ ZEND_ARG_INFO(0, radius_handle)
++ ZEND_ARG_INFO(0, mangled)
++ZEND_END_ARG_INFO()
++
++/* }}} */
++
++
+ /* {{{ radius_functions[]
+ *
+ * Every user visible function must have an entry in radius_functions[].
+ */
+ zend_function_entry radius_functions[] = {
+- PHP_FE(radius_auth_open, NULL)
+- PHP_FE(radius_acct_open, NULL)
+- PHP_FE(radius_close, NULL)
+- PHP_FE(radius_strerror, NULL)
+- PHP_FE(radius_config, NULL)
+- PHP_FE(radius_add_server, NULL)
+- PHP_FE(radius_create_request, NULL)
+- PHP_FE(radius_put_string, NULL)
+- PHP_FE(radius_put_int, NULL)
+- PHP_FE(radius_put_attr, NULL)
+- PHP_FE(radius_put_addr, NULL)
+- PHP_FE(radius_put_vendor_string, NULL)
+- PHP_FE(radius_put_vendor_int, NULL)
+- PHP_FE(radius_put_vendor_attr, NULL)
+- PHP_FE(radius_put_vendor_addr, NULL)
+- PHP_FE(radius_send_request, NULL)
+- PHP_FE(radius_get_attr, NULL)
+- PHP_FE(radius_get_tagged_attr_data, NULL)
+- PHP_FE(radius_get_tagged_attr_tag, NULL)
+- PHP_FE(radius_get_vendor_attr, NULL)
+- PHP_FE(radius_cvt_addr, NULL)
+- PHP_FE(radius_cvt_int, NULL)
+- PHP_FE(radius_cvt_string, NULL)
+- PHP_FE(radius_salt_encrypt_attr, NULL)
+- PHP_FE(radius_request_authenticator, NULL)
+- PHP_FE(radius_server_secret, NULL)
+- PHP_FE(radius_demangle, NULL)
+- PHP_FE(radius_demangle_mppe_key, NULL)
++ PHP_FE(radius_auth_open, arginfo_radius_auth_open)
++ PHP_FE(radius_acct_open, arginfo_radius_acct_open)
++ PHP_FE(radius_close, arginfo_radius_close)
++ PHP_FE(radius_strerror, arginfo_radius_strerror)
++ PHP_FE(radius_config, arginfo_radius_config)
++ PHP_FE(radius_add_server, arginfo_radius_add_server)
++ PHP_FE(radius_create_request, arginfo_radius_create_request)
++ PHP_FE(radius_put_string, arginfo_radius_put_string)
++ PHP_FE(radius_put_int, arginfo_radius_put_int)
++ PHP_FE(radius_put_attr, arginfo_radius_put_attr)
++ PHP_FE(radius_put_addr, arginfo_radius_put_addr)
++ PHP_FE(radius_put_vendor_string, arginfo_radius_put_vendor_string)
++ PHP_FE(radius_put_vendor_int, arginfo_radius_put_vendor_int)
++ PHP_FE(radius_put_vendor_attr, arginfo_radius_put_vendor_attr)
++ PHP_FE(radius_put_vendor_addr, arginfo_radius_put_vendor_addr)
++ PHP_FE(radius_send_request, arginfo_radius_get_attr)
++ PHP_FE(radius_get_attr, arginfo_radius_get_attr)
++ PHP_FE(radius_get_tagged_attr_data, arginfo_radius_get_tagged_attr_data)
++ PHP_FE(radius_get_tagged_attr_tag, arginfo_radius_get_tagged_attr_tag)
++ PHP_FE(radius_get_vendor_attr, arginfo_radius_get_vendor_attr)
++ PHP_FE(radius_cvt_addr, arginfo_radius_cvt_addr)
++ PHP_FE(radius_cvt_int, arginfo_radius_cvt_int)
++ PHP_FE(radius_cvt_string, arginfo_radius_cvt_string)
++ PHP_FE(radius_salt_encrypt_attr, arginfo_radius_salt_encrypt_attr)
++ PHP_FE(radius_request_authenticator, arginfo_radius_request_authenticator)
++ PHP_FE(radius_server_secret, arginfo_radius_server_secret)
++ PHP_FE(radius_demangle, arginfo_radius_demangle)
++ PHP_FE(radius_demangle_mppe_key, arginfo_radius_demangle_mppe_key)
+ {NULL, NULL, NULL} /* Must be the last line in radius_functions[] */
+ };
+ /* }}} */
+--- a/php_radius.h 2016-02-15 10:11:50.000000000 -0500
++++ b/php_radius.h 2022-12-13 10:24:33.505295274 -0500
+@@ -96,6 +96,14 @@
+ #define RADIUS_OPTION_TAGGED RAD_OPTION_TAG
+ #define RADIUS_OPTION_SALT RAD_OPTION_SALT
+
++#ifndef TSRMLS_D
++#define TSRMLS_D void
++#define TSRMLS_DC
++#define TSRMLS_C
++#define TSRMLS_CC
++#define TSRMLS_FETCH()
++#endif
++
+ #endif /* PHP_RADIUS_H */
+
+
+--- a/radlib_compat.h 2016-02-15 10:11:50.000000000 -0500
++++ b/radlib_compat.h 2022-12-13 10:24:33.505295274 -0500
+@@ -83,6 +83,14 @@
+ } while (0)
+ #endif
+
++#ifndef TSRMLS_D
++#define TSRMLS_D void
++#define TSRMLS_DC
++#define TSRMLS_C
++#define TSRMLS_CC
++#define TSRMLS_FETCH()
++#endif
++
+ #endif
+
+
+--- a/tests/server/fake_server.php 2016-02-15 10:11:50.000000000 -0500
++++ b/tests/server/fake_server.php 2022-12-13 10:46:50.933484601 -0500
+@@ -321,7 +321,7 @@
+ *
+ * @return boolean
+ */
+- function skip() {
++ static function skip() {
+ return !(function_exists('socket_create') && function_exists('pcntl_fork') && function_exists('radius_acct_open'));
+ }
+
diff --git a/dev-php/pecl-radius/pecl-radius-1.4.0_beta1-r3.ebuild b/dev-php/pecl-radius/pecl-radius-1.4.0_beta1-r3.ebuild
index fbb86a1f78f8..0cf8e5654389 100644
--- a/dev-php/pecl-radius/pecl-radius-1.4.0_beta1-r3.ebuild
+++ b/dev-php/pecl-radius/pecl-radius-1.4.0_beta1-r3.ebuild
@@ -7,7 +7,7 @@ PHP_EXT_NAME="radius"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
-USE_PHP="php7-4"
+USE_PHP="php7-4 php8-0 php8-1 php8-2"
PHP_EXT_PECL_FILENAME="${PN/pecl-/}-${PV/_beta/b}.tgz"
PHP_EXT_S="${WORKDIR}/${PHP_EXT_PECL_FILENAME%.tgz}"
PHP_EXT_NEEDED_USE="pcntl(-),sockets(-)"
@@ -22,3 +22,11 @@ SLOT="0"
IUSE="examples"
S="${PHP_EXT_S}"
+
+PATCHES=( "${FILESDIR}/1.4.0-php8.patch" )
+
+src_unpack() {
+ default
+ #Non-portable test
+ rm "${S}/tests/radius_close.phpt" || die
+}