PortSystem       1.0
PortGroup        github 1.0

github.setup     rene0 bf2c 1.3.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
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/bf2c/
checksums        rmd160 cb8b19c11c9e420977043337393825329f229110 \
                 sha256 7a67397874f5229b8a1dbf784c7082a90da552d08bd2d471a7febc25960b44e8

patchfiles          Makefile.patch \
                    c++11.patch

use_configure    no

build.env        CC=${configure.cc} CXX=${configure.cxx} \
                 "CFLAGS=${configure.cflags} ${configure.cc_archflags}" \
                 "CXXFLAGS=${configure.cxxflags} ${configure.cxx_archflags}"

destroot.env     PREFIX=${prefix}

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