From c3036f11360cf4992c635dcdc43f1d703b004cac Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 23 Nov 2005 07:35:46 +0000 Subject: base.bbclass: attempt to fix the staging .la problem - 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 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 18d51a02ed..c5359b20f8 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -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 -- cgit v1.2.3