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