# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                a60
version             0.23a

categories          lang
platforms           darwin
license             GPL-2
maintainers         nomaintainer

description         Algol 60 interpreter NASE A60
long_description \
    The Algol 60 interpreter NASE A60 is based on the \"Revised Report on \
    the Algorithmic Language Algol 60\".

homepage            https://www.bertnase.de/a60/
master_sites        ${homepage}

checksums           rmd160  83eab797bb2a584b17d2a36aeca99feb5490aea9 \
                    sha256  a84bf0c13192e3ae2300cb82aeadefaa31c5ecca784aff3b297a9dadc02dfcb4 \
                    size    1160801

patchfiles          patch-comm.h.diff \
                    patch-err.c.diff \
                    patch-check.c.diff \
                    patch-test_runtest.sh.diff \
                    patch-test_irnum.outp.diff \
                    patch-test_entier.outp.diff \
                    patch-Makefile.in.diff

configure.args      --prefix=${destroot}${prefix}

variant xa60 description {Add xa60 which is a simple X11 front end for a60} {
    depends_lib     port:xorg-libice \
                    port:xorg-libsm \
                    port:xorg-libX11 \
                    port:xorg-libXaw \
                    port:xorg-libXmu \
                    port:xorg-libXext \
                    port:xorg-libXt
    patchfiles-delete \
                    patch-Makefile.in.diff
    patchfiles-append \
                    patch-X11-Makefile.in.diff
    configure.args-append \
                    --x-includes=${prefix}/include \
                    --x-libraries=${prefix}/lib
}

universal_variant   no

test.run            yes

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ${name}-(\[a-z0-9.\]+)${extract.suffix}
