# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ ## TODO: MakeDoc.sh needs to be fixed to work nice with DESTDIR ## Right now, it assumes it's working with files on the live filesystem inherit eutils DESCRIPTION="A text formatting package based on SGML." HOMEPAGE=" http://packages.qa.debian.org/l/linuxdoc-tools" SRC_URI="http://http.us.debian.org/debian/pool/main/l/${PN}/${PN}_${PV}.tar.gz" LICENSE="SGMLUG" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="dev-java/jade sys-devel/flex app-text/sgml-common sys-apps/groff sys-apps/gawk app-text/tetex" src_unpack() { unpack ${A} cd ${S} # includes support for destdir epatch ${FILESDIR}/${PN}-0.9.21-destdir.patch # prevents a script from running that doesn't play nice with destdir # (doc/Makedoc.sh) yet epatch ${FILESDIR}/${PN}-0.9.21-nomakedoc.patch # Red Hat patches epatch ${FILESDIR}/${PN}-0.9.13-letter.patch epatch ${FILESDIR}/${PN}-0.9.20-strip.patch epatch ${FILESDIR}/${PN}-0.9.20-lib64.patch epatch ${FILESDIR}/${PN}-0.9.21-badif.patch } src_compile() { cd ${S} # gratituously borrowed from Fedora's spec file econf --with-installed-nsgmls --with-installed-iso-entities cd entity-map econf cd .. emake OPTIMIZE="${CFLAGS}" perl -pi -e 's,\$main::prefix/share/sgml/iso-entities-8879.1986/iso-entities.cat,/usr/share/sgml/sgml-iso-entities-8879.1986/catalog,' lib/LinuxDocTools.pm } src_install() { emake DESTDIR=${D} install }