base.bbclass: attempt to fix the staging .la problem
authorJohn Bowler <jbowler@nslu2-linux.org>
Wed, 23 Nov 2005 07:35:46 +0000 (07:35 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Wed, 23 Nov 2005 07:35:46 +0000 (07:35 +0000)
  - when using oe_libinstall to install a libtool library (.la file
  - present) into the staging directory (${STAGING_LIBDIR}) fix up the
  - installed .lai file so that it contains 'installed=no' - this
  - prevents libtool from subsequently using a copy of the build system
  - library if it exists in the final (target) installation directory
  - on the build machine (typically /usr/lib).  Remove the patches from
  - pcre_4.4.bb to match (it now seems to work without them), add
  - cherokee to the openslug (etc) build (it was failing because of this
  - problem.)

classes/base.bbclass
conf/distro/openslug-packages.conf
conf/distro/ucslugc-packages.conf
packages/meta/slugos-packages.bb
packages/pcre/pcre_4.4.bb

index 18d51a0..c5359b2 100644 (file)
@@ -124,6 +124,7 @@ oe_libinstall() {
        silent=""
        require_static=""
        require_shared=""
+       staging_install=""
        while [ "$#" -gt 0 ]; do
                case "$1" in
                -C)
@@ -155,6 +156,10 @@ oe_libinstall() {
        if [ -z "$destpath" ]; then
                oefatal "oe_libinstall: no destination path specified"
        fi
+       if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
+       then
+               staging_install=1
+       fi
 
        __runcmd () {
                if [ -z "$silent" ]; then
@@ -188,7 +193,15 @@ oe_libinstall() {
        fi
        dotlai=$libname.lai
        if [ -f "$dotlai" -a -n "$libtool" ]; then
-               __runcmd install -m 0644 $dotlai $destpath/$libname.la
+               if test -n "$staging_install"
+               then
+                       # stop libtool using the final directory name for libraries
+                       # in staging:
+                       __runcmd rm -f $destpath/$libname.la
+                       __runcmd sed -e 's/^installed=yes$/installed=no/' $dotlai >$destpath/$libname.la
+               else
+                       __runcmd install -m 0644 $dotlai $destpath/$libname.la
+               fi
        fi
 
        for name in $library_names; do
index f12d444..37f06d8 100644 (file)
@@ -19,6 +19,7 @@ ${PKGDIR}/packages/busybox/*.bb \
 ${PKGDIR}/packages/bwmon/*.bb \
 ${PKGDIR}/packages/bzip2/*.bb \
 ${PKGDIR}/packages/ccxstream/*.bb \
+${PKGDIR}/packages/cherokee/*.bb \
 ${PKGDIR}/packages/coreutils/*.bb \
 ${PKGDIR}/packages/cpio/*.bb \
 ${PKGDIR}/packages/cron/*.bb \
index 17684a7..14350ee 100644 (file)
@@ -20,6 +20,7 @@ ${PKGDIR}/packages/busybox/*.bb \
 ${PKGDIR}/packages/bwmon/*.bb \
 ${PKGDIR}/packages/bzip2/*.bb \
 ${PKGDIR}/packages/ccxstream/*.bb \
+${PKGDIR}/packages/cherokee/*.bb \
 ${PKGDIR}/packages/coreutils/*.bb \
 ${PKGDIR}/packages/cpio/*.bb \
 ${PKGDIR}/packages/cron/*.bb \
index 367dea2..6e98dc4 100644 (file)
@@ -36,6 +36,7 @@ SLUGOS_PACKAGES = "\
        bwmon \
        bzip2 \
        ccxstream \
+       cherokee \
        coreutils \
        cron \
        ctorrent \
@@ -178,7 +179,6 @@ UCLIBC_UNSUPPORTABLE_PACKAGES = "\
 SLUGOS_PACKAGES_append_linux = "\
        ${UCLIBC_UNSUPPORTABLE_PACKAGES} \
        ctrlproxy \
-       dsniff \
        iperf \
        man man-pages \
        psmisc \
@@ -187,6 +187,9 @@ SLUGOS_PACKAGES_append_linux = "\
        xinetd \
        "
 
+#BROKEN:
+#      dsniff
+
 SLUGOS_PACKAGES_append_linux-uclibc = "\
        "
 
index 9f15384..612d76d 100644 (file)
@@ -5,7 +5,7 @@ provides a POSIX calling interface to PCRE; the regular expressions \
 themselves still follow Perl syntax and semantics. The header file for \
 the POSIX-style functions is called pcreposix.h."
 SECTION = "devel"
-PR = "r1"
+PR = "r2"
 LICENSE = "BSD"
 SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2"
 S = "${WORKDIR}/pcre-${PV}"
@@ -27,18 +27,10 @@ do_compile () {
 }
 
 do_stage () {
-       # 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*"