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

github.setup        wdas ptex 2.4.2 v
categories          graphics
license             BSD
maintainers         {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description         Per-face texture mapping for production rendering
long_description    Ptex is a texture mapping system developed by Walt Disney \
                    Animation Studios for production-quality rendering.

checksums           rmd160  3103dbb93d71fda58bcad2aa074c685fba273a9b \
                    sha256  c8235fb30c921cfb10848f4ea04d5b662ba46886c5e32ad5137c5086f3979ee1 \
                    size    312942
github.tarball_from archive

# CMakeLists.txt attempts to use git to determine version
configure.args-append -DPTEX_VER=${version}

# revert https://github.com/wdas/ptex/commit/1818ffc24c3049a9c26f796daf298bb9c1883839 on older systems
# see https://trac.macports.org/ticket/57495
if {${os.major} < 16} {
    patchfiles-append patch-lock.diff
}

depends_build-append \
                    port:pkgconfig \
                    path:bin/doxygen:doxygen

depends_lib-append  port:zlib
