# -*- 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.1 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  d31dc4b96a7c5dd82959199084924e4a7201fdf4 \
                    sha256  2e74952db7bc177f0c3602e2217a341ba677d733eec4cd7726418c3a4e1ef308 \
                    size    9584694

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
