# -*- 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.2.0 v
github.tarball_from releases
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  9d8e5029d13519e71960b4ecb7a4090a619828c8 \
                    sha256  b795916d4cfed59240c5f44b1b507a8657efd28e62e72e134d03486e9f3e374a \
                    size    9151451

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
