# -*- 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                gnucobol
version             3.2
revision            1
categories          lang
maintainers         nomaintainer
# Executables are GPL, libraries LGPL
license             {GPL-3+ LGPL-3+}
description         an open-source COBOL compiler
long_description    GnuCOBOL is a free COBOL compiler, formerly known \
                    as OpenCOBOL. It implements a substantial part of \
                    the COBOL 85, COBOL 2002 and COBOL 2014 standards, \
                    as well as many extensions included in other COBOL compilers.

homepage            https://gnucobol.sourceforge.io/

set branch          [join [lrange [split ${version} .] 0 1] "."]
master_sites        sourceforge:project/gnucobol/gnucobol/${branch}
use_xz              yes
checksums           rmd160  f1566472201790f01219820e94c4363dc016db25 \
                    sha256  3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2 \
                    size    2902828

depends_build-append \
                    port:gettext \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:db48 \
                    port:gettext-runtime \
                    port:gmp \
                    port:libcjson \
                    port:libxml2 \
                    port:ncurses

patchfiles          libxml2.patch

configure.args      --with-json=cjson
configure.cppflags-append -I${prefix}/include/db48
configure.ldflags-append  -L${prefix}/lib/db48

test.run            yes
test.env            TERM=xterm-256color
test.target         check
