libmpd-0.17.0-libdir-la.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ---
  2. ltmain.sh | 39 +++++++++++++++++++++++++++++++++------
  3. 1 file changed, 33 insertions(+), 6 deletions(-)
  4. Index: libmpd-0.17.0/ltmain.sh
  5. ===================================================================
  6. --- libmpd-0.17.0.orig/ltmain.sh
  7. +++ libmpd-0.17.0/ltmain.sh
  8. @@ -1056,7 +1056,9 @@
  9. # line option must be used.
  10. if test -z "$tagname"; then
  11. func_echo "unable to infer tagged configuration"
  12. - func_fatal_error "specify a tag with \`--tag'"
  13. + $echo "$modename: defaulting to \`CC'"
  14. + $echo "$modename: if this is not correct, specify a tag with \`--tag'"
  15. +# func_fatal_error "specify a tag with \`--tag'"
  16. # else
  17. # func_verbose "using $tagname tagged configuration"
  18. fi
  19. @@ -2025,8 +2027,13 @@
  20. # At present, this check doesn't affect windows .dll's that
  21. # are installed into $libdir/../bin (currently, that works fine)
  22. # but it's something to keep an eye on.
  23. - test "$inst_prefix_dir" = "$destdir" && \
  24. - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  25. + #
  26. + # This breaks install into our staging area. -PB
  27. + #
  28. + # if test "$inst_prefix_dir" = "$destdir"; then
  29. + # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  30. + # exit $EXIT_FAILURE
  31. + # fi
  32. if test -n "$inst_prefix_dir"; then
  33. # Stick the inst_prefix_dir data into the link command.
  34. @@ -5419,8 +5426,14 @@
  35. absdir="$abs_ladir"
  36. libdir="$abs_ladir"
  37. else
  38. - dir="$libdir"
  39. - absdir="$libdir"
  40. + # Adding 'libdir' from the .la file to our library search paths
  41. + # breaks crosscompilation horribly. We cheat here and don't add
  42. + # it, instead adding the path where we found the .la. -CL
  43. + dir="$abs_ladir"
  44. + absdir="$abs_ladir"
  45. + libdir="$abs_ladir"
  46. + #dir="$libdir"
  47. + #absdir="$libdir"
  48. fi
  49. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  50. else
  51. @@ -5571,7 +5584,7 @@
  52. *)
  53. if test "$installed" = no; then
  54. notinst_deplibs="$notinst_deplibs $lib"
  55. - need_relink=yes
  56. + need_relink=no
  57. fi
  58. ;;
  59. esac
  60. @@ -5901,6 +5914,16 @@
  61. # Add the search paths of all dependency libraries
  62. for deplib in $dependency_libs; do
  63. case $deplib in
  64. +# This interferes with crosscompilation. -CL
  65. +# else
  66. +# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  67. +# if test -z "$libdir"; then
  68. +# $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  69. +# exit 1
  70. +# fi
  71. +# if test "$absdir" != "$libdir"; then
  72. +# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
  73. +# fi
  74. -L*) path="$deplib" ;;
  75. *.la)
  76. func_dirname "$deplib" "" "."
  77. @@ -8059,6 +8082,10 @@
  78. # Replace all uninstalled libtool libraries with the installed ones
  79. newdependency_libs=
  80. for deplib in $dependency_libs; do
  81. + # Replacing uninstalled with installed can easily break crosscompilation,
  82. + # since the installed path is generally the wrong architecture. -CL
  83. + newdependency_libs="$newdependency_libs $deplib"
  84. + continue
  85. case $deplib in
  86. *.la)
  87. func_basename "$deplib"