dev-util/catalyst: Drop PYTHON_COMPAT=python3_6
[gentoo.git] / dev-util / peg / peg-0.1.15-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Recursive-descent parser generators for C"
9 HOMEPAGE="http://piumarta.com/software/peg/"
10 SRC_URI="http://piumarta.com/software/${PN}/${P}.tar.gz"
11
12 LICENSE="MIT"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="test"
16
17 # FIXME: tests don't respect {C,LD}FLAGS and build stuff in runtime.
18 RESTRICT="test"
19
20 src_prepare() {
21         sed -i \
22                 -e '/strip/d' \
23                 -e '/^CFLAGS/d' \
24                 -e 's/$(CC) $(CFLAGS) -o/$(CC) $(CFLAGS) $(LDFLAGS) -o/g' \
25                         Makefile || die "sed failed"
26 }
27
28 src_compile() {
29         emake \
30                 CC="$(tc-getCC)" \
31                 CFLAGS="${CFLAGS}" \
32                 LDFLAGS="${LDFLAGS}"
33 }
34
35 src_install() {
36         dodir "/usr/bin"
37         emake -j1 \
38                 ROOT="${D}" \
39                 PREFIX="/usr" \
40                 install
41         rm -rf "${D}/usr/man" || die "rm failed"
42         doman src/${PN}.1
43 }
44
45 src_test() {
46         emake check
47         emake test
48 }