Skip to content

Commit 8c943ca

Browse files
committed
glslang: update to 1.3.296.0
See: https://trac.macports.org/ticket/71081 Set python to version 3.12 Added the lates remark on: KhronosGroup/glslang#3371 to patchfile.
1 parent 3333007 commit 8c943ca

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

graphics/glslang/Portfile

+16-9
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ PortGroup github 1.0
55
PortGroup cmake 1.1
66
PortGroup legacysupport 1.1
77

8-
github.setup KhronosGroup glslang 13.0.0
9-
revision 3
8+
github.setup KhronosGroup glslang 1.3.296.0 vulkan-sdk-
9+
revision 0
1010

1111
categories graphics devel
1212
license {BSD Permissive}
@@ -17,19 +17,19 @@ long_description Glslang is the official reference compiler for \
1717
the OpenGL and OpenGL ES shading languages.
1818
homepage https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
1919

20-
checksums sha256 d4eece144c4930b4793779396665bd415dd641c8f33115b4de4c83d42a39d9f1 \
21-
rmd160 a187c2d1c75a05eb5aba4afadf9ba689b15c63f9 \
22-
size 3712855
20+
checksums sha256 4d455a9a9a0d23231b22c7595ee343989a5f6ee50b5eb05aa663b92352bb51e8 \
21+
rmd160 c0e219aee3a62a8d0fd25c2f96a5a5851437963d \
22+
size 3867163
2323

24-
set py_ver 3.11
24+
set py_ver 3.12
2525
set py_ver_nodot [string map {. {}} ${py_ver}]
2626

2727
compiler.cxx_standard 2017
2828

2929
# Need to use MacPorts libc++ on macOS 10.14 Mojave and older, because
3030
# Apple Clang only added support for the C++17 <filesystem> library
3131
# starting in Xcode 11 (clang-1100) for macOS 10.15+.
32-
#
32+
#
3333
# References:
3434
# * https://stackoverflow.com/a/55353263
3535
# * https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes
@@ -45,9 +45,16 @@ legacysupport.use_mp_libcxx yes
4545
# https://github.com/KhronosGroup/glslang/pull/3371
4646
patchfiles-append create-pkgconfig-file.diff
4747

48+
depends_lib-append port:spirv-tools
49+
depends_lib-append port:python${py_ver_nodot}
50+
4851
depends_build-append port:python${py_ver_nodot}
52+
4953
configure.python ${prefix}/bin/python${py_ver}
50-
configure.args-append -DPYTHON_EXECUTABLE:FILEPATH=${configure.python}
54+
55+
# there is no such option in CMakeLists.txt, cmake discovers and uses right python
56+
#configure.args-append -DPYTHON_EXECUTABLE:FILEPATH=${configure.python}
5157

5258
configure.args-append -DBUILD_SHARED_LIBS=ON \
53-
-DENABLE_GLSLANG_INSTALL=ON
59+
-DGLSLANG_ENABLE_INSTALL=ON \
60+
-DALLOW_EXTERNAL_SPIRV_TOOLS=ON

graphics/glslang/files/create-pkgconfig-file.diff

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
--- CMakeLists.txt.orig 2023-08-23 19:24:25.000000000 -0400
2-
+++ CMakeLists.txt 2023-10-13 18:07:29.000000000 -0400
3-
@@ -361,4 +361,34 @@
1+
--- CMakeLists.txt.orig 2024-09-26 01:10:44.000000000 +0200
2+
+++ CMakeLists.txt 2024-10-17 09:21:40.000000000 +0200
3+
@@ -300,6 +300,10 @@
4+
message(WARNING "ENABLE_OPT set but SPIR-V tools not found! Disabling SPIR-V optimization.")
5+
endif()
6+
set(ENABLE_OPT OFF)
7+
+ else()
8+
+ message(STATUS "XDEBUG Using external SPIRV-Tools")
9+
+ message(STATUS "XDEBUG\n ENABLE_OPT=${ENABLE_OPT}\n ENABLE_HLSL=${ENABLE_HLSL}\n ENABLE_SPIRV=${ENABLE_SPIRV}
10+
+ ENABLE_GLSLANG_BINARIES=${ENABLE_GLSLANG_BINARIES}\n GLSLANG_TESTS=${GLSLANG_TESTS}\n PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
11+
endif()
12+
else()
13+
if(ENABLE_OPT)
14+
@@ -397,4 +401,34 @@
415
DESTINATION
516
"${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
617
)
@@ -16,7 +27,7 @@
1627
+prefix="@CMAKE_INSTALL_PREFIX@"
1728
+exec_prefix="${prefix}"
1829
+libdir="${prefix}/lib"
19-
+includedir="${prefix}/include"
30+
+includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"
2031
+
2132
+Name: @PROJECT_NAME@
2233
+Description: official reference compiler front end for the OpenGL ES and OpenGL shading languages
@@ -34,4 +45,4 @@
3445
+ DESTINATION
3546
+ "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
3647
+ )
37-
endif()
48+
endif(GLSLANG_ENABLE_INSTALL)

0 commit comments

Comments
 (0)