Browse Source

php: New attempt at avoid-linking-apr-everywhere

android-5
Fredrik Fornwall 8 years ago
parent
commit
af997cb536
  1. 14
      packages/php/Makefile.global.patch
  2. 11
      packages/php/configure.patch
  3. 41
      packages/php/sapi-apache2handler-config.m4.patch

14
packages/php/Makefile.global.patch

@ -0,0 +1,14 @@
Work around https://github.com/android-ndk/ndk/issues/201.
diff -u -r ../php-7.1.6/Makefile.global ./Makefile.global
--- ../php-7.1.6/Makefile.global 2017-06-07 10:09:38.000000000 +0200
+++ ./Makefile.global 2017-06-14 23:22:21.258154325 +0200
@@ -16,7 +16,7 @@
build-binaries: $(PHP_BINARIES)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) -lapr-1 -laprutil-1 $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)

11
packages/php/configure.patch

@ -0,0 +1,11 @@
--- ./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

41
packages/php/sapi-apache2handler-config.m4.patch

@ -1,37 +1,5 @@
--- ./sapi/apache2handler/config.m4 2017-05-09 17:59:42.000000000 +0530 --- ./sapi/apache2handler/config.m4 2017-05-09 17:59:42.000000000 +0530
+++ ./sapi/apache2handler/config.m4 2017-06-08 21:10:39.847173781 +0530 +++ ./sapi/apache2handler/config.m4 2017-06-08 21:10:39.847173781 +0530
@@ -111,6 +111,9 @@
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
;;
*)
+ PHP_ADD_LIBRARY_WITH_PATH(apr-1, @TERMUX_PREFIX@, PHP7LIB_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(aprutil-1, @TERMUX_PREFIX@, PHP7LIB_SHARED_LIBADD)
+ PHP_SUBST(PHP7LIB_SHARED_LIBADD)
PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
;;
@@ -122,7 +122,7 @@
PHP_BUILD_THREAD_SAFE
fi
else
- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
+ APACHE_THREADED_MPM=true
if test -n "$APACHE_THREADED_MPM"; then
PHP_BUILD_THREAD_SAFE
fi
--- ./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
--- ./sapi/apache2handler/config.m4 2017-06-14 08:17:02.760779119 +0530
+++ ../config.m4 2017-06-14 08:25:58.653886169 +0530
@@ -67,18 +67,9 @@ @@ -67,18 +67,9 @@
fi fi
@ -51,3 +19,12 @@
case $host_alias in case $host_alias in
*aix*) *aix*)
@@ -122,7 +122,7 @@
PHP_BUILD_THREAD_SAFE
fi
else
- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
+ APACHE_THREADED_MPM=true
if test -n "$APACHE_THREADED_MPM"; then
PHP_BUILD_THREAD_SAFE
fi

Loading…
Cancel
Save