summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Puskas <zoltan@sinustrom.info>2020-02-25 00:54:05 -0800
committerJoonas Niilola <juippis@gentoo.org>2020-03-03 08:01:41 +0200
commitf5fa69530b40f433b2d1eff27fb800592e38c4de (patch)
treea47cddd4dd5eaa49cc8058b6327086c2b4b5b1ed /app-text
parentacct{user,group}/gvm: drop myself as a maintainer (diff)
downloadgentoo-f5fa69530b40f433b2d1eff27fb800592e38c4de.tar.gz
gentoo-f5fa69530b40f433b2d1eff27fb800592e38c4de.tar.bz2
gentoo-f5fa69530b40f433b2d1eff27fb800592e38c4de.zip
app-text/dblatex: Bump to 3.11 (Python3 compatible) version
Closes: https://bugs.gentoo.org/710690 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/dblatex/Manifest1
-rw-r--r--app-text/dblatex/dblatex-0.3.11.ebuild59
-rw-r--r--app-text/dblatex/files/dblatex-0.3.11-no-inkscape-dependency.patch14
-rw-r--r--app-text/dblatex/files/dblatex-0.3.11-path-logging.patch15
-rw-r--r--app-text/dblatex/files/dblatex-0.3.11-setup.patch47
5 files changed, 136 insertions, 0 deletions
diff --git a/app-text/dblatex/Manifest b/app-text/dblatex/Manifest
index 3810a4d1cfa7..eac71d584fa3 100644
--- a/app-text/dblatex/Manifest
+++ b/app-text/dblatex/Manifest
@@ -1,2 +1,3 @@
DIST dblatex-0.3.10.tar.bz2 1668202 BLAKE2B 2cc7e33ddc1b4732ae880d3443e65e40b16fc21fa31dfc52ef2250433f4c99bb5b590961095e044b2972b1ac9b4e38358e356b7bdcfb607d6f863720feea7cf4 SHA512 33a5ee3d23d3b9a1576be248a312ca741ea7cb629334a98fb6cb49e0f0f932334506ea934312de04ec645c86ec52699687bd2574b1802d3c23815b44c8514b7b
+DIST dblatex-0.3.11py3.tar.bz2 1671505 BLAKE2B 44e89f5f8d81105a3401074ad765479c04a495962c3efb3677cec81bf3b85c67a03585e7da8bdbd103cbea84e38d2bc633bd13704a5835c98d70fed644bfc6ba SHA512 48c1445c702e9c7c3ff83c57bb8a0caf5f4b027669a70887af0a23f75f5f99fb6840c4281b8bad9402910f3850af485d432e3109e5fd93184434cc87eb712695
DIST dblatex-0.3.7.tar.bz2 1513975 BLAKE2B de523640eacc058eaffc2e53407d6faed0969b1485110dca7669c6fb2323d4ecb91c8d73d9a8fdf3ae9d0803f5e5a371af011c0a241f97f08ae4d73ee57e7d89 SHA512 7f7111dfe7d880a93679422a43700787755ebee7f17483b4bc5a8ce55c521d7fe0baeb4890a910b9007141d63a3e3b8f50347e68001ad7c1a14916920e11a40c
diff --git a/app-text/dblatex/dblatex-0.3.11.ebuild b/app-text/dblatex/dblatex-0.3.11.ebuild
new file mode 100644
index 000000000000..523c84b8f4ab
--- /dev/null
+++ b/app-text/dblatex/dblatex-0.3.11.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit distutils-r1
+
+DESCRIPTION="Transform DocBook using TeX macros"
+HOMEPAGE="http://dblatex.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${P}py3.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="inkscape"
+
+RDEPEND="
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/kpathsea
+ dev-libs/libxslt
+ dev-libs/libxslt
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-mathscience
+ dev-texlive/texlive-pictures
+ dev-texlive/texlive-xetex
+ gnome-base/librsvg
+ media-gfx/imagemagick
+ media-gfx/transfig
+ inkscape? ( media-gfx/inkscape )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}py3"
+
+PATCHES=(
+ "${FILESDIR}/${P}-path-logging.patch"
+ "${FILESDIR}/${P}-setup.patch"
+)
+
+python_prepare_all() {
+ # Manual page is precomressed, but we will use our own compression later.
+ gunzip docs/manpage/dblatex.1.gz || die
+ # If we dont have inkscape we need to use an alternative SVG converter
+ use inkscape || eapply "${FILESDIR}/${P}-no-inkscape-dependency.patch"
+ # We need to fix version information in the docs and some metadata
+ grep -l -I -R "0.3.11py3" | xargs -n1 sed -i -e "s/${PV}py3/${PV}/" || die
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ # Move package documentation to a folder name containing version number
+ mv "${D}"/usr/share/doc/${PN} "${D}"/usr/share/doc/${PF} || die
+}
diff --git a/app-text/dblatex/files/dblatex-0.3.11-no-inkscape-dependency.patch b/app-text/dblatex/files/dblatex-0.3.11-no-inkscape-dependency.patch
new file mode 100644
index 000000000000..18695b52a5ee
--- /dev/null
+++ b/app-text/dblatex/files/dblatex-0.3.11-no-inkscape-dependency.patch
@@ -0,0 +1,14 @@
+diff -Naur dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py dblatex-0.3.11py3-new/lib/dbtexmf/core/imagedata.py
+--- dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py 2020-01-29 13:48:33.000000000 -0800
++++ dblatex-0.3.11py3-new/lib/dbtexmf/core/imagedata.py 2020-02-25 00:45:35.627054621 -0800
+@@ -181,8 +181,8 @@
+ class SvgConverter(ImageConverter):
+ def __init__(self, imgsrc, imgdst="", docformat="", backend=""):
+ ImageConverter.__init__(self, imgsrc="svg", imgdst=imgdst)
+- self.add_command(["inkscape", "-z", "-D", "--export-%(dst)s=%(output)s",
+- "%(input)s"])
++ self.add_command(["rsvg-convert", "-f", "%(dst)s", "-o","%(output)s",
++ "%(input)s"])
+
+
+ class FormatRule:
diff --git a/app-text/dblatex/files/dblatex-0.3.11-path-logging.patch b/app-text/dblatex/files/dblatex-0.3.11-path-logging.patch
new file mode 100644
index 000000000000..3d6162848fec
--- /dev/null
+++ b/app-text/dblatex/files/dblatex-0.3.11-path-logging.patch
@@ -0,0 +1,15 @@
+diff -Naur dblatex-0.3.11py3/scripts/dblatex dblatex-0.3.11py3-new/scripts/dblatex
+--- dblatex-0.3.11py3/scripts/dblatex 2020-01-29 13:48:34.000000000 -0800
++++ dblatex-0.3.11py3-new/scripts/dblatex 2020-02-25 01:04:16.169346434 -0800
+@@ -1,8 +1,10 @@
+ #! /usr/bin/env python
+ import sys
+ import os
++import logging
+
+-package_base = os.path.join(os.path.dirname(sys.argv[0]), "..")
++logging.basicConfig()
++package_base = "/usr/share/dblatex"
+ sys.path.insert(0, os.path.realpath(os.path.join(package_base, "lib")))
+
+ from dbtexmf.dblatex import dblatex
diff --git a/app-text/dblatex/files/dblatex-0.3.11-setup.patch b/app-text/dblatex/files/dblatex-0.3.11-setup.patch
new file mode 100644
index 000000000000..802030118398
--- /dev/null
+++ b/app-text/dblatex/files/dblatex-0.3.11-setup.patch
@@ -0,0 +1,47 @@
+diff -Naur dblatex-0.3.11py3/setup.py dblatex-0.3.11py3-new/setup.py
+--- dblatex-0.3.11py3/setup.py 2020-01-29 13:48:34.000000000 -0800
++++ dblatex-0.3.11py3-new/setup.py 2020-02-27 20:25:21.669297793 -0800
+@@ -26,7 +26,6 @@
+ from distutils import log
+ from subprocess import Popen, PIPE
+ sys.path.append("lib")
+-from contrib.debian.installer import DebianInstaller
+
+ #
+ # Build the command line script
+@@ -192,7 +191,7 @@
+ log.info("running build_doc")
+ htmldir = os.path.join("docs", "xhtml")
+ pdfdocs = glob.glob(os.path.join("docs", "[mr]*.pdf"))
+- manpage = os.path.join("docs", "manpage", "dblatex.1.gz")
++ manpage = os.path.join("docs", "manpage", "dblatex.1")
+
+ # Lazy check to avoid a rebuild for nothing
+ if (not(self.force) and os.path.exists(htmldir) and len(pdfdocs) >= 2
+@@ -368,15 +367,12 @@
+ status += "no"
+ mis_stys.append(sty)
+ print(status)
+-
++
+ if mis_stys:
+ raise OSError("not found: %s" % ", ".join(mis_stys))
+
+ def run(self):
+- if self.install_layout == "deb":
+- db = DebianInstaller(self)
+- else:
+- db = None
++ db = None
+
+ if not(db) and not(self.nodeps):
+ try:
+@@ -515,7 +511,7 @@
+ data_files=[('share/dblatex', ['xsl', 'latex', 'etc/schema']),
+ ('share/doc/dblatex', pdfdocs),
+ ('share/doc/dblatex', htmldoc),
+- ('share/man/man1', ['docs/manpage/dblatex.1.gz'])],
++ ('share/man/man1', ['docs/manpage/dblatex.1'])],
+ scripts=['scripts/dblatex'],
+ cmdclass={'build': Build,
+ 'build_scripts': BuildScripts,