# -*- 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
# $Id$

PortSystem 1.0
PortGroup  compiler_blacklist_versions 1.0

name                gauche
version             0.9.4
categories          lang
license             BSD
maintainers         nomaintainer
description         A script interpreter based on Scheme
long_description    Gauche is a script interpreter based on Scheme.  \
                    Gauche conforms the language standard 'Revised^5 \
                    Report on the Algorithmic Language Scheme' and \
                    supports various common libraries defined in SRFIs. \
                    The goal of Gauche is to provide a handy tool for \
                    programmers and system administrators to handle \
                    daily works conveniently and efficiently in the \
                    production environment.\
                    There are lots of Scheme implementations available, \
                    and each of them has its design emphasis and \
                    weeknesses.  Gauche is designed with emphasis on \
                    Quick startup, Multibyte strings, Modular \
                    development, Integrated object system, System \
                    interface and Enhanced I/O.
platforms           darwin
homepage            http://practical-scheme.net/gauche/
master_sites        sourceforge:project/gauche/Gauche/
distname            Gauche-${version}
extract.suffix      .tgz

checksums           rmd160  88f44c10badc4d4be463ee0c84a0b4065d53dc00 \
                    sha256  7b18bcd70beaced1e004594be46c8cff95795318f6f5830dd2a8a700410fc149

depends_lib         port:gdbm \
                    port:libiconv \
                    port:slib

patchfiles          patch-src-Makefile.in.diff

# `gosh` crashes when built with clang
compiler.blacklist  {clang < 300}

configure.args      --with-local=${prefix} --enable-multibyte=utf-8 \
                    --with-iconv=${prefix} --with-slib=${prefix}/lib/slib \
                    --enable-threads=pthreads --enable-ipv6

test.run            yes

destroot.target     slibcat-in-place install-pkg install-doc

universal_variant   no

variant euc_jp conflicts sjis no_multibyte { configure.args-delete --enable-multibyte=utf-8
                    configure.args-append --enable-multibyte=euc-jp }
variant sjis conflicts euc_jp no_multibyte { configure.args-delete --enable-multibyte=utf-8
                    configure.args-append --enable-multibyte=sjis }
variant no_multibyte conflicts euc_jp sjis { configure.args-delete --enable-multibyte=utf-8
                        configure.args-append --enable-multibyte=no }
variant no_iconv  { depends_lib-delete port:libiconv
                    configure.args-delete --with-iconv=${prefix} }
variant no_gdbm   { depends_lib-delete port:gdbm }
variant no_slib   { depends_lib-delete port:slib
                    configure.args-delete --with-slib=${prefix}/lib/slib }
variant no_threads   {  configure.args-delete --enable-threads=pthreads }
variant no_ipv6 {   configure.args-delete --enable-ipv6 }

livecheck.regex     /Gauche/Gauche-(\[0-9.\]+)${extract.suffix}