package.mask: Pre-mask PyPy 5.1.1 for testing
[gentoo.git] / dev-tex / detex / detex-2.8-r1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="A filter program that removes the LaTeX (or TeX) control sequences"
8 HOMEPAGE="http://www.cs.purdue.edu/homes/trinkle/detex/"
9 SRC_URI="http://www.cs.purdue.edu/homes/trinkle/detex/${P}.tar"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
14 IUSE=""
15
16 DEPEND="sys-devel/flex"
17 RDEPEND=""
18
19 src_unpack() {
20         unpack ${A}
21         cd "${S}"
22         epatch "${FILESDIR}/${P}-ldflags.patch"
23         sed -i \
24                 -e "s:CFLAGS    = -O \${DEFS}:CFLAGS    = ${CFLAGS} \${DEFS}:" \
25                 -e 's:LEX       = lex:#LEX      = lex:' \
26                 -e 's:#LEX      = flex:LEX      = flex:' \
27                 -e 's:#DEFS     += ${DEFS} -DNO_MALLOC_DECL:DEFS += -DNO_MALLOC_DECL:' \
28                 -e 's:LEXLIB    = -ll:LEXLIB    = -lfl:' \
29                 Makefile || die "sed failed"
30 }
31
32 src_compile() {
33         tc-export CC
34         emake || die "emake failed"
35 }
36
37 src_install() {
38         dobin detex || die
39         dodoc README
40         doman detex.1l
41 }