<pre style='margin:0'>
Ryan Carsten Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/c1015cdc51b973f3c40e591a4b8f1c135e403028">https://github.com/macports/macports-ports/commit/c1015cdc51b973f3c40e591a4b8f1c135e403028</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit c1015cdc51b973f3c40e591a4b8f1c135e403028
</span>Author: Ryan Carsten Schmidt <ryandesign@macports.org>
AuthorDate: Wed Jan 10 16:10:25 2024 -0600
<span style='display:block; white-space:pre;color:#404040;'> php52-apache2handler: Fix build with apache24
</span>---
lang/php/Portfile | 6 +-
lang/php/files/patch-php52-apache24.diff | 134 +++++++++++++++++++++++++++++++
2 files changed, 135 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/Portfile b/lang/php/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 23d8256b6a4..6aee2c08d0f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -642,11 +642,7 @@ subport ${php}-apache2handler {
</span> build.target libs/libphp${bundle_major}.bundle
if {[vercmp ${branch} < 5.3]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # PHP earlier than 5.3 is not compatible with Apache 2.4 or later, and
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # earlier versions of Apache were removed from MacPorts. Might be able
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # to backport Apache 2.4 support, perhaps using a patch from this bug
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # report: https://bugs.php.net/bug.php?id=62267
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- known_fail yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-${php}-apache24.diff
</span> }
destroot {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php52-apache24.diff b/lang/php/files/patch-php52-apache24.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..666cf963c7e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php52-apache24.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,134 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix build with Apache 2.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://bugs.php.net/bug.php?id=61172
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Combination of:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/1b16b4e24343a7e2cc07217ff678331c2b3f93df
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/a344adf72e48d725575c22b9955e028d7fdf6a52
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/698e0652953f0be372435b42b4f560976374aebd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/390ccd899d73101ad5ddcfc46074a6c83ec178e8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/730b54a3744035042cd4d738579c63bf15cc7384
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/configure 2011-01-06 17:04:43.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/configure 2024-01-10 15:17:14.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -5618,7 +5618,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APXS_BINDIR=`$APXS -q BINDIR`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APXS_CFLAGS=`$APXS -q CFLAGS`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- APXS_MPM=`$APXS -q MPM_NAME`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APU_BINDIR=`$APXS -q APU_BINDIR`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APR_BINDIR=`$APXS -q APR_BINDIR`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6380,13 +6379,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ esac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if test "$APXS_MPM" != "prefork"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$APACHE_VERSION" -lt 2004001; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ APXS_MPM=`$APXS -q MPM_NAME`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ enable_maintainer_zts=yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$pthreads_working" != "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test -n "$APACHE_THREADED_MPM"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enable_maintainer_zts=yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$pthreads_working" != "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "$ac_t""yes" 1>&6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6466,7 +6478,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APXS_BINDIR=`$APXS -q BINDIR`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APXS_CFLAGS=`$APXS -q CFLAGS`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- APXS_MPM=`$APXS -q MPM_NAME`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APU_BINDIR=`$APXS -q APU_BINDIR`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ APR_BINDIR=`$APXS -q APR_BINDIR`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7228,13 +7239,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ esac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if test "$APXS_MPM" != "prefork"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$APACHE_VERSION" -lt 2004001; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ APXS_MPM=`$APXS -q MPM_NAME`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enable_maintainer_zts=yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$pthreads_working" != "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test -n "$APACHE_THREADED_MPM"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ enable_maintainer_zts=yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$pthreads_working" != "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { echo "configure: error: ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." 1>&2; exit 1; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "$ac_t""yes" 1>&6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -119064,6 +119088,21 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$APACHE_VERSION" -ge 2004001; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test -z "$APACHE_THREADED_MPM"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++cat <<X
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+++--------------------------------------------------------------------+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++| *** WARNING *** |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++| |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++| You have built PHP for Apache's current non-threaded MPM. |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++| If you change Apache to use a threaded MPM you must reconfigure |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++| PHP with --enable-maintainer-zts |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++X
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$PHP_OCI8" != "no"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$PHP_SAPI" = "apache"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/sapi/apache2handler/php_functions.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/sapi/apache2handler/php_functions.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -383,8 +383,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char *p;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ server_rec *serv = ((php_struct *) SG(server_context))->r->server;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AP_DECLARE_DATA extern unixd_config_rec unixd_config;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (n = 0; ap_loaded_modules[n]; ++n) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char *s = (char *) ap_loaded_modules[n]->name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -414,7 +418,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ php_info_print_table_row(2, "Hostname:Port", tmp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ php_info_print_table_row(2, "User/Group", tmp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>