BugFix - buildroot-libtool.patch - Removed Useless Code
PATCH 1/5 BugFix - buildroot-libtool.patch - Removed Useless Code
The code that was removed only added commented out code. It neither added needed code nor commented out existing code.
--- package/buildroot-libtool.patch | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-)
package/buildroot-libtool.patch +0 -17
@@ -38,23 +38,6 @@ fi # This is a shared library -@@ -2889,6 +2896,16 @@ EOF - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" -+# This interferes with crosscompilation. -CL -+# 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 -+# exit 1 -+# fi -+# if test "$absdir" != "$libdir"; then -+# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+# fi - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then @@ -5606,6 +5623,10 @@ fi\ # Replace all uninstalled libtool libraries with the installed ones newdependency_libs=
Signature · 1 line
1.7.2.3
PATCH 2/5 Added the ability to patch ltmain.sh based on version
There are two versions of ltmain.sh in use in the buildroot system, 1.5.x and 2.2.x. buildroot-libtool.patch would only patch 1.5.x, which meant that for 2.2.x, a separate patch for the affected package had to be maintained. Modified Makefile.autotools.in to check the version of ltmain.sh and apply the correct patch.
--- package/Makefile.autotools.in | 27 ++++++-- package/buildroot-libtool-v1.5.patch | 69 ++++++++++++++++++++ package/buildroot-libtool-v2.2.patch | 53 +++++++++++++++ package/buildroot-libtool.patch | 69 -------------------- .../libdeamon-0.14-buildroot-libtool.patch | 53 --------------- .../libogg/libogg-1.2.0-buildroot-libtool.patch | 53 --------------- .../libvorbis-1.3.1-buildroot-libtool.patch | 53 --------------- 7 files changed, 143 insertions(+), 234 deletions(-) create mode 100644 package/buildroot-libtool-v1.5.patch create mode 100644 package/buildroot-libtool-v2.2.patch delete mode 100644 package/buildroot-libtool.patch delete mode 100644 package/libdaemon/libdeamon-0.14-buildroot-libtool.patch delete mode 100644 package/multimedia/libogg/libogg-1.2.0-buildroot-libtool.patch delete mode 100644 package/multimedia/libvorbis/libvorbis-1.3.1-buildroot-libtool.patch
package/Makefile.autotools.in +21 -6
@@ -143,10 +143,16 @@ $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK # define LIBTOOL_PATCH_HOOK @$(call MESSAGE,"Patching libtool") - $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" -a \ - "$$($$(PKG)_AUTORECONF)" != "YES"; then \ - for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ - toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool.patch; \ + $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" \ + -a "$$($$(PKG)_AUTORECONF)" != "YES"; then \ + for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ + ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \ + sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \ + if test $$$${ltmain_version} = '1.5'; then \ + toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \ + else \ + toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \ + fi \ done \ fi endef
@@ -162,9 +168,18 @@ endif define AUTORECONF_HOOK @$(call MESSAGE,"Autoreconfiguring") $(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT) - $(Q)if test "$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \ + $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \ for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ - toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \ + echo $$$${i}; \ + ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | sed 's/\([0-9].[0-9]*\).*/\1/'`; \ + echo $$$${ltmain_version}; \ + if test $$$${ltmain_version} = "1.5"; then \ + echo "Applying libtool patch 1.5"; \ + toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \ + else \ + echo "Applying libtool patch 2.2"; \ + toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \ + fi \ done \ fi endef
package/buildroot-libtool-v1.5.patch new file +69 -0
69 lines not on this page · raw message
package/buildroot-libtool-v2.2.patch new file +53 -0
53 lines not on this page · raw message
package/buildroot-libtool.patch deleted +0 -69
69 lines not on this page · raw message
package/libdaemon/libdeamon-0.14-buildroot-libtool.patch deleted +0 -53
53 lines not on this page · raw message
package/multimedia/libogg/libogg-1.2.0-buildroot-libtool.patch deleted +0 -53
53 lines not on this page · raw message
package/multimedia/libvorbis/libvorbis-1.3.1-buildroot-libtool.patch deleted +0 -53
53 lines not on this page · raw message
Signature · 1 line
1.7.2.3
PATCH 2/5 Added the ability to patch ltmain.sh based on version
I understand this is an easy fix to handle the libtool linkage problem. But instead of providing a different patch for each libtool version, wouldn't it be better to directly patch the libtool package, and then activate autoreconfiguration on packages which need a libtool script able to cross compile ?
Quoted 21 lines · Martin Banky
There are two versions of
ltmain.shin use in the buildroot system, 1.5.x and 2.2.x. buildroot-libtool.patch would only patch 1.5.x, which meant that for 2.2.x, a separate patch for the affected package had to be maintained. Modified Makefile.autotools.in to check the version ofltmain.shand apply the correct patch.
---?package/Makefile.autotools.in ? ? ? ? ? ? ? ? ? ? ?| ? 27 ++++++-- ?package/buildroot-libtool-v1.5.patch ? ? ? ? ? ? ? | ? 69 ++++++++++++++++++++ ?package/buildroot-libtool-v2.2.patch ? ? ? ? ? ? ? | ? 53 +++++++++++++++ ?package/buildroot-libtool.patch ? ? ? ? ? ? ? ? ? ?| ? 69 -------------------- ?.../libdeamon-0.14-buildroot-libtool.patch ? ? ? ? | ? 53 --------------- ?.../libogg/libogg-1.2.0-buildroot-libtool.patch ? ?| ? 53 --------------- ?.../libvorbis-1.3.1-buildroot-libtool.patch ? ? ? ?| ? 53 ---------------?7 files changed, 143 insertions(+), 234 deletions(-)
?create mode 100644package/buildroot-libtool-v1.5.patch
?create mode 100644package/buildroot-libtool-v2.2.patch
?delete mode 100644package/buildroot-libtool.patch
?delete mode 100644package/libdaemon/libdeamon-0.14-buildroot-libtool.patch?delete mode 100644package/multimedia/libogg/libogg-1.2.0-buildroot-libtool.patch?delete mode 100644package/multimedia/libvorbis/libvorbis-1.3.1-buildroot-libtool.patch
PATCH 2/5 Added the ability to patch ltmain.sh based on version
I did it this way to save time. Autoreconf takes a fair amount of time to run for each package that would need it. I agree that it would be a good way to handle the issue. if it didn't take so much time.
Quoted 37 lines · Lionel Landwerlin
I understand this is an easy fix to handle the libtool linkage problem. But instead of providing a different patch for each libtool version, wouldn't
it be better to directly patch the libtool package, and then activate autoreconfiguration on packages which need a libtool script able to cross compile ?Quoted 1 line · Martin Banky
There are two versions of
ltmain.shin use in the buildroot system, 1.5.xand
Quoted 1 line
2.2.x. buildroot-libtool.patch would only patch 1.5.x, which meant that
for
Quoted 1 line
2.2.x, a separate patch for the affected package had to be maintained.
Modified
Quoted 1 line
Makefile.autotools.in to check the version of
ltmain.shand apply thecorrect
Quoted 4 lines
patch.
--- package/Makefile.autotools.in | 27 ++++++-- package/buildroot-libtool-v1.5.patch | 69++++++++++++++++++++
Quoted 1 line
package/buildroot-libtool-v2.2.patch | 53+++++++++++++++
Quoted 1 line
package/buildroot-libtool.patch | 69--------------------
Quoted 1 line
.../libdeamon-0.14-buildroot-libtool.patch | 53---------------
Quoted 1 line
.../libogg/libogg-1.2.0-buildroot-libtool.patch | 53---------------
Quoted 1 line
.../libvorbis-1.3.1-buildroot-libtool.patch | 53---------------
Quoted 5 lines
7 files changed, 143 insertions(+), 234 deletions(-) create mode 100644 package/buildroot-libtool-v1.5.patch create mode 100644 package/buildroot-libtool-v2.2.patch delete mode 100644 package/buildroot-libtool.patch delete mode 100644
Quoted 7 lines
package/libdaemon/libdeamon-0.14-buildroot-libtool.patchQuoted 1 line
delete mode 100644
package/multimedia/libogg/libogg-1.2.0-buildroot-libtool.patchQuoted 1 line
delete mode 100644
package/multimedia/libvorbis/libvorbis-1.3.1-buildroot-libtool.patchQuoted 1 line
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100916/3b6239da/attachment.html>
PATCH 3/5 Removed expat-libdir-la.patch
In reply to Martin BankyNow that expat.mk has been converted to autotools infrastructure, the patch is no longer needed. Autotools will automatically apply the needed patch.
--- package/expat/expat-libdir-la.patch | 77 ----------------------------------- package/expat/expat.mk | 1 - 2 files changed, 0 insertions(+), 78 deletions(-) delete mode 100644 package/expat/expat-libdir-la.patch
package/expat/expat-libdir-la.patch deleted +0 -77
@@ -1,77 +0,0 @@ ---- expat-2.0.0/conftools/ltmain.sh.orig 2007-01-13 14:39:51.000000000 -0700 -+++ expat-2.0.0/conftools/ltmain.sh 2007-01-13 14:39:56.000000000 -0700 -@@ -273,8 +273,9 @@ - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit $EXIT_FAILURE -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# exit $EXIT_FAILURE - # else - # $echo "$modename: using $tagname tagged configuration" - fi -@@ -2404,8 +2405,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 - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -2886,6 +2893,16 @@ - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" -+# This interferes with crosscompilation. -CL -+# 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 -+# exit 1 -+# fi -+# if test "$absdir" != "$libdir"; then -+# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+# fi - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then -@@ -5598,6 +5615,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -@@ -5919,10 +5940,13 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- if test "$inst_prefix_dir" = "$destdir"; then -- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -- exit $EXIT_FAILURE -- fi -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command.
package/expat/expat.mk +0 -1
@@ -7,7 +7,6 @@ EXPAT_VERSION = 2.0.1 EXPAT_SOURCE = expat-$(EXPAT_VERSION).tar.gz EXPAT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/expat -EXPAT_LIBTOOL_PATCH = NO EXPAT_INSTALL_STAGING = YES EXPAT_INSTALL_TARGET = YES # no install-strip / install-exec
Signature · 1 line
1.7.2.3
PATCH 4/5 Removed freetype-2.3.9-libdir-la.patch
In reply to Martin BankyNow that freetype.mk has been converted to autotools infrastructure, the patch is no longer needed. Autotools will automatically apply the needed patch.
--- package/freetype/freetype-2.3.9-libdir-la.patch | 81 ----------------------- package/freetype/freetype.mk | 1 - 2 files changed, 0 insertions(+), 82 deletions(-) delete mode 100644 package/freetype/freetype-2.3.9-libdir-la.patch
package/freetype/freetype-2.3.9-libdir-la.patch deleted +0 -81
@@ -1,81 +0,0 @@ -diff -urN freetype-2.3.7.orig/builds/unix/ltmain.sh freetype-2.3.7/builds/unix/ltmain.sh ---- freetype-2.3.7.orig/builds/unix/ltmain.sh 2008-09-16 15:55:36.000000000 +0100 -+++ freetype-2.3.7/builds/unix/ltmain.sh 2008-09-22 09:18:36.000000000 +0100 -@@ -1047,8 +1047,9 @@ - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then -- func_echo "unable to infer tagged configuration" -- func_fatal_error "specify a tag with \`--tag'" -+ func_echo "unable to infer tagged configuration" -+ func_echo "$modename: defaulting to \`CC'" -+ func_echo "$modename: if this is not correct, specify a tag with \`--tag'" - # else - # func_verbose "using $tagname tagged configuration" - fi -@@ -2017,8 +2018,11 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- test "$inst_prefix_dir" = "$destdir" && \ -- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" -+ # -+ # This breaks install into our staging area. -PB -+ # -+ #test "$inst_prefix_dir" = "$destdir" && \ -+ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. -@@ -4885,8 +4889,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 - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5408,13 +5418,16 @@ - ;; - esac - else -- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -- test -z "$libdir" && \ -- func_fatal_error "\`$deplib' is not a valid libtool archive" -- test "$absdir" != "$libdir" && \ -- func_warning "\`$deplib' seems to be moved" -- -- path="-L$absdir" -+# This interferes with crosscompilation. -CL -+# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+# test -z "$libdir" && \ -+# func_fatal_error "\`$deplib' is not a valid libtool archive" -+# test "$absdir" != "$libdir" && \ -+# func_warning "\`$deplib' seems to be moved" -+# -+# path="-L$absdir" -+ path="-L$absdir/$objdir" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - fi - ;; - esac -@@ -7520,6 +7533,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib"
package/freetype/freetype.mk +0 -1
@@ -6,7 +6,6 @@ FREETYPE_VERSION = 2.3.12 FREETYPE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/freetype FREETYPE_SOURCE = freetype-$(FREETYPE_VERSION).tar.bz2 -FREETYPE_LIBTOOL_PATCH = NO FREETYPE_INSTALL_STAGING = YES FREETYPE_INSTALL_TARGET = YES FREETYPE_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
Signature · 1 line
1.7.2.3
PATCH 5/5 Removed libmpd-0.17.0-libdir-la.patch
In reply to Martin BankyNow that libmpd.mk has been converted to autotools infrastructure, the patch is no longer needed. Autotools will automatically apply the needed patch.
--- .../libmpd/libmpd-0.17.0-libdir-la.patch | 89 -------------------- package/multimedia/libmpd/libmpd.mk | 1 - 2 files changed, 0 insertions(+), 90 deletions(-) delete mode 100644 package/multimedia/libmpd/libmpd-0.17.0-libdir-la.patch
package/multimedia/libmpd/libmpd-0.17.0-libdir-la.patch deleted +0 -89
@@ -1,89 +0,0 @@ ---- - ltmain.sh | 39 +++++++++++++++++++++++++++++++++------ - 1 file changed, 33 insertions(+), 6 deletions(-) - -Index: libmpd-0.17.0/ltmain.sh -=================================================================== ---- libmpd-0.17.0.orig/ltmain.sh -+++ libmpd-0.17.0/ltmain.sh -@@ -1056,7 +1056,9 @@ - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" -- func_fatal_error "specify a tag with \`--tag'" -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# func_fatal_error "specify a tag with \`--tag'" - # else - # func_verbose "using $tagname tagged configuration" - fi -@@ -2025,8 +2027,13 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- test "$inst_prefix_dir" = "$destdir" && \ -- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. -@@ -5419,8 +5426,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 - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5571,7 +5584,7 @@ - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" -- need_relink=yes -+ need_relink=no - fi - ;; - esac -@@ -5901,6 +5914,16 @@ - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in -+# This interferes with crosscompilation. -CL -+# 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 -+# exit 1 -+# fi -+# if test "$absdir" != "$libdir"; then -+# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+# fi - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." -@@ -8059,6 +8082,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib"
package/multimedia/libmpd/libmpd.mk +0 -1
@@ -7,7 +7,6 @@ LIBMPD_VERSION = 0.17.0 LIBMPD_SOURCE = libmpd-$(LIBMPD_VERSION).tar.gz LIBMPD_SITE = http://download.sarine.nl/download/Programs/gmpc/$(LIBMPD_VERSION)/ LIBMPD_INSTALL_STAGING = YES -LIBMPD_LIBTOOL_PATCH = NO LIBMPD_DEPENDENCIES = libglib2 $(eval $(call AUTOTARGETS,package/multimedia,libmpd))
Signature · 1 line
1.7.2.3