Files
2026-05-03 17:45:34 +10:00

61 lines
2.3 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 KhronosGroup glslang 1.4.341.0 vulkan-sdk-
github.tarball_from archive
revision 0
categories graphics devel
license {BSD Permissive}
maintainers {judaew @judaew} openmaintainer
description OpenGL shader compiler libraries & tools
long_description Glslang is the official reference compiler for \
the OpenGL and OpenGL ES shading languages.
homepage https://www.khronos.org/opengles/sdk/Reference-Compiler/
checksums sha256 18cdf7d40a39001dde842c6a1338b2c9321ac5e487139b9d52b4b9c666da3c86 \
rmd160 ad6e42ee708366c269740a80e1bbd95af98c1d0d \
size 4297511
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
# Generate a pkg-config file, so that software projects that use
# pkg-config to locate external dependencies (e.g., Godot 4.x) are able
# to find and link against glslang.
#
# This patch has also been submitted upstream, and when it gets added
# to the glslang codebase, our patchfile can be deleted:
# https://github.com/KhronosGroup/glslang/pull/3371
patchfiles-append create-pkgconfig-file.diff
depends_lib-append port:spirv-tools
depends_build-append port:python${py_ver_nodot}
configure.python ${prefix}/bin/python${py_ver}
# there is no such option in CMakeLists.txt, cmake discovers and uses right python
#configure.args-append -DPYTHON_EXECUTABLE:FILEPATH=${configure.python}
configure.args-append -DBUILD_SHARED_LIBS=ON \
-DGLSLANG_ENABLE_INSTALL=ON \
-DALLOW_EXTERNAL_SPIRV_TOOLS=ON