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

name                mercury
version             22.01.8
revision            0
categories          lang
maintainers         nomaintainer
license             GPL-2 LGPL-2

description         The Mercury Programming Language
long_description    \
    Mercury is a new logic/functional programming \
    language, which combines the clarity and \
    expressiveness of declarative programming with \
    advanced static analysis and error detection \
    features. Its highly optimized execution \
    algorithm delivers efficiency far in excess of \
    existing logic programming systems, and close \
    to conventional programming systems. Mercury \
    addresses the problems of large-scale program \
    development, allowing modularity, separate \
    compilation, and numerous optimization/time \
    trade-offs.

homepage            https://www.mercurylang.org
master_sites        http://dl.mercurylang.org/release/

distname            ${name}-srcdist-${version}

checksums           rmd160  20270d3c08d70d588371f4960c991a6eefdf675e \
                    sha256  a097e8cc8eca0152ed9527c1caf73e5c9c83f6ada1d313a25b80fe79072fbad8 \
                    size    49189115

worksrcdir          ${name}-srcdist-${version}

depends_lib         port:readline

# cc1: warnings being treated as errors
# mercury_memory_zones.c: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
patchfiles-append   patch-no-werror.diff

# To build in parallel, pass:
# build.args        PARALLEL=-j${buildmakejobs}

destroot.args       INSTALL_INFO_DIR=${destroot}${prefix}/share/info \
                    INSTALL_MAN_DIR=${destroot}${prefix}/share/man

livecheck.url       http://dl.mercurylang.org/index.html
livecheck.type      regex
livecheck.regex     ${name}-srcdist-(\[0-9.\]+)${extract.suffix}