diff options
Diffstat (limited to 'dev-php')
-rw-r--r-- | dev-php/Manifest.gz | bin | 39581 -> 39746 bytes | |||
-rw-r--r-- | dev-php/pecl-http/Manifest | 4 | ||||
-rw-r--r-- | dev-php/pecl-http/pecl-http-3.2.5.ebuild | 76 | ||||
-rw-r--r-- | dev-php/pecl-http/pecl-http-4.2.2.ebuild | 79 | ||||
-rw-r--r-- | dev-php/pecl-zmq/Manifest | 7 | ||||
-rw-r--r-- | dev-php/pecl-zmq/files/pecl-zmq-1.1.3-php7-3-compatibility.patch | 265 | ||||
-rw-r--r-- | dev-php/pecl-zmq/pecl-zmq-1.1.3_p20211103.ebuild (renamed from dev-php/pecl-zmq/pecl-zmq-1.1.3-r3.ebuild) | 12 | ||||
-rw-r--r-- | dev-php/pecl-zmq/pecl-zmq-9999.ebuild | 6 | ||||
-rw-r--r-- | dev-php/snuffleupagus/Manifest | 3 | ||||
-rw-r--r-- | dev-php/snuffleupagus/metadata.xml | 11 | ||||
-rw-r--r-- | dev-php/snuffleupagus/snuffleupagus-0.7.1-r1.ebuild | 74 |
11 files changed, 261 insertions, 276 deletions
diff --git a/dev-php/Manifest.gz b/dev-php/Manifest.gz Binary files differindex 0bed54f7e31e..69b6ff58d021 100644 --- a/dev-php/Manifest.gz +++ b/dev-php/Manifest.gz diff --git a/dev-php/pecl-http/Manifest b/dev-php/pecl-http/Manifest index b6c7bd12cccf..69167660e1d5 100644 --- a/dev-php/pecl-http/Manifest +++ b/dev-php/pecl-http/Manifest @@ -1,6 +1,10 @@ AUX pecl-http-3.2.4-curl-cookies.patch 7806 BLAKE2B 96bd439d3ccb16bc7a67e062dfe9ad66bdcd193553764e087dd938e3f76c05796bb09571d934658a8b5d6c22bf2db03c213731ab2f35d03a20902c24897625c6 SHA512 cbbb215f3f0c5527f318283db4984a63b830727727081834f3a3383576d581359cfc7865e35a3b0b6ea4693c7c91ff93570c3c8964a8cd7e5d593095b16f0d4a DIST pecl_http-3.2.4.tgz 220631 BLAKE2B 996236cf9dd2f7d9bfaf046306e99c3ccf778261df19df8fd828b5811798f784841d89a6890e7347bd20cc6da71c966ea3ac9b17bf058e0bb766db7e1a8a6c49 SHA512 59c41d57c94a6e50e2f0b261130a24791b2845246f783b55e7f644f9a897d3650da364c5b38a860761b4a23f9266ed05000d6348bae2a7941e59d6bf5fb61a9e +DIST pecl_http-3.2.5.tgz 220593 BLAKE2B 3dfeefa69b0566f15f1dda73e7e4da2723033424e704039fbb42177e4996b434ea3450e40aa16844fe52c9fabac96d16ba5154a0112f00ff3838cf7bde149938 SHA512 13e99cd567a708cba56150a2127d060cdc78f9f5908371e5fb5fb3f02f27f8aa1b48c5eb147f61e9b5c9d5f2c627049f846d810f0135072cc9e4cd967e2bfa1d DIST pecl_http-4.2.1.tgz 224452 BLAKE2B 58d2e1159aa64b9893b2b8b67c8444801308084ac13a743760c25cb3d0456fb586f69dc6b9e77db53341e4e9e45ce68f954c47b4e2663afe86de67d63db5e8e2 SHA512 2ad7e57fae313a7b46ba88e528e124ac9d83804827131a6ef478ccf3cf5883dec2d928b8ceb377ee7f5947c76f24d640d77533a9946612419e526786a79877e6 +DIST pecl_http-4.2.2.tgz 224436 BLAKE2B 26ef3bb38778f0374938ba3f3bddba37c3a2044c7b9ffe2aacbca2566251d26d37882bf66773b8ed62d46855e8f14ad9b577cdb1ef3db9eba9850c0b30e57284 SHA512 1203367d590c7d80ffe7a21e7ac352ba053e3daeb778bf99e08fc13582e665e1429f850e51e36304bdec15e6646b648f2c444b46fa263e5441d008ac41a00f4b EBUILD pecl-http-3.2.4-r1.ebuild 2227 BLAKE2B 0c0fbb0433464e8a81139c8d40757a70026fff21e236131db38ac6df70a7209107cf04573fc5aa3f7cbc1108899d05fa8783a592c47d37b24b24cf20a043413e SHA512 85abeab748a1cdeabbc85aac2b47bdc3ad4322c7a7c9637670836383a5c69f3f7335a3ccc757bf3597fa3da9ccfdf682868806a02ffbe56e951fbdd6c8ab7494 +EBUILD pecl-http-3.2.5.ebuild 2196 BLAKE2B b7e213c5bcd956c6125424737115ff9a1e16c5dba07e6f80c9c808e2d7be114569cc095cd2351b1fceceaea53290c1b24fa7588778b8991f91f44403790eac00 SHA512 95b0c2296b8cf17e5dd6f07ec8876745d8ef8fb9995994df88b1d7b9b09056f3566edf9a48148b9752dd8522703444cce8a43c19b9ee8c9ae4e5bb5e5ba1ebe0 EBUILD pecl-http-4.2.1.ebuild 1828 BLAKE2B c9a009b2883f856958cc5343625a0e0989590c82696a3cd8be215631b522ecb1debd82491f636fede2f6694da5835d3251b8ffbf22364d8ba1c79578746f5795 SHA512 bde6bfd0a6a6e15a3f902298017f7a771ac6e36dbdff4a5bb24d7c37034727fafa2c6f443590397be4446288ec845ffb4b7bec559e54cd97293c6432e9599ea1 +EBUILD pecl-http-4.2.2.ebuild 2012 BLAKE2B 69a13eea3c000e9bf67600e5b1608f9d818287754dd47c449815cb4c200c5f26d34ad737c65fb4776f2e713f5a549acc22c4221d105c0c22cf70c1a59cb582da SHA512 0ac6d3f11f3d1c88da2090aa9a4c90ac53a20a1369942e1717f724773cde2a5d1c955ca6bcf22f441cf83aa70a3614d98c5d29dc18f59e32f8a18d0ad87ccbda MISC metadata.xml 240 BLAKE2B f60f325331d493a555e53c29c7cf2742a415356da28a467505f1441f3fd790fd0d59050df84854bdc379d19d94a46121216479807975a2922d5a2fefde83416b SHA512 fada9d69055f2be962b95aac82f260ec5db7a3f4392d10f0458a1d125938fa17539f7ec486000f3a95cff85a3fbb6bbf1f6f4fe6c2de7aa420a7543a3e89d03e diff --git a/dev-php/pecl-http/pecl-http-3.2.5.ebuild b/dev-php/pecl-http/pecl-http-3.2.5.ebuild new file mode 100644 index 000000000000..9cadd35fc682 --- /dev/null +++ b/dev-php/pecl-http/pecl-http-3.2.5.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +PHP_EXT_NAME="http" +PHP_EXT_PECL_PKG="pecl_http" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +PHP_INI_NAME="50-http" + +USE_PHP="php7-4 php8-0 php8-1" + +inherit php-ext-pecl-r3 + +USE_PHP="php7-4" + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="Extended HTTP Support for PHP" +LICENSE="BSD-2 MIT" +SLOT="7" +IUSE="ssl curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl" + +# Patch gets cookies working with curl 7.77, but further interop work was done later +# Just set min version for this short time to live branch +COMMON_DEPEND="app-arch/brotli:= + dev-libs/libevent + dev-php/pecl-propro:7[php_targets_php7-4(-)?] + >=dev-php/pecl-raphf-2.0.1:7[php_targets_php7-4(-)?] + net-dns/libidn2 + sys-libs/zlib + ssl? ( >=net-misc/curl-7.77[ssl,curl_ssl_gnutls(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=] ) + !ssl? ( >=net-misc/curl-7.77[-ssl] ) +" +DEPEND="php_targets_php7-4? ( ${COMMON_DEPEND} dev-lang/php:7.4[session(-),iconv(-)] )" +RDEPEND="${DEPEND} + php_targets_php8-0? ( dev-php/pecl-http:8[php_targets_php8-0(-)] ) + php_targets_php8-1? ( dev-php/pecl-http:8[php_targets_php8-1(-)] )" + +PHP_EXT_ECONF_ARGS=( --with-http --without-http-shared-deps + --without-http-libidn-dir --without-http-libicu-dir + --without-http-libidnkit2-dir --without-http-libidnkit-dir ) + +PATCHES=( "${FILESDIR}/${PN}-3.2.4-curl-cookies.patch" ) + +src_prepare() { + if use php_targets_php7-4 ; then + php-ext-source-r3_src_prepare + else + default_src_prepare + fi +} + +src_install() { + if use php_targets_php7-4 ; then + php-ext-pecl-r3_src_install + fi +} + +src_test() { + # Cannot use eclass function due to required modules + # All tests SKIP otherwise + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + # Link in required modules for testing + ln -s "${EXT_DIR}/propro.so" "modules/propro.so" || die + ln -s "${EXT_DIR}/raphf.so" "modules/raphf.so" || die + sed -i \ + 's/PHP_TEST_SHARED_EXTENSIONS)/PHP_TEST_SHARED_EXTENSIONS) -d extension=propro.so -d extension=raphf.so/' \ + Makefile || die + SKIP_ONLINE_TESTS=yes NO_INTERACTION="yes" emake test + # Clean up testing links + rm modules/propro.so modules/raphf.so || die + done +} diff --git a/dev-php/pecl-http/pecl-http-4.2.2.ebuild b/dev-php/pecl-http/pecl-http-4.2.2.ebuild new file mode 100644 index 000000000000..da62a219af9e --- /dev/null +++ b/dev-php/pecl-http/pecl-http-4.2.2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +PHP_EXT_NAME="http" +PHP_EXT_PECL_PKG="pecl_http" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +PHP_INI_NAME="50-http" + +USE_PHP="php7-4 php8-0 php8-1" + +inherit php-ext-pecl-r3 + +USE_PHP="php8-0 php8-1" + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="Extended HTTP Support for PHP" +LICENSE="BSD-2 MIT" +SLOT="8" +IUSE="ssl curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl" + +COMMON_DEPEND="app-arch/brotli:= + dev-libs/libevent + >=dev-php/pecl-raphf-2.0.1:7[php_targets_php8-0(-)?,php_targets_php8-1(-)?] + net-dns/libidn2 + sys-libs/zlib + ssl? ( net-misc/curl[ssl,curl_ssl_gnutls(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=] ) + !ssl? ( net-misc/curl[-ssl] ) +" +DEPEND=" + php_targets_php8-0? ( ${COMMON_DEPEND} dev-lang/php:8.0[session(-),iconv(-)] ) + php_targets_php8-1? ( ${COMMON_DEPEND} dev-lang/php:8.1[session(-),iconv(-)] )" +RDEPEND="${DEPEND} + php_targets_php7-4? ( dev-php/pecl-http:7[php_targets_php7-4(-)] )" + +PHP_EXT_ECONF_ARGS=( --with-http --without-http-shared-deps + --without-http-libidn-dir --without-http-libicu-dir + --without-http-libidnkit2-dir --without-http-libidnkit-dir ) + +src_prepare() { + if use php_targets_php8-0 || use php_targets_php8-1 ; then + php-ext-source-r3_src_prepare + else + default_src_prepare + fi + + # Respect LDFLAGS, bug 727134 + export EXTRA_LDFLAGS="${LDFLAGS}" +} + +src_test() { + # Cannot use eclass function due to required modules + # All tests SKIP otherwise + local slot + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + + # Link in required modules for testing + ln -s "${EXT_DIR}/raphf.so" "modules/raphf.so" || die + + sed -i \ + 's/PHP_TEST_SHARED_EXTENSIONS)/PHP_TEST_SHARED_EXTENSIONS) -d extension=raphf/' \ + Makefile || die + + SKIP_ONLINE_TESTS=yes NO_INTERACTION="yes" emake test + + # Clean up testing links + rm modules/raphf.so || die + done +} + +src_install() { + if use php_targets_php8-0 || use php_targets_php8-1 ; then + php-ext-pecl-r3_src_install + fi +} diff --git a/dev-php/pecl-zmq/Manifest b/dev-php/pecl-zmq/Manifest index 1e959af9fb3c..dbd9d264d34d 100644 --- a/dev-php/pecl-zmq/Manifest +++ b/dev-php/pecl-zmq/Manifest @@ -1,5 +1,4 @@ -AUX pecl-zmq-1.1.3-php7-3-compatibility.patch 9970 BLAKE2B af8c1d546da1786bef6564b42afd731f0ceade8c2d425dfb5910748b4248cc910aa41f5f53fed7ab65394d7da201cc6d3a47b065e45f3f362c9968ab9b229f8f SHA512 d39ab0cce3397a851aa7662664e1f09fbd4096a4942e2172ed66d53292043f808c82d8f13ea8b5bf918ccdcdef9f254324b318e36150a6d76dfb7d051da3fed4 -DIST zmq-1.1.3.tgz 82397 BLAKE2B 5c221abf614bcc33c4c69e64308508d544f790371549c421fe2fcdedd67f2e843b2b82d96f517ea9413ffedd128838725e9afc18f0d4048b270d4982571874d0 SHA512 0f03016e315a6c6a1e1d6eca1e20564834d2a924cef06af1b38693933f1e5a094c37e9c432705a64f61d95e82655f61358fc7783e7a6f06c7dd9ad84fc6f7bbc -EBUILD pecl-zmq-1.1.3-r3.ebuild 583 BLAKE2B 73de5f99809b8e5420c17a3d06b14d8da6e6c10ed29c9060bd4d71914cbb4e13ea1b0cedaee6b7718d8e2550be5ea371ce2940301ae34713f484d6e9a5491a54 SHA512 f3fc9b751f1246f90e0fd5677ede257ed923025a5dac6dd6ec8a008fd4120353630c12ba914d752716ada37e895463a7e61fc308c5de6a5ff18e621c30ff5a82 -EBUILD pecl-zmq-9999.ebuild 517 BLAKE2B ed1c85df9767503db2b961b7b5c04b0cbef2885c5ea1ba33fd1cb5239e72b91587fc46ab44f63e0a4d2fb43f1e1f0b217b44c5c5c27a4d7b36f47a955727466f SHA512 c547467e09c3f022456ba619e063d4951ad4e2426dcf144bca3848b07ea96dc50925a97c21443cd726f6499e5667cdb1a73f14a064c959873d03559d16bf49a1 +DIST pecl-zmq-1.1.3_p20211103.tar.gz 104608 BLAKE2B 5217c77353cf36eb10fbb4825a77e16293770b58ee92aeec3487816c713982c67e1964e3da40b152952abe7a1e2be1dab3e67f53798849bfa1a52f3c47f2884e SHA512 762ecc78fda2e94d7bec57dc329741e0a4a6442e76a8a0bb367576b961e96482f43698e36adc7c8e6a585c914e696e6a17056a1ea680caa96f69faefc604d873 +EBUILD pecl-zmq-1.1.3_p20211103.ebuild 709 BLAKE2B 7d6c7d4c8ce0d775a160f8753d44e332228320e1281c90c3e12aed1e140654fab7da189ce21366ce76e9c0859eeef5cd673ea08c61cb1170ab6b96d052af2235 SHA512 ee1e88bae1ddd24ad224fe9d44bdeabbd1f6941767a45905276227cc01e3dfd41c8b905c7d94031c1cc995b51138e9fc95934652355ca22dbd90a9544b4e54f9 +EBUILD pecl-zmq-9999.ebuild 517 BLAKE2B 317c85e169fef0c90f35301e8520eec3a7809bb65a20490b78dded0ff27905fb1ebd1443ee51d53b3afe000f46af7417cac70114756c9ea3a8ddf52f17c79b1b SHA512 d7899617f8513b6510f1ecf3908f4d89194037393c17822987d11170f53b81d1aebf05ac2d74f09edf480da02b714d68e81728382a7ef987775b6d7284850ce4 MISC metadata.xml 240 BLAKE2B f60f325331d493a555e53c29c7cf2742a415356da28a467505f1441f3fd790fd0d59050df84854bdc379d19d94a46121216479807975a2922d5a2fefde83416b SHA512 fada9d69055f2be962b95aac82f260ec5db7a3f4392d10f0458a1d125938fa17539f7ec486000f3a95cff85a3fbb6bbf1f6f4fe6c2de7aa420a7543a3e89d03e diff --git a/dev-php/pecl-zmq/files/pecl-zmq-1.1.3-php7-3-compatibility.patch b/dev-php/pecl-zmq/files/pecl-zmq-1.1.3-php7-3-compatibility.patch deleted file mode 100644 index 2de703039b07..000000000000 --- a/dev-php/pecl-zmq/files/pecl-zmq-1.1.3-php7-3-compatibility.patch +++ /dev/null @@ -1,265 +0,0 @@ -From af02bde61c2a5af1ae64cac09ffe2b25237aa58e Mon Sep 17 00:00:00 2001 -From: Alex/AT <alex@alex-at.net> -Date: Mon, 10 Dec 2018 06:02:27 +0300 -Subject: [PATCH] PHP 7.3 compatibility and bugfixes - -- Define new GC_ADDREF/DELREF/SET_REFCOUNT macros for older PHP versions and use them instead of direct GC reference counter access - -- Fixup all necessary 'long' type parameters to 'zend_long', PHP 7.3 makes it mandatory, also fixup some direct function implementations to accept the same - -- In php_zmq_recv(), zend_string_init() was wrongly called with third parameter as '1', marking new string with IS_STR_PERSISTENT, this caused heap corruption and/or segfaults with PHP 7.3 and could possibly cause other sorts of bugs under any 7.x version - With ZVAL_STRINGL macro, this last '1' parameter meant to copy the string and was seemingly erroneously moved to zend_string_init(). zend_string_init() copies string by default, and last parameter has totally different meaning here - -- In poll(), flag ZVAL separation on passed arrays (PHP 7.3 makes it mandatory) - -- Test 19 (exception on connect callback with forced reference parameter): skip on PHP 7.1 and higher, PHP >= 7.1 started to fallback to passing argument by value instead of failing - -- Test 21 (warning generation from callback): it is ok, but PHP 7.3 uses 'int' instead of 'integer' for constants, so allow any word in place of the word 'integer' ---- - php_zmq.h | 6 ++++ - tests/019-callbackinvalidsignature.phpt | 3 +- - tests/021-callbackwarning.phpt | 2 +- - zmq.c | 40 ++++++++++++------------- - zmq_sockopt.c | 4 +-- - 5 files changed, 30 insertions(+), 25 deletions(-) - -diff --git a/php_zmq.h b/php_zmq.h -index ef50bfb..3833967 100644 ---- a/php_zmq.h -+++ b/php_zmq.h -@@ -44,6 +44,12 @@ - - #include "php.h" - -+#if PHP_VERSION_ID < 70300 -+#define GC_ADDREF(p) ++GC_REFCOUNT(p) -+#define GC_DELREF(p) --GC_REFCOUNT(p) -+#define GC_SET_REFCOUNT(p, rc) GC_REFCOUNT(p) = rc -+#endif -+ - extern zend_module_entry zmq_module_entry; - #define phpext_zmq_ptr &zmq_module_entry - -diff --git a/tests/019-callbackinvalidsignature.phpt b/tests/019-callbackinvalidsignature.phpt -index 753de31..b5bb20c 100644 ---- a/tests/019-callbackinvalidsignature.phpt -+++ b/tests/019-callbackinvalidsignature.phpt -@@ -1,7 +1,8 @@ - --TEST-- - Test callback edge-cases - --SKIPIF-- --<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> -+<?php require_once(dirname(__FILE__) . '/skipif.inc'); -+if (PHP_VERSION_ID >= 70100) die("skip PHP 7.1 and higher fallback to passing argument by value even when forced to reference"); ?> - --FILE-- - <?php - -diff --git a/tests/021-callbackwarning.phpt b/tests/021-callbackwarning.phpt -index 435743e..eba2ecf 100644 ---- a/tests/021-callbackwarning.phpt -+++ b/tests/021-callbackwarning.phpt -@@ -13,5 +13,5 @@ function generate_warning($a, $b) - $socket = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, 'persistent_socket', 'generate_warning'); - - --EXPECTF-- --Warning: in_array() expects parameter 2 to be array, integer given in %s on line %d -+Warning: in_array() expects parameter 2 to be array, %s given in %s on line %d - -diff --git a/zmq.c b/zmq.c -index 942e69b..57ebd11 100644 ---- a/zmq.c -+++ b/zmq.c -@@ -235,7 +235,7 @@ php_zmq_context *php_zmq_context_get(zend_long io_threads, zend_bool is_persiste - le.type = php_zmq_context_list_entry(); - le.ptr = context; - -- GC_REFCOUNT(&le) = 1; -+ GC_SET_REFCOUNT(&le, 1); - - /* plist_key is not a persistent allocated key, thus we use str_update here */ - if (zend_hash_str_update_mem(&EG(persistent_list), plist_key->val, plist_key->len, &le, sizeof(le)) == NULL) { -@@ -369,7 +369,7 @@ PHP_METHOD(zmq, curvekeypair) - PHP_METHOD(zmqcontext, __construct) - { - php_zmq_context_object *intern; -- long io_threads = 1; -+ zend_long io_threads = 1; - zend_bool is_persistent = 1; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lb", &io_threads, &is_persistent) == FAILURE) { -@@ -495,7 +495,7 @@ PHP_METHOD(zmqcontext, getOpt) - Create a new zmq socket - */ - static --php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, int type, zend_bool is_persistent) -+php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, zend_long type, zend_bool is_persistent) - { - php_zmq_socket *zmq_sock; - -@@ -503,7 +503,7 @@ php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, int type, zend_bool - zmq_sock->z_socket = zmq_socket(context->z_ctx, type); - zmq_sock->pid = getpid(); - zmq_sock->ctx = context; -- zmq_sock->socket_type = type; -+ zmq_sock->socket_type = type; - - if (!zmq_sock->z_socket) { - pefree(zmq_sock, is_persistent); -@@ -535,7 +535,7 @@ void php_zmq_socket_store(php_zmq_socket *zmq_sock_p, zend_long type, zend_strin - le.type = php_zmq_socket_list_entry(); - le.ptr = zmq_sock_p; - -- GC_REFCOUNT(&le) = 1; -+ GC_SET_REFCOUNT(&le, 1); - - plist_key = php_zmq_socket_plist_key(type, persistent_id, use_shared_ctx); - -@@ -796,7 +796,7 @@ PHP_METHOD(zmqsocket, __construct) - - /* {{{ static zend_bool php_zmq_send(php_zmq_socket_object *intern, char *message_param, long flags) - */ --static zend_bool php_zmq_send(php_zmq_socket_object *intern, zend_string *message_param, long flags) -+static zend_bool php_zmq_send(php_zmq_socket_object *intern, zend_string *message_param, zend_long flags) - { - int rc, errno_; - zmq_msg_t message; -@@ -828,7 +828,7 @@ static void php_zmq_sendmsg_impl(INTERNAL_FUNCTION_PARAMETERS) - { - php_zmq_socket_object *intern; - zend_string *message_param; -- long flags = 0; -+ zend_long flags = 0; - zend_bool ret; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|l", &message_param, &flags) == FAILURE) { -@@ -890,7 +890,7 @@ PHP_METHOD(zmqsocket, sendmulti) - zval *messages; - php_zmq_socket_object *intern; - int to_send, ret = 0; -- long flags = 0; -+ zend_long flags = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|l", &messages, &flags) == FAILURE) { - return; -@@ -910,7 +910,7 @@ PHP_METHOD(zmqsocket, sendmulti) - /* {{{ static zend_bool php_zmq_recv(php_zmq_socket_object *intern, long flags, zval *return_value) - */ - static --zend_string *php_zmq_recv(php_zmq_socket_object *intern, long flags) -+zend_string *php_zmq_recv(php_zmq_socket_object *intern, zend_long flags) - { - int rc, errno_; - zmq_msg_t message; -@@ -933,7 +933,7 @@ zend_string *php_zmq_recv(php_zmq_socket_object *intern, long flags) - return NULL; - } - -- str = zend_string_init(zmq_msg_data(&message), zmq_msg_size(&message), 1); -+ str = zend_string_init(zmq_msg_data(&message), zmq_msg_size(&message), 0); - zmq_msg_close(&message); - return str; - } -@@ -943,7 +943,7 @@ static void php_zmq_recvmsg_impl(INTERNAL_FUNCTION_PARAMETERS) - { - zend_string *str = NULL; - php_zmq_socket_object *intern; -- long flags = 0; -+ zend_long flags = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) { - return; -@@ -974,7 +974,7 @@ PHP_METHOD(zmqsocket, recvmulti) - { - php_zmq_socket_object *intern; - size_t value_len; -- long flags = 0; -+ zend_long flags = 0; - #if ZMQ_VERSION_MAJOR < 3 - int64_t value; - #else -@@ -1303,7 +1303,7 @@ PHP_METHOD(zmqpoll, add) - { - php_zmq_poll_object *intern; - zval *object; -- long events; -+ zend_long events; - int error; - zend_string *key; - -@@ -1423,10 +1423,10 @@ PHP_METHOD(zmqpoll, poll) - php_zmq_poll_object *intern; - zval *r_array, *w_array; - -- long timeout = -1; -+ zend_long timeout = -1; - int rc; - -- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!a!|l", &r_array, &w_array, &timeout) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!/a!/|l", &r_array, &w_array, &timeout) == FAILURE) { - return; - } - -@@ -1592,7 +1592,7 @@ void s_clear_device_callback (php_zmq_device_cb_t *cb) - } - - static --void s_init_device_callback (php_zmq_device_cb_t *cb, zend_fcall_info *fci, zend_fcall_info_cache *fci_cache, long timeout, zval *user_data) -+void s_init_device_callback (php_zmq_device_cb_t *cb, zend_fcall_info *fci, zend_fcall_info_cache *fci_cache, zend_long timeout, zval *user_data) - { - memcpy (&cb->fci, fci, sizeof (zend_fcall_info)); - memcpy (&cb->fci_cache, fci_cache, sizeof (zend_fcall_info_cache)); -@@ -1615,7 +1615,7 @@ void s_init_device_callback (php_zmq_device_cb_t *cb, zend_fcall_info *fci, zend - PHP_METHOD(zmqdevice, setidletimeout) - { - php_zmq_device_object *intern; -- long timeout; -+ zend_long timeout; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &timeout) == FAILURE) { - return; -@@ -1644,7 +1644,7 @@ PHP_METHOD(zmqdevice, getidletimeout) - PHP_METHOD(zmqdevice, settimertimeout) - { - php_zmq_device_object *intern; -- long timeout; -+ zend_long timeout; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &timeout) == FAILURE) { - return; -@@ -1676,7 +1676,7 @@ PHP_METHOD(zmqdevice, setidlecallback) - zval *user_data = NULL; - zend_fcall_info fci; - zend_fcall_info_cache fci_cache; -- long timeout = 0; -+ zend_long timeout = 0; - - if (ZEND_NUM_ARGS() == 2) { - php_error_docref(NULL, E_DEPRECATED, "The signature for setIdleCallback has changed, please update your code"); -@@ -1718,7 +1718,7 @@ PHP_METHOD(zmqdevice, settimercallback) - zval *user_data = NULL; - zend_fcall_info fci; - zend_fcall_info_cache fci_cache; -- long timeout; -+ zend_long timeout; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "fl|z!", &fci, &fci_cache, &timeout, &user_data) == FAILURE) { - return; -diff --git a/zmq_sockopt.c b/zmq_sockopt.c -index 1357032..3a00421 100644 ---- a/zmq_sockopt.c -+++ b/zmq_sockopt.c -@@ -1,5 +1,3 @@ -- -- - /* - +-----------------------------------------------------------------------------------+ - | ZMQ extension for PHP | -@@ -2033,7 +2031,7 @@ PHP_METHOD(zmqsocket, getsockopt) - PHP_METHOD(zmqsocket, setsockopt) - { - php_zmq_socket_object *intern; -- long key; -+ zend_long key; - zval *zv; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/", &key, &zv) == FAILURE) { diff --git a/dev-php/pecl-zmq/pecl-zmq-1.1.3-r3.ebuild b/dev-php/pecl-zmq/pecl-zmq-1.1.3_p20211103.ebuild index d183c65cd902..3263a4973133 100644 --- a/dev-php/pecl-zmq/pecl-zmq-1.1.3-r3.ebuild +++ b/dev-php/pecl-zmq/pecl-zmq-1.1.3_p20211103.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI="8" -USE_PHP="php7-2 php7-3 php7-4" +USE_PHP="php7-4 php8-0 php8-1" inherit php-ext-pecl-r3 if [[ ${PV} == "9999" ]]; then @@ -16,6 +16,9 @@ else KEYWORDS="~amd64 ~x86" fi +SNAPSHOT="ee5fbc693f07b2d6f0d9fd748f131be82310f386" +SRC_URI="https://github.com/zeromq/php-zmq/archive/${SNAPSHOT}.tar.gz -> ${P}.tar.gz" + DESCRIPTION="PHP Bindings for ZeroMQ messaging" LICENSE="BSD" SLOT="0" @@ -25,4 +28,5 @@ BDEPEND="virtual/pkgconfig" DEPEND="net-libs/zeromq" RDEPEND="net-libs/zeromq:=" -PATCHES=( "${FILESDIR}"/${PN}-1.1.3-php7-3-compatibility.patch ) +S="${WORKDIR}/php-zmq-${SNAPSHOT}" +PHP_EXT_S="${S}" diff --git a/dev-php/pecl-zmq/pecl-zmq-9999.ebuild b/dev-php/pecl-zmq/pecl-zmq-9999.ebuild index a0147e05ff53..d5bd392cbce7 100644 --- a/dev-php/pecl-zmq/pecl-zmq-9999.ebuild +++ b/dev-php/pecl-zmq/pecl-zmq-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI="8" -USE_PHP="php7-3 php7-4 php8-0" +USE_PHP="php7-4 php8-0 php8-1" inherit php-ext-pecl-r3 if [[ ${PV} == "9999" ]]; then diff --git a/dev-php/snuffleupagus/Manifest b/dev-php/snuffleupagus/Manifest new file mode 100644 index 000000000000..57f35901ff3d --- /dev/null +++ b/dev-php/snuffleupagus/Manifest @@ -0,0 +1,3 @@ +DIST snuffleupagus-0.7.1.tar.gz 11962220 BLAKE2B 8504721ca08e727a5a6fa58c216a5dac7be3fe6e5a98cffcb17e44a2235628c26f02afd2159e9b1fbe8e40e26bc7c4e34a4ff027ee27b8ec29cf89865dbb8514 SHA512 21510e214f94dd50a4aa05226188c9433a6a261c0bd3d58973ed4536754b3e12356e3f625480c370b66c570482694c25d336a771fbbbeb27e1d524b1f82c7869 +EBUILD snuffleupagus-0.7.1-r1.ebuild 2192 BLAKE2B b8f98065f4cc3fa01e646a95b9812549ac8d79ac0d37ff223760caaa48ebf98890c310199b6b8507a4cfeeff7d4b49de7acbc3383fa3fea4537101d0e8308ec8 SHA512 0d41440c35452876ccb56522265bb906cc061fa8929714e34c0bd011d1beba5a45feadb3f11285074c322678e4a04c925343439a7d17279a5d0be12c215251ee +MISC metadata.xml 336 BLAKE2B 6684e51a28675df71f8171c0bb5b7469a47fbd334920dfa846e0e45d6b6d8c1b92aaeb469e6d371537a9521d5e0dda4dd0d1a9e349a999d3a4c0fca4b1e81fe5 SHA512 775fcf5192683d3a69a426ffa9b3e9f0ef5ae34ac69fc19258995db89a18fad9ae1d87358260d234af6fa45054f68980296434874cc125aa8f5ccf37fbe2a983 diff --git a/dev-php/snuffleupagus/metadata.xml b/dev-php/snuffleupagus/metadata.xml new file mode 100644 index 000000000000..6cb8e5e502b5 --- /dev/null +++ b/dev-php/snuffleupagus/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>php-bugs@gentoo.org</email> + <name>PHP</name> + </maintainer> + <upstream> + <remote-id type="github">jvoisin/snuffleupagus</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-php/snuffleupagus/snuffleupagus-0.7.1-r1.ebuild b/dev-php/snuffleupagus/snuffleupagus-0.7.1-r1.ebuild new file mode 100644 index 000000000000..d18383730d41 --- /dev/null +++ b/dev-php/snuffleupagus/snuffleupagus-0.7.1-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PHP_EXT_NAME="${PN}" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +PHP_EXT_ECONF_ARGS=( --enable-${PN} ) +PHP_EXT_S="${S}/src" + +USE_PHP="php7-4 php8-0" + +inherit php-ext-source-r3 + +KEYWORDS="~amd64" + +DESCRIPTION="A PHP module to drastically raise the cost of attacks against websites" +HOMEPAGE="https://snuffleupagus.readthedocs.io/index.html" +SRC_URI="https://github.com/jvoisin/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3 PHP-3.01" +SLOT="0" + +src_prepare() { + # fix file locations tests look for + ln -s "${P}/config" "${WORKDIR}/config" || die + # Fix path dependent tests + sed -i -e 's~src/tests/~~' \ + src/tests/session_encryption/crypt_session_read_uncrypt.phpt || die + sed -i -e 's~%a/src~%a~' \ + src/tests/disable_function/disabled_functions_runtime.phpt || die + php-ext-source-r3_src_prepare +} + +src_install() { + addtoinifile() { + local inifile="${WORKDIR}/${1}" + local inidir="${inifile%/*}" + + mkdir -p "${inidir}" || die "failed to create INI directory ${inidir}" + + local my_added="${2}=${3}" + echo "${my_added}" >> "${inifile}" || die "failed to append to ${inifile}" + einfo "Added '${my_added}' to /${1}" + + insinto "/${1%/*}" + doins "${inifile}" + } + einstalldocs + local slot x cfgdir + php-ext-source-r3_src_install + # Add the rules file which vary by install version + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + for x in ${PHP_EXT_SAPIS} ; do + cfgdir="/etc/php/${x}-${slot}" + if [[ -f "${ED}${cfgdir}/ext/${PHP_INI_NAME}.ini" ]]; then + addtoinifile "${cfgdir#/}/ext/${PHP_INI_NAME}.ini" \ + "sp.configuration_file" "${cfgdir}/${PN}.rules" + insinto "${cfgdir}" + case ${PHP_CURRENTSLOT:0:1} in + 8) newins "${S}/config/default_php8.rules" "${PN}.rules" ;; + *) newins "${S}/config/default.rules" "${PN}.rules" ;; + esac + fi + done + done +} + +pkg_postinst() { + elog "This extension is configured with recommended rules enabled by default." + elog "Feel free to customize as necessary. Please test outside of production first." + elog "Failure to test may cause unexpected results to loosely coded sites." +} |