# -*- 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           cmake   1.1
PortGroup           github  1.0

github.setup        team-charls charls 2.4.4
github.tarball_from archive
revision            0
categories          graphics
maintainers         {vince @Veence} \
                    openmaintainer
description         CharLS is an implementation of JPEG-LS
long_description    CharLS implements JPEG-LS, a lossless JPEG codec.

license             BSD

checksums           rmd160  76e46d5f58ae2f2a0537fb3f6d0a35230a98995c \
                    sha256  fbd712903d61306ad00d5fa5029a9882630c7311ca487f48d2d76000956e8ff9 \
                    size    9495457

compiler.cxx_standard 2014
configure.args-append -DBUILD_SHARED_LIBS=ON

# https://trac.macports.org/ticket/60767
compiler.blacklist-append   {clang <= 700.1.81}

variant tests description "Enable testing" {
    # See: https://github.com/team-charls/charls/issues/281
    cmake.out_of_source no
    configure.args-append \
                    -DCHARLS_BUILD_TESTS=ON
    test.run        yes
    test.cmd        test/charlstest -unittest
    test.target
}
