# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 68457 2010-06-03 21:58:05Z dports@macports.org $

PortSystem 1.0

name                    mit-scheme
epoch                   1
version                 9.0.1
categories              lang
platforms               darwin
maintainers             dports openmaintainer

description             MIT/GNU Scheme

long_description        MIT/GNU Scheme is an implementation of the \
                        Scheme programming language, providing an \
                        interpreter, compiler, source-code debugger, \
                        integrated Emacs-like editor, and a large \
                        runtime library. MIT/GNU Scheme is best suited \
                        to programming large applications with a rapid \
                        development cycle.

homepage                http://www.gnu.org/software/mit-scheme/
master_sites            gnu:${name}/stable.pkg/${version}/
distname                ${name}-c-${version}


checksums               md5     92884092806dd075f103cd1e9996413c \
                        sha1    92d710f3b301dec3551a5fbd12820c7b522eda39 \
                        rmd160  d49378373f5203bb5adf980ba3f821e281d80cc7

depends_lib \
    port:xorg-libX11 \
    port:ncurses

post-patch  {
    reinplace "s|/usr/local|${prefix}|g" \
        ${worksrcpath}/doc/configure \
        ${worksrcpath}/doc/ref-manual/os-interface.texi \
        ${worksrcpath}/doc/scheme.1 \
        ${worksrcpath}/doc/user-manual/user.texinfo \
        ${worksrcpath}/src/6001/edextra.scm \
        ${worksrcpath}/src/6001/floppy.scm \
        ${worksrcpath}/src/compiler/documentation/porting.guide \
        ${worksrcpath}/src/compiler/etc/disload.scm \
        ${worksrcpath}/src/configure \
        ${worksrcpath}/src/edwin/techinfo.scm \
        ${worksrcpath}/src/edwin/unix.scm \
        ${worksrcpath}/src/lib/include/configure \
        ${worksrcpath}/src/lib/include/option.c \
        ${worksrcpath}/src/README.txt \
        ${worksrcpath}/src/swat/c/tk3.2-custom/Makefile \
        ${worksrcpath}/src/swat/c/tk3.2-custom/tcl/Makefile \
        ${worksrcpath}/src/swat/scheme/other/btest.scm
}

use_configure           no

use_parallel_build      no

destroot.cmd            ${build.cmd}

build.dir               ${worksrcpath}/src
build.cmd               etc/make-liarc.sh
build.args              --prefix=${prefix}
build.target
build.env               CC=${configure.cc}

livecheck.url           http://ftp.gnu.org/gnu/${name}/stable.pkg/
livecheck.type          regex
livecheck.regex         {([0-9.]+)/}
