22031313 graphviz should use php 5.6 and stop using 5.3
authorCraig Mohrman <craig.mohrman@oracle.com>
Thu, 15 Oct 2015 19:04:09 -0700
changeset 4949 bd993b5f1799
parent 4948 692859999ccc
child 4950 3ab343f6cc88
22031313 graphviz should use php 5.6 and stop using 5.3
components/graphviz/Makefile
components/graphviz/graphviz-php.p5m
components/graphviz/patches/php.patch
--- a/components/graphviz/Makefile	Thu Oct 15 14:14:39 2015 -0700
+++ b/components/graphviz/Makefile	Thu Oct 15 19:04:09 2015 -0700
@@ -42,7 +42,7 @@
 include $(WS_MAKE_RULES)/configure.mk
 include $(WS_MAKE_RULES)/ips.mk
 
-PATH =		/usr/php/5.3/bin:/usr/bin:/usr/gnu/bin
+PATH =		/usr/php/5.6/bin:/usr/bin:/usr/gnu/bin
 
 # GMP header files for the guile extension (no --with- flag)
 # The guile build is broken with studio (15732452), so we disable this for now.
@@ -67,13 +67,12 @@
 
 COMPONENT_BUILD_ARGS += 	GREP=/usr/bin/ggrep
 
-# Both perl and ruby ship 64-bit only.
+# perl, ruby, php ship 64-bit only.
 $(CONFIGURE_32): CONFIGURE_OPTIONS +=	--enable-perl=no
 $(CONFIGURE_32): CONFIGURE_OPTIONS +=	--enable-ruby=no
+$(CONFIGURE_32): CONFIGURE_OPTIONS +=	--enable-php=no
 $(CONFIGURE_64): CONFIGURE_ENV +=	PERL=$(PERL)
 $(CONFIGURE_64): CONFIGURE_ENV +=	RUBY=$(RUBY.1.9)
-# PHP ships 32-bit only.
-$(CONFIGURE_64): CONFIGURE_OPTIONS +=	--enable-php=no
 $(INSTALL_64): COMPONENT_INSTALL_ARGS += PHP_INSTALL_DIR=$(shell PATH=$(PATH) php-config --extension-dir)
 # tcl ships both 32 and 64 bit, but even though /usr/bin/tclsh is 64-bit, there
 # is no place to stick 64-bit modules, so skip it.  On the other hand, make
@@ -138,7 +137,7 @@
 REQUIRED_PACKAGES += system/library/freetype-2
 REQUIRED_PACKAGES += system/library/math
 REQUIRED_PACKAGES += system/linker
-REQUIRED_PACKAGES += web/php-53
+REQUIRED_PACKAGES += web/php-56
 REQUIRED_PACKAGES += x11/library/libx11
 REQUIRED_PACKAGES += x11/library/libxcursor
 REQUIRED_PACKAGES += x11/library/libxmu
--- a/components/graphviz/graphviz-php.p5m	Thu Oct 15 14:14:39 2015 -0700
+++ b/components/graphviz/graphviz-php.p5m	Thu Oct 15 19:04:09 2015 -0700
@@ -33,15 +33,16 @@
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=org.opensolaris.arc-caseid value=PSARC/2011/269
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
-file gv.ini path=etc/php/5.3/conf.d/gv.ini
-file path=usr/lib/graphviz/php/gv.php
-link path=usr/lib/graphviz/php/gv.so target=libgv_php.so
-file path=usr/lib/graphviz/php/libgv_php.so
-link path=usr/php/5.3/modules/gv.so \
-    target=../../../lib/graphviz/php/libgv_php.so
+file gv.ini path=etc/php/5.6/conf.d/gv.ini
+file path=usr/lib/$(MACH64)/graphviz/php/gv.php
+link path=usr/lib/$(MACH64)/graphviz/php/gv.so target=libgv_php.so
+file path=usr/lib/$(MACH64)/graphviz/php/libgv_php.so
+link path=usr/php/5.6/lib/extensions/no-debug-zts-20131226/gv.so \
+    target=../../../../../lib/$(MACH64)/graphviz/php/libgv_php.so
 file path=usr/share/graphviz/demo/modgraph.php
 file usr/share/man/man3/gv.3php path=usr/share/man/man3/gv-php.3
-link path=var/php/5.3/pear/gv.php target=../../../../usr/lib/graphviz/php/gv.php
+link path=var/php/5.6/pear/gv.php \
+    target=../../../../usr/lib/$(MACH64)/graphviz/php/gv.php
 license COPYING license=EPL1.0
 license graphviz.license.extra license="Other Notices"
-depend type=require fmri=web/php-53
+depend type=require fmri=web/php-56
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/graphviz/patches/php.patch	Thu Oct 15 19:04:09 2015 -0700
@@ -0,0 +1,21 @@
+# graphviz not compiling with php 5.6.
+# Found this patch.  Seems to do the trick for both php 5.3 (32-bit)
+# and 5.6 (64-bit).
+# http://www.linuxquestions.org/questions/slackware-14/graphviz-and-current-948363/
+
+--- graphviz-2.28.0/tclpkg/gv/gv_php_init.c_orig	2015-10-12 11:47:24.351781429 -0700
++++ graphviz-2.28.0/tclpkg/gv/gv_php_init.c	2015-10-12 11:47:53.491500047 -0700
[email protected]@ -19,11 +19,13 @@
+ 
+ static size_t gv_string_writer (GVJ_t *job, const char *s, size_t len)
+ {
++    TSRMLS_FETCH();
+     return PHPWRITE(s, len);
+ }
+ 
+ static size_t gv_channel_writer (GVJ_t *job, const char *s, size_t len)
+ {
++    TSRMLS_FETCH();
+     return PHPWRITE(s, len);
+ }
+