From: Steve Hay Date: Mon, 9 Jul 2007 11:43:09 +0000 (+0000) Subject: Some Win32 Config fixes for patchlevel and perl_patchlevel: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9277f440b7800bab095ac55322c223f4308cd3e;p=p5sagit%2Fp5-mst-13.2.git Some Win32 Config fixes for patchlevel and perl_patchlevel: - Set $Config{patchlevel} to PERL_VERSION (it was previously blank because it was wrongly being set from PATCHLEVEL, which was blank) - Set $Config{perl_patchlevel} and $Config{PERL_PATCHLEVEL} to the value in the top-level ".patch" file if it exists (the former was previously not set, while the latter was previously wrongly set to PERL_VERSION) p4raw-id: //depot/perl@31569 --- diff --git a/win32/config.bc b/win32/config.bc index d46c838..f00136d 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -817,11 +817,11 @@ otherlibdirs='' package='perl5' pager='more /e' passcat='' -patchlevel='~PATCHLEVEL~' +patchlevel='~PERL_VERSION~' path_sep=';' perl5='' perl='perl' -perl_patchlevel='' +perl_patchlevel='~PERL_PATCHLEVEL~' perladmin='' perllibs='~libs~' perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe' @@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~' PERL_API_REVISION='~PERL_API_REVISION~' PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' PERL_API_VERSION='~PERL_API_VERSION~' -PERL_PATCHLEVEL='~PERL_VERSION~' +PERL_PATCHLEVEL='~PERL_PATCHLEVEL~' PERL_CONFIG_SH='true' diff --git a/win32/config.ce b/win32/config.ce index bd6935e..01855fc 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -790,10 +790,11 @@ otherlibdirs='' package='perl5' pager='more /e' passcat='' -patchlevel='~PATCHLEVEL~' +patchlevel='~PERL_VERSION~' path_sep=';' perl5='' perl='perl' +perl_patchlevel='~PERL_PATCHLEVEL~' perladmin='' perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe' pg='' @@ -992,4 +993,5 @@ PERL_API_REVISION='~PERL_API_REVISION~' PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' PERL_API_VERSION='~PERL_API_VERSION~' PATCHLEVEL='~PERL_VERSION~' +PERL_PATCHLEVEL='~PERL_PATCHLEVEL~' PERL_CONFIG_SH='true' diff --git a/win32/config.gc b/win32/config.gc index 63c2250..33c5213 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -817,11 +817,11 @@ otherlibdirs='' package='perl5' pager='more /e' passcat='' -patchlevel='~PATCHLEVEL~' +patchlevel='~PERL_VERSION~' path_sep=';' perl5='' perl='perl' -perl_patchlevel='' +perl_patchlevel='~PERL_PATCHLEVEL~' perladmin='' perllibs='~libs~' perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe' @@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~' PERL_API_REVISION='~PERL_API_REVISION~' PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' PERL_API_VERSION='~PERL_API_VERSION~' -PERL_PATCHLEVEL='~PERL_VERSION~' +PERL_PATCHLEVEL='~PERL_PATCHLEVEL~' PERL_CONFIG_SH='true' diff --git a/win32/config.vc b/win32/config.vc index 0ac9e8b..f89ffbf 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -817,11 +817,11 @@ otherlibdirs='' package='perl5' pager='more /e' passcat='' -patchlevel='~PATCHLEVEL~' +patchlevel='~PERL_VERSION~' path_sep=';' perl5='' perl='perl' -perl_patchlevel='' +perl_patchlevel='~PERL_PATCHLEVEL~' perladmin='' perllibs='~libs~' perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe' @@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~' PERL_API_REVISION='~PERL_API_REVISION~' PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' PERL_API_VERSION='~PERL_API_VERSION~' -PERL_PATCHLEVEL='~PERL_VERSION~' +PERL_PATCHLEVEL='~PERL_PATCHLEVEL~' PERL_CONFIG_SH='true' diff --git a/win32/config.vc64 b/win32/config.vc64 index a5cb358..b94303c 100644 --- a/win32/config.vc64 +++ b/win32/config.vc64 @@ -817,11 +817,11 @@ otherlibdirs='' package='perl5' pager='more /e' passcat='' -patchlevel='~PATCHLEVEL~' +patchlevel='~PERL_VERSION~' path_sep=';' perl5='' perl='perl' -perl_patchlevel='' +perl_patchlevel='~PERL_PATCHLEVEL~' perladmin='' perllibs='~libs~' perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe' @@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~' PERL_API_REVISION='~PERL_API_REVISION~' PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' PERL_API_VERSION='~PERL_API_VERSION~' -PERL_PATCHLEVEL='~PERL_VERSION~' +PERL_PATCHLEVEL='~PERL_PATCHLEVEL~' PERL_CONFIG_SH='true' diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 21829fd..67f9c20 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -66,6 +66,15 @@ if (-e $pl_h) { else { die "Can't find $pl_h: $!"; } + +my $patch_file = '../.patch'; + +if (-e $patch_file) { + open my $fh, "<", $patch_file or die "Can't open $patch_file: $!"; + chomp($opt{PERL_PATCHLEVEL} = <$fh>); + close $fh; +} + $opt{VERSION} = "$opt{PERL_REVISION}.$opt{PERL_VERSION}.$opt{PERL_SUBVERSION}"; $opt{INST_VER} =~ s|~VERSION~|$opt{VERSION}|g; $opt{'version_patchlevel_string'} = "version $opt{PERL_VERSION} subversion $opt{PERL_SUBVERSION}";