<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/7093165c3d21b7b0560e9a63d318facee728f3cf">https://github.com/macports/macports-ports/commit/7093165c3d21b7b0560e9a63d318facee728f3cf</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 7093165c3d2 materialx: new port
</span>7093165c3d2 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 7093165c3d21b7b0560e9a63d318facee728f3cf
</span>Author: Jason Liu <jasonliu--@users.noreply.github.com>
AuthorDate: Tue Sep 15 13:52:25 2020 -0400
<span style='display:block; white-space:pre;color:#404040;'> materialx: new port
</span>---
graphics/materialx/Portfile | 200 +++++++++++++++
.../files/old_appkit_compat/AppKit/AppKit.h | 273 +++++++++++++++++++++
.../files/patch-MaterialXTest-reference_impl.diff | 42 ++++
graphics/materialx/files/patch-python-paths.diff | 27 ++
.../files/patch-use-macports-nanogui.diff | 65 +++++
5 files changed, 607 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/materialx/Portfile b/graphics/materialx/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..427f0fdec7c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/materialx/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,200 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- 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
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup materialx MaterialX 1.37.1 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name materialx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories graphics
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license Apache-2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers @jasonliu-- openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.materialx.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description library for describing materials and textures in \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ computer graphics applications
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description MaterialX is an open standard specification and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ library API, developed at Lucasfilm and Industrial \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Light & Magic, for describing and transferring \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rich material and look-development content between \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ applications and renderers. MaterialX addresses \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the need for a common, open standard to represent \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the data values and relationships required to \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ transfer the complete look of a computer graphics \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ model from one application or rendering platform \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to another, including shading networks, patterns \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and texturing, complex nested materials, and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ geometric assignments.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 d5660800fbdaf4ad39ba3fd6f8d25bcbe5697512 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 8f4b46e74759006963fd54ee31da40e3444ae941272df798c157bc654688297c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 62615005
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.cxx_standard 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} < 16} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add AppKit wrapper header to compiler library paths
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cflags-prepend -isystem ${filespath}/old_appkit_compat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxxflags-prepend -isystem ${filespath}/old_appkit_compat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.objcflags-prepend -isystem ${filespath}/old_appkit_compat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.objcxxflags-prepend -isystem ${filespath}/old_appkit_compat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DMATERIALX_BUILD_TESTS=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MaterialX's build files puts files into a ${prefix}/cmake folder
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # during the build, and doesn't provide an easy way to re-target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the location. So we manually move the folder to a location that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # actually makes sense.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/share/cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/cmake \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/share/cmake/MaterialX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/share/cmake/Modules
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 644 {*}[glob ${worksrcpath}/cmake/modules/*] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/share/cmake/Modules
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MaterialX puts many output files into the resources/ and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libraries/ directories, which MaterialX's build files assume are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # located in ${CMAKE_INSTALL_PREFIX}. Since leaving these
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # directories as ${prefix}/resources and ${prefix}/libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # violates MacPorts' mtree layout, we move them to a location that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # actually makes sense.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mtlx_share_path ${destroot}${prefix}/share/MaterialX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists $mtlx_share_path]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d $mtlx_share_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dirs [list resources libraries]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach dir $dirs {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${destroot}${prefix}/$dir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/$dir $mtlx_share_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant viewer description {Build the MaterialX viewer} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:nanogui-wjakob
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-use-macports-nanogui.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "/Add default search paths/a\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\ mx::FilePath macportsSharePath = mx::FilePath(\"${prefix}/share/MaterialX\");\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\ searchPath.append(macportsSharePath);\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/source/MaterialXView/Main.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DMATERIALX_BUILD_VIEWER=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant oiio requires viewer \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description {Enable support for additional image formats in the MaterialX viewer} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:openimageio
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace {/External/s/^/#/} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/source/MaterialXRender/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DMATERIALX_BUILD_OIIO=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant docs description {Build documentation} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:doxygen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The CMake script that is supposed to generate the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # doxymentation is missing an 'ALL' argument in its
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # add_custom_target() command, which means that it never gets
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # executed during the MacPorts build process. So we add it here.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Reference:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://stackoverflow.com/questions/34878276/build-doxygen-from-cmake-script
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -E {s|(add_custom_target.MaterialXDocs)|\1 ALL|} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/documents/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # By default, MaterialX puts its generated doxymentation into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ${CMAKE_INSTALL_PREFIX}/documents. We change it so that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MaterialX places the doxymentation into a location that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # conforms with MacPorts' mtree layout.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -E {s|(CMAKE_INSTALL_PREFIX.*)documents|\1share/doc|} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/documents/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DMATERIALX_BUILD_DOCS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${destroot}${prefix}/share/doc/MaterialXDocs]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/share/doc/MaterialXDocs \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/share/doc/MaterialX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant tests description {Build unit tests} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MaterialX unit tests need to be able to call the Open Shading
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Language (OSL) compiler, which is an executable binary. However,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # OSL is not needed to build the unit tests, and MaterialX doesn't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # link to any libs from OSL; hence the reason for using depends_run.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append bin:oslc:osl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-MaterialXTest-reference_impl.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DMATERIALX_BUILD_TESTS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DMATERIALX_BUILD_TESTS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DMATERIALX_OSLC_EXECUTABLE=${prefix}/bin/oslc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DMATERIALX_TESTRENDER_EXECUTABLE=${prefix}/bin/testrender \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DMATERIALX_OSL_INCLUDE_PATH=${prefix}/share/OSL/shaders
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default_variants +viewer +oiio +docs +tests
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+### The following code was adapted from the portfiles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+### of ports such as openvdb and openimageio
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythons_suffixes {36 37 38}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythons_ports {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend pythons_ports python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set p python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set v [string index ${s} 0].[string index ${s} 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set i [lsearch -exact ${pythons_ports} ${p}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set c [lreplace ${pythons_ports} ${i} ${i}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant ${p} conflicts {*}${c} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description "Build the Python ${v} bindings (PyMaterialX)" {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset ${p}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note: We basically need to import the value of ${v}, otherwise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # all foreach iterations will end up with the same value of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ${v}! This appears to be related to how Tcl does scoping.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set selected_v ${v}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:${p} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:pybind11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-python-paths.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DMATERIALX_BUILD_PYTHON=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DMATERIALX_PYTHON_VERSION=$selected_v \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DPYTHON_INSTALL_PREFIX=${destroot}${frameworks_dir}/Python.framework/Versions/$selected_v/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MaterialX insists on outputting all Python-related
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # products into the ${CMAKE_INSTALL_PREFIX}/python
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # directory. Since leaving this directory as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ${prefix}/python violates MacPorts' mtree layout, we move
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # its contents to a location that actually makes sense.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${destroot}${prefix}/python/MaterialX]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach so [glob ${destroot}${prefix}/python/MaterialX/*.so] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move $so ${destroot}${prefix}/lib/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set remaining_files \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -nocomplain ${destroot}${prefix}/python/MaterialX/*]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[llength $remaining_files] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}${prefix}/python
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/materialx/files/old_appkit_compat/AppKit/AppKit.h b/graphics/materialx/files/old_appkit_compat/AppKit/AppKit.h
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..634e0575340
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/materialx/files/old_appkit_compat/AppKit/AppKit.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,273 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Copyright (c) 2020 Jason Liu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Permission to use, copy, modify, and distribute this software for any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * purpose with or without fee is hereby granted, provided that the above
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * copyright notice and this permission notice appear in all copies.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef _MACPORTS_APPKIT_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define _MACPORTS_APPKIT_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Compatibility mapping for old versions of AppKit. By using the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * mapping in this file, we can still compile newer versions of software
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * using older versions of Mac OS X.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Many AppKit enum constants were deprecated/renamed in macOS 10.12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Sierra in order to make naming more consistent. The directives in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * this wrapper file replace the old enum names in the system AppKit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * header files with the new ones, so that code that has been written
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * for newer versions of AppKit will still be able to be compiled on a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * system with a pre-10.12 AppKit SDK.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * References:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * https://stackoverflow.com/a/44322273
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00358.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * https://github.com/qemu/qemu/commit/4ba967ad7454c08d7e01b047d34d0c3d98f2a10d#diff-1fdc5419bda303ee3f720fb8ccdab2c3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * https://patchwork.kernel.org/patch/9697563/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Note that in the references cited above, the #define directives map
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * the new enum names to the old names. This is because their directives
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * are located in their own applications' source code files. However,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * our wrapper file performs the mapping in the opposite direction, and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * replaces the old enum names with the new names. This is because our
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * file is patching the system AppKit header, instead of changing the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * application's source code to conform to an old system AppKit header.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Also, note that our file only fixes the Objective-C header file. It
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * does not affect the bridge metadata file (a.k.a. bridge support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * file), so any software that uses RubyCocoa or PyObjC to access AppKit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * will likely still be broken. This is despite the fact that gathering
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * the list of enum names in our wrapper file was done by comparing the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * bridge metadata files taken from a macOS 10.11 and 10.12 machine,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * located at
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * /System/Library/Frameworks/AppKit.framework/Resources/BridgeSupport/AppKit.bridgesupport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Theoretically, you could use the 'gen_bridge_metadata' command to try
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * to generate a new bridge support file, but this would only work if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * you went through and actually replaced the old enum names in ALL of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * AppKit's header files (not just AppKit.h, which is simply a top-level
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * header that #includes a bunch of other headers), and our wrapper
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * would not help in this regard. In addition, it's probably not a good
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * idea to be using the 'gen_bridge_metadata' tool to replace the bridge
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * support file in a system framework; it is really intended to be used
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * by software authors who want to provide bridge support for RubyCocoa
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * and PyObjC in frameworks generated by their own projects. In the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * future, if someone tries to create a MacPorts package for some piece
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * of software that does use RubyCocoa or PyObjC to access AppKit, then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * a different sort of solution than this wrapper file may be needed for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * that scenario.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * References:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/RubyPythonCocoa/Articles/GenerateFrameworkMetadata.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * https://bugs.eclipse.org/bugs/show_bug.cgi?id=502090
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * * Execute 'man gen_bridge_metadata' in a terminal window.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/********************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * IMPORTANT NOTE *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * This wrapper file is currently being used by two ports: Blender *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * and MaterialX. This file will eventually be added to the *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * MacPorts legacy support package. After it gets added, we will be *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * able to remove this file from the ports and simply add the *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * MacPorts legacy support package as a dependency in the portfiles *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * for Blender and MaterialX. *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ********************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Note: A small number of the #defines below are commented out because
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * they cause compile errors when building Blender. MaterialX doesn't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * use them in its source, so they can be safely commented out without
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * causing any ill effects.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NS16BitBigEndianBitmapFormat NSBitmapFormatSixteenBitBigEndian
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NS16BitLittleEndianBitmapFormat NSBitmapFormatSixteenBitLittleEndian
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NS32BitBigEndianBitmapFormat NSBitmapFormatThirtyTwoBitBigEndian
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NS32BitLittleEndianBitmapFormat NSBitmapFormatThirtyTwoBitLittleEndian
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSAlphaFirstBitmapFormat NSBitmapFormatAlphaFirst
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSAlphaNonpremultipliedBitmapFormat NSBitmapFormatAlphaNonpremultiplied
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSAlternateKeyMask NSEventModifierFlagOption
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSAnyEventMask NSEventMaskAny
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSAppKitDefined NSEventTypeAppKitDefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSAppKitDefinedMask NSEventMaskAppKitDefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSApplicationActivatedEventType NSEventSubtypeApplicationActivated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSApplicationDeactivatedEventType NSEventSubtypeApplicationDeactivated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSApplicationDefined NSEventTypeApplicationDefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSApplicationDefinedMask NSEventMaskApplicationDefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSBMPFileType NSBitmapImageFileTypeBMP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSBorderlessWindowMask NSWindowStyleMaskBorderless
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCMYKColorSpaceModel NSColorSpaceModelCMYK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCMYKModeColorPanel NSColorPanelModeCMYK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSCenterTextAlignment NSTextAlignmentCenter */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCircularBezelStyle NSBezelStyleCircular
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCircularSlider NSSliderTypeCircular
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSClosableWindowMask NSWindowStyleMaskClosable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSColorListModeColorPanel NSColorPanelModeColorList
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCommandKeyMask NSEventModifierFlagCommand
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeClear NSCompositingOperationClear
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeCopy NSCompositingOperationCopy
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeDestinationAtop NSCompositingOperationDestinationAtop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeDestinationIn NSCompositingOperationDestinationIn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeDestinationOut NSCompositingOperationDestinationOut
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeDestinationOver NSCompositingOperationDestinationOver
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeHighlight NSCompositingOperationHighlight
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositePlusDarker NSCompositingOperationPlusDarker
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeSourceAtop NSCompositingOperationSourceAtop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeSourceIn NSCompositingOperationSourceIn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeSourceOut NSCompositingOperationSourceOut
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeSourceOver NSCompositingOperationSourceOver
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCompositeXOR NSCompositingOperationXOR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSControlKeyMask NSEventModifierFlagControl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCrayonModeColorPanel NSColorPanelModeCrayon
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCriticalAlertStyle NSAlertStyleCritical
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCursorPointingDevice NSPointingDeviceTypeCursor
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCursorUpdate NSEventTypeCursorUpdate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCursorUpdateMask NSEventMaskCursorUpdate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSCustomPaletteModeColorPanel NSColorPanelModeCustomPalette
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSDefaultTokenStyle NSTokenStyleDefault */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSDeviceIndependentModifierFlagsMask NSEventModifierFlagDeviceIndependentFlagsMask
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSDeviceNColorSpaceModel NSColorSpaceModelDeviceN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSDisclosureBezelStyle NSBezelStyleDisclosure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSDocModalWindowMask NSWindowStyleMaskDocModalWindow
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSEraserPointingDevice NSPointingDeviceTypeEraser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSFlagsChanged NSEventTypeFlagsChanged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSFlagsChangedMask NSEventMaskFlagsChanged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSFloatingPointSamplesBitmapFormat NSBitmapFormatFloatingPointSamples
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSFullScreenWindowMask NSWindowStyleMaskFullScreen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSFullSizeContentViewWindowMask NSWindowStyleMaskFullSizeContentView
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSFunctionKeyMask NSEventModifierFlagFunction
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSGIFFileType NSBitmapImageFileTypeGIF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSGrayColorSpaceModel NSColorSpaceModelGray
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSGrayModeColorPanel NSColorPanelModeGray
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSHSBModeColorPanel NSColorPanelModeHSB
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSHUDWindowMask NSWindowStyleMaskHUDWindow
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSHelpButtonBezelStyle NSBezelStyleHelpButton
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSHelpKeyMask NSEventModifierFlagHelp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSIndexedColorSpaceModel NSColorSpaceModelIndexed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSInformationalAlertStyle NSAlertStyleInformational
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSInlineBezelStyle NSBezelStyleInline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSJPEG2000FileType NSBitmapImageFileTypeJPEG2000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSJPEGFileType NSBitmapImageFileTypeJPEG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSJustifiedTextAlignment NSTextAlignmentJustified */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSKeyDown NSEventTypeKeyDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSKeyDownMask NSEventMaskKeyDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSKeyUp NSEventTypeKeyUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSKeyUpMask NSEventMaskKeyUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLABColorSpaceModel NSColorSpaceModelLAB
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLeftMouseDown NSEventTypeLeftMouseDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLeftMouseDownMask NSEventMaskLeftMouseDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLeftMouseDragged NSEventTypeLeftMouseDragged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLeftMouseDraggedMask NSEventMaskLeftMouseDragged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLeftMouseUp NSEventTypeLeftMouseUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLeftMouseUpMask NSEventMaskLeftMouseUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSLeftTextAlignment NSTextAlignmentLeft */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSLinearSlider NSSliderTypeLinear
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMiniControlSize NSControlSizeMini
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMiniaturizableWindowMask NSWindowStyleMaskMiniaturizable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSMomentaryPushButton NSMomentaryLightButton */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseEntered NSEventTypeMouseEntered
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseEnteredMask NSEventMaskMouseEntered
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseEventSubtype NSEventSubtypeMouseEvent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseExited NSEventTypeMouseExited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseExitedMask NSEventMaskMouseExited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseMoved NSEventTypeMouseMoved
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSMouseMovedMask NSEventMaskMouseMoved
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSNaturalTextAlignment NSTextAlignmentNatural */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSNoModeColorPanel NSColorPanelModeNone
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSNonactivatingPanelMask NSWindowStyleMaskNonactivatingPanel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSNumericPadKeyMask NSEventModifierFlagNumericPad
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSOtherMouseDown NSEventTypeOtherMouseDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSOtherMouseDownMask NSEventMaskOtherMouseDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSOtherMouseDragged NSEventTypeOtherMouseDragged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSOtherMouseDraggedMask NSEventMaskOtherMouseDragged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSOtherMouseUp NSEventTypeOtherMouseUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSOtherMouseUpMask NSEventMaskOtherMouseUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPNGFileType NSBitmapImageFileTypePNG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPatternColorSpaceModel NSColorSpaceModelPatterned
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPenLowerSideMask NSEventButtonMaskPenLowerSide
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPenPointingDevice NSPointingDeviceTypePen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPenTipMask NSEventButtonMaskPenTip
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPenUpperSideMask NSEventButtonMaskPenUpperSide
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPeriodic NSEventTypePeriodic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSPowerOffEventType NSEventSubtypePowerOff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRGBColorSpaceModel NSColorSpaceModelRGB
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRGBModeColorPanel NSColorPanelModeRGB
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRecessedBezelStyle NSBezelStyleRecessed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRegularControlSize NSControlSizeRegular
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRegularSquareBezelStyle NSBezelStyleRegularSquare
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSResizableWindowMask NSWindowStyleMaskResizable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRightMouseDown NSEventTypeRightMouseDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRightMouseDownMask NSEventMaskRightMouseDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRightMouseDragged NSEventTypeRightMouseDragged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRightMouseDraggedMask NSEventMaskRightMouseDragged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRightMouseUp NSEventTypeRightMouseUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRightMouseUpMask NSEventMaskRightMouseUp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSRightTextAlignment NSTextAlignmentRight */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRoundRectBezelStyle NSBezelStyleRoundRect
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRoundedBezelStyle NSBezelStyleRounded
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSRoundedDisclosureBezelStyle NSBezelStyleRoundedDisclosure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* #define NSRoundedTokenStyle NSTokenStyleRounded */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSScreenChangedEventType NSEventSubtypeScreenChanged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSScrollWheel NSEventTypeScrollWheel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSShadowlessSquareBezelStyle NSBezelStyleShadowlessSquare
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSShiftKeyMask NSEventModifierFlagShift
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSSmallControlSize NSControlSizeSmall
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSSmallSquareBezelStyle NSBezelStyleSmallSquare
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSSystemDefined NSEventTypeSystemDefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSSystemDefinedMask NSEventMaskSystemDefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTIFFFileType NSBitmapImageFileTypeTIFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTabletPoint NSEventTypeTabletPoint
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTabletPointEventSubtype NSEventSubtypeTabletPoint
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTabletPointMask NSEventMaskTabletPoint
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTabletProximity NSEventTypeTabletProximity
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTabletProximityEventSubtype NSEventSubtypeTabletProximity
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTabletProximityMask NSEventMaskTabletProximity
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTexturedBackgroundWindowMask NSWindowStyleMaskTexturedBackground
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTexturedRoundedBezelStyle NSBezelStyleTexturedRounded
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTexturedSquareBezelStyle NSBezelStyleTexturedSquare
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTickMarkAbove NSTickMarkPositionAbove
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTickMarkBelow NSTickMarkPositionBelow
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTickMarkLeft NSTickMarkPositionLeading
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTickMarkRight NSTickMarkPositionTrailing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTitledWindowMask NSWindowStyleMaskTitled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSTouchEventSubtype NSEventSubtypeTouch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSUnifiedTitleAndToolbarWindowMask NSWindowStyleMaskUnifiedTitleAndToolbar
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSUnknownColorSpaceModel NSColorSpaceModelUnknown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSUnknownPointingDevice NSPointingDeviceTypeUnknown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSUtilityWindowMask NSWindowStyleMaskUtilityWindow
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSWarningAlertStyle NSAlertStyleWarning
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSWheelModeColorPanel NSColorPanelModeWheel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSWindowExposedEventType NSEventSubtypeWindowExposed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSWindowMovedEventType NSEventSubtypeWindowMoved
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * New enum: NSWindowStyleMask is an enumerated type that was introduced
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * starting in macOS 10.12; there is no pre-existing equivalent enum
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * type in macOS 10.11 and earlier. However, since this enum's typedef
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * is essentially equivalent to that of an unsigned integer, we can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * substitute NSUInteger in older versions of macOS and things should
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * still work.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Reference: https://developer.apple.com/documentation/appkit/nswindowstylemask
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define NSWindowStyleMask NSUInteger
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Include the primary system AppKit.h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include_next <AppKit/AppKit.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* _MACPORTS_APPKIT_H_ */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/materialx/files/patch-MaterialXTest-reference_impl.diff b/graphics/materialx/files/patch-MaterialXTest-reference_impl.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..8f1531e9d5a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/materialx/files/patch-MaterialXTest-reference_impl.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,42 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- source/MaterialXTest/CMakeLists.txt.orig 2020-06-04 18:21:04.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ source/MaterialXTest/CMakeLists.txt 2020-08-05 13:30:45.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -72,15 +72,34 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # TODO: Only do this stuff when it's relevant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Hoist the generation of the reference OSL implementation into the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# pre-link portion of the CMake build, instead of waiting until after
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# the build completes by using the install() commands (see comment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# below).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++add_custom_command(TARGET MaterialXTest PRE_LINK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ COMMAND ${CMAKE_COMMAND} -E make_directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/stdlib/reference/osl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++add_custom_command(TARGET MaterialXTest PRE_LINK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ COMMAND ${CMAKE_COMMAND} -E copy
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/stdlib/osl/*.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/stdlib/reference/osl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_custom_command(TARGET MaterialXTest POST_BUILD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ COMMAND ${CMAKE_COMMAND} -E copy_directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${CMAKE_CURRENT_SOURCE_DIR}/../../libraries ${CMAKE_CURRENT_BINARY_DIR}/libraries)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-install(DIRECTORY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libraries/stdlib/reference/osl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/stdlib/osl/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libraries/stdlib/reference/osl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- FILES_MATCHING PATTERN "*.h")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# These lines have been removed because they occur way too late. During
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# the MacPorts build process, they get added/copied after the build/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# directory has already been deleted by the MacPorts build system (which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# typically occurs at the end of the build phase). This somehow causes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# them to get generated in a build/ directory inside the destroot tree,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# which results in the files getting placed into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# ${destroot}${worksrcpath}/build/libraries, which is not what we want.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#install(DIRECTORY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libraries/stdlib/reference/osl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/stdlib/osl/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libraries/stdlib/reference/osl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# FILES_MATCHING PATTERN "*.h")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_custom_command(TARGET MaterialXTest POST_BUILD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ COMMAND ${CMAKE_COMMAND} -E copy_directory
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/materialx/files/patch-python-paths.diff b/graphics/materialx/files/patch-python-paths.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..05437c5bf13
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/materialx/files/patch-python-paths.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,27 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- python/CMakeLists.txt.orig 2020-06-04 18:21:04.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ python/CMakeLists.txt 2020-08-06 12:27:22.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,20 +1,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(SETUP_PY "${CMAKE_INSTALL_PREFIX}/python/setup.py")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure_file(${SETUP_PY_IN} ${SETUP_PY})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_custom_command(OUTPUT ${SETUP_PY}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ COMMAND ${PYTHON} ${SETUP_PY} build)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/MaterialX" DESTINATION "${CMAKE_INSTALL_PREFIX}/python" MESSAGE_NEVER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/MaterialX" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python${MATERIALX_PYTHON_VERSION}/site-packages" MESSAGE_NEVER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(MATERIALX_PYTHON_OCIO_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(NOT EXISTS "${MATERIALX_PYTHON_OCIO_DIR}/config.ocio")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ message(WARNING "No file named config.ocio was found in the given OCIO directory.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- install(DIRECTORY "${MATERIALX_PYTHON_OCIO_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/python/MaterialX/config/" MESSAGE_NEVER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ install(DIRECTORY "${MATERIALX_PYTHON_OCIO_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python${MATERIALX_PYTHON_VERSION}/site-packages/MaterialX/config/" MESSAGE_NEVER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(MATERIALX_INSTALL_PYTHON AND PYTHON_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install)" MESSAGE_NEVER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} --no-user-cfg install --prefix=${PYTHON_INSTALL_PREFIX})" MESSAGE_NEVER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/materialx/files/patch-use-macports-nanogui.diff b/graphics/materialx/files/patch-use-macports-nanogui.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c38e5a3d395
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/materialx/files/patch-use-macports-nanogui.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,65 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- source/MaterialXView/CMakeLists.txt.orig 2020-06-04 18:21:04.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ source/MaterialXView/CMakeLists.txt 2020-09-01 15:07:36.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,38 +1,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/NanoGUI/ext/glfw/src")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- message(FATAL_ERROR "Building the MaterialX viewer requires the NanoGUI submodule "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "to be present. Update your repository by calling the following:\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "git submodule update --init --recursive")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file(GLOB materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file(GLOB materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(NANOGUI_BUILD_EXAMPLE OFF CACHE BOOL " " FORCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(NANOGUI_BUILD_SHARED OFF CACHE BOOL " " FORCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(NANOGUI_BUILD_PYTHON OFF CACHE BOOL " " FORCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(NANOGUI_INSTALL OFF CACHE BOOL " " FORCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# Locally disable additional warnings for NanoGUI and its dependencies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(PREV_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(PREV_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if(MSVC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- add_compile_options(-wd4389 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -DEIGEN_DONT_VECTORIZE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-elseif(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- add_compile_options(-Wno-objc-multiple-method-names -DGL_SILENCE_DEPRECATION)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-elseif(UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- add_compile_options(-Wno-format-truncation -Wno-implicit-fallthrough -Wno-int-in-bool-context
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- -Wno-maybe-uninitialized -Wno-misleading-indentation)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-copy")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/NanoGUI external/NanoGUI)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set_property(TARGET nanogui nanogui-obj glfw glfw_objects PROPERTY FOLDER "External")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# Restore warnings for MaterialXView
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(CMAKE_C_FLAGS ${PREV_CMAKE_C_FLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(CMAKE_CXX_FLAGS ${PREV_CMAKE_CXX_FLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-add_definitions(${NANOGUI_EXTRA_DEFS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# We remove the CMake code that compiles NanoGUI from source and replace
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# it with code that points to the pre-compiled NanoGUI package that is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# available through MacPorts.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set(MACPORTS_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set(NANOGUI_EXTRA_INCS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${MACPORTS_INCLUDE_DIR}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${MACPORTS_INCLUDE_DIR}/eigen3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${MACPORTS_INCLUDE_DIR}/nanovg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${MACPORTS_INCLUDE_DIR}/GLFW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_executable(MaterialXView ${materialx_source} ${materialx_headers})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,13 +23,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MaterialXGenGlsl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MaterialXRenderGlsl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ nanogui
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfw
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${NANOGUI_EXTRA_LIBS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target_include_directories(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MaterialXView
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PRIVATE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_SOURCE_DIR}/../
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_SOURCE_DIR}/NanoGUI/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${NANOGUI_EXTRA_INCS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(MATERIALX_BUILD_OIIO AND OPENIMAGEIO_ROOT_DIR)
</span></pre><pre style='margin:0'>
</pre>