# $Id: Portfile 65834 2010-04-01 21:09:25Z jmr@macports.org $

PortSystem 1.0

name             gst
version          3.1
revision         2
categories       lang
maintainers      saispo
description      Free implementation of Smalltalk-80
long_description \
    GNU Smalltalk is a free implementation of the Smalltalk-80 language \
    which runs on most versions on Unix and, in general, everywhere you \
    can find a POSIX-compliance library. An uncommon feature of it is \
    that it is well-versed to scripting tasks and headless processing.
homepage         http://smalltalk.gnu.org/
platforms        darwin
master_sites     gnu:smalltalk
distname         smalltalk-${version}
checksums               sha1 9b1602bf29d1483d9200d83419dc3cd0fc0d397b

depends_build	 port:zip

depends_lib             port:libsigsegv \
                                port:libffi \
                                port:gmp \
                                port:libiconv \
                                port:ncurses \
                                port:ncursesw \
                                port:readline

patchfiles      04ac00a8.patch
patch.pre_args  -p1

configure.args  --infodir=${prefix}/share/info \
                                --mandir=${prefix}/share/man \
                                --enable-disassembler \
                                --enable-preemption \
                                --with-system-libffi --with-system-libsigsegv
                                # --enable-jit

test.run                yes
test.target             check

default_variants +gtk +tcltk

variant gtk {
        depends_lib-append port:gtk2
        configure.args-append --enable-gtk
}

variant tcltk {
        depends_lib-append port:tcl port:tk
        configure.args-append --with-tk --with-tcl
}

variant nox conflicts gtk conflicts tcltk {
        configure.args-append \
                --without-x \
                --disable-gtk \
                --without-tk \
                --without-tcl
}

livecheck.regex smalltalk-(\\d+(?:\\.\\d+)*)${extract.suffix}
