From f191286713b620120a0642b7d1757a0f762a4bd6 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 25 Jul 2006 13:18:27 +0000 Subject: Bug 345389: Template-Toolkit 2.15 moved Template::Plugin::GD into a separate package Patch By Max Kanat-Alexander r=LpSolit, a=myk --- Bugzilla/Install/Requirements.pm | 11 ++++++++++- checksetup.pl | 6 +++++- docs/xml/modules.xml | 10 ++++++++++ testserver.pl | 8 ++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index bf2398a3f..f38af2a09 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -97,6 +97,12 @@ use constant OPTIONAL_MODULES => [ name => 'GD', version => '1.20' }, + { + # This module tells us whether or not Template-GD is installed + # on Template-Toolkits after 2.14, and still works with 2.14 and lower. + name => 'Template::Plugin::GD::Image', + version => 0 + }, { name => 'Chart::Base', version => '1.0' @@ -162,10 +168,13 @@ use constant WIN32_MODULE_NAMES => { 'GD::Graph' => 'GDGraph', 'GD::Text::Align' => 'GDTextUtil', 'Mail::Mailer' => 'MailTools', + # We provide Template 2.14 or lower for Win32, so it still includes + # the GD plugin. + 'Template::Plugin::GD' => 'Template', }; # This was originally clipped from the libnet Makefile.PL, adapted here to -# use the above vers_cmp routine for accurate version checking. +# use the below vers_cmp routine for accurate version checking. sub have_vers { my ($pkg, $wanted, $silent) = @_; my ($msg, $vnum, $vstr); diff --git a/checksetup.pl b/checksetup.pl index 1de84e56d..bb6e46245 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -296,7 +296,9 @@ if (!$have_mod{'Image::Magick'} && !$silent) { } if ( (!$have_mod{'GD'} || !$have_mod{'GD::Graph'} - || !$have_mod{'GD::Text::Align'}) && !$silent) + || !$have_mod{'GD::Text::Align'} + || !$have_mod{'Template::Plugin::GD::Image'}) + && !$silent) { print "If you want to see graphical bug reports (bar, pie and line "; print "charts of \ncurrent data), you should install libgd and the "; @@ -306,6 +308,8 @@ if ( (!$have_mod{'GD'} || !$have_mod{'GD::Graph'} if !$have_mod{'GD::Graph'}; print "GD::Text::Align: " . install_command("GD::Text::Align") . "\n" if !$have_mod{'GD::Text::Align'}; + print "Template::Plugin::GD: " . install_command('Template::Plugin::GD') + . "\n" if !$have_mod{'Template::Plugin::GD::Image'}; print "\n"; } if (!$have_mod{'PatchReader'} && !$silent) { diff --git a/docs/xml/modules.xml b/docs/xml/modules.xml index 151358cbd..8e2df5999 100644 --- a/docs/xml/modules.xml +++ b/docs/xml/modules.xml @@ -148,6 +148,16 @@ + + Template::Plugin::GD: + + CPAN Download Page: + PPM Download Link: (Just install Template-Toolkit using the instructions below) + + Documentation: + + + MIME::Base64: diff --git a/testserver.pl b/testserver.pl index 766a2c410..bf818cd0f 100755 --- a/testserver.pl +++ b/testserver.pl @@ -203,6 +203,14 @@ if ($@ eq '') { print "TEST-FAILED Chart returned: $@\n"; } } + + eval 'use Template::Plugin::GD::Image'; + if ($@) { + print "TEST-FAILED Template::Plugin::GD is not installed.\n"; + } + else { + print "TEST-OK Template::Plugin::GD is installed.\n"; + } } sub fetch { -- cgit v1.2.3-24-g4f1b