# -*- 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
PortGroup                       legacysupport 1.1

github.setup                    AcademySoftwareFoundation imath 3.1.12 v
github.tarball_from             archive
revision                        0

checksums                       rmd160  c8ba063582077302524ac8b49431e73a79c9aa6c \
                                sha256  8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da \
                                size    604232

categories                      graphics
license                         BSD
maintainers                     {mcalhoun @MarcusCalhoun-Lopez} {mascguy @mascguy} openmaintainer

description                     OpenEXR Math Library
long_description                Imath is a basic, light-weight, and efficient C++ representation of \
                                2D and 3D vectors and matrices and other simple but useful \
                                mathematical objects, functions, and data types common in computer \
                                graphics applications, including the "half" 16-bit floating-point type. \
                                Imath also includes optional python bindings for all types and functions, \
                                including optimized implementations of vector and matrix arrays.

homepage                        https://www.openexr.com

# NOTE: legacysupport needed for 'CLOCK_MONOTONIC'

depends_build-append            port:pkgconfig

compiler.cxx_standard           2014

# avoid redownload after imath subport was split from openexr Portfile
dist_subdir                     openexr

# see https://trac.macports.org/ticket/67403
if { ${os.major} < 11 && ${cxx_stdlib} eq "libstdc++" } {
    configure.cxxflags-append   -D__STDC_FORMAT_MACROS
}

test.run                        yes
test.target                     test

# only allow numbers, to avoid pre-release versions
github.livecheck.regex          {([0-9.]+)}
