Hi folks,

here's a quick-and-dirty patch against libtool.sh, which adds 
some sysroot support (look for .la files beyond $SYSROOT). 

Its not really a patch against libtool, instead a part of some
fixes in some other packages using libtool. But it should be 
enough to demonstration problem + solution.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     [EMAIL PROTECTED]
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------
diff -ruN libXft-2.1.7.orig/ltmain.sh libXft-2.1.7/ltmain.sh
--- libXft-2.1.7.orig/ltmain.sh Tue Mar  8 19:34:12 2005
+++ libXft-2.1.7/ltmain.sh      Fri Jun 10 20:36:51 2005
@@ -1772,6 +1772,7 @@
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
+      deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
       if test "X$duplicate_deps" = "Xyes" ; then
        case "$libs " in
        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
@@ -1850,6 +1851,7 @@
        deplibs=
       fi
       for deplib in $libs; do
+       deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
        lib=
        found=no
        case $deplib in
@@ -1898,6 +1900,7 @@
            if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
              case " $predeps $postdeps " in
              *" $deplib "*)
+               echo "foo1"
                if (${SED} -e '2q' $lib |
                     grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
                  library_names=
@@ -2078,6 +2081,7 @@
            old_convenience="$old_convenience $ladir/$objdir/$old_library"
            tmp_libs=
            for deplib in $dependency_libs; do
+             deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
              deplibs="$deplib $deplibs"
               if test "X$duplicate_deps" = "Xyes" ; then
                case "$tmp_libs " in
@@ -2201,6 +2205,7 @@
 
          tmp_libs=
          for deplib in $dependency_libs; do
+           deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
            case $deplib in
            -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | 
$Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
            esac
@@ -2584,6 +2589,7 @@
          # ... and its dependency_libs
          tmp_libs=
          for deplib in $dependency_libs; do
+           deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
            newdependency_libs="$deplib $newdependency_libs"
            if test "X$duplicate_deps" = "Xyes" ; then
              case "$tmp_libs " in
@@ -2596,6 +2602,7 @@
          if test "$link_all_deplibs" != no; then
            # Add the search paths of all dependency libraries
            for deplib in $dependency_libs; do
+             deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
              case $deplib in
              -L*) path="$deplib" ;;
              *.la)
@@ -2685,6 +2692,7 @@
       if test "$pass" = dlpreopen; then
        # Link the dlpreopened libraries before other libraries
        for deplib in $save_deplibs; do
+         deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
          deplibs="$deplib $deplibs"
        done
       fi
@@ -2711,6 +2719,7 @@
          eval tmp_libs=\"\$$var\"
          new_libs=
          for deplib in $tmp_libs; do
+           deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
            # FIXME: Pedantically, this is the right thing to do, so
            #        that some nasty dependency loop isn't accidentally
            #        broken:
@@ -2749,6 +2758,7 @@
          done
          tmp_libs=
          for deplib in $new_libs; do
+           deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
            case $deplib in
            -L*)
              case " $tmp_libs " in
@@ -5169,6 +5179,7 @@
            # Replace all uninstalled libtool libraries with the installed ones
            newdependency_libs=
            for deplib in $dependency_libs; do
+             deplib=`echo "$deplib" | sed -e "s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;"`
              case $deplib in
              *.la)
                name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
diff -ruN libXft-2.1.7.orig/ltmain.sh libXft-2.1.7/ltmain.sh
--- libXft-2.1.7.orig/ltmain.sh Fri Jun 10 20:51:26 2005
+++ libXft-2.1.7/ltmain.sh      Fri Jun 10 20:51:14 2005
@@ -2037,7 +2037,7 @@
        # Check to see that this really is a libtool archive.
        if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 
2>&1; then :
        else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         $echo "$modename: \`$lib' is not a valid libtool archive (1)" 1>&2
          exit $EXIT_FAILURE
        fi
 
@@ -2626,7 +2626,7 @@
                else
                  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
                  if test -z "$libdir"; then
-                   $echo "$modename: \`$deplib' is not a valid libtool 
archive" 1>&2
+                   $echo "$modename: \`$deplib' is not a valid libtool archive 
(2)" 1>&2
                    exit $EXIT_FAILURE
                  fi
                  if test "$absdir" != "$libdir"; then
@@ -5187,7 +5187,7 @@
                name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
                eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
                if test -z "$libdir"; then
-                 $echo "$modename: \`$deplib' is not a valid libtool archive" 
1>&2
+                 $echo "$modename: \`$deplib' is not a valid libtool archive 
(3)" 1>&2
                  exit $EXIT_FAILURE
                fi
                newdependency_libs="$newdependency_libs $libdir/$name"
@@ -5201,7 +5201,7 @@
              name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
              if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               $echo "$modename: \`$lib' is not a valid libtool archive (4)" 
1>&2
                exit $EXIT_FAILURE
              fi
              newdlfiles="$newdlfiles $libdir/$name"
@@ -5212,7 +5212,7 @@
              name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
              if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               $echo "$modename: \`$lib' is not a valid libtool archive (5)" 
1>&2
                exit $EXIT_FAILURE
              fi
              newdlprefiles="$newdlprefiles $libdir/$name"
@@ -5458,7 +5458,7 @@
        # Check to see that this really is a libtool archive.
        if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then :
        else
-         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+         $echo "$modename: \`$file' is not a valid libtool archive (6)" 1>&2
          $echo "$help" 1>&2
          exit $EXIT_FAILURE
        fi
@@ -5904,7 +5904,7 @@
        # Check to see that this really is a libtool archive.
        if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then :
        else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         $echo "$modename: \`$lib' is not a valid libtool archive (7)" 1>&2
          $echo "$help" 1>&2
          exit $EXIT_FAILURE
        fi

Reply via email to