Package: ikiwiki
Version: 3.20140613
Severity: wishlist
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
The second patch mentioned in
http://ikiwiki.info/bugs/Please_update_highlight_plugin_for_highlight_3.18/
is not really needed for fixing the crash, but it is needed to make
the support for search paths of language definitions accessible from
ikiwiki.
- -- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ikiwiki depends on:
ii libhtml-parser-perl 3.71-1+b1
ii libhtml-scrubber-perl 0.11-1
ii libhtml-template-perl 2.95-1
ii libjson-perl 2.61-1
ii libtext-markdown-discount-perl 0.11-1
ii liburi-perl 1.60-1
ii libyaml-libyaml-perl 0.41-5
ii perl 5.18.2-7
Versions of packages ikiwiki recommends:
ii bzr 2.6.0+bzr6595-1
ii darcs 2.8.4-3+b2
ii gcc [c-compiler] 4:4.9.0-4
ii gcc-4.6 [c-compiler] 4.6.4-7
ii gcc-4.9 [c-compiler] 4.9.0-7
ii git [git-core] 1:2.0.1-1
ii git-core 1:2.0.1-1
ii libauthen-passphrase-perl 0.008-1
ii libc6-dev [libc-dev] 2.19-7
ii libcgi-formbuilder-perl 3.08-2
ii libcgi-session-perl 4.48-1
ii libcrypt-ssleay-perl 0.58-1+b1
ii libgravatar-url-perl 1.06-1
ii liblwpx-paranoidagent-perl 1.10-3
ii libmail-sendmail-perl 0.79.16-1
ii libnet-openid-consumer-perl 1.15-1
ii librpc-xml-perl 0.78-1
ii libterm-readline-gnu-perl 1.24-2
ii libtimedate-perl 2.3000-2
ii libxml-simple-perl 2.20-1
ii mercurial 3.0.1-1
ii subversion 1.8.9-1
Versions of packages ikiwiki suggests:
ii dvipng 1.14-2
ii file 1:5.19-1
ii gettext 0.18.3.2-3
ii graphviz 2.26.3-17.1
ii libfile-mimeinfo-perl 0.26-1
ii libhighlight-perl 3.18-2
ii libhtml-tree-perl 5.03-1
ii liblocale-gettext-perl 1.05-8
ii libmailtools-perl 2.12-1
pn libnet-amazon-s3-perl <none>
pn libnet-inet6glue-perl <none>
pn libsearch-xapian-perl <none>
ii libsort-naturally-perl 1.03-1
pn libsparkline-php <none>
ii libtext-csv-perl 1.32-1
pn libtext-multimarkdown-perl <none>
pn libtext-textile-perl <none>
pn libtext-typography-perl <none>
pn libtext-wikicreole-perl <none>
pn libtext-wikiformat-perl <none>
pn libxml-feed-perl <none>
ii libxml-writer-perl 0.625-1
ii perlmagick 8:6.7.7.10+dfsg-4
pn po4a <none>
pn polygen <none>
ii python 2.7.6-2
ii python-docutils 0.11-3
ii texlive 2014.20140626-1
pn tidy <none>
pn viewvc | gitweb | viewcvs <none>
pn xapian-omega <none>
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQGcBAEBCAAGBQJT51rwAAoJEPIClx2kp54sJrEL/33x7dDJY+eMMqBaGgJOnlKV
DVLtrCUnZXX21DsHVKZ48iEVpCYvXQlQEzvxvuQPC4LSTKhcTHWDBmWRxbWaO/wV
kr6LIBk1hQUqvtWfwHUQYDQPef0PTBzGswVeZ8FnhrbiSGwcJzaQNTcxqTC/VxPO
QijBvGW/8KJy/cNihvSA/GNgAeEze217dhh+YNuI9wqP+ILcoPWHDx/czVzYGMEo
Tv0W0Qb+JrWiDYQ6IhqycS9C4A1un7jCVKZJ4oyMm8xb1ErJ6YUwoCrYuDNNMXuN
Z2bxrZnKxx9tmRpsZxsqErZD+LJCI+93bvTqumd1FZ+TfiYxfDm2xCVilhPkUne9
op5x8dUBOJ1tpKyPeh/YHHYjAA1x6kiqgSzfHZ8BAnSaz9OepdaoC4Q1F0UbxAde
Qeka1geoaWf4RupjHpVt/QZ/Bs1XV5g2juQb4M37IclvcLmPvR12p3xVMFra3dvp
NZhBlea31cdUFV0EKYPWF8pVa2phr6vuzH7aYsRDjw==
=RcLu
-----END PGP SIGNATURE-----
>From adbc9cb8d6a6001bd63da7e68ebc31b71e522225 Mon Sep 17 00:00:00 2001
From: David Bremner <[email protected]>
Date: Mon, 4 Aug 2014 12:26:52 -0300
Subject: [PATCH 2/2] Plugins::highlight: replace use of langdefdir with
searchFile
In recent versions of highlight there can be more than one langdefdir.
This patch fixes the ensuing hilarity when the user adds a single
highlight lang definition and highlight.pm expects all definitions to
be in the same place.
---
IkiWiki/Plugin/highlight.pm | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm
index 0aa7386..ce91974 100644
--- a/IkiWiki/Plugin/highlight.pm
+++ b/IkiWiki/Plugin/highlight.pm
@@ -72,10 +72,10 @@ sub checkconfig () {
$data_dir -> getConfDir() . "/filetypes.conf";
}
}
+ # note that this is only used for old versions of highlight
+ # where $data_dir will not be defined.
if (! exists $config{langdefdir}) {
- $config{langdefdir}=
- ($data_dir ? $data_dir->getLangPath("")
- : "/usr/share/highlight/langDefs");
+ $config{langdefdir}= "/usr/share/highlight/langDefs";
}
if (exists $config{tohighlight} && read_filetypes()) {
@@ -155,17 +155,27 @@ sub read_filetypes () {
}
+sub searchlangdef {
+ my $lang=shift;
+
+ if ($data_dir) {
+ return $data_dir->getLangPath($lang . ".lang");
+ } else {
+ return "$config{langdefdir}/$lang.lang";
+ }
+
+}
# Given a filename extension, determines the language definition to
# use to highlight it.
sub ext2langfile ($) {
my $ext=shift;
- my $langfile="$config{langdefdir}/$ext.lang";
+ my $langfile=searchlangdef($ext);
return $langfile if exists $highlighters{$langfile};
read_filetypes() unless $filetypes_read;
if (exists $ext2lang{$ext}) {
- return "$config{langdefdir}/$ext2lang{$ext}.lang";
+ return searchlangdef($ext2lang{$ext});
}
# If a language only has one common extension, it will not
# be listed in filetypes, so check the langfile.
--
2.0.1