# $Id: Portfile 74017 2010-12-02 15:35:45Z ryandesign@macports.org $

PortSystem 1.0

name            clisp
version         2.49
revision        1
categories      lang
maintainers     waqar easieste
platforms       darwin
description     The Clisp Common Lisp Implementation
long_description        \
                CLISP is a Common Lisp implementation by Bruno Haible, \
                formerly of Karlsruhe University, and Michael Stoll, \
                formerly of Munich University, both in Germany. \
                It mostly supports the Lisp described in the \
                ANSI Common Lisp standard. \
                CLISP includes an interpreter, a compiler, almost all \
                of CLOS, a foreign language interface and a socket interface. \
                An X11 interface is available through CLX and Garnet. \
                Command line editing is provided by readline.

homepage        http://clisp.cons.org/
master_sites    gnu:clisp/release/${version}    \
                sourceforge

checksums           md5     1962b99d5e530390ec3829236d168649 \
                    sha1    7e8d585ef8d0d6349ffe581d1ac08681e6e670d4 \
                    rmd160  bfb81abf942b07bbb8d83505f287d546b1bbdacc

use_bzip2       yes

universal_variant no

depends_lib     port:readline   \
                port:gettext    \
                port:libsigsegv

build.dir       ${worksrcpath}/src

# Force 32-bit, inline-asm
supported_archs ppc i386

configure.cflags
configure.args --prefix=${prefix} --with-libreadline-prefix=${prefix} \
               --with-libsigsegv-prefix=${prefix} --with-libiconv-prefix=${prefix}

configure {
    set cmdstring "CFLAGS='[join ${configure.cflags}]' \
                         CC='${configure.cc} -arch ${configure.build_arch}' \
                        ./configure [join ${configure.args}]"
    ui_debug "EXECUTING: $cmdstring"
    system "cd ${configure.dir} && $cmdstring"
}

build {
    set cmdstring "cd ${build.dir} && ulimit -s 16384 && \
                   unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && \
                   make"
    ui_debug "EXECUTING: $cmdstring"
    system $cmdstring
    set cmdstring "$cmdstring check"
    ui_debug "EXECUTING: $cmdstring"
    system $cmdstring
}

livecheck.type  regex
livecheck.url   http://ftp.gnu.org/gnu/${name}/release/?C=M&O=D
livecheck.regex >(\[0-9.\]+)/<
