XSPROTOARG => '-noprototypes',
CONFIGURE => \&configure,
);
-delete $mf{META_MERGE} unless eval { ExtUtils::MakeMaker->VERSION (6.46) };
WriteMakefile(%mf);
sub configure
push @moreopts, LICENSE => 'perl';
}
+ if (eval { ExtUtils::MakeMaker->VERSION (6.46) }) {
+ open FH, '<PPPort_pm.PL' or die "cannot open PPPort_pm.PL for reading: $!";
+ my $version;
+ while (my $line = <FH>) {
+ ($version) = $line =~ /^\$VERSION = '([\d.]+)';$/ and last;
+ };
+ die 'failed to extract $VERSION from PPPort_pm.PL' if not $version;
+ close FH;
+ print "Adding META_MERGE...\n";
+ push @moreopts, META_MERGE => {
+ 'meta-spec' => { version => 2 },
+ provides => {
+ 'Devel::PPPort' => {
+ file => 'PPPort_pm.PL',
+ version => $version,
+ },
+ },
+ resources => {
+ bugtracker => {
+ web => 'https://rt.perl.org/rt3/',
+ },
+ repository => {
+ type => 'git',
+ url => 'git://perl5.git.perl.org/perl.git',
+ web => 'https://perl5.git.perl.org/perl.git',
+ },
+ },
+ };
+ }
+
if (not $ENV{'PERL_CORE'}) {
# Devel::PPPort is in the core since 5.7.3
# 5.11.0+ has site before perl
$depend{'apicheck.i'} = 'ppport.h';
}
- open FH, '<PPPort_pm.PL' or die "cannot open PPPort_pm.PL for reading: $!";
- my $version;
- while (my $line = <FH>) {
- ($version) = $line =~ /^\$VERSION = '([\d.]+)';$/ and last;
- };
- die 'failed to extract $VERSION from PPPort_pm.PL' if not $version;
- close FH;
-
if ($Config{gccversion}) {
my $define = '-W -Wall';
$define .= ' -Wdeclaration-after-statement' if $Config{gccversion} =~ /^(\d+\.\d+)\./ && $1 >= 3.4;
PL_FILES => \%PL_FILES,
depend => \%depend,
clean => { FILES => "@clean" },
- META_MERGE => {
- 'meta-spec' => { version => 2 },
- provides => {
- 'Devel::PPPort' => {
- file => 'PPPort_pm.PL',
- version => $version,
- },
- },
- resources => {
- bugtracker => {
- web => 'https://rt.perl.org/rt3/',
- },
- repository => {
- type => 'git',
- url => 'git://perl5.git.perl.org/perl.git',
- web => 'https://perl5.git.perl.org/perl.git',
- },
- },
- },
@moreopts,
};
}