commit 4f88892d49e6cf4c09e8ac5d150737ea3a68b9c2
parent 5308e6820e0c8aac69f6744a88d8fd24e24d900c
Author: tom-crane <tom-crane@github>
Date: Wed, 13 Apr 2016 00:39:49 +0200
Fix parallel builds by adding $MAKEOPTS
Patch from tom-crane in issue #41.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
@@ -836,6 +836,7 @@ sub rewrite_slackbuild {
my $libdir_regex = qr/^\s*LIBDIRSUFFIX="64"\s*$/;
my $arch_regex = qr/\$VERSION-\$ARCH-\$BUILD/;
my $dc_regex = qr/(?<![a-z])(tar|p7zip|unzip|ar|rpm2cpio|sh)\s+/;
+ my $make_regex = qr/^\s*make\s*$/;
# tie the slackbuild, because this is the easiest way to handle this.
tie my @sb_file, 'Tie::File', $slackbuild;
# if we're dealing with a compat32, we need to change the tar line(s) so
@@ -865,6 +866,7 @@ sub rewrite_slackbuild {
if (exists $$changes{arch_out}) {
$line =~ s/\$ARCH/$$changes{arch_out}/ if $line =~ $arch_regex;
}
+ $line =~ s/make/make \$MAKEOPTS/ if $line =~ $make_regex;
}
untie @sb_file;
return 1;