diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-06 15:10:46 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-06 15:10:46 +0000 |
commit | ee8ad1509f726e8fa598472117e5bbffd241ebab (patch) | |
tree | 4ac9a10ae4694145a7287533143f85af923c1954 /app-text/linuxdoc-tools/linuxdoc-tools-0.9.82.ebuild | |
parent | 1fe7aef6facf013a94eac853717f4da4d5d3c5b3 (diff) |
gentoo auto-resync : 06:12:2022 - 15:10:45
Diffstat (limited to 'app-text/linuxdoc-tools/linuxdoc-tools-0.9.82.ebuild')
-rw-r--r-- | app-text/linuxdoc-tools/linuxdoc-tools-0.9.82.ebuild | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/app-text/linuxdoc-tools/linuxdoc-tools-0.9.82.ebuild b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.82.ebuild new file mode 100644 index 000000000000..b4403ab283ff --- /dev/null +++ b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.82.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools latex-package perl-functions sgml-catalog-r1 toolchain-funcs + +DESCRIPTION="A toolset for processing LinuxDoc DTD SGML files" +HOMEPAGE="https://gitlab.com/agmartin/linuxdoc-tools" +SRC_URI="https://gitlab.com/agmartin/linuxdoc-tools/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="GPL-3+ MIT SGMLUG" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86" +IUSE="doc" + +RDEPEND=" + || ( app-text/openjade app-text/opensp ) + app-text/sgml-common + dev-lang/perl:= + sys-apps/groff +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/awk + sys-devel/flex + doc? ( + dev-texlive/texlive-fontsrecommended + virtual/latex-base + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.82-configure-clang16.patch +) + +src_prepare() { + default + + # Pregenerated configure scripts fail. + eautoreconf +} + +src_configure() { + perl_set_version + tc-export CC + local myeconfargs=( + --disable-docs + --with-texdir="${TEXMF}/tex/latex/${PN}" + --with-perllibdir="${VENDOR_ARCH}" + --with-installed-iso-entities + ) + use doc && myeconfargs+=(--enable-docs="txt pdf html") + + econf "${myeconfargs[@]}" +} + +src_compile() { + # Prevent access violations from bitmap font files generation. + use doc && export VARTEXFONTS="${T}/fonts" + + default +} + +src_install() { + # Makefile ignores docdir configuration option. + emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}" install + dodoc ChangeLog README + + insinto /etc/sgml + newins - linuxdoc.cat <<-EOF + CATALOG "${EPREFIX}/usr/share/linuxdoc-tools/linuxdoc-tools.catalog" + EOF +} + +pkg_preinst() { + # work around sgml-catalog.eclass removing it + cp "${ED}"/etc/sgml/linuxdoc.cat "${T}" || die +} + +pkg_postinst() { + local backup=${T}/linuxdoc.cat + local real=${EROOT}/etc/sgml/linuxdoc.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die + fi + + latex-package_pkg_postinst + sgml-catalog-r1_pkg_postinst +} + +pkg_postrm() { + latex-package_pkg_postrm + sgml-catalog-r1_pkg_postrm +} |