git: 3a0031639dc5 - main - graphics/spirv-cross: new port - required for games/lwjgl3

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Tue, 27 Feb 2024 21:26:15 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3a0031639dc5fe8d44b003fbf93512d8aacc4648

commit 3a0031639dc5fe8d44b003fbf93512d8aacc4648
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-02-27 21:09:51 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-02-27 21:25:47 +0000

    graphics/spirv-cross: new port - required for games/lwjgl3
    
    Tool for parsing and converting SPIR-V to other shader languages.
    
    This port required for build lwjgl 3, and lwjgl 3 required for Java
    Minecraft Client 1.20.x run on FreeBSD without linux compatibility layer.
    
    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D44118
---
 graphics/Makefile              |  1 +
 graphics/spirv-cross/Makefile  | 21 ++++++++++++++++++
 graphics/spirv-cross/distinfo  |  3 +++
 graphics/spirv-cross/pkg-descr | 16 ++++++++++++++
 graphics/spirv-cross/pkg-plist | 49 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 90 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index 7f5fc8a673d8..2886d06c1cf4 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -1121,6 +1121,7 @@
     SUBDIR += skanpage
     SUBDIR += spectacle
     SUBDIR += spectacle-devel
+    SUBDIR += spirv-cross
     SUBDIR += spirv-tools
     SUBDIR += springgraph
     SUBDIR += squish
diff --git a/graphics/spirv-cross/Makefile b/graphics/spirv-cross/Makefile
new file mode 100644
index 000000000000..e13bb76af627
--- /dev/null
+++ b/graphics/spirv-cross/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	spirv-cross
+DISTVERSION=	1.3.275.0
+CATEGORIES=	graphics
+
+MAINTAINER=	vvd@FreeBSD.org
+COMMENT=	Tool for parsing and converting SPIR-V to other shader languages
+WWW=		https://github.com/KhronosGroup/SPIRV-Cross
+
+LICENSE=	APACHE20
+
+USES=		cmake compiler:c++11-lib python:build
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	KhronosGroup
+GH_PROJECT=	SPIRV-Cross
+GH_TAGNAME=	vulkan-sdk-${DISTVERSION}
+
+CMAKE_ON=	SPIRV_CROSS_SHARED
+CMAKE_OFF=	SPIRV_CROSS_ENABLE_TESTS
+
+.include <bsd.port.mk>
diff --git a/graphics/spirv-cross/distinfo b/graphics/spirv-cross/distinfo
new file mode 100644
index 000000000000..7d1f484997a5
--- /dev/null
+++ b/graphics/spirv-cross/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1708974344
+SHA256 (KhronosGroup-SPIRV-Cross-1.3.275.0-vulkan-sdk-1.3.275.0_GH0.tar.gz) = 429ec74372a7a64ef144a42ab6a1aa23ac284d8069f1b6e6152dcb822ab7b3b1
+SIZE (KhronosGroup-SPIRV-Cross-1.3.275.0-vulkan-sdk-1.3.275.0_GH0.tar.gz) = 1780553
diff --git a/graphics/spirv-cross/pkg-descr b/graphics/spirv-cross/pkg-descr
new file mode 100644
index 000000000000..8497d2154502
--- /dev/null
+++ b/graphics/spirv-cross/pkg-descr
@@ -0,0 +1,16 @@
+SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader
+languages.
+
+Features:
+* Convert SPIR-V to readable, usable and efficient GLSL
+* Convert SPIR-V to readable, usable and efficient Metal Shading Language (MSL)
+* Convert SPIR-V to readable, usable and efficient HLSL
+* Convert SPIR-V to a JSON reflection format
+* Convert SPIR-V to debuggable C++ [DEPRECATED]
+* Reflection API to simplify the creation of Vulkan pipeline layouts
+* Reflection API to modify and tweak OpDecorations
+* Supports "all" of vertex, fragment, tessellation, geometry and compute shaders
+
+SPIRV-Cross tries hard to emit readable and clean output from the SPIR-V.
+The goal is to emit GLSL or MSL that looks like it was written by a human and
+not awkward IR/assembly-like code.
diff --git a/graphics/spirv-cross/pkg-plist b/graphics/spirv-cross/pkg-plist
new file mode 100644
index 000000000000..3bf0d154c593
--- /dev/null
+++ b/graphics/spirv-cross/pkg-plist
@@ -0,0 +1,49 @@
+bin/spirv-cross
+include/spirv_cross/GLSL.std.450.h
+include/spirv_cross/spirv.h
+include/spirv_cross/spirv.hpp
+include/spirv_cross/spirv_cfg.hpp
+include/spirv_cross/spirv_common.hpp
+include/spirv_cross/spirv_cpp.hpp
+include/spirv_cross/spirv_cross.hpp
+include/spirv_cross/spirv_cross_c.h
+include/spirv_cross/spirv_cross_containers.hpp
+include/spirv_cross/spirv_cross_error_handling.hpp
+include/spirv_cross/spirv_cross_parsed_ir.hpp
+include/spirv_cross/spirv_cross_util.hpp
+include/spirv_cross/spirv_glsl.hpp
+include/spirv_cross/spirv_hlsl.hpp
+include/spirv_cross/spirv_msl.hpp
+include/spirv_cross/spirv_parser.hpp
+include/spirv_cross/spirv_reflect.hpp
+lib/libspirv-cross-c-shared.so
+lib/libspirv-cross-c-shared.so.0
+lib/libspirv-cross-c-shared.so.0.58.0
+lib/libspirv-cross-c.a
+lib/libspirv-cross-core.a
+lib/libspirv-cross-cpp.a
+lib/libspirv-cross-glsl.a
+lib/libspirv-cross-hlsl.a
+lib/libspirv-cross-msl.a
+lib/libspirv-cross-reflect.a
+lib/libspirv-cross-util.a
+libdata/pkgconfig/spirv-cross-c-shared.pc
+libdata/pkgconfig/spirv-cross-c.pc
+share/spirv_cross_c/cmake/spirv_cross_cConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_c/cmake/spirv_cross_cConfig.cmake
+share/spirv_cross_c_shared/cmake/spirv_cross_c_sharedConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_c_shared/cmake/spirv_cross_c_sharedConfig.cmake
+share/spirv_cross_core/cmake/spirv_cross_coreConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_core/cmake/spirv_cross_coreConfig.cmake
+share/spirv_cross_cpp/cmake/spirv_cross_cppConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_cpp/cmake/spirv_cross_cppConfig.cmake
+share/spirv_cross_glsl/cmake/spirv_cross_glslConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_glsl/cmake/spirv_cross_glslConfig.cmake
+share/spirv_cross_hlsl/cmake/spirv_cross_hlslConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_hlsl/cmake/spirv_cross_hlslConfig.cmake
+share/spirv_cross_msl/cmake/spirv_cross_mslConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_msl/cmake/spirv_cross_mslConfig.cmake
+share/spirv_cross_reflect/cmake/spirv_cross_reflectConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_reflect/cmake/spirv_cross_reflectConfig.cmake
+share/spirv_cross_util/cmake/spirv_cross_utilConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/spirv_cross_util/cmake/spirv_cross_utilConfig.cmake