[93218] trunk/dports/php
ryandesign at macports.org
ryandesign at macports.org
Thu May 17 16:07:56 PDT 2012
Revision: 93218
https://trac.macports.org/changeset/93218
Author: ryandesign at macports.org
Date: 2012-05-17 16:07:56 -0700 (Thu, 17 May 2012)
Log Message:
-----------
php-xrange: unified port; use upstream patches to fix build with php 5.3 and 5.4; add modeline
Modified Paths:
--------------
trunk/dports/php/php-xrange/Portfile
Added Paths:
-----------
trunk/dports/php/php-xrange/
trunk/dports/php/php-xrange/files/297236.diff
trunk/dports/php/php-xrange/files/323500.diff
Removed Paths:
-------------
trunk/dports/php/php-xrange/files/patch-xrange.c.diff
Modified: trunk/dports/php/php-xrange/Portfile
===================================================================
--- trunk/dports/php/php5-xrange/Portfile 2012-05-17 03:58:42 UTC (rev 93182)
+++ trunk/dports/php/php-xrange/Portfile 2012-05-17 23:07:56 UTC (rev 93218)
@@ -1,9 +1,11 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
-PortGroup php5extension 1.0
+PortGroup php 1.0
-php5extension.setup xrange 1.3.1 pecl
+php.setup xrange 1.3.1 pecl
+php.branches 5.3 5.4
license PHP
categories php devel
platforms darwin
@@ -20,15 +22,16 @@
sha1 fefd8d125db6b3194008dbfbebe4d198ae98f669 \
rmd160 479938267ead2e2803b66f330b362ee48b69a879
-patchfiles patch-xrange.c.diff
-
-use_parallel_build yes
-
-test.run yes
-
-post-destroot {
- set docdir ${prefix}/share/doc/${name}
- xinstall -d ${destroot}${docdir}
- xinstall -m 644 -W ${worksrcpath} CREDITS \
- ${destroot}${docdir}
+if {${name} != ${subport}} {
+ patchfiles 297236.diff 323500.diff
+
+ use_parallel_build yes
+
+ test.run yes
+
+ post-destroot {
+ set docdir ${prefix}/share/doc/${subport}
+ xinstall -d ${destroot}${docdir}
+ xinstall -m 644 -W ${worksrcpath} CREDITS ${destroot}${docdir}
+ }
}
Added: trunk/dports/php/php-xrange/files/297236.diff
===================================================================
--- trunk/dports/php/php-xrange/files/297236.diff (rev 0)
+++ trunk/dports/php/php-xrange/files/297236.diff 2012-05-17 23:07:56 UTC (rev 93218)
@@ -0,0 +1,39 @@
+http://svn.php.net/viewvc?view=revision&revision=297236
+--- xrange.c 2008/03/31 10:32:56 256537
++++ xrange.c 2010/03/31 20:39:48 297236
+@@ -70,7 +70,7 @@
+
+ /* {{{ XRangeIterator methods */
+ zend_class_entry *php_xrange_xri_entry;
+-static function_entry php_xrange_xri_functions[] = {
++static zend_function_entry php_xrange_xri_functions[] = {
+ PHP_ME(
+ PHP_XRANGE_XRI_NAME, __construct,
+ NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR
+@@ -90,7 +90,7 @@
+
+ /* {{{ OddFilterIterator methods */
+ zend_class_entry *php_xrange_OddFilterIterator_entry;
+-static function_entry php_xrange_OddFilterIterator_functions[] = {
++static zend_function_entry php_xrange_OddFilterIterator_functions[] = {
+ PHP_ME(PHP_XRANGE_ODDFILTERITERATOR_NAME, accept, NULL, ZEND_ACC_PUBLIC)
+ {NULL, NULL, NULL} /* Must be last */
+ };
+@@ -98,7 +98,7 @@
+
+ /* {{{ EvenFilterIterator methods */
+ zend_class_entry *php_xrange_EvenFilterIterator_entry;
+-static function_entry php_xrange_EvenFilterIterator_functions[] = {
++static zend_function_entry php_xrange_EvenFilterIterator_functions[] = {
+ PHP_ME(PHP_XRANGE_EVENFILTERITERATOR_NAME, accept, NULL, ZEND_ACC_PUBLIC)
+ {NULL, NULL, NULL} /* Must be last */
+ };
+@@ -106,7 +106,7 @@
+
+ /* {{{ NumericFilterIterator methods */
+ zend_class_entry *php_xrange_NumericFilterIterator_entry;
+-static function_entry php_xrange_NumericFilterIterator_functions[] = {
++static zend_function_entry php_xrange_NumericFilterIterator_functions[] = {
+ PHP_ME(PHP_XRANGE_NUMERICFILTERITERATOR_NAME, accept, NULL, ZEND_ACC_PUBLIC)
+ {NULL, NULL, NULL} /* Must be last */
+ };
Copied: trunk/dports/php/php-xrange/files/323500.diff (from rev 93182, trunk/dports/php/php5-xrange/files/patch-xrange.c.diff)
===================================================================
--- trunk/dports/php/php-xrange/files/323500.diff (rev 0)
+++ trunk/dports/php/php-xrange/files/323500.diff 2012-05-17 23:07:56 UTC (rev 93218)
@@ -0,0 +1,50 @@
+http://svn.php.net/viewvc?view=revision&revision=323500
+--- xrange.c 2012/02/25 11:48:49 323499
++++ xrange.c 2012/02/25 12:10:07 323500
+@@ -62,7 +62,6 @@
+ /* }}} */
+
+ /* {{{ XRangeIterator seek method argument info */
+-static
+ ZEND_BEGIN_ARG_INFO(arginfo_xrange_xri_seek, 0)
+ ZEND_ARG_INFO(0, position)
+ ZEND_END_ARG_INFO();
+@@ -130,17 +129,23 @@
+ zend_object_value xrange_xri_object_new(zend_class_entry *class_type TSRMLS_DC)
+ {
+ zend_object_value retval;
++#if PHP_VERSION_ID < 50399
+ zval *tmp;
++#endif
+
+ xrange_module_storage *internalStorage =
+ ecalloc(1, sizeof(xrange_module_storage));
+ zend_object_std_init(&internalStorage->obj, class_type TSRMLS_CC);
++#if PHP_VERSION_ID < 50399
+ zend_hash_copy(
+ internalStorage->obj.properties,
+ &php_xrange_xri_entry->default_properties,
+ (copy_ctor_func_t) zval_add_ref,
+ (void *) &tmp, sizeof(zval *)
+ );
++#else
++ object_properties_init(&internalStorage->obj, php_xrange_xri_entry);
++#endif
+
+ retval.handle = zend_objects_store_put(
+ internalStorage,
+@@ -233,12 +238,11 @@
+ }
+
+ /* shove new XRangeIterator into return_value */
+- return_value->type = IS_OBJECT;
++ Z_TYPE_P(return_value) = IS_OBJECT;
+ return_value->value.obj = xrange_xri_object_new(
+ php_xrange_xri_entry TSRMLS_CC
+ );
+- return_value->refcount = 1;
+- return_value->is_ref = 0;
++ Z_ADDREF_P(return_value);
+
+ /* setup call to XRangeIterator's constructor (must do manually) */
+ zval *retval = NULL;
Deleted: trunk/dports/php/php-xrange/files/patch-xrange.c.diff
===================================================================
--- trunk/dports/php/php5-xrange/files/patch-xrange.c.diff 2012-05-17 03:58:42 UTC (rev 93182)
+++ trunk/dports/php/php-xrange/files/patch-xrange.c.diff 2012-05-17 23:07:56 UTC (rev 93218)
@@ -1,23 +0,0 @@
-See http://pecl.php.net/bugs/bug.php?id=16567
-
---- xrange.c.orig 2010-01-11 01:13:54.000000000 +0100
-+++ xrange.c 2010-01-11 01:17:07.000000000 +0100
-@@ -60,7 +60,6 @@
- /* }}} */
-
- /* {{{ XRangeIterator seek method argument info */
--static
- ZEND_BEGIN_ARG_INFO(arginfo_xrange_xri_seek, 0)
- ZEND_ARG_INFO(0, position)
- ZEND_END_ARG_INFO();
-@@ -234,8 +233,8 @@
- return_value->value.obj = xrange_xri_object_new(
- php_xrange_xri_entry TSRMLS_CC
- );
-- return_value->refcount = 1;
-- return_value->is_ref = 0;
-+ Z_SET_REFCOUNT_P(return_value, 1);
-+ Z_UNSET_ISREF_P(return_value);
-
- /* setup call to XRangeIterator's constructor (must do manually) */
- zval methodName, *retval = NULL;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120517/e2ede694/attachment-0001.html>
More information about the macports-changes
mailing list