| 1 | package Perl::Dist::Vanilla; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 1 | ▶ | use 5.006; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 1 | ▶ | use Perl::Dist; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | 1 | ▶ | use vars qw{$VERSION @ISA}; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 9 | 1 | ▶ | BEGIN { | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 10 | 1 | $VERSION = '19'; | |||||||||||||
| 11 | 1 | @ISA = 'Perl::Dist'; | |||||||||||||
| 12 | } | ||||||||||||||
| 13 | |||||||||||||||
| 14 | |||||||||||||||
| 15 | |||||||||||||||
| 16 | |||||||||||||||
| 17 | |||||||||||||||
| 18 | ##################################################################### | ||||||||||||||
| 19 | # Upstream Binary Packages | ||||||||||||||
| 20 | |||||||||||||||
| 21 | 1 | my %PACKAGES = ( | |||||||||||||
| 22 | # Disabled as the generate test failures in 5.10.0 | ||||||||||||||
| 23 | # 'mingw-runtime' => 'mingw-runtime-3.14.tar.gz', | ||||||||||||||
| 24 | # 'w32api' => 'w32api-3.11.tar.gz', | ||||||||||||||
| 25 | ); | ||||||||||||||
| 26 | |||||||||||||||
| 27 | 0 | ▶ | sub binary_file { | ||||||||||||
|
Subroutine
binary_file: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||
| 28 | 0 | ▶ | $PACKAGES{$_[1]} or | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 29 | shift->SUPER::binary_file(@_); | ||||||||||||||
| 30 | } | ||||||||||||||
| 31 | |||||||||||||||
| 32 | |||||||||||||||
| 33 | |||||||||||||||
| 34 | |||||||||||||||
| 35 | |||||||||||||||
| 36 | ##################################################################### | ||||||||||||||
| 37 | # Configuration | ||||||||||||||
| 38 | |||||||||||||||
| 39 | # Apply some default paths | ||||||||||||||
| 40 | 0 | ▶ | sub new { | ||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||
| 41 | 0 | my $class = shift; | |||||||||||||
| 42 | |||||||||||||||
| 43 | # Prepend defaults | ||||||||||||||
| 44 | 0 | my $self = $class->SUPER::new( | |||||||||||||
| 45 | app_id => 'vanillaperl', | ||||||||||||||
| 46 | app_name => 'Vanilla Perl', | ||||||||||||||
| 47 | app_publisher => 'Vanilla Perl Project', | ||||||||||||||
| 48 | app_publisher_url => 'http://vanillaperl.org/', | ||||||||||||||
| 49 | image_dir => 'C:\\vanilla', | ||||||||||||||
| 50 | |||||||||||||||
| 51 | # Always generate both forms | ||||||||||||||
| 52 | exe => 1, | ||||||||||||||
| 53 | zip => 1, | ||||||||||||||
| 54 | @_, | ||||||||||||||
| 55 | ); | ||||||||||||||
| 56 | |||||||||||||||
| 57 | 0 | return $self; | |||||||||||||
| 58 | } | ||||||||||||||
| 59 | |||||||||||||||
| 60 | # Lazily default the full name | ||||||||||||||
| 61 | 0 | ▶ | sub app_ver_name { | ||||||||||||
|
Subroutine
app_ver_name: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 62 | $_[0]->{app_ver_name} or | ||||||||||||||
| 63 | 0 | ▶ | $_[0]->app_name | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 64 | . ($_[0]->portable ? ' Portable' : '') | ||||||||||||||
| 65 | . ' ' . $_[0]->perl_version_human | ||||||||||||||
| 66 | . ' Build ' . $_[0]->VERSION; | ||||||||||||||
| 67 | } | ||||||||||||||
| 68 | |||||||||||||||
| 69 | # Lazily default the file name | ||||||||||||||
| 70 | 0 | ▶ | sub output_base_filename { | ||||||||||||
|
Subroutine
output_base_filename: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 71 | $_[0]->{output_base_filename} or | ||||||||||||||
| 72 | 0 | ▶ | 'vanilla-perl' | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 73 | . ($_[0]->portable ? '-portable' : '') | ||||||||||||||
| 74 | . '-' . $_[0]->perl_version_human | ||||||||||||||
| 75 | . '-build-' . $_[0]->VERSION; | ||||||||||||||
| 76 | } | ||||||||||||||
| 77 | |||||||||||||||
| 78 | |||||||||||||||
| 79 | |||||||||||||||
| 80 | |||||||||||||||
| 81 | |||||||||||||||
| 82 | ##################################################################### | ||||||||||||||
| 83 | # Installation Script | ||||||||||||||
| 84 | |||||||||||||||
| 85 | 0 | ▶ | sub install_perl_5100_bin { | ||||||||||||
|
Subroutine
install_perl_5100_bin: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||
| 86 | 0 | my $self = shift; | |||||||||||||
| 87 | 0 | $self->SUPER::install_perl_5100_bin(@_); | |||||||||||||
| 88 | |||||||||||||||
| 89 | # Overwrite the CPAN config to be relocatable | ||||||||||||||
| 90 | 0 | ▶ | if ( $self->portable ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 91 | 0 | $self->install_file( | |||||||||||||
| 92 | share => 'Perl-Dist vanilla/perl-5.10.0/lib/Config.pm', | ||||||||||||||
| 93 | install_to => 'perl/lib/Config.pm', | ||||||||||||||
| 94 | ); | ||||||||||||||
| 95 | 0 | $self->install_file( | |||||||||||||
| 96 | share => 'Perl-Dist vanilla/perl-5.10.0/lib/Config_heavy.pl', | ||||||||||||||
| 97 | install_to => 'perl/lib/Config_heavy.pl', | ||||||||||||||
| 98 | ); | ||||||||||||||
| 99 | 0 | $self->install_file( | |||||||||||||
| 100 | share => 'Perl-Dist vanilla/perl-5.10.0/lib/CPAN/Config.pm', | ||||||||||||||
| 101 | install_to => 'perl/lib/CPAN/Config.pm', | ||||||||||||||
| 102 | ); | ||||||||||||||
| 103 | } | ||||||||||||||
| 104 | |||||||||||||||
| 105 | 0 | return 1; | |||||||||||||
| 106 | } | ||||||||||||||
| 107 | |||||||||||||||
| 108 | 0 | ▶ | sub install_c_libraries { | ||||||||||||
|
Subroutine
install_c_libraries: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 109 | 0 | my $self = shift; | |||||||||||||
| 110 | 0 | $self->SUPER::install_c_libraries(@_); | |||||||||||||
| 111 | |||||||||||||||
| 112 | # Install Expat (which exercises install_par) | ||||||||||||||
| 113 | 0 | $self->install_expat; | |||||||||||||
| 114 | |||||||||||||||
| 115 | 0 | return 1; | |||||||||||||
| 116 | } | ||||||||||||||
| 117 | |||||||||||||||
| 118 | 0 | ▶ | sub install_perl_modules { | ||||||||||||
|
Subroutine
install_perl_modules: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 119 | 0 | my $self = shift; | |||||||||||||
| 120 | 0 | $self->SUPER::install_perl_modules(@_); | |||||||||||||
| 121 | |||||||||||||||
| 122 | # Upgrade to the latest version | ||||||||||||||
| 123 | 0 | $self->install_module( | |||||||||||||
| 124 | name => 'CGI', | ||||||||||||||
| 125 | ); | ||||||||||||||
| 126 | |||||||||||||||
| 127 | 0 | return 1; | |||||||||||||
| 128 | } | ||||||||||||||
| 129 | |||||||||||||||
| 130 | # Delete from additional compiler stuff for non-Microsoft platforms | ||||||||||||||
| 131 | 0 | ▶ | sub remove_waste { | ||||||||||||
|
Subroutine
remove_waste: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||
| 132 | 0 | my $self = shift; | |||||||||||||
| 133 | 0 | $self->SUPER::remove_waste(@_); | |||||||||||||
| 134 | |||||||||||||||
| 135 | 0 | $self->trace("Removing unneeded compiler templates...\n"); | |||||||||||||
| 136 | 0 | foreach my $dir ( | |||||||||||||
| 137 | [ qw{ c bin startup mac } ], | ||||||||||||||
| 138 | [ qw{ c bin startup os2 } ], | ||||||||||||||
| 139 | [ qw{ c bin startup unix } ], | ||||||||||||||
| 140 | [ qw{ c bin startup templates mac } ], | ||||||||||||||
| 141 | [ qw{ c bin startup templates os2 } ], | ||||||||||||||
| 142 | [ qw{ c bin startup templates unix } ], | ||||||||||||||
| 143 | ) { | ||||||||||||||
| 144 | 0 | File::Remove::remove( \1, $self->dir(@$dir) ); | |||||||||||||
| 145 | } | ||||||||||||||
| 146 | |||||||||||||||
| 147 | 0 | return 1; | |||||||||||||
| 148 | } | ||||||||||||||
| 149 | |||||||||||||||
| 150 | 0 | ▶ | sub patch_include_path { | ||||||||||||
|
Subroutine
patch_include_path: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||
| 151 | 0 | my $self = shift; | |||||||||||||
| 152 | 0 | my $include = $self->SUPER::patch_include_path; | |||||||||||||
| 153 | |||||||||||||||
| 154 | # Add the extra vanilla directory | ||||||||||||||
| 155 | 0 | my $perl = $self->perl_version_human; | |||||||||||||
| 156 | 0 | my $share = File::ShareDir::dist_dir('Perl-Dist'); | |||||||||||||
| 157 | 0 | my $path = File::Spec->catdir( | |||||||||||||
| 158 | $share, 'vanilla', | ||||||||||||||
| 159 | ); | ||||||||||||||
| 160 | 0 | ▶ | unless ( -d $path ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 161 | 0 | die("Directory $path does not exist"); | |||||||||||||
| 162 | } | ||||||||||||||
| 163 | 0 | return [ @$include, $path ]; | |||||||||||||
| 164 | } | ||||||||||||||
| 165 | |||||||||||||||
| 166 | 1 | 1; | |||||||||||||
| 167 | |||||||||||||||
| 168 | __END__ | ||||||||||||||