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

# CLOCK_MONOTONIC
legacysupport.newest_darwin_requires_legacy 15

github.setup                    AcademySoftwareFoundation imath 3.2.2 v
revision                        0
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

checksums                       rmd160  5cc2ebd23fcf872aeaf2b9f5a9b0736a4573b50b \
                                sha256  b4275d83fb95521510e389b8d13af10298ed5bed1c8e13efd961d91b1105e462 \
                                size    689217
github.tarball_from             archive

depends_build-append            path:bin/pkg-config: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.]+)}
