X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Makefile.PL;h=299069ee9d28ec9eacbaa141cf568dc71345321f;hb=648ad6c5c058001027d236b0b56cfbd49bcd8c74;hp=1db1f75d3717637697f87a0c73d0a0c674305611;hpb=2dab5cc160177f9e19f4cb658ecf9d3e9f44a10f;p=perl%2Fmodules%2FScope-Upper.git diff --git a/Makefile.PL b/Makefile.PL index 1db1f75..299069e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,10 +4,24 @@ use strict; use warnings; use ExtUtils::MakeMaker; +use Config; + +my $pl = $Config{perl_patchlevel}; +my $desc = $Config{git_describe}; +for ($pl, $desc) { + $_ = undef unless defined and length; +} + my @DEFINES; +print "Checking if this is an official release of perl... "; +my $is_release = ("$]" < 5.011) ? (defined($pl) || defined($desc) ? 0 : 1) + : (defined($desc) ? 0 : 1); +push @DEFINES, "-DSU_RELEASE=$is_release"; +print $is_release ? "yes\n" : "no\n"; + # Threads, Windows and 5.8.x don't seem to be best friends -if ($^O eq 'MSWin32' && $^V lt v5.9.0) { +if ($^O eq 'MSWin32' && "$]" < 5.009) { push @DEFINES, '-DSU_MULTIPLICITY=0'; } @@ -28,6 +42,7 @@ my %PREREQ_PM = ( my %META = ( configure_requires => { + 'Config' => 0, 'ExtUtils::MakeMaker' => 0, }, build_requires => { @@ -53,10 +68,10 @@ WriteMakefile( PL_FILES => {}, @DEFINES, PREREQ_PM => \%PREREQ_PM, - MIN_PERL_VERSION => 5.006, + MIN_PERL_VERSION => '5.006', META_MERGE => \%META, dist => { - PREOP => "pod2text $file > \$(DISTVNAME)/README", + PREOP => "pod2text -u $file > \$(DISTVNAME)/README", COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, clean => {