Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 81d024213982bb81865fb5a8432ac3d4 > files > 2

perl-CPANPLUS-Dist-Mageia-2.103.0-6.mga9.src.rpm

--- CPANPLUS-Dist-Mageia-2.103/lib/CPANPLUS/Dist/Mageia.pm.MB	2016-05-20 15:13:12.000000000 +0300
+++ CPANPLUS-Dist-Mageia-2.103/lib/CPANPLUS/Dist/Mageia.pm	2018-10-13 22:24:10.722942137 +0300
@@ -125,7 +125,7 @@
     if (-e _path_to_makefile_pl($module)) {
         push @reqs, 'Module::Build::Compat' if _is_module_build_compat($module);
         $distbuild = "%{__perl} Makefile.PL INSTALLDIRS=vendor\n";
-        $distmaker = "%make";
+        $distmaker = "%make_build";
         $distinstall = "%make_install";
     } else {
         # module::build only distribution
@@ -148,8 +148,8 @@
         map { basename $_ }
         grep { m!^[^/]+/[^/]+$! }       # only interested in root files
         @{ $module->status->files };
-    my $distarch =
-        defined( first { /\.(c|xs)$/i } @{ $module->status->files } )
+    my $is_xs = defined( first { /\.(c|xs)$/i } @{ $module->status->files } );
+    my $distarch = $is_xs
         ? 'BuildRequires: perl-devel'
         : 'BuildArch: noarch';
 
@@ -213,6 +213,9 @@
         $line =~ s/DISTTOPLEVEL/$disttoplevel/;
         $line =~ s/DISTEXTRA/join( "\n", @{ $status->extra_files || [] })/e;
         $line =~ s/DISTDATE/POSIX::strftime("%a %b %d %Y", localtime())/e;
+        if ($is_xs) {
+            $line =~ s/%perl_vendorlib/%perl_vendorarch/;
+        }
 
         print $specfh $line;
     }