# -*- 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: Portfile 84595 2011-09-28 19:12:54Z ryandesign@macports.org $

PortSystem 1.0

name                gauche
version             0.9.2
categories          lang scheme
maintainers         akitada openmaintainer
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  baa955627888f5d45de3dcbf8cfee5bdf0542dce \
                    sha256  16c9dfc9fa3f556f75d13e9b5a701f95e9f7749379e6d007a3a6dc561a625736

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

patchfiles          patch-src-Makefile.in.diff

configure.args      --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
                    --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}
