]> git.imager.perl.org - imager.git/commitdiff
allow Imager::Probe to accept arrayrefs for incpath and libpath, and
authorTony Cook <tony@develop=help.com>
Tue, 28 Sep 2010 12:20:46 +0000 (12:20 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 28 Sep 2010 12:20:46 +0000 (12:20 +0000)
supply the header/library paths that way in */Makefile.PL

Changes
FT2/Makefile.PL
GIF/Makefile.PL
JPEG/Makefile.PL
PNG/Makefile.PL
TIFF/Makefile.PL
W32/Makefile.PL
lib/Imager/Probe.pm

diff --git a/Changes b/Changes
index e873688b3e706b16e9906b66d89c33f17fa41b82..7e265ab1ef98cef581826351a399f8f03aa2a9c7 100644 (file)
--- a/Changes
+++ b/Changes
@@ -12,6 +12,9 @@ Bug fixes:
    by name, etc.
    https://rt.cpan.org/Ticket/Display.html?id=61047
 
+ - Imager::Probe now accepts array references for incpath and libpath.
+   https://rt.cpan.org/Ticket/Display.html?id=60244
+
 Imager 0.77_02 - 27 Sep 2010
 ==============
 
index fbaae50e191a64dd5ca11c77c2f52a1a77c6307d..1c7f9c4742e47c4bce2ed6288180a0d8f3f4079c 100644 (file)
@@ -82,8 +82,8 @@ my %probe =
    testcode => _ft2_test_code(),
    testcodeheaders => [ "stdio.h", "string.h", "ft2build.h" ],
    testcodeprologue => _ft2_test_code_prologue(),
-   incpath => join($Config{path_sep}, @incpaths),
-   libpath => join($Config{path_sep}, @libpaths),
+   incpath => \@incpaths,
+   libpath => \@libpaths,
    alternatives =>
    [
     {
index 229f8b350a49c9c06eb5980edf243d19db32ad5d..dd738fc532958849719a0694532fa4c824bcb4b5 100644 (file)
@@ -77,8 +77,8 @@ my %probe =
    libbase => "gif",
    testcode => _gif_test_code(),
    testcodeheaders => [ "gif_lib.h", "stdio.h" ],
-   incpath => join($Config{path_sep}, @incpaths),
-   libpath => join($Config{path_sep}, @libpaths),
+   incpath => \@incpaths,
+   libpath => \@libpaths,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
index 0edda02e1bf32b38802a99ac456e8e46a70b169e..c360098f7104583d6fedd548d777e8e2c8938db6 100644 (file)
@@ -77,8 +77,8 @@ my %probe =
    libbase => "jpeg",
    testcode => _jpeg_test_code(),
    testcodeheaders => [ "stdio.h", "stddef.h", "jpeglib.h" ],
-   incpath => join($Config{path_sep}, @incpaths),
-   libpath => join($Config{path_sep}, @libpaths),
+   incpath => \@incpaths,
+   libpath => \@libpaths,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
index fb5122e76d749fadf9d2a30da3ed345f0d9dc9d3..2fb8d48f4b77e7c9065d6b0e2e04bb9d5e4172d3 100644 (file)
@@ -79,8 +79,8 @@ my %probe =
    libbase => "png",
    testcode => _png_test_code(),
    testcodeheaders => [ "png.h", "stdio.h" ],
-   incpath => join($Config{path_sep}, @incpaths),
-   libpath => join($Config{path_sep}, @libpaths),
+   incpath => \@incpaths,
+   libpath => \@libpaths,
    alternatives =>
    [
     {
index a5f4b704622289f86a9dbdd39d71fe799f345f29..1668214a3a87ff1e798cfcf339c8441a018537fa 100644 (file)
@@ -77,8 +77,8 @@ my %probe =
    libbase => "tiff",
    testcode => _tiff_test_code(),
    testcodeheaders => [ "tiffio.h", "stdio.h", "string.h" ],
-   incpath => join($Config{path_sep}, @incpaths),
-   libpath => join($Config{path_sep}, @libpaths),
+   incpath => \@incpaths,
+   libpath => \@libpaths,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
index 86f22307f30435e799bad06b54d02cd2c13f21cd..78a8b7aff4997510a338bda4dfbbffa9aba2d712 100644 (file)
@@ -79,8 +79,8 @@ my %probe =
    libbase => "gdi32",
    testcode => _win32_test_code(),
    testcodeheaders => [ "stdio.h", "string.h", "windows.h" ],
-   incpath => join($Config{path_sep}, @incpaths),
-   libpath => join($Config{path_sep}, @libpaths),
+   incpath => \@incpaths,
+   libpath => \@libpaths,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
index 06123f1e0fa51aca5b0e7bb7cb311501fd4bc1ca..fe160f9e6f26f6970f14975f11c86098d55d547a 100644 (file)
@@ -308,6 +308,9 @@ sub _paths {
 
   my @out;
 
+  # expand any array refs
+  @in = map { ref() ? @$_ : $_ } @in;
+
   for my $path (@in) {
     $path or next;
     $path = _tilde_expand($path);
@@ -445,12 +448,12 @@ main function.
 =item *
 
 C<incpath> - C<$Config{path_sep}> separated list of header file
-directories to check.
+directories to check, or a reference to an array of such.
 
 =item *
 
 C<libpath> - C<$Config{path_sep}> separated list of library file
-directories to check.
+directories to check, or a reference to an array of such.
 
 =back