pcre: attempt to repair the damage introduced
authorKoen Kooi <koen@openembedded.org>
Sat, 9 Sep 2006 17:55:19 +0000 (17:55 +0000)
committerKoen Kooi <koen@openembedded.org>
Sat, 9 Sep 2006 17:55:19 +0000 (17:55 +0000)
packages/libpcre/libpcre_4.4.bb

index 9974e85..f26b595 100644 (file)
@@ -10,12 +10,15 @@ PR = "r1"
 SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2"
 S = "${WORKDIR}/pcre-${PV}"
 
+PARALLEL_MAKE = ""
+
 inherit autotools binconfig
 
 LEAD_SONAME = "libpcre.so"
 CFLAGS_append = " -D_REENTRANT"
 EXTRA_OECONF = " --with-link-size=2 --enable-newline-is-lf --with-match-limit=10000000"
 
+
 do_compile () {
        ${BUILD_CC} -DLINK_SIZE=2 -I${S}/include -c dftables.c
        ${BUILD_CC} dftables.o -o dftables
@@ -23,11 +26,20 @@ do_compile () {
 }
 
 do_stage () {
-       oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR}
-       oe_libinstall -a -so libpcre ${STAGING_LIBDIR}
-       install -m 0644 pcre.h ${STAGING_INCDIR}/
-       install -m 0644 pcreposix.h ${STAGING_INCDIR}/
+        # Force all -L(dir) output to be prepended with the staging libdir to stop libtool
+        # from trying to link to host libraries.
+        sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/*libtool
+
+        oe_libinstall -a -so libpcre ${STAGING_LIBDIR}
+        oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR}
+        install -m 0644 pcre.h ${STAGING_INCDIR}/
+        install -m 0644 pcreposix.h ${STAGING_INCDIR}/
+
+        # pcreposix linked originally to the libpcre in it's working directory. That messed
+        # the .la file up. I fix this manually here:
+        sed -i 's:${S}:${STAGING_LIBDIR}:' ${STAGING_LIBDIR}/libpcreposix.la
 }
 
+
 FILES_${PN} = "${libdir}/lib*.so*"
 FILES_${PN}-dev += "${bindir}"