upgrade libtool, add fixes for libdir searching, fix up paths to .la files
authorFelix Fietkau <nbd@openwrt.org>
Thu, 27 Dec 2007 02:11:03 +0000 (02:11 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 27 Dec 2007 02:11:03 +0000 (02:11 +0000)
SVN-Revision: 9941

package/libtool/Makefile
package/libtool/patches/100-libdir_path.patch [new file with mode: 0644]
package/libtool/patches/110-no_rpath.patch [new file with mode: 0644]
package/libtool/patches/120-libdir_search.patch [new file with mode: 0644]

index 1aad641986e6960910edc38a99d08519ed196b84..c3feb9ec8b1595c50a0d9ca5aa9c6e7df7347075 100644 (file)
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtool
-PKG_VERSION:=1.5.22
+PKG_VERSION:=1.5.24
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -21,6 +21,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 include $(INCLUDE_DIR)/package.mk
 
 CONFIGURE_PREFIX=$(STAGING_DIR)/host
+export GLOBAL_LIBDIR=$(STAGING_DIR)/usr/lib
 
 define Package/libltdl
   SECTION:=libs
@@ -31,11 +32,17 @@ endef
 
 define Build/InstallDev
        $(MAKE) -C $(PKG_BUILD_DIR) \
+               bindir="$(2)/bin" \
+               datadir="$(2)/share" \
                prefix="$(2)" \
                exec_prefix="$(2)" \
                install
        $(INSTALL_DIR) $(1)/lib
        mv $(2)/lib/* $(1)/lib/
+#      $(SED) 's,^dlopen_self=unknown,dlopen_self=yes,' \
+#          -e 's,^dlopen_self_static=unknown,dlopen_self_static=no,' \
+#          -e 's,^link_all_deplibs=unknown,link_all_deplibs=no,' \
+#              $(2)/bin/libtool
 endef
 
 define Package/libltdl/install
diff --git a/package/libtool/patches/100-libdir_path.patch b/package/libtool/patches/100-libdir_path.patch
new file mode 100644 (file)
index 0000000..692d2f5
--- /dev/null
@@ -0,0 +1,34 @@
+Index: libtool-1.5.24/Makefile.in
+===================================================================
+--- libtool-1.5.24.orig/Makefile.in    2007-06-24 04:20:36.000000000 +0200
++++ libtool-1.5.24/Makefile.in 2007-12-26 04:39:04.171194995 +0100
+@@ -789,6 +789,7 @@
+       -rm -f ltmain.shT
+       date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
+       sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
++              -e 's#@''GLOBAL_LIBDIR@#$(GLOBAL_LIBDIR)#' \
+           -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT
+       mv -f ltmain.shT $@ || \
+       (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
+Index: libtool-1.5.24/ltmain.in
+===================================================================
+--- libtool-1.5.24.orig/ltmain.in      2007-12-26 04:39:09.151478801 +0100
++++ libtool-1.5.24/ltmain.in   2007-12-26 04:43:31.962455550 +0100
+@@ -5675,7 +5675,7 @@
+                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+-              newdependency_libs="$newdependency_libs $libdir/$name"
++              newdependency_libs="$newdependency_libs @GLOBAL_LIBDIR@/$name"
+               ;;
+             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             esac
+@@ -5700,7 +5700,7 @@
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+-            newdlprefiles="$newdlprefiles $libdir/$name"
++            newdlprefiles="$newdlprefiles @GLOBAL_LIBDIR@/$name"
+           done
+           dlprefiles="$newdlprefiles"
+         else
diff --git a/package/libtool/patches/110-no_rpath.patch b/package/libtool/patches/110-no_rpath.patch
new file mode 100644 (file)
index 0000000..7c92524
--- /dev/null
@@ -0,0 +1,32 @@
+Well, brute force to disable rpath.
+
+Only 
+-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
++#hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+should be necessary....
+
+Index: libtool-1.5.10/libtool.m4
+===================================================================
+--- libtool-1.5.10.orig/libtool.m4     2007-05-27 23:31:51.000000000 +0200
++++ libtool-1.5.10/libtool.m4  2007-05-27 23:50:26.000000000 +0200
+@@ -4244,16 +4244,16 @@
+ hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+ # Whether we should hardcode library paths into libraries.
+-hardcode_into_libs=$hardcode_into_libs
++hardcode_into_libs=no
+ # Flag to hardcode \$libdir into a binary during linking.
+ # This must work even if \$libdir does not exist.
+-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
++hardcode_libdir_flag_spec=
+ # If ld is used when linking, flag to hardcode \$libdir into
+ # a binary during linking. This must work even if \$libdir does
+ # not exist.
+-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
++hardcode_libdir_flag_spec_ld=
+ # Whether we need a single -rpath flag with a separated argument.
+ hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
diff --git a/package/libtool/patches/120-libdir_search.patch b/package/libtool/patches/120-libdir_search.patch
new file mode 100644 (file)
index 0000000..ba2ab83
--- /dev/null
@@ -0,0 +1,19 @@
+--- libtool-1.5.6/ltmain.in~libdir-la  2004-04-01 21:46:15.000000000 -0600
++++ libtool-1.5.6/ltmain.in    2004-05-14 22:53:51.000000000 -0500
+@@ -2147,8 +2147,14 @@
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+-          dir="$libdir"
+-          absdir="$libdir"
++            # Adding 'libdir' from the .la file to our library search paths
++            # breaks crosscompilation horribly.  We cheat here and don't add
++            # it, instead adding the path where we found the .la.  -CL
++          dir="$abs_ladir"
++          absdir="$abs_ladir"
++          libdir="$abs_ladir"
++          #dir="$libdir"
++          #absdir="$libdir"
+         fi
+       else
+         dir="$ladir/$objdir"