[crux-commits] ports/opt (3.6): spirv-tools: 2020.5-b27b1af -> 2020.7

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


commit d3555778598f82304a14e9b7ed34cb89b0e8cd30
Author: Danny Rawlins <contact at romster.me>
Date:   Mon Apr 5 15:17:09 2021 +1000

    spirv-tools: 2020.5-b27b1af -> 2020.7

diff --git a/spirv-tools/.signature b/spirv-tools/.signature
index c6739500d..dd26dde21 100644
--- a/spirv-tools/.signature
+++ b/spirv-tools/.signature
@@ -1,6 +1,6 @@
 untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/R9X8LEdczwHJeBncaEPtow7dlk2QiGpdnkEGaKKuYke8u2sKwOfiaL+c/sUByqpwSImwDJLW2uwK0JeIzzQhAo=
-SHA256 (Pkgfile) = bc956b06d1838c26e9efa599035ed21d9dc892c3c34a29f703d75912841434d7
+RWSE3ohX2g5d/VUhjywzBREZh//j/DtnELH5Bz1WG934Q3Z3RVDHK6r2ZX3I8JlCTYlW8Pv6mkzCZPyyCtCXlT/VAuJ0RK94dA0=
+SHA256 (Pkgfile) = 12d0016c960de9c7ef6c9bb7027f9a9bae785deeaaf91f75ea882fb374c22b37
 SHA256 (.footprint) = 792b1ed5f9cf11954a951716c2b0c3849acf6c2ef0a45d91ec512bcc0dd79ba5
-SHA256 (b27b1afd12d05bf238ac7368bb49de73cd620a8e.zip) = 6a5691e3ac4ad2fae14025be4535cbdf60becc311fd2c07a00019e6167f54222
-SHA256 (spirv-tools-gcc11.patch) = 44962127ac664e437619afdf16c1193b9579d832a9d7c2fae3595f65c3f17923
+SHA256 (SPIRV-Tools-v2020.7.tar.gz) = c06eed1c7a1018b232768481184b5ae4d91d614d7bd7358dc2fe306bd0a39c6e
+SHA256 (f88a1f98fa7a44ccfcf33d810c72b200e7d9a78a.zip) = b209fe7fd0db5a2eb61db5d93525ce0f39e4d615f2f82bd02ff0ee512bd45a1e
diff --git a/spirv-tools/Pkgfile b/spirv-tools/Pkgfile
index cf8a28831..52ca56dae 100644
--- a/spirv-tools/Pkgfile
+++ b/spirv-tools/Pkgfile
@@ -1,35 +1,38 @@
 # Description: API and commands for processing SPIR-V modules
 # URL: https://www.khronos.org/vulkan/
 # Maintainer: Danny Rawlins, crux at romster dot me
-# Depends on: spirv-headers
 
 name=spirv-tools
-version=2020.5-b27b1af
+version=2020.7
 release=1
-source=(
-	#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
-	https://github.com/KhronosGroup/SPIRV-Tools/archive/b27b1afd12d05bf238ac7368bb49de73cd620a8e.zip
-	spirv-tools-gcc11.patch)
+source=(https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
+	https://github.com/KhronosGroup/SPIRV-Headers/archive/f88a1f98fa7a44ccfcf33d810c72b200e7d9a78a.zip)
 
 build() {
-	mv SPIRV-Tools-b27b1afd12d05bf238ac7368bb49de73cd620a8e SPIRV-Tools-$version
+	mv SPIRV-Headers-f88a1f98fa7a44ccfcf33d810c72b200e7d9a78a SPIRV-Headers
+	prt-get isinst ninja && PKGMK_SPIRV_TOOLS+=' -G Ninja'
 
-	local config="
--SSPIRV-Tools-$version \
--DCMAKE_INSTALL_PREFIX=/usr \
--DCMAKE_INSTALL_LIBDIR=lib \
--DCMAKE_BUILD_TYPE=Release \
--DSPIRV_WERROR=OFF \
--DSPIRV-Headers_SOURCE_DIR=/usr \
--DPYTHON_EXECUTABLE=/usr/bin/python3 \
--GNinja"
+	PKGMK_GLSLANG+=" \
+-S SPIRV-Tools-$version \
+-D CMAKE_INSTALL_PREFIX=/usr \
+-D CMAKE_INSTALL_LIBDIR=lib \
+-D CMAKE_BUILD_TYPE=Release \
+-D SPIRV_WERROR=OFF \
+-D SPIRV-Headers_SOURCE_DIR=/usr \
+-D PYTHON_EXECUTABLE=/usr/bin/python3 \
+-DSPIRV-Headers_SOURCE_DIR="${SRC}"/SPIRV-Headers \
+-Wno-dev"
 
-	patch -d SPIRV-Tools-$version -p1 -i $SRC/spirv-tools-gcc11.patch
-
-	cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
+	cmake -B build-static $PKGMK_GLSLANG \
+		-D CMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
+		-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
+		-D BUILD_SHARED_LIBS=OFF
 	cmake --build build-static
 
-	cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON
+	cmake -B build-shared $PKGMK_GLSLANG \
+		-D CMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
+		-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
+		-D BUILD_SHARED_LIBS=ON
 	cmake --build build-shared
 
 	DESTDIR=$PKG cmake --build build-static --target install
diff --git a/spirv-tools/spirv-tools-gcc11.patch b/spirv-tools/spirv-tools-gcc11.patch
deleted file mode 100644
index f5c82da08..000000000
--- a/spirv-tools/spirv-tools-gcc11.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp
-index edc27c8..77c29d7 100644
---- a/source/diagnostic.cpp
-+++ b/source/diagnostic.cpp
-@@ -37,7 +37,7 @@ spv_diagnostic spvDiagnosticCreate(const spv_position position,
-   diagnostic->position = *position;
-   diagnostic->isTextSource = false;
-   memset(diagnostic->error, 0, length);
--  strncpy(diagnostic->error, message, length);
-+  memcpy(diagnostic->error, message, length);
-   return diagnostic;
- }
- 


More information about the crux-commits mailing list