1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs
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 )"
15 KEYWORDS="amd64 arm hppa ia64 m68k ppc ppc64 s390 sh x86"
23 use test && cp "${DISTDIR}"/mandelbrot.b "${S}"/
27 $(tc-getCC) -Wall ${CFLAGS} ${LDFLAGS} -o bff bff.c || die "compile failed"
31 ebegin "Running mandelbrot test"
32 ./bff mandelbrot.b > mandelbrot.out
34 [[ $(md5sum mandelbrot.out) == "5024283fa65866ddd347b877798e84d8 "* ]] \
35 && cat mandelbrot.out \
36 || die "mandelbrot did not output correctly"