libtool-v2.2.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. --- a/ltmain.sh
  2. +++ b/ltmain.sh
  3. @@ -243,7 +243,7 @@ opt_warning=:
  4. # name if it has been set yet.
  5. func_echo ()
  6. {
  7. - $ECHO "$progname${mode+: }$mode: $*"
  8. + $ECHO "libreCMC-$progname-patched-2.2${mode+: }$mode: $*"
  9. }
  10. # func_verbose arg...
  11. @@ -262,14 +262,14 @@ func_verbose ()
  12. # Echo program name prefixed message to standard error.
  13. func_error ()
  14. {
  15. - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
  16. + $ECHO "libreCMC-$progname-patched-2.2${mode+: }$mode: "${1+"$@"} 1>&2
  17. }
  18. # func_warning arg...
  19. # Echo program name prefixed warning message to standard error.
  20. func_warning ()
  21. {
  22. - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
  23. + $opt_warning && $ECHO "libreCMC-$progname-patched-2.2${mode+: }$mode: warning: "${1+"$@"} 1>&2
  24. # bash bug again:
  25. :
  26. @@ -1048,8 +1048,8 @@ func_infer_tag ()
  27. # was found and let the user know that the "--tag" command
  28. # line option must be used.
  29. if test -z "$tagname"; then
  30. - func_echo "unable to infer tagged configuration"
  31. - func_fatal_error "specify a tag with \`--tag'"
  32. + func_echo "defaulting to \`CC'"
  33. + func_echo "if this is not correct, specify a tag with \`--tag'"
  34. # else
  35. # func_verbose "using $tagname tagged configuration"
  36. fi
  37. @@ -2009,8 +2009,15 @@ func_mode_install ()
  38. dir="$dir$objdir"
  39. if test -n "$relink_command"; then
  40. + # Strip any trailing slash from the destination.
  41. + func_stripname '' '/' "$libdir"
  42. + s_libdir=$func_stripname_result
  43. +
  44. + func_stripname '' '/' "$destdir"
  45. + s_destdir=$func_stripname_result
  46. +
  47. # Determine the prefix the user has applied to our future dir.
  48. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
  49. + inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$s_libdir\$%%"`
  50. # Don't allow the user to place us outside of our expected
  51. # location b/c this prevents finding dependent libraries that
  52. @@ -2018,8 +2025,11 @@ func_mode_install ()
  53. # At present, this check doesn't affect windows .dll's that
  54. # are installed into $libdir/../bin (currently, that works fine)
  55. # but it's something to keep an eye on.
  56. - test "$inst_prefix_dir" = "$destdir" && \
  57. - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  58. + #
  59. + # This breaks install into our staging area. -PB
  60. + #
  61. + # test "$inst_prefix_dir" = "$destdir" && \
  62. + # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  63. if test -n "$inst_prefix_dir"; then
  64. # Stick the inst_prefix_dir data into the link command.
  65. @@ -2028,6 +2038,9 @@ func_mode_install ()
  66. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
  67. fi
  68. + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
  69. + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
  70. +
  71. func_warning "relinking \`$file'"
  72. func_show_eval "$relink_command" \
  73. 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
  74. @@ -5412,8 +5425,12 @@ func_mode_link ()
  75. absdir="$abs_ladir"
  76. libdir="$abs_ladir"
  77. else
  78. - dir="$libdir"
  79. - absdir="$libdir"
  80. + # Adding 'libdir' from the .la file to our library search paths
  81. + # breaks crosscompilation horribly. We cheat here and don't add
  82. + # it, instead adding the path where we found the .la. -CL
  83. + dir="$abs_ladir"
  84. + absdir="$abs_ladir"
  85. + libdir="$abs_ladir"
  86. fi
  87. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  88. else
  89. @@ -5564,7 +5581,7 @@ func_mode_link ()
  90. *)
  91. if test "$installed" = no; then
  92. notinst_deplibs="$notinst_deplibs $lib"
  93. - need_relink=yes
  94. + need_relink=no
  95. fi
  96. ;;
  97. esac
  98. @@ -5768,7 +5785,6 @@ func_mode_link ()
  99. test "$hardcode_direct_absolute" = no; then
  100. add="$libdir/$linklib"
  101. elif test "$hardcode_minus_L" = yes; then
  102. - add_dir="-L$libdir"
  103. add="-l$name"
  104. elif test "$hardcode_shlibpath_var" = yes; then
  105. case :$finalize_shlibpath: in
  106. @@ -8052,6 +8068,10 @@ EOF
  107. # Replace all uninstalled libtool libraries with the installed ones
  108. newdependency_libs=
  109. for deplib in $dependency_libs; do
  110. + # Replacing uninstalled with installed can easily break crosscompilation,
  111. + # since the installed path is generally the wrong architecture. -CL
  112. + newdependency_libs="$newdependency_libs $deplib"
  113. + continue
  114. case $deplib in
  115. *.la)
  116. func_basename "$deplib"