diff --git a/packages/php/build.sh b/packages/php/build.sh index effffd58a..876a8a126 100644 --- a/packages/php/build.sh +++ b/packages/php/build.sh @@ -43,7 +43,7 @@ ac_cv_func_res_nsearch=no --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=$TERMUX_PREFIX/tmp/mysqld.sock ---with-apxs2=$TERMUX_PREFIX/bin/apxs +--with-apxs2=$TERMUX_PKG_TMPDIR/apxs-wrapper.sh --enable-fpm --sbindir=$TERMUX_PREFIX/bin " @@ -58,6 +58,11 @@ termux_step_pre_configure() { autoconf export EXTENSION_DIR=$TERMUX_PREFIX/lib/php + + # Use a wrapper since bin/apxs has the Termux shebang: + echo "perl $TERMUX_PREFIX/bin/apxs \$@" > $TERMUX_PKG_TMPDIR/apxs-wrapper.sh + chmod +x $TERMUX_PKG_TMPDIR/apxs-wrapper.sh + cat $TERMUX_PKG_TMPDIR/apxs-wrapper.sh } termux_step_post_configure() { diff --git a/packages/php/configure.patch b/packages/php/configure.patch deleted file mode 100644 index fa0378616..000000000 --- a/packages/php/configure.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./configure -+++ ./configure -@@ -6932,7 +6932,7 @@ - - fi - else -- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` -+ APACHE_THREADED_MPM=true - if test -n "$APACHE_THREADED_MPM"; then - - enable_maintainer_zts=yes diff --git a/packages/php/ext-pdo_pgsql-config.m4.patch b/packages/php/ext-pdo_pgsql-config.m4.patch new file mode 100644 index 000000000..1c636d5e2 --- /dev/null +++ b/packages/php/ext-pdo_pgsql-config.m4.patch @@ -0,0 +1,17 @@ +diff -u -r ../php-7.3.3/ext/pdo_pgsql/config.m4 ./ext/pdo_pgsql/config.m4 +--- ../php-7.3.3/ext/pdo_pgsql/config.m4 2019-03-05 13:50:40.000000000 +0000 ++++ ./ext/pdo_pgsql/config.m4 2019-03-17 22:38:42.906375088 +0000 +@@ -14,12 +14,7 @@ + PHP_EXPAND_PATH($PGSQL_INCLUDE, PGSQL_INCLUDE) + + AC_MSG_CHECKING(for pg_config) +- for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do +- if test -x $i/pg_config; then +- PG_CONFIG="$i/pg_config" +- break; +- fi +- done ++ # Avoid picking up cross-compiled pg_config. + + if test -n "$PG_CONFIG"; then + AC_MSG_RESULT([$PG_CONFIG]) diff --git a/packages/php/ext-pgsql-config.m4.patch b/packages/php/ext-pgsql-config.m4.patch index 5c7b27725..288c80673 100644 --- a/packages/php/ext-pgsql-config.m4.patch +++ b/packages/php/ext-pgsql-config.m4.patch @@ -1,7 +1,21 @@ -diff -u -r ../php-7.1.3/ext/pgsql/config.m4 ./ext/pgsql/config.m4 ---- ../php-7.1.3/ext/pgsql/config.m4 2017-03-14 14:17:47.000000000 +0100 -+++ ./ext/pgsql/config.m4 2017-03-30 23:24:49.664225152 +0200 -@@ -101,6 +101,11 @@ +diff -u -r ../php-7.3.3/ext/pgsql/config.m4 ./ext/pgsql/config.m4 +--- ../php-7.3.3/ext/pgsql/config.m4 2019-03-05 13:50:45.000000000 +0000 ++++ ./ext/pgsql/config.m4 2019-03-17 22:54:10.391031721 +0000 +@@ -8,12 +8,7 @@ + PHP_EXPAND_PATH($PGSQL_INCLUDE, PGSQL_INCLUDE) + + AC_MSG_CHECKING(for pg_config) +- for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do +- if test -x $i/pg_config; then +- PG_CONFIG="$i/pg_config" +- break; +- fi +- done ++ # Avoid picking up cross-compiled pg_config. + + if test -n "$PG_CONFIG"; then + AC_MSG_RESULT([$PG_CONFIG]) +@@ -99,6 +94,11 @@ LDFLAGS=$old_LDFLAGS PHP_ADD_LIBRARY_WITH_PATH(pq, $PGSQL_LIBDIR, PGSQL_SHARED_LIBADD)