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.67 by root, Wed Jun 5 22:16:13 2019 UTC vs.
Revision 1.77 by root, Fri Aug 4 20:19:45 2023 UTC

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
6STATICPERL=~/.staticperl 6STATICPERL=~/.staticperl
7CPAN=http://mirror.netcologne.de/cpan # which mirror to use 7CPAN=https://mirror.netcologne.de/cpan # which mirror to use
8BACKPAN=https://backpan.perl.org/
8EMAIL="read the documentation <rtfm@example.org>" 9EMAIL="read the documentation <rtfm@example.org>"
9DLCACHE= 10DLCACHE=
10 11
11# perl build variables 12# perl build variables
12MAKE=make 13MAKE=make
49 50
50# which extra modules you might want to install 51# which extra modules you might want to install
51EXTRA_MODULES="" 52EXTRA_MODULES=""
52 53
53# overridable functions 54# overridable functions
54preconfigure() { : ; } 55preconfigure() { : ; }
55patchconfig() { : ; } 56patchconfig() { : ; }
56postconfigure() { : ; } 57postconfigure() { : ; }
57postbuild() { : ; } 58postbuild() { : ; }
59postcpanconfig() { : ; }
58postinstall() { : ; } 60postinstall() { : ; }
59 61
60# now source user config, if any 62# now source user config, if any
61if [ "$STATICPERLRC" ]; then 63if [ "$STATICPERLRC" ]; then
62 . "$STATICPERLRC" 64 . "$STATICPERLRC"
63else 65else
76export LDFLAGS="$PERL_LDFLAGS" 78export LDFLAGS="$PERL_LDFLAGS"
77unset LIBS 79unset LIBS
78 80
79PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed 81PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed
80 82
81unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG 83unset PERL PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO PERLIO_DEBUG PERL_MB_OPT
82unset PERL_MB_OPT
83LC_ALL=C; export LC_ALL # just to be on the safe side 84LC_ALL=C; export LC_ALL # just to be on the safe side
84 85
85# prepend PATH - not required by staticperl itself, but might make 86# prepend PATH - not required by staticperl itself, but might make
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}
171 chmod -R u+w unpack 172 chmod -R u+w unpack
172 mv unpack perl 173 mv unpack perl
173 return 174 return
174 ;; 175 ;;
175 * ) 176 * )
176 PERLURL="$CPAN/src/5.0/perl-$PERL_VERSION.tar.bz2" 177 PERLURL="$CPAN/src/5.0/perl-$PERL_VERSION.tar.gz"
177 PERLTAR=perl-$PERL_VERSION.tar.bz2 178 PERLTAR=perl-$PERL_VERSION.tar.gz
178 ;; 179 ;;
179 esac 180 esac
180 181
181 if ! [ -e "$PERLTAR" ]; then 182 if ! [ -e "$PERLTAR" ]; then
182 verblock <<EOF 183 verblock <<EOF
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 => urllist => push => "'"$BACKPAN"'");
448 CPAN::Shell->o (conf => pushy_https => "0");
446 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 449 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
447 CPAN::Shell->o (conf => q<init>); 450 CPAN::Shell->o (conf => q<init>);
448 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 451 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
449 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); 452 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build");
450 CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs"); 453 CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs");
453 CPAN::Shell->o (conf => q<makepl_arg>, "MAP_TARGET=perl"); 456 CPAN::Shell->o (conf => q<makepl_arg>, "MAP_TARGET=perl");
454 CPAN::Shell->o (conf => q<make>, "'"$PERL_PREFIX"'/bin/SP-make-make"); 457 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"); 458 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>); 459 CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>);
457 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<yes>); 460 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<yes>);
461 CPAN::Shell->o (conf => q<recommends_policy>, q<0>);
462 CPAN::Shell->o (conf => q<suggests_policy>, q<0>);
458 CPAN::Shell->o (conf => q<prefer_installer>, "EUMM"); 463 CPAN::Shell->o (conf => q<prefer_installer>, q<EUMM>);
459 CPAN::Shell->o (conf => q<commit>); 464 CPAN::Shell->o (conf => q<commit>);
460 ' || fatal "error while initialising CPAN" 465 ' || fatal "error while initialising CPAN"
466
467 postcpanconfig
461 468
462 : > "$PERL_PREFIX/staticstamp.install" 469 : > "$PERL_PREFIX/staticstamp.install"
463 fi 470 fi
464 471
465 _postinstall 472 _postinstall

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines