ports/opt (3.6): [notify] glslang: 11.8.0 -> 11.9.0 new dependency spirv-tools
commit 540aee53bb3f34c933b7d2e94e14cc0ba0ae9f77 Author: Danny Rawlins <contact@romster.me> Date: Sun May 22 20:14:42 2022 +1000 [notify] glslang: 11.8.0 -> 11.9.0 new dependency spirv-tools diff --git a/glslang/.footprint b/glslang/.footprint index 2d117a690..79c7b8ac5 100644 --- a/glslang/.footprint +++ b/glslang/.footprint @@ -100,8 +100,10 @@ drwxr-xr-x root/root usr/lib/cmake/ -rw-r--r-- root/root usr/lib/libSPVRemapper.a -rwxr-xr-x root/root usr/lib/libSPVRemapper.so -rw-r--r-- root/root usr/lib/libglslang-default-resource-limits.a --rwxr-xr-x root/root usr/lib/libglslang-default-resource-limits.so -rw-r--r-- root/root usr/lib/libglslang.a lrwxrwxrwx root/root usr/lib/libglslang.so -> libglslang.so.11 -lrwxrwxrwx root/root usr/lib/libglslang.so.11 -> libglslang.so.11.8.0 --rwxr-xr-x root/root usr/lib/libglslang.so.11.8.0 +lrwxrwxrwx root/root usr/lib/libglslang.so.11 -> libglslang.so.11.9.0 +-rwxr-xr-x root/root usr/lib/libglslang.so.11.9.0 +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/glslang.pc +-rw-r--r-- root/root usr/lib/pkgconfig/spirv.pc diff --git a/glslang/.signature b/glslang/.signature index e515a2141..780dc2c1e 100644 --- a/glslang/.signature +++ b/glslang/.signature @@ -1,8 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/Y/RSRQx9ykpclyvUxa6GDAN/LYAB6VoerVDugPXrPMYvk3mBADBHmYFUfO7QqzZpSu4+qdjXo7tjeN+uZNB3wI= -SHA256 (Pkgfile) = 1973a58d5ef6aeee8a5763422ca106e2d14f2046671996dc833a857b63659cb2 -SHA256 (.footprint) = a90f41be71456bf37074b54848385342bb3164641667b5d42271f6bc7aab2f6b -SHA256 (glslang-11.8.0.tar.gz) = 9e5fbe5b844d203da5e61bcd84eda76326e0ff5dc696cb862147bbe01d2febb0 -SHA256 (SPIRV-Headers-b42ba6d92faf6b4938e6f22ddd186dbdacc98d78.tar.gz) = d58e8e65ea4b4f1e421caaad68f88ce7b713ac3519bd49e7b71b6a5690489eb6 -SHA256 (SPIRV-Tools-73735db943d7165d725883a1da0ad9eac79c1e34.tar.gz) = 28551980e0b69c2d188f9705747e7e3b0836a957e1ddce14ad1dfa621bed1ace -SHA256 (known_good.py.in) = 3c9fdb7a6a0bdaf3790348193a6100814b879d02b2e4d4e89dc6fa95bafacdab +RWSE3ohX2g5d/cV4vk+/OFQp19NFJphwPbCTEuAVpLMxpeR5xNUo/uWhUI0V+DJ5j5LIcktbScTcUPaclplHYLttp4WcsKXjPgU= +SHA256 (Pkgfile) = 93724f277ae44bbbe8c4027becfe689f378338ae5bfd2ff8efd58b73cb4b13a1 +SHA256 (.footprint) = deef3c7b86e3deda4ae0af45fc78ef47d23909bdbbe5564340cec3e465baed26 +SHA256 (glslang-11.9.0.tar.gz) = d5744adba19eef9ad3d73f524226b39fec559d94cb582cd442e3c5de930004b2 +SHA256 (glslang-default-resource-limits_staticlib.patch) = 37fd2a024abc723c456c872a2ceb3d025ac1bf1267ce3539a0db2dc1e4803bd4 +SHA256 (0001-pkg-config-compatibility.patch) = 0867569b441b98012d5f3c13e744a693228e6550ec120a4da53a749138867105 diff --git a/glslang/0001-pkg-config-compatibility.patch b/glslang/0001-pkg-config-compatibility.patch new file mode 100644 index 000000000..333d05ead --- /dev/null +++ b/glslang/0001-pkg-config-compatibility.patch @@ -0,0 +1,178 @@ +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt 2021-11-23 17:40:46.511754273 +1000 +@@ -121,6 +121,13 @@ if(USE_CCACHE) + endif() + endif() + ++# using pkg-config to configure include paths and link libraries ++include(FindPkgConfig) ++pkg_check_modules(SPIRV_TOOLS REQUIRED SPIRV-Tools>=2019.2.1) ++if(BUILD_SHARED_LIBS) ++ pkg_check_modules(SPIRV_TOOLS_SHARED REQUIRED SPIRV-Tools-shared>=2019.2.1) ++endif(BUILD_SHARED_LIBS) ++ + if(ENABLE_CTEST) + include(CTest) + endif() +@@ -307,11 +314,7 @@ if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMA + add_subdirectory(External) + endif() + +-if(NOT TARGET SPIRV-Tools-opt) +- set(ENABLE_OPT OFF) +-endif() +- +-if(ENABLE_OPT) ++if(${SPIRV_TOOLS_FOUND} EQUAL 1) + message(STATUS "optimizer enabled") + add_definitions(-DENABLE_OPT=1) + else() +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt 2021-11-23 17:40:46.512754300 +1000 +@@ -68,10 +68,3 @@ if(BUILD_TESTING) + endif() + endif() + +-if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt) +- if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools) +- set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests") +- add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools) +- endif() +-endif() +- +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt 2021-11-23 17:40:46.513754326 +1000 +@@ -211,6 +211,8 @@ if(ENABLE_GLSLANG_INSTALL) + EXPORT glslangTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc @ONLY) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in.dma 2021-11-23 17:40:46.513754326 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in 2021-11-23 17:40:46.513754326 +1000 +@@ -0,0 +1,11 @@ ++ prefix=@CMAKE_INSTALL_PREFIX@ ++ exec_prefix=@CMAKE_INSTALL_PREFIX@ ++ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++ ++ Name: @PROJECT_NAME@ ++ Description: OpenGL and OpenGL ES shader front end and validator ++ Requires: ++ Version: @VERSION@ ++ Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper ++ Cflags: -I${includedir} +\ No newline at end of file +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt 2021-11-23 17:40:46.514754353 +1000 +@@ -77,6 +77,10 @@ target_include_directories(SPIRV PUBLIC + + glslang_add_build_info_dependency(SPIRV) + ++ ++set(SPIRV_NAME spirv) ++set(SPIRV_VERSION 1.3) ++ + if (ENABLE_SPVREMAPPER) + add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) + set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) +@@ -90,15 +94,21 @@ if(WIN32 AND BUILD_SHARED_LIBS) + endif() + endif() + ++target_include_directories(SPIRV PUBLIC ${SPIRV_TOOLS_INCLUDE_DIRS}) ++target_compile_options(SPIRV PUBLIC ${SPIRV_TOOLS_CFLAGS_OTHER}) ++target_link_libraries(SPIRV ${SPIRV_TOOLS_LIBRARIES}) ++if(BUILD_SHARED_LIBS) ++ target_include_directories(SPIRV PUBLIC ${SPIRV_TOOLS_SHARED_INCLUDE_DIRS}) ++ target_compile_options(SPIRV PUBLIC ${SPIRV_TOOLS_SHARED_CFLAGS_OTHER}) ++ target_link_libraries(SPIRV ${SPIRV_TOOLS_SHARED_LIBRARIES}) ++endif(BUILD_SHARED_LIBS) ++ + if(ENABLE_OPT) + target_include_directories(SPIRV + PRIVATE ${spirv-tools_SOURCE_DIR}/include + PRIVATE ${spirv-tools_SOURCE_DIR}/source + ) +- target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt) +- target_include_directories(SPIRV PUBLIC +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External> +- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>) ++ target_link_libraries(SPIRV glslang) + else() + target_link_libraries(SPIRV PRIVATE MachineIndependent) + endif() +@@ -133,6 +143,9 @@ if(ENABLE_GLSLANG_INSTALL) + endif() + + install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) ++ # spirv.pc Configuration ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/spirv.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/spirv.pc @ONLY) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/spirv.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) + endif() +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in.dma 2021-11-23 17:40:46.514754353 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in 2021-11-23 17:40:46.514754353 +1000 +@@ -0,0 +1,11 @@ ++ prefix=@CMAKE_INSTALL_PREFIX@ ++ exec_prefix=@CMAKE_INSTALL_PREFIX@ ++ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++ ++ Name: @SPIRV_NAME@ ++ Description: SPIR-V is a binary intermediate language for representing graphical-shader stages and compute kernels for multiple Khronos APIs, including OpenCL, OpenGL, and Vulkan ++ Requires: ++ Version: @SPIRV_VERSION@ ++ Libs: -L${libdir} -lSPIRV ++ Cflags: -I${includedir} +\ No newline at end of file +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp.dma 2021-11-13 00:42:16.000000000 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp 2021-11-23 17:40:46.515754380 +1000 +@@ -43,7 +43,7 @@ + #include <iostream> + + #include "SpvTools.h" +-#include "spirv-tools/optimizer.hpp" ++#include <spirv-tools/optimizer.hpp> + + namespace glslang { + +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma 2021-11-23 17:40:36.884497081 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt 2021-11-23 17:40:46.515754380 +1000 +@@ -72,6 +72,14 @@ if(ENABLE_SPVREMAPPER) + set(LIBRARIES ${LIBRARIES} SPVRemapper) + endif() + ++if(BUILD_SHARED_LIBS) ++ set(LIBRARIES ${LIBRARIES} ${SPIRV_TOOLS_SHARED_LIBRARIES}) ++ target_include_directories(glslangValidator PUBLIC ${SPIRV_TOOLS_SHARED_INCLUDE_DIRS}) ++else() ++ set(LIBRARIES ${LIBRARIES} ${SPIRV_TOOLS_LIBRARIES}) ++ target_include_directories(glslangValidator PUBLIC ${SPIRV_TOOLS_INCLUDE_DIRS}) ++endif(BUILD_SHARED_LIBS) ++ + if(WIN32) + set(LIBRARIES ${LIBRARIES} psapi) + elseif(UNIX) +@@ -81,9 +89,6 @@ elseif(UNIX) + endif() + + target_link_libraries(glslangValidator ${LIBRARIES}) +-target_include_directories(glslangValidator PUBLIC +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External> +- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>) + + if(ENABLE_OPT) + target_include_directories(glslangValidator diff --git a/glslang/Pkgfile b/glslang/Pkgfile index ba4dd8469..67f7decc7 100644 --- a/glslang/Pkgfile +++ b/glslang/Pkgfile @@ -1,26 +1,23 @@ # Description: OpenGL and OpenGL ES shader front end and validator # URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler # Maintainer: Danny Rawlins, crux at romster dot me -# Depends on: cmake +# Depends on: spirv-tools # Optional: ninja name=glslang -version=11.8.0 +version=11.9.0 release=1 -_spirv_headers=b42ba6d92faf6b4938e6f22ddd186dbdacc98d78 -_spirv_tools=73735db943d7165d725883a1da0ad9eac79c1e34 source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.... - https://github.com/KhronosGroup/SPIRV-Headers/archive/$_spirv_headers/SPIRV-... - https://github.com/KhronosGroup/SPIRV-Tools/archive/$_spirv_tools/SPIRV-Tool... - known_good.py.in) + glslang-default-resource-limits_staticlib.patch + 0001-pkg-config-compatibility.patch) build() { - cp -r SPIRV-Tools-$_spirv_tools $name-$version/External/spirv-tools - cp -r SPIRV-Headers-$_spirv_headers $name-$version/External/spirv-tools/external/spirv-headers + patch -d $name-$version -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch - sed -e "s|@SRC@|$SRC/$name-$version|" $SRC/known_good.py.in > $SRC/known_good.py - chmod u+x $SRC/known_good.py - $SRC/known_good.py + # https://patch-diff.githubusercontent.com/raw/KhronosGroup/glslang/pull/1722.... + patch -d $name-$version -p1 -i $SRC/0001-pkg-config-compatibility.patch + + find $SRC -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x prt-get isinst ninja && PKGMK_GLSLANG+=' -G Ninja' prt-get isinst ccache && \ @@ -32,25 +29,21 @@ build() { -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_INSTALL_LIBDIR=lib -D CMAKE_BUILD_TYPE=Release - -D CMAKE_SKIP_RPATH:BOOL=yes + -D CMAKE_SKIP_RPATH=yes -Wno-dev" cmake -B build-static $config $PKGMK_GLSLANG \ -D BUILD_SHARED_LIBS=OFF \ - -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" + -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects" cmake --build build-static # https://github.com/KhronosGroup/glslang/issues/1484 -Wl,--no-undefined cmake -B build-shared $config $PKGMK_GLSLANG \ -D BUILD_SHARED_LIBS=ON \ - -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \ + -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects" \ -D CMAKE_SHARED_LINKER_FLAGS='-Wl,--no-undefined' cmake --build build-shared DESTDIR=$PKG cmake --build build-static --target install DESTDIR=$PKG cmake --build build-shared --target install - - mv $PKG/usr/bin/spirv-remap $SRC/ - rm -r $PKG/usr/{bin/spirv*,include/spirv-tools,lib/cmake/SPIRV-Tools*,lib/libSPIRV-*,lib/pkgconfig} - mv $SRC/spirv-remap $PKG/usr/bin/spirv-remap } diff --git a/glslang/glslang-default-resource-limits_staticlib.patch b/glslang/glslang-default-resource-limits_staticlib.patch new file mode 100644 index 000000000..a60ad7617 --- /dev/null +++ b/glslang/glslang-default-resource-limits_staticlib.patch @@ -0,0 +1,12 @@ +diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt +--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma 2021-11-23 17:38:10.022569320 +1000 ++++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt 2021-11-23 17:38:19.087812070 +1000 +@@ -47,7 +47,7 @@ add_custom_command( + + #add_custom_target(glslangValidator DEPENDS ${GLSLANG_INTRINSIC_H}) + +-add_library(glslang-default-resource-limits ++add_library(glslang-default-resource-limits STATIC + ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp) + set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
participants (1)
-
crux@crux.nu