[oe-commits] Koen Kooi : apache2(-native): use pkg-config for pcre detection

git at git.openembedded.org git at git.openembedded.org
Wed Jun 18 08:15:58 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: 093b269e8cde866c91a6c32d98cdec85009e8e95
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=093b269e8cde866c91a6c32d98cdec85009e8e95

Author: Koen Kooi <koen.kooi at linaro.org>
Date:   Tue Jun 17 09:22:17 2014 +0200

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 at linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../recipes-httpd/apache2/apache2-native_2.4.9.bb  | 23 +++++-----
 .../recipes-httpd/apache2/apache2_2.4.9.bb         |  1 +
 ...nfigure-use-pkg-config-for-PCRE-detection.patch | 52 ++++++++++++++++++++++
 3 files changed, 66 insertions(+), 10 deletions(-)

diff --git a/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb b/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
index aaa7e60..e50f2b8 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
@@ -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
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
index 33e197a..4788110 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
@@ -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"
 
diff --git a/meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch b/meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch
new file mode 100644
index 0000000..63096db
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch
@@ -0,0 +1,52 @@
+From d8837756f2a48adcfe5d645c39cf163d96eac76c Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi at 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 at 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
+



More information about the Openembedded-commits mailing list