aboutsummaryrefslogtreecommitdiffstats
path: root/lang/php5
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2014-11-27 17:41:17 +0800
committerale <ale@FreeBSD.org>2014-11-27 17:41:17 +0800
commiteb588e996d5bf94e2570c613fbb6906bc1bffabd (patch)
tree4ed7191bf539ac72fe43decad389b10bccc4eda0 /lang/php5
parent81333ba560376f117e40c3ef1cf558894cd6522f (diff)
downloadfreebsd-ports-gnome-eb588e996d5bf94e2570c613fbb6906bc1bffabd.tar.gz
freebsd-ports-gnome-eb588e996d5bf94e2570c613fbb6906bc1bffabd.tar.zst
freebsd-ports-gnome-eb588e996d5bf94e2570c613fbb6906bc1bffabd.zip
Fix build into jails with DTRACE enabled.
PR: 190662 Submitted by: Martin Vahi <martin.vahi@softf1.com>
Diffstat (limited to 'lang/php5')
-rw-r--r--lang/php5/Makefile3
-rw-r--r--lang/php5/files/patch-acinclude.m443
-rw-r--r--lang/php5/pkg-plist1
3 files changed, 42 insertions, 5 deletions
diff --git a/lang/php5/Makefile b/lang/php5/Makefile
index 9e5f70899cc4..bdc70bdc1d1d 100644
--- a/lang/php5/Makefile
+++ b/lang/php5/Makefile
@@ -163,6 +163,9 @@ CONFIGURE_ARGS+=--enable-debug
IGNORE= cannot be built with DTrace support on FreeBSD < 9.x
.endif
CONFIGURE_ARGS+=--enable-dtrace
+PLIST_SUB+= DTRACE=""
+.else
+PLIST_SUB+= DTRACE="@comment "
.endif
.if empty(PORT_OPTIONS:MIPV6)
diff --git a/lang/php5/files/patch-acinclude.m4 b/lang/php5/files/patch-acinclude.m4
index 324f03a3fc8d..190327d1087e 100644
--- a/lang/php5/files/patch-acinclude.m4
+++ b/lang/php5/files/patch-acinclude.m4
@@ -1,6 +1,6 @@
---- acinclude.m4.orig 2013-12-10 19:32:43.000000000 +0000
-+++ acinclude.m4 2013-12-13 21:55:53.955235854 +0000
-@@ -984,15 +984,9 @@ dnl ------------------------------------
+--- acinclude.m4.orig 2014-11-12 00:29:14.000000000 +0000
++++ acinclude.m4 2014-11-27 09:29:43.821181323 +0000
+@@ -984,15 +984,9 @@
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
dnl ---------------------------------------------- CLI static module
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
@@ -18,7 +18,7 @@
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
fi
PHP_ADD_BUILD_DIR($ext_builddir)
-@@ -1042,12 +1036,6 @@ You either need to build $1 shared or bu
+@@ -1042,12 +1036,6 @@
build to be successful.
])
fi
@@ -31,7 +31,7 @@
dnl Some systems require that we link $2 to $1 when building
])
-@@ -2320,9 +2308,9 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
+@@ -2320,9 +2308,9 @@
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
dnl Fallbacks for different configure options
@@ -43,3 +43,36 @@
PHP_OPENSSL_DIR=$PHP_IMAP_SSL
fi
+@@ -2969,7 +2957,7 @@
+ $abs_srcdir/$ac_provsrc:;
+
+ $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
+- CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
++ CFLAGS="\$(CFLAGS_CLEAN)" dtrace -xnolibs -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
+
+ \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
+
+@@ -2989,12 +2977,12 @@
+ $ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
+ echo "[#] Generated by Makefile for libtool" > \$[]@
+ @test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
+- if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
++ if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -xnolibs -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
+ echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
+ else [\\]
+ echo "pic_object='none'" >> \$[]@ [;\\]
+ fi
+- if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
++ if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -xnolibs -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
+ echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
+ else [\\]
+ echo "non_pic_object='none'" >> \$[]@ [;\\]
+@@ -3006,7 +2994,7 @@
+ *)
+ cat>>Makefile.objects<<EOF
+ $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
+- CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
++ CFLAGS="\$(CFLAGS_CLEAN)" dtrace -xnolibs -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
+
+ EOF
+ ;;
diff --git a/lang/php5/pkg-plist b/lang/php5/pkg-plist
index d959d696dc0f..6b58cd5e9a45 100644
--- a/lang/php5/pkg-plist
+++ b/lang/php5/pkg-plist
@@ -30,6 +30,7 @@ include/php/Zend/zend_config.nw.h
include/php/Zend/zend_config.w32.h
include/php/Zend/zend_constants.h
include/php/Zend/zend_dtrace.h
+%%DTRACE%%include/php/Zend/zend_dtrace_gen.h
include/php/Zend/zend_dynamic_array.h
include/php/Zend/zend_errors.h
include/php/Zend/zend_exceptions.h