summaryrefslogtreecommitdiffstats
path: root/package/apache/apache.mk
diff options
context:
space:
mode:
authorBernd Kuhls <bernd.kuhls@t-online.de>2015-02-07 11:41:03 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-02-22 15:24:54 +0100
commitc0da6bcf85e594fbca70726d9e2c6189e08700cc (patch)
treefa2a032697d649266ee08f3dbcfc90384e771aaf /package/apache/apache.mk
parentf22c2d32a9935bc64eb60c04bae2fb1d246685c0 (diff)
downloadbuildroot-c0da6bcf85e594fbca70726d9e2c6189e08700cc.tar.gz
buildroot-c0da6bcf85e594fbca70726d9e2c6189e08700cc.zip
apache: new package
[Thomas: - Don't explicitly pass CC_FOR_BUILD and CFLAGS_FOR_BUILD, those are already part of the default environment passed by the autotools-package infrastructure. - Explicitly disable Lua and LuaJIT support to avoid mis-detection of host installation. - Explicitly handle the optional support of libxml2, OpenSSL and zlib. Especially, the absence of explicit handling for libxml2 was causing a build failure due to the host libxml2 being detected. - Remove /usr/manual and /usr/build from the target. This saves 20+ MB of target space.] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/apache/apache.mk')
-rw-r--r--package/apache/apache.mk85
1 files changed, 85 insertions, 0 deletions
diff --git a/package/apache/apache.mk b/package/apache/apache.mk
new file mode 100644
index 0000000000..296e27e9c6
--- /dev/null
+++ b/package/apache/apache.mk
@@ -0,0 +1,85 @@
+################################################################################
+#
+# apache
+#
+################################################################################
+
+APACHE_VERSION = 2.4.12
+APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
+APACHE_SITE = http://archive.apache.org/dist/httpd
+APACHE_LICENSE = Apache-2.0
+APACHE_LICENSE_FILES = LICENSE
+# Needed for mod_php
+APACHE_INSTALL_STAGING = YES
+# We have a patch touching configure.in and Makefile.in,
+# so we need to autoreconf:
+APACHE_AUTORECONF = YES
+APACHE_DEPENDENCIES = apr apr-util pcre
+
+APACHE_CONF_ENV= \
+ ap_cv_void_ptr_lt_long=no \
+ PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
+
+APACHE_CONF_OPTS = \
+ --sysconfdir=/etc/apache2 \
+ --with-apr=$(STAGING_DIR)/usr \
+ --with-apr-util=$(STAGING_DIR)/usr \
+ --with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
+ --enable-http \
+ --enable-dbd \
+ --enable-proxy \
+ --enable-mime-magic \
+ --without-suexec-bin \
+ --enable-mods-shared=all \
+ --with-mpm=worker \
+ --disable-lua \
+ --disable-luajit
+
+ifeq ($(BR2_ARCH_HAS_ATOMICS),y)
+APACHE_CONF_OPTS += --enable-nonportable-atomics=yes
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+APACHE_DEPENDENCIES += libxml2
+# Apache wants the path to the header file, where it can find
+# <libxml/parser.h>.
+APACHE_CONF_OPTS += \
+ --enable-xml2enc \
+ --enable-proxy-html \
+ --with-libxml2=$(STAGING_DIR)/usr/include/libxml2
+else
+APACHE_CONF_OPTS += \
+ --disable-xml2enc \
+ --disable-proxy-html
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+APACHE_DEPENDENCIES += openssl
+APACHE_CONF_OPTS += \
+ --enable-ssl \
+ --with-ssl=$(STAGING_DIR)/usr
+else
+APACHE_CONF_OPTS += --disable-ssl
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+APACHE_DEPENDENCIES += zlib
+APACHE_CONF_OPTS += \
+ --enable-deflate \
+ --with-z=$(STAGING_DIR)/usr
+else
+APACHE_CONF_OPTS += --disable-deflate
+endif
+
+define APACHE_FIX_STAGING_APACHE_CONFIG
+ $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
+ $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
+endef
+APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
+
+define APACHE_CLEANUP_TARGET
+ $(RM) -rf $(TARGET_DIR)/usr/manual $(TARGET_DIR)/usr/build
+endef
+APACHE_POST_INSTALL_TARGET_HOOKS += APACHE_CLEANUP_TARGET
+
+$(eval $(autotools-package))
OpenPOWER on IntegriCloud