]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 345389: Template-Toolkit 2.15 moved Template::Plugin::GD into a separate package
authormkanat%bugzilla.org <>
Tue, 25 Jul 2006 13:18:27 +0000 (13:18 +0000)
committermkanat%bugzilla.org <>
Tue, 25 Jul 2006 13:18:27 +0000 (13:18 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk

Bugzilla/Install/Requirements.pm
checksetup.pl
docs/xml/modules.xml
testserver.pl

index bf2398a3f6ee83493ebe04afaa2b7bf1f2fdbb17..f38af2a099b10be891e83b777ce6dfb1709843e4 100644 (file)
@@ -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);
index 1de84e56dd06aacd5bacb2c621ca492375b287f8..bb6e4624592c2a2a10929c9c37d4215c3d4d10a6 100755 (executable)
@@ -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) {
index 151358cbd473eb16ec0c2159587d44a6fd15ae79..8e2df5999cbba5ff1e559fd1032b94d51e4607a1 100644 (file)
       </literallayout>
     </para>
 
+    <para>
+      Template::Plugin::GD:
+      <literallayout>
+       CPAN Download Page: <ulink url="http://search.cpan.org/dist/Template-GD/" />
+       PPM Download Link:  (Just install Template-Toolkit using the instructions below)
+
+       Documentation: <ulink url="http://www.template-toolkit.org/docs/aqua/Modules/index.html" />
+      </literallayout>
+    </para>
+
     <para>
       MIME::Base64:
       <literallayout>
index 766a2c41000647edb735034caab450d31eaa83f6..bf818cd0f47fb38b4d98a3eca10dc24612398c53 100755 (executable)
@@ -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 {