From 60d4d872e12b1cda2ba22226b9e8ab7292323227 Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Thu, 27 Nov 2014 09:41:17 +0000 Subject: Fix build into jails with DTRACE enabled. PR: 190662 Submitted by: Martin Vahi --- lang/php5/Makefile | 3 +++ lang/php5/files/patch-acinclude.m4 | 43 ++++++++++++++++++++++++++++++++----- lang/php5/pkg-plist | 1 + lang/php55/Makefile | 3 +++ lang/php55/files/patch-acinclude.m4 | 43 ++++++++++++++++++++++++++++++++----- lang/php55/pkg-plist | 1 + lang/php56/Makefile | 3 +++ lang/php56/files/patch-acinclude.m4 | 43 ++++++++++++++++++++++++++++++++----- lang/php56/pkg-plist | 1 + 9 files changed, 126 insertions(+), 15 deletions(-) (limited to 'lang') 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< \$[]@ ++ 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< \$[]@ ++ 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<