From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-php/pecl-xrange/Manifest | 6 ++ dev-php/pecl-xrange/files/1.3.2-fixes.patch | 133 ++++++++++++++++++++++++ dev-php/pecl-xrange/metadata.xml | 8 ++ dev-php/pecl-xrange/pecl-xrange-1.3.2-r2.ebuild | 24 +++++ 4 files changed, 171 insertions(+) create mode 100644 dev-php/pecl-xrange/Manifest create mode 100644 dev-php/pecl-xrange/files/1.3.2-fixes.patch create mode 100644 dev-php/pecl-xrange/metadata.xml create mode 100644 dev-php/pecl-xrange/pecl-xrange-1.3.2-r2.ebuild (limited to 'dev-php/pecl-xrange') diff --git a/dev-php/pecl-xrange/Manifest b/dev-php/pecl-xrange/Manifest new file mode 100644 index 000000000000..faddcac6b627 --- /dev/null +++ b/dev-php/pecl-xrange/Manifest @@ -0,0 +1,6 @@ +AUX 1.3.2-fixes.patch 4474 SHA256 3f9b4b360061094320d91a4a52c3f9dca9f5c976a9856660f16d556792a7e1e5 SHA512 66b110209dbdeb3ea8f79d98eb2549ace61d2272130472f75daf435c92ae3bd3ff354f3eb4ff96e374559521f45cedfbb0c1c3c5d189e5138a1765e695dbae05 WHIRLPOOL 7c90286ff600991ccf52151170a66b755c7d7a2043f28e214272b53bbd4b044fc49895375ebb1dc9c8a90e33fa1d6c8800575efc88a5d713bb70db80c178c394 +DIST xrange-1.3.2.tgz 8767 SHA256 612849c8e6d5587183a3fb1e39bb5e4a061fe911d5bd3f9b08f6796ee1f4c112 SHA512 76b43867d1225249347e489dd24a0d278b45288e26f90b0678b657ac21e0d45c5c90496ca13b534f581643d865b266dabc2cad41fec0214951a4630e98efa5e4 WHIRLPOOL 4525a3f66e168437ddbce559e686b48d480e438d64cdcb8c2bbeb61d1aba4cd14581951ee7c8b232cfb58a80ff3f970c6e07901f87293f73e44b3147eddae1f8 +EBUILD pecl-xrange-1.3.2-r2.ebuild 424 SHA256 fd45d1fe4e39d93bc073f289650fd8df1e221bcadcb4685c252a8ea246dcca81 SHA512 c68d85e1d88219617955a6748037470632ffe6fec3854e3d5fcefeff980df4e8a0d6b623638c9a3eff2b75c380691d11f6838e0d18e0620da8941832caec49ef WHIRLPOOL b45c8a70ae9c1e23b97d4f0144a7a55aca17540c6a6b4d0fc5a3d41dd0c73a977b4cfa085423230691ef4d239b2409539d0ef0be7780bac5306c73dabd62018e +MISC ChangeLog 3351 SHA256 b8eb6a2d26c610622f3c931ccc44b0f4706d3eb92433fb561cb7f70c3ea7dae7 SHA512 dda40298575e61947873cba4e991ec1f107d8bc447a077bf45f85dd6eccac057217146908b139e41abe6b4bdc7446b3ce08607553aa2eafb52ebaf5294826397 WHIRLPOOL 0621e3a058af0ec31a57df17704e546a1308b8211c0cf6c626a02eb0685427e61aa92bf1c8a2dcd16d484bd3b88edb6e25d7eb84a2024cdf376073f8c1005f2a +MISC ChangeLog-2015 560 SHA256 41f7c3b6e410bdbd70e33334c16547ae4a549fc016083d49f3e4c133df72f9e3 SHA512 26f40f21abeb25c7bb69851b82ee27e59a05a99bfe0c84c4de47b9e192da460a6837188590a28c30533298b729c2441c120502940d2b79a27b881c5a292adc22 WHIRLPOOL 8d5c27f6088e2165dd2acb666613a82d956ad1aa42b44224c89af1b1811f1b638b68afc379e156f124ea9891926fd4eada1eeaa286b61fdd98fab00f8c08b5ea +MISC metadata.xml 239 SHA256 b54aca642ac424532264a97d14931720ed288cf387dbdef6a10b34ffed6689f1 SHA512 2181b874bfe8cd31e7730d8207e26cfd2f272eaf2d1b57ae0faff126347a5298fa1c506d9107e1da9736c8a0ed9c8c339e4d9509a8726b79dbe86e073c12dee0 WHIRLPOOL 80ab9605bb31ce3310bf524de4705c67ca85cf8f2346b7e13274595598b9fe92c9b119beb865ef214ad33ef172b880e318d18ff8c8d2026cb7319f0524d8a7aa diff --git a/dev-php/pecl-xrange/files/1.3.2-fixes.patch b/dev-php/pecl-xrange/files/1.3.2-fixes.patch new file mode 100644 index 000000000000..4664a5d1feb2 --- /dev/null +++ b/dev-php/pecl-xrange/files/1.3.2-fixes.patch @@ -0,0 +1,133 @@ +--- a/xrange.c 2012/07/28 23:20:09 326859 ++++ b/xrange.c 2013/10/06 11:48:38 331707 +@@ -175,21 +175,21 @@ + zend_class_implements(php_xrange_xri_entry TSRMLS_CC, 1, spl_ce_Countable); + + /* Register Class: OddFilterIterator */ +- memset(&ce, sizeof(ce), '\0'); ++ memset(&ce, 0, sizeof(ce)); + INIT_CLASS_ENTRY(ce, PHP_XRANGE_ODDFILTERITERATOR_NAME, php_xrange_OddFilterIterator_functions); + ce.name_length = strlen(PHP_XRANGE_ODDFILTERITERATOR_NAME); + php_xrange_OddFilterIterator_entry = + zend_register_internal_class_ex(&ce, spl_ce_FilterIterator, NULL TSRMLS_CC); + + /* Register Class: EvenFilterIterator */ +- memset(&ce, sizeof(ce), '\0'); ++ memset(&ce, 0, sizeof(ce)); + INIT_CLASS_ENTRY(ce, PHP_XRANGE_EVENFILTERITERATOR_NAME, php_xrange_EvenFilterIterator_functions); + ce.name_length = strlen(PHP_XRANGE_EVENFILTERITERATOR_NAME); + php_xrange_EvenFilterIterator_entry = + zend_register_internal_class_ex(&ce, spl_ce_FilterIterator, NULL TSRMLS_CC); + + /* Register Class: NumericFilterIterator */ +- memset(&ce, sizeof(ce), '\0'); ++ memset(&ce, 0, sizeof(ce)); + INIT_CLASS_ENTRY(ce, PHP_XRANGE_NUMERICFILTERITERATOR_NAME, php_xrange_NumericFilterIterator_functions); + ce.name_length = strlen(PHP_XRANGE_NUMERICFILTERITERATOR_NAME); + php_xrange_NumericFilterIterator_entry = +@@ -225,13 +225,16 @@ + { + if (return_value_used) { + int param_count = ZEND_NUM_ARGS(); ++ zval ***params; ++ zval *retval = NULL; ++ zval methodName; + + /* because I'm passing the arguments as an array, I'll need to manually + check arg length. */ + if (param_count != 2 && param_count != 3) WRONG_PARAM_COUNT; + + /* retrieve the function's argument list */ +- zval ***params = (zval ***) safe_emalloc(param_count, sizeof(zval*), 0); ++ params = (zval ***) safe_emalloc(param_count, sizeof(zval*), 0); + if (zend_get_parameters_array_ex(param_count, params) == FAILURE) { + efree(params); + WRONG_PARAM_COUNT; +@@ -244,8 +247,6 @@ + ); + + /* setup call to XRangeIterator's constructor (must do manually) */ +- zval *retval = NULL; +- zval methodName; + ZVAL_STRING(&methodName, "__construct", 0); + + /* pass all arguments through to the XRangeIterator constructor */ +@@ -286,6 +287,9 @@ + Return a configured range iterator / generator */ + PHP_METHOD(PHP_XRANGE_XRI_NAME, __construct) + { ++ xrange_module_storage *internalStorage; ++ double iterations; ++ + if (!getThis()) { + php_error_docref( + NULL TSRMLS_CC, E_WARNING, "Don't call the constructor statically" +@@ -293,7 +297,7 @@ + RETURN_FALSE; + } + +- xrange_module_storage *internalStorage = PHP_XRANGE_ZOS_GET; ++ internalStorage = PHP_XRANGE_ZOS_GET; + + /* parse argument list */ + internalStorage->step = 1.0; /* default */ +@@ -322,7 +326,7 @@ + ) internalStorage->step *= -1; + + /* calculate the total number of iterations before completion */ +- double iterations = fabs( ++ iterations = fabs( + (internalStorage->high - internalStorage->low) / internalStorage->step + ); + +@@ -453,6 +457,7 @@ + PHP_METHOD(PHP_XRANGE_ODDFILTERITERATOR_NAME, accept) + { + zval *currentValue; ++ int isOdd; + + // method A: bypass getInnerIterator() call + spl_dual_it_object *intern = +@@ -464,7 +469,7 @@ + // TODO: method B - use getInnerIterator() w/ compilation option + + if (Z_TYPE_P(currentValue) != IS_LONG) convert_to_long(currentValue); +- int isOdd = Z_LVAL_P(currentValue) & 1; ++ isOdd = Z_LVAL_P(currentValue) & 1; + + zval_ptr_dtor(¤tValue); /* clean-up */ + RETURN_BOOL(isOdd); +@@ -476,6 +481,7 @@ + PHP_METHOD(PHP_XRANGE_EVENFILTERITERATOR_NAME, accept) + { + zval *currentValue; ++ int isEven; + + /* method A: bypass getInnerIterator() call */ + spl_dual_it_object *intern = +@@ -487,7 +493,7 @@ + /* TODO: method B - use getInnerIterator() w/ compilation option */ + + if (Z_TYPE_P(currentValue) != IS_LONG) convert_to_long(currentValue); +- int isEven = !(Z_LVAL_P(currentValue) & 1); ++ isEven = !(Z_LVAL_P(currentValue) & 1); + + zval_ptr_dtor(¤tValue); /* clean-up */ + RETURN_BOOL(isEven); +@@ -499,6 +505,7 @@ + PHP_METHOD(PHP_XRANGE_NUMERICFILTERITERATOR_NAME, accept) + { + zval *currentValue; ++ int isNumeric; + + /* method A: bypass getInnerIterator() call */ + spl_dual_it_object *intern = +@@ -509,8 +516,6 @@ + ); + /* TODO: method B - use getInnerIterator() w/ compilation option */ + +- int isNumeric; +- + /* this code comes from is_numeric() the implementation. it's here to + * to eliminate the overhead of a PHP function call. */ + switch (Z_TYPE_P(currentValue)) { diff --git a/dev-php/pecl-xrange/metadata.xml b/dev-php/pecl-xrange/metadata.xml new file mode 100644 index 000000000000..b86acf66c756 --- /dev/null +++ b/dev-php/pecl-xrange/metadata.xml @@ -0,0 +1,8 @@ + + + + + php-bugs@gentoo.org + PHP + + diff --git a/dev-php/pecl-xrange/pecl-xrange-1.3.2-r2.ebuild b/dev-php/pecl-xrange/pecl-xrange-1.3.2-r2.ebuild new file mode 100644 index 000000000000..bc6d23e24b29 --- /dev/null +++ b/dev-php/pecl-xrange/pecl-xrange-1.3.2-r2.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PHP_EXT_NAME="xrange" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +USE_PHP="php5-6" + +inherit php-ext-pecl-r3 + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="Implementation of weak references" +LICENSE="PHP-3" +SLOT="0" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}/1.3.2-fixes.patch" ) +PHP_EXT_ECONF_ARGS=() -- cgit v1.2.3