… | |
… | |
2 | |
2 | |
3 | ############################################################################# |
3 | ############################################################################# |
4 | # configuration to fill in (or to replace in your .staticperlrc) |
4 | # configuration to fill in (or to replace in your .staticperlrc) |
5 | |
5 | |
6 | STATICPERL=~/.staticperl |
6 | STATICPERL=~/.staticperl |
7 | CPAN=http://mirror.netcologne.de/cpan # which mirror to use |
7 | CPAN=https://mirror.netcologne.de/cpan # which mirror to use |
|
|
8 | BACKPAN=https://backpan.perl.org/ |
8 | EMAIL="read the documentation <rtfm@example.org>" |
9 | EMAIL="read the documentation <rtfm@example.org>" |
9 | DLCACHE= |
10 | DLCACHE= |
10 | |
11 | |
11 | # perl build variables |
12 | # perl build variables |
12 | MAKE=make |
13 | MAKE=make |
… | |
… | |
77 | export LDFLAGS="$PERL_LDFLAGS" |
78 | export LDFLAGS="$PERL_LDFLAGS" |
78 | unset LIBS |
79 | unset LIBS |
79 | |
80 | |
80 | PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed |
81 | PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed |
81 | |
82 | |
82 | unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG |
83 | unset PERL PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO PERLIO_DEBUG PERL_MB_OPT |
83 | unset PERL_MB_OPT |
|
|
84 | LC_ALL=C; export LC_ALL # just to be on the safe side |
84 | LC_ALL=C; export LC_ALL # just to be on the safe side |
85 | |
85 | |
86 | # prepend PATH - not required by staticperl itself, but might make |
86 | # prepend PATH - not required by staticperl itself, but might make |
87 | # life easier when working in e.g. "staticperl cpan / look" |
87 | # life easier when working in e.g. "staticperl cpan / look" |
88 | PATH="$PERL_PREFIX/perl/bin:$PATH" |
88 | PATH="$PERL_PREFIX/perl/bin:$PATH" |
… | |
… | |
172 | chmod -R u+w unpack |
172 | chmod -R u+w unpack |
173 | mv unpack perl |
173 | mv unpack perl |
174 | return |
174 | return |
175 | ;; |
175 | ;; |
176 | * ) |
176 | * ) |
177 | PERLURL="$CPAN/src/5.0/perl-$PERL_VERSION.tar.bz2" |
177 | PERLURL="$CPAN/src/5.0/perl-$PERL_VERSION.tar.gz" |
178 | PERLTAR=perl-$PERL_VERSION.tar.bz2 |
178 | PERLTAR=perl-$PERL_VERSION.tar.gz |
179 | ;; |
179 | ;; |
180 | esac |
180 | esac |
181 | |
181 | |
182 | if ! [ -e "$PERLTAR" ]; then |
182 | if ! [ -e "$PERLTAR" ]; then |
183 | verblock <<EOF |
183 | verblock <<EOF |
… | |
… | |
442 | # we call cpan with -MCPAN::MyConfig in this script, which |
442 | # we call cpan with -MCPAN::MyConfig in this script, which |
443 | # is strictly unnecessary as we have to patch CPAN anyway, |
443 | # is strictly unnecessary as we have to patch CPAN anyway, |
444 | # so consider it "for good measure". |
444 | # so consider it "for good measure". |
445 | "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e ' |
445 | "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e ' |
446 | CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); |
446 | CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); |
|
|
447 | CPAN::Shell->o (conf => urllist => push => "'"$BACKPAN"'"); |
447 | CPAN::Shell->o (conf => pushy_https => "0"); |
448 | CPAN::Shell->o (conf => pushy_https => "0"); |
448 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
449 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
449 | CPAN::Shell->o (conf => q<init>); |
450 | CPAN::Shell->o (conf => q<init>); |
450 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
451 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
451 | CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); |
452 | CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); |