ports/opt (3.6): glslang: 11.0.0-bacaef3 -> 11.0.0-c594de2
commit a693e998e64f0ed41e0b6a2f3cd20cb44ab215dd Author: Danny Rawlins <contact@romster.me> Date: Sun Feb 28 00:23:03 2021 +1100 glslang: 11.0.0-bacaef3 -> 11.0.0-c594de2 diff --git a/glslang/.footprint b/glslang/.footprint index b66136611..912739648 100644 --- a/glslang/.footprint +++ b/glslang/.footprint @@ -70,27 +70,39 @@ drwxr-xr-x root/root usr/include/glslang/SPIRV/ -rw-r--r-- root/root usr/include/glslang/build_info.h drwxr-xr-x root/root usr/lib/ drwxr-xr-x root/root usr/lib/cmake/ -drwxr-xr-x root/root usr/lib/cmake/glslang/ --rw-r--r-- root/root usr/lib/cmake/glslang/glslangConfig-release.cmake --rw-r--r-- root/root usr/lib/cmake/glslang/glslangConfig.cmake +-rw-r--r-- root/root usr/lib/cmake/HLSLTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/HLSLTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/OGLCompilerTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/OGLCompilerTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/OSDependentTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/OSDependentTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/SPIRVTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/SPIRVTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/SPVRemapperTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/SPVRemapperTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/glslang-default-resource-limitsTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/glslang-default-resource-limitsTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/glslangTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/glslangTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/glslangValidatorTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/glslangValidatorTargets.cmake +-rw-r--r-- root/root usr/lib/cmake/spirv-remapTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/spirv-remapTargets.cmake -rw-r--r-- root/root usr/lib/libGenericCodeGen.a -rw-r--r-- root/root usr/lib/libHLSL.a -lrwxrwxrwx root/root usr/lib/libHLSL.so -> libHLSL.so.11 -lrwxrwxrwx root/root usr/lib/libHLSL.so.11 -> libHLSL.so.11.0.0 --rwxr-xr-x root/root usr/lib/libHLSL.so.11.0.0 +-rwxr-xr-x root/root usr/lib/libHLSL.so -rw-r--r-- root/root usr/lib/libMachineIndependent.a -rw-r--r-- root/root usr/lib/libOGLCompiler.a -rw-r--r-- root/root usr/lib/libOSDependent.a -rw-r--r-- root/root usr/lib/libSPIRV.a -lrwxrwxrwx root/root usr/lib/libSPIRV.so -> libSPIRV.so.11 -lrwxrwxrwx root/root usr/lib/libSPIRV.so.11 -> libSPIRV.so.11.0.0 --rwxr-xr-x root/root usr/lib/libSPIRV.so.11.0.0 +-rwxr-xr-x root/root usr/lib/libSPIRV.so -rw-r--r-- root/root usr/lib/libSPVRemapper.a -lrwxrwxrwx root/root usr/lib/libSPVRemapper.so -> libSPVRemapper.so.11 -lrwxrwxrwx root/root usr/lib/libSPVRemapper.so.11 -> libSPVRemapper.so.11.0.0 --rwxr-xr-x root/root usr/lib/libSPVRemapper.so.11.0.0 +-rwxr-xr-x root/root usr/lib/libSPVRemapper.so -rw-r--r-- root/root usr/lib/libglslang-default-resource-limits.a -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.0.0 -rwxr-xr-x root/root usr/lib/libglslang.so.11.0.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 3e63e8db4..49b627f72 100644 --- a/glslang/.signature +++ b/glslang/.signature @@ -1,10 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/XbeOlEBaG+uBoBWpXeNrKnpgH7oTWe8VGN7ikDxC4UaaAx0SfDd5Aa9GmT/Ty/2dPtQn1ek9njf7u1uj10LnAc= -SHA256 (Pkgfile) = ab033d3e4b102c4abe03a2726384861e5fc4fcd8201b431662e67ffcecafe9a5 -SHA256 (.footprint) = 8880cae79882460ff5b41bc7581a5b503f425c06f07f153c132c02481ff82939 -SHA256 (bacaef3237c515e40d1a24722be48c0a0b30f75f.zip) = c3161b15c83f47310afdfc1167f3dd9a67ba48b910e19b19405f0ba67eb1c1fa -SHA256 (0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch) = 0eec9964c9ccf87f7179011d1a48df8d4c2dc8067c14cb8c660ad2bd3f2218e9 -SHA256 (0001-CMake-Make-glslang-default-resource-limits-STATIC.patch) = f99036f2d07bf45ed80ab3e221a3834ca514ba2dd50ec710ba1604a46b8165bb -SHA256 (0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch) = 73560f03d7da2861cc870be14b0eb99e7280c2455e5ee81e5eee9ebd04f95b29 -SHA256 (0001-glslang-Rename-and-move-cmake-export.patch) = aee56a7d0b4567f8259c461ea32510a98b394698febf034d32aa520ac9d37781 -SHA256 (0002-cmake-Use-the-same-export-config-for-all-installed-t.patch) = 8390e2537e9006fb5f1f948baa680955cf690b561432eec55ded8aef0bc13ee7 +RWSE3ohX2g5d/SwfbLWEybtFWbT8JHKOkqIOSOEMZrKLVdOE7oTSyJNTE0gqKrfksrjpHlFsLfuGT8oCvO2E9S3iDYesuiDBCQQ= +SHA256 (Pkgfile) = 384d39a0a1b3f922591acc092c51888a26a0980f5f5b12585c96f521caec899e +SHA256 (.footprint) = cf10144f439de699d284ae928f297389273b2b6ce4cdbf96654d6daada5202df +SHA256 (c594de23cdd790d64ad5f9c8b059baae0ee2941d.zip) = e5bfa91af93e48c19babcfdd2cf5391aa67b081c94ad65c416a8c9106d86bf3b +SHA256 (glslang-default-resource-limits_staticlib.patch) = 6a2bbc0c08c2cf257a15f0c03b1fbc53bb150fa449c3f28d180d69860864dcc8 +SHA256 (0001-pkg-config-compatibility.patch) = 1f5f890f9f13bdb436db3c238f0451a56e219e0540f1e50a06a58319949c0542 diff --git a/glslang/0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch b/glslang/0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch deleted file mode 100644 index 3af183203..000000000 --- a/glslang/0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 1504af077935a0bfd1b1b59f77d8b1cd89f913b5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com> -Date: Mon, 10 Dec 2018 13:05:15 +0100 -Subject: [PATCH] CMake: Allow linking against system-installed SPIRV-Tools - -Fixes #1585. ---- - CMakeLists.txt | 7 ++++++- - SPIRV/CMakeLists.txt | 21 +++++++++++++-------- - 2 files changed, 19 insertions(+), 9 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ada2b8fb..22243f49 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -320,7 +320,12 @@ if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External) - add_subdirectory(External) - endif() - --if(NOT TARGET SPIRV-Tools-opt) -+find_package(PkgConfig) -+if(PkgConfig_FOUND) -+ pkg_check_modules(SPIRV-Tools SPIRV-Tools) -+endif() -+# Former would be system-installed, later is from External -+if(NOT SPIRV-Tools_FOUND AND NOT TARGET SPIRV-Tools-opt) - set(ENABLE_OPT OFF) - endif() - -diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index d699dadd..28beb47b 100644 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -91,14 +91,19 @@ if(WIN32 AND BUILD_SHARED_LIBS) - endif() - - 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>) -+ if(SPIRV-Tools_FOUND) -+ target_include_directories(SPIRV PUBLIC ${SPIRV-Tools_INCLUDEDIR}) -+ target_link_libraries(SPIRV glslang ${SPIRV-Tools_LIBRARIES}) -+ else() -+ 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>) -+ endif() - else() - target_link_libraries(SPIRV PRIVATE MachineIndependent) - endif(ENABLE_OPT) --- -2.28.0 - diff --git a/glslang/0001-CMake-Make-glslang-default-resource-limits-STATIC.patch b/glslang/0001-CMake-Make-glslang-default-resource-limits-STATIC.patch deleted file mode 100644 index 93e7a5c44..000000000 --- a/glslang/0001-CMake-Make-glslang-default-resource-limits-STATIC.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d6e59ca08971c261f8297027d9c274f884c9d1e0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com> -Date: Mon, 12 Oct 2020 11:20:05 +0200 -Subject: [PATCH 1/2] CMake: Make glslang-default-resource-limits STATIC - ---- - StandAlone/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt -index 8038c043..a2009165 100644 ---- a/StandAlone/CMakeLists.txt -+++ b/StandAlone/CMakeLists.txt -@@ -31,7 +31,7 @@ - # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - # POSSIBILITY OF SUCH DAMAGE. - --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) --- -2.28.0 - diff --git a/glslang/0001-glslang-Rename-and-move-cmake-export.patch b/glslang/0001-glslang-Rename-and-move-cmake-export.patch deleted file mode 100644 index 685a0cbda..000000000 --- a/glslang/0001-glslang-Rename-and-move-cmake-export.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 63927cbb24c80b0cad5829338a6f76da6a873beb Mon Sep 17 00:00:00 2001 -From: Sandy Carter <bwrsandman@gmail.com> -Date: Sat, 16 Nov 2019 09:43:29 +0100 -Subject: [PATCH 1/2] glslang: Rename and move cmake export - -CMake when searching for a package in config mode will by default look for -a file called <name>Config.cmake or <lower-case-name>-config.cmake. -The previous naming would force the user to specify the name to -glslangTargets. The name is therefore changed to glslangConfig.cmake. - -On Unix, cmake will look for the config files in the following directories: -<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/ (U) -<prefix>/(lib/<arch>|lib|share)/<name>*/ (U) -<prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/ (U) -Previously the destination directory was <prefix>/lib/cmake which would not -be found. -The destination directory now includes the package name. - -A namespace is added to be able to specify components. ---- - glslang/CMakeLists.txt | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt -index 1c7d22a2..7408d81c 100644 ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -200,17 +200,18 @@ endif(WIN32) - if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) - install(TARGETS glslang -- EXPORT glslangTargets -+ EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - else() - install(TARGETS glslang MachineIndependent GenericCodeGen -- EXPORT glslangTargets -+ EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - -- install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -+ install(EXPORT glslangConfig NAMESPACE glslang:: -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glslang) - - set(ALL_HEADERS - ${GLSLANG_HEADERS} --- -2.28.0 - diff --git a/glslang/0001-pkg-config-compatibility.patch b/glslang/0001-pkg-config-compatibility.patch new file mode 100644 index 000000000..e09de4c95 --- /dev/null +++ b/glslang/0001-pkg-config-compatibility.patch @@ -0,0 +1,178 @@ +diff -up glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/CMakeLists.txt.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/CMakeLists.txt +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/CMakeLists.txt.dma 2020-11-03 14:22:55.000000000 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/CMakeLists.txt 2020-11-04 06:32:09.030326238 +1000 +@@ -118,6 +118,13 @@ if(USE_CCACHE) + endif(CCACHE_FOUND) + 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() +@@ -320,11 +327,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-d550bebee919179c9e332a0ab28a67f8fe3ca239/External/CMakeLists.txt.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/External/CMakeLists.txt +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/External/CMakeLists.txt.dma 2020-11-03 14:22:55.000000000 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/External/CMakeLists.txt 2020-11-04 06:32:09.030326238 +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-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/CMakeLists.txt.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/CMakeLists.txt +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/CMakeLists.txt.dma 2020-11-03 14:22:55.000000000 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/CMakeLists.txt 2020-11-04 06:32:09.031326265 +1000 +@@ -209,6 +209,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-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/glslang.pc.cmake.in.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/glslang.pc.cmake.in +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/glslang.pc.cmake.in.dma 2020-11-04 06:32:09.031326265 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/glslang/glslang.pc.cmake.in 2020-11-04 06:32:09.031326265 +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-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/CMakeLists.txt.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/CMakeLists.txt +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/CMakeLists.txt.dma 2020-11-03 14:22:55.000000000 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/CMakeLists.txt 2020-11-04 06:32:09.031326265 +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(ENABLE_OPT) +@@ -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(ENABLE_GLSLANG_INSTALL) +diff -up glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/spirv.pc.cmake.in.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/spirv.pc.cmake.in +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/spirv.pc.cmake.in.dma 2020-11-04 06:32:09.032326292 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/spirv.pc.cmake.in 2020-11-04 06:32:09.031326265 +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-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/SpvTools.cpp.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/SpvTools.cpp +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/SpvTools.cpp.dma 2020-11-04 06:32:09.032326292 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/SPIRV/SpvTools.cpp 2020-11-04 06:33:06.481878394 +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-d550bebee919179c9e332a0ab28a67f8fe3ca239/StandAlone/CMakeLists.txt.dma glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/StandAlone/CMakeLists.txt +--- glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/StandAlone/CMakeLists.txt.dma 2020-11-04 06:31:49.139788864 +1000 ++++ glslang-d550bebee919179c9e332a0ab28a67f8fe3ca239/StandAlone/CMakeLists.txt 2020-11-04 06:32:09.032326292 +1000 +@@ -56,6 +56,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) +@@ -65,9 +73,6 @@ elseif(UNIX) + endif(WIN32) + + 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/0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch b/glslang/0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch deleted file mode 100644 index b5e1ef038..000000000 --- a/glslang/0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 5868365b3a8636a468c4d12b20a221f5b7602de9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com> -Date: Mon, 12 Oct 2020 11:21:05 +0200 -Subject: [PATCH 2/2] CMake: Use VERSION/SOVERSION for all shared libs - ---- - SPIRV/CMakeLists.txt | 14 ++++++++++---- - StandAlone/CMakeLists.txt | 7 +++++-- - hlsl/CMakeLists.txt | 7 +++++-- - 3 files changed, 20 insertions(+), 8 deletions(-) - -diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index d699dadd..55d77c45 100644 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -69,8 +69,11 @@ set(SPVREMAP_HEADERS - doc.h) - - add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) --set_property(TARGET SPIRV PROPERTY FOLDER glslang) --set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) -+set_target_properties(SPIRV PROPERTIES -+ FOLDER glslang -+ POSITION_INDEPENDENT_CODE ON -+ VERSION "${GLSLANG_VERSION}" -+ SOVERSION "${GLSLANG_VERSION_MAJOR}") - target_include_directories(SPIRV PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) -@@ -79,8 +82,11 @@ glslang_add_build_info_dependency(SPIRV) - - if (ENABLE_SPVREMAPPER) - add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) -- set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) -- set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON) -+ set_target_properties(SPVRemapper PROPERTIES -+ FOLDER glslang -+ POSITION_INDEPENDENT_CODE ON -+ VERSION "${GLSLANG_VERSION}" -+ SOVERSION "${GLSLANG_VERSION_MAJOR}") - endif() - - if(WIN32 AND BUILD_SHARED_LIBS) -diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt -index a2009165..6ff5e65b 100644 ---- a/StandAlone/CMakeLists.txt -+++ b/StandAlone/CMakeLists.txt -@@ -34,8 +34,11 @@ - 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) --set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON) -+set_target_properties(glslang-default-resource-limits PROPERTIES -+ FOLDER glslang -+ POSITION_INDEPENDENT_CODE ON -+ VERSION "${GLSLANG_VERSION}" -+ SOVERSION "${GLSLANG_VERSION_MAJOR}") - - target_include_directories(glslang-default-resource-limits - PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> -diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt -index 62faa195..a5472e7e 100644 ---- a/hlsl/CMakeLists.txt -+++ b/hlsl/CMakeLists.txt -@@ -38,8 +38,11 @@ - # projects that referenced this target. - - add_library(HLSL ${LIB_TYPE} "stub.cpp") --set_property(TARGET HLSL PROPERTY FOLDER hlsl) --set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON) -+set_target_properties(HLSL PROPERTIES -+ FOLDER hlsl -+ POSITION_INDEPENDENT_CODE ON -+ VERSION "${GLSLANG_VERSION}" -+ SOVERSION "${GLSLANG_VERSION_MAJOR}") - - if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(HLSL PROPERTIES PREFIX "") --- -2.28.0 - diff --git a/glslang/0002-cmake-Use-the-same-export-config-for-all-installed-t.patch b/glslang/0002-cmake-Use-the-same-export-config-for-all-installed-t.patch deleted file mode 100644 index 0142ba17d..000000000 --- a/glslang/0002-cmake-Use-the-same-export-config-for-all-installed-t.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 721a4218fa84604f07f3880971dcd1a473d01331 Mon Sep 17 00:00:00 2001 -From: Sandy Carter <bwrsandman@gmail.com> -Date: Sat, 16 Nov 2019 09:49:56 +0100 -Subject: [PATCH 2/2] cmake: Use the same export config for all installed - targets - -Fix issue with finding configuration exports by using the same -configuration as glslang. -The namespace allows for different targets to be used: -``` -target_link_libraries(example PRIVATE glslang::OGLCompiler) -add_custom_target(validator-version COMMAND glslang::glslangValidator -v) -``` ---- - OGLCompilersDLL/CMakeLists.txt | 3 +-- - SPIRV/CMakeLists.txt | 14 ++++---------- - StandAlone/CMakeLists.txt | 9 +++------ - glslang/OSDependent/Unix/CMakeLists.txt | 7 +++---- - glslang/OSDependent/Windows/CMakeLists.txt | 3 +-- - hlsl/CMakeLists.txt | 5 ++--- - 6 files changed, 14 insertions(+), 27 deletions(-) - -diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt -index 0b007d45..dcd014e8 100644 ---- a/OGLCompilersDLL/CMakeLists.txt -+++ b/OGLCompilersDLL/CMakeLists.txt -@@ -42,7 +42,6 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OGLCompiler EXPORT OGLCompilerTargets -+ install(TARGETS OGLCompiler EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(EXPORT OGLCompilerTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index d699dadd..014348bb 100644 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -111,28 +111,22 @@ endif(WIN32) - if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) - if (ENABLE_SPVREMAPPER) -- install(TARGETS SPVRemapper EXPORT SPVRemapperTargets -+ install(TARGETS SPVRemapper EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -- install(TARGETS SPIRV EXPORT SPIRVTargets -+ install(TARGETS SPIRV EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - else() - if (ENABLE_SPVREMAPPER) -- install(TARGETS SPVRemapper EXPORT SPVRemapperTargets -+ install(TARGETS SPVRemapper EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -- install(TARGETS SPIRV EXPORT SPIRVTargets -+ install(TARGETS SPIRV EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - -- if (ENABLE_SPVREMAPPER) -- install(EXPORT SPVRemapperTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -- endif() -- -- install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -- - install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt -index 8038c043..480cdec9 100644 ---- a/StandAlone/CMakeLists.txt -+++ b/StandAlone/CMakeLists.txt -@@ -83,19 +83,16 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS glslangValidator EXPORT glslangValidatorTargets -+ install(TARGETS glslangValidator EXPORT glslangConfig - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -- install(EXPORT glslangValidatorTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - - if(ENABLE_SPVREMAPPER) -- install(TARGETS spirv-remap EXPORT spirv-remapTargets -+ install(TARGETS spirv-remap EXPORT glslangConfig - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -- install(EXPORT spirv-remapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif() - - if(BUILD_SHARED_LIBS) -- install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets -+ install(TARGETS glslang-default-resource-limits EXPORT glslangConfig - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif() - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt -index 354a3e97..a7c2ea3c 100644 ---- a/glslang/OSDependent/Unix/CMakeLists.txt -+++ b/glslang/OSDependent/Unix/CMakeLists.txt -@@ -44,16 +44,15 @@ if(${CMAKE_VERSION} VERSION_LESS "3.1.0" OR CMAKE_CROSSCOMPILING) - # Also needed when cross-compiling to work around - # https://gitlab.kitware.com/cmake/cmake/issues/16920 - find_package(Threads) -- target_link_libraries(OSDependent ${CMAKE_THREAD_LIBS_INIT}) -+ target_link_libraries(OSDependent PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - else() - # This is the recommended way, so we use it for 3.1+. - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) -- target_link_libraries(OSDependent Threads::Threads) -+ target_link_libraries(OSDependent PRIVATE Threads::Threads) - endif() - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OSDependent EXPORT OSDependentTargets -+ install(TARGETS OSDependent EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt -index 9cf1b7fb..4271596d 100644 ---- a/glslang/OSDependent/Windows/CMakeLists.txt -+++ b/glslang/OSDependent/Windows/CMakeLists.txt -@@ -48,7 +48,6 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OSDependent EXPORT OSDependentTargets -+ install(TARGETS OSDependent EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt -index 62faa195..65b75e80 100644 ---- a/hlsl/CMakeLists.txt -+++ b/hlsl/CMakeLists.txt -@@ -47,13 +47,12 @@ endif() - - if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) -- install(TARGETS HLSL EXPORT HLSLTargets -+ install(TARGETS HLSL EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - else() -- install(TARGETS HLSL EXPORT HLSLTargets -+ install(TARGETS HLSL EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -- install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif(ENABLE_GLSLANG_INSTALL) --- -2.28.0 - diff --git a/glslang/Pkgfile b/glslang/Pkgfile index 741b6fd96..b650115c8 100644 --- a/glslang/Pkgfile +++ b/glslang/Pkgfile @@ -4,30 +4,19 @@ # Depends on: spirv-tools name=glslang -version=11.0.0-bacaef3 +version=11.0.0-c594de2 release=1 source=( #https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.... - https://github.com/KhronosGroup/glslang/archive/bacaef3237c515e40d1a24722be4... - 0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch - 0001-CMake-Make-glslang-default-resource-limits-STATIC.patch - 0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch - 0001-glslang-Rename-and-move-cmake-export.patch - 0002-cmake-Use-the-same-export-config-for-all-installed-t.patch) + https://github.com/KhronosGroup/glslang/archive/c594de23cdd790d64ad5f9c8b059... + glslang-default-resource-limits_staticlib.patch + 0001-pkg-config-compatibility.patch) build() { - mv $name-bacaef3237c515e40d1a24722be48c0a0b30f75f $name-$version + mv $name-c594de23cdd790d64ad5f9c8b059baae0ee2941d $name-$version - # https://github.com/KhronosGroup/glslang/pull/1621 - patch -d $name-$version -p1 -i $SRC/0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch - - # https://github.com/KhronosGroup/glslang/pull/2419 - patch -d $name-$version -p1 -i $SRC/0001-CMake-Make-glslang-default-resource-limits-STATIC.patch - patch -d $name-$version -p1 -i $SRC/0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch - - # https://github.com/KhronosGroup/glslang/pull/1978 - patch -d $name-$version -p1 -i $SRC/0001-glslang-Rename-and-move-cmake-export.patch - patch -d $name-$version -p1 -i $SRC/0002-cmake-Use-the-same-export-config-for-all-installed-t.patch + patch -d $name-$version -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch + patch -d $name-$version -p1 -i $SRC/0001-pkg-config-compatibility.patch local config=" -S$name-$version \ diff --git a/glslang/glslang-default-resource-limits_staticlib.patch b/glslang/glslang-default-resource-limits_staticlib.patch new file mode 100644 index 000000000..94693296a --- /dev/null +++ b/glslang/glslang-default-resource-limits_staticlib.patch @@ -0,0 +1,12 @@ +diff -up glslang-5743eed4d16757402517a1068137f4bc1645ee87/StandAlone/CMakeLists.txt.dma glslang-5743eed4d16757402517a1068137f4bc1645ee87/StandAlone/CMakeLists.txt +--- glslang-5743eed4d16757402517a1068137f4bc1645ee87/StandAlone/CMakeLists.txt.dma 2020-08-04 13:49:34.201893471 +1000 ++++ glslang-5743eed4d16757402517a1068137f4bc1645ee87/StandAlone/CMakeLists.txt 2020-08-04 13:49:40.622063592 +1000 +@@ -31,7 +31,7 @@ + # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + # POSSIBILITY OF SUCH DAMAGE. + +-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