~ubuntu-branches/ubuntu/natty/lordsawar/natty

« back to all changes in this revision

Viewing changes to missing

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2007-09-27 21:27:07 UTC
  • Revision ID: james.westby@ubuntu.com-20070927212707-df718lrgv51uvy53
Tags: 0.0.3-1
* Initial release (Closes: #445167)
* Add simple man pages for executables
* Split into binary and data packages
* Move binaries to /usr/games
* Move shared data to /usr/share/games

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Common stub for a few missing GNU programs while installing.
3
 
 
4
 
scriptversion=2005-06-08.21
5
 
 
6
 
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
7
 
#   Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
8
4
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
5
 
10
6
# This program is free software; you can redistribute it and/or modify
19
15
 
20
16
# You should have received a copy of the GNU General Public License
21
17
# along with this program; if not, write to the Free Software
22
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23
 
# 02110-1301, USA.
 
18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
19
# 02111-1307, USA.
24
20
 
25
21
# As a special exception to the GNU General Public License, if you
26
22
# distribute this file as part of a program that contains a
42
38
  configure_ac=configure.in
43
39
fi
44
40
 
45
 
msg="missing on your system"
46
 
 
47
41
case "$1" in
48
42
--run)
49
43
  # Try to run requested program, and just exit if it succeeds.
50
44
  run=
51
45
  shift
52
46
  "$@" && exit 0
53
 
  # Exit code 63 means version mismatch.  This often happens
54
 
  # when the user try to use an ancient version of a tool on
55
 
  # a file that requires a minimum version.  In this case we
56
 
  # we should proceed has if the program had been absent, or
57
 
  # if --run hadn't been passed.
58
 
  if test $? = 63; then
59
 
    run=:
60
 
    msg="probably too old"
61
 
  fi
62
47
  ;;
 
48
esac
 
49
 
 
50
# If it does not exist, or fails to run (possibly an outdated version),
 
51
# try to emulate it.
 
52
case "$1" in
63
53
 
64
54
  -h|--h|--he|--hel|--help)
65
55
    echo "\
84
74
  lex          create \`lex.yy.c', if possible, from existing .c
85
75
  makeinfo     touch the output file
86
76
  tar          try tar, gnutar, gtar, then tar without non-portable flags
87
 
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
88
 
 
89
 
Send bug reports to <bug-automake@gnu.org>."
90
 
    exit $?
 
77
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
91
78
    ;;
92
79
 
93
80
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
94
 
    echo "missing $scriptversion (GNU Automake)"
95
 
    exit $?
 
81
    echo "missing 0.4 - GNU automake"
96
82
    ;;
97
83
 
98
84
  -*)
101
87
    exit 1
102
88
    ;;
103
89
 
104
 
esac
105
 
 
106
 
# Now exit if we have it, but it failed.  Also exit now if we
107
 
# don't have it and --version was passed (most likely to detect
108
 
# the program).
109
 
case "$1" in
110
 
  lex|yacc)
111
 
    # Not GNU programs, they don't have --version.
112
 
    ;;
113
 
 
114
 
  tar)
115
 
    if test -n "$run"; then
116
 
       echo 1>&2 "ERROR: \`tar' requires --run"
117
 
       exit 1
118
 
    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
119
 
       exit 1
120
 
    fi
121
 
    ;;
122
 
 
123
 
  *)
124
 
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
125
 
       # We have it, but it failed.
126
 
       exit 1
127
 
    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
128
 
       # Could not run --version or --help.  This is probably someone
129
 
       # running `$TOOL --version' or `$TOOL --help' to check whether
130
 
       # $TOOL exists and not knowing $TOOL uses missing.
131
 
       exit 1
132
 
    fi
133
 
    ;;
134
 
esac
135
 
 
136
 
# If it does not exist, or fails to run (possibly an outdated version),
137
 
# try to emulate it.
138
 
case "$1" in
139
90
  aclocal*)
 
91
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
 
92
       # We have it, but it failed.
 
93
       exit 1
 
94
    fi
 
95
 
140
96
    echo 1>&2 "\
141
 
WARNING: \`$1' is $msg.  You should only need it if
 
97
WARNING: \`$1' is missing on your system.  You should only need it if
142
98
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
143
99
         to install the \`Automake' and \`Perl' packages.  Grab them from
144
100
         any GNU archive site."
146
102
    ;;
147
103
 
148
104
  autoconf)
 
105
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
 
106
       # We have it, but it failed.
 
107
       exit 1
 
108
    fi
 
109
 
149
110
    echo 1>&2 "\
150
 
WARNING: \`$1' is $msg.  You should only need it if
 
111
WARNING: \`$1' is missing on your system.  You should only need it if
151
112
         you modified \`${configure_ac}'.  You might want to install the
152
113
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
153
114
         archive site."
155
116
    ;;
156
117
 
157
118
  autoheader)
 
119
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
 
120
       # We have it, but it failed.
 
121
       exit 1
 
122
    fi
 
123
 
158
124
    echo 1>&2 "\
159
 
WARNING: \`$1' is $msg.  You should only need it if
 
125
WARNING: \`$1' is missing on your system.  You should only need it if
160
126
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
161
127
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
162
128
         from any GNU archive site."
174
140
    ;;
175
141
 
176
142
  automake*)
 
143
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
 
144
       # We have it, but it failed.
 
145
       exit 1
 
146
    fi
 
147
 
177
148
    echo 1>&2 "\
178
 
WARNING: \`$1' is $msg.  You should only need it if
 
149
WARNING: \`$1' is missing on your system.  You should only need it if
179
150
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
180
151
         You might want to install the \`Automake' and \`Perl' packages.
181
152
         Grab them from any GNU archive site."
185
156
    ;;
186
157
 
187
158
  autom4te)
 
159
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
 
160
       # We have it, but it failed.
 
161
       exit 1
 
162
    fi
 
163
 
188
164
    echo 1>&2 "\
189
 
WARNING: \`$1' is needed, but is $msg.
190
 
         You might have modified some files without having the
 
165
WARNING: \`$1' is needed, and you do not seem to have it handy on your
 
166
         system.  You might have modified some files without having the
191
167
         proper tools for further handling them.
192
168
         You can get \`$1' as part of \`Autoconf' from any GNU
193
169
         archive site."
209
185
 
210
186
  bison|yacc)
211
187
    echo 1>&2 "\
212
 
WARNING: \`$1' $msg.  You should only need it if
 
188
WARNING: \`$1' is missing on your system.  You should only need it if
213
189
         you modified a \`.y' file.  You may need the \`Bison' package
214
190
         in order for those modifications to take effect.  You can get
215
191
         \`Bison' from any GNU archive site."
239
215
 
240
216
  lex|flex)
241
217
    echo 1>&2 "\
242
 
WARNING: \`$1' is $msg.  You should only need it if
 
218
WARNING: \`$1' is missing on your system.  You should only need it if
243
219
         you modified a \`.l' file.  You may need the \`Flex' package
244
220
         in order for those modifications to take effect.  You can get
245
221
         \`Flex' from any GNU archive site."
261
237
    ;;
262
238
 
263
239
  help2man)
 
240
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
 
241
       # We have it, but it failed.
 
242
       exit 1
 
243
    fi
 
244
 
264
245
    echo 1>&2 "\
265
 
WARNING: \`$1' is $msg.  You should only need it if
 
246
WARNING: \`$1' is missing on your system.  You should only need it if
266
247
         you modified a dependency of a manual page.  You may need the
267
248
         \`Help2man' package in order for those modifications to take
268
249
         effect.  You can get \`Help2man' from any GNU archive site."
281
262
    ;;
282
263
 
283
264
  makeinfo)
 
265
    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
 
266
       # We have makeinfo, but it failed.
 
267
       exit 1
 
268
    fi
 
269
 
284
270
    echo 1>&2 "\
285
 
WARNING: \`$1' is $msg.  You should only need it if
 
271
WARNING: \`$1' is missing on your system.  You should only need it if
286
272
         you modified a \`.texi' or \`.texinfo' file, or any other file
287
273
         indirectly affecting the aspect of the manual.  The spurious
288
274
         call might also be the consequence of using a buggy \`make' (AIX,
289
275
         DU, IRIX).  You might want to install the \`Texinfo' package or
290
276
         the \`GNU make' package.  Grab either from any GNU archive site."
291
 
    # The file to touch is that specified with -o ...
292
277
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
293
278
    if test -z "$file"; then
294
 
      # ... or it is the one specified with @setfilename ...
295
 
      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
296
 
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
297
 
      # ... or it is derived from the source name (dir/f.texi becomes f.info)
298
 
      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
 
279
      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
 
280
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
299
281
    fi
300
 
    # If the file does not exist, the user really needs makeinfo;
301
 
    # let's fail without touching anything.
302
 
    test -f $file || exit 1
303
282
    touch $file
304
283
    ;;
305
284
 
306
285
  tar)
307
286
    shift
 
287
    if test -n "$run"; then
 
288
      echo 1>&2 "ERROR: \`tar' requires --run"
 
289
      exit 1
 
290
    fi
308
291
 
309
292
    # We have already tried tar in the generic part.
310
293
    # Look for gnutar/gtar before invocation to avoid ugly error
340
323
 
341
324
  *)
342
325
    echo 1>&2 "\
343
 
WARNING: \`$1' is needed, and is $msg.
344
 
         You might have modified some files without having the
 
326
WARNING: \`$1' is needed, and you do not seem to have it handy on your
 
327
         system.  You might have modified some files without having the
345
328
         proper tools for further handling them.  Check the \`README' file,
346
329
         it often tells you about the needed prerequisites for installing
347
330
         this package.  You may also peek at any GNU archive site, in case
351
334
esac
352
335
 
353
336
exit 0
354
 
 
355
 
# Local variables:
356
 
# eval: (add-hook 'write-file-hooks 'time-stamp)
357
 
# time-stamp-start: "scriptversion="
358
 
# time-stamp-format: "%:y-%02m-%02d.%02H"
359
 
# time-stamp-end: "$"
360
 
# End: