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

PortSystem          1.0
PortGroup           github 1.0

github.setup        cisco ChezScheme 10.4.0 v
revision            0
name                chez-scheme
categories          lang
license             Apache-2
maintainers         {makr @mohd-akram} \
                    openmaintainer

description         Chez Scheme

long_description    Chez Scheme is both a programming language and an \
                    implementation of that language, with supporting tools \
                    and documentation.

homepage            https://cisco.github.io/ChezScheme/

distname            csv${version}

checksums           rmd160  34abf405194656b394ed628fc307fc669ff355a6 \
                    sha256  54d0d19e4cd51878f88fb4b7ddb44079be6ca12bcf14163f8ea53cbcb4633385 \
                    size    9584467

depends_lib         port:zlib \
                    port:lz4 \
                    port:ncurses \
                    port:libiconv

post-patch {
    reinplace "s|/usr/X11R6/lib/libX11.dylib|${prefix}/lib/libX11.dylib|" \
        ${worksrcpath}/c/version.h
    reinplace "s|/usr/X11/bin/resize|${prefix}/bin/resize|" \
        ${worksrcpath}/c/expeditor.c
}

configure.pre_args  --installprefix=${prefix}
configure.args      --temproot=${destroot} \
                    --threads \
                    --libkernel \
                    LZ4=-llz4 \
                    ZLIB=-lz

build.target
