apache2: work around bug in apr-1-config/apu-1-config scripts
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 10 Oct 2012 10:01:28 +0000 (11:01 +0100)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:24:05 +0000 (08:24 -0800)
The apr-1-config and apu-1-config scripts (installed into the sysroot
by apr and apr-util respectively) report incorrect paths with current
OE-Core - see:

  http://bugzilla.yoctoproject.org/show_bug.cgi?id=3267

Since OE-Core is frozen at the moment, work around the issue by taking
a copy of the scripts and fixing them up. Additionally we need to not
mangle the libtool name as apr installs it into the sysroot as just
'libtool'.

This fixes building apache2 with rm_work enabled.

(From meta-openembedded rev: dff2c1bd5291e95b35a102c1b5fdbe78aa627c41)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb

index 0eb5327..2c0fa6b 100644 (file)
@@ -6,11 +6,10 @@ DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
 RDEPENDS_${PN} += "openssl libgcc"
 SECTION = "net"
 LICENSE = "Apache-2.0"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
            file://server-makefile.patch \
-           file://fix-libtool-name.patch \
            file://httpd-2.4.1-corelimit.patch \
            file://httpd-2.4.1-export.patch \
            file://httpd-2.4.1-selinux.patch \
@@ -37,8 +36,8 @@ CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
 EXTRA_OECONF = "--enable-ssl \
                --with-ssl=${STAGING_LIBDIR}/.. \
                --with-expat=${STAGING_LIBDIR}/.. \
-               --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
-               --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
+               --with-apr=${WORKDIR}/apr-1-config \
+               --with-apr-util=${WORKDIR}/apu-1-config \
                --enable-info \
                --enable-rewrite \
                --with-dbm=sdbm \
@@ -54,6 +53,15 @@ EXTRA_OECONF = "--enable-ssl \
                --enable-mpms-shared \
                ac_cv_have_threadsafe_pollset=no"
 
+do_configure_prepend() {
+       # FIXME: this hack is required to work around an issue with apr/apr-util
+       # Can be removed when fixed in OE-Core (also revert --with-* options above)
+       # see http://bugzilla.yoctoproject.org/show_bug.cgi?id=3267
+       cp ${STAGING_BINDIR_CROSS}/apr-1-config ${STAGING_BINDIR_CROSS}/apu-1-config ${WORKDIR}
+       sed -i -e 's:location=source:location=installed:' ${WORKDIR}/apr-1-config
+       sed -i -e 's:location=source:location=installed:' ${WORKDIR}/apu-1-config
+}
+
 do_install_append() {
        install -d ${D}/${sysconfdir}/init.d
        cat ${WORKDIR}/init | \