… | |
… | |
12 | MAKE=make |
12 | MAKE=make |
13 | PERL_VERSION=5.12.4 # 5.8.9 is also a good choice |
13 | PERL_VERSION=5.12.4 # 5.8.9 is also a good choice |
14 | PERL_CC=cc |
14 | PERL_CC=cc |
15 | PERL_CONFIGURE="" # additional Configure arguments |
15 | PERL_CONFIGURE="" # additional Configure arguments |
16 | PERL_CCFLAGS="-g -DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=16376 -DNO_PERL_MALLOC_ENV -D_GNU_SOURCE -DNDEBUG" |
16 | PERL_CCFLAGS="-g -DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=16376 -DNO_PERL_MALLOC_ENV -D_GNU_SOURCE -DNDEBUG" |
17 | PERL_OPTIMIZE="-Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math" |
17 | PERL_OPTIMIZE="-Os" # -Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math" |
18 | |
18 | |
19 | ARCH="$(uname -m)" |
19 | ARCH="$(uname -m)" |
20 | |
20 | |
21 | case "$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 | # ;; |
30 | esac |
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" |
80 | PATH="$PERL_PREFIX/perl/bin:$PATH" |
80 | PATH="$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 |
83 | VERSION=VERSION; eval \ |
83 | VERSION=VERSION; eval \ |
84 | $VERSION="1.31" |
84 | $VERSION="1.4" |
85 | |
85 | |
86 | BZ2=bz2 |
86 | BZ2=bz2 |
87 | BZIP2=bzip2 |
87 | BZIP2=bzip2 |
88 | |
88 | |
89 | fatal() { |
89 | fatal() { |
… | |
… | |
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 |
436 | installing modules from CPAN |
438 | installing modules from CPAN |
437 | $@ |
439 | $@ |
438 | EOF |
440 | EOF |
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" |