bff-1.0.3.1.ebuild 905 B

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