public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/dblatex/, app-text/dblatex/files/
Date: Tue,  3 Mar 2020 06:03:06 +0000 (UTC)	[thread overview]
Message-ID: <1583215301.f5fa69530b40f433b2d1eff27fb800592e38c4de.juippis@gentoo> (raw)

commit:     f5fa69530b40f433b2d1eff27fb800592e38c4de
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Tue Feb 25 08:54:05 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Mar  3 06:01:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5fa6953

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 <AT> sinustrom.info>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-text/dblatex/Manifest                          |  1 +
 app-text/dblatex/dblatex-0.3.11.ebuild             | 59 ++++++++++++++++++++++
 .../dblatex-0.3.11-no-inkscape-dependency.patch    | 14 +++++
 .../files/dblatex-0.3.11-path-logging.patch        | 15 ++++++
 app-text/dblatex/files/dblatex-0.3.11-setup.patch  | 47 +++++++++++++++++
 5 files changed, 136 insertions(+)

diff --git a/app-text/dblatex/Manifest b/app-text/dblatex/Manifest
index 3810a4d1cfa..eac71d584fa 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 00000000000..523c84b8f4a
--- /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 00000000000..18695b52a5e
--- /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 00000000000..3d6162848fe
--- /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 00000000000..80203011839
--- /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,


             reply	other threads:[~2020-03-03  6:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  6:03 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13 10:37 [gentoo-commits] repo/gentoo:master commit in: app-text/dblatex/, app-text/dblatex/files/ Michał Górny
2020-08-05 12:19 Joonas Niilola
2015-11-09  0:27 Amy Winston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1583215301.f5fa69530b40f433b2d1eff27fb800592e38c4de.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox