Gentoo Archives: gentoo-commits

From: "Brian Evans (grknight)" <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/mapserver/files: 6.1.0-php-5.4.patch
Date: Wed, 04 Feb 2015 19:58:54
Message-Id: 20150204195849.D92AB110ED@oystercatcher.gentoo.org
1 grknight 15/02/04 19:58:49
2
3 Added: 6.1.0-php-5.4.patch
4 Log:
5 Non-maintainer commit: Revbump to provide php5.4 and php5.5 support (only one at a time) using patch from https://github.com/mapserver/mapserver/issues/4309
6
7 (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key D1F781EFF9F4A3B6)
8
9 Revision Changes Path
10 1.1 sci-geosciences/mapserver/files/6.1.0-php-5.4.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/files/6.1.0-php-5.4.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/files/6.1.0-php-5.4.patch?rev=1.1&content-type=text/plain
14
15 Index: 6.1.0-php-5.4.patch
16 ===================================================================
17 diff -aurN mapserver-6.0.1.orig/mapscript/php/image.c mapserver-6.0.1/mapscript/php/image.c
18 --- mapserver-6.0.1.orig/mapscript/php/image.c 2011-04-05 11:15:06.000000000 -0400
19 +++ mapserver-6.0.1/mapscript/php/image.c 2015-02-04 14:29:03.164357015 -0500
20 @@ -303,10 +303,18 @@
21 /* no filename - read stdout */
22
23 /* if there is no output buffer active, set the header */
24 - if (OG(ob_nesting_level)<=0)
25 - {
26 - php_header(TSRMLS_C);
27 - }
28 + //handle changes in PHP 5.4.x
29 + #if PHP_VERSION_ID < 50399
30 + if (OG(ob_nesting_level)<=0)
31 + {
32 + php_header(TSRMLS_C);
33 + }
34 + #else
35 + if (php_output_get_level(TSRMLS_C)<=0)
36 + {
37 + php_header(TSRMLS_C);
38 + }
39 + #endif
40
41
42 if (MS_RENDERER_PLUGIN(php_image->image->format))
43 diff -aurN mapserver-6.0.1.orig/mapscript/php/php_mapscript.c mapserver-6.0.1/mapscript/php/php_mapscript.c
44 --- mapserver-6.0.1.orig/mapscript/php/php_mapscript.c 2011-04-05 23:05:02.000000000 -0400
45 +++ mapserver-6.0.1/mapscript/php/php_mapscript.c 2015-02-04 14:27:52.296567202 -0500
46 @@ -899,7 +899,7 @@
47
48 }
49
50 -function_entry mapscript_functions[] = {
51 +zend_function_entry mapscript_functions[] = {
52 PHP_FE(ms_GetVersion, NULL)
53 PHP_FE(ms_GetVersionInt, NULL)
54 PHP_FE(ms_newLineObj, NULL)
55 diff -aurN mapserver-6.0.1.orig/mapscript/php/php_mapscript_util.c mapserver-6.0.1/mapscript/php/php_mapscript_util.c
56 --- mapserver-6.0.1.orig/mapscript/php/php_mapscript_util.c 2011-04-04 13:50:20.000000000 -0400
57 +++ mapserver-6.0.1/mapscript/php/php_mapscript_util.c 2015-02-04 14:27:27.477341249 -0500
58 @@ -42,7 +42,12 @@
59 zobj->ce = ce;
60 ALLOC_HASHTABLE(zobj->properties);
61 zend_hash_init(zobj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
62 - zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *));
63 + //handle changes in PHP 5.4.x
64 + #if PHP_VERSION_ID < 50399
65 + zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *));
66 + #else
67 + object_properties_init(zobj, ce);
68 + #endif
69 retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC);
70 retval.handlers = &mapscript_std_object_handlers;
71 return retval;
72 @@ -59,7 +64,12 @@
73 zobj->ce = ce;
74 ALLOC_HASHTABLE(zobj->properties);
75 zend_hash_init(zobj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
76 - zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *));
77 + //handle changes in PHP 5.4.x
78 + #if PHP_VERSION_ID < 50399
79 + zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *));
80 + #else
81 + object_properties_init(zobj, ce);
82 + #endif
83 retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC);
84 retval.handlers = object_handlers;
85 return retval;