apache.mk 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ################################################################################
  2. #
  3. # apache
  4. #
  5. ################################################################################
  6. APACHE_VERSION = 2.4.12
  7. APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
  8. APACHE_SITE = http://archive.apache.org/dist/httpd
  9. APACHE_LICENSE = Apache-2.0
  10. APACHE_LICENSE_FILES = LICENSE
  11. # Needed for mod_php
  12. APACHE_INSTALL_STAGING = YES
  13. # We have a patch touching configure.in and Makefile.in,
  14. # so we need to autoreconf:
  15. APACHE_AUTORECONF = YES
  16. APACHE_DEPENDENCIES = apr apr-util pcre
  17. APACHE_CONF_ENV= \
  18. ap_cv_void_ptr_lt_long=no \
  19. PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
  20. APACHE_CONF_OPTS = \
  21. --sysconfdir=/etc/apache2 \
  22. --with-apr=$(STAGING_DIR)/usr \
  23. --with-apr-util=$(STAGING_DIR)/usr \
  24. --with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
  25. --enable-http \
  26. --enable-dbd \
  27. --enable-proxy \
  28. --enable-mime-magic \
  29. --without-suexec-bin \
  30. --enable-mods-shared=all \
  31. --with-mpm=worker \
  32. --disable-lua \
  33. --disable-luajit
  34. ifeq ($(BR2_ARCH_HAS_ATOMICS),y)
  35. APACHE_CONF_OPTS += --enable-nonportable-atomics=yes
  36. endif
  37. ifeq ($(BR2_PACKAGE_LIBXML2),y)
  38. APACHE_DEPENDENCIES += libxml2
  39. # Apache wants the path to the header file, where it can find
  40. # <libxml/parser.h>.
  41. APACHE_CONF_OPTS += \
  42. --enable-xml2enc \
  43. --enable-proxy-html \
  44. --with-libxml2=$(STAGING_DIR)/usr/include/libxml2
  45. else
  46. APACHE_CONF_OPTS += \
  47. --disable-xml2enc \
  48. --disable-proxy-html
  49. endif
  50. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  51. APACHE_DEPENDENCIES += openssl
  52. APACHE_CONF_OPTS += \
  53. --enable-ssl \
  54. --with-ssl=$(STAGING_DIR)/usr
  55. else
  56. APACHE_CONF_OPTS += --disable-ssl
  57. endif
  58. ifeq ($(BR2_PACKAGE_ZLIB),y)
  59. APACHE_DEPENDENCIES += zlib
  60. APACHE_CONF_OPTS += \
  61. --enable-deflate \
  62. --with-z=$(STAGING_DIR)/usr
  63. else
  64. APACHE_CONF_OPTS += --disable-deflate
  65. endif
  66. define APACHE_FIX_STAGING_APACHE_CONFIG
  67. $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
  68. $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
  69. endef
  70. APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
  71. define APACHE_CLEANUP_TARGET
  72. $(RM) -rf $(TARGET_DIR)/usr/manual $(TARGET_DIR)/usr/build
  73. endef
  74. APACHE_POST_INSTALL_TARGET_HOOKS += APACHE_CLEANUP_TARGET
  75. $(eval $(autotools-package))