# -*- 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                cbmbasic
epoch               1
version             1.0
revision            1
categories          lang
platforms           darwin freebsd linux
maintainers         nomaintainer
license             BSD

description         Commodore BASIC

long_description    This is a 100% compatible version of Commodore's version \
                    of Microsoft BASIC 6502 as found on the Commodore 64. You \
                    can use it in interactive mode or pass a BASIC file as a \
                    command line parameter.

homepage            http://cbmbasic.sourceforge.net/
master_sites        sourceforge:project/cbmbasic/cbmbasic/${version}/

checksums           md5     966cf93950809c3eace244af702cf895 \
                    sha1    54564daa7f28be98b03ae7dd1eece9e5439c95c3 \
                    rmd160  475f8223220dc8230f20109bbc86ae652aabff55 \
                    sha256  2735dedf3f9ad93fa947ad0fb7f54acd8e84ea61794d786776029c66faf64b04

extract.suffix      .tgz

patchfiles          patch-Makefile.diff

use_configure       no

variant universal {}
build.env           CC=${configure.cc} \
                    "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"

destroot {
    xinstall -m 755 ${worksrcpath}/cbmbasic ${destroot}${prefix}/bin

    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 ${worksrcpath}/README.txt ${destroot}${docdir}
}
