Package: ikiwiki
Version: 3.20101129
Severity: wishlist
Tags: patch

It seems the highlight API has changed in version 3.2 in the following ways in 

   1) It now seems to be required to call initTheme with a real theme.
   2) initLanguage has been replaced with loadLanguage

Attached is a patch that works with highlight 3.2, but probably not with 2.x

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 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.66-1           collection of modules that parse H
ii  libhtml-scrubber-perl   0.08-4           Perl extension for scrubbing/sanit
ii  libhtml-template-perl   2.9-2            module for using HTML Templates wi
ii  libtext-markdown-perl   1.0.26-1         Markdown and MultiMarkdown markup 
ii  liburi-perl             1.54-2           module to manipulate and access UR
ii  perl                    5.10.1-16        Larry Wall's Practical Extraction 
ii  python                  2.6.6-3+squeeze1 interactive high-level object-orie
ii  python-support          1.0.10           automated rebuilding support for P

Versions of packages ikiwiki recommends:
ii  gcc [c-compiler]            4:4.4.5-1    The GNU C compiler
ii  gcc-4.3 [c-compiler]        4.3.5-4      The GNU C compiler
ii  gcc-4.4 [c-compiler]        4.4.5-8      The GNU C compiler
ii  git [git-core]              1:1.7.2.3-2  fast, scalable, distributed revisi
ii  libauthen-passphrase-perl   0.007-1      Perl module encapsulating hashed p
ii  libc6-dev [libc-dev]        2.11.2-7     Embedded GNU C Library: Developmen
ii  libcgi-formbuilder-perl     3.05.01-7    Easily generate and process statef
ii  libcgi-session-perl         4.41-1       persistent session data in CGI app
ii  liblwpx-paranoidagent-perl  1.07-1       a "paranoid" subclass of LWP::User
ii  libmail-sendmail-perl       0.79.16-1    Send email from a perl script
ii  libnet-openid-consumer-perl 1.03-1       library for consumers of OpenID id
ii  libterm-readline-gnu-perl   1.20-1       Perl extension for the GNU ReadLin
ii  libtimedate-perl            1.2000-1     collection of modules to manipulat
ii  libxml-simple-perl          2.18-3       Perl module for reading and writin
ii  subversion                  1.6.12dfsg-2 Advanced version control system

Versions of packages ikiwiki suggests:
ii  dvipng                        1.13-1     convert DVI files to PNG graphics
ii  file                          5.04-5     Determines file type using "magic"
ii  gettext                       0.18.1.1-3 GNU Internationalization utilities
pn  graphviz                      <none>     (no description available)
ii  libcrypt-ssleay-perl          0.57-2     Support for https protocol in LWP
ii  libfile-mimeinfo-perl         0.15-1     Perl module to determine file type
ii  libhighlight-perl             3.2-2      perl bindings for highlight source
ii  libhtml-tree-perl             3.23-2     Perl module to represent and creat
ii  liblocale-gettext-perl        1.05-6     Using libc functions for internati
ii  libmailtools-perl             2.06-1     Manipulate email in perl programs
pn  libnet-amazon-s3-perl         <none>     (no description available)
pn  librpc-xml-perl               <none>     (no description available)
pn  libsearch-xapian-perl         <none>     (no description available)
pn  libsort-naturally-perl        <none>     (no description available)
pn  libsparkline-php              <none>     (no description available)
pn  libtext-csv-perl              <none>     (no description available)
pn  libtext-textile-perl          <none>     (no description available)
pn  libtext-typography-perl       <none>     (no description available)
pn  libtext-wikicreole-perl       <none>     (no description available)
pn  libtext-wikiformat-perl       <none>     (no description available)
pn  libxml-feed-perl              <none>     (no description available)
pn  libyaml-perl                  <none>     (no description available)
pn  perlmagick                    <none>     (no description available)
pn  po4a                          <none>     (no description available)
pn  polygen                       <none>     (no description available)
pn  python-docutils               <none>     (no description available)
pn  texlive                       <none>     (no description available)
pn  tidy                          <none>     (no description available)
pn  viewvc | gitweb | viewcvs     <none>     (no description available)
pn  xapian-omega                  <none>     (no description available)

-- no debconf information
>From e95fccfa681955a5924bbab3f90d7323d1a9f6ca Mon Sep 17 00:00:00 2001
From: David Bremner <brem...@unb.ca>
Date: Thu, 2 Dec 2010 22:33:52 -0400
Subject: [PATCH] hacked to work with highlight 3.2

---
 perl/IkiWiki/Plugin/highlight.pm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/perl/IkiWiki/Plugin/highlight.pm b/perl/IkiWiki/Plugin/highlight.pm
index 9d05e9f..9de33e7 100644
--- a/perl/IkiWiki/Plugin/highlight.pm
+++ b/perl/IkiWiki/Plugin/highlight.pm
@@ -161,8 +161,10 @@ sub highlight ($$) {
                $gen = 
highlightc::CodeGenerator_getInstance($highlightc::XHTML);
                $gen->setFragmentCode(1); # generate html fragment
                $gen->setHTMLEnclosePreTag(1); # include stylish <pre>
-               $gen->initTheme("/dev/null"); # theme is not needed because CSS 
is not emitted
-               $gen->initLanguage($langfile); # must come after initTheme
+               $gen->initTheme("/usr/share/highlight/themes/seashell.theme");
+
+#              $gen->initTheme("/dev/null"); # theme is not needed because CSS 
is not emitted
+               $gen->loadLanguage($langfile); # must come after initTheme
                $gen->setEncoding("utf-8");
                $highlighters{$langfile}=$gen;
        }
-- 
1.7.2.3

Reply via email to