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
master_sites        gnu

checksums           rmd160  6261b9b568695421148063a17e0dbf2983132062 \
                    sha256  2f62f2233bf022c23d01c920b1556aa13eab168e3236b13352ac5e9f18542bb0 \
                    size    2523433

depends_lib         port:libffi \
                    port:libtool

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}
}

build.cmd-prepend   CC=${configure.cc}

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
}
