summaryrefslogtreecommitdiff
path: root/lang/php80/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/php80/files')
-rw-r--r--lang/php80/files/patch-build_Makefile.global19
-rw-r--r--lang/php80/files/patch-configure.ac45
-rw-r--r--lang/php80/files/patch-ext_mysqli_mysqli__api.c12
-rw-r--r--lang/php80/files/patch-ext_mysqli_mysqli__nonapi.c12
-rw-r--r--lang/php80/files/patch-ext_mysqli_mysqli__prop.c12
-rw-r--r--lang/php80/files/patch-ext_mysqli_php__mysqli__structs.h11
-rw-r--r--lang/php80/files/patch-sapi_apache2handler_config.m411
-rw-r--r--lang/php80/files/patch-sapi_fpm_config.m411
-rw-r--r--lang/php80/files/patch-sapi_fpm_www.conf.in17
-rw-r--r--lang/php80/files/php-fpm.in69
10 files changed, 219 insertions, 0 deletions
diff --git a/lang/php80/files/patch-build_Makefile.global b/lang/php80/files/patch-build_Makefile.global
new file mode 100644
index 000000000000..4b838d157941
--- /dev/null
+++ b/lang/php80/files/patch-build_Makefile.global
@@ -0,0 +1,19 @@
+--- build/Makefile.global.orig 2019-08-06 06:54:07 UTC
++++ build/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/php80/files/patch-configure.ac b/lang/php80/files/patch-configure.ac
new file mode 100644
index 000000000000..77f7449ad90f
--- /dev/null
+++ b/lang/php80/files/patch-configure.ac
@@ -0,0 +1,45 @@
+--- configure.ac.orig 2020-09-29 22:36:51 UTC
++++ configure.ac
+@@ -55,6 +55,7 @@ AH_BOTTOM([
+
+ #include <string.h>
+
++#include <ext/php_config.h>
+ #endif /* PHP_CONFIG_H */
+ ])
+
+@@ -262,7 +263,6 @@ sinclude(Zend/Zend.m4)
+
+ dnl ----------------------------------------------------------------------------
+
+-PTHREADS_CHECK
+ PHP_HELP_SEPARATOR([SAPI modules:])
+ PHP_SHLIB_SUFFIX_NAMES
+ PHP_BUILD_PROGRAM
+@@ -602,7 +602,7 @@ memmem \
+ AX_FUNC_WHICH_GETHOSTBYNAME_R
+
+ dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
+-PHP_CHECK_FUNC_LIB(nanosleep, rt)
++PHP_CHECK_FUNC(nanosleep, rt)
+
+ dnl Haiku does not have network api in libc.
+ PHP_CHECK_FUNC_LIB(setsockopt, network)
+@@ -1244,7 +1244,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfd
+ 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
+@@ -1431,7 +1431,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, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+
diff --git a/lang/php80/files/patch-ext_mysqli_mysqli__api.c b/lang/php80/files/patch-ext_mysqli_mysqli__api.c
new file mode 100644
index 000000000000..535503954e3d
--- /dev/null
+++ b/lang/php80/files/patch-ext_mysqli_mysqli__api.c
@@ -0,0 +1,12 @@
+--- ext/mysqli/mysqli_api.c.orig 2020-09-29 22:36:51 UTC
++++ ext/mysqli/mysqli_api.c
+@@ -29,7 +29,9 @@
+ #include "zend_smart_str.h"
+ #include "php_mysqli_structs.h"
+ #include "mysqli_priv.h"
++#if defined(MYSQLI_USE_MYSQLND)
+ #include "ext/mysqlnd/mysql_float_to_double.h"
++#endif
+
+ #define ERROR_ARG_POS(arg_num) (getThis() ? (arg_num-1) : (arg_num))
+
diff --git a/lang/php80/files/patch-ext_mysqli_mysqli__nonapi.c b/lang/php80/files/patch-ext_mysqli_mysqli__nonapi.c
new file mode 100644
index 000000000000..9baa04218bf9
--- /dev/null
+++ b/lang/php80/files/patch-ext_mysqli_mysqli__nonapi.c
@@ -0,0 +1,12 @@
+--- ext/mysqli/mysqli_nonapi.c.orig 2020-01-09 11:40:57 UTC
++++ ext/mysqli/mysqli_nonapi.c
+@@ -28,7 +28,9 @@
+ #include "php_ini.h"
+ #include "ext/standard/info.h"
+ #include "zend_smart_str.h"
++#if defined(MYSQLI_USE_MYSQLND)
+ #include "php_mysqli_structs.h"
++#endif
+ #include "mysqli_priv.h"
+
+ #define SAFE_STR(a) ((a)?a:"")
diff --git a/lang/php80/files/patch-ext_mysqli_mysqli__prop.c b/lang/php80/files/patch-ext_mysqli_mysqli__prop.c
new file mode 100644
index 000000000000..37d47a304440
--- /dev/null
+++ b/lang/php80/files/patch-ext_mysqli_mysqli__prop.c
@@ -0,0 +1,12 @@
+--- ext/mysqli/mysqli_prop.c.orig 2020-01-09 11:40:11 UTC
++++ ext/mysqli/mysqli_prop.c
+@@ -26,7 +26,9 @@
+ #include "php.h"
+ #include "php_ini.h"
+ #include "ext/standard/info.h"
++#if defined(MYSQLI_USE_MYSQLND)
+ #include "php_mysqli_structs.h"
++#endif
+ #include "mysqli_priv.h"
+
+ #define CHECK_STATUS(value) \
diff --git a/lang/php80/files/patch-ext_mysqli_php__mysqli__structs.h b/lang/php80/files/patch-ext_mysqli_php__mysqli__structs.h
new file mode 100644
index 000000000000..f0e33efd03aa
--- /dev/null
+++ b/lang/php80/files/patch-ext_mysqli_php__mysqli__structs.h
@@ -0,0 +1,11 @@
+--- ext/mysqli/php_mysqli_structs.h.orig 2019-12-17 10:29:23 UTC
++++ ext/mysqli/php_mysqli_structs.h
+@@ -36,7 +36,7 @@
+ #define FALSE 0
+ #endif
+
+-#ifdef MYSQLI_USE_MYSQLND
++#if defined(MYSQLI_USE_MYSQLND)
+ #include "ext/mysqlnd/mysqlnd.h"
+ #include "mysqli_mysqlnd.h"
+ #else
diff --git a/lang/php80/files/patch-sapi_apache2handler_config.m4 b/lang/php80/files/patch-sapi_apache2handler_config.m4
new file mode 100644
index 000000000000..5b0cfb9d4591
--- /dev/null
+++ b/lang/php80/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/php80/files/patch-sapi_fpm_config.m4 b/lang/php80/files/patch-sapi_fpm_config.m4
new file mode 100644
index 000000000000..e88c204384ae
--- /dev/null
+++ b/lang/php80/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/php80/files/patch-sapi_fpm_www.conf.in b/lang/php80/files/patch-sapi_fpm_www.conf.in
new file mode 100644
index 000000000000..c7e7fe399854
--- /dev/null
+++ b/lang/php80/files/patch-sapi_fpm_www.conf.in
@@ -0,0 +1,17 @@
+--- sapi/fpm/www.conf.in.orig 2019-01-26 15:54:27 UTC
++++ sapi/fpm/www.conf.in
+@@ -27,10 +27,14 @@ group = @php_fpm_group@
+ ; Valid syntaxes are:
+ ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
+ ; a specific port;
++; '0.0.0.0:port' - to listen on a TCP socket to all IPv4 addresses on
++; a specific port;
+ ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+ ; a specific port;
+ ; 'port' - to listen on a TCP socket to all addresses
+ ; (IPv6 and IPv4-mapped) on a specific port;
++; Note: IPv4-mapped addresses are disabled by-default in
++; FreeBSD for security reasons;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+ ; Note: This value is mandatory.
+ listen = 127.0.0.1:9000
diff --git a/lang/php80/files/php-fpm.in b/lang/php80/files/php-fpm.in
new file mode 100644
index 000000000000..1c9d7f5c81ba
--- /dev/null
+++ b/lang/php80/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"