# -*- 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

PortSystem 1.0

name                    mit-scheme
epoch                   1
version                 12.1
revision                0
categories              lang
license                 {GPL-2+ OpenSSLException}
maintainers             {dports @drkp} 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                https://www.gnu.org/software/mit-scheme/
master_sites            gnu:${name}/stable.pkg/${version}/
distname                ${name}-${version}-svm1-64le

checksums               rmd160  304ef1f527184ef4f63f7a93162744e85efe4b29 \
                        sha256  2c5b5bf1f44c7c2458da79c0943e082ae37f1752c7d9d1ce0a61f7afcbf04304 \
                        size    88542947

depends_lib \
    port:xorg-libX11 \
    port:ncurses \
    path:lib/libssl.dylib:openssl

use_parallel_build      no

configure.ldflags-append \
    -Wl,-U,_arg_double \
    -Wl,-U,_arg_long \
    -Wl,-U,_arg_pointer \
    -Wl,-U,_arg_ulong \
    -Wl,-U,_block_signals \
    -Wl,-U,_callout_continue \
    -Wl,-U,_callout_lunseal \
    -Wl,-U,_callout_pop \
    -Wl,-U,_callout_seal \
    -Wl,-U,_callout_unseal \
    -Wl,-U,_check_number_of_args \
    -Wl,-U,_cstack_lpop \
    -Wl,-U,_cstack_push \
    -Wl,-U,_double_to_scm \
    -Wl,-U,_long_to_scm \
    -Wl,-U,_pointer_to_scm \
    -Wl,-U,_ulong_to_scm \
    -Wl,-U,_unblock_signals \
    -Wl,-U,_unspecific

destroot.cmd            ${build.cmd}
worksrcdir              ${name}-${version}/src

build.target
build.env               CC=${configure.cc} "CFLAGS=${configure.cflags} ${configure.cc_archflags}"

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