diff options
Diffstat (limited to 'lang/php82/files')
-rw-r--r-- | lang/php82/files/patch-build_Makefile.global | 19 | ||||
-rw-r--r-- | lang/php82/files/patch-configure.ac | 45 | ||||
-rw-r--r-- | lang/php82/files/patch-ext_hash_xxhash_xxhash.h | 46 | ||||
-rw-r--r-- | lang/php82/files/patch-ext_mysqli_mysqli__api.c | 12 | ||||
-rw-r--r-- | lang/php82/files/patch-ext_mysqli_mysqli__nonapi.c | 12 | ||||
-rw-r--r-- | lang/php82/files/patch-ext_mysqli_mysqli__prop.c | 12 | ||||
-rw-r--r-- | lang/php82/files/patch-ext_pcre_pcre2lib_sljit_sljitConfigInternal.h | 11 | ||||
-rw-r--r-- | lang/php82/files/patch-sapi_apache2handler_config.m4 | 11 | ||||
-rw-r--r-- | lang/php82/files/patch-sapi_fpm_config.m4 | 11 | ||||
-rw-r--r-- | lang/php82/files/patch-sapi_fpm_www.conf.in | 17 | ||||
-rw-r--r-- | lang/php82/files/php-fpm.in | 66 |
11 files changed, 262 insertions, 0 deletions
diff --git a/lang/php82/files/patch-build_Makefile.global b/lang/php82/files/patch-build_Makefile.global new file mode 100644 index 000000000000..4b838d157941 --- /dev/null +++ b/lang/php82/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/php82/files/patch-configure.ac b/lang/php82/files/patch-configure.ac new file mode 100644 index 000000000000..b8c26f6c43f1 --- /dev/null +++ b/lang/php82/files/patch-configure.ac @@ -0,0 +1,45 @@ +--- configure.ac.orig 2021-12-15 02:00:45 UTC ++++ configure.ac +@@ -55,6 +55,7 @@ AH_BOTTOM([ + + #include <string.h> + ++#include <ext/php_config.h> + #endif /* PHP_CONFIG_H */ + ]) + +@@ -273,7 +274,6 @@ sinclude(Zend/Zend.m4) + + dnl ---------------------------------------------------------------------------- + +-PTHREADS_CHECK + PHP_HELP_SEPARATOR([SAPI modules:]) + PHP_SHLIB_SUFFIX_NAMES + PHP_BUILD_PROGRAM +@@ -614,7 +614,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) +@@ -1360,7 +1360,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 +@@ -1579,7 +1579,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_INSTALL_HEADERS([Zend/Optimizer], [ \ + zend_call_graph.h \ + zend_cfg.h \ diff --git a/lang/php82/files/patch-ext_hash_xxhash_xxhash.h b/lang/php82/files/patch-ext_hash_xxhash_xxhash.h new file mode 100644 index 000000000000..27abdbc2af76 --- /dev/null +++ b/lang/php82/files/patch-ext_hash_xxhash_xxhash.h @@ -0,0 +1,46 @@ +--- ext/hash/xxhash/xxhash.h.orig 2022-01-04 18:37:17 UTC ++++ ext/hash/xxhash/xxhash.h +@@ -2395,22 +2395,32 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(co + * inconsistent intrinsics, spotty coverage, and multiple endiannesses. + */ + #if XXH_VECTOR == XXH_VSX ++/* Annoyingly, these headers _may_ define three macros: `bool`, `vector`, ++ * and `pixel`. This is a problem for obvious reasons. ++ * ++ * These keywords are unnecessary; the spec literally says they are ++ * equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd ++ * after including the header. ++ * ++ * We use pragma push_macro/pop_macro to keep the namespace clean. */ ++# pragma push_macro("bool") ++# pragma push_macro("vector") ++# pragma push_macro("pixel") ++/* silence potential macro redefined warnings */ ++# undef bool ++# undef vector ++# undef pixel ++ + # if defined(__s390x__) + # include <s390intrin.h> + # else +-/* gcc's altivec.h can have the unwanted consequence to unconditionally +- * #define bool, vector, and pixel keywords, +- * with bad consequences for programs already using these keywords for other purposes. +- * The paragraph defining these macros is skipped when __APPLE_ALTIVEC__ is defined. +- * __APPLE_ALTIVEC__ is _generally_ defined automatically by the compiler, +- * but it seems that, in some cases, it isn't. +- * Force the build macro to be defined, so that keywords are not altered. +- */ +-# if defined(__GNUC__) && !defined(__APPLE_ALTIVEC__) +-# define __APPLE_ALTIVEC__ +-# endif + # include <altivec.h> + # endif ++ ++/* Restore the original macro values, if applicable. */ ++# pragma pop_macro("pixel") ++# pragma pop_macro("vector") ++# pragma pop_macro("bool") + + typedef __vector unsigned long long xxh_u64x2; + typedef __vector unsigned char xxh_u8x16; diff --git a/lang/php82/files/patch-ext_mysqli_mysqli__api.c b/lang/php82/files/patch-ext_mysqli_mysqli__api.c new file mode 100644 index 000000000000..535503954e3d --- /dev/null +++ b/lang/php82/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/php82/files/patch-ext_mysqli_mysqli__nonapi.c b/lang/php82/files/patch-ext_mysqli_mysqli__nonapi.c new file mode 100644 index 000000000000..9baa04218bf9 --- /dev/null +++ b/lang/php82/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/php82/files/patch-ext_mysqli_mysqli__prop.c b/lang/php82/files/patch-ext_mysqli_mysqli__prop.c new file mode 100644 index 000000000000..37d47a304440 --- /dev/null +++ b/lang/php82/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/php82/files/patch-ext_pcre_pcre2lib_sljit_sljitConfigInternal.h b/lang/php82/files/patch-ext_pcre_pcre2lib_sljit_sljitConfigInternal.h new file mode 100644 index 000000000000..9a75bc3e86c1 --- /dev/null +++ b/lang/php82/files/patch-ext_pcre_pcre2lib_sljit_sljitConfigInternal.h @@ -0,0 +1,11 @@ +--- ext/pcre/pcre2lib/sljit/sljitConfigInternal.h.orig 2022-03-25 09:54:56 UTC ++++ ext/pcre/pcre2lib/sljit/sljitConfigInternal.h +@@ -283,7 +283,7 @@ + /* Instruction cache flush. */ + /****************************/ + +-#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) ++#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin && !defined SLJIT_CONFIG_PPC_32) + #if __has_builtin(__builtin___clear_cache) + + #define SLJIT_CACHE_FLUSH(from, to) \ diff --git a/lang/php82/files/patch-sapi_apache2handler_config.m4 b/lang/php82/files/patch-sapi_apache2handler_config.m4 new file mode 100644 index 000000000000..5b0cfb9d4591 --- /dev/null +++ b/lang/php82/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/php82/files/patch-sapi_fpm_config.m4 b/lang/php82/files/patch-sapi_fpm_config.m4 new file mode 100644 index 000000000000..e88c204384ae --- /dev/null +++ b/lang/php82/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/php82/files/patch-sapi_fpm_www.conf.in b/lang/php82/files/patch-sapi_fpm_www.conf.in new file mode 100644 index 000000000000..c7e7fe399854 --- /dev/null +++ b/lang/php82/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/php82/files/php-fpm.in b/lang/php82/files/php-fpm.in new file mode 100644 index 000000000000..c234856b0e54 --- /dev/null +++ b/lang/php82/files/php-fpm.in @@ -0,0 +1,66 @@ +#!/bin/sh + +# 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" |