patch-missing 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- cgilib-0.7.orig/missing 2009-02-08 19:47:04.000000000 +0100
  3. +++ cgilib-0.7/missing 2009-05-09 03:58:09.000000000 +0200
  4. @@ -1,9 +1,9 @@
  5. #! /bin/sh
  6. # Common stub for a few missing GNU programs while installing.
  7. -scriptversion=2006-05-10.23
  8. +scriptversion=2005-06-08.21
  9. -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
  10. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
  11. # Free Software Foundation, Inc.
  12. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
  13. @@ -33,8 +33,6 @@ if test $# -eq 0; then
  14. fi
  15. run=:
  16. -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
  17. -sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
  18. # In the cases where this matters, `missing' is being run in the
  19. # srcdir already.
  20. @@ -46,7 +44,7 @@ fi
  21. msg="missing on your system"
  22. -case $1 in
  23. +case "$1" in
  24. --run)
  25. # Try to run requested program, and just exit if it succeeds.
  26. run=
  27. @@ -79,7 +77,6 @@ Supported PROGRAM values:
  28. aclocal touch file \`aclocal.m4'
  29. autoconf touch file \`configure'
  30. autoheader touch file \`config.h.in'
  31. - autom4te touch the output file, or create a stub one
  32. automake touch all \`Makefile.in' files
  33. bison create \`y.tab.[ch]', if possible, from existing .[ch]
  34. flex create \`lex.yy.c', if possible, from existing .c
  35. @@ -109,7 +106,7 @@ esac
  36. # Now exit if we have it, but it failed. Also exit now if we
  37. # don't have it and --version was passed (most likely to detect
  38. # the program).
  39. -case $1 in
  40. +case "$1" in
  41. lex|yacc)
  42. # Not GNU programs, they don't have --version.
  43. ;;
  44. @@ -138,7 +135,7 @@ esac
  45. # If it does not exist, or fails to run (possibly an outdated version),
  46. # try to emulate it.
  47. -case $1 in
  48. +case "$1" in
  49. aclocal*)
  50. echo 1>&2 "\
  51. WARNING: \`$1' is $msg. You should only need it if
  52. @@ -167,7 +164,7 @@ WARNING: \`$1' is $msg. You should only
  53. test -z "$files" && files="config.h"
  54. touch_files=
  55. for f in $files; do
  56. - case $f in
  57. + case "$f" in
  58. *:*) touch_files="$touch_files "`echo "$f" |
  59. sed -e 's/^[^:]*://' -e 's/:.*//'`;;
  60. *) touch_files="$touch_files $f.in";;
  61. @@ -195,8 +192,8 @@ WARNING: \`$1' is needed, but is $msg.
  62. You can get \`$1' as part of \`Autoconf' from any GNU
  63. archive site."
  64. - file=`echo "$*" | sed -n "$sed_output"`
  65. - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  66. + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
  67. + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
  68. if test -f "$file"; then
  69. touch $file
  70. else
  71. @@ -217,25 +214,25 @@ WARNING: \`$1' $msg. You should only ne
  72. in order for those modifications to take effect. You can get
  73. \`Bison' from any GNU archive site."
  74. rm -f y.tab.c y.tab.h
  75. - if test $# -ne 1; then
  76. + if [ $# -ne 1 ]; then
  77. eval LASTARG="\${$#}"
  78. - case $LASTARG in
  79. + case "$LASTARG" in
  80. *.y)
  81. SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
  82. - if test -f "$SRCFILE"; then
  83. + if [ -f "$SRCFILE" ]; then
  84. cp "$SRCFILE" y.tab.c
  85. fi
  86. SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
  87. - if test -f "$SRCFILE"; then
  88. + if [ -f "$SRCFILE" ]; then
  89. cp "$SRCFILE" y.tab.h
  90. fi
  91. ;;
  92. esac
  93. fi
  94. - if test ! -f y.tab.h; then
  95. + if [ ! -f y.tab.h ]; then
  96. echo >y.tab.h
  97. fi
  98. - if test ! -f y.tab.c; then
  99. + if [ ! -f y.tab.c ]; then
  100. echo 'main() { return 0; }' >y.tab.c
  101. fi
  102. ;;
  103. @@ -247,18 +244,18 @@ WARNING: \`$1' is $msg. You should only
  104. in order for those modifications to take effect. You can get
  105. \`Flex' from any GNU archive site."
  106. rm -f lex.yy.c
  107. - if test $# -ne 1; then
  108. + if [ $# -ne 1 ]; then
  109. eval LASTARG="\${$#}"
  110. - case $LASTARG in
  111. + case "$LASTARG" in
  112. *.l)
  113. SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
  114. - if test -f "$SRCFILE"; then
  115. + if [ -f "$SRCFILE" ]; then
  116. cp "$SRCFILE" lex.yy.c
  117. fi
  118. ;;
  119. esac
  120. fi
  121. - if test ! -f lex.yy.c; then
  122. + if [ ! -f lex.yy.c ]; then
  123. echo 'main() { return 0; }' >lex.yy.c
  124. fi
  125. ;;
  126. @@ -270,9 +267,11 @@ WARNING: \`$1' is $msg. You should only
  127. \`Help2man' package in order for those modifications to take
  128. effect. You can get \`Help2man' from any GNU archive site."
  129. - file=`echo "$*" | sed -n "$sed_output"`
  130. - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  131. - if test -f "$file"; then
  132. + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
  133. + if test -z "$file"; then
  134. + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
  135. + fi
  136. + if [ -f "$file" ]; then
  137. touch $file
  138. else
  139. test -z "$file" || exec >$file
  140. @@ -290,17 +289,11 @@ WARNING: \`$1' is $msg. You should only
  141. DU, IRIX). You might want to install the \`Texinfo' package or
  142. the \`GNU make' package. Grab either from any GNU archive site."
  143. # The file to touch is that specified with -o ...
  144. - file=`echo "$*" | sed -n "$sed_output"`
  145. - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  146. + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
  147. if test -z "$file"; then
  148. # ... or it is the one specified with @setfilename ...
  149. infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
  150. - file=`sed -n '
  151. - /^@setfilename/{
  152. - s/.* \([^ ]*\) *$/\1/
  153. - p
  154. - q
  155. - }' $infile`
  156. + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
  157. # ... or it is derived from the source name (dir/f.texi becomes f.info)
  158. test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
  159. fi
  160. @@ -324,13 +317,13 @@ WARNING: \`$1' is $msg. You should only
  161. fi
  162. firstarg="$1"
  163. if shift; then
  164. - case $firstarg in
  165. + case "$firstarg" in
  166. *o*)
  167. firstarg=`echo "$firstarg" | sed s/o//`
  168. tar "$firstarg" "$@" && exit 0
  169. ;;
  170. esac
  171. - case $firstarg in
  172. + case "$firstarg" in
  173. *h*)
  174. firstarg=`echo "$firstarg" | sed s/h//`
  175. tar "$firstarg" "$@" && exit 0