*/*: Specify EAPI=0 explicitly, to ease greps
[gentoo.git] / dev-lang / bff / bff-1.0.3.1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=0
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="a brainfuck interpreter"
9 HOMEPAGE="http://swapped.cc/bf/"
10 SRC_URI="http://swapped.cc/bf/files/${P}.tar.gz
11         test? ( http://swapped.cc/bf/files/mandelbrot.b )"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="amd64 arm hppa ia64 m68k ppc ppc64 s390 sh x86"
16 IUSE="test"
17
18 DEPEND=""
19 RDEPEND=""
20
21 src_unpack() {
22         unpack ${P}.tar.gz
23         use test && cp "${DISTDIR}"/mandelbrot.b "${S}"/
24 }
25
26 src_compile() {
27         $(tc-getCC) -Wall ${CFLAGS} ${LDFLAGS} -o bff bff.c || die "compile failed"
28 }
29
30 src_test() {
31         ebegin "Running mandelbrot test"
32         ./bff mandelbrot.b > mandelbrot.out
33         eend $? || die
34         [[ $(md5sum mandelbrot.out) == "5024283fa65866ddd347b877798e84d8 "* ]] \
35                 && cat mandelbrot.out \
36                 || die "mandelbrot did not output correctly"
37 }
38
39 src_install() {
40         dobin bff || die
41         dodoc README
42 }