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.49 by root, Sun Jul 10 01:37:56 2011 UTC vs.
Revision 1.53 by root, Mon Mar 5 07:20:46 2012 UTC

12MAKE=make 12MAKE=make
13PERL_VERSION=5.12.4 # 5.8.9 is also a good choice 13PERL_VERSION=5.12.4 # 5.8.9 is also a good choice
14PERL_CC=cc 14PERL_CC=cc
15PERL_CONFIGURE="" # additional Configure arguments 15PERL_CONFIGURE="" # additional Configure arguments
16PERL_CCFLAGS="-g -DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=16376 -DNO_PERL_MALLOC_ENV -D_GNU_SOURCE -DNDEBUG" 16PERL_CCFLAGS="-g -DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=16376 -DNO_PERL_MALLOC_ENV -D_GNU_SOURCE -DNDEBUG"
17PERL_OPTIMIZE="-Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math" 17PERL_OPTIMIZE="-Os" # -Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math"
18 18
19ARCH="$(uname -m)" 19ARCH="$(uname -m)"
20 20
21case "$ARCH" in 21#case "$ARCH" in
22 i*86 | x86_64 | amd64 ) 22# i*86 | x86_64 | amd64 )
23 PERL_OPTIMIZE="$PERL_OPTIMIZE -mpush-args -mno-inline-stringops-dynamically -mno-align-stringops -mno-ieee-fp" # x86/amd64 23# PERL_OPTIMIZE="$PERL_OPTIMIZE -mpush-args -mno-inline-stringops-dynamically -mno-align-stringops -mno-ieee-fp" # x86/amd64
24 case "$ARCH" in 24# case "$ARCH" in
25 i*86 ) 25# i*86 )
26 PERL_OPTIMIZE="$PERL_OPTIMIZE -fomit-frame-pointer -march=pentium3 -mtune=i386" # x86 only 26# PERL_OPTIMIZE="$PERL_OPTIMIZE -fomit-frame-pointer -march=pentium3 -mtune=i386" # x86 only
27 ;; 27# ;;
28 esac 28# esac
29 ;; 29# ;;
30esac 30#esac
31 31
32# -Wl,--gc-sections makes it impossible to check for undefined references 32# -Wl,--gc-sections makes it impossible to check for undefined references
33# for some reason so we need to patch away the "-no" after Configure and before make :/ 33# for some reason so we need to patch away the "-no" after Configure and before make :/
34# --allow-multiple-definition exists to work around uclibc's pthread static linking bug 34# --allow-multiple-definition exists to work around uclibc's pthread static linking bug
35#PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition" 35#PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition"
79# life easier when working in e.g. "staticperl cpan / look" 79# life easier when working in e.g. "staticperl cpan / look"
80PATH="$PERL_PREFIX/perl/bin:$PATH" 80PATH="$PERL_PREFIX/perl/bin:$PATH"
81 81
82# set version in a way that Makefile.PL can extract 82# set version in a way that Makefile.PL can extract
83VERSION=VERSION; eval \ 83VERSION=VERSION; eval \
84$VERSION="1.31" 84$VERSION="1.42"
85 85
86BZ2=bz2 86BZ2=bz2
87BZIP2=bzip2 87BZIP2=bzip2
88 88
89fatal() { 89fatal() {
418 rm -rf bin cpan lib patched perl src 418 rm -rf bin cpan lib patched perl src
419 mkdir -m 755 perl perl/bin 419 mkdir -m 755 perl perl/bin
420 ln -s perl/bin/ bin 420 ln -s perl/bin/ bin
421 ln -s "$IMPORT" perl/bin/ 421 ln -s "$IMPORT" perl/bin/
422 422
423 echo "$IMPORT" > "$PERL_PREFIX/.import"
424
423 : > "$PERL_PREFIX/staticstamp.install" 425 : > "$PERL_PREFIX/staticstamp.install"
424 fi 426 fi
425 427
426 _postinstall 428 _postinstall
427} 429}
435 verblock <<EOF 437 verblock <<EOF
436installing modules from CPAN 438installing modules from CPAN
437$@ 439$@
438EOF 440EOF
439 441
440 #"$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e 'notest install $_ for @ARGV' -- "$@" | tee "$STATICPERL/instcpan.log" 442 MYCONFIG=
443 [ -e "$PERL_PREFIX/.import" ] || MYCONFIG=-MCPAN::MyConfig
444
441 "$PERL_PREFIX"/bin/perl -MCPAN -e 'notest install $_ for @ARGV' -- "$@" | tee "$STATICPERL/instcpan.log" 445 "$PERL_PREFIX"/bin/perl $MYCONFIG -MCPAN -e 'notest (install => $_) for @ARGV' -- "$@" | tee "$STATICPERL/instcpan.log"
442 446
443 if grep -q " -- NOT OK\$" "$STATICPERL/instcpan.log"; then 447 if grep -q " -- NOT OK\$" "$STATICPERL/instcpan.log"; then
444 fatal "failure while installing modules from CPAN ($@)" 448 fatal "failure while installing modules from CPAN ($@)"
445 fi 449 fi
446 rm -f "$STATICPERL/instcpan.log" 450 rm -f "$STATICPERL/instcpan.log"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines