# -*- 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.2 
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          graphics
maintainers         {vince @Veence}
description         CharLS is an implementation of JPEG-LS
long_description    CharLS implements JPEG-LS, a lossless JPEG codec.

license             BSD

checksums           rmd160  a0bba10cb3125795cf77fa95d8fd023fd336b713 \
                    sha256  17dd4d441c44d1d42e6785f2cfa7016de15a2d35f5cc1a2dcac85a121f927cbb \
                    size    9492542

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
}
