perl: fix build
PATCH 1/1 perl: fix build
qemu-i386 & qemu-x86_64 cannot run properly miniperl with system(), see https://bugs.launchpad.net/qemu/+bug/1076445
replace qemu/miniperl by host-perl.
qemu is still used during the configure step (and cpanminus).
Signed-off-by Francois Perrad <[email protected]>
--- package/cpanminus/Config.in | 1 + package/perl/perl-add-patch-Makefile-SH.patch | 82 +++++++++++++++++++++ package/perl/perl-configure-qemu.patch | 4 +- package/perl/perl-fix-Module-Build.patch | 16 ---- package/perl/perl-fix-installperl.patch | 25 +++++++ package/perl/perl-mkppport.patch | 37 ---------- package/perl/perl-run-perl-lib.patch | 98 +++++++++++++++++++++++++ package/perl/perl.mk | 50 ++++++++++--- 8 files changed, 249 insertions(+), 64 deletions(-) create mode 100644 package/perl/perl-add-patch-Makefile-SH.patch delete mode 100644 package/perl/perl-fix-Module-Build.patch create mode 100644 package/perl/perl-fix-installperl.patch delete mode 100644 package/perl/perl-mkppport.patch create mode 100644 package/perl/perl-run-perl-lib.patch
package/cpanminus/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_CPANMINUS bool "cpanminus" + depends on !BR2_i386 && !BR2_x86_64 help cpanminus is a script to get, unpack, build and install Perl modules from CPAN.
package/perl/perl-add-patch-Makefile-SH.patch new file +82 -0
82 lines not on this page · raw message
package/perl/perl-configure-qemu.patch +2 -2
@@ -23,7 +23,7 @@ Index: b/Configure '') targetfrom=scp ;; esac - run=$run-$targetrun -+ run=$run-`basename $targetrun` ++ run=$run-`basename \`echo "$targetrun" | sed -e 's/^\([^ \t]*\).*$/\1/'\`` to=$to-$targetto from=$from-$targetfrom case "$targetdir" in
@@ -36,7 +36,7 @@ Index: b/Configure + from=: + cat >$run <<EOF +#!/bin/sh -+$targetrun -L $qemulib "\$@" ++$targetrun "\$@" +EOF + ;; *) echo "Unknown targetrun '$targetrun'" >&4
package/perl/perl-fix-Module-Build.patch deleted +0 -16
@@ -1,16 +0,0 @@ - -Signed-off-by: Francois Perrad <[email protected]> - -Index: b/cpan/Module-Build/lib/Module/Build/Base.pm -=================================================================== ---- a/cpan/Module-Build/lib/Module/Build/Base.pm -+++ b/cpan/Module-Build/lib/Module/Build/Base.pm -@@ -456,7 +456,7 @@ - my $proto = shift; - my $c = ref($proto) ? $proto->{config} : 'Module::Build::Config'; - -- my $perl = $^X; -+ my $perl = $ENV{RUN_PERL} || $^X; - my $perl_basename = File::Basename::basename($perl); - - my @potential_perls;
package/perl/perl-fix-installperl.patch new file +25 -0
@@ -0,0 +1,25 @@ + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/installperl +=================================================================== +--- a/installperl ++++ b/installperl +@@ -3,11 +3,17 @@ + BEGIN { + require 5.004; + chdir '..' if !-d 'lib' and -d '../lib'; ++ ++ my @sav = @INC; ++ my $sav = $ENV{PERL5LIB}; + @INC = 'lib'; + $ENV{PERL5LIB} = 'lib'; + + # This needs to be at BEGIN time, before any use of Config + require './install_lib.pl'; ++ ++ @INC = @sav; ++ $ENV{PERL5LIB} = $sav; + } + + use strict;
package/perl/perl-mkppport.patch deleted +0 -37
@@ -1,37 +0,0 @@ -Add RUN - -Signed-off-by: Francois Perrad <[email protected]> - -Index: b/mkppport -=================================================================== ---- a/mkppport -+++ b/mkppport -@@ -1,6 +1,7 @@ - use strict; - use warnings; - -+use Config; - use Getopt::Long; - use File::Spec; - use File::Compare qw( compare ); -@@ -136,14 +137,18 @@ - #---------------------------------------------- - sub run - { -+ my @run = $Config{run}; -+ @run = () if not defined $run[0] or $run[0] eq ''; - my @args = ("-I" . File::Spec->catdir((File::Spec->updir) x 2, 'lib'), @_); - my $run = $perl =~ m/\s/ ? qq("$perl") : $perl; - for (@args) { - $_ = qq("$_") if $^O eq 'VMS' && /^[^"]/; - $run .= " $_"; - } -- print "running $run\n"; -- system $run and die "$run failed: $?\n"; -+# print "running $run\n"; -+# system $run and die "$run failed: $?\n"; -+ print "running ", join(' ', @run, $run), "\n"; -+ system join(' ', @run, $run) and die "@run $run failed: $?\n"; - } - - __END__
package/perl/perl-run-perl-lib.patch new file +98 -0
98 lines not on this page · raw message
package/perl/perl.mk +41 -9
111 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 1/1 perl: fix build
Dear Francois Perrad,
Quoted 8 lines · Francois Perrad
qemu-i386 & qemu-x86_64 cannot run properly miniperl with
system(), see https://bugs.launchpad.net/qemu/+bug/1076445replace qemu/miniperl by host-perl.
qemu is still used during the configure step (and cpanminus).
Signed-off-by Francois Perrad <[email protected]>
This cannot apply: Arnout's patch that removes the dependency on qemu has been applied.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com