diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /app-text/dblatex | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'app-text/dblatex')
-rw-r--r-- | app-text/dblatex/Manifest | 3 | ||||
-rw-r--r-- | app-text/dblatex/dblatex-0.3.11-r1.ebuild | 62 | ||||
-rw-r--r-- | app-text/dblatex/files/dblatex-0.3.11-encode.patch | 19 | ||||
-rw-r--r-- | app-text/dblatex/files/dblatex-0.3.11-inkscape-1.0.patch | 107 |
4 files changed, 191 insertions, 0 deletions
diff --git a/app-text/dblatex/Manifest b/app-text/dblatex/Manifest index 4b3c1323b8d6..e16a786f9a49 100644 --- a/app-text/dblatex/Manifest +++ b/app-text/dblatex/Manifest @@ -1,6 +1,9 @@ +AUX dblatex-0.3.11-encode.patch 752 BLAKE2B a9dfa9fd76219f346bcae7781fa4cb3174f1723901891618a480baa290599586080692743409a70e5a606d44c7bddaa4449735fd34beab83f90602ecc0482903 SHA512 4750f800d99a425eeccf84c87dbdfac6d1c0c2ff394c191ed239ca329dbac13c861d5d74014202bc4fd430c806fcfee0bdafc62b0ab94e9b910429d916590545 +AUX dblatex-0.3.11-inkscape-1.0.patch 4051 BLAKE2B 0c21ab019da8dec6ea093963f79382241bc6326f70aa84b2aaa53502e1ed84c7bcb68e95581b6a480b10869f53709000003e1ef0ba71c79d5cc1ebe6434d0968 SHA512 fd33e2388de5d830288ce25cfe4dd0f933333118cbea3c68b66b8f171476b5ac29fc7fb43ac26bd38e362e676f36cf0297e2c643be948e2d5f6c796c68eb3c67 AUX dblatex-0.3.11-no-inkscape-dependency.patch 753 BLAKE2B 2199d6068d86be9a0a63bb7cc034f54e8edf59434127e495d5878dfb761c990f9f106fbc0436513220ade66bb107030093f41c8e4777e6ccb279259aff912d06 SHA512 08f4e4473359a2633a785cd34fc3a89feaab8619843a93c5ffba0bf00e31aff2d1ce5a54aeea3eb51e63385b3480df1f196f54cdd568ff49558860460faa1c8f AUX dblatex-0.3.11-path-logging.patch 554 BLAKE2B 7b078b4f0bacaffb3449122b561c264de8c8970fe4cbf5459c5ec651aecd3e3ccb7dcc95bfcc8277686133bc3187a5952edd1bc88dae11c2ddac3aa4060333b4 SHA512 ae08b08a435393bf94039edd8b74457a1d4475d8473fa450b41a993ca4ded08f79566bf2dc78144df977fe1f975e1c60b9d02b2dc4579f8c7d65839946e3de05 AUX dblatex-0.3.11-setup.patch 1751 BLAKE2B a83e41c4fa68eaee1b6e80404cd5486e64f117ca07314463ca0369cd3bc9d64dbdeb8f5fa2f44bee2704c37dda0e1564c461c7d39b1439aa76800032dd96acad SHA512 f77a82876fe28fdc6f9cc689c8b789fd09e703ca4625207fe81a35b1491bcd46a398eb78781fac60c33ac2efcd3d0957fb3604f8a54cd411b0fd4031016ef5fc DIST dblatex-0.3.11py3.tar.bz2 1671505 BLAKE2B 44e89f5f8d81105a3401074ad765479c04a495962c3efb3677cec81bf3b85c67a03585e7da8bdbd103cbea84e38d2bc633bd13704a5835c98d70fed644bfc6ba SHA512 48c1445c702e9c7c3ff83c57bb8a0caf5f4b027669a70887af0a23f75f5f99fb6840c4281b8bad9402910f3850af485d432e3109e5fd93184434cc87eb712695 +EBUILD dblatex-0.3.11-r1.ebuild 1799 BLAKE2B 1c5e8c48a5db271a1ad5048edb6623ffe1878c7e18540c12343ab1faca0ddb0e65bb353e7a83cb6517ae09ef2304efcfd16b2245041ffa5884cf7a631dc01868 SHA512 85c2f9bf1297e280d287dac4f03dfed97e1ba4cede1d94a10deb68109261ed50f86060fedcffc13eefe2ff7ffec5a97e0a28dd223f37dc2d1fcba8f116924cd0 EBUILD dblatex-0.3.11.ebuild 1622 BLAKE2B e22f30327fbec58cf69839f1aad790aab5c024bf70df5faa3b4f5eb75e6619b6c3b35a9e52e8df0dab0d942b71c1bce8836bd1a468d2e66992b8fa90fd1d3a46 SHA512 25818584313360bb615da8a8dd6c88f6fe8ea41066e564d8e59849aadd30e0b2f13ad1b2aad511deaf492179d8b3e9d64b71c105793de7ca07f395b02a8e961f MISC metadata.xml 866 BLAKE2B 3776cf07848836c14fd82031a49284f982b04b573fd28080c0fa9c7cbe6155fa63c89b897461dc996842a0d66be38fbde2326cdce8aeddebbfcfd777677e2011 SHA512 9806f0804fc5b14a222974a9e2c2cc8a13a7378b99deca9cd9ac5f7cbdb776b3c240b521a6077cb80d1685574ca47a372712526ec994c6bf228b2c784568cf93 diff --git a/app-text/dblatex/dblatex-0.3.11-r1.ebuild b/app-text/dblatex/dblatex-0.3.11-r1.ebuild new file mode 100644 index 000000000000..7e0ca0eab604 --- /dev/null +++ b/app-text/dblatex/dblatex-0.3.11-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{6,7,8,9} ) + +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" + "${FILESDIR}/${P}-encode.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" + # If we use inscape however we want to make dblatex compatible with v1.0 + use inkscape && eapply "${FILESDIR}/${P}-inkscape-1.0.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-encode.patch b/app-text/dblatex/files/dblatex-0.3.11-encode.patch new file mode 100644 index 000000000000..1f32f99074a2 --- /dev/null +++ b/app-text/dblatex/files/dblatex-0.3.11-encode.patch @@ -0,0 +1,19 @@ +diff -Naur dblatex-0.3.11py3-orig/lib/dbtexmf/dblatex/rawtex.py dblatex-0.3.11py3/lib/dbtexmf/dblatex/rawtex.py +--- dblatex-0.3.11py3-orig/lib/dbtexmf/dblatex/rawtex.py 2020-01-29 13:48:34.000000000 -0800 ++++ dblatex-0.3.11py3/lib/dbtexmf/dblatex/rawtex.py 2020-07-13 23:49:56.296767535 -0700 +@@ -101,10 +101,14 @@ + + # If something done, replace the figure in the tex file + if newfig != fig: ++ if isinstance(fig, str): ++ fig = fig.encode("utf-8") ++ if isinstance(newfig, str): ++ newfig = newfig.encode("utf-8") + line = re.sub(br"{"+fig+br"}", br"{"+newfig+br"}", line) + + return line +- ++ + + def main(): + c = RawLatex() diff --git a/app-text/dblatex/files/dblatex-0.3.11-inkscape-1.0.patch b/app-text/dblatex/files/dblatex-0.3.11-inkscape-1.0.patch new file mode 100644 index 000000000000..48cd9f249729 --- /dev/null +++ b/app-text/dblatex/files/dblatex-0.3.11-inkscape-1.0.patch @@ -0,0 +1,107 @@ +diff -Naur dblatex-0.3.11py3-orig/docs/custom/dblatex.xconf dblatex-0.3.11py3/docs/custom/dblatex.xconf +--- dblatex-0.3.11py3-orig/docs/custom/dblatex.xconf 2020-01-29 13:48:32.000000000 -0800 ++++ dblatex-0.3.11py3/docs/custom/dblatex.xconf 2020-07-14 01:05:42.883435133 -0700 +@@ -18,7 +18,7 @@ + <imagedata> + <converter src="svg" dst="*" docformat="pdf"> + <command> +- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s ++ inkscape -D --export-dpi=600 --export-filename=%(output)s %(input)s + </command> + </converter> + </imagedata> +diff -Naur dblatex-0.3.11py3-orig/docs/xhtml/manual/sec-specs.html dblatex-0.3.11py3/docs/xhtml/manual/sec-specs.html +--- dblatex-0.3.11py3-orig/docs/xhtml/manual/sec-specs.html 2020-01-29 13:49:23.000000000 -0800 ++++ dblatex-0.3.11py3/docs/xhtml/manual/sec-specs.html 2020-07-14 01:06:19.012860710 -0700 +@@ -36,7 +36,7 @@ + <imagedata> + <converter src="svg" dst="*" docformat="pdf"> + <command> +- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s ++ inkscape -D --export-dpi=600 --export-filename=%(output)s %(input)s + </command> + </converter> + </imagedata> +diff -Naur dblatex-0.3.11py3-orig/lib/dbtexmf/core/imagedata.py dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py +--- dblatex-0.3.11py3-orig/lib/dbtexmf/core/imagedata.py 2020-01-29 13:48:33.000000000 -0800 ++++ dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py 2020-07-14 01:02:56.729388831 -0700 +@@ -47,16 +47,16 @@ + + + class PoolManager: +- def __init__(self): ++ def __init__(self): + self._used_pool = None + self._pending_pools = [] +- ++ + def set_pool(self, pool): + self._used_pool = pool + for p in self._pending_pools: + pool.preprend(p) + self._pending_pools = [] +- ++ + def prepend_pool(self, pool): + if self._used_pool: + self._used_pool.prepend(pool) +@@ -73,7 +73,7 @@ + self.format_pool = PoolManager() + + _image_setup = ImageSetup() +- ++ + def image_setup(): + global _image_setup + return _image_setup +@@ -181,7 +181,7 @@ + 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", ++ self.add_command(["inkscape", "-D", "--export-filename=%(output)s", + "%(input)s"]) + + +@@ -224,7 +224,7 @@ + ImageFormatPool.__init__(self) + # There can be a mismatch between PDF-1.4 images and PDF-1.3 + # document produced by XeTeX +- self.add_rule(FormatRule(docformat="pdf", backend="xetex", ++ self.add_rule(FormatRule(docformat="pdf", backend="xetex", + imgdst="png")) + self.add_rule(FormatRule(docformat="pdf", imgdst="pdf")) + self.add_rule(FormatRule(docformat="dvi", imgdst="eps")) +@@ -318,7 +318,7 @@ + Copy the file in the working directory if its path contains characters + unsupported by latex, like spaces. + """ +- # Encode to expected output format. If encoding is OK and ++ # Encode to expected output format. If encoding is OK and + # supported by tex, just return the encoded path + newfig = self._path_encode(fig) + if newfig and newfig.find(b" ") == -1: +@@ -350,7 +350,7 @@ + if (ext): + realfig = self.find(fig) + return (realfig, ext[1:]) +- ++ + # Lookup for the best suited available figure + if (self.output_format == "pdf"): + formats = ("png", "pdf", "jpg", "eps", "gif", "fig", "svg") +@@ -369,7 +369,7 @@ + format = "" + + return (realfig, format) +- ++ + def find(self, fig): + # First, the obvious absolute path case + if os.path.isabs(fig): +@@ -385,4 +385,4 @@ + return realfig + + return None +- ++ |