xref: /OK3568_Linux_fs/buildroot/package/php/0004-Call-apxs-with-correct-prefix.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 4342bdea7a1a21430ce0d051fa4387441166c473 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fabrice.fontaine@orange.com>
3Date: Sun, 11 Dec 2016 23:12:46 +0100
4Subject: [PATCH] Call apxs with correct prefix
5
6php uses apache's apxs script from staging directory to install libphp
7dynamic library and update /etc/apache2/httpd.conf in the staging and target
8directories. Here is the full command line:
9"apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/modules'
10 -S SYSCONFDIR='$(INSTALL_ROOT)/etc/apache2' -i -a -n php"
11This does not work for target directory as apxs sets the full path of the
12library and not the relative one. Indeed, apxs is smart enough to substitute
13away the prefix specified in $(STAGING_DIR)/usr/build/config_vars.mk so
14httpd.conf will only be correct in the staging directory.
15To fix this, add -S PREFIX='$(INSTALL_ROOT)/usr' to apxs call in configure
16
17Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
18Signed-off-by: Adam Duskett <aduskett@gmail.com>
19[aduskett@gmail.com: Update for 8.0.7]
20---
21 sapi/apache2handler/config.m4 | 3 +++
22 1 file changed, 3 insertions(+)
23
24diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
25index 55c16179..68ce66c0 100644
26--- a/sapi/apache2handler/config.m4
27+++ b/sapi/apache2handler/config.m4
28@@ -63,10 +63,12 @@ if test "$PHP_APXS2" != "no"; then
29     AC_MSG_ERROR([Please note that Apache version >= 2.0.44 is required])
30   fi
31
32+  APXS_PREFIX='$(INSTALL_ROOT)'/usr
33   APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
34   if test -z `$APXS -q SYSCONFDIR`; then
35     INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
36                  $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
37+                       -S PREFIX='$APXS_PREFIX' \
38                        -i -n php"
39   else
40     APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
41@@ -74,6 +76,7 @@ if test "$PHP_APXS2" != "no"; then
42                 \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
43                  $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
44                        -S SYSCONFDIR='$APXS_SYSCONFDIR' \
45+                       -S PREFIX='$APXS_PREFIX' \
46                        -i -a -n php"
47   fi
48
49--
502.5.0
51
52