# -*- 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 50705 2009-05-07 09:32:33Z ryandesign@macports.org $

PortSystem 1.0

name                    mit-scheme
version                 20080130
revision                2
categories              lang
platforms               darwin
maintainers             nomaintainer

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            http://ftp.gnu.org/gnu/mit-scheme/snapshot.pkg/${version}/
distname                ${name}-c-${version}
checksums               md5 75e11fcba96c9efd49cd283b43d6839a

depends_lib \
    port:xorg-libX11

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/edwin/techinfo.scm \
        ${worksrcpath}/src/lib/edwin/unix.scm \
        ${worksrcpath}/src/lib/include/configure \
        ${worksrcpath}/src/lib/include/option.c \
        ${worksrcpath}/src/microcode/configure \
        ${worksrcpath}/src/microcode/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

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

destroot.cmd            make

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