# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils latex-package elisp-common MY_P=Hyperlatex-${PV} DESCRIPTION="Prepare documents for distribution as printed matter or as HTML" HOMEPAGE="http://hyperlatex.sourceforge.net/" SRC_URI="mirror://sourceforge/hyperlatex/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="virtual/emacs" RDEPEND="${DEPEND}" S=${WORKDIR}/${MY_P} src_prepare() { epatch "${FILESDIR}/${P}-gentoo.patch" } src_compile() { elisp-compile hlx/hyperlatex.el || die # build html documentation cd doc HYPERLATEX_SYS_DIR="${S}/hlx" "${S}/bin/hyperlatex" hyperlatex \ || die "build of html documentation failed" } src_install() { local f insinto /usr/share/${PN} doins -r hlx/*.hlx hlx/contrib bin/normalize-eps.awk doc/*.png \ || die "doins failed" latex-package_src_doinstall sty || die "latex-package_src_doinstall failed" elisp-install ${PN} hlx/hyperlatex.{el,elc} || die for f in hyperlatex.{el,elc}; do dosym ${SITELISP/#\/usr\/share/..}/${PN}/${f} /usr/share/${PN}/${f} \ || die "dosym failed" done dobin bin/hyperlatex bin/ps2image || die "dobin failed" dodoc README || die "dodoc failed" dohtml doc/html/*.html doc/*.png || die "dohtml failed" }