# -*- 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 PortGroup legacysupport 1.1 version v2024.3 revision 0 github.setup google shaderc ${version} categories graphics devel license Apache Version-2.0 maintainers {christophecvr @christophecvr} openmaintainer description A collection of tools, libraries and tests for shader compilation. long_description At the moment it includes: \ glslc, a command line compiler for GLSL/HLSL to SPIR-V, and \ libshaderc, a library API for accessing glslc functionality. homepage https://github.com/google/shaderc checksums shaderc-v2024.3.tar.gz \ rmd160 28cc1e3a47f74c37897ea49e632273dccc722617 \ sha256 e8fe28d01b7f9100118bc99f7421a1022d5bed3280c8ce50644d8462da649581 \ size 227486 \ glslang-467ce01c71e38cf01814c48987a5c0dadd914df4.tar.gz \ rmd160 7e5baff3f43db294a222d1c57f85ed10c99e8bcb \ sha256 390764c4df4e17c7831af747e58ceac80945f1750238b623ffaaa73538ccac4c \ size 3871722 set py_ver 3.12 set py_ver_nodot [string map {. {}} ${py_ver}] compiler.cxx_standard 2017 # Need to use MacPorts libc++ on macOS 10.14 Mojave and older, because # Apple Clang only added support for the C++17 library # starting in Xcode 11 (clang-1100) for macOS 10.15+. # References: # * https://stackoverflow.com/a/55353263 # * https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes legacysupport.newest_darwin_requires_legacy 18 legacysupport.use_mp_libcxx yes # Patching source to use Already installed SPIRV-Tools. patchfiles use-installed-spirv-tools.patch depends_build-append port:spirv-headers \ port:asciidoctor \ path:bin/pkg-config:pkgconfig depends_lib-append port:glslang \ port:spirv-tools depends_build-append port:python${py_ver_nodot} configure.python ${prefix}/bin/python${py_ver} configure.args-append -DPYTHON_EXECUTABLE:FILEPATH=${configure.python} # Only glslang is build to build shaderc glslang is not installed. # Using installed SPIRV-Tools. set submodules { KhronosGroup glslang 467ce01c71e38cf01814c48987a5c0dadd914df4 third_party/glslang } foreach {sub_author sub_project sub_commit sub_dest} ${submodules} { master_sites-append https://github.com/${sub_author}/${sub_project}/archive/${sub_commit}.tar.gz?dummy=:${sub_project} distfiles-append ${sub_project}-${sub_commit}.tar.gz:${sub_project} } # FIXME : main module not extracted in worksrcpath with multiple download sources. # Move extracted main module to worksrcpath # Move submodules to cmakes expected location in worksrcpath post-extract { move ${workpath}/google-shaderc-7223dc3 ${worksrcpath} foreach {sub_author sub_project sub_commit sub_dest} ${submodules} { move ${workpath}/${sub_project}-${sub_commit} ${worksrcpath}/${sub_dest} } } configure.args-append -DSHADERC_ENABLE_WERROR_COMPILE=OFF \ -DSHADERC_SKIP_TESTS=ON \ -DUSE_EXTERNAL_SPIRV_TOOLS=ON