[105114] trunk/dports/php/php-xslcache
ryandesign at macports.org
ryandesign at macports.org
Wed Apr 10 10:31:30 PDT 2013
Revision: 105114
https://trac.macports.org/changeset/105114
Author: ryandesign at macports.org
Date: 2013-04-10 10:31:29 -0700 (Wed, 10 Apr 2013)
Log Message:
-----------
php-xslcache: add php54 and php55 subports (#38745)
Modified Paths:
--------------
trunk/dports/php/php-xslcache/Portfile
Added Paths:
-----------
trunk/dports/php/php-xslcache/files/
trunk/dports/php/php-xslcache/files/patch-php-5.4.diff
Modified: trunk/dports/php/php-xslcache/Portfile
===================================================================
--- trunk/dports/php/php-xslcache/Portfile 2013-04-10 17:21:59 UTC (rev 105113)
+++ trunk/dports/php/php-xslcache/Portfile 2013-04-10 17:31:29 UTC (rev 105114)
@@ -11,7 +11,7 @@
maintainers ryandesign openmaintainer
license PHP
-php.branches 5.3
+php.branches 5.3 5.4 5.5
php.pecl yes
php.pecl.prerelease yes
@@ -35,6 +35,8 @@
if {${name} != ${subport}} {
depends_lib-append port:libxslt
+ patchfiles patch-php-5.4.diff
+
use_parallel_build yes
post-destroot {
Added: trunk/dports/php/php-xslcache/files/patch-php-5.4.diff
===================================================================
--- trunk/dports/php/php-xslcache/files/patch-php-5.4.diff (rev 0)
+++ trunk/dports/php/php-xslcache/files/patch-php-5.4.diff 2013-04-10 17:31:29 UTC (rev 105114)
@@ -0,0 +1,91 @@
+https://bugs.php.net/bug.php?id=62856
+--- php_xsl.c.orig
++++ php_xsl.c
+@@ -208,7 +208,11 @@ zend_object_value xslcache_objects_new(zend_class_entry *class_type TSRMLS_DC)
+ intern->doc = NULL;
+
+ zend_object_std_init(&intern->std, class_type TSRMLS_CC);
++#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
++#else
++ object_properties_init(&intern->std, class_type);
++#endif
+ ALLOC_HASHTABLE(intern->parameter);
+ zend_hash_init(intern->parameter, 0, NULL, ZVAL_PTR_DTOR, 0);
+ ALLOC_HASHTABLE(intern->registered_phpfunctions);
+--- xsltcache.c.orig
++++ xsltcache.c
+@@ -272,7 +272,11 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
+ node->parent = nsparent;
+ node->ns = curns;
+ }
++#if PHP_VERSION_ID < 50399
+ child = php_dom_create_object(node, &ret, NULL, child, domintern TSRMLS_CC);
++#else
++ child = php_dom_create_object(node, &ret, child, domintern TSRMLS_CC);
++#endif
+ add_next_index_zval(args[i], child);
+ }
+ }
+@@ -427,7 +431,11 @@ static xmlDocPtr php_xslcache_apply_stylesheet(zval *id, xsl_object *intern, xsl
+
+ MAKE_STD_ZVAL(member);
+ ZVAL_STRING(member, "doXInclude", 0);
++#if PHP_VERSION_ID < 50399
+ doXInclude = std_hnd->read_property(id, member, BP_VAR_IS TSRMLS_CC);
++#else
++ doXInclude = std_hnd->read_property(id, member, BP_VAR_IS, NULL TSRMLS_CC);
++#endif
+ if (Z_TYPE_P(doXInclude) != IS_NULL) {
+ convert_to_long(doXInclude);
+ ctxt->xinclude = Z_LVAL_P(doXInclude);
+@@ -484,7 +492,11 @@ PHP_FUNCTION(xsl_xsltcache_transform_to_doc)
+ newdocp = php_xslcache_apply_stylesheet(id, intern, sheetp, docp TSRMLS_CC);
+
+ if (newdocp) {
++#if PHP_VERSION_ID < 50399
+ DOM_RET_OBJ(rv, (xmlNodePtr) newdocp, &ret, NULL);
++#else
++ DOM_RET_OBJ((xmlNodePtr) newdocp, &ret, NULL);
++#endif
+ } else {
+ RETURN_FALSE;
+ }
+@@ -813,8 +825,13 @@ persist_xsl_object *find_cached_stylesheet(const char *path, int pathlen, zend_b
+ // look for cached version
+ int sheet_found = 0;
+
++#if PHP_VERSION_ID < 50399
+ list_entry *existing_le;
+ list_entry le;
++#else
++ zend_rsrc_list_entry *existing_le;
++ zend_rsrc_list_entry le;
++#endif
+ const char *hash_key = path;
+ int hash_key_len = pathlen;
+
+@@ -852,7 +869,11 @@ persist_xsl_object *find_cached_stylesheet(const char *path, int pathlen, zend_b
+
+ le.type = le_stylesheet;
+ le.ptr = obj;
++#if PHP_VERSION_ID < 50399
+ zend_hash_update(&EG(persistent_list), (char *) hash_key, hash_key_len + 1, (void*) &le, sizeof(list_entry), NULL);
++#else
++ zend_hash_update(&EG(persistent_list), (char *) hash_key, hash_key_len + 1, (void*) &le, sizeof(zend_rsrc_list_entry), NULL);
++#endif
+ }
+
+ return obj;
+@@ -889,7 +910,11 @@ PHP_FUNCTION(xsl_xsltcache_import_stylesheet)
+ MAKE_STD_ZVAL(member);
+ ZVAL_STRING(member, "cloneDocument", 0);
+
++#if PHP_VERSION_ID < 50399
+ cloneDocu = std_hnd->read_property(id, member, BP_VAR_IS TSRMLS_CC);
++#else
++ cloneDocu = std_hnd->read_property(id, member, BP_VAR_IS, NULL TSRMLS_CC);
++#endif
+ if (Z_TYPE_P(cloneDocu) != IS_NULL) {
+ convert_to_long(cloneDocu);
+ clone_docu = Z_LVAL_P(cloneDocu);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130410/27530870/attachment.html>
More information about the macports-changes
mailing list