# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils toolchain-funcs latex-package DESCRIPTION="Creates syntax diagrams in LaTeX" HOMEPAGE="http://www.ctan.org/tex-archive/help/Catalogue/entries/rail.html" SRC_URI="http://mirror.ctan.org/support/rail.zip" # License of the package. This must match the name of file(s) in # /usr/portage/licenses/. For complex license combination see the developer # docs on gentoo.org for details. LICENSE="public-domain" SLOT="0" KEYWORDS="~x86" IUSE="doc" RDEPEND="virtual/tex-base" DEPEND="${RDEPEND} >=sys-devel/flex-2.5.4a-r5 >=sys-devel/bison-1.875d >=sys-apps/findutils-4.1.20-r1" S=${WORKDIR}/${PN} src_compile() { emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -DYYSTYPE_IS_DECLARED" \ rail rail.sty rail.man || die "emake failed" if use doc; then make rail.dvi || die "make failed" dvips rail.dvi || die "dvips failed" fi } src_install() { latex-package_src_doinstall sty dobin rail newman rail.man rail.1 dodoc README README2e use doc && dodoc rail.dvi rail.ps }