From d97c8dbdcb83ad98cf4e959bcbe9d9204e2ac835 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 14 Mar 2011 23:00:24 +1100 Subject: [PATCH] [RT #9675] add the library detection summary back in and improve it --- Changes | 3 +++ FT2/Makefile.PL | 5 +++++ GIF/Makefile.PL | 5 +++++ JPEG/Makefile.PL | 5 +++++ Makefile.PL | 20 ++++++++++++++++++++ PNG/Makefile.PL | 5 +++++ T1/Makefile.PL | 5 +++++ TIFF/Makefile.PL | 5 +++++ W32/Makefile.PL | 5 +++++ 9 files changed, 58 insertions(+) diff --git a/Changes b/Changes index 84f7d8f5..025bb8f1 100644 --- a/Changes +++ b/Changes @@ -21,6 +21,9 @@ Bug fixes: - add an (unshipped) test to check Imager's internal POD links https://rt.cpan.org/Ticket/Display.html?id=65749 + - improve the library detection summary + https://rt.cpan.org/Ticket/Display.html?id=9675 + Imager 0.81 - 14 Feb 2011 =========== diff --git a/FT2/Makefile.PL b/FT2/Makefile.PL index badd386e..3f680a9e 100644 --- a/FT2/Makefile.PL +++ b/FT2/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -95,6 +96,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{FT2} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -110,6 +113,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{FT2} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } diff --git a/GIF/Makefile.PL b/GIF/Makefile.PL index 80e99900..6b25f2f5 100644 --- a/GIF/Makefile.PL +++ b/GIF/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -83,6 +84,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{GIF} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -96,6 +99,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{GIF} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } diff --git a/JPEG/Makefile.PL b/JPEG/Makefile.PL index 60e3529c..00204551 100644 --- a/JPEG/Makefile.PL +++ b/JPEG/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -83,6 +84,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{JPEG} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -96,6 +99,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{JPEG} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } diff --git a/Makefile.PL b/Makefile.PL index 1914e7f5..c1c7ad55 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,6 +15,9 @@ use Devel::CheckLib; # see this our $BUILDING_IMAGER = 1; +# used to display a summary after we've probed the world +our %IMAGER_LIBS; + # # IM_INCPATH colon seperated list of paths to extra include paths # IM_LIBPATH colon seperated list of paths to extra library paths @@ -241,6 +244,23 @@ mkdir('testout',0777); # since we cannot include it in the archive. WriteMakefile(%opts); +my @good; +my @bad; +for my $name (sort { lc $a cmp lc $b } keys %IMAGER_LIBS) { + if ($IMAGER_LIBS{$name}) { + push @good, $name; + } + else { + push @bad, $name; + } +} + +print "\n"; +print "Libraries found:\n" if @good; +print " $_\n" for @good; +print "Libraries *not* found:\n" if @bad; +print " $_\n" for @bad; + exit; diff --git a/PNG/Makefile.PL b/PNG/Makefile.PL index 6a98246e..daedbe35 100644 --- a/PNG/Makefile.PL +++ b/PNG/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -103,6 +104,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{PNG} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -116,6 +119,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{PNG} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } diff --git a/T1/Makefile.PL b/T1/Makefile.PL index b9621321..e58be2e9 100644 --- a/T1/Makefile.PL +++ b/T1/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -84,6 +85,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{T1} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -97,6 +100,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{T1} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } diff --git a/TIFF/Makefile.PL b/TIFF/Makefile.PL index fe181d97..16674585 100644 --- a/TIFF/Makefile.PL +++ b/TIFF/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -83,6 +84,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{TIFF} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -96,6 +99,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{TIFF} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } diff --git a/W32/Makefile.PL b/W32/Makefile.PL index 4a5ccecf..8ed4245c 100644 --- a/W32/Makefile.PL +++ b/W32/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -83,6 +84,8 @@ my %probe = my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{Win32} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; @@ -96,6 +99,8 @@ if ($probe_res) { WriteMakefile(%opts); } else { + $IMAGER_LIBS{Win32} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } -- 2.39.5