* Make img plugin not fail immediately if Image::Magick is not available.

This lets ikiwiki not build depend on perlmagic.
master
joey 2007-02-20 03:59:35 +00:00
parent d065842775
commit 2725887734
5 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,6 @@ package IkiWiki::Plugin::img;
use warnings; use warnings;
use strict; use strict;
use IkiWiki; use IkiWiki;
use Image::Magick;
my %imgdefaults; my %imgdefaults;
@ -37,6 +36,9 @@ sub preprocess (@) { #{{{
my $dir = IkiWiki::dirname($file); my $dir = IkiWiki::dirname($file);
my $base = IkiWiki::basename($file); my $base = IkiWiki::basename($file);
eval q{use Image::Magick};
error($@) if $@;
my $im = Image::Magick->new; my $im = Image::Magick->new;
my $imglink; my $imglink;
my $r; my $r;

2
debian/changelog vendored
View File

@ -20,6 +20,8 @@ ikiwiki (1.44) UNRELEASED; urgency=low
those dreaded "Read more" links in blogs. those dreaded "Read more" links in blogs.
* Don't error out if estcmd fails, just print a warning message. estcmd is * Don't error out if estcmd fails, just print a warning message. estcmd is
to fragile to let it kill ikiwiki. to fragile to let it kill ikiwiki.
* Make img plugin not fail immediately if Image::Magick is not available.
This lets ikiwiki not build depend on perlmagic.
-- Joey Hess <joeyh@debian.org> Mon, 19 Feb 2007 22:12:25 -0500 -- Joey Hess <joeyh@debian.org> Mon, 19 Feb 2007 22:12:25 -0500

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: ikiwiki
Section: web Section: web
Priority: optional Priority: optional
Build-Depends: perl, debhelper (>= 5) Build-Depends: perl, debhelper (>= 5)
Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl, perlmagick Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl
Maintainer: Joey Hess <joeyh@debian.org> Maintainer: Joey Hess <joeyh@debian.org>
Standards-Version: 3.7.2 Standards-Version: 3.7.2
XS-Vcs-Svn: svn://svn.kitenet.net/ikiwiki/trunk XS-Vcs-Svn: svn://svn.kitenet.net/ikiwiki/trunk

View File

@ -27,8 +27,6 @@ added).
Some other alternate icons and buttons are also included in the svg file Some other alternate icons and buttons are also included in the svg file
and can be extracted by specifying their names. and can be extracted by specifying their names.
[[img ikiwiki.png alt="bob" size="200x200"]]
Contributed by Recai Oktaş Contributed by Recai Oktaş
* [[ikiwiki_logo|ikiwiki_old2.png]] * [[ikiwiki_logo|ikiwiki_old2.png]]

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-19 21:47-0500\n" "POT-Creation-Date: 2007-02-19 22:59-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"