[crux-commits] ports/opt (3.6): glslang: 11.0.0-c594de2 -> 11.2.0

crux at crux.nu crux at crux.nu
Mon Apr 5 05:35:26 UTC 2021


commit 014b7950c4a570f6451d9d44ae388d1adcc740cc
Author: Danny Rawlins <contact at romster.me>
Date:   Mon Apr 5 15:21:56 2021 +1000

    glslang: 11.0.0-c594de2 -> 11.2.0

diff --git a/glslang/.footprint b/glslang/.footprint
index 912739648..d4c09f8f1 100644
--- a/glslang/.footprint
+++ b/glslang/.footprint
@@ -98,11 +98,8 @@ drwxr-xr-x	root/root	usr/lib/cmake/
 -rwxr-xr-x	root/root	usr/lib/libSPIRV.so
 -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.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
+lrwxrwxrwx	root/root	usr/lib/libglslang.so.11 -> libglslang.so.11.2.0
+-rwxr-xr-x	root/root	usr/lib/libglslang.so.11.2.0
diff --git a/glslang/.signature b/glslang/.signature
index 49b627f72..1c33044e3 100644
--- a/glslang/.signature
+++ b/glslang/.signature
@@ -1,7 +1,7 @@
 untrusted comment: verify with /etc/ports/opt.pub
-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
+RWSE3ohX2g5d/dyYmoLlJ5c2jVeVSiOdHhoa/oPUBLKZTEEMnOGa2B2PCXzcdi+yxAPQH/gQTbTk7Vb7UQMPaNin1Le5/WBePgg=
+SHA256 (Pkgfile) = ccff2f940eaf571c5ba4466fc8628918573ee6f4073d3b3f3d5c698f0fb0bbb3
+SHA256 (.footprint) = d566785862aeba547a4c05530dd2a929b5eefd73f4a9a0df99f815d88314659a
+SHA256 (glslang-11.2.0.tar.gz) = 8ff2fcf9b054e4a4ef56fcd8a637322f827b2b176a592a618d63672ddb896e06
+SHA256 (glslang-75b30a659c8a4979104986652c54cc421fc51129.tar.gz) = 60a5845bcd0ee30e000151bb725b461f67f95d703294ef74c034ff3a3e039324
+SHA256 (glslang-c79edd260c2b503f0eca57310057b4a100999cc5.tar.gz) = bfa4c1a3e6334b8760d3f8e0c6f01d5f436b19f1cb119f53c28b7a1ed165a575
diff --git a/glslang/0001-pkg-config-compatibility.patch b/glslang/0001-pkg-config-compatibility.patch
deleted file mode 100644
index e09de4c95..000000000
--- a/glslang/0001-pkg-config-compatibility.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-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/Pkgfile b/glslang/Pkgfile
index b650115c8..972baae31 100644
--- a/glslang/Pkgfile
+++ b/glslang/Pkgfile
@@ -1,38 +1,51 @@
 # 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: spirv-tools
+# Depends on: cmake
+# Optional: ninja
 
 name=glslang
-version=11.0.0-c594de2
+version=11.2.0
 release=1
-source=(
-	#https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
-	https://github.com/KhronosGroup/glslang/archive/c594de23cdd790d64ad5f9c8b059baae0ee2941d.zip
-	glslang-default-resource-limits_staticlib.patch
-	0001-pkg-config-compatibility.patch)
+_commit=c594de23cdd790d64ad5f9c8b059baae0ee2941d
+_spirv_headers=75b30a659c8a4979104986652c54cc421fc51129
+_spirv_tools=c79edd260c2b503f0eca57310057b4a100999cc5
+source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
+	https://github.com/KhronosGroup/SPIRV-Headers/archive/$_spirv_headers/$name-$_spirv_headers.tar.gz
+	https://github.com/KhronosGroup/SPIRV-Tools/archive/$_spirv_tools/$name-$_spirv_tools.tar.gz)
 
 build() {
-	mv $name-c594de23cdd790d64ad5f9c8b059baae0ee2941d $name-$version
+	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
-	patch -d $name-$version -p1 -i $SRC/0001-pkg-config-compatibility.patch
+	prt-get isinst ninja && PKGMK_GLSLANG+=' -G Ninja'
+	prt-get isinst ccache && PKGMK_GLSLANG+=' -D USE_CCACHE=ON'
+	prt-get isinst ccache && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
 
 	local config="
--S$name-$version \
--DCMAKE_INSTALL_PREFIX=/usr \
--DCMAKE_INSTALL_LIBDIR=lib \
--DCMAKE_BUILD_TYPE=Release \
--DCMAKE_SKIP_RPATH:BOOL=yes \
--GNinja"
-
-	cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
+		-S $name-$version
+		-D CMAKE_INSTALL_PREFIX=/usr
+		-D CMAKE_INSTALL_LIBDIR=lib
+		-D CMAKE_BUILD_TYPE=Release
+		-D CMAKE_SKIP_RPATH:BOOL=yes
+		-Wno-dev"
+
+	cmake -B build-static $config $PKGMK_GLSLANG \
+		-D BUILD_SHARED_LIBS=OFF \
+		-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}"
 	cmake --build build-static
-	
+
 	# https://github.com/KhronosGroup/glslang/issues/1484 -Wl,--no-undefined
-	cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,--no-undefined'
+	cmake -B build-shared $config $PKGMK_GLSLANG \
+		-D BUILD_SHARED_LIBS=ON \
+		-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
+		-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
deleted file mode 100644
index 94693296a..000000000
--- a/glslang/glslang-default-resource-limits_staticlib.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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)


More information about the crux-commits mailing list