summaryrefslogtreecommitdiff
path: root/dev-tex
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-15 22:00:32 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-15 22:00:32 +0100
commit4fe36de7142d972c061813e413f66ed4bcfc38d0 (patch)
treef95577c134cc26bf3d7223b38b8c76311d57fc12 /dev-tex
parent2e4d96d87e04d8b2164f764dee727cd9057cf88d (diff)
gentoo auto-resync : 15:10:2023 - 22:00:32
Diffstat (limited to 'dev-tex')
-rw-r--r--dev-tex/Manifest.gzbin6517 -> 6518 bytes
-rw-r--r--dev-tex/tex4ht/Manifest2
-rw-r--r--dev-tex/tex4ht/files/tex4ht-invalid-read.patch35
-rw-r--r--dev-tex/tex4ht/tex4ht-20090611_p1038_p20210603-r1.ebuild135
4 files changed, 172 insertions, 0 deletions
diff --git a/dev-tex/Manifest.gz b/dev-tex/Manifest.gz
index 4e156bec308d..4ac1716ed9e0 100644
--- a/dev-tex/Manifest.gz
+++ b/dev-tex/Manifest.gz
Binary files differ
diff --git a/dev-tex/tex4ht/Manifest b/dev-tex/tex4ht/Manifest
index 22206d4b8799..6375c5ac6457 100644
--- a/dev-tex/tex4ht/Manifest
+++ b/dev-tex/tex4ht/Manifest
@@ -1,6 +1,8 @@
AUX 50tex4ht.cnf 192 BLAKE2B 38a4543a22281d9b757e823e95cc8743a0c18b3fe7d6ce028317c8cea9305b7643e540171693ef70bdd364b6f6ff72daabc0baf66f32bb8ea526dcb0406fb065 SHA512 fec1a4ab9a3a493476a255001303c84a30fcf67873bd2639d177b414cf90880a149d31a68d6ce0dfd104b877bfc3fc2d39b1bb38a0f9d7c511bd311e0bfefc48
+AUX tex4ht-invalid-read.patch 873 BLAKE2B ab081ffd76e9c1108830e8df1dbd874173915e8af3f12385e4a65dfa63353eda1d5129fc793ac846bb1f759c88088471c8557427afe83e87ec709c52e3d51696 SHA512 b93de6b3f6919d0f3a831185bebc9dd5dc40f7e826165c0a904bb2cfc678ec8c9bc246b532f872fb9702eeb6e3020df537e9808cc3f88ecd16b203c425a10bfc
DIST tex4ht-1.0.2009_06_11_1038.tar.gz 2576719 BLAKE2B d04fd7b5f614414a200b01f11bea9880ea12561873fc08cb2f5f6f62167d6128cc50abbeeee0c7eae5d80046f6d3b504493d66262153c5a534fd1b56bfa1dfcd SHA512 868961c16da63ef20a8af3ec3e56a2b6c518a291cdbc3974f701773dbb55b844f0df06aae4c7b481c96b9e2ba29cb0f1ed1279b6f32340e4708e31bb67170963
DIST tex4ht-texlive-20210603.doc.tar.xz 136388 BLAKE2B d379e35b8fcd37243e2e1e9b4c378b78004774c530031ecbc0f10b99041a9f785d2317054d2f41181f41d29718d3dbbd7e9632541013eaeea6d54fcdb3568f3f SHA512 de7c2fb855010f62d8dc7dda39826a549aa38daf5acb9e89abf19cf26724db5ac25f362a490058a1456a056ee9954eaa52985b9a05dcb89d6a947474593a77cb
DIST tex4ht-texlive-20210603.tar.xz 908004 BLAKE2B bbc5ce16c10314120b998b5d2b527cf918c0991f47e6c7abe322dba62c1371a38f80ba971a971d756df548aa91d8c5b1f1f0ce3128a6dd33ac052ee465e0be99 SHA512 5a51db0b4cfacba33f9cd83b757d45f83c8470bb451a0376f328a1e78ffe39e5f22dcf2be6f9bed5724eed373ff020c8fa4aa38d9bf34bb45a05186e224e144e
+EBUILD tex4ht-20090611_p1038_p20210603-r1.ebuild 4004 BLAKE2B 54876661700ccf3f7f534e7d7614b7f1b52a6886f2c64750c17e78635e9c8226162faa22317b38237df7fb1972d8a350cdd66f2ab784399c2ed16194a0214742 SHA512 ff1893cc2d021b0922eea92452c135073bc1f3215c9eca499f38b290371f786bc3366121415bb679b9f8697ded8a8b9ee6f62ab7167a7283953a9757fd776b2a
EBUILD tex4ht-20090611_p1038_p20210603.ebuild 3946 BLAKE2B c7d1a24574cb15fea00dc711d151dda11389b675239c2dc0bb4066f4088062e56404cb944a24a06a0124475201cf6e8d61e99051e056d2121f6f208c0ba7ce43 SHA512 c079368b7d37a23a52597e7011dc09e97e27c219d95b7c234dba787e91db1d3b825ce0b02783e53f464322f8772ecf7bc4324b0bb1c4da31abb016eef624b3cc
MISC metadata.xml 318 BLAKE2B d251c52d26b8e0c8ffaabbaa611a605b968baefce88b6dc2baeb120bb6a2894dc74916eb3ecdb664e4154e40a179cd1aec2d56769412454d7443f67ca043db50 SHA512 0b83bae96a436d4a52046e3eea94409b1f3514865171cf7b063bea8cd987aacd90502a75a18cb48977b7396e0467c8864a1f61666bd7623ddc32819c9412d898
diff --git a/dev-tex/tex4ht/files/tex4ht-invalid-read.patch b/dev-tex/tex4ht/files/tex4ht-invalid-read.patch
new file mode 100644
index 000000000000..0b784f338d2c
--- /dev/null
+++ b/dev-tex/tex4ht/files/tex4ht-invalid-read.patch
@@ -0,0 +1,35 @@
+Avoid invalid read and uninitialized comparisons
+https://bugs.gentoo.org/915782
+https://puszcza.gnu.org.ua/bugs/?611
+
+This backports the following upstream commits:
+
+r1387
+Author: karl
+Date: Thu Oct 12 16:10:29 2023 UTC
+avoid negative index into font_tbl
+
+r1391
+Author: karl
+Date: Fri Oct 13 22:34:24 2023 UTC
+zero htf_4hf array to avoid uninitialized reads
+
+--- tex4ht-1.0.2009_06_11_1038/src/tex4ht.c
++++ tex4ht-1.0.2009_06_11_1038/src/tex4ht.c
+@@ -7039,6 +7039,7 @@
+
+ max_htf_4hf_n = 256;
+ htf_4hf = m_alloc(struct htf_4hf_rec, 256);
++memset (htf_4hf, 0, 256 * sizeof (struct htf_4hf_rec));
+
+
+
+@@ -8738,7 +8739,7 @@
+
+
+ if( span_on && !in_span_ch && !ignore_chs && !in_accenting
+- && (default_font != font_tbl[cur_fnt].num) ){
++ && cur_fnt >= 0 && (default_font != font_tbl[cur_fnt].num) ){
+ if( (ch < 137) && (ch !=
+ 132
+ ) ){
diff --git a/dev-tex/tex4ht/tex4ht-20090611_p1038_p20210603-r1.ebuild b/dev-tex/tex4ht/tex4ht-20090611_p1038_p20210603-r1.ebuild
new file mode 100644
index 000000000000..e703b4202c48
--- /dev/null
+++ b/dev-tex/tex4ht/tex4ht-20090611_p1038_p20210603-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit latex-package toolchain-funcs java-pkg-opt-2 flag-o-matic readme.gentoo-r1
+
+# tex4ht-20050331_p2350 -> tex4ht-1.0.2005_03_31_2350
+MY_P="${PN}-1.0.${PV:0:4}_${PV:4:2}_${PV:6:2}_$(ver_cut 3)"
+
+# from https://mirrors.ctan.org/systems/texlive/tlnet/archive/tex4ht.tar.xz
+MY_P_TEXLIVE="${PN}-texlive-$(ver_cut 5)"
+
+DESCRIPTION="Converts (La)TeX to (X)HTML, XML and OO.org"
+HOMEPAGE="
+ https://tug.org/tex4ht/
+ https://puszcza.gnu.org.ua/projects/tex4ht/
+"
+SRC_URI="http://www.cse.ohio-state.edu/~gurari/TeX4ht/fix/${MY_P}.tar.gz
+ https://dev.gentoo.org/~ulm/distfiles/${MY_P_TEXLIVE}.tar.xz
+ doc? ( https://dev.gentoo.org/~ulm/distfiles/${MY_P_TEXLIVE}.doc.tar.xz )"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LPPL-1.2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="doc java"
+
+RDEPEND="app-text/ghostscript-gpl
+ media-gfx/imagemagick
+ dev-libs/kpathsea
+ java? ( >=virtual/jre-1.8:* )"
+
+DEPEND="dev-libs/kpathsea
+ java? ( >=virtual/jdk-1.8:* )"
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${PN}-invalid-read.patch" )
+
+src_prepare() {
+ cp -a "${WORKDIR}/texmf-dist/"* texmf/ || die
+ default
+ cd "${S}/texmf/tex4ht/base/unix" || die
+ sed -i \
+ -e "s#~/tex4ht.dir#${EPREFIX}/usr/share#" \
+ -e "s#tpath/tex/texmf/fonts/tfm/!#t${EPREFIX}/usr/share/texmf-dist/fonts/tfm/!\nt${EPREFIX}/usr/local/share/texmf/fonts/tfm/!\nt${EPREFIX}/var/cache/fonts/tfm/!\nt${EPREFIX}${TEXMF}/fonts/tfm/!#" \
+ -e "s#%%~#${EPREFIX}${TEXMF}#g" \
+ -e "s#/usr/share/texmf/#${EPREFIX}${TEXMF}/#" \
+ tex4ht.env \
+ || die "sed of tex4ht.env failed"
+
+ einfo "Removing precompiled java stuff"
+ find "${S}" '(' -name '*.class' -o -name '*.jar' ')' -print -delete || die
+}
+
+src_compile() {
+ has_version '>=dev-libs/kpathsea-6.2.1' \
+ && append-cppflags "$($(tc-getPKG_CONFIG) --cflags kpathsea)"
+
+ cd "${S}/src" || die
+ einfo "Compiling postprocessor sources..."
+ for f in tex4ht t4ht; do
+ $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o $f $f.c \
+ -DENVFILE="\"${EPREFIX}${TEXMF}/tex4ht/base/tex4ht.env\"" \
+ -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea \
+ || die "Compiling $f failed"
+ done
+ if use java; then
+ einfo "Compiling java files..."
+ cd java || die
+ ejavac *.java */*.java */*/*.java -d ../../texmf/tex4ht/bin
+ cd "${S}/texmf/tex4ht/bin" || die
+ # Create the jar needed by oolatex
+ jar -cf "${S}/${PN}.jar" * || die "failed to create jar"
+ fi
+}
+
+src_install() {
+ # install the binaries
+ dobin "${S}/src/tex4ht" "${S}/src/t4ht"
+ # install the scripts
+ if ! use java; then
+ rm -f "${S}"/bin/unix/oo* || die
+ rm -f "${S}"/bin/unix/jh* || die
+ fi
+ dobin "${S}"/bin/unix/mk4ht
+
+ # install the .4ht scripts
+ insinto ${TEXMF}/tex/generic/tex4ht
+ doins "${S}"/texmf/tex/generic/tex4ht/*
+
+ if use doc; then
+ # install the documentation
+ insinto ${TEXMF}/doc/generic/tex4ht
+ doins "${S}"/texmf/doc/generic/tex4ht/*
+ fi
+
+ # install the special htf fonts
+ insinto ${TEXMF}/tex4ht
+ doins -r "${S}/texmf/tex4ht/ht-fonts"
+
+ if use java; then
+ # install the java files
+ doins -r "${S}/texmf/tex4ht/bin"
+ java-pkg_jarinto ${TEXMF}/tex4ht/bin
+ java-pkg_dojar "${S}/${PN}.jar"
+ fi
+
+ # install the .4xt files
+ doins -r "${S}/texmf/tex4ht/xtpipes"
+
+ # install the env file
+ insinto ${TEXMF}/tex4ht/base
+ newins "${S}/texmf/tex4ht/base/unix/tex4ht.env" tex4ht.env
+
+ insinto /etc/texmf/texmf.d
+ doins "${FILESDIR}/50tex4ht.cnf"
+
+ insinto ${TEXMF}/tex/generic/${PN}
+ insopts -m755
+ doins "${S}"/bin/ht/unix/*
+
+ local DOC_CONTENTS="In order to avoid collisions with multiple packages,
+ we are not installing the scripts in /usr/bin any more.
+ If you want to use, say, htlatex, you can use 'mk4ht htlatex file'."
+ use java || DOC_CONTENTS+="\n\nODF converters (oolatex & friends)
+ require the java use flag."
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ latex-package_pkg_postinst
+ readme.gentoo_print_elog
+}