Bump
This commit is contained in:
11
app-text/dblatex/Manifest
Normal file
11
app-text/dblatex/Manifest
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
AUX python3.12-adjust-submodule-imports.patch 1338 BLAKE2B 449bf9535269583f41552c07c856d1e12fecf7a8785d635c6a5baa11b2d39e138c6c93e2c0e07daacaee042e006e37463e638280c5d093ffc4df361fdc02ce49 SHA512 18180ce417099f1c5d000afffb6f4edf11afb81246bb15d2b8d25fb161fe0e454cb72360f4dffcad93071a5ee925ea19ba77202f4e59862650a7d9a09d0c2765
|
||||
AUX python3.12-replace-imp-by-importlib.patch 3710 BLAKE2B ccbcfa3401208b925dfd96d905f3185e220f5cf28f22875c22c020369470137f96ad4fb37961fc9ff692b69fe25f7a4d4a2aa98a9b5c22ecb02791da2cc3ef72 SHA512 b8f5bf187e583759bbb92eecc081baac0221f4cda7f444eef3e772f11021c3d91a70955738efbc4ea9e99d8fe32ef121376a98fbcf828147fe3919fcce2eb8a0
|
||||
DIST dblatex3-0.3.12.tar.bz2 1693272 BLAKE2B 9310ce5db3b5f92e183f2656c5b1881edaf0208ae4f78f853332c844258fa38d443921fc42c03301773b1451ce272a538c305d765acbdc6eafbdcf25ebf5d2d3 SHA512 5bfa774c8dbe362775f6bbb5e1196e5a2bb1af239778133c12ddc725406ced67f3ff422433a2a1aa02d4431e9be58ba12e918379deb81fcd5b96533d2bdf029a
|
||||
EBUILD dblatex-0.3.12-r1.ebuild 1977 BLAKE2B 21bf43eb0f8576d2e52cdc147ebc574c621d7ed46a0a8841d2a3b247918287664e3fd275411da3267073375571d27e09ee9c108a326e793446aa5bbcbb6cfa79 SHA512 b69408291dc8ba9f03deafdaef0b187309fde222cd81741d1652580ca2cb2d0ac2e58fe5680cae815a1f3c73c113a8cfeff58f5de31beedd55299b993aec6f59
|
||||
EBUILD dblatex-0.3.12-r2.ebuild 2103 BLAKE2B bc7934c7cbde43f169892ad15866545b7685c757b46eb0bef7dc05d1771f6b0ecd72934b3660ea2d7176f61e6b414a268d9623d53013a68d3e039fc1a09ef579 SHA512 f3cdfea792324d2bacdd4b8c7894f89c8366ff4f6735061e531a4e1d12f5b3749e2ede46cd0c74181f85d64342923c95c830ac31d323ddab82757e7bec7a2dd5
|
||||
MISC metadata.xml 908 BLAKE2B e13f176739b3fb7a63a5eaeb704afa1c0b4e9740ea25dec54656c283cf9f8f614096aae407df8822414e054eaad0082c738c0a5a2acc91a51ce3f6b729fc37d6 SHA512 a39c4073b4cec1753724d16bcca023c9306eeac79bc7f008c6e090f85c4661733810c9864b91b9552fbbec242c01a312780ee780d11724ce26399bad3c9a0899
|
||||
69
app-text/dblatex/dblatex-0.3.12-r1.ebuild
Normal file
69
app-text/dblatex/dblatex-0.3.12-r1.ebuild
Normal file
@@ -0,0 +1,69 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
# Breaks installation of /usr/bin/dblatex, bug #906788
|
||||
#DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Transform DocBook using TeX macros"
|
||||
HOMEPAGE="http://dblatex.sourceforge.net/"
|
||||
SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${PN}3-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
IUSE="inkscape test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
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}"
|
||||
BDEPEND="${RDEPEND}
|
||||
test? ( ~${CATEGORY}/${P} )"
|
||||
|
||||
S="${WORKDIR}/${PN}3-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-0.3.11-path-logging.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-setup.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-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}/${PN}-0.3.11-no-inkscape-dependency.patch"
|
||||
# If we use inscape however we want to make dblatex compatible with v1.0
|
||||
use inkscape && eapply "${FILESDIR}/${PN}-0.3.11-inkscape-1.0.patch"
|
||||
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
|
||||
}
|
||||
|
||||
python_test_all() {
|
||||
emake -C tests/mathml
|
||||
}
|
||||
71
app-text/dblatex/dblatex-0.3.12-r2.ebuild
Normal file
71
app-text/dblatex/dblatex-0.3.12-r2.ebuild
Normal file
@@ -0,0 +1,71 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
# Breaks installation of /usr/bin/dblatex, bug #906788
|
||||
#DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Transform DocBook using TeX macros"
|
||||
HOMEPAGE="http://dblatex.sourceforge.net/"
|
||||
SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${PN}3-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
IUSE="inkscape test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
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/fig2dev-3.2.9-r1
|
||||
inkscape? ( media-gfx/inkscape )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="${RDEPEND}
|
||||
test? ( ~${CATEGORY}/${P} )"
|
||||
|
||||
S="${WORKDIR}/${PN}3-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-0.3.11-path-logging.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-setup.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-encode.patch"
|
||||
"${FILESDIR}/python3.12-replace-imp-by-importlib.patch"
|
||||
"${FILESDIR}/python3.12-adjust-submodule-imports.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}/${PN}-0.3.11-no-inkscape-dependency.patch"
|
||||
# If we use inscape however we want to make dblatex compatible with v1.0
|
||||
use inkscape && eapply "${FILESDIR}/${PN}-0.3.11-inkscape-1.0.patch"
|
||||
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
|
||||
}
|
||||
|
||||
python_test_all() {
|
||||
emake -C tests/mathml
|
||||
}
|
||||
19
app-text/dblatex/files/dblatex-0.3.11-encode.patch
Normal file
19
app-text/dblatex/files/dblatex-0.3.11-encode.patch
Normal file
@@ -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()
|
||||
107
app-text/dblatex/files/dblatex-0.3.11-inkscape-1.0.patch
Normal file
107
app-text/dblatex/files/dblatex-0.3.11-inkscape-1.0.patch
Normal file
@@ -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
|
||||
-
|
||||
+
|
||||
@@ -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:
|
||||
15
app-text/dblatex/files/dblatex-0.3.11-path-logging.patch
Normal file
15
app-text/dblatex/files/dblatex-0.3.11-path-logging.patch
Normal file
@@ -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
|
||||
47
app-text/dblatex/files/dblatex-0.3.11-setup.patch
Normal file
47
app-text/dblatex/files/dblatex-0.3.11-setup.patch
Normal file
@@ -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,
|
||||
@@ -0,0 +1,46 @@
|
||||
Description: Python 3.12 compatibility: adjust submodule imports
|
||||
importlib imports behave differently in py 3.11 and py 3.12: py 3.12
|
||||
requires explicit imports of the submodules.
|
||||
.
|
||||
While fixing this, reduce the imports to the used submodules. Currently,
|
||||
the base is still imported automatically.
|
||||
Forwarded: https://sourceforge.net/p/dblatex/patches/13/
|
||||
Author: Michael J Gruber <github@grubix.eu>
|
||||
Last-Update: 2023-07-06
|
||||
|
||||
--- a/lib/dbtexmf/core/dbtex.py
|
||||
+++ b/lib/dbtexmf/core/dbtex.py
|
||||
@@ -15,7 +15,8 @@
|
||||
except ImportError:
|
||||
from urllib.request import pathname2url
|
||||
import glob
|
||||
-import importlib
|
||||
+import importlib.machinery
|
||||
+import importlib.util
|
||||
from optparse import OptionParser
|
||||
from io import open
|
||||
|
||||
--- a/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
+++ b/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
@@ -4,7 +4,8 @@
|
||||
Mechanisms to dynamically load extra modules to help the LaTeX compilation.
|
||||
All the modules must be derived from the TexModule class.
|
||||
"""
|
||||
-import importlib
|
||||
+import importlib.machinery
|
||||
+import importlib.util
|
||||
|
||||
from os.path import *
|
||||
from dbtexmf.dblatex.grubber.msg import _, msg
|
||||
--- a/lib/dbtexmf/xslt/xslt.py
|
||||
+++ b/lib/dbtexmf/xslt/xslt.py
|
||||
@@ -2,7 +2,8 @@
|
||||
# Very simple plugin loader for Xslt classes
|
||||
#
|
||||
import os
|
||||
-import importlib
|
||||
+import importlib.machinery
|
||||
+import importlib.util
|
||||
import glob
|
||||
import sys
|
||||
|
||||
112
app-text/dblatex/files/python3.12-replace-imp-by-importlib.patch
Normal file
112
app-text/dblatex/files/python3.12-replace-imp-by-importlib.patch
Normal file
@@ -0,0 +1,112 @@
|
||||
Description: Python 3.12 compatibility: Replace imp by importlib
|
||||
Forwarded: https://sourceforge.net/p/dblatex/patches/12/
|
||||
Author: Miro Hrončok <mhroncok@redhat.com>
|
||||
Last-Update: 2023-06-15
|
||||
|
||||
--- a/lib/dbtexmf/core/dbtex.py
|
||||
+++ b/lib/dbtexmf/core/dbtex.py
|
||||
@@ -15,7 +15,7 @@
|
||||
except ImportError:
|
||||
from urllib.request import pathname2url
|
||||
import glob
|
||||
-import imp
|
||||
+import importlib
|
||||
from optparse import OptionParser
|
||||
from io import open
|
||||
|
||||
@@ -540,15 +540,14 @@
|
||||
|
||||
def load_plugin(self, pathname):
|
||||
moddir, modname = os.path.split(pathname)
|
||||
- try:
|
||||
- filemod, path, descr = imp.find_module(modname, [moddir])
|
||||
- except ImportError:
|
||||
- try:
|
||||
- filemod, path, descr = imp.find_module(modname)
|
||||
- except ImportError:
|
||||
- failed_exit("Error: '%s' module not found" % modname)
|
||||
- mod = imp.load_module(modname, filemod, path, descr)
|
||||
- filemod.close()
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname, [moddir])
|
||||
+ if not spec:
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname)
|
||||
+ if not spec:
|
||||
+ failed_exit("Error: '%s' module not found" % modname)
|
||||
+ mod = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(mod)
|
||||
+ sys.modules[modname] = mod
|
||||
return mod
|
||||
|
||||
def run_setup(self, options):
|
||||
--- a/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
+++ b/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
@@ -4,7 +4,7 @@
|
||||
Mechanisms to dynamically load extra modules to help the LaTeX compilation.
|
||||
All the modules must be derived from the TexModule class.
|
||||
"""
|
||||
-import imp
|
||||
+import importlib
|
||||
|
||||
from os.path import *
|
||||
from dbtexmf.dblatex.grubber.msg import _, msg
|
||||
@@ -108,17 +108,16 @@
|
||||
"""
|
||||
if name in self.modules:
|
||||
return 2
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(name, [""])
|
||||
- except ImportError:
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(name, [""])
|
||||
+ if not spec:
|
||||
if not self.path:
|
||||
return 0
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(name, self.path)
|
||||
- except ImportError:
|
||||
- return 0
|
||||
- module = imp.load_module(name, file, path, descr)
|
||||
- file.close()
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(name, self.path)
|
||||
+ if not spec:
|
||||
+ return 0
|
||||
+ module = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(module)
|
||||
+ sys.modules[name] = module
|
||||
self.modules[name] = module
|
||||
return 1
|
||||
|
||||
--- a/lib/dbtexmf/xslt/xslt.py
|
||||
+++ b/lib/dbtexmf/xslt/xslt.py
|
||||
@@ -2,20 +2,21 @@
|
||||
# Very simple plugin loader for Xslt classes
|
||||
#
|
||||
import os
|
||||
-import imp
|
||||
+import importlib
|
||||
import glob
|
||||
+import sys
|
||||
|
||||
def load(modname):
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(modname, [""])
|
||||
- except ImportError:
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(modname,
|
||||
- [os.path.dirname(__file__)])
|
||||
- except ImportError:
|
||||
- raise ValueError("Xslt '%s' not found" % modname)
|
||||
- mod = imp.load_module(modname, file, path, descr)
|
||||
- file.close()
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname, [""])
|
||||
+ if not spec:
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname,
|
||||
+ [os.path.dirname(__file__)])
|
||||
+ if not spec:
|
||||
+ raise ValueError("Xslt '%s' not found" % modname)
|
||||
+
|
||||
+ mod = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(mod)
|
||||
+ sys.modules[modname] = mod
|
||||
o = mod.Xslt()
|
||||
return o
|
||||
|
||||
23
app-text/dblatex/metadata.xml
Normal file
23
app-text/dblatex/metadata.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>zoltan@sinustrom.info</email>
|
||||
<name>Zoltan Puskas</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="inkscape">Use inkscape to convert SVG. Disable to use <pkg>gnome-base/librsvg</pkg> instead.</flag>
|
||||
</use>
|
||||
<longdescription>
|
||||
dbaltex is an opensource DocBook to LaTeX publishing software
|
||||
that originally started as DB2LaTeX clone, but now is more
|
||||
feature rich and easier to use.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">dblatex</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user