patch-build-aux_missing 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. --- libsoup-2.44.2.orig/build-aux/missing 2013-10-18 00:01:48.000000000 +0200
  2. +++ libsoup-2.44.2/build-aux/missing 2014-04-14 17:21:42.180934853 +0200
  3. @@ -1,10 +1,10 @@
  4. #! /bin/sh
  5. -# Common wrapper for a few potentially missing GNU programs.
  6. +# Common stub for a few missing GNU programs while installing.
  7. -scriptversion=2012-06-26.16; # UTC
  8. +scriptversion=2012-01-06.18; # UTC
  9. -# Copyright (C) 1996-2013 Free Software Foundation, Inc.
  10. -# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
  11. +# Copyright (C) 1996-2012 Free Software Foundation, Inc.
  12. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. @@ -29,33 +29,61 @@ if test $# -eq 0; then
  16. exit 1
  17. fi
  18. -case $1 in
  19. +run=:
  20. +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
  21. +sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
  22. - --is-lightweight)
  23. - # Used by our autoconf macros to check whether the available missing
  24. - # script is modern enough.
  25. - exit 0
  26. - ;;
  27. +# In the cases where this matters, 'missing' is being run in the
  28. +# srcdir already.
  29. +if test -f configure.ac; then
  30. + configure_ac=configure.ac
  31. +else
  32. + configure_ac=configure.in
  33. +fi
  34. - --run)
  35. - # Back-compat with the calling convention used by older automake.
  36. - shift
  37. - ;;
  38. +msg="missing on your system"
  39. +
  40. +case $1 in
  41. +--run)
  42. + # Try to run requested program, and just exit if it succeeds.
  43. + run=
  44. + shift
  45. + "$@" && exit 0
  46. + # Exit code 63 means version mismatch. This often happens
  47. + # when the user try to use an ancient version of a tool on
  48. + # a file that requires a minimum version. In this case we
  49. + # we should proceed has if the program had been absent, or
  50. + # if --run hadn't been passed.
  51. + if test $? = 63; then
  52. + run=:
  53. + msg="probably too old"
  54. + fi
  55. + ;;
  56. -h|--h|--he|--hel|--help)
  57. echo "\
  58. $0 [OPTION]... PROGRAM [ARGUMENT]...
  59. -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
  60. -to PROGRAM being missing or too old.
  61. +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
  62. +error status if there is no known handling for PROGRAM.
  63. Options:
  64. -h, --help display this help and exit
  65. -v, --version output version information and exit
  66. + --run try to run the given command, and emulate it if it fails
  67. Supported PROGRAM values:
  68. - aclocal autoconf autoheader autom4te automake makeinfo
  69. - bison yacc flex lex help2man
  70. + aclocal touch file 'aclocal.m4'
  71. + autoconf touch file 'configure'
  72. + autoheader touch file 'config.h.in'
  73. + autom4te touch the output file, or create a stub one
  74. + automake touch all 'Makefile.in' files
  75. + bison create 'y.tab.[ch]', if possible, from existing .[ch]
  76. + flex create 'lex.yy.c', if possible, from existing .c
  77. + help2man touch the output file
  78. + lex create 'lex.yy.c', if possible, from existing .c
  79. + makeinfo touch the output file
  80. + yacc create 'y.tab.[ch]', if possible, from existing .[ch]
  81. Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
  82. 'g' are ignored when checking the name.
  83. @@ -70,141 +98,228 @@ Send bug reports to <bug-automake@gnu.or
  84. ;;
  85. -*)
  86. - echo 1>&2 "$0: unknown '$1' option"
  87. + echo 1>&2 "$0: Unknown '$1' option"
  88. echo 1>&2 "Try '$0 --help' for more information"
  89. exit 1
  90. ;;
  91. esac
  92. -# Run the given program, remember its exit status.
  93. -"$@"; st=$?
  94. +# normalize program name to check for.
  95. +program=`echo "$1" | sed '
  96. + s/^gnu-//; t
  97. + s/^gnu//; t
  98. + s/^g//; t'`
  99. -# If it succeeded, we are done.
  100. -test $st -eq 0 && exit 0
  101. +# Now exit if we have it, but it failed. Also exit now if we
  102. +# don't have it and --version was passed (most likely to detect
  103. +# the program). This is about non-GNU programs, so use $1 not
  104. +# $program.
  105. +case $1 in
  106. + lex*|yacc*)
  107. + # Not GNU programs, they don't have --version.
  108. + ;;
  109. -# Also exit now if we it failed (or wasn't found), and '--version' was
  110. -# passed; such an option is passed most likely to detect whether the
  111. -# program is present and works.
  112. -case $2 in --version|--help) exit $st;; esac
  113. + *)
  114. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  115. + # We have it, but it failed.
  116. + exit 1
  117. + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
  118. + # Could not run --version or --help. This is probably someone
  119. + # running '$TOOL --version' or '$TOOL --help' to check whether
  120. + # $TOOL exists and not knowing $TOOL uses missing.
  121. + exit 1
  122. + fi
  123. + ;;
  124. +esac
  125. -# Exit code 63 means version mismatch. This often happens when the user
  126. -# tries to use an ancient version of a tool on a file that requires a
  127. -# minimum version.
  128. -if test $st -eq 63; then
  129. - msg="probably too old"
  130. -elif test $st -eq 127; then
  131. - # Program was missing.
  132. - msg="missing on your system"
  133. -else
  134. - # Program was found and executed, but failed. Give up.
  135. - exit $st
  136. -fi
  137. +# If it does not exist, or fails to run (possibly an outdated version),
  138. +# try to emulate it.
  139. +case $program in
  140. + aclocal*)
  141. + echo 1>&2 "\
  142. +WARNING: '$1' is $msg. You should only need it if
  143. + you modified 'acinclude.m4' or '${configure_ac}'. You might want
  144. + to install the Automake and Perl packages. Grab them from
  145. + any GNU archive site."
  146. + touch aclocal.m4
  147. + ;;
  148. -perl_URL=http://www.perl.org/
  149. -flex_URL=http://flex.sourceforge.net/
  150. -gnu_software_URL=http://www.gnu.org/software
  151. + autoconf*)
  152. + echo 1>&2 "\
  153. +WARNING: '$1' is $msg. You should only need it if
  154. + you modified '${configure_ac}'. You might want to install the
  155. + Autoconf and GNU m4 packages. Grab them from any GNU
  156. + archive site."
  157. + touch configure
  158. + ;;
  159. -program_details ()
  160. -{
  161. - case $1 in
  162. - aclocal|automake)
  163. - echo "The '$1' program is part of the GNU Automake package:"
  164. - echo "<$gnu_software_URL/automake>"
  165. - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
  166. - echo "<$gnu_software_URL/autoconf>"
  167. - echo "<$gnu_software_URL/m4/>"
  168. - echo "<$perl_URL>"
  169. - ;;
  170. - autoconf|autom4te|autoheader)
  171. - echo "The '$1' program is part of the GNU Autoconf package:"
  172. - echo "<$gnu_software_URL/autoconf/>"
  173. - echo "It also requires GNU m4 and Perl in order to run:"
  174. - echo "<$gnu_software_URL/m4/>"
  175. - echo "<$perl_URL>"
  176. - ;;
  177. - esac
  178. -}
  179. + autoheader*)
  180. + echo 1>&2 "\
  181. +WARNING: '$1' is $msg. You should only need it if
  182. + you modified 'acconfig.h' or '${configure_ac}'. You might want
  183. + to install the Autoconf and GNU m4 packages. Grab them
  184. + from any GNU archive site."
  185. + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
  186. + test -z "$files" && files="config.h"
  187. + touch_files=
  188. + for f in $files; do
  189. + case $f in
  190. + *:*) touch_files="$touch_files "`echo "$f" |
  191. + sed -e 's/^[^:]*://' -e 's/:.*//'`;;
  192. + *) touch_files="$touch_files $f.in";;
  193. + esac
  194. + done
  195. + touch $touch_files
  196. + ;;
  197. -give_advice ()
  198. -{
  199. - # Normalize program name to check for.
  200. - normalized_program=`echo "$1" | sed '
  201. - s/^gnu-//; t
  202. - s/^gnu//; t
  203. - s/^g//; t'`
  204. + automake*)
  205. + echo 1>&2 "\
  206. +WARNING: '$1' is $msg. You should only need it if
  207. + you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
  208. + You might want to install the Automake and Perl packages.
  209. + Grab them from any GNU archive site."
  210. + find . -type f -name Makefile.am -print |
  211. + sed 's/\.am$/.in/' |
  212. + while read f; do touch "$f"; done
  213. + ;;
  214. - printf '%s\n' "'$1' is $msg."
  215. + autom4te*)
  216. + echo 1>&2 "\
  217. +WARNING: '$1' is needed, but is $msg.
  218. + You might have modified some files without having the
  219. + proper tools for further handling them.
  220. + You can get '$1' as part of Autoconf from any GNU
  221. + archive site."
  222. - configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
  223. - case $normalized_program in
  224. - autoconf*)
  225. - echo "You should only need it if you modified 'configure.ac',"
  226. - echo "or m4 files included by it."
  227. - program_details 'autoconf'
  228. - ;;
  229. - autoheader*)
  230. - echo "You should only need it if you modified 'acconfig.h' or"
  231. - echo "$configure_deps."
  232. - program_details 'autoheader'
  233. - ;;
  234. - automake*)
  235. - echo "You should only need it if you modified 'Makefile.am' or"
  236. - echo "$configure_deps."
  237. - program_details 'automake'
  238. - ;;
  239. - aclocal*)
  240. - echo "You should only need it if you modified 'acinclude.m4' or"
  241. - echo "$configure_deps."
  242. - program_details 'aclocal'
  243. - ;;
  244. - autom4te*)
  245. - echo "You might have modified some maintainer files that require"
  246. - echo "the 'automa4te' program to be rebuilt."
  247. - program_details 'autom4te'
  248. - ;;
  249. - bison*|yacc*)
  250. - echo "You should only need it if you modified a '.y' file."
  251. - echo "You may want to install the GNU Bison package:"
  252. - echo "<$gnu_software_URL/bison/>"
  253. - ;;
  254. - lex*|flex*)
  255. - echo "You should only need it if you modified a '.l' file."
  256. - echo "You may want to install the Fast Lexical Analyzer package:"
  257. - echo "<$flex_URL>"
  258. - ;;
  259. - help2man*)
  260. - echo "You should only need it if you modified a dependency" \
  261. - "of a man page."
  262. - echo "You may want to install the GNU Help2man package:"
  263. - echo "<$gnu_software_URL/help2man/>"
  264. + file=`echo "$*" | sed -n "$sed_output"`
  265. + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  266. + if test -f "$file"; then
  267. + touch $file
  268. + else
  269. + test -z "$file" || exec >$file
  270. + echo "#! /bin/sh"
  271. + echo "# Created by GNU Automake missing as a replacement of"
  272. + echo "# $ $@"
  273. + echo "exit 0"
  274. + chmod +x $file
  275. + exit 1
  276. + fi
  277. ;;
  278. - makeinfo*)
  279. - echo "You should only need it if you modified a '.texi' file, or"
  280. - echo "any other file indirectly affecting the aspect of the manual."
  281. - echo "You might want to install the Texinfo package:"
  282. - echo "<$gnu_software_URL/texinfo/>"
  283. - echo "The spurious makeinfo call might also be the consequence of"
  284. - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
  285. - echo "want to install GNU make:"
  286. - echo "<$gnu_software_URL/make/>"
  287. - ;;
  288. - *)
  289. - echo "You might have modified some files without having the proper"
  290. - echo "tools for further handling them. Check the 'README' file, it"
  291. - echo "often tells you about the needed prerequisites for installing"
  292. - echo "this package. You may also peek at any GNU archive site, in"
  293. - echo "case some other package contains this missing '$1' program."
  294. - ;;
  295. - esac
  296. -}
  297. -give_advice "$1" | sed -e '1s/^/WARNING: /' \
  298. - -e '2,$s/^/ /' >&2
  299. + bison*|yacc*)
  300. + echo 1>&2 "\
  301. +WARNING: '$1' $msg. You should only need it if
  302. + you modified a '.y' file. You may need the Bison package
  303. + in order for those modifications to take effect. You can get
  304. + Bison from any GNU archive site."
  305. + rm -f y.tab.c y.tab.h
  306. + if test $# -ne 1; then
  307. + eval LASTARG=\${$#}
  308. + case $LASTARG in
  309. + *.y)
  310. + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
  311. + if test -f "$SRCFILE"; then
  312. + cp "$SRCFILE" y.tab.c
  313. + fi
  314. + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
  315. + if test -f "$SRCFILE"; then
  316. + cp "$SRCFILE" y.tab.h
  317. + fi
  318. + ;;
  319. + esac
  320. + fi
  321. + if test ! -f y.tab.h; then
  322. + echo >y.tab.h
  323. + fi
  324. + if test ! -f y.tab.c; then
  325. + echo 'main() { return 0; }' >y.tab.c
  326. + fi
  327. + ;;
  328. -# Propagate the correct exit status (expected to be 127 for a program
  329. -# not found, 63 for a program that failed due to version mismatch).
  330. -exit $st
  331. + lex*|flex*)
  332. + echo 1>&2 "\
  333. +WARNING: '$1' is $msg. You should only need it if
  334. + you modified a '.l' file. You may need the Flex package
  335. + in order for those modifications to take effect. You can get
  336. + Flex from any GNU archive site."
  337. + rm -f lex.yy.c
  338. + if test $# -ne 1; then
  339. + eval LASTARG=\${$#}
  340. + case $LASTARG in
  341. + *.l)
  342. + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
  343. + if test -f "$SRCFILE"; then
  344. + cp "$SRCFILE" lex.yy.c
  345. + fi
  346. + ;;
  347. + esac
  348. + fi
  349. + if test ! -f lex.yy.c; then
  350. + echo 'main() { return 0; }' >lex.yy.c
  351. + fi
  352. + ;;
  353. +
  354. + help2man*)
  355. + echo 1>&2 "\
  356. +WARNING: '$1' is $msg. You should only need it if
  357. + you modified a dependency of a manual page. You may need the
  358. + Help2man package in order for those modifications to take
  359. + effect. You can get Help2man from any GNU archive site."
  360. +
  361. + file=`echo "$*" | sed -n "$sed_output"`
  362. + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  363. + if test -f "$file"; then
  364. + touch $file
  365. + else
  366. + test -z "$file" || exec >$file
  367. + echo ".ab help2man is required to generate this page"
  368. + exit $?
  369. + fi
  370. + ;;
  371. +
  372. + makeinfo*)
  373. + echo 1>&2 "\
  374. +WARNING: '$1' is $msg. You should only need it if
  375. + you modified a '.texi' or '.texinfo' file, or any other file
  376. + indirectly affecting the aspect of the manual. The spurious
  377. + call might also be the consequence of using a buggy 'make' (AIX,
  378. + DU, IRIX). You might want to install the Texinfo package or
  379. + the GNU make package. Grab either from any GNU archive site."
  380. + # The file to touch is that specified with -o ...
  381. + file=`echo "$*" | sed -n "$sed_output"`
  382. + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  383. + if test -z "$file"; then
  384. + # ... or it is the one specified with @setfilename ...
  385. + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
  386. + file=`sed -n '
  387. + /^@setfilename/{
  388. + s/.* \([^ ]*\) *$/\1/
  389. + p
  390. + q
  391. + }' $infile`
  392. + # ... or it is derived from the source name (dir/f.texi becomes f.info)
  393. + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
  394. + fi
  395. + # If the file does not exist, the user really needs makeinfo;
  396. + # let's fail without touching anything.
  397. + test -f $file || exit 1
  398. + touch $file
  399. + ;;
  400. +
  401. + *)
  402. + echo 1>&2 "\
  403. +WARNING: '$1' is needed, and is $msg.
  404. + You might have modified some files without having the
  405. + proper tools for further handling them. Check the 'README' file,
  406. + it often tells you about the needed prerequisites for installing
  407. + this package. You may also peek at any GNU archive site, in case
  408. + some other package would contain this missing '$1' program."
  409. + exit 1
  410. + ;;
  411. +esac
  412. +
  413. +exit 0
  414. # Local variables:
  415. # eval: (add-hook 'write-file-hooks 'time-stamp)