python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / perl-gd / 0004-gdlib-config-is-now-configurable.patch
blob58df2255a3f4a83d2911ca0a17938fdcf251bca1
1 From f417f38929fe558d388b9a9343da9b2c0e6984aa Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@openwide.fr>
3 Date: Sat, 20 Dec 2014 23:22:41 +0100
4 Subject: [PATCH] Makefile.PL: gdlib-config is now configurable
6 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
7 ---
8 Makefile.PL | 15 +++++++++++++--
9 1 file changed, 13 insertions(+), 2 deletions(-)
11 diff --git a/Makefile.PL b/Makefile.PL
12 index dfe8ad7..0fa6ef3 100644
13 --- a/Makefile.PL
14 +++ b/Makefile.PL
15 @@ -21,7 +21,7 @@ END
16 my (@INC,@LIBPATH,@LIBS);
17 my $AUTOCONFIG = 0; # global set by try_to_autoconfigure() below
19 -my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$force);
20 +my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$force,$gdlib_config_path);
22 use Getopt::Long;
23 my $result = GetOptions("options=s" => \$options,
24 @@ -32,6 +32,7 @@ my $result = GetOptions("options=s" => \$options,
25 "lib_xpm_path=s" => \$lib_xpm_path,
26 "lib_zlib_path=s" => \$lib_zlib_path,
27 "ignore_missing_gd" => \$force,
28 + "gdlib_config_path=s" => \$gdlib_config_path,
31 unless (try_to_autoconfigure(\$options,\$lib_gd_path,\@INC,\@LIBPATH,\@LIBS) || $force) {
32 @@ -72,6 +73,7 @@ Configure GD module.
33 -lib_xpm_path path path to libxpm
34 -lib_zlib_path path path to libpng
35 -ignore_missing_gd Ignore missing or old libgd installations and try to compile anyway
36 + -gdlib_config_path path path to gdlib-config
38 If no options are passed on the command line. The program will
39 attempt to autoconfigure itself with the gdlib-config program (present
40 @@ -118,6 +120,15 @@ if( defined($lib_zlib_path) )
41 @INC = ("-I$lib_zlib_path/include", @INC);
42 @LIBPATH = ("-L$lib_zlib_path/lib", @LIBPATH);
44 +if( defined($gdlib_config_path) )
46 + print "gdlib-config used: $gdlib_config_path\n";
48 +else
50 + $gdlib_config_path = "gdlib-config";
51 + print "$gdlib_config_path used from the PATH\n";
53 #############################################################################################
55 if ($^O eq 'VMS'){
56 @@ -278,7 +289,7 @@ exit 0;
58 sub try_to_autoconfigure {
59 my ($options,$lib_gd_path,$INC,$LIBPATH,$LIBS) = @_;
60 - my $config = `gdlib-config --all`;
61 + my $config = `$gdlib_config_path --all`;
62 return unless $config;
63 $AUTOCONFIG++;
65 --
66 1.9.3