[liblinux-distribution-perl] 10/34: use compat layer for Makefile.PL

gregor herrmann gregoa at debian.org
Thu Jun 4 21:35:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to annotated tag v0.22
in repository liblinux-distribution-perl.

commit 8eae3020c3d0b07e899af4f072ecfd1d311e6e24
Author: Alexandr Ciornii <alexchorny at gmail.com>
Date:   Tue Oct 6 02:31:44 2009 +0300

    use compat layer for Makefile.PL
---
 Makefile.PL | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/Makefile.PL b/Makefile.PL
index 8750cac..0951280 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -3,7 +3,7 @@ use ExtUtils::MakeMaker;
 unless (lc $^O eq "linux") {
     die "OS unsupported\n";
 }
-WriteMakefile(
+WriteMakefile1(
     NAME              => 'Linux::Distribution',
     VERSION_FROM      => 'lib/Linux/Distribution.pm', # finds $VERSION
     PREREQ_PM         => {
@@ -14,3 +14,26 @@ WriteMakefile(
     ($ExtUtils::MakeMaker::VERSION ge '6.48'? 
      ('LICENSE'	=> 'perl', 'MIN_PERL_VERSION' => 5.006,) : ()),
 );
+
+sub WriteMakefile1 { #Written by Alexandr Ciornii
+        my %params=@_;
+        my $eumm_version=$ExtUtils::MakeMaker::VERSION;
+        $eumm_version=eval $eumm_version;
+        die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
+        die "License not specified" if not exists $params{LICENSE};
+        if ($params{BUILD_REQUIRES}) { #and $eumm_version < 6.5503
+            #Should be modified in future when EUMM will
+            #correctly support BUILD_REQUIRES.
+            #EUMM 6.5502 has problems with BUILD_REQUIRES
+            $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
+            delete $params{BUILD_REQUIRES};
+        }
+        delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
+        delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
+        delete $params{META_MERGE} if $eumm_version < 6.46;
+        delete $params{META_ADD} if $eumm_version < 6.46;
+        delete $params{LICENSE} if $eumm_version < 6.31;
+        delete $params{AUTHOR} if $] < 5.005;
+        delete $params{ABSTRACT_FROM} if $] < 5.005;
+        WriteMakefile(%params);
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/liblinux-distribution-perl.git



More information about the Pkg-perl-cvs-commits mailing list