# -*- 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 103018 2013-02-12 03:25:46Z larryv@macports.org $

PortSystem          1.0

name                librep
version             0.92.3
categories          lang
platforms           darwin
maintainers         hilaiel.com:lloyd
license             GPL-2+

description         A shared library implementing a Lisp dialect

long_description    librep is a shared library implementing a Lisp \
                    dialect that is lightweight, reasonably fast, and \
                    highly extensible. It contains an interpreter, \
                    byte-code compiler and virtual machine. Applications \
                    may use the interpreter as an extension language, or \
                    it may be used for standalone scripts.

homepage            http://sawfish.wikia.com/wiki/Librep
master_sites        http://download.tuxfamily.org/librep/
use_xz              yes

patchfiles          patch-src-repint.h.diff

checksums           rmd160  dbbef7097c9a3f72c343f2e997bf2f337cd7233b \
                    sha256  45c98a5bbdfde4f1d98e3839b319d9ae15857d2d1ae8e3838d9a18d53f3e8b85

depends_build       port:pkgconfig

depends_lib         port:gdbm \
                    port:gmp \
                    port:libffi

configure.args      --without-readline

# Adding dependencies on GCC won't be necessary once r102932 is released.
variant gcc45 conflicts gcc46 gcc47 description {build with gcc45} {
    depends_lib-append      port:gcc45
    configure.compiler      macports-gcc-4.5
}

variant gcc46 conflicts gcc45 gcc47 description {build with gcc46} {
    depends_lib-append      port:gcc45
    configure.compiler      macports-gcc-4.5
}

variant gcc47 conflicts gcc45 gcc46 description {build with gcc47} {
    depends_lib-append      port:gcc47
    configure.compiler      macports-gcc-4.7
}

variant readline description {build with readline support} {
    depends_lib-append      port:readline
    configure.args-delete   --without-readline
    configure.args-append   --with-readline
}

# 10.3 and i386 are fine with the default 'stack-direction=-1' but 10.4
# ppc needs 1
platform darwin 8 powerpc {
    configure.args-append   --with-stack-direction=1
}
