From 05151c32dea516de835000e022b60f58d7bcaf4b Mon Sep 17 00:00:00 2001 From: Daisuke Murase Date: Thu, 20 Jan 2011 11:45:42 +0900 Subject: [PATCH] ignore missing ppport.h if target module use use_ppport() functions provided by Module::Install::XSUtil. --- lib/ShipIt/ProjectType/Perl/MakeMaker.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/ShipIt/ProjectType/Perl/MakeMaker.pm b/lib/ShipIt/ProjectType/Perl/MakeMaker.pm index 381158a..ee6bc75 100644 --- a/lib/ShipIt/ProjectType/Perl/MakeMaker.pm +++ b/lib/ShipIt/ProjectType/Perl/MakeMaker.pm @@ -42,6 +42,17 @@ sub disttest { my $missing_ignore = join "|", qw( ^META\.yml$ ^inc/ ); @missing = grep { $_ !~ $missing_ignore } @missing; + # Module::Install::XSUtil also creates ppport.h automatically in make + { + open my $fh, '<', 'Makefile.PL' or die "Can't open Makefile.PL: $!"; + my $f = do { local $/; <$fh> }; + close $fh; + + if ($f =~ /use_ppport/) { + @missing = grep { $_ ne 'ppport.h' } @missing; + } + } + # I'm getting sick of making MANIFEST.SKIP files just for the # .shipit conf file and dh-make-perl stuff, so let's ignore those my %ignore = map { $_ => 1 } qw(