# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 $Header: $ inherit latex-package DESCRIPTION="Offers syntax/railroad diagrams" HOMEPAGE="http://www.ctan.org/tex-archive/support/rail/" SRC_URI="http://mirror.ctan.org/support/${PN}.zip" LICENSE="LPPL-1.2" SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="doc" RDEPEND=">=app-text/texlive-2007" DEPEND="${RDEPEND} app-arch/unzip app-arch/bzip2" TEXMF="/usr/share/texmf-site" S=${WORKDIR}/${PN} src_compile() { # Build the rail tool emake || die "make failed" } src_install() { # Set texmf target folder insinto ${TEXMF}/tex/latex/${PN} # Install the package doins "${S}"/rail.sty # Install documentation if use doc ; then cd "${S}" latex-package_src_doinstall doc fi # FIXME: Install the rail tool mkdir -p ${D}/usr/bin cp rail ${D}/usr/bin/ # FIXME: Install the man page mv rail.man rail.1 bzip2 rail.1 mkdir -p ${D}/usr/share/man/man1 cp rail.1.bz2 ${D}/usr/share/man/man1/ }