patch-ltmain_sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. --- libxslt-1.1.37.orig/ltmain.sh 2022-08-17 15:33:08.000000000 +0200
  2. +++ libxslt-1.1.37/ltmain.sh 2023-01-04 18:05:32.281243849 +0100
  3. @@ -31,7 +31,7 @@
  4. PROGRAM=libtool
  5. PACKAGE=libtool
  6. -VERSION="2.4.6 Debian-2.4.6-14"
  7. +VERSION=2.4.6
  8. package_revision=2.4.6
  9. @@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indi
  10. # putting '$debug_cmd' at the start of all your functions, you can get
  11. # bash to show function call trace with:
  12. #
  13. -# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
  14. +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
  15. debug_cmd=${debug_cmd-":"}
  16. exit_cmd=:
  17. @@ -1370,7 +1370,7 @@ func_lt_ver ()
  18. #! /bin/sh
  19. # Set a version string for this script.
  20. -scriptversion=2015-10-07.11; # UTC
  21. +scriptversion=2014-01-07.03; # UTC
  22. # A portable, pluggable option parser for Bourne shell.
  23. # Written by Gary V. Vaughan, 2010
  24. @@ -1530,8 +1530,6 @@ func_run_hooks ()
  25. {
  26. $debug_cmd
  27. - _G_rc_run_hooks=false
  28. -
  29. case " $hookable_fns " in
  30. *" $1 "*) ;;
  31. *) func_fatal_error "'$1' does not support hook funcions.n" ;;
  32. @@ -1540,16 +1538,16 @@ func_run_hooks ()
  33. eval _G_hook_fns=\$$1_hooks; shift
  34. for _G_hook in $_G_hook_fns; do
  35. - if eval $_G_hook '"$@"'; then
  36. - # store returned options list back into positional
  37. - # parameters for next 'cmd' execution.
  38. - eval _G_hook_result=\$${_G_hook}_result
  39. - eval set dummy "$_G_hook_result"; shift
  40. - _G_rc_run_hooks=:
  41. - fi
  42. + eval $_G_hook '"$@"'
  43. +
  44. + # store returned options list back into positional
  45. + # parameters for next 'cmd' execution.
  46. + eval _G_hook_result=\$${_G_hook}_result
  47. + eval set dummy "$_G_hook_result"; shift
  48. done
  49. - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
  50. + func_quote_for_eval ${1+"$@"}
  51. + func_run_hooks_result=$func_quote_for_eval_result
  52. }
  53. @@ -1559,16 +1557,10 @@ func_run_hooks ()
  54. ## --------------- ##
  55. # In order to add your own option parsing hooks, you must accept the
  56. -# full positional parameter list in your hook function, you may remove/edit
  57. -# any options that you action, and then pass back the remaining unprocessed
  58. +# full positional parameter list in your hook function, remove any
  59. +# options that you action, and then pass back the remaining unprocessed
  60. # options in '<hooked_function_name>_result', escaped suitably for
  61. -# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
  62. -# hook's caller know that it should pay attention to
  63. -# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
  64. -# arguments are left untouched by the hook and therefore caller will ignore the
  65. -# result variable.
  66. -#
  67. -# Like this:
  68. +# 'eval'. Like this:
  69. #
  70. # my_options_prep ()
  71. # {
  72. @@ -1578,11 +1570,9 @@ func_run_hooks ()
  73. # usage_message=$usage_message'
  74. # -s, --silent don'\''t print informational messages
  75. # '
  76. -# # No change in '$@' (ignored completely by this hook). There is
  77. -# # no need to do the equivalent (but slower) action:
  78. -# # func_quote_for_eval ${1+"$@"}
  79. -# # my_options_prep_result=$func_quote_for_eval_result
  80. -# false
  81. +#
  82. +# func_quote_for_eval ${1+"$@"}
  83. +# my_options_prep_result=$func_quote_for_eval_result
  84. # }
  85. # func_add_hook func_options_prep my_options_prep
  86. #
  87. @@ -1591,37 +1581,25 @@ func_run_hooks ()
  88. # {
  89. # $debug_cmd
  90. #
  91. -# args_changed=false
  92. -#
  93. # # Note that for efficiency, we parse as many options as we can
  94. # # recognise in a loop before passing the remainder back to the
  95. # # caller on the first unrecognised argument we encounter.
  96. # while test $# -gt 0; do
  97. # opt=$1; shift
  98. # case $opt in
  99. -# --silent|-s) opt_silent=:
  100. -# args_changed=:
  101. -# ;;
  102. +# --silent|-s) opt_silent=: ;;
  103. # # Separate non-argument short options:
  104. # -s*) func_split_short_opt "$_G_opt"
  105. # set dummy "$func_split_short_opt_name" \
  106. # "-$func_split_short_opt_arg" ${1+"$@"}
  107. # shift
  108. -# args_changed=:
  109. # ;;
  110. -# *) # Make sure the first unrecognised option "$_G_opt"
  111. -# # is added back to "$@", we could need that later
  112. -# # if $args_changed is true.
  113. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
  114. +# *) set dummy "$_G_opt" "$*"; shift; break ;;
  115. # esac
  116. # done
  117. #
  118. -# if $args_changed; then
  119. -# func_quote_for_eval ${1+"$@"}
  120. -# my_silent_option_result=$func_quote_for_eval_result
  121. -# fi
  122. -#
  123. -# $args_changed
  124. +# func_quote_for_eval ${1+"$@"}
  125. +# my_silent_option_result=$func_quote_for_eval_result
  126. # }
  127. # func_add_hook func_parse_options my_silent_option
  128. #
  129. @@ -1633,32 +1611,16 @@ func_run_hooks ()
  130. # $opt_silent && $opt_verbose && func_fatal_help "\
  131. # '--silent' and '--verbose' options are mutually exclusive."
  132. #
  133. -# false
  134. +# func_quote_for_eval ${1+"$@"}
  135. +# my_option_validation_result=$func_quote_for_eval_result
  136. # }
  137. # func_add_hook func_validate_options my_option_validation
  138. #
  139. -# You'll also need to manually amend $usage_message to reflect the extra
  140. +# You'll alse need to manually amend $usage_message to reflect the extra
  141. # options you parse. It's preferable to append if you can, so that
  142. # multiple option parsing hooks can be added safely.
  143. -# func_options_finish [ARG]...
  144. -# ----------------------------
  145. -# Finishing the option parse loop (call 'func_options' hooks ATM).
  146. -func_options_finish ()
  147. -{
  148. - $debug_cmd
  149. -
  150. - _G_func_options_finish_exit=false
  151. - if func_run_hooks func_options ${1+"$@"}; then
  152. - func_options_finish_result=$func_run_hooks_result
  153. - _G_func_options_finish_exit=:
  154. - fi
  155. -
  156. - $_G_func_options_finish_exit
  157. -}
  158. -
  159. -
  160. # func_options [ARG]...
  161. # ---------------------
  162. # All the functions called inside func_options are hookable. See the
  163. @@ -1668,28 +1630,17 @@ func_options ()
  164. {
  165. $debug_cmd
  166. - _G_rc_options=false
  167. -
  168. - for my_func in options_prep parse_options validate_options options_finish
  169. - do
  170. - if eval func_$my_func '${1+"$@"}'; then
  171. - eval _G_res_var='$'"func_${my_func}_result"
  172. - eval set dummy "$_G_res_var" ; shift
  173. - _G_rc_options=:
  174. - fi
  175. - done
  176. + func_options_prep ${1+"$@"}
  177. + eval func_parse_options \
  178. + ${func_options_prep_result+"$func_options_prep_result"}
  179. + eval func_validate_options \
  180. + ${func_parse_options_result+"$func_parse_options_result"}
  181. - # Save modified positional parameters for caller. As a top-level
  182. - # options-parser function we always need to set the 'func_options_result'
  183. - # variable (regardless the $_G_rc_options value).
  184. - if $_G_rc_options; then
  185. - func_options_result=$_G_res_var
  186. - else
  187. - func_quote_for_eval ${1+"$@"}
  188. - func_options_result=$func_quote_for_eval_result
  189. - fi
  190. + eval func_run_hooks func_options \
  191. + ${func_validate_options_result+"$func_validate_options_result"}
  192. - $_G_rc_options
  193. + # save modified positional parameters for caller
  194. + func_options_result=$func_run_hooks_result
  195. }
  196. @@ -1698,9 +1649,9 @@ func_options ()
  197. # All initialisations required before starting the option parse loop.
  198. # Note that when calling hook functions, we pass through the list of
  199. # positional parameters. If a hook function modifies that list, and
  200. -# needs to propagate that back to rest of this script, then the complete
  201. +# needs to propogate that back to rest of this script, then the complete
  202. # modified list must be put in 'func_run_hooks_result' before
  203. -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
  204. +# returning.
  205. func_hookable func_options_prep
  206. func_options_prep ()
  207. {
  208. @@ -1710,14 +1661,10 @@ func_options_prep ()
  209. opt_verbose=false
  210. opt_warning_types=
  211. - _G_rc_options_prep=false
  212. - if func_run_hooks func_options_prep ${1+"$@"}; then
  213. - _G_rc_options_prep=:
  214. - # save modified positional parameters for caller
  215. - func_options_prep_result=$func_run_hooks_result
  216. - fi
  217. + func_run_hooks func_options_prep ${1+"$@"}
  218. - $_G_rc_options_prep
  219. + # save modified positional parameters for caller
  220. + func_options_prep_result=$func_run_hooks_result
  221. }
  222. @@ -1731,20 +1678,18 @@ func_parse_options ()
  223. func_parse_options_result=
  224. - _G_rc_parse_options=false
  225. # this just eases exit handling
  226. while test $# -gt 0; do
  227. # Defer to hook functions for initial option parsing, so they
  228. # get priority in the event of reusing an option name.
  229. - if func_run_hooks func_parse_options ${1+"$@"}; then
  230. - eval set dummy "$func_run_hooks_result"; shift
  231. - _G_rc_parse_options=:
  232. - fi
  233. + func_run_hooks func_parse_options ${1+"$@"}
  234. +
  235. + # Adjust func_parse_options positional parameters to match
  236. + eval set dummy "$func_run_hooks_result"; shift
  237. # Break out of the loop if we already parsed every option.
  238. test $# -gt 0 || break
  239. - _G_match_parse_options=:
  240. _G_opt=$1
  241. shift
  242. case $_G_opt in
  243. @@ -1759,10 +1704,7 @@ func_parse_options ()
  244. ;;
  245. --warnings|--warning|-W)
  246. - if test $# = 0 && func_missing_arg $_G_opt; then
  247. - _G_rc_parse_options=:
  248. - break
  249. - fi
  250. + test $# = 0 && func_missing_arg $_G_opt && break
  251. case " $warning_categories $1" in
  252. *" $1 "*)
  253. # trailing space prevents matching last $1 above
  254. @@ -1815,25 +1757,15 @@ func_parse_options ()
  255. shift
  256. ;;
  257. - --) _G_rc_parse_options=: ; break ;;
  258. + --) break ;;
  259. -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
  260. - *) set dummy "$_G_opt" ${1+"$@"}; shift
  261. - _G_match_parse_options=false
  262. - break
  263. - ;;
  264. + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
  265. esac
  266. -
  267. - $_G_match_parse_options && _G_rc_parse_options=:
  268. done
  269. -
  270. - if $_G_rc_parse_options; then
  271. - # save modified positional parameters for caller
  272. - func_quote_for_eval ${1+"$@"}
  273. - func_parse_options_result=$func_quote_for_eval_result
  274. - fi
  275. -
  276. - $_G_rc_parse_options
  277. + # save modified positional parameters for caller
  278. + func_quote_for_eval ${1+"$@"}
  279. + func_parse_options_result=$func_quote_for_eval_result
  280. }
  281. @@ -1846,21 +1778,16 @@ func_validate_options ()
  282. {
  283. $debug_cmd
  284. - _G_rc_validate_options=false
  285. -
  286. # Display all warnings if -W was not given.
  287. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
  288. - if func_run_hooks func_validate_options ${1+"$@"}; then
  289. - # save modified positional parameters for caller
  290. - func_validate_options_result=$func_run_hooks_result
  291. - _G_rc_validate_options=:
  292. - fi
  293. + func_run_hooks func_validate_options ${1+"$@"}
  294. # Bail if the options were screwed!
  295. $exit_cmd $EXIT_FAILURE
  296. - $_G_rc_validate_options
  297. + # save modified positional parameters for caller
  298. + func_validate_options_result=$func_run_hooks_result
  299. }
  300. @@ -2141,12 +2068,12 @@ include the following information:
  301. compiler: $LTCC
  302. compiler flags: $LTCFLAGS
  303. linker: $LD (gnu? $with_gnu_ld)
  304. - version: $progname $scriptversion Debian-2.4.6-14
  305. + version: $progname (GNU libtool) 2.4.6
  306. automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
  307. autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
  308. Report bugs to <bug-libtool@gnu.org>.
  309. -GNU libtool home page: <http://www.gnu.org/s/libtool/>.
  310. +GNU libtool home page: <http://www.gnu.org/software/libtool/>.
  311. General help using GNU software: <http://www.gnu.org/gethelp/>."
  312. exit 0
  313. }
  314. @@ -2343,8 +2270,6 @@ libtool_options_prep ()
  315. nonopt=
  316. preserve_args=
  317. - _G_rc_lt_options_prep=:
  318. -
  319. # Shorthand for --mode=foo, only valid as the first argument
  320. case $1 in
  321. clean|clea|cle|cl)
  322. @@ -2368,18 +2293,11 @@ libtool_options_prep ()
  323. uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
  324. shift; set dummy --mode uninstall ${1+"$@"}; shift
  325. ;;
  326. - *)
  327. - _G_rc_lt_options_prep=false
  328. - ;;
  329. esac
  330. - if $_G_rc_lt_options_prep; then
  331. - # Pass back the list of options.
  332. - func_quote_for_eval ${1+"$@"}
  333. - libtool_options_prep_result=$func_quote_for_eval_result
  334. - fi
  335. -
  336. - $_G_rc_lt_options_prep
  337. + # Pass back the list of options.
  338. + func_quote_for_eval ${1+"$@"}
  339. + libtool_options_prep_result=$func_quote_for_eval_result
  340. }
  341. func_add_hook func_options_prep libtool_options_prep
  342. @@ -2391,12 +2309,9 @@ libtool_parse_options ()
  343. {
  344. $debug_cmd
  345. - _G_rc_lt_parse_options=false
  346. -
  347. # Perform our own loop to consume as many options as possible in
  348. # each iteration.
  349. while test $# -gt 0; do
  350. - _G_match_lt_parse_options=:
  351. _G_opt=$1
  352. shift
  353. case $_G_opt in
  354. @@ -2471,22 +2386,15 @@ libtool_parse_options ()
  355. func_append preserve_args " $_G_opt"
  356. ;;
  357. - # An option not handled by this hook function:
  358. - *) set dummy "$_G_opt" ${1+"$@"} ; shift
  359. - _G_match_lt_parse_options=false
  360. - break
  361. - ;;
  362. + # An option not handled by this hook function:
  363. + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
  364. esac
  365. - $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
  366. done
  367. - if $_G_rc_lt_parse_options; then
  368. - # save modified positional parameters for caller
  369. - func_quote_for_eval ${1+"$@"}
  370. - libtool_parse_options_result=$func_quote_for_eval_result
  371. - fi
  372. - $_G_rc_lt_parse_options
  373. + # save modified positional parameters for caller
  374. + func_quote_for_eval ${1+"$@"}
  375. + libtool_parse_options_result=$func_quote_for_eval_result
  376. }
  377. func_add_hook func_parse_options libtool_parse_options
  378. @@ -7364,16 +7272,10 @@ func_mode_link ()
  379. # -tp=* Portland pgcc target processor selection
  380. # --sysroot=* for sysroot support
  381. # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
  382. - # -specs=* GCC specs files
  383. # -stdlib=* select c++ std lib with clang
  384. - # -fsanitize=* Clang/GCC memory and address sanitizer
  385. - # -fuse-ld=* Linker select flags for GCC
  386. - # -static-* direct GCC to link specific libraries statically
  387. - # -fcilkplus Cilk Plus language extension features for C/C++
  388. -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
  389. -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
  390. - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
  391. - -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
  392. + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
  393. func_quote_for_eval "$arg"
  394. arg=$func_quote_for_eval_result
  395. func_append compile_command " $arg"
  396. @@ -7666,10 +7568,7 @@ func_mode_link ()
  397. case $pass in
  398. dlopen) libs=$dlfiles ;;
  399. dlpreopen) libs=$dlprefiles ;;
  400. - link)
  401. - libs="$deplibs %DEPLIBS%"
  402. - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
  403. - ;;
  404. + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
  405. esac
  406. fi
  407. if test lib,dlpreopen = "$linkmode,$pass"; then
  408. @@ -7988,19 +7887,19 @@ func_mode_link ()
  409. # It is a libtool convenience library, so add in its objects.
  410. func_append convenience " $ladir/$objdir/$old_library"
  411. func_append old_convenience " $ladir/$objdir/$old_library"
  412. - tmp_libs=
  413. - for deplib in $dependency_libs; do
  414. - deplibs="$deplib $deplibs"
  415. - if $opt_preserve_dup_deps; then
  416. - case "$tmp_libs " in
  417. - *" $deplib "*) func_append specialdeplibs " $deplib" ;;
  418. - esac
  419. - fi
  420. - func_append tmp_libs " $deplib"
  421. - done
  422. elif test prog != "$linkmode" && test lib != "$linkmode"; then
  423. func_fatal_error "'$lib' is not a convenience library"
  424. fi
  425. + tmp_libs=
  426. + for deplib in $dependency_libs; do
  427. + deplibs="$deplib $deplibs"
  428. + if $opt_preserve_dup_deps; then
  429. + case "$tmp_libs " in
  430. + *" $deplib "*) func_append specialdeplibs " $deplib" ;;
  431. + esac
  432. + fi
  433. + func_append tmp_libs " $deplib"
  434. + done
  435. continue
  436. fi # $pass = conv
  437. @@ -8924,9 +8823,6 @@ func_mode_link ()
  438. revision=$number_minor
  439. lt_irix_increment=no
  440. ;;
  441. - *)
  442. - func_fatal_configuration "$modename: unknown library version type '$version_type'"
  443. - ;;
  444. esac
  445. ;;
  446. no)