From: Nicholas Clark Date: Mon, 3 Oct 2011 19:11:34 +0000 (+0200) Subject: bisect-runner.pl needs to patch ext/IPC/SysV/SysV.xs for "newer" Linux. X-Git-Tag: v5.15.4~153 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/eb31523687db18ab802034a6b56659a16381a1b6?ds=sidebyside bisect-runner.pl needs to patch ext/IPC/SysV/SysV.xs for "newer" Linux. (dromedary is built from a sufficiently "special biologist word" distribution that it doesn't need this) --- diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index a27f44c..6d649b0 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -407,7 +407,7 @@ sub apply_patch { my $patch = shift; my ($file) = $patch =~ qr!^diff.*a/(\S+) b/\1!; - open my $fh, '|-', 'patch' or die "Can't run patch: $!"; + open my $fh, '|-', 'patch', '-p1' or die "Can't run patch: $!"; print $fh $patch; close $fh or die "Can't patch $file: $?, $!"; } @@ -717,6 +717,25 @@ if ($target ne 'miniperl') { } } + if ($major < 10 + and -f 'ext/IPC/SysV/SysV.xs', + and my ($line) = extract_from_file('ext/IPC/SysV/SysV.xs', + qr!^(# *include )$!)) { + apply_patch(<<"EOPATCH"); +diff --git a/ext/IPC/SysV/SysV.xs b/ext/IPC/SysV/SysV.xs +index 35a8fde..62a7965 100644 +--- a/ext/IPC/SysV/SysV.xs ++++ b/ext/IPC/SysV/SysV.xs +\@\@ -4,7 +4,6 \@\@ + + #include + #ifdef __linux__ +-$line + #endif + #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) + #ifndef HAS_SEM +EOPATCH + } system "make $j $target"; }