Skip to content

Commit

Permalink
glslang: update to 1.3.296.0
Browse files Browse the repository at this point in the history
  See: https://trac.macports.org/ticket/71081
  Set python to version 3.12
  Added the lates remark on:
  KhronosGroup/glslang#3371
  to patchfile.
  • Loading branch information
christophecvr authored and judaew committed Oct 18, 2024
1 parent 675ff79 commit ccbaab4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
25 changes: 16 additions & 9 deletions graphics/glslang/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ PortGroup github 1.0
PortGroup cmake 1.1
PortGroup legacysupport 1.1

github.setup KhronosGroup glslang 13.0.0
revision 3
github.setup KhronosGroup glslang 1.3.296.0 vulkan-sdk-
revision 0

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

checksums sha256 d4eece144c4930b4793779396665bd415dd641c8f33115b4de4c83d42a39d9f1 \
rmd160 a187c2d1c75a05eb5aba4afadf9ba689b15c63f9 \
size 3712855
checksums sha256 4d455a9a9a0d23231b22c7595ee343989a5f6ee50b5eb05aa663b92352bb51e8 \
rmd160 c0e219aee3a62a8d0fd25c2f96a5a5851437963d \
size 3867163

set py_ver 3.11
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 <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
Expand All @@ -45,9 +45,16 @@ legacysupport.use_mp_libcxx yes
# https://github.com/KhronosGroup/glslang/pull/3371
patchfiles-append create-pkgconfig-file.diff

depends_lib-append port:spirv-tools
depends_lib-append port:python${py_ver_nodot}

depends_build-append port:python${py_ver_nodot}

configure.python ${prefix}/bin/python${py_ver}
configure.args-append -DPYTHON_EXECUTABLE:FILEPATH=${configure.python}

# 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 \
-DENABLE_GLSLANG_INSTALL=ON
-DGLSLANG_ENABLE_INSTALL=ON \
-DALLOW_EXTERNAL_SPIRV_TOOLS=ON
21 changes: 16 additions & 5 deletions graphics/glslang/files/create-pkgconfig-file.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
--- CMakeLists.txt.orig 2023-08-23 19:24:25.000000000 -0400
+++ CMakeLists.txt 2023-10-13 18:07:29.000000000 -0400
@@ -361,4 +361,34 @@
--- CMakeLists.txt.orig 2024-09-26 01:10:44.000000000 +0200
+++ CMakeLists.txt 2024-10-17 09:21:40.000000000 +0200
@@ -300,6 +300,10 @@
message(WARNING "ENABLE_OPT set but SPIR-V tools not found! Disabling SPIR-V optimization.")
endif()
set(ENABLE_OPT OFF)
+ else()
+ message(STATUS "XDEBUG Using external SPIRV-Tools")
+ message(STATUS "XDEBUG\n ENABLE_OPT=${ENABLE_OPT}\n ENABLE_HLSL=${ENABLE_HLSL}\n ENABLE_SPIRV=${ENABLE_SPIRV}
+ ENABLE_GLSLANG_BINARIES=${ENABLE_GLSLANG_BINARIES}\n GLSLANG_TESTS=${GLSLANG_TESTS}\n PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
endif()
else()
if(ENABLE_OPT)
@@ -397,4 +401,34 @@
DESTINATION
"${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
Expand All @@ -16,7 +27,7 @@
+prefix="@CMAKE_INSTALL_PREFIX@"
+exec_prefix="${prefix}"
+libdir="${prefix}/lib"
+includedir="${prefix}/include"
+includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"
+
+Name: @PROJECT_NAME@
+Description: official reference compiler front end for the OpenGL ES and OpenGL shading languages
Expand All @@ -34,4 +45,4 @@
+ DESTINATION
+ "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+ )
endif()
endif(GLSLANG_ENABLE_INSTALL)

0 comments on commit ccbaab4

Please sign in to comment.