mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
81 lines
3.2 KiB
Tcl
81 lines
3.2 KiB
Tcl
# -*- 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
|
|
|
|
github.setup google shaderc 2026.2 v
|
|
revision 0
|
|
github.tarball_from archive
|
|
|
|
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-${version}.tar.gz \
|
|
rmd160 3ce21a1551d90db0ec3c0360ea5e61ca7f214c32 \
|
|
sha256 f924178e75e3293082481b25ed64d5e48a795b479dac3bd3c83d23070855df42 \
|
|
size 228959 \
|
|
glslang-5ed4003a18a10a9d1bd7e43aaf1664499abffa83.tar.gz \
|
|
rmd160 da246d6ce940c3799fa02e1423c01eabfd49ab65 \
|
|
sha256 66ada8e61f1bd59faaddeff2f047d139fb6cb60ac17d7fcecaebe27a169ecb2f \
|
|
size 4321644
|
|
|
|
set py_ver 3.14
|
|
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 <filesystem> 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 5ed4003a18a10a9d1bd7e43aaf1664499abffa83 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}
|
|
}
|
|
|
|
# Move submodules to cmakes expected location in worksrcpath
|
|
post-extract {
|
|
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
|