Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2019 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=7 |
5 |
|
6 |
inherit toolchain-funcs |
7 |
|
8 |
DESCRIPTION="A filter program that removes the LaTeX (or TeX) control sequences" |
9 |
HOMEPAGE="https://www.cs.purdue.edu/homes/trinkle/detex/" |
10 |
SRC_URI="https://www.cs.purdue.edu/homes/trinkle/detex/${P}.tar" |
11 |
|
12 |
LICENSE="BSD" |
13 |
SLOT="0" |
14 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
15 |
|
16 |
DEPEND="sys-devel/flex" |
17 |
|
18 |
PATCHES=( "${FILESDIR}/${P}-ldflags.patch" ) |
19 |
|
20 |
src_prepare() { |
21 |
tc-export CC |
22 |
default |
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_install() { |
33 |
dobin detex |
34 |
dodoc README |
35 |
doman detex.1l |
36 |
} |