PortSystem          1.0

name                gforth
version             0.7.3
revision            3
categories          lang
license             GPL-3+
maintainers         nomaintainer

description         fast and portable implementation of the ANS Forth language
long_description \
    Gforth is a fast and portable implementation of the ANS Forth \
    language. It works nicely with the Emacs editor, offers some \
    nice features such as input completion and history and a \
    powerful locals facility, and it even has (the beginnings of) \
    a manual. Gforth employs traditional implementation \
    techniques: its inner interpreter is indirect or direct threaded.

homepage            https://www.gnu.org/software/gforth/
platforms           darwin
master_sites        gnu

checksums           md5     ff484391e5cdf405867fcf96341820ab \
                    sha1    4ef40d8427249b4367ac5e8965b55ca113c18baa

depends_lib         port:libtool \
                    port:libffi

patchfiles          patch-clang_bad_flags.diff

use_autoconf        yes

if {${configure.build_arch} eq "arm64"} {
# build system doesn't understand arm64
    configure.args-append --build=arm
} else {
    configure.args-append --build=${configure.build_arch}
}

test.run            yes
test.cmd            make
test.target         check bench

use_parallel_build  no
# See Cross-installation section of INSTALL doc
# Universal build seems impossible
universal_variant   no

post-destroot {
  file delete -force ${destroot}${prefix}/share/info/dir
}
