ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/staticperl.sh
(Generate patch)

Comparing App-Staticperl/staticperl.sh (file contents):
Revision 1.14 by root, Fri Dec 10 20:29:17 2010 UTC vs.
Revision 1.38 by root, Fri Apr 1 05:58:22 2011 UTC

5 5
6STATICPERL=~/.staticperl 6STATICPERL=~/.staticperl
7CPAN=http://mirror.netcologne.de/cpan # which mirror to use 7CPAN=http://mirror.netcologne.de/cpan # which mirror to use
8EMAIL="read the documentation <rtfm@example.org>" 8EMAIL="read the documentation <rtfm@example.org>"
9 9
10
11# perl build variables 10# perl build variables
11MAKE=make
12PERL_VERSION=5.12.2 # 5.8.9 is also a good choice 12PERL_VERSION=5.12.3 # 5.8.9 is also a good choice
13PERL_CC=cc
13PERL_CONFIGURE="" # additional Configure arguments 14PERL_CONFIGURE="" # additional Configure arguments
14PERL_CPPFLAGS="-DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=65536 -D_GNU_SOURCE -DNDEBUG -USITELIB_EXP -USITEARCHEXP -UARCHLIB_EXP" 15PERL_CCFLAGS="-g -DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=16376 -DNO_PERL_MALLOC_ENV -D_GNU_SOURCE -DNDEBUG"
15PERL_OPTIMIZE="-Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math" 16PERL_OPTIMIZE="-Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math"
16 17
17ARCH="$(uname -m)" 18ARCH="$(uname -m)"
18 19
19case "$ARCH" in 20case "$ARCH" in
27 ;; 28 ;;
28esac 29esac
29 30
30# -Wl,--gc-sections makes it impossible to check for undefined references 31# -Wl,--gc-sections makes it impossible to check for undefined references
31# for some reason so we need to patch away the "-no" after Configure and before make :/ 32# for some reason so we need to patch away the "-no" after Configure and before make :/
32# -z muldefs is to work around uclibc's pthread static linking bug 33# --allow-multiple-definition exists to work around uclibc's pthread static linking bug
33PERL_LDFLAGS="-Wl,--no-gc-sections -z muldefs" 34#PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition"
35PERL_LDFLAGS=
34PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself 36PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself
35 37
36# some configuration options for modules 38# some configuration options for modules
37export PERL_MM_USE_DEFAULT=1 39PERL_MM_USE_DEFAULT=1
38#export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow 40#CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow
39export EV_EXTRA_DEFS='-DEV_FEATURES=4+8+16+64 -DEV_USE_SELECT=0 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_NO_LOOPS -DEV_COMPAT3=0' 41EV_EXTRA_DEFS='-DEV_FEATURES=4+8+16+64 -DEV_USE_SELECT=0 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_NO_LOOPS -DEV_COMPAT3=0'
42export PERL_MM_USE_DEFAULT CORO_INTERFACE EV_EXTRA_DEFS
40 43
41# which extra modules to install by default from CPAN that are 44# which extra modules to install by default from CPAN that are
42# required by mkbundle 45# required by mkbundle
43STATICPERL_MODULES="common::sense Pod::Strip PPI::XS Pod::Usage" 46STATICPERL_MODULES="common::sense Pod::Strip PPI::XS Pod::Usage"
44 47
45# which extra modules you might want to install 48# which extra modules you might want to install
46EXTRA_MODULES="" 49EXTRA_MODULES=""
47 50
48# overridable functions 51# overridable functions
49preconfigure() { : ; } 52preconfigure() { : ; }
53patchconfig() { : ; }
50postconfigure() { : ; } 54postconfigure() { : ; }
51postbuild() { : ; } 55postbuild() { : ; }
52postinstall() { : ; } 56postinstall() { : ; }
53 57
54# now source user config, if any 58# now source user config, if any
64# support 68# support
65 69
66MKBUNDLE="${MKBUNDLE:=$STATICPERL/mkbundle}" 70MKBUNDLE="${MKBUNDLE:=$STATICPERL/mkbundle}"
67PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed 71PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed
68 72
69unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG 73unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG
74unset PERL_MM_OPT PERL_MB_OPT
70export LC_ALL=C # just to be on the safe side 75LC_ALL=C; export LC_ALL # just to be on the safe side
76
77# prepend PATH - not required by staticperl itself, but might make
78# life easier when working in e.g. "staticperl cpan / look"
79PATH="$PERL_PREFIX/perl/bin:$PATH"
71 80
72# set version in a way that Makefile.PL can extract 81# set version in a way that Makefile.PL can extract
73VERSION=VERSION; eval \ 82VERSION=VERSION; eval \
74$VERSION=0.9 83$VERSION="1.21"
75 84
76BZ2=bz2 85BZ2=bz2
77BZIP2=bzip2 86BZIP2=bzip2
78 87
79fatal() { 88fatal() {
125 134
126clean() { 135clean() {
127 rm -rf "$STATICPERL/src/perl-$PERL_VERSION" 136 rm -rf "$STATICPERL/src/perl-$PERL_VERSION"
128} 137}
129 138
139realclean() {
140 rm -f "$PERL_PREFIX/staticstamp.postinstall"
141 rm -f "$PERL_PREFIX/staticstamp.install"
142 rm -f "$STATICPERL/src/perl-"*"/staticstamp.configure"
143}
144
130fetch() { 145fetch() {
131 rcd "$STATICPERL" 146 rcd "$STATICPERL"
132 147
133 mkdir -p src 148 mkdir -p src
134 rcd src 149 rcd src
144perl-$PERL_VERSION.tar.$BZ2 in $STATICPERL 159perl-$PERL_VERSION.tar.$BZ2 in $STATICPERL
145trying $URL 160trying $URL
146EOF 161EOF
147 162
148 rm -f perl-$PERL_VERSION.tar.$BZ2~ # just to be on the safe side 163 rm -f perl-$PERL_VERSION.tar.$BZ2~ # just to be on the safe side
164 curl -f >perl-$PERL_VERSION.tar.$BZ2~ "$URL" \
149 wget -O perl-$PERL_VERSION.tar.$BZ2~ "$URL" \ 165 || wget -O perl-$PERL_VERSION.tar.$BZ2~ "$URL" \
150 || curl >perl-$PERL_VERSION.tar.$BZ2~ "$URL" \
151 || fatal "$URL: unable to download" 166 || fatal "$URL: unable to download"
167 rm -f perl-$PERL_VERSION.tar.$BZ2
152 mv perl-$PERL_VERSION.tar.$BZ2~ perl-$PERL_VERSION.tar.$BZ2 168 mv perl-$PERL_VERSION.tar.$BZ2~ perl-$PERL_VERSION.tar.$BZ2
153 fi 169 fi
154 170
155 verblock <<EOF 171 verblock <<EOF
156unpacking perl 172unpacking perl
157EOF 173EOF
158 174
159 mkdir -p unpack 175 mkdir -p unpack
176 rm -rf unpack/perl-$PERL_VERSION
160 $BZIP2 -d <perl-$PERL_VERSION.tar.bz2 | tar xfC - unpack \ 177 $BZIP2 -d <perl-$PERL_VERSION.tar.$BZ2 | ( cd unpack && tar xf - ) \
161 || fatal "perl-$PERL_VERSION.tar.bz2: error during unpacking" 178 || fatal "perl-$PERL_VERSION.tar.$BZ2: error during unpacking"
162 chmod -R u+w unpack/perl-$PERL_VERSION 179 chmod -R u+w unpack/perl-$PERL_VERSION
163 mv unpack/perl-$PERL_VERSION perl-$PERL_VERSION 180 mv unpack/perl-$PERL_VERSION perl-$PERL_VERSION
164 rmdir -p unpack 181 rmdir -p unpack
165 fi 182 fi
166} 183}
167 184
168# similar to GNU-sed -i or perl -pi 185# similar to GNU-sed -i or perl -pi
169sedreplace() { 186sedreplace() {
170 sed -e "$1" <"$2" > "$2~" || fatal "error while running sed" 187 sed -e "$1" <"$2" > "$2~" || fatal "error while running sed"
188 rm -f "$2"
171 mv "$2~" "$2" 189 mv "$2~" "$2"
190}
191
192configure_failure() {
193 cat <<EOF
194
195
196***
197*** Configure failed - see above for the exact error message(s).
198***
199*** Most commonly, this is because the default PERL_CCFLAGS or PERL_OPTIMIZE
200*** flags are not supported by your compiler. Less often, this is because
201*** PERL_LIBS either contains a library not available on your system (such as
202*** -lcrypt), or because it lacks a required library (e.g. -lsocket or -lnsl).
203***
204*** You can provide your own flags by creating a ~/.staticperlrc file with
205*** variable assignments. For example (these are the actual values used):
206***
207
208PERL_CC="$PERL_CC"
209PERL_CCFLAGS="$PERL_CCFLAGS"
210PERL_OPTIMIZE="$PERL_OPTIMIZE"
211PERL_LDFLAGS="$PERL_LDFLAGS"
212PERL_LIBS="$PERL_LIBS"
213
214EOF
215 exit 1
172} 216}
173 217
174configure() { 218configure() {
175 fetch 219 fetch
176 220
182configuring $STATICPERL/src/perl-$PERL_VERSION 226configuring $STATICPERL/src/perl-$PERL_VERSION
183EOF 227EOF
184 228
185 rm -f "$PERL_PREFIX/staticstamp.install" 229 rm -f "$PERL_PREFIX/staticstamp.install"
186 230
187 make distclean >/dev/null 2>&1 231 "$MAKE" distclean >/dev/null 2>&1
188 232
233 sedreplace '/^#define SITELIB/d' config_h.SH
234
189 # I hate them 235 # I hate them for this
190 grep -q -- -fstack-protector Configure && \ 236 grep -q -- -fstack-protector Configure && \
191 sedreplace 's/-fstack-protector/-fno-stack-protector/g' Configure 237 sedreplace 's/-fstack-protector/-fno-stack-protector/g' Configure
192 238
193 preconfigure 239 # what did that bloke think
240 grep -q -- usedl=.define hints/darwin.sh && \
241 sedreplace '/^usedl=.define.;$/d' hints/darwin.sh
242
243 preconfigure || fatal "preconfigure hook failed"
194 244
195# trace configure \ 245# trace configure \
196 sh Configure -Duselargefiles \ 246 sh Configure -Duselargefiles \
197 -Uuse64bitint \ 247 -Uuse64bitint \
198 -Dusemymalloc=n \ 248 -Dusemymalloc=n \
199 -Uusedl \ 249 -Uusedl \
200 -Uusethreads \ 250 -Uusethreads \
201 -Uuseithreads \ 251 -Uuseithreads \
202 -Uusemultiplicity \ 252 -Uusemultiplicity \
203 -Duseperlio \
204 -Uusesfio \ 253 -Uusesfio \
205 -Uuseshrplib \ 254 -Uuseshrplib \
255 -Uinstallusrbinperl \
206 -Dcppflags="$PERL_CPPFLAGS" \ 256 -A ccflags=" $PERL_CCFLAGS" \
207 -Dccflags="-g2 -fno-strict-aliasing" \ 257 -Dcc="$PERL_CC" \
208 -Doptimize="$PERL_OPTIMIZE" \ 258 -Doptimize="$PERL_OPTIMIZE" \
209 -Dldflags="$PERL_LDFLAGS" \ 259 -Dldflags="$PERL_LDFLAGS" \
210 -Dlibs="$PERL_LIBS" \ 260 -Dlibs="$PERL_LIBS" \
211 -Dprefix="$PERL_PREFIX" \ 261 -Dprefix="$PERL_PREFIX" \
212 -Dbin="$PERL_PREFIX/bin" \ 262 -Dbin="$PERL_PREFIX/bin" \
213 -Dprivlib="$PERL_PREFIX/lib" \ 263 -Dprivlib="$PERL_PREFIX/lib" \
214 -Darchlib="$PERL_PREFIX/lib" \ 264 -Darchlib="$PERL_PREFIX/lib" \
215 -Uusevendorprefix \ 265 -Uusevendorprefix \
216 -Dsitelib="$PERL_PREFIX/lib" \ 266 -Dsitelib="$PERL_PREFIX/lib" \
217 -Dsitearch="$PERL_PREFIX/lib" \ 267 -Dsitearch="$PERL_PREFIX/lib" \
218 -Usitelibexp \
219 -Uman1dir \ 268 -Uman1dir \
220 -Uman3dir \ 269 -Uman3dir \
221 -Usiteman1dir \ 270 -Usiteman1dir \
222 -Usiteman3dir \ 271 -Usiteman3dir \
223 -Dpager=/usr/bin/less \ 272 -Dpager=/usr/bin/less \
224 -Demail="$EMAIL" \ 273 -Demail="$EMAIL" \
225 -Dcf_email="$EMAIL" \ 274 -Dcf_email="$EMAIL" \
226 -Dcf_by="$EMAIL" \ 275 -Dcf_by="$EMAIL" \
227 $PERL_CONFIGURE \ 276 $PERL_CONFIGURE \
277 -Duseperlio \
228 -dE || fatal "Configure failed" 278 -dE || configure_failure
229 279
230 sedreplace ' 280 sedreplace '
231 s/-Wl,--no-gc-sections/-Wl,--gc-sections/g 281 s/-Wl,--no-gc-sections/-Wl,--gc-sections/g
232 s/ *-fno-stack-protector */ /g 282 s/ *-fno-stack-protector */ /g
233 ' config.sh 283 ' config.sh
234 284
285 patchconfig || fatal "patchconfig hook failed"
286
235 sh Configure -S || fatal "Configure -S failed" 287 sh Configure -S || fatal "Configure -S failed"
236 288
237 postconfigure || fatal "postconfigure hook failed" 289 postconfigure || fatal "postconfigure hook failed"
238 290
239 touch staticstamp.configure 291 touch staticstamp.configure
248building $STATICPERL/src/perl-$PERL_VERSION 300building $STATICPERL/src/perl-$PERL_VERSION
249EOF 301EOF
250 302
251 rm -f "$PERL_PREFIX/staticstamp.install" 303 rm -f "$PERL_PREFIX/staticstamp.install"
252 304
253 make || fatal "make: error while building perl" 305 "$MAKE" || fatal "make: error while building perl"
254 306
255 postbuild || fatal "postbuild hook failed" 307 postbuild || fatal "postbuild hook failed"
256} 308}
257 309
258install() { 310install() {
268 ln -sf "perl/lib/" "$STATICPERL/lib" 320 ln -sf "perl/lib/" "$STATICPERL/lib"
269 321
270 ln -sf "$PERL_PREFIX" "$STATICPERL/perl" # might get overwritten 322 ln -sf "$PERL_PREFIX" "$STATICPERL/perl" # might get overwritten
271 rm -rf "$PERL_PREFIX" # by this rm -rf 323 rm -rf "$PERL_PREFIX" # by this rm -rf
272 324
273 make install || fatal "make install: error while installing" 325 "$MAKE" install || fatal "make install: error while installing"
274 326
275 rcd "$PERL_PREFIX" 327 rcd "$PERL_PREFIX"
276 328
277 # create a "make install" replacement for CPAN 329 # create a "make install" replacement for CPAN
278 cat >"$PERL_PREFIX"/bin/cpan-make-install <<EOF 330 cat >"$PERL_PREFIX"/bin/cpan-make-install <<EOF
279make || exit 331"$MAKE" || exit
332
333# patch CPAN::HandleConfig.pm
334HCPM="$PERL_PREFIX"/lib/CPAN/HandleConfig.pm
335case "\$(head -n1 "\$HCPM")" in
336 *CPAN::MyConfig* )
337 ;;
338 * )
339 echo "patching \$HCPM for a safer tomorrow"
340 {
341 echo "use CPAN::MyConfig;"
342 cat "\$HCPM"
343 } >"\$HCPM~"
344 rm -f "\$HCPM"
345 mv "\$HCPM~" "\$HCPM"
346 ;;
347esac
280 348
281if find blib/arch/auto -type f | grep -q -v .exists; then 349if find blib/arch/auto -type f | grep -q -v .exists; then
282 echo Probably an XS module, rebuilding perl 350 echo Probably an XS module, rebuilding perl
283 if make perl; then 351 if "$MAKE" perl; then
284 mv perl "$PERL_PREFIX"/bin/perl 352 mv perl "$PERL_PREFIX"/bin/perl~ \
353 && rm -f "$PERL_PREFIX"/bin/perl \
354 && mv "$PERL_PREFIX"/bin/perl~ "$PERL_PREFIX"/bin/perl
285 make -f Makefile.aperl map_clean 355 "$MAKE" -f Makefile.aperl map_clean
286 else 356 else
287 make -f Makefile.aperl map_clean 357 "$MAKE" -f Makefile.aperl map_clean
288 exit 1 358 exit 1
289 fi 359 fi
290fi 360fi
291 361
292make install UNINST=1 362"$MAKE" install UNINST=1
293EOF 363EOF
294 chmod 755 "$PERL_PREFIX"/bin/cpan-make-install 364 chmod 755 "$PERL_PREFIX"/bin/cpan-make-install
295 365
296 # trick CPAN into avoiding ~/.cpan completely 366 # trick CPAN into avoiding ~/.cpan completely
297 echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm" 367 echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm"
298 368
369 # we call cpan with -MCPAN::MyConfig in this script, but
370 # every make install will patch CPAN::HandleConfig.pm to
371 # protect the user.
372
299 "$PERL_PREFIX"/bin/perl -MCPAN -e ' 373 "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e '
300 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); 374 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'");
301 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 375 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
302 CPAN::Shell->o (conf => q<init>); 376 CPAN::Shell->o (conf => q<init>);
303 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 377 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
304 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); 378 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build");
306 CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile"); 380 CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile");
307 CPAN::Shell->o (conf => q<keep_source_where>, "'"$STATICPERL"'/cpan/sources"); 381 CPAN::Shell->o (conf => q<keep_source_where>, "'"$STATICPERL"'/cpan/sources");
308 CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/cpan-make-install"); 382 CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/cpan-make-install");
309 CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>); 383 CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>);
310 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<no>); 384 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<no>);
385 CPAN::Shell->o (conf => q<prefer_installer>, "EUMM");
311 CPAN::Shell->o (conf => q<commit>); 386 CPAN::Shell->o (conf => q<commit>);
312 ' || fatal "error while initialising CPAN" 387 ' || fatal "error while initialising CPAN"
313 388
314 touch "$PERL_PREFIX/staticstamp.install" 389 touch "$PERL_PREFIX/staticstamp.install"
315 fi 390 fi
335installing modules from CPAN 410installing modules from CPAN
336$@ 411$@
337EOF 412EOF
338 413
339 for mod in "$@"; do 414 for mod in "$@"; do
340 "$PERL_PREFIX"/bin/perl -MCPAN -e 'notest install => "'"$mod"'"' \ 415 "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e 'notest install => "'"$mod"'"' \
341 || fatal "$mod: unable to install from CPAN" 416 || fatal "$mod: unable to install from CPAN"
342 done 417 done
343 rm -rf "$STATICPERL/build" 418 rm -rf "$STATICPERL/build"
344} 419}
345 420
357 for mod in "$@"; do 432 for mod in "$@"; do
358 echo 433 echo
359 echo $mod 434 echo $mod
360 ( 435 (
361 rcd $mod 436 rcd $mod
362 make -f Makefile.aperl map_clean >/dev/null 2>&1 437 "$MAKE" -f Makefile.aperl map_clean >/dev/null 2>&1
363 make distclean >/dev/null 2>&1 438 "$MAKE" distclean >/dev/null 2>&1
364 "$PERL_PREFIX"/bin/perl Makefile.PL || fatal "$mod: error running Makefile.PL" 439 "$PERL_PREFIX"/bin/perl Makefile.PL || fatal "$mod: error running Makefile.PL"
365 make || fatal "$mod: error building module" 440 "$MAKE" || fatal "$mod: error building module"
366 "$PERL_PREFIX"/bin/cpan-make-install || fatal "$mod: error installing module" 441 "$PERL_PREFIX"/bin/cpan-make-install || fatal "$mod: error installing module"
367 make distclean >/dev/null 2>&1 442 "$MAKE" distclean >/dev/null 2>&1
368 exit 0 443 exit 0
369 ) || exit $? 444 ) || exit $?
370 done 445 done
371} 446}
372 447
373############################################################################# 448#############################################################################
374# main 449# main
375 450
376podusage() { 451podusage() {
377 echo 452 echo
453
378 if [ -e "$PERL_PREFIX/bin/perl" ]; then 454 if [ -e "$PERL_PREFIX/bin/perl" ]; then
379 "$PERL_PREFIX/bin/perl" -MPod::Usage -e \ 455 "$PERL_PREFIX/bin/perl" -MPod::Usage -e \
380 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ 456 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \
381 2>/dev/null && exit 457 2>/dev/null && exit
382 fi 458 fi
459
383 # try whatever perl we can find 460 # try whatever perl we can find
384 perl -MPod::Usage -e \ 461 perl -MPod::Usage -e \
385 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ 462 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \
386 2>/dev/null && exit 463 2>/dev/null && exit
387 464
388 fatal "displaying documentation requires a working perl - try '$0 install' first" 465 fatal "displaying documentation requires a working perl - try '$0 install' to build one in a safe location"
389} 466}
390 467
391usage() { 468usage() {
392 podusage 0 469 podusage 0
393} 470}
418 command="${1#--}"; shift 495 command="${1#--}"; shift
419 case "$command" in 496 case "$command" in
420 version ) 497 version )
421 echo "staticperl version $VERSION" 498 echo "staticperl version $VERSION"
422 ;; 499 ;;
423 fetch | configure | build | install | clean | distclean) 500 fetch | configure | build | install | clean | realclean | distclean)
424 ( "$command" ) 501 ( "$command" ) || exit
425 ;; 502 ;;
426 instsrc ) 503 instsrc )
427 ( instsrc "$@" ) 504 ( instsrc "$@" ) || exit
428 exit 505 exit
429 ;; 506 ;;
430 instcpan ) 507 instcpan )
431 ( instcpan "$@" ) 508 ( instcpan "$@" ) || exit
432 exit 509 exit
433 ;; 510 ;;
434 cpan ) 511 cpan )
435 ( install ) 512 ( install ) || exit
436 "$PERL_PREFIX/bin/cpan" "$@" 513 "$PERL_PREFIX/bin/cpan" "$@"
437 exit 514 exit
438 ;; 515 ;;
439 mkbundle ) 516 mkbundle )
440 ( install ) 517 ( install ) || exit
441 bundle "$@" 518 bundle "$@"
442 exit 519 exit
443 ;; 520 ;;
444 mkperl ) 521 mkperl )
445 ( install ) 522 ( install ) || exit
446 bundle --perl "$@" 523 bundle --perl "$@"
447 exit 524 exit
448 ;; 525 ;;
449 mkapp ) 526 mkapp )
450 ( install ) 527 ( install ) || exit
451 bundle --app "$@" 528 bundle --app "$@"
452 exit 529 exit
453 ;; 530 ;;
454 help ) 531 help )
455 podusage 2 532 podusage 2

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines