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.17 by root, Sun Dec 12 00:38:36 2010 UTC

4# configuration to fill in 4# configuration to fill in
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
10 9
11# perl build variables 10# perl build variables
12PERL_VERSION=5.12.2 # 5.8.9 is also a good choice 11PERL_VERSION=5.12.2 # 5.8.9 is also a good choice
13PERL_CONFIGURE="" # additional Configure arguments 12PERL_CONFIGURE="" # additional Configure arguments
14PERL_CPPFLAGS="-DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=65536 -D_GNU_SOURCE -DNDEBUG -USITELIB_EXP -USITEARCHEXP -UARCHLIB_EXP" 13PERL_CPPFLAGS="-DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=65536 -D_GNU_SOURCE -DNDEBUG -USITELIB_EXP -USITEARCHEXP -UARCHLIB_EXP"
27 ;; 26 ;;
28esac 27esac
29 28
30# -Wl,--gc-sections makes it impossible to check for undefined references 29# -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 :/ 30# 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 31# --allow-multiple-definition exists to work around uclibc's pthread static linking bug
33PERL_LDFLAGS="-Wl,--no-gc-sections -z muldefs" 32PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition"
34PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself 33PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself
35 34
36# some configuration options for modules 35# some configuration options for modules
37export PERL_MM_USE_DEFAULT=1 36export PERL_MM_USE_DEFAULT=1
38#export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow 37#export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow
69unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG 68unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG
70export LC_ALL=C # just to be on the safe side 69export LC_ALL=C # just to be on the safe side
71 70
72# set version in a way that Makefile.PL can extract 71# set version in a way that Makefile.PL can extract
73VERSION=VERSION; eval \ 72VERSION=VERSION; eval \
74$VERSION=0.9 73$VERSION=0.911
75 74
76BZ2=bz2 75BZ2=bz2
77BZIP2=bzip2 76BZIP2=bzip2
78 77
79fatal() { 78fatal() {
373############################################################################# 372#############################################################################
374# main 373# main
375 374
376podusage() { 375podusage() {
377 echo 376 echo
377
378 if [ -e "$PERL_PREFIX/bin/perl" ]; then 378 if [ -e "$PERL_PREFIX/bin/perl" ]; then
379 "$PERL_PREFIX/bin/perl" -MPod::Usage -e \ 379 "$PERL_PREFIX/bin/perl" -MPod::Usage -e \
380 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ 380 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \
381 2>/dev/null && exit 381 2>/dev/null && exit
382 fi 382 fi
383
383 # try whatever perl we can find 384 # try whatever perl we can find
384 perl -MPod::Usage -e \ 385 perl -MPod::Usage -e \
385 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ 386 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \
386 2>/dev/null && exit 387 2>/dev/null && exit
387 388
388 fatal "displaying documentation requires a working perl - try '$0 install' first" 389 fatal "displaying documentation requires a working perl - try '$0 install' to build one in a safe location"
389} 390}
390 391
391usage() { 392usage() {
392 podusage 0 393 podusage 0
393} 394}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines