# $Id: Portfile 85511 2011-10-14 04:14:41Z dports@macports.org $

PortSystem 1.0

name            clisp
version         2.49
revision        1
categories      lang
maintainers     waqar easieste
platforms       darwin
license         GPL-2
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

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

universal_variant no
use_bzip2       yes
patchfiles      patch-src_lispbibl_d.diff
post-extract {
    file mkdir ${workpath}/home
}

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

configure.cflags
platform darwin 11 {
    configure.cflags-append -Wl,-no_pie
}
configure.cc-append  ${configure.cc_archflags}
configure.args      --with-libreadline-prefix=${prefix} \
                    --with-libsigsegv-prefix=${prefix} \
                    --with-libiconv-prefix=${prefix}

use_parallel_build  no
build.dir           ${worksrcpath}/src
build.env-append    HOME=${workpath}/home
build.env-delete    LD_PREBIND LD_PREBIND_ALLOW_OVERLAP
build.cmd           "ulimit -s 16384 && make"
build.target 

test.run            yes
test.target         check

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