Date: Sat, 5 Apr 2014 23:50:44 +0600 (BDT) From: Muhammad Moinur Rahman <5u623l20@gmail.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/188295: [PATCH] lang/pecl-perl: Update to 1.0.1, take maintainership Message-ID: <201404051750.s35Hoigw039468@bofh.1asiacom.net> Resent-Message-ID: <201404051800.s35I00EM086727@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 188295 >Category: ports >Synopsis: [PATCH] lang/pecl-perl: Update to 1.0.1, take maintainership >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 05 18:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Muhammad Moinur Rahman >Release: FreeBSD 11.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD bofh.1asiacom.net 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r263870: Fri Mar 28 16:37:49 BDT >Description: - Update to 1.0.1 - Take maintainership For Committer's reference: http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/84i386-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/84amd64-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/92i386-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/92amd64-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/100i386-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/100amd64-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/110i386-default.log http://pdr.s.ubze.ro/bulk/latest-per-pkg/pecl-perl/1.0.1/110amd64-default.log Generated with FreeBSD Port Tools 1.00.2014.03.23 (mode: change, diff: ports) >How-To-Repeat: >Fix: --- pecl-perl-1.0.1.patch begins here --- diff -ruN /usr/ports//lang/pecl-perl/Makefile ./Makefile --- /usr/ports//lang/pecl-perl/Makefile 2014-01-23 22:00:14.000000000 +0600 +++ ./Makefile 2014-04-05 15:34:32.494955251 +0600 @@ -2,21 +2,22 @@ # $FreeBSD: head/lang/pecl-perl/Makefile 340835 2014-01-23 16:00:14Z miwi $ PORTNAME= perl -DISTVERSION= 1.0.0 +DISTVERSION= 1.0.1 CATEGORIES= lang perl5 MASTER_SITES= http://pecl.php.net/get/ PKGNAMEPREFIX= pecl- EXTRACT_SUFX= .tgz DIST_SUBDIR= PECL -MAINTAINER= ports@FreeBSD.org +MAINTAINER= 5u623l20@gmail.com COMMENT= Embedded Perl +LICENSE= PHP301 + USE_PHP= yes USE_PHPIZE= yes USE_PHPEXT= yes USE_PHP_BUILD= yes -DEFAULT_PHP_VER=53 USES= perl5 diff -ruN /usr/ports//lang/pecl-perl/distinfo ./distinfo --- /usr/ports//lang/pecl-perl/distinfo 2014-01-22 21:30:13.000000000 +0600 +++ ./distinfo 2014-04-05 14:48:52.787142672 +0600 @@ -1,2 +1,2 @@ -SHA256 (PECL/perl-1.0.0.tgz) = 029f5ba8894ca824762df59473d8ccc5b1652551630e5d2a71d9b2aad30bee31 -SIZE (PECL/perl-1.0.0.tgz) = 24358 +SHA256 (PECL/perl-1.0.1.tgz) = d21e02dc71f910061e83f3d166013da9fa673bc1d4c398b35a3701e11ab178ae +SIZE (PECL/perl-1.0.1.tgz) = 25282 diff -ruN /usr/ports//lang/pecl-perl/files/patch-php_perl.c ./files/patch-php_perl.c --- /usr/ports//lang/pecl-perl/files/patch-php_perl.c 2014-01-22 23:40:44.000000000 +0600 +++ ./files/patch-php_perl.c 2014-04-05 15:33:13.634959690 +0600 @@ -1,133 +1,224 @@ ---- ./php_perl.c.orig 2010-04-12 19:11:06.000000000 -0400 -+++ ./php_perl.c 2010-04-12 19:16:41.000000000 -0400 -@@ -340,14 +340,14 @@ - { - SV* sv; - -- if ((zv->is_ref || Z_TYPE_P(zv) == IS_OBJECT || Z_TYPE_P(zv) == IS_ARRAY) && -+ if ((Z_ISREF_P(zv) || Z_TYPE_P(zv) == IS_OBJECT || Z_TYPE_P(zv) == IS_ARRAY) && - zend_hash_find(var_hash, (char*)zv, sizeof(zv), (void**)&sv) == SUCCESS) { - sv = *(SV**)sv; - SvREFCNT_inc(sv); - return sv; - } - sv = php_perl_zval_to_sv_noref(my_perl, zv, var_hash TSRMLS_CC); -- if (zv->is_ref || Z_TYPE_P(zv) == IS_OBJECT || Z_TYPE_P(zv) == IS_ARRAY) { -+ if (Z_ISREF_P(zv) || Z_TYPE_P(zv) == IS_OBJECT || Z_TYPE_P(zv) == IS_ARRAY) { - zend_hash_add(var_hash, (char*)zv, sizeof(zv), &sv, sizeof(SV*), NULL); - } - return sv; -@@ -390,7 +390,7 @@ - SV* sv = (SV*)newRV((SV*)hv); - zval** zv_ptr; - -- if (zv->is_ref || Z_TYPE_P(zv) == IS_ARRAY) { -+ if (Z_ISREF_P(zv) || Z_TYPE_P(zv) == IS_ARRAY) { - zend_hash_add(var_hash, (char*)zv, sizeof(zv), &sv, sizeof(SV*), NULL); - } - -@@ -420,7 +420,7 @@ - SV* sv = (SV*)newRV((SV*)av); - zval** zv_ptr; - -- if (zv->is_ref || Z_TYPE_P(zv) == IS_ARRAY) { -+ if (Z_ISREF_P(zv) || Z_TYPE_P(zv) == IS_ARRAY) { - zend_hash_add(var_hash, (char*)zv, sizeof(zv), &sv, sizeof(SV*), NULL); - } +--- php_perl.c.orig 2014-04-05 15:09:01.511060907 +0600 ++++ php_perl.c 2014-04-05 15:09:10.944074001 +0600 +@@ -152,24 +152,33 @@ + + /* Handlers for Perl objects overloading */ + static zend_object_value php_perl_clone(zval *object TSRMLS_DC); ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static zval* php_perl_read_property(zval *object, zval *member, int type, const struct _zend_literal *key TSRMLS_DC); ++static void php_perl_write_property(zval *object, zval *member, zval *value, const struct _zend_literal *key TSRMLS_DC); ++static int php_perl_has_property(zval *object, zval *member, int check_empty, const struct _zend_literal *key TSRMLS_DC); ++static void php_perl_unset_property(zval *object, zval *member, const struct _zend_literal *key TSRMLS_DC); ++#else + static zval* php_perl_read_property(zval *object, zval *member, int type TSRMLS_DC); + static void php_perl_write_property(zval *object, zval *member, zval *value TSRMLS_DC); +-static zval* php_perl_read_dimension(zval *object, zval *offset, int type TSRMLS_DC); +-static void php_perl_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC); + static int php_perl_has_property(zval *object, zval *member, int check_empty TSRMLS_DC); + static void php_perl_unset_property(zval *object, zval *member TSRMLS_DC); ++#endif ++static zval* php_perl_read_dimension(zval *object, zval *offset, int type TSRMLS_DC); ++static void php_perl_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC); + static int php_perl_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC); + static void php_perl_unset_dimension(zval *object, zval *offset TSRMLS_DC); + static HashTable* php_perl_get_properties(zval *object TSRMLS_DC); +-#if (ZEND_EXTENSION_API_NO >= 220041030) ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static zend_function *php_perl_get_method(zval **object_ptr, char *method, int method_len, const struct _zend_literal *key TSRMLS_DC); ++#elif (ZEND_EXTENSION_API_NO >= 220041030) + static zend_function *php_perl_get_method(zval **object_ptr, char *method, int method_len TSRMLS_DC); + #else + static zend_function *php_perl_get_method(zval *object, char *method, int method_len TSRMLS_DC); + #endif +-static int php_perl_call_function_handler(char *method, INTERNAL_FUNCTION_PARAMETERS); ++static int php_perl_call_function_handler(const char *method, INTERNAL_FUNCTION_PARAMETERS); + static zend_function *php_perl_get_constructor(zval *object TSRMLS_DC); + static zend_class_entry* php_perl_get_class_entry(const zval *object TSRMLS_DC); +-static int php_perl_get_class_name(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC); ++static int php_perl_get_class_name(const zval *object, const char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC); + static zval* php_perl_get(zval *object TSRMLS_DC); + static void php_perl_set(zval **object, zval *value TSRMLS_DC); + +@@ -241,9 +250,14 @@ + 2, + 0, + NULL, +- 0, +- 0, ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++ php_perl_constructor_handler, ++ NULL ++#else ++ 0, /* pass_rest_by_reference */ ++ 0, /* return_reference */ + php_perl_constructor_handler ++#endif + }; -@@ -480,9 +480,9 @@ - FREE_ZVAL(zv); - } - if (Z_TYPE_PP(z) != IS_OBJECT) { -- (*z)->is_ref = 1; -+ Z_SET_ISREF_P((*z)); + static SV* PerlIOPHP_getarg(pTHX_ PerlIO *f, CLONE_PARAMS *param, int flags) +@@ -866,7 +880,11 @@ + } } -- (*z)->refcount++; -+ Z_ADDREF_P((*z)); - return *z; + } else if (SvTYPE(sv) == SVt_PVHV) { ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++ retval = php_perl_read_property(object, offset, type, NULL TSRMLS_CC); ++#else + retval = php_perl_read_property(object, offset, type TSRMLS_CC); ++#endif + } else { + zend_error(E_WARNING, "[perl] Object is not an array"); } +@@ -898,7 +916,11 @@ -@@ -750,7 +750,7 @@ + av_store(av, Z_LVAL_P(offset), php_perl_zval_to_sv(my_perl, value TSRMLS_CC)); + } else if (SvTYPE(sv) == SVt_PVHV) { ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++ php_perl_write_property(object, offset, value, NULL TSRMLS_CC); ++#else + php_perl_write_property(object, offset, value TSRMLS_CC); ++#endif + } else { + zend_error(E_WARNING, "[perl] Object is not an array"); } - retval = php_perl_sv_to_zval(my_perl, obj->sv, NULL TSRMLS_CC); - /* ensure we're creating a temporary variable */ -- if (retval) {retval->refcount = 0;} -+ if (retval) {Z_SET_REFCOUNT_P(retval, 0);} - return retval; - } - -@@ -824,8 +824,8 @@ - obj->context = PERL_SCALAR; - - ALLOC_INIT_ZVAL(retval); -- retval->refcount = 0; -- retval->is_ref = 1; -+ Z_SET_REFCOUNT_P(retval, 0); -+ Z_SET_ISREF_P(retval); - retval->type = IS_OBJECT; - Z_OBJ_HT_P(retval) = &php_perl_proxy_handlers; - Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(obj, php_perl_destructor, NULL, NULL TSRMLS_CC); -@@ -833,7 +833,7 @@ - ALLOC_INIT_ZVAL(retval); - retval = php_perl_sv_to_zval(my_perl, *prop_val, retval TSRMLS_CC); - /* ensure we're creating a temporary variable */ -- if (retval) {retval->refcount = 0;} -+ if (retval) {Z_SET_REFCOUNT_P(retval, 0);} +@@ -941,7 +963,11 @@ } } } else if (SvTYPE(sv) == SVt_PVHV) { -@@ -973,7 +973,7 @@ - new_obj->properties = NULL; ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++ ret = php_perl_has_property(object, offset, check_empty, NULL TSRMLS_CC); ++#else + ret = php_perl_has_property(object, offset, check_empty TSRMLS_CC); ++#endif + } else { + zend_error(E_WARNING, "[perl] Object is not an array"); + } +@@ -968,14 +994,22 @@ - ALLOC_INIT_ZVAL(new_object); -- new_object->refcount = 0; -+ Z_SET_REFCOUNT_P(new_object, 0); - new_object->type = IS_OBJECT; - new_object->value.obj.handlers = &php_perl_object_handlers; - new_object->value.obj.handle = -@@ -990,7 +990,7 @@ - new_obj->properties = NULL; - - ALLOC_INIT_ZVAL(new_object); -- new_object->refcount = 0; -+ Z_SET_REFCOUNT_P(new_object, 0); - new_object->type = IS_OBJECT; - new_object->value.obj.handlers = &php_perl_object_handlers; - new_object->value.obj.handle = -@@ -1007,7 +1007,7 @@ - new_obj->properties = NULL; - - ALLOC_INIT_ZVAL(new_object); -- new_object->refcount = 0; -+ Z_SET_REFCOUNT_P(new_object, 0); - new_object->type = IS_OBJECT; - new_object->value.obj.handlers = &php_perl_object_handlers; - new_object->value.obj.handle = -@@ -1085,15 +1085,15 @@ - obj->context = PERL_SCALAR; - - ALLOC_INIT_ZVAL(retval); -- retval->refcount = 0; -- retval->is_ref = 1; -+ Z_SET_REFCOUNT_P(retval, 0); -+ Z_SET_ISREF_P(retval); - retval->type = IS_OBJECT; - Z_OBJ_HT_P(retval) = &php_perl_proxy_handlers; - Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(obj, php_perl_destructor, NULL, NULL TSRMLS_CC); - } else { - retval = php_perl_sv_to_zval(my_perl, sv, retval TSRMLS_CC); - /* ensure we're creating a temporary variable */ -- if (retval) {retval->refcount = 0;} -+ if (retval) {Z_SET_REFCOUNT_P(retval, 0);} - } + av_delete(av, Z_LVAL_P(offset), G_DISCARD); + } else if (SvTYPE(sv) == SVt_PVHV) { ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++ php_perl_unset_property(object, offset, NULL TSRMLS_CC); ++#else + php_perl_unset_property(object, offset TSRMLS_CC); ++#endif + } else { + zend_error(E_WARNING, "[perl] Object is not an array"); } + } -@@ -1755,7 +1755,7 @@ - zend_object_iterator *php_perl_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) + /* Returns propery of hash based Perl's object */ ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static zval* php_perl_read_property(zval *object, zval *member, int type, const struct _zend_literal *key TSRMLS_DC) ++#else + static zval* php_perl_read_property(zval *object, zval *member, int type TSRMLS_DC) ++#endif { - zend_object_iterator *iterator = emalloc(sizeof(zend_object_iterator)); -- object->refcount++; -+ Z_ADDREF_P(object); - iterator->data = (void*)object; - iterator->funcs = &php_perl_iterator_funcs; + PerlInterpreter* my_perl = php_perl_init(TSRMLS_C); + zval *retval = NULL; +@@ -1137,7 +1171,11 @@ + } + /* Sets propery of hash based Perl's object */ +-static void php_perl_write_property(zval *object, zval *member, zval *value TSRMLS_DC) ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static void php_perl_write_property(zval *object, zval *member, zval *value, const struct _zend_literal *key TSRMLS_DC) ++#else ++static void php_perl_write_property(zval *object, zval *member, zval *valueTSRMLS_DC) ++#endif + { + PerlInterpreter* my_perl = php_perl_init(TSRMLS_C); + php_perl_object *obj = (php_perl_object*)zend_object_store_get_object(object TSRMLS_CC); +@@ -1229,7 +1267,11 @@ + } + + /* Checks if propery of hash based Perl's object isset or empty */ ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static int php_perl_has_property(zval *object, zval *member, int check_empty, const struct _zend_literal *key TSRMLS_DC) ++#else + static int php_perl_has_property(zval *object, zval *member, int check_empty TSRMLS_DC) ++#endif + { + int ret = 0; + PerlInterpreter* my_perl = php_perl_init(TSRMLS_C); +@@ -1301,7 +1343,11 @@ + } + + /* Deletes propery of hash based Perl's object */ ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static void php_perl_unset_property(zval *object, zval *member, const struct _zend_literal *key TSRMLS_DC) ++#else + static void php_perl_unset_property(zval *object, zval *member TSRMLS_DC) ++#endif + { + PerlInterpreter* my_perl = php_perl_init(TSRMLS_C); + php_perl_object *obj = (php_perl_object*)zend_object_store_get_object(object TSRMLS_CC); +@@ -1400,7 +1446,9 @@ + } + + /* get_method handler for overloaded Perl objects */ +-#if (ZEND_EXTENSION_API_NO >= 220041030) ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++static zend_function *php_perl_get_method(zval **object_ptr, char *method, int method_len, const struct _zend_literal *key TSRMLS_DC) ++#elif (ZEND_EXTENSION_API_NO >= 220041030) + static zend_function *php_perl_get_method(zval **object_ptr, char *method, int method_len TSRMLS_DC) + #else + static zend_function *php_perl_get_method(zval *object, char *method, int method_len TSRMLS_DC) +@@ -1414,7 +1462,9 @@ + #endif + + if (obj->sv == NULL) { +-#if (ZEND_EXTENSION_API_NO >= 220041030) ++#if (ZEND_EXTENSION_API_NO >= 220100525) ++ zend_function *f = zend_get_std_object_handlers()->get_method(object_ptr, method, method_len, NULL TSRMLS_CC); ++#elif (ZEND_EXTENSION_API_NO >= 220041030) + zend_function *f = zend_get_std_object_handlers()->get_method(object_ptr, method, method_len TSRMLS_CC); + #else + zend_function *f = zend_get_std_object_handlers()->get_method(object, method, method_len TSRMLS_CC); +@@ -1434,7 +1484,7 @@ + } + + /* Calls method of overloaded Perl's object */ +-static int php_perl_call_function_handler(char *method, INTERNAL_FUNCTION_PARAMETERS) ++static int php_perl_call_function_handler(const char *method, INTERNAL_FUNCTION_PARAMETERS) + { + PerlInterpreter* my_perl = php_perl_init(TSRMLS_C); + zval *object = this_ptr; +@@ -1493,13 +1543,13 @@ + // (memcmp(Z_STRVAL(zv), str, sizeof(str)-1) == 0)) + if (active_opline->opcode == ZEND_DO_FCALL && + active_opline->extended_value == 1 && +- active_opline->op1.op_type == IS_CONST && +- active_opline->op1.u.constant.type == IS_STRING && +- (ZSTRCMP(active_opline->op1.u.constant, "each") || +- ZSTRCMP(active_opline->op1.u.constant, "next") || +- ZSTRCMP(active_opline->op1.u.constant, "prev") || +- ZSTRCMP(active_opline->op1.u.constant, "key") || +- ZSTRCMP(active_opline->op1.u.constant, "current"))) { ++ active_opline->op1_type == IS_CONST && ++ active_opline->op1.constant && ++ (ZSTRCMP(active_opline->op1.literal[active_opline->op1.constant].constant, "each") || ++ ZSTRCMP(active_opline->op1.literal[active_opline->op1.constant].constant, "next") || ++ ZSTRCMP(active_opline->op1.literal[active_opline->op1.constant].constant, "prev") || ++ ZSTRCMP(active_opline->op1.literal[active_opline->op1.constant].constant, "key") || ++ ZSTRCMP(active_opline->op1.literal[active_opline->op1.constant].constant, "current"))) { + return ht; + } + } +@@ -1547,7 +1597,7 @@ + } + + /* Returns class name of overloaded Perl's object */ +-static int php_perl_get_class_name(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) ++static int php_perl_get_class_name(const zval *object, const char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) + { + php_perl_object *obj = (php_perl_object*)zend_object_store_get_object(object TSRMLS_CC); + SV* sv = obj->sv; +@@ -1839,7 +1889,7 @@ + php_info_print_table_start(); + php_info_print_table_header(2, "Perl support", "enabled"); + php_info_print_table_row(2, "Extension version", PHP_PERL_VERSION); +- php_info_print_table_row(2, "Revision", "$Revision: 289243 $"); ++ php_info_print_table_row(2, "Revision", "$Revision$"); + php_info_print_table_row(2, "Perl version", Perl_form(aTHX_ "%vd",PL_patchlevel)); + php_info_print_table_end(); + } --- pecl-perl-1.0.1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404051750.s35Hoigw039468>