diff options
Diffstat (limited to 'lang/php73/files')
-rw-r--r-- | lang/php73/files/patch-Makefile.global | 19 | ||||
-rw-r--r-- | lang/php73/files/patch-acinclude.m4 | 68 | ||||
-rw-r--r-- | lang/php73/files/patch-configure.in | 61 | ||||
-rw-r--r-- | lang/php73/files/patch-sapi_apache2handler_config.m4 | 11 | ||||
-rw-r--r-- | lang/php73/files/patch-sapi_fpm_config.m4 | 11 | ||||
-rw-r--r-- | lang/php73/files/php-fpm.in | 69 |
6 files changed, 239 insertions, 0 deletions
diff --git a/lang/php73/files/patch-Makefile.global b/lang/php73/files/patch-Makefile.global new file mode 100644 index 000000000000..dda63ac4508e --- /dev/null +++ b/lang/php73/files/patch-Makefile.global @@ -0,0 +1,19 @@ +--- Makefile.global.orig 2016-08-17 19:50:48 UTC ++++ Makefile.global +@@ -89,14 +89,14 @@ test: all + @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ + INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \ + if test "$$INI_FILE"; then \ +- $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ ++ $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini || :; \ + else \ + echo > $(top_builddir)/tmp-php.ini; \ + fi; \ + INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \ + if test "$$INI_SCANNED_PATH"; then \ + INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \ +- $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \ ++ $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini || :; \ + fi; \ + TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ + TEST_PHP_SRCDIR=$(top_srcdir) \ diff --git a/lang/php73/files/patch-acinclude.m4 b/lang/php73/files/patch-acinclude.m4 new file mode 100644 index 000000000000..ffa61dd99264 --- /dev/null +++ b/lang/php73/files/patch-acinclude.m4 @@ -0,0 +1,68 @@ +--- acinclude.m4.orig 2018-08-14 11:39:24 UTC ++++ acinclude.m4 +@@ -971,15 +971,9 @@ dnl ------------------------------------ + if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then + dnl ---------------------------------------------- CLI static module + [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no +- case "$PHP_SAPI" in +- cgi|embed[)] +- PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,) +- EXT_STATIC="$EXT_STATIC $1;$ext_dir" +- ;; +- *[)] +- PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,cli) +- ;; +- esac ++ ++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi) ++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,fpm) + EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir" + fi + PHP_ADD_BUILD_DIR($ext_builddir) +@@ -1029,12 +1023,6 @@ You either need to build $1 shared or bu + build to be successful. + ]) + fi +- if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then +- AC_MSG_ERROR([ +-You've configured extension $1, which depends on extension $2, +-but you've either not enabled $2, or have disabled it. +-]) +- fi + dnl Some systems require that we link $2 to $1 when building + ]) + +@@ -2934,8 +2922,7 @@ dnl in GNU Make which causes the .d file + $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 + + EOF +@@ -2954,12 +2941,12 @@ dnl Always attempt to create both PIC an + $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'" >> \$[]@ [;\\] +@@ -2971,7 +2958,7 @@ EOF + *) + 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/php73/files/patch-configure.in b/lang/php73/files/patch-configure.in new file mode 100644 index 000000000000..539cfd1d4997 --- /dev/null +++ b/lang/php73/files/patch-configure.in @@ -0,0 +1,61 @@ +--- configure.ac.orig 2018-01-02 22:35:55 UTC ++++ configure.ac +@@ -102,6 +102,7 @@ int zend_sprintf(char *buffer, const char *format, ... + + #undef PTHREADS + ++#include <ext/php_config.h> + #endif /* PHP_CONFIG_H */ + ]) + +@@ -339,7 +340,6 @@ sinclude(TSRM/tsrm.m4) + dnl . + dnl ------------------------------------------------------------------------- + +-PTHREADS_CHECK + PHP_HELP_SEPARATOR([SAPI modules:]) + PHP_SHLIB_SUFFIX_NAMES + PHP_BUILD_PROGRAM +@@ -370,15 +370,9 @@ else + AC_MSG_RESULT([none]) + fi + +-dnl Exit early +-if test -z "$PHP_INSTALLED_SAPIS"; then +- AC_MSG_ERROR([Nothing to build.]) +-fi +- + dnl force ZTS + if test "$enable_maintainer_zts" = "yes"; then + PTHREADS_ASSIGN_VARS +- PTHREADS_FLAGS + fi + + dnl Starting system checks. +@@ -682,7 +676,7 @@ nanosleep \ + ) + + dnl Some systems (like OpenSolaris) do not have nanosleep in libc +-PHP_CHECK_FUNC_LIB(nanosleep, rt) ++PHP_CHECK_FUNC(nanosleep, rt) + + dnl Check for getaddrinfo, should be a better way, but... + dnl Also check for working getaddrinfo +@@ -1235,7 +1229,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfdir` + EXPANDED_DATADIR=$datadir + EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"` + EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"` +-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR ++INCLUDE_PATH=.:${prefix}/share/pear + + exec_prefix=$old_exec_prefix + libdir=$old_libdir +@@ -1434,7 +1428,7 @@ PHP_SUBST(all_targets) + PHP_SUBST(install_targets) + PHP_SUBST(install_binary_targets) + +-PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/]) ++PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/]) + + PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + diff --git a/lang/php73/files/patch-sapi_apache2handler_config.m4 b/lang/php73/files/patch-sapi_apache2handler_config.m4 new file mode 100644 index 000000000000..5b0cfb9d4591 --- /dev/null +++ b/lang/php73/files/patch-sapi_apache2handler_config.m4 @@ -0,0 +1,11 @@ +--- sapi/apache2handler/config.m4.orig 2018-08-14 11:39:14 UTC ++++ sapi/apache2handler/config.m4 +@@ -65,7 +65,7 @@ if test "$PHP_APXS2" != "no"; then + fi + + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` +- if test -z `$APXS -q SYSCONFDIR`; then ++ if true; then + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -i -n php7" diff --git a/lang/php73/files/patch-sapi_fpm_config.m4 b/lang/php73/files/patch-sapi_fpm_config.m4 new file mode 100644 index 000000000000..e88c204384ae --- /dev/null +++ b/lang/php73/files/patch-sapi_fpm_config.m4 @@ -0,0 +1,11 @@ +--- sapi/fpm/config.m4.orig 2018-08-14 11:39:14 UTC ++++ sapi/fpm/config.m4 +@@ -319,7 +319,7 @@ AC_DEFUN([AC_FPM_LQ], + AC_MSG_RESULT([no]) + ]) + +- if test "$have_lq" = "tcp_info"; then ++ if test "$have_lq" = "so_listenq"; then + AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?]) + fi + diff --git a/lang/php73/files/php-fpm.in b/lang/php73/files/php-fpm.in new file mode 100644 index 000000000000..1c9d7f5c81ba --- /dev/null +++ b/lang/php73/files/php-fpm.in @@ -0,0 +1,69 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: php-fpm +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable php-fpm: +# php_fpm_enable="YES" +# + +. /etc/rc.subr + +name="php_fpm" +rcvar=php_fpm_enable + +start_precmd="php_fpm_prestart" +restart_precmd="php_fpm_checkconfig" +reload_precmd="php_fpm_checkconfig" +configtest_cmd="php_fpm_checkconfig" + +load_rc_config "$name" + +: ${php_fpm_enable="NO"} +: ${php_fpm_umask=""} + +extra_commands="reload configtest logrotate" + +command="%%PREFIX%%/sbin/php-fpm" +pidfile="/var/run/php-fpm.pid" +sig_stop="QUIT" +sig_reload="USR2" +logrotate_cmd="php_fpm_logrotate" + +required_files="%%PREFIX%%/etc/php-fpm.conf" + +php_fpm_logrotate() { + if [ -z "$rc_pid" ]; then + _run_rc_notrunning + return 1 + fi + echo "Rotating logs $name." + kill -USR1 $rc_pid +} + +php_fpm_checkconfig() +{ + echo "Performing sanity check on php-fpm configuration:" + eval ${command} -t +} + +php_fpm_prestart() +{ + php_fpm_checkconfig + checkconfig=$? + if [ $checkconfig -ne 0 ]; then + return $checkconfig + fi + + if [ ! -z "$php_fpm_umask" ]; then + echo "Setting umask to: ${php_fpm_umask}" + umask $php_fpm_umask + fi +} + +run_rc_command "$1" |