--- dblatex-0.2.9.orig/debian/dblatex.doc-base
+++ dblatex-0.2.9/debian/dblatex.doc-base
@@ -0,0 +1,9 @@
+Document: dblatex
+Title:    dblatex Manual
+Author:   Benoit Guillon
+Section:  Text
+Abstract: This manual in-depth describes the functionality and usage of dblatex
+ to produce DVI, PostScript and PDF documents from DocBook sources.
+
+Format:   pdf
+Files:    /usr/share/doc/dblatex/manual.pdf.gz
--- dblatex-0.2.9.orig/debian/compat
+++ dblatex-0.2.9/debian/compat
@@ -0,0 +1 @@
+5
--- dblatex-0.2.9.orig/debian/rules
+++ dblatex-0.2.9/debian/rules
@@ -0,0 +1,108 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# debian/rules for package 'dblatex' that uses debhelper.
+# The underlying template was originally written by Joey Hess and Craig Small.
+# As a special exception, when the template is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Some targets (e.g. get-orig-source) are not required to be started from the
+# package's top level directory.
+# Nevertheless they need to know the package's version.
+# The version gets determined at runtime by dpkg-parsechangelog using the
+# package's changefile.
+# The changefile is located in this file's directory.
+# Thus this file's directory needs to be determined, which will only work
+# reliably when the make variable MAKEFILE_LIST contains exactly one value.
+ifneq ($(words $(MAKEFILE_LIST)),1)
+    $(error Unable to determine location of rules.)
+endif
+
+debiandir   := $(realpath $(dir $(strip $(MAKEFILE_LIST))))
+prefix      := $(debiandir)/dblatex
+BIN_DIR     := $(prefix)/usr/bin
+SHARE_DIR   := $(prefix)/usr/share/dblatex
+TEX_DIR     := $(prefix)/usr/share/texmf/tex/latex/dblatex
+XSL_DIR     := $(prefix)/usr/share/xml/docbook/stylesheet/dblatex
+
+PKG_VERS  := $(shell dpkg-parsechangelog -l$(debiandir)/changelog \
+               | grep ^Version: | cut -d' ' -f2 | cut -d- -f1)
+PKG_BZ2   := dblatex-$(PKG_VERS).tar.bz2
+PKG_GZ    := dblatex_$(PKG_VERS).orig.tar.gz
+
+# Include other makefiles only after debiandir determination
+# to avoid breaking the latter.
+include /usr/share/dpatch/dpatch.make
+
+build: build-stamp
+
+build-stamp: patch-stamp
+	dh_testdir
+        # As the upstream manual page is not necessarily compressed with
+        # maximum compression, let compression be done by dh_installman.
+	gunzip --to-stdout docs/manpage/dblatex.1.gz > dblatex.1
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm --force build-stamp
+	rm --force dblatex.1
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	mkdir --parents $(BIN_DIR)
+	install --preserve-timestamps --mode=755 dblatex $(BIN_DIR)
+
+	mkdir --parents $(TEX_DIR)
+	cp --archive latex/contrib latex/misc latex/style $(TEX_DIR)
+	rm $(TEX_DIR)/misc/passivetex/LICENSE
+
+	mkdir --parents $(XSL_DIR)
+	cp --archive xsl $(XSL_DIR)
+
+	mkdir --parents $(SHARE_DIR)/lib
+	cp --archive lib/dbtexmf $(SHARE_DIR)/lib
+	mkdir --parents $(SHARE_DIR)/latex
+	cp --archive latex/graphics latex/scripts latex/specs \
+                     $(SHARE_DIR)/latex
+	ln --symbolic ../../texmf/tex/latex/dblatex/contrib \
+                      $(SHARE_DIR)/latex/contrib
+	ln --symbolic ../xml/docbook/stylesheet/dblatex/xsl $(SHARE_DIR)/xsl
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs docs/manual.pdf debian/README.Debian-source
+	dh_installman dblatex.1
+	dh_pysupport
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+
+get-orig-source:
+	wget http://prdownloads.sourceforge.net/dblatex/$(PKG_BZ2)?download
+	bzip2 --decompress --stdout $(PKG_BZ2) \
+          | gzip --best --no-name > $(PKG_GZ)
+	rm --force $(PKG_BZ2)
+
+.PHONY: build clean patch unpatch install binary-indep binary-arch binary get-orig-source
--- dblatex-0.2.9.orig/debian/control
+++ dblatex-0.2.9/debian/control
@@ -0,0 +1,20 @@
+Source: dblatex
+Section: text
+Priority: optional
+Maintainer: Andreas Hoenen <andreas@hoenen-terstappen.de>
+Build-Depends: debhelper (>= 5), dpatch
+Build-Depends-Indep: python-support (>= 0.3)
+Standards-Version: 3.8.0
+Homepage: http://dblatex.sourceforge.net/
+
+Package: dblatex
+Architecture: all
+Depends: ${python:Depends}, docbook-xml, xsltproc | python-4suite-xml, python-apt, texlive, texlive-latex-extra, texlive-math-extra, texlive-extra-utils, texlive-lang-cyrillic
+Recommends: libxml2-utils
+Suggests: docbook, ghostscript, graphicsmagick-imagemagick-compat | imagemagick, latex-cjk-all, lmodern, opensp, pdf-viewer, transfig
+Description: Produces DVI, PostScript, PDF documents from DocBook sources
+ DocBook to LaTeX Publishing that transforms your SGML/XML DocBook documents to
+ DVI, PostScript or PDF by translating them in pure LaTeX as a first process.
+ MathML 2.0 markups are supported, too.  It originally started as a clone of
+ DB2LaTeX, but has been enhanced extensively since then and is actively
+ maintained by the upstream author.
--- dblatex-0.2.9.orig/debian/postrm
+++ dblatex-0.2.9/debian/postrm
@@ -0,0 +1,65 @@
+#!/bin/sh
+# postrm script for dblatex
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+        # A call to 'mktexlsr' is needed to unregister the dblatex TeX files
+        # in the TeX database '/var/lib/texmf/ls-R-TEXMFMAIN'.
+        #
+        # This call won't do any harm even if it might be superfluous in
+        # special postrm cases, but it may take some time.
+        # Thus a performance optimization can be applied to the main case
+        # of successful package upgrade:
+        # As the new version's postinst script will register the new version's
+        # dblatex TeX files in the TeX database, the old version's files that
+        # have vanished in the new version will be unregistered implicitly then.
+        # Thus in the case of successful upgrade to another dblatex version
+        # supporting the TeX (de)registration the deregistration call can be
+        # left out as a superfluous duplicate.
+
+        if test "$1" = upgrade -a -n "$2" && \
+           dpkg --compare-versions "$2" ge 0.1.9-3
+        then
+            true # Unregistration will be executed implicitly by
+                 # 'new-postinst configure'.
+        else
+            mktexlsr /usr/share/texmf # Unregister dblatex TeX files in TeX.
+        fi
+        ;;
+    purge)
+        # TeX unregistration has already been executed before.
+        # (Besides that mktexlsr is not guaranteed to be available at purge
+        #  as it belongs to a non-essential package.)
+
+        # Remove dblatex configuration directory.
+        rm --recursive --force /etc/dblatex
+        ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- dblatex-0.2.9.orig/debian/copyright
+++ dblatex-0.2.9/debian/copyright
@@ -0,0 +1,136 @@
+DocBook to LaTeX Publishing
+Copyright (C) 2003-2008 Benoit Guillon <marsgui@users.sourceforge.net>
+
+This package was debianized by Andreas Hoenen <andreas@hoenen-terstappen.de> on
+Sun, 12 Feb 2006 14:56:46 +0100
+
+It was downloaded from: http://dblatex.sourceforge.net/
+
+The Debian packaging is (C) 2006-2008, Andreas Hoenen
+<andreas@hoenen-terstappen.de> and is licensed under the GPL, see below.
+
+LICENSE:
+
+  This package is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This package is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this package; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
+IMPORTANT:
+
+  The stylesheets provided ARE NOT the official DocBook XSL
+  stylesheets. These stylesheets ARE NOT maintained by Norman Walsh.
+  Please, DO NOT e-mail Norman about any question regarding these
+  stylesheets
+
+
+FROM THE OFFICIAL XSL Docbook Stylesheets
+--------------------------------------------------------------------------------
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation
+  files (the ``Software''), to deal in the Software without
+  restriction, including without limitation the rights to use,
+  copy, modify, merge, publish, distribute, sublicense, and/or
+  sell copies of the Software, and to permit persons to whom the
+  Software is furnished to do so, subject to the following
+  conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  Except as contained in this notice, the names of individuals
+  credited with contribution to this software shall not be used in
+  advertising or otherwise to promote the sale, use or other
+  dealings in this Software without prior written authorization
+  from the individuals in question.
+
+  Any stylesheet derived from this Software that is publicly
+  distributed will be identified with a different name and the
+  version strings in any derived Software will be changed so that
+  no possibility of confusion between the derived package and this
+  Software will exist.
+
+ORIGINAL DOCBOOK XSL STYLESHEETS
+  * Norman Walsh XSL Stylesheets http://www.nwalsh.com
+
+DOCBOOK DTD
+  * Arbortex, Oasis, etc
+  * See Docbook copyright
+
+MATHML 2.0 SUPPORT
+--------------------------------------------------------------------------------
+  xsltml (http://xsltml.sourceforge.net) by Vasil Yaroshevich is integrated as
+  MathML 2.0 support. See the xsltml README file for copyright. The stylesheets
+  used here are derived from the original package and are not maintained by the
+  xsltml author or maintainer.
+
+NEW TABLE SUPPORT
+--------------------------------------------------------------------------------
+  The newtbl code (http://www.vistair.com/newtbl) by David Hedley is
+  included to drive the DocBook tables. This very good implementation is now the
+  default and unique implementation used, so the newtbl.use parameter is
+  useless.
+
+LATEX PACKAGES
+--------------------------------------------------------------------------------
+  The following latex packages are provided for convenience because they are
+  missing in some Debian or Fedora Core default LaTeX distributions. Dblatex
+  does not ensure that the package versions given here are compatible with your
+  latex distribution.
+
+  * bibtopic.sty
+  * enumitem.sty
+  * ragged2e.sty
+  * attachfile.sty
+
+PASSIVETEX PACKAGES
+--------------------------------------------------------------------------------
+  Some of the Passivetex packages are provided to extend the support of Unicode
+  characters.
+%
+% Copyright 2002 Sebastian Rahtz/Oxford University
+%      <sebastian.rahtz@oucs.ox.ac.uk>
+%
+% Permission is hereby granted, free of charge, to any person obtaining
+% a copy of this software and any associated documentation files (the
+% ``Software''), to deal in the Software without restriction, including
+% without limitation the rights to use, copy, modify, merge, publish,
+% distribute, sublicense, and/or sell copies of the Software, and to
+% permit persons to whom the Software is furnished to do so, subject to
+% the following conditions:
+%
+% The above copyright notice and this permission notice shall be included
+% in all copies or substantial portions of the Software.
+
+(G)RUBBER SUPPORT
+--------------------------------------------------------------------------------
+  A customized version of Rubber by Emmanuel Beffara
+  (http://www.pps.jussieu.fr/~beffara/soft/rubber) is integrated to compile the
+  LaTeX documents. The code used by dblatex IS NOT the offical rubber package
+  and is not maintained by the rubber author or maintainer. The dblatex rubber
+  customization is called grubber.
+
+MISCELLANEOUS
+--------------------------------------------------------------------------------
+  The string-replace template by David Carlisle
+  (http://www.dcarlisle.demon.co.uk/david) is extracted from pmathml.xsl
+  (http://www.w3.org/Math/XSL/pmathml.xsl), one of the W3C MathML XSL
+  stylesheets (http://www.w3.org/Math/XSL/Overview.html).
+
+  The code is made available under the following conditions:
+  "Copyright (C) David Carlisle 2001, 2002.
+  Use and distribution of this code are permitted under the terms of the
+  W3C Software Notice and License
+  (http://www.w3.org/Consortium/Legal/copyright-software-19980720)".
--- dblatex-0.2.9.orig/debian/postinst
+++ dblatex-0.2.9/debian/postinst
@@ -0,0 +1,125 @@
+#!/bin/bash
+# postinst script for dblatex
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# Tries to remove files below /etc/dblatex/ that aren't any longer considered as
+# conffiles, but have been moved below /usr/.
+# Removing will only take place if all former conffiles are known to be
+# unmodified.
+# Input parameter: previousVersion: dblatex version that has been installed
+#                                   before this upgrade
+function cleanupFormerConfFiles
+{
+    previousVersion=$1
+
+    md5File=`tempfile` # Will be filled with conffiles' original fingerprints.
+
+    # Common part of conffiles' fingerprints
+    echo '
+d86f4f5e61545a50e995a1afa4d59d5a  /etc/dblatex/contrib/db2latex/graphics/caution.eps
+483d50b1ed1b738875c3105afedc429e  /etc/dblatex/contrib/db2latex/graphics/caution.pdf
+d86f4f5e61545a50e995a1afa4d59d5a  /etc/dblatex/contrib/db2latex/graphics/important.eps
+483d50b1ed1b738875c3105afedc429e  /etc/dblatex/contrib/db2latex/graphics/important.pdf
+4be6d6bfb336822cba7a67d33198386b  /etc/dblatex/contrib/db2latex/graphics/note.eps
+6258d6fff717d454c9cc86eab60104de  /etc/dblatex/contrib/db2latex/graphics/note.pdf
+1530e09fee9164ab7d74275ddee28e4e  /etc/dblatex/contrib/db2latex/graphics/tip.eps
+3ff749c6a8fd73e60be763d0ac964afe  /etc/dblatex/contrib/db2latex/graphics/tip.pdf
+d86f4f5e61545a50e995a1afa4d59d5a  /etc/dblatex/contrib/db2latex/graphics/warning.eps
+483d50b1ed1b738875c3105afedc429e  /etc/dblatex/contrib/db2latex/graphics/warning.pdf
+75e329ead310665a1120d732915aad67  /etc/dblatex/contrib/db2latex/param.xsl
+eb6496905b5fd2ff06c70c5118225cd6  /etc/dblatex/contrib/example/dbsimple.sty
+671d7f3ffd82eec65f66dc19ba1b8c96  /etc/dblatex/specs/native.specs
+8ad7f76bd4dc662ab947e5f23ea0c246  /etc/dblatex/specs/simple.specs' > $md5File
+
+    # version specific part of conffiles' fingerprints
+    case "$previousVersion" in
+        0.1.8-1|0.1.8-2)
+            echo '
+840182887de6a6d0808e7bbf0a12ad43  /etc/dblatex/contrib/db2latex/db2latex.sty
+d01125a164a0b98870de31cd13ec881b  /etc/dblatex/specs/db2latex.specs' >> $md5File
+            ;;
+        0.1.9-1|0.1.9-2|0.1.9-3|0.1.10-1)
+            echo '
+b3bee6e88493ffa7fe99a1a8a7f89a24  /etc/dblatex/contrib/db2latex/db2latex.sty
+d01125a164a0b98870de31cd13ec881b  /etc/dblatex/specs/db2latex.specs' >> $md5File
+            ;;
+        0.2~pre-1)
+            echo '
+0f44c2fdde9fdab3fd1063539a4d35d4  /etc/dblatex/contrib/db2latex/db2latex.sty
+aeeda6353bd2493d9ebe3aa9f1a811ed  /etc/dblatex/specs/db2latex.specs' >> $md5File
+            ;;
+        *) # Version which doesn't have to be cleaned up
+            rm --force $md5File
+            return
+            ;;
+    esac
+
+    if ! md5sum --check --status $md5File 2>/dev/null
+    then
+        # At least one conffile has been changed,
+        # thus they must not be deleted automatically.
+        echo "Please consider removing the former conffiles below /etc/dblatex/ manually."
+        echo "For further information consult README.Debian."
+        rm --force $md5File
+        return
+    fi
+
+    while read dummy confFile # Remove all conffiles.
+    do
+        rm --force $confFile
+    done <$md5File
+
+    # Clean up all empty directories in directory tree /usr/dblatex/.
+    cd /etc
+    rmdir --parents --ignore-fail-on-non-empty dblatex/contrib/db2latex/graphics
+    rmdir --parents --ignore-fail-on-non-empty dblatex/contrib/example
+    rmdir --parents --ignore-fail-on-non-empty dblatex/specs
+
+    echo "Removed former conffiles below /etc/dblatex/ as they were unchanged."
+
+    rm --force $md5File
+    return
+}
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+    configure|abort-upgrade|abort-remove|abort-deconfigure)
+
+        # A call to 'mktexlsr' is needed to register the dblatex TeX files
+        # in the TeX database '/var/lib/texmf/ls-R-TEXMFMAIN'.
+        #
+        # This call won't do any harm even if it might be superfluous in
+        # special cases.
+        mktexlsr /usr/share/texmf
+
+        # Take care of former conffiles.
+        if [ "$1" = configure ]
+        then
+            cleanupFormerConfFiles $2
+        fi
+        ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- dblatex-0.2.9.orig/debian/changelog
+++ dblatex-0.2.9/debian/changelog
@@ -0,0 +1,343 @@
+dblatex (0.2.9-3~bpo40+1) etch-backports; urgency=low
+
+  * Backport to build the Lenny Release Notes:
+    - use texlive packages from etch
+    - don't use xetex backend
+
+ -- Luk Claes <luk@debian.org>  Fri, 21 Nov 2008 08:56:29 +0000
+
+dblatex (0.2.9-3) unstable; urgency=low
+
+  * Improve CJK (Chinese/Japanese/Korean) support:
+    + Let XSL configuration parameter cjk.font default to gkai (instead of the
+      cyberbit font not included in Debian).
+    + Add Suggests dependency on latex-cjk-all for the gkai fonts.
+    + Fix the db2latex style not to collide with the CJKutf8.sty file.
+    Thanks to W. Martin Borgert for reporting and hints.
+    Closes: #482857, #492350
+  * Fix a name clash with TeXLive for spanish documents in native style.
+    Thanks to W. Martin Borgert for reporting.  Closes: #492304
+  * Support underscore characters in xreflabel attributes.  Thanks to
+    Sébastien Villemot for reporting.  Closes: #492959
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>  Mon, 11 Aug 2008 20:28:56 +0200
+
+dblatex (0.2.9-2) unstable; urgency=low
+
+  * Support ukrainian documents using the XeTeX backend.  Thanks to W. Martin
+    Borgert for reporting.  Closes: #482856
+  * Fix a regression in patch 10_no_TEXINPUTS_manipulation (and rename it to
+    10_TEXINPUTS_env_precedence): Reenable support for --texinputs parameter
+    that has been broken by the patch.  Thanks to Sebastien Couppey for
+    reporting.
+  * Adapt Debian specific patch 10_analyze_failure to upstream author's
+    feedback.  Thanks, Benoît Guillon.
+  * Standards-Version: 3.8.0 (no changes needed)
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>  Sun, 29 Jun 2008 14:00:25 +0200
+
+dblatex (0.2.9-1) unstable; urgency=low
+
+  * New upstream release
+  * Remove patches that have been integrated upstream:
+    + 25_abstract_title (#461919)
+    + 25_avoid_literal_linebreaks (#477660)
+    + 25_db2latex_wrapped_author_names (#465221)
+    + 25_dedication_without_title (SourceForge dblatex bug tracker 1838293)
+    + 25_emphasis_within_screen
+    + 25_reference_localization (#466162)
+    + 25_simplesect_in_appendix (#459474)
+  * Rework patch numbering scheme: Do not suggest a superfluous patch order by
+    using different patch prefix numbers, instead restrict to 10_ for permanent
+    and to 20_ for temporary patches.
+  * Add dependencies due to the new XeTeX backend:
+    + texlive-xetex (Depends)
+    + lmodern (Suggests)
+  * Generalize 20_postvalidation_on_failure.dpatch to 10_analyze_failure.dpatch:
+    On failure check several possible causes and warn appropriately:
+    + Invalid DocBook
+    + Not installed dependencies
+  * For post failure analysis add Depends dependency on python-apt.
+  * Post failure analysis allows to relax from Depends to Suggests several
+    dependencies that are not needed for dblatex's core functionality and that
+    many users do not make use of:
+    + docbook (SGML processing)
+    + opensp (SGML processing)
+    + graphicsmagick-imagemagick-compat (Image conversion)
+    + imagemagick (Image conversion)
+    + ghostscript (Image conversion)
+    + transfig (Image conversion)
+    + lmodern (XeTeX backend)
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>  Wed, 04 Jun 2008 20:31:04 +0200
+
+dblatex (0.2.8-8) unstable; urgency=low
+
+  * Don't ignore a possible setting of TEXINPUTS by the calling user.  Thanks to
+    Ivan Shmakov for reporting.  Closes: #470209
+  * Reduce risk of line breaks in literal elements.  Thanks to Roland Stigge
+    for reporting.  Closes: #477660
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>  Sun, 18 May 2008 15:46:31 +0200
+
+dblatex (0.2.8-7) unstable; urgency=low
+
+  * In db2latex style for multiple authors avoid exceeding the right border
+    of the title page.  Thanks to W. Martin Borgert for reporting.
+    Closes: #465221
+  * Localize REFERENCE label in native style and omit printing it when empty.
+    Thanks to Roland Stigge for reporting.  Closes: #466162
+  * Adapt the section entry in dblatex.doc-base: Applications/Text -> Text
+  * Actualize the copyright dates in debian/copyright.
+  * Actualize my mail address in all debian files except changelog.
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>  Mon, 14 Apr 2008 20:00:57 +0200
+
+dblatex (0.2.8-6) unstable; urgency=low
+
+  * Do not repeat abstract title in first abstract paragraph.  Thanks to Roland
+    Stigge for the patch.  Closes: #461919
+  * Fix 20_postvalidation_on_failure.dpatch:
+    dblatex process hung on big stderr amounts of xmllint post failure
+    validation.  (Compare debian-edu-doc #458879.)
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sun, 10 Feb 2008 11:25:00 +0100
+
+dblatex (0.2.8-5) unstable; urgency=low
+
+  Adapt to further feedback from Michal Čihař (thanks):
+  * Drop intermediate target clean1 from debian/rules: superfluous.
+  * Simplify debian/watch.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Wed, 23 Jan 2008 20:23:24 +0100
+
+dblatex (0.2.8-4) unstable; urgency=low
+
+  Adapt to feedback from Michal Čihař (thanks):
+  * debian/control:
+    + Move python-support build dependency from Build-Depends to
+      Build-Depends-Indep.
+    + Actualize gs-gpl | gs-pdfencrypt dependency to ghostscript.
+  * debian/rules:
+    + Use the dpatch rules from dpatch.make.
+    + Remove lintian override conditional code as not needed for current
+      release.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Tue, 22 Jan 2008 19:37:02 +0100
+
+dblatex (0.2.8-3) unstable; urgency=low
+
+  * Add dependencies needed for SGML handling: docbook, opensp.
+    Thanks to Dmitry Potapov for reporting.  Closes: #459470
+  * Support simplesect element in appendix.  Thanks to Dmitry Potapov for
+    reporting.  Closes: #459474
+  * Better support for AsciiDoc highlighting by handling <emphasis> elements
+    within <screen>.  Look mail thread:
+    http://lists.metaperl.com/pipermail/asciidoc-discuss/2008-January/000119.html
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Thu, 17 Jan 2008 20:07:48 +0100
+
+dblatex (0.2.8-2) unstable; urgency=low
+
+  Adapt to feedback from Leo "costela" Antunes (thanks):
+  * debian/rules:
+    + Don't install superfluous test/ and scripts/ directory subtrees.
+  * debian/control:
+    + Remove redundant link to SourceForge site.
+  * Remove lintian override for warnings about control lines too long:
+    + Only the most recent release will be checked (this one), and it is okay.
+    + The warning is a lintian bug in case of URLs.
+      (http://lists.debian.org/debian-mentors/2007/12/msg00264.html)
+
+  Further issues:
+  * debian/copyright:
+    + Fix spelling: publically -> publicly
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sun, 16 Dec 2007 10:05:55 +0100
+
+dblatex (0.2.8-1) unstable; urgency=low
+
+  * New upstream release, which fixes several bugs:
+    + Multiple copyright holders as well as multiple authors get separated
+      properly.  Closes: #446871
+    + The colophon gets placed at the very end of the document.
+      Closes: #447607
+    + A sidebar title is distinguishable from the sidebar content.
+      Closes: #447616
+  * Improve suboptimal error messaging on validation failures due to invalid
+    DocBook documents:  Closes: #451267
+    + On transformation failures validation of the DocBook input is tried (if
+      the validation program is installed), in order to check for a common
+      error cause and thus help the user understanding the problem.
+    + As xmllint is used for validation, add Recommends dependency on package
+      libxml2-utils.
+  * Add dependency on graphicsmagick-imagemagick-compat | imagemagick for
+    on the fly figure conversion.
+  * Apply a patch for SourceForge dblatex bug tracker 1838293
+    (http://sourceforge.net/tracker/index.php?func=detail&aid=1838293&group_id=72607&atid=535062):
+    Support dedication elements without a title, but with an id attribute.
+  * Override lintian warning about line in previous section being too long.
+  * Adapt control to the new, official homepage field.
+  * Upgrade Standards-Version: 3.7.3 (changes are marked below)
+  * dblatex.doc-base:
+    + Top level section: Apps->Applications (Standards-Version 3.7.3)
+    + Improve indentation of second Abstract line.
+    + Swap Abstract and Section fields to avoid a false lintian positive
+      (compare bug report #454941).
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sat, 08 Dec 2007 14:58:07 +0100
+
+dblatex (0.2.7-1) unstable; urgency=low
+
+  * New upstream release
+  * Remove patches as integrated into upstream:
+    + 20_italian_localization.bug432671.dpatch
+    + 20_texlive_total_pages.dpatch
+  * Adapt link to GPL-2 in copyright.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sat, 15 Sep 2007 12:35:05 +0200
+
+dblatex (0.2.6-1) unstable; urgency=low
+
+  * New upstream release
+  * Upstream release fixes incorrectly referenced footnotes.  Closes: #435528
+    Thanks to Roland Stigge for reporting.
+  * Provide italian localization.  Closes: #432671
+    Thanks to Giuseppe Sacco and the Italian translation project.
+  * Remove patch 20_unicode_support.bug425677 as it has been integrated into
+    upstream.
+  * debian/rules:
+    + Move the binary-arch actions to binary-indep, as dblatex is an
+      architecture independent package.
+    + Replace hardcoded package version by runtime determination.
+    + Remove trailing whitespace.
+  * Add a forgotten space after a version relationship in debian/control.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Wed, 22 Aug 2007 19:35:06 +0200
+
+dblatex (0.2.5-1) unstable; urgency=low
+
+  * New upstream release, Closes: #428801
+  * Adapt dependencies to TeX migration from teTeX to TeX Live:
+    + Drop tetex-extra alternative from dependencies.
+    + Revaluate TeX Live dependencies.
+  * 20_texlive_total_pages.dpatch: Problem with the texlive.2007 packages that
+    leads to a wrong total pages count in page numbering.  Thanks to Vincent
+    Bernat for reporting.
+  * 20_unicode_support.bug425677.dpatch: Support unicode characters EURO SIGN,
+    CHECK MARK, BALLOT X.  Thanks to Josselin Mouette and Phil Nitschke for
+    reporting.  Closes: #425677
+  * Adapt watchfile again, as somehow uscan's standard SourceForge handling does
+    not work any longer for dblatex.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sun,  3 Jun 2007 12:20:24 +0200
+
+dblatex (0.2.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Add README.Debian-source.
+  * Add rules target get-orig-source.
+  * Change installation of dblatex manual to use dh_installdocs.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Tue, 10 Apr 2007 13:07:12 +0200
+
+dblatex (0.2.3-1) experimental; urgency=low
+
+  * New upstream release
+  * Upstream release fixes problematic output for
+    article/articleinfo/authorgroup/corpauthor/remark/email.  Closes: #374210
+  * Upstream release fixes disturbing spaces in URLs in french documents.
+    Closes: #398516
+  * Upstream release enables text containing underscores in anchored titles.
+    Closes: #400045
+  * Patch upstream regression which breaks creation of ps documents.
+  * Adapt to changed dvips behaviour which by default disables use of absolute
+    paths.
+  * Migrate package to use dpatch.
+  * Add python-4suite-xml as alternative dependency to xlstproc.
+  * Adapt texlive dependencies.
+  * Remove configuration directory /etc/dblatex/ on package purge.
+  * Adapt 'debian/watch'.
+  * Actualize copyright file.
+  * Integrate installation makefile into 'debian/rules' as it has been
+    separated until now only due to historical reasons.
+  * Remove superfluous 'debian/rules' target 'config.status'.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sat,  3 Feb 2007 11:33:20 +0100
+
+dblatex (0.2-2) unstable; urgency=high
+
+  * Do not depend on script mktexlsr belonging to a non-essential package
+    in postrm purge. (Urgency set to high due to serious severity.)
+    Closes: #398776
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sat, 18 Nov 2006 09:52:18 +0100
+
+dblatex (0.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix a bug that breaks processing with xsltproc 1.1.18.  Closes: #396880
+  * Do not install non configuration files below /etc/dblatex/.  Closes: #395207
+  * Fix dvi production with db2latex style.  Closes: #395205
+  * Adapt dependencies to major upstream changes: the previous mixture of
+    makefiles, shell and perl scripts has been replaced by a uniform python based
+    solution.
+  * Reorganize dblatex's directory layout as the package supplied
+    (non) configuration files and the python files need new locations.
+  * Remove manual page build dependencies as the manual page has been integrated
+    into the upstream package.
+  * Fix a regression bug that breaks build of dblatex manual in simple style.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sat,  4 Nov 2006 10:20:42 +0100
+
+dblatex (0.1.10-1) unstable; urgency=low
+
+  * New upstream release
+  * Adapt the manual page to the current DocBook XSL stylesheet revision
+    (1.70.1).
+  * Upgrade to debhelper compatibility level 5.
+  * Replace suggests package xpdf by pdf-viewer.
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Mon, 28 Aug 2006 21:27:19 +0200
+
+dblatex (0.1.9-3) unstable; urgency=low
+
+  * Install TeX input files in TEXMFMAIN.  Closes: #376388
+  * Fix itemizedlist for french documents.  Closes: #374215
+  * Improve the way font setup uses to access Postscript fonts.  Closes: #376418
+  * Allow TeX to be provided by texlive as an alternative to tetex.
+    Closes: #376386
+  * Fix the copyright output for multiple copyright holders in db2latex style.
+    Closes: #374212
+  * Add copyright output in native style.
+  * Dump out the debian version of dblatex instead of the upstream version when
+    invoking dblatex.  (Thanks to Benoit Guillon for this suggestion.)
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sun,  9 Jul 2006 11:49:52 +0200
+
+dblatex (0.1.9-2) unstable; urgency=low
+
+  * Enable file names containing white space to be handled.  Closes: #366721
+  * Standards-Version: 3.7.2 (no changes needed)
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Mon, 15 May 2006 19:59:06 +0200
+
+dblatex (0.1.9-1) unstable; urgency=low
+
+  * New upstream release
+  * Add 'docbook-xml' to build dependencies.
+  * Standards-Version: 3.7.1 (no changes needed)
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Thu,  4 May 2006 21:22:26 +0200
+
+dblatex (0.1.8-2) unstable; urgency=low
+
+  * Enable &mdash; entities in tables.  Closes: #359911
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Thu, 30 Mar 2006 20:55:54 +0200
+
+dblatex (0.1.8-1) unstable; urgency=low
+
+  * Initial release Closes: #350397
+
+ -- Andreas Hoenen <andreas.hoenen@arcor.de>  Sun, 12 Feb 2006 14:56:46 +0100
--- dblatex-0.2.9.orig/debian/watch
+++ dblatex-0.2.9/debian/watch
@@ -0,0 +1,3 @@
+# Watch control file for uscan
+version=3
+http://sf.net/dblatex/dblatex-(.*)\.tar\.bz2
--- dblatex-0.2.9.orig/debian/README.Debian-source
+++ dblatex-0.2.9/debian/README.Debian-source
@@ -0,0 +1,5 @@
+The pristine upstream source needs to be repackaged because it uses bzip2
+instead of gzip for tarball compression.  To obtain the repackaged source, you
+can use target get-orig-source of debian/rules.
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>, Sat,  3 Mar 2007 15:49:14 +0100
--- dblatex-0.2.9.orig/debian/README.Debian
+++ dblatex-0.2.9/debian/README.Debian
@@ -0,0 +1,35 @@
+dblatex for Debian
+------------------
+
+The common place to discuss questions about dblatex is the mailing list
+'dblatex-users', to be found at 'http://sourceforge.net/projects/dblatex/'.
+
+However, if you have questions/problems concerning the package's Debian
+packaging, perhaps a better way is to contact the Debian maintainer.
+
+
+Master configuration files - also called specification files - chosen at the
+command line are searched for at the following locations, the first found file
+wins:
+
+(1) ./                              (Document specific style)
+(2) ~/.dblatex/                     (User specific styles)
+(3) /etc/dblatex/                   (Site specific styles)
+(4) /usr/share/dblatex/latex/specs/ (Standard styles supplied by upstream)
+(5) $DBLATEX_CONFIG_FILES           (Optional environment variable)
+
+
+PLEASE NOTE:
+
+As before version 0.2-1 the package supplied specification and style files
+resided below /etc/dblatex/ (violation of Debian Policy), there may have
+remained relics: These files have only been removed automatically from
+/etc/dblatex/ at package upgrade if all of them were unmodified.
+
+If you have modified any of these files, you must decide whether to
+delete/rename them manually in order to activate the original
+specification/style files as provided by upstream, or to leave them modified, in
+which case they will override the upstream files (precedence of location (3)
+above (4)).
+
+ -- Andreas Hoenen <andreas@hoenen-terstappen.de>, Sat,  4 Nov 2006 10:20:42 +0100
--- dblatex-0.2.9.orig/debian/patches/20_spanish_support.dpatch
+++ dblatex-0.2.9/debian/patches/20_spanish_support.dpatch
@@ -0,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_spanish_support.dpatch by Benoit Guillon <benoit.guillon@tele2.fr>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for bug report #492304:
+## DP: Fix a name clash with TeXLive for spanish documents in native style.
+## DP: The patch is likely to be included in the next upstream release.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/latex/style/docbook.sty dblatex-0.2.9/latex/style/docbook.sty
+--- dblatex-0.2.9~/latex/style/docbook.sty	2007-09-03 20:47:53.000000000 +0200
++++ dblatex-0.2.9/latex/style/docbook.sty	2008-08-03 08:36:31.000000000 +0200
+@@ -8,12 +8,6 @@
+ \DeclareOption{hyperlink}{ \def\DBKhyperlink{yes} }
+ \DeclareOption{nohyperlink}{ \def\DBKhyperlink{no} }
+ 
+-\ifx\undefined\chapter
+-  \def\DBKisarticle{1}
+-\else
+-  \def\DBKisarticle{0}
+-\fi
+-
+ % Default values
+ \ExecuteOptions{nohyperlink}
+ 
+@@ -140,7 +134,7 @@
+ %% Inclusion of float package after hyperref to have its definitions!
+ \usepackage{float}
+ 
+-\if1\DBKisarticle
++\@ifundefined{chapter}{
+ 
+ \floatstyle{ruled}
+ \newfloat{example}{htb}{loe}[section]
+@@ -153,8 +147,7 @@
+ % Redefinition of tableofcontent, to have it in separate pages
+ \let\stdtoc=\tableofcontents
+ \def\tableofcontents{ \newpage \stdtoc{} \newpage} 
+-
+-\else
++}{
+ 
+ \floatstyle{ruled}
+ \newfloat{example}{htb}{loe}[chapter]
+@@ -163,8 +156,8 @@
+ \floatstyle{plain}
+ \newfloat{dbequation}{htb}{loe}[chapter]
+ \floatname{dbequation}{{\scshape Equation }}
++}
+ 
+-\fi
+ % Sidebar is a boxed minipage that can contain verbatim
+ \newenvironment{sidebar}[1][0.95\textwidth]{
+   \hspace{0mm}\newline%
--- dblatex-0.2.9.orig/debian/patches/00list
+++ dblatex-0.2.9/debian/patches/00list
@@ -0,0 +1,8 @@
+10_TEXINPUTS_env_precedence
+10_analyze_failure
+10_dblatex_version
+10_dblatex_wrapper_script
+20_cjk_issues
+20_spanish_support
+20_ukranian_support
+20_underscore_in_xreflabel
--- dblatex-0.2.9.orig/debian/patches/20_underscore_in_xreflabel.dpatch
+++ dblatex-0.2.9/debian/patches/20_underscore_in_xreflabel.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_underscore_in_xreflabel.dpatch by Benoit Guillon <benoit.guillon@tele2.fr>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for bug report #492959:
+## DP: Support underscore characters in xreflabel attributes.
+## DP: The patch is likely to be included in the next upstream release.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/xsl/xref.xsl dblatex-0.2.9/xsl/xref.xsl
+--- dblatex-0.2.9~/xsl/xref.xsl	2008-04-19 01:11:31.000000000 +0200
++++ dblatex-0.2.9/xsl/xref.xsl	2008-08-05 20:12:45.000000000 +0200
+@@ -35,7 +35,9 @@
+   </xsl:when>
+   <!-- If an xreflabel has been specified for the target -->
+   <xsl:when test="$target/@xreflabel">
+-    <xsl:value-of select="$target/@xreflabel"/>
++    <xsl:call-template name="scape">
++      <xsl:with-param name="string" select="$target/@xreflabel"/>
++    </xsl:call-template>
+   </xsl:when>
+   <!-- nothing specified -->
+   <xsl:otherwise/>
--- dblatex-0.2.9.orig/debian/patches/10_TEXINPUTS_env_precedence.dpatch
+++ dblatex-0.2.9/debian/patches/10_TEXINPUTS_env_precedence.dpatch
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_TEXINPUTS_env_precedence.dpatch by Andreas Hoenen <andreas@hoenen-terstappen.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for bug report #470209:
+## DP: Don't ignore a possible setting of TEXINPUTS by the calling user.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/lib/dbtexmf/core/dbtex.py dblatex-0.2.9/lib/dbtexmf/core/dbtex.py
+--- dblatex-0.2.9~/lib/dbtexmf/core/dbtex.py	2008-06-03 20:09:15.000000000 +0200
++++ dblatex-0.2.9/lib/dbtexmf/core/dbtex.py	2008-06-28 15:18:51.000000000 +0200
+@@ -83,15 +83,24 @@
+     def update_texinputs(self):
+         # Systematically put the package style in TEXINPUTS
+         sep = os.pathsep
+-        texpaths = sep.join(self.texinputs + [self.texdir + "//"])
+-        texinputs = os.getenv("TEXINPUTS") or ""
+-        if not(texinputs) or texinputs[0] == sep:
+-            texinputs = sep + "%s%s" % (texpaths, texinputs)
+-        else:
+-            texinputs = sep + "%s%s%s" % (texpaths, sep, texinputs)
++        texinputs = sep.join(self.texinputs + [self.texdir + "//"])
+         # Texlocal has precedence over the standard (and added) paths
+         if self.texlocal:
+             texinputs = self.texlocal + "//" + sep + texinputs
++        # Handle environment variable TEXINPUTS: if it doesn't start, but ends
++        # with the path separator, it takes precedence over dblatex's settings.
++        env_texinputs = os.getenv("TEXINPUTS") or ""
++        if len(env_texinputs):
++            if env_texinputs[0] == sep:
++                texinputs = texinputs + env_texinputs
++            elif env_texinputs[-1] == sep:
++                texinputs = env_texinputs + texinputs
++            else:
++                texinputs = texinputs + sep + env_texinputs
++        if texinputs[-1] != sep:
++            # TEXINPUTS must end with a path separator to find the standard TeX
++            # classes.
++            texinputs += sep
+         os.environ["TEXINPUTS"] = texinputs
+ 
+     def set_xslt(self, xsltmod=None):
--- dblatex-0.2.9.orig/debian/patches/10_analyze_failure.dpatch
+++ dblatex-0.2.9/debian/patches/10_analyze_failure.dpatch
@@ -0,0 +1,161 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_analyze_failure.dpatch by Andreas Hoenen <andreas@hoenen-terstappen.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+## DP: In case of failed processing check on invalid input and on missing
+## DP: dependencies, as a hint on the error cause might be helpful for the
+## DP: caller.
+## DP: Look below (documentation string of the added methods) for a detailed
+## DP: description of the patch.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/lib/dbtexmf/core/dbtex.py dblatex-0.2.9/lib/dbtexmf/core/dbtex.py
+--- dblatex-0.2.9~/lib/dbtexmf/core/dbtex.py	2008-06-29 08:45:22.000000000 +0200
++++ dblatex-0.2.9/lib/dbtexmf/core/dbtex.py	2008-06-29 08:47:55.000000000 +0200
+@@ -10,6 +10,11 @@
+ import urllib
+ import glob
+ from optparse import OptionParser
++import os.path
++import subprocess
++import warnings
++warnings.filterwarnings('ignore', 'apt API not stable yet', FutureWarning)
++import apt
+ 
+ from dbtexmf.core.confparser import DbtexConfig, texinputs_parse, texstyle_parse
+ from dbtexmf.xslt import xslt
+@@ -236,12 +241,69 @@
+             donefile = self._compile()
+             shutil.move(donefile, self.output)
+             print "'%s' successfully built" % os.path.basename(self.output)
+-        finally:
+-            os.chdir(self.cwdir)
+-            if not(self.debug):
+-                shutil.rmtree(self.tmpdir)
+-            else:
+-                print "%s not removed" % self.tmpdir
++        except:
++            self._post_failure_validate_input()
++            self._post_failure_check_dependencies()
++        os.chdir(self.cwdir)
++        if not(self.debug):
++            shutil.rmtree(self.tmpdir)
++        else:
++            print "%s not removed" % self.tmpdir
++
++    def _post_failure_validate_input(self):
++        '''In case of failed processing try to validate the input.
++
++        As invalid DocBook sometimes results in strange TeX error messages, a
++        hint about the failure cause may be helpful.
++        Post failure validation is a convenience function and thus works in
++        a best effort approach, that is it will silently skip any problems,
++        e.g. the external validation program xmllint not installed.
++        '''
++        try:
++            nulldevice = file('/dev/null')
++            returncode = subprocess.Popen(['xmllint', '--noout', '--postvalid',
++                                           '--xinclude', self.input],
++                                          stdin=nulldevice,
++                                          stdout=nulldevice,
++                                          stderr=nulldevice).wait()
++            nulldevice.close()
++        except:
++            nulldevice.close()
++            return
++
++        if returncode == 3 or returncode == 4:
++            print >> sys.stderr
++            print >> sys.stderr, 'A possible reason for transformation',
++            print >> sys.stderr, 'failure is invalid DocBook'
++            print >> sys.stderr, '(as reported by xmllint)'
++            print >> sys.stderr
++
++    def _post_failure_check_dependencies(self):
++        '''In case of failed processing check on dependency problems.
++
++        For not commonly used dblatex functionality the Debian package
++        dependencies are not absolute, thus the functionality may be not
++        installed.  Therefore check for each one:
++        If it is used but a needed dependency is missing, dump an appropriate
++        hint.
++        '''
++        aptcache = apt.Cache()
++        warn_msgs = []
++        if self.backend == 'xetex':
++            for debian_pkg in 'texlive-xetex', 'lmodern':
++                if not aptcache[debian_pkg].isInstalled:
++                    warn_msgs.append('For xetex backend Debian package '
++                                     + debian_pkg + ' is needed')
++        if self.input_format == 'sgml':
++            for debian_pkg in 'docbook', 'opensp':
++                if not aptcache[debian_pkg].isInstalled:
++                    warn_msgs.append('For SGML documents Debian package '
++                                     + debian_pkg + ' is needed')
++        if len(warn_msgs):
++            print >> sys.stderr
++            for msg in warn_msgs:
++                print >> sys.stderr, msg
++            print >> sys.stderr
+ 
+     def _stdin_write(self):
+         # Find out the stdin working directory
+diff -urNad dblatex-0.2.9~/lib/dbtexmf/core/imagedata.py dblatex-0.2.9/lib/dbtexmf/core/imagedata.py
+--- dblatex-0.2.9~/lib/dbtexmf/core/imagedata.py	2008-06-28 15:27:54.000000000 +0200
++++ dblatex-0.2.9/lib/dbtexmf/core/imagedata.py	2008-06-29 08:49:14.000000000 +0200
+@@ -2,6 +2,9 @@
+ import os
+ import re
+ import shutil
++import warnings
++warnings.filterwarnings('ignore', 'apt API not stable yet', FutureWarning)
++import apt
+ 
+ #
+ # Objects to convert an image format to another. Actually use the underlying
+@@ -19,13 +22,43 @@
+             print cmd
+         if doexec:
+             if not(self.fake):
+-                os.system(cmd)
++                if os.system(cmd) != 0:
++                    self._post_failure_check_dependencies(cmd)
+         else:
+             return cmd
+ 
+     def convert(self, input, output, format, doexec=1):
+         pass
+ 
++    def _post_failure_check_dependencies(self, cmd):
++        '''In case of failed image converter calls check on dependency problems.
++
++        In Debian dblatex package dependencies on image converters are not
++        absolute, as image conversion is not dblatex's core functionality.
++        Thus the converters may be not installed.  Therefore check for each one:
++        If it is used but missing, dump an appropriate hint.
++        '''
++        aptcache = apt.Cache()
++        warn_msgs = []
++        if ((cmd.startswith('convert') or cmd.find('&& convert') > -1)
++            and not aptcache['graphicsmagick-imagemagick-compat'].isInstalled
++            and not aptcache['imagemagick'].isInstalled):
++            warn_msgs.append('For image conversion one of Debian packages'
++                             + ' graphicsmagick-imagemagick-compat')
++            warn_msgs.append('or imagemagick is needed')
++        if ((cmd.startswith('epstopdf') or cmd.find('&& epstopdf') > -1)
++            and not aptcache['ghostscript'].isInstalled):
++            warn_msgs.append('For image conversion Debian package ghostscript'
++                             + ' is needed')
++        if ((cmd.startswith('fig2dev') or cmd.find('&& fig2dev') > -1)
++            and not aptcache['transfig'].isInstalled):
++            warn_msgs.append('For image conversion Debian package transfig is'
++                             + ' needed')
++        if len(warn_msgs):
++            print >> sys.stderr
++            for msg in warn_msgs:
++                print >> sys.stderr, msg
++            print >> sys.stderr
+ 
+ class GifConverter(ImageConverter):
+     def convert(self, input, output, format, doexec=1):
--- dblatex-0.2.9.orig/debian/patches/10_dblatex_wrapper_script.dpatch
+++ dblatex-0.2.9/debian/patches/10_dblatex_wrapper_script.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_dblatex_wrapper_script.dpatch by Andreas Hoenen <andreas@hoenen-terstappen.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Simple wrapper script for calling dblatex.  Will be installed into
+## DP: /usr/bin.  (In the upstream package this script does not exist as a file,
+## DP: but gets created during install.)
+
+@DPATCH@
+diff -urNad dblatex-0.2.8~/dblatex dblatex-0.2.8/dblatex
+--- dblatex-0.2.8~/dblatex	1970-01-01 01:00:00.000000000 +0100
++++ dblatex-0.2.8/dblatex	2007-10-17 20:45:38.000000000 +0200
+@@ -0,0 +1,9 @@
++#!/usr/bin/python
++import sys
++import os
++
++package_base = r"/usr/share/dblatex"
++sys.path.append(r"/usr/share/dblatex/lib")
++
++from dbtexmf.dblatex import dblatex
++dblatex.main(base=package_base)
--- dblatex-0.2.9.orig/debian/patches/20_ukranian_support.dpatch
+++ dblatex-0.2.9/debian/patches/20_ukranian_support.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_ukranian_support.dpatch by Andreas Hoenen <andreas@hoenen-terstappen.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for bug report #482856:
+## DP: Support ukranian documents using the XeTeX backend.
+## DP: The patch is likely to be included in the next upstream release.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/latex/style/dbk_locale.sty dblatex-0.2.9/latex/style/dbk_locale.sty
+--- dblatex-0.2.9~/latex/style/dbk_locale.sty	2008-04-19 01:11:22.000000000 +0200
++++ dblatex-0.2.9/latex/style/dbk_locale.sty	2008-06-28 13:57:38.000000000 +0200
+@@ -233,6 +233,11 @@
+   \ifxetex\usepackage{xecyr}\fi
+ }
+ 
++\babelsetup{uk}{%
++  % XeTeX works with ukranian babel only if xecyr is provided
++  \ifxetex\usepackage{xecyr}\fi
++}
++
+ %% Apply default locale setup
+ \setuplocale{en}
+ 
--- dblatex-0.2.9.orig/debian/patches/10_dblatex_version.dpatch
+++ dblatex-0.2.9/debian/patches/10_dblatex_version.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_dblatex_version.dpatch by Andreas Hoenen <andreas@hoenen-terstappen.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adapt version string that gets dumped out when running dblatex to
+## DP: debian version.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/xsl/version.xsl dblatex-0.2.9/xsl/version.xsl
+--- dblatex-0.2.9~/xsl/version.xsl	2008-06-29 09:36:25.000000000 +0200
++++ dblatex-0.2.9/xsl/version.xsl	2008-08-03 08:32:29.000000000 +0200
+@@ -5,6 +5,6 @@
+     XSLT Stylesheet DocBook -> LaTeX 
+     ############################################################################ -->
+ 
+-<xsl:variable name="version">0.2.9</xsl:variable>
++<xsl:variable name="version">0.2.9-3</xsl:variable>
+ </xsl:stylesheet>
+ 
--- dblatex-0.2.9.orig/debian/patches/20_cjk_issues.dpatch
+++ dblatex-0.2.9/debian/patches/20_cjk_issues.dpatch
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_cjk_issues.dpatch by Andreas Hoenen <andreas@hoenen-terstappen.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Improve CJK (Chinese/Japanese/Korean) support:
+## DP: + Let XSL configuration parameter cjk.font default to gkai (instead of
+## DP:   the cyberbit font not included in Debian).
+## DP: + Fix the dblatex style not to collide with the CJKutf8.sty file.
+
+@DPATCH@
+diff -urNad dblatex-0.2.9~/latex/contrib/db2latex/db2latex.sty dblatex-0.2.9/latex/contrib/db2latex/db2latex.sty
+--- dblatex-0.2.9~/latex/contrib/db2latex/db2latex.sty	2008-08-09 15:56:41.000000000 +0200
++++ dblatex-0.2.9/latex/contrib/db2latex/db2latex.sty	2008-08-09 15:56:44.000000000 +0200
+@@ -351,7 +351,6 @@
+ \newcommand{\docbooktolatexnoparskip}{\docbooktolatexoldparskip=\parskip\parskip=0pt plus 1pt}
+ \newcommand{\docbooktolatexrestoreparskip}{\parskip=\docbooktolatexoldparskip}
+ \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else\hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
+-\usepackage[latin1]{inputenc}
+ 
+ \ifx\dblatex@chaptersmark\@undefined\def\dblatex@chaptersmark#1{\markboth{\MakeUppercase{#1}}{}}\fi
+ \let\save@makeschapterhead\@makeschapterhead
+diff -urNad dblatex-0.2.9~/xsl/lang.xsl dblatex-0.2.9/xsl/lang.xsl
+--- dblatex-0.2.9~/xsl/lang.xsl	2008-04-19 01:11:31.000000000 +0200
++++ dblatex-0.2.9/xsl/lang.xsl	2008-08-09 15:57:02.000000000 +0200
+@@ -7,7 +7,7 @@
+ 
+ <xsl:param name="latex.encoding">latin1</xsl:param>
+ <xsl:param name="korean.package">CJK</xsl:param>
+-<xsl:param name="cjk.font">cyberbit</xsl:param>
++<xsl:param name="cjk.font">gkai</xsl:param>
+ <xsl:param name="xetex.font">
+   <xsl:text>\setmainfont{DejaVu Serif}&#10;</xsl:text>
+   <xsl:text>\setsansfont{DejaVu Sans}&#10;</xsl:text>
