0004-Call-apxs-with-correct-prefix.patch 2.1 KB

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