pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
parallel/spirv-tools: Add version 2024.2
Module Name: pkgsrc-wip
Committed By: Frédéric Fauberteau <triaxx%NetBSD.org@localhost>
Pushed By: frederic
Date: Sun Dec 1 21:00:29 2024 +0100
Changeset: 04a44cff053b48388ae3423553610eb49a9cad40
Added Files:
spirv-tools/COMMIT_MSG
spirv-tools/DESCR
spirv-tools/Makefile
spirv-tools/PLIST
spirv-tools/distinfo
spirv-tools/patches/patch-CMakeLists.txt
spirv-tools/patches/patch-include_spirv-tools_libspirv.h
spirv-tools/patches/patch-source_binary.cpp
spirv-tools/patches/patch-source_operand.cpp
spirv-tools/patches/patch-source_print.cpp
Log Message:
parallel/spirv-tools: Add version 2024.2
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=04a44cff053b48388ae3423553610eb49a9cad40
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
spirv-tools/COMMIT_MSG | 3 ++
spirv-tools/DESCR | 9 +++++
spirv-tools/Makefile | 32 +++++++++++++++
spirv-tools/PLIST | 46 ++++++++++++++++++++++
spirv-tools/distinfo | 10 +++++
spirv-tools/patches/patch-CMakeLists.txt | 15 +++++++
.../patches/patch-include_spirv-tools_libspirv.h | 25 ++++++++++++
spirv-tools/patches/patch-source_binary.cpp | 26 ++++++++++++
spirv-tools/patches/patch-source_operand.cpp | 34 ++++++++++++++++
spirv-tools/patches/patch-source_print.cpp | 18 +++++++++
10 files changed, 218 insertions(+)
diffs:
diff --git a/spirv-tools/COMMIT_MSG b/spirv-tools/COMMIT_MSG
new file mode 100644
index 0000000000..0c2c524efa
--- /dev/null
+++ b/spirv-tools/COMMIT_MSG
@@ -0,0 +1,3 @@
+parallel/spirv-tools: Add version 2024.2
+
+Packaged in wip by Frédéric Fauberteau
diff --git a/spirv-tools/DESCR b/spirv-tools/DESCR
new file mode 100644
index 0000000000..2f4d81d723
--- /dev/null
+++ b/spirv-tools/DESCR
@@ -0,0 +1,9 @@
+The SPIR-V Tools project provides an API and commands for processing SPIR-V
+modules.
+
+The project includes an assembler, binary module parser, disassembler,
+validator, and optimizer for SPIR-V. Except for the optimizer, all are based
+on a common static library. The library contains all of the implementation
+details, and is used in the standalone tools whilst also enabling integration
+into other code bases directly. The optimizer implementation resides in its
+own library, which depends on the core library.
diff --git a/spirv-tools/Makefile b/spirv-tools/Makefile
new file mode 100644
index 0000000000..e6994023ff
--- /dev/null
+++ b/spirv-tools/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD$
+
+DISTNAME= SPIRV-Tools-2024.2
+PKGNAME= ${DISTNAME:tl}
+CATEGORIES= parallel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=KhronosGroup/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= triaxx%NetBSD.org@localhost
+HOMEPAGE= https://github.com/KhronosGroup/SPIRV-Tools/
+COMMENT= API and commands for processing SPIR-V modules
+LICENSE= apache-2.0
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+PKGCONFIG_OVERRIDE+= cmake/SPIRV-Tools-shared.pc.in
+PKGCONFIG_OVERRIDE+= cmake/SPIRV-Tools.pc.in
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+REPLACE_SH+= tools/lesspipe/spirv-lesspipe.sh
+
+CFLAGS+= -Wno-error=array-bounds
+
+CMAKE_CONFIGURE_ARGS+= -DCMAKE_BUILD_TYPE=Release
+CMAKE_CONFIGURE_ARGS+= -DSPIRV-Headers_SOURCE_DIR=${BUILDLINK_PREFIX.spirv-headers}
+
+.include "../../devel/cmake/build.mk"
+
+.include "../../parallel/spirv-headers/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/spirv-tools/PLIST b/spirv-tools/PLIST
new file mode 100644
index 0000000000..90254ff346
--- /dev/null
+++ b/spirv-tools/PLIST
@@ -0,0 +1,46 @@
+@comment $NetBSD$
+bin/spirv-as
+bin/spirv-cfg
+bin/spirv-dis
+bin/spirv-lesspipe.sh
+bin/spirv-link
+bin/spirv-lint
+bin/spirv-objdump
+bin/spirv-opt
+bin/spirv-reduce
+bin/spirv-val
+include/spirv-tools/instrument.hpp
+include/spirv-tools/libspirv.h
+include/spirv-tools/libspirv.hpp
+include/spirv-tools/linker.hpp
+include/spirv-tools/optimizer.hpp
+lib/cmake/SPIRV-Tools-diff/SPIRV-Tools-diffConfig.cmake
+lib/cmake/SPIRV-Tools-diff/SPIRV-Tools-diffTargets-release.cmake
+lib/cmake/SPIRV-Tools-diff/SPIRV-Tools-diffTargets.cmake
+lib/cmake/SPIRV-Tools-link/SPIRV-Tools-linkConfig.cmake
+lib/cmake/SPIRV-Tools-link/SPIRV-Tools-linkTargets-release.cmake
+lib/cmake/SPIRV-Tools-link/SPIRV-Tools-linkTargets.cmake
+lib/cmake/SPIRV-Tools-lint/SPIRV-Tools-lintConfig.cmake
+lib/cmake/SPIRV-Tools-lint/SPIRV-Tools-lintTargets-release.cmake
+lib/cmake/SPIRV-Tools-lint/SPIRV-Tools-lintTargets.cmake
+lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optConfig.cmake
+lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optTargets-release.cmake
+lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake
+lib/cmake/SPIRV-Tools-reduce/SPIRV-Tools-reduceConfig.cmake
+lib/cmake/SPIRV-Tools-reduce/SPIRV-Tools-reduceTarget-release.cmake
+lib/cmake/SPIRV-Tools-reduce/SPIRV-Tools-reduceTarget.cmake
+lib/cmake/SPIRV-Tools-tools/SPIRV-Tools-toolsConfig.cmake
+lib/cmake/SPIRV-Tools-tools/SPIRV-Tools-toolsTargets-release.cmake
+lib/cmake/SPIRV-Tools-tools/SPIRV-Tools-toolsTargets.cmake
+lib/cmake/SPIRV-Tools/SPIRV-ToolsConfig.cmake
+lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget-release.cmake
+lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake
+lib/libSPIRV-Tools-diff.a
+lib/libSPIRV-Tools-link.a
+lib/libSPIRV-Tools-lint.a
+lib/libSPIRV-Tools-opt.a
+lib/libSPIRV-Tools-reduce.a
+lib/libSPIRV-Tools-shared.so
+lib/libSPIRV-Tools.a
+lib/pkgconfig/SPIRV-Tools-shared.pc
+lib/pkgconfig/SPIRV-Tools.pc
diff --git a/spirv-tools/distinfo b/spirv-tools/distinfo
new file mode 100644
index 0000000000..85333b404d
--- /dev/null
+++ b/spirv-tools/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+BLAKE2s (SPIRV-Tools-2024.2.tar.gz) = 5f10b569568842fec5ffff65dc5b551c6ed80d2dca0c470b7ac3567639cb3ecb
+SHA512 (SPIRV-Tools-2024.2.tar.gz) = 1ac7195fb0a1d94f81702f4fe0e33da4b024a5c822d840fb3960665483fbbb163cb28f346d174856c7499422323bf891c334b0d9a8352ff3e0bc5aef8a5b037c
+Size (SPIRV-Tools-2024.2.tar.gz) = 3175743 bytes
+SHA1 (patch-CMakeLists.txt) = 766518783611a5bb65634b82eadea2592f9c602c
+SHA1 (patch-include_spirv-tools_libspirv.h) = fb9ef4384543943877f59a0d89400562fc347f67
+SHA1 (patch-source_binary.cpp) = deeee25f74fa45f68ce34c045f83cd9cd679f2e2
+SHA1 (patch-source_operand.cpp) = 675f4a5717f87107020b7c0eee43662c556abd32
+SHA1 (patch-source_print.cpp) = ee1dcd3f5695a2457826f6044428b2c0e026db37
diff --git a/spirv-tools/patches/patch-CMakeLists.txt b/spirv-tools/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..95b1cda143
--- /dev/null
+++ b/spirv-tools/patches/patch-CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add support of NetBSD platform.
+
+--- CMakeLists.txt.orig 2024-04-22 19:29:56.000000000 +0000
++++ CMakeLists.txt
+@@ -70,6 +70,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "
+ set(SPIRV_TIMER_ENABLED ${SPIRV_ALLOW_TIMERS})
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+ add_definitions(-DSPIRV_FREEBSD)
++elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
++ add_definitions(-DSPIRV_NETBSD)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
+ add_definitions(-DSPIRV_OPENBSD)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
diff --git a/spirv-tools/patches/patch-include_spirv-tools_libspirv.h b/spirv-tools/patches/patch-include_spirv-tools_libspirv.h
new file mode 100644
index 0000000000..631de76ca6
--- /dev/null
+++ b/spirv-tools/patches/patch-include_spirv-tools_libspirv.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+The symbol for FPEncoding is provided by the grammar of spirv-headers in
+version 1.3.296. But it is not handle in the latest stable version of
+spirv-tools.
+
+--- include/spirv-tools/libspirv.h.orig 2024-11-30 21:16:16.095487983 +0000
++++ include/spirv-tools/libspirv.h
+@@ -175,6 +175,7 @@ typedef enum spv_operand_type_t {
+ SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS, // SPIR-V Sec 3.29
+ SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO, // SPIR-V Sec 3.30
+ SPV_OPERAND_TYPE_CAPABILITY, // SPIR-V Sec 3.31
++ SPV_OPERAND_TYPE_FPENCODING, // SPIR-V Sec 3.51
+
+ // NOTE: New concrete enum values should be added at the end.
+
+@@ -236,6 +237,8 @@ typedef enum spv_operand_type_t {
+ // assemble regardless of where they occur -- literals, IDs, immediate
+ // integers, etc.
+ SPV_OPERAND_TYPE_OPTIONAL_CIV,
++ // An optional floating point encoding enum
++ SPV_OPERAND_TYPE_OPTIONAL_FPENCODING,
+
+ // A variable operand represents zero or more logical operands.
+ // In an instruction definition, this may only appear at the end of the
diff --git a/spirv-tools/patches/patch-source_binary.cpp b/spirv-tools/patches/patch-source_binary.cpp
new file mode 100644
index 0000000000..e6cbae8631
--- /dev/null
+++ b/spirv-tools/patches/patch-source_binary.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+The symbol for FPEncoding is provided by the grammar of spirv-headers in
+version 1.3.296. But it is not handle in the latest stable version of
+spirv-tools.
+
+--- source/binary.cpp.orig 2024-11-30 21:08:50.580118424 +0000
++++ source/binary.cpp
+@@ -671,6 +671,8 @@ spv_result_t Parser::parseOperand(size_t
+ case SPV_OPERAND_TYPE_OVERFLOW_MODES:
+ case SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT:
+ case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT:
++ case SPV_OPERAND_TYPE_FPENCODING:
++ case SPV_OPERAND_TYPE_OPTIONAL_FPENCODING:
+ case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: {
+ // A single word that is a plain enum value.
+
+@@ -679,6 +681,8 @@ spv_result_t Parser::parseOperand(size_t
+ parsed_operand.type = SPV_OPERAND_TYPE_ACCESS_QUALIFIER;
+ if (type == SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT)
+ parsed_operand.type = SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT;
++ if (type == SPV_OPERAND_TYPE_OPTIONAL_FPENCODING)
++ parsed_operand.type = SPV_OPERAND_TYPE_FPENCODING;
+
+ spv_operand_desc entry;
+ if (grammar_.lookupOperand(type, word, &entry)) {
diff --git a/spirv-tools/patches/patch-source_operand.cpp b/spirv-tools/patches/patch-source_operand.cpp
new file mode 100644
index 0000000000..77a5501bab
--- /dev/null
+++ b/spirv-tools/patches/patch-source_operand.cpp
@@ -0,0 +1,34 @@
+$NetBSD$
+
+The symbol for FPEncoding is provided by the grammar of spirv-headers in
+version 1.3.296. But it is not handle in the latest stable version of
+spirv-tools.
+
+--- source/operand.cpp.orig 2024-11-30 21:05:43.754585540 +0000
++++ source/operand.cpp
+@@ -252,6 +252,9 @@ const char* spvOperandTypeStr(spv_operan
+ return "OpenCL.DebugInfo.100 debug operation";
+ case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_IMPORTED_ENTITY:
+ return "OpenCL.DebugInfo.100 debug imported entity";
++ case SPV_OPERAND_TYPE_FPENCODING:
++ case SPV_OPERAND_TYPE_OPTIONAL_FPENCODING:
++ return "FP encoding";
+
+ // The next values are for values returned from an instruction, not actually
+ // an operand. So the specific strings don't matter. But let's add them
+@@ -366,6 +369,7 @@ bool spvOperandIsConcrete(spv_operand_ty
+ case SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL:
+ case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL:
+ case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS:
++ case SPV_OPERAND_TYPE_FPENCODING:
+ return true;
+ default:
+ break;
+@@ -407,6 +411,7 @@ bool spvOperandIsOptional(spv_operand_ty
+ case SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS:
+ case SPV_OPERAND_TYPE_OPTIONAL_CIV:
+ case SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS:
++ case SPV_OPERAND_TYPE_OPTIONAL_FPENCODING:
+ return true;
+ default:
+ break;
diff --git a/spirv-tools/patches/patch-source_print.cpp b/spirv-tools/patches/patch-source_print.cpp
new file mode 100644
index 0000000000..c4fe45da4b
--- /dev/null
+++ b/spirv-tools/patches/patch-source_print.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Add support of NetBSD platform.
+
+--- source/print.cpp.orig 2024-04-22 19:29:56.000000000 +0000
++++ source/print.cpp
+@@ -16,8 +16,9 @@
+
+ #if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \
+ defined(SPIRV_IOS) || defined(SPIRV_TVOS) || defined(SPIRV_FREEBSD) || \
+- defined(SPIRV_OPENBSD) || defined(SPIRV_EMSCRIPTEN) || \
+- defined(SPIRV_FUCHSIA) || defined(SPIRV_GNU) || defined(SPIRV_QNX)
++ defined(SPIRV_NETBSD) || defined(SPIRV_OPENBSD) || \
++ defined(SPIRV_EMSCRIPTEN) || defined(SPIRV_FUCHSIA) || \
++ defined(SPIRV_GNU) || defined(SPIRV_QNX)
+ namespace spvtools {
+
+ clr::reset::operator const char*() { return "\x1b[0m"; }
Home |
Main Index |
Thread Index |
Old Index