… | |
… | |
49 | |
49 | |
50 | # which extra modules you might want to install |
50 | # which extra modules you might want to install |
51 | EXTRA_MODULES="" |
51 | EXTRA_MODULES="" |
52 | |
52 | |
53 | # overridable functions |
53 | # overridable functions |
54 | preconfigure() { : ; } |
54 | preconfigure() { : ; } |
55 | patchconfig() { : ; } |
55 | patchconfig() { : ; } |
56 | postconfigure() { : ; } |
56 | postconfigure() { : ; } |
57 | postbuild() { : ; } |
57 | postbuild() { : ; } |
|
|
58 | postcpanconfig() { : ; } |
58 | postinstall() { : ; } |
59 | postinstall() { : ; } |
59 | |
60 | |
60 | # now source user config, if any |
61 | # now source user config, if any |
61 | if [ "$STATICPERLRC" ]; then |
62 | if [ "$STATICPERLRC" ]; then |
62 | . "$STATICPERLRC" |
63 | . "$STATICPERLRC" |
63 | else |
64 | else |
… | |
… | |
86 | # life easier when working in e.g. "staticperl cpan / look" |
87 | # life easier when working in e.g. "staticperl cpan / look" |
87 | PATH="$PERL_PREFIX/perl/bin:$PATH" |
88 | PATH="$PERL_PREFIX/perl/bin:$PATH" |
88 | |
89 | |
89 | # set version in a way that Makefile.PL can extract |
90 | # set version in a way that Makefile.PL can extract |
90 | VERSION=VERSION; eval \ |
91 | VERSION=VERSION; eval \ |
91 | $VERSION="1.45" |
92 | $VERSION="1.46" |
92 | |
93 | |
93 | fatal() { |
94 | fatal() { |
94 | printf -- "\nFATAL: %s\n\n" "$*" >&2 |
95 | printf -- "\nFATAL: %s\n\n" "$*" >&2 |
95 | exit 1 |
96 | exit 1 |
96 | } |
97 | } |
… | |
… | |
437 | |
438 | |
438 | # help to trick CPAN into avoiding ~/.cpan completely |
439 | # help to trick CPAN into avoiding ~/.cpan completely |
439 | echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm" |
440 | echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm" |
440 | |
441 | |
441 | # we call cpan with -MCPAN::MyConfig in this script, which |
442 | # we call cpan with -MCPAN::MyConfig in this script, which |
442 | # is strictly unnecssary as we have to patch CPAN anyway, |
443 | # is strictly unnecessary as we have to patch CPAN anyway, |
443 | # so consider it "for good measure". |
444 | # so consider it "for good measure". |
444 | "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e ' |
445 | "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e ' |
445 | CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); |
446 | CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); |
|
|
447 | CPAN::Shell->o (conf => pushy_https => "0"); |
446 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
448 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
447 | CPAN::Shell->o (conf => q<init>); |
449 | CPAN::Shell->o (conf => q<init>); |
448 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
450 | CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); |
449 | CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); |
451 | CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); |
450 | CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs"); |
452 | CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs"); |
… | |
… | |
453 | CPAN::Shell->o (conf => q<makepl_arg>, "MAP_TARGET=perl"); |
455 | CPAN::Shell->o (conf => q<makepl_arg>, "MAP_TARGET=perl"); |
454 | CPAN::Shell->o (conf => q<make>, "'"$PERL_PREFIX"'/bin/SP-make-make"); |
456 | CPAN::Shell->o (conf => q<make>, "'"$PERL_PREFIX"'/bin/SP-make-make"); |
455 | CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/SP-make-install-make"); |
457 | CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/SP-make-install-make"); |
456 | CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>); |
458 | CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>); |
457 | CPAN::Shell->o (conf => q<build_requires_install_policy>, q<yes>); |
459 | CPAN::Shell->o (conf => q<build_requires_install_policy>, q<yes>); |
|
|
460 | CPAN::Shell->o (conf => q<recommends_policy>, q<0>); |
|
|
461 | CPAN::Shell->o (conf => q<suggests_policy>, q<0>); |
458 | CPAN::Shell->o (conf => q<prefer_installer>, "EUMM"); |
462 | CPAN::Shell->o (conf => q<prefer_installer>, q<EUMM>); |
459 | CPAN::Shell->o (conf => q<commit>); |
463 | CPAN::Shell->o (conf => q<commit>); |
460 | ' || fatal "error while initialising CPAN" |
464 | ' || fatal "error while initialising CPAN" |
|
|
465 | |
|
|
466 | postcpanconfig |
461 | |
467 | |
462 | : > "$PERL_PREFIX/staticstamp.install" |
468 | : > "$PERL_PREFIX/staticstamp.install" |
463 | fi |
469 | fi |
464 | |
470 | |
465 | _postinstall |
471 | _postinstall |