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.66 by root, Wed Jun 5 22:14:01 2019 UTC vs.
Revision 1.75 by root, Tue Aug 1 03:48:59 2023 UTC

49 49
50# which extra modules you might want to install 50# which extra modules you might want to install
51EXTRA_MODULES="" 51EXTRA_MODULES=""
52 52
53# overridable functions 53# overridable functions
54preconfigure() { : ; } 54preconfigure() { : ; }
55patchconfig() { : ; } 55patchconfig() { : ; }
56postconfigure() { : ; } 56postconfigure() { : ; }
57postbuild() { : ; } 57postbuild() { : ; }
58postcpanconfig() { : ; }
58postinstall() { : ; } 59postinstall() { : ; }
59 60
60# now source user config, if any 61# now source user config, if any
61if [ "$STATICPERLRC" ]; then 62if [ "$STATICPERLRC" ]; then
62 . "$STATICPERLRC" 63 . "$STATICPERLRC"
63else 64else
86# life easier when working in e.g. "staticperl cpan / look" 87# life easier when working in e.g. "staticperl cpan / look"
87PATH="$PERL_PREFIX/perl/bin:$PATH" 88PATH="$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
90VERSION=VERSION; eval \ 91VERSION=VERSION; eval \
91$VERSION="1.45" 92$VERSION="1.46"
92 93
93fatal() { 94fatal() {
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
497instcpan() { 503instcpan() {
498 [ $NOCHECK_INSTALL ] || install 504 [ $NOCHECK_INSTALL ] || install
499 505
500 verblock <<EOF 506 verblock <<EOF
501installing modules from CPAN 507installing modules from CPAN
502$@ 508$*
503EOF 509EOF
504 510
505 MYCONFIG= 511 MYCONFIG=
506 [ -e "$PERL_PREFIX/.import" ] || MYCONFIG=-MCPAN::MyConfig 512 [ -e "$PERL_PREFIX/.import" ] || MYCONFIG=-MCPAN::MyConfig
507 513
508 "$PERL_PREFIX"/bin/perl $MYCONFIG -MCPAN -e 'notest (install => $_) for @ARGV' -- "$@" | tee "$STATICPERL/instcpan.log" 514 "$PERL_PREFIX"/bin/perl $MYCONFIG -MCPAN -e 'notest (install => $_) for @ARGV' -- "$@" | tee "$STATICPERL/instcpan.log"
509 515
510 if grep -q " -- NOT OK\$" "$STATICPERL/instcpan.log"; then 516 if grep -q " -- NOT OK\$" "$STATICPERL/instcpan.log"; then
511 fatal "failure while installing modules from CPAN ($@)" 517 fatal "failure while installing modules from CPAN ($*)"
512 fi 518 fi
513 rm -f "$STATICPERL/instcpan.log" 519 rm -f "$STATICPERL/instcpan.log"
514} 520}
515 521
516############################################################################# 522#############################################################################
519instsrc() { 525instsrc() {
520 [ $NOCHECK_INSTALL ] || install 526 [ $NOCHECK_INSTALL ] || install
521 527
522 verblock <<EOF 528 verblock <<EOF
523installing modules from source 529installing modules from source
524$@ 530$*
525EOF 531EOF
526 532
527 for mod in "$@"; do 533 for mod in "$@"; do
528 echo 534 echo
529 echo $mod 535 echo $mod

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines