base.bbclass(oe_libinstall): Handle shared libs basenames of which were
authorPaul Sokolovsky <pmiscml@gmail.com>
Tue, 12 Sep 2006 22:46:33 +0000 (22:46 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Tue, 12 Sep 2006 22:46:33 +0000 (22:46 +0000)
suffixed with version properly.
* Sometimes soname of a shlib is overriden to contain extra version. If
it's build by libtool, .la still has basename w/o suffix. This fix recognizes
such case, and handles shlib installation properly (via libtool).
* Example of this is smpeg_0.4.4+0.4.5cvs20040311 which builds libsmpeg-0.4,
while still being linked as -lsmpeg.
Fixes #1389.

classes/base.bbclass

index 80e0b82..bb4abb9 100644 (file)
@@ -193,6 +193,13 @@ oe_libinstall() {
        __runcmd cd $dir
 
        lafile=$libname.la
+
+       # If such file doesn't exist, try to cut version suffix
+        if [ ! -f "$lafile" ]; then
+                libname=`echo "$libname" | sed 's/-[0-9.]*$//'`
+                lafile=$libname.la
+        fi
+
        if [ -f "$lafile" ]; then
                # libtool archive
                eval `cat $lafile|grep "^library_names="`