diff options
Diffstat (limited to 'dev-tex')
-rw-r--r-- | dev-tex/latex2html/Manifest | 1 | ||||
-rw-r--r-- | dev-tex/latex2html/latex2html-2022.ebuild | 82 |
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-tex/latex2html/Manifest b/dev-tex/latex2html/Manifest index 3b05b13e64fd..3b8664e5cbf0 100644 --- a/dev-tex/latex2html/Manifest +++ b/dev-tex/latex2html/Manifest @@ -1,2 +1,3 @@ DIST latex2html-2021.2.tar.gz 1139791 BLAKE2B 4fa9b45a33dbfb5c9e3bb45ebab19edb5d7a1d9c882ab30e75afbda7ad902cf519403b685f1f30b69b3d6ec976aa72b3065851b6d24b00c2e626e496ea8afd79 SHA512 b8d742b427e833f732457194cc60c043f750d202c46fb0d1d4e46df8e6d4dabacb5b474084aec46aa4eed68ee0249f3c0b053b5446401d09034e7f59148ad18a DIST latex2html-2021.tar.gz 1130224 BLAKE2B c3775b2546a866834c0ed94362a428f2cfe48e8fe7337261993fe1f473350ddb778c50cc4393fe33c9f3829e5dc6f5c0ef43ae6a4c21481746023ef5939308da SHA512 f1f087a58911410b3ca9f4b60149b66d17608a9a56d0e8f74f08e6d6595e3e9c4f5378a7ab5cfc7488cd182a0dc3d4c151283b57636a70271c7f734e69ed0608 +DIST latex2html-2022.tar.gz 1140425 BLAKE2B fffe35d95c3934f428bf18833536a70b42fd12890d5b305976167b5957a0c370ac613d7d6fb675527d5b41ea25eb88bb982ec2a5e71c4d87ec559b1a8e781010 SHA512 a8b35868bc317e52614dc8d748e5d5334b81f068769aa8973b10708b2c8ac15129e2844f4fdb0def7ec14a9557257bb8962962280717b4d04c16ab9e760bb089 diff --git a/dev-tex/latex2html/latex2html-2022.ebuild b/dev-tex/latex2html/latex2html-2022.ebuild new file mode 100644 index 000000000000..f377156d806f --- /dev/null +++ b/dev-tex/latex2html/latex2html-2022.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Convertor written in Perl that converts LaTeX documents to HTML" +HOMEPAGE="https://www.latex2html.org/" +SRC_URI="https://github.com/latex2html/latex2html/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +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" +IUSE="gif png svg" + +DEPEND=" + app-text/ghostscript-gpl + virtual/latex-base + >=media-libs/netpbm-10.86.24 + dev-lang/perl + gif? ( media-libs/giflib ) + png? ( media-libs/libpng:0 ) + svg? ( app-text/poppler[cairo] )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-2021.2-respect-DESTDIR.patch +) + +src_prepare() { + default + + sed -i -e 's%@PERL@%'"${EPREFIX}"'/usr/bin/perl%g' wrapper/unix.pin || die +} + +src_configure() { + local myconf + + use gif || use png || myconf+=" --disable-images" + + econf \ + --libdir="${EPREFIX}"/usr/$(get_libdir)/latex2html \ + --shlibdir="${EPREFIX}"/usr/$(get_libdir)/latex2html \ + --enable-pk \ + --enable-eps \ + --enable-reverse \ + --enable-pipes \ + --enable-paths \ + --enable-wrapper \ + --with-texpath="${EPREFIX}"/usr/share/texmf-site/tex/latex/html \ + --without-mktexlsr \ + $(use_enable gif) \ + $(use_enable png) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + # make /usr/share/latex2html sticky + keepdir /usr/share/latex2html + + # clean the perl scripts up to remove references to the sandbox + local dir="${ED}/usr/$(get_libdir)/latex2html" + if use png || use gif; then + # pstoimg isn't built unless gif or png useflags are enabled + sed -i -e "s:${T}:/tmp:g" "${dir}"/pstoimg.pl || die + fi + + sed -i -e "s:${S}::g" "${dir}"/latex2html.pl || die + sed -i -e "s:${T}:/tmp:g" "${dir}"/cfgcache.pm || die + sed -i -e "s:${T}:/tmp:g" "${dir}"/l2hconf.pm || die + + dodoc BUGS Changes FAQ MANIFEST README.md TODO +} + +pkg_postinst() { + "${EROOT}"/usr/bin/mktexlsr +} + +pkg_postrm() { + "${EROOT}"/usr/bin/mktexlsr +} |