blob: 679caa36a1219ea97143b4ec693fba23a24180c9 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001perl-Net-LibIDN: cross-compile
2
3Upstream-Status: Pending
4
5Add support for cross-compile allowing the compiler binary to be
6specified into the perl Makefile instead of using the default 'gcc'.
7
8Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com>
9---
10
11--- perl-Net-LibIDN-0.12.orig/Makefile.PL 2009-02-26 07:09:45.000000000 -0500
12+++ perl-Net-LibIDN-0.12/Makefile.PL 2010-10-19 09:34:22.811173965 -0400
13@@ -9,6 +9,7 @@
14 my $options;
15 my $testno=1;
16 my %MakeParams = InitMakeParams();
17+my $compiler;
18
19 WriteMakefile(%MakeParams);
20
21@@ -44,7 +45,8 @@
22 (
23 "with-libidn=s" => \$libdir,
24 "with-libidn-inc=s" => \$incdir,
25- "disable-tld" => \$disable_tld
26+ "disable-tld" => \$disable_tld,
27+ "compiler=s" => \$compiler
28 );
29
30 if ($libdir)
31@@ -165,12 +167,17 @@
32 return 0;
33 }
34
35- foreach my $cc (qw/cc gcc/)
36+ foreach my $cc ($compiler, qw/cc gcc/)
37 {
38 unlink($test);
39 system "$cc $cflags -o $test $test.c $ldflags";
40 next if ($? >> 8);
41
42+ if ($compiler == $cc)
43+ {
44+ return 1;
45+ }
46+
47 if (open(FILE, "./$test|"))
48 {
49 my $match;