Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-tex/latex2html/
Date: Sun, 02 Jan 2022 09:25:46
Message-Id: 1641114886.e200c026b6df15a24440490151e4d70c9917944c.sam@gentoo
1 commit: e200c026b6df15a24440490151e4d70c9917944c
2 Author: Wade Cline <wadecline <AT> hotmail <DOT> com>
3 AuthorDate: Mon Nov 29 02:43:07 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 2 09:14:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e200c026
7
8 dev-tex/latex2html: Add 2022
9
10 Closes: https://bugs.gentoo.org/827817
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Wade Cline <wadecline <AT> hotmail.com>
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-tex/latex2html/Manifest | 1 +
16 dev-tex/latex2html/latex2html-2022.ebuild | 82 +++++++++++++++++++++++++++++++
17 2 files changed, 83 insertions(+)
18
19 diff --git a/dev-tex/latex2html/Manifest b/dev-tex/latex2html/Manifest
20 index 3b05b13e64fd..3b8664e5cbf0 100644
21 --- a/dev-tex/latex2html/Manifest
22 +++ b/dev-tex/latex2html/Manifest
23 @@ -1,2 +1,3 @@
24 DIST latex2html-2021.2.tar.gz 1139791 BLAKE2B 4fa9b45a33dbfb5c9e3bb45ebab19edb5d7a1d9c882ab30e75afbda7ad902cf519403b685f1f30b69b3d6ec976aa72b3065851b6d24b00c2e626e496ea8afd79 SHA512 b8d742b427e833f732457194cc60c043f750d202c46fb0d1d4e46df8e6d4dabacb5b474084aec46aa4eed68ee0249f3c0b053b5446401d09034e7f59148ad18a
25 DIST latex2html-2021.tar.gz 1130224 BLAKE2B c3775b2546a866834c0ed94362a428f2cfe48e8fe7337261993fe1f473350ddb778c50cc4393fe33c9f3829e5dc6f5c0ef43ae6a4c21481746023ef5939308da SHA512 f1f087a58911410b3ca9f4b60149b66d17608a9a56d0e8f74f08e6d6595e3e9c4f5378a7ab5cfc7488cd182a0dc3d4c151283b57636a70271c7f734e69ed0608
26 +DIST latex2html-2022.tar.gz 1140425 BLAKE2B fffe35d95c3934f428bf18833536a70b42fd12890d5b305976167b5957a0c370ac613d7d6fb675527d5b41ea25eb88bb982ec2a5e71c4d87ec559b1a8e781010 SHA512 a8b35868bc317e52614dc8d748e5d5334b81f068769aa8973b10708b2c8ac15129e2844f4fdb0def7ec14a9557257bb8962962280717b4d04c16ab9e760bb089
27
28 diff --git a/dev-tex/latex2html/latex2html-2022.ebuild b/dev-tex/latex2html/latex2html-2022.ebuild
29 new file mode 100644
30 index 000000000000..f377156d806f
31 --- /dev/null
32 +++ b/dev-tex/latex2html/latex2html-2022.ebuild
33 @@ -0,0 +1,82 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +DESCRIPTION="Convertor written in Perl that converts LaTeX documents to HTML"
40 +HOMEPAGE="https://www.latex2html.org/"
41 +SRC_URI="https://github.com/latex2html/latex2html/archive/v${PV}.tar.gz -> ${P}.tar.gz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
46 +IUSE="gif png svg"
47 +
48 +DEPEND="
49 + app-text/ghostscript-gpl
50 + virtual/latex-base
51 + >=media-libs/netpbm-10.86.24
52 + dev-lang/perl
53 + gif? ( media-libs/giflib )
54 + png? ( media-libs/libpng:0 )
55 + svg? ( app-text/poppler[cairo] )"
56 +RDEPEND="${DEPEND}"
57 +
58 +PATCHES=(
59 + "${FILESDIR}"/${PN}-2021.2-respect-DESTDIR.patch
60 +)
61 +
62 +src_prepare() {
63 + default
64 +
65 + sed -i -e 's%@PERL@%'"${EPREFIX}"'/usr/bin/perl%g' wrapper/unix.pin || die
66 +}
67 +
68 +src_configure() {
69 + local myconf
70 +
71 + use gif || use png || myconf+=" --disable-images"
72 +
73 + econf \
74 + --libdir="${EPREFIX}"/usr/$(get_libdir)/latex2html \
75 + --shlibdir="${EPREFIX}"/usr/$(get_libdir)/latex2html \
76 + --enable-pk \
77 + --enable-eps \
78 + --enable-reverse \
79 + --enable-pipes \
80 + --enable-paths \
81 + --enable-wrapper \
82 + --with-texpath="${EPREFIX}"/usr/share/texmf-site/tex/latex/html \
83 + --without-mktexlsr \
84 + $(use_enable gif) \
85 + $(use_enable png) \
86 + ${myconf}
87 +}
88 +
89 +src_install() {
90 + emake DESTDIR="${D}" install
91 +
92 + # make /usr/share/latex2html sticky
93 + keepdir /usr/share/latex2html
94 +
95 + # clean the perl scripts up to remove references to the sandbox
96 + local dir="${ED}/usr/$(get_libdir)/latex2html"
97 + if use png || use gif; then
98 + # pstoimg isn't built unless gif or png useflags are enabled
99 + sed -i -e "s:${T}:/tmp:g" "${dir}"/pstoimg.pl || die
100 + fi
101 +
102 + sed -i -e "s:${S}::g" "${dir}"/latex2html.pl || die
103 + sed -i -e "s:${T}:/tmp:g" "${dir}"/cfgcache.pm || die
104 + sed -i -e "s:${T}:/tmp:g" "${dir}"/l2hconf.pm || die
105 +
106 + dodoc BUGS Changes FAQ MANIFEST README.md TODO
107 +}
108 +
109 +pkg_postinst() {
110 + "${EROOT}"/usr/bin/mktexlsr
111 +}
112 +
113 +pkg_postrm() {
114 + "${EROOT}"/usr/bin/mktexlsr
115 +}