# $Id: Portfile 89690 2012-02-06 22:15:24Z jmr@macports.org $

PortSystem       1.0

name             bf2c
version          1.2.4
categories       lang
license          BSD
maintainers      nomaintainer
description      optimizing BrainF*ck to C compiler
long_description \
    BrainF*ck is a minimalistic but Turing complete programming language \
    devised by Urban Mueller. It is oriented around a tape, a read/write \
    head, an input device and an output device. This program converts \
    Brainf*ck source into C, while attempting to optimize.
homepage         http://rene-ladan.nl:8080/bf2c/
platforms        darwin
master_sites     ftp://rene-ladan.nl/pub/distfiles/
use_bzip2        yes
checksums        rmd160 9a959e5d8c079d4c56d4259d53145c63bdfd0417 \
                 sha256 be960be733b79492cb6de2c30297abcf9de68d0200c27f1a088c1b338f9a4f10

patchfiles       Makefile.patch

use_configure    no

build.env        CXX=${configure.cxx} \
                 CXXFLAGS="${configure.cxxflags} ${configure.cxx_archflags}"

destroot {
    xinstall ${worksrcpath}/bf2c ${destroot}${prefix}/bin
}

platform darwin {
    if {${os.major} < 11} {
        patchfiles-append   strndup.patch
    }
}
