apache2(-native): use pkg-config for pcre detection

Also fixup apache2-native recipe to use autotools and SEPB.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Koen Kooi 2014-06-17 09:22:17 +02:00 committed by Martin Jansa
parent 52b21a1951
commit 6730b00897
3 changed files with 66 additions and 10 deletions

View File

@ -6,9 +6,11 @@ DEPENDS = "expat-native pcre-native apr-native apr-util-native"
SECTION = "net"
LICENSE = "Apache-2.0"
inherit native
inherit autotools native
SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2"
SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
"
S = "${WORKDIR}/httpd-${PV}"
@ -16,11 +18,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
SRC_URI[md5sum] = "2ef4e65353497606b24fa9bb3e5a3c40"
SRC_URI[sha256sum] = "f78cc90dfa47caf3d83ad18fd6b4e85f237777c1733fc9088594b70ce2847603"
do_configure () {
./configure --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
--with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
--prefix=${prefix} --datadir=${datadir}/apache2
}
EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
--with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
--prefix=${prefix} --datadir=${datadir}/apache2 \
"
do_install () {
install -d ${D}${bindir} ${D}${libdir}
@ -28,13 +29,15 @@ do_install () {
install -m 755 support/apxs ${D}${bindir}/
install -m 755 httpd ${D}${bindir}/
install -d ${D}${datadir}/apache2/build
cp ${S}/build/*.mk ${D}${datadir}/apache2/build
cp build/*.mk ${D}${datadir}/apache2/build
cp build/instdso.sh ${D}${datadir}/apache2/build
cp ${S}/build/instdso.sh ${D}${datadir}/apache2/build
install -d ${D}${includedir}/apache2
cp ${S}/include/* ${D}${includedir}/apache2
cp include/* ${D}${includedir}/apache2
cp os/unix/os.h ${D}${includedir}/apache2
cp os/unix/unixd.h ${D}${includedir}/apache2
cp ${S}/os/unix/os.h ${D}${includedir}/apache2
cp ${S}/os/unix/unixd.h ${D}${includedir}/apache2
cp support/envvars-std ${D}${bindir}/envvars
chmod 755 ${D}${bindir}/envvars

View File

@ -16,6 +16,7 @@ SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
file://apache-ssl-ltmain-rpath.patch \
file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
file://npn-patch-2.4.7.patch \
file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
file://init \
file://apache2-volatile.conf"

View File

@ -0,0 +1,52 @@
From d8837756f2a48adcfe5d645c39cf163d96eac76c Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Tue, 17 Jun 2014 09:10:57 +0200
Subject: [PATCH] configure: use pkg-config for PCRE detection
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Upstream-Status: pending
---
configure.in | 27 +++++----------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/configure.in b/configure.in
index 864d7c7..da4138e 100644
--- a/configure.in
+++ b/configure.in
@@ -215,28 +215,11 @@ fi
AC_ARG_WITH(pcre,
APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
-AC_PATH_PROG(PCRE_CONFIG, pcre-config, false)
-if test -d "$with_pcre" && test -x "$with_pcre/bin/pcre-config"; then
- PCRE_CONFIG=$with_pcre/bin/pcre-config
-elif test -x "$with_pcre"; then
- PCRE_CONFIG=$with_pcre
-fi
-
-if test "$PCRE_CONFIG" != "false"; then
- if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
- AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG])
- fi
- case `$PCRE_CONFIG --version` in
- [[1-5].*])
- AC_MSG_ERROR([Need at least pcre version 6.0])
- ;;
- esac
- AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
- APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
- APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
-else
- AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
-fi
+PKG_CHECK_MODULES([PCRE], [libpcre], [
+ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
+], [
+ AC_MSG_ERROR([$PCRE_PKG_ERRORS])
+])
APACHE_SUBST(PCRE_LIBS)
AC_MSG_NOTICE([])
--
1.9.3