aboutsummaryrefslogtreecommitdiff
path: root/package/perl-gd/0003-force.patch
blob: 0a121a994e625ca4574df886bf18302398110b11 (plain)
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
let @INC and @LIBPATH empty when ignore_missing_gd

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
see https://github.com/lstein/Perl-GD/pull/7

Index: b/Makefile.PL
===================================================================
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -35,13 +35,15 @@
 }
 
 push @LIBS, "-lgd";
-@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
-@LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH;
-
-# support for AMD64 libraries
-if (-d '/usr/lib64') {
-  my @libs64 = map {my $a = $_; $a=~ s/lib$/lib64/; $a} @LIBPATH;
-  @LIBPATH = (@LIBPATH,@libs64);
+unless ($force) {
+  @INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
+  @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH;
+
+  # support for AMD64 libraries
+  if (-d '/usr/lib64') {
+    my @libs64 = map {my $a = $_; $a=~ s/lib$/lib64/; $a} @LIBPATH;
+    @LIBPATH = (@LIBPATH,@libs64);
+  }
 }
 
 #############################################################################################