git: f892ca876965 - main - graphics/khronos-texture: new port - required for games/lwjgl3

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Fri, 01 Mar 2024 16:48:13 UTC
The branch main has been updated by vvd:

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

commit f892ca876965b22946bfdae27ad875eecce9a3b8
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-03-01 16:45:23 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-03-01 16:48:00 +0000

    graphics/khronos-texture: new port - required for games/lwjgl3
    
    This port required for build lwjgl 3, and lwjgl 3 required for run Java
    Minecraft Client 1.20.x on FreeBSD without linux compatibility layer.
    
    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D44120
---
 graphics/khronos-texture/Makefile  | 45 ++++++++++++++++++++++++++++++++++++++
 graphics/khronos-texture/distinfo  |  3 +++
 graphics/khronos-texture/pkg-descr | 11 ++++++++++
 graphics/khronos-texture/pkg-plist | 16 ++++++++++++++
 4 files changed, 75 insertions(+)

diff --git a/graphics/khronos-texture/Makefile b/graphics/khronos-texture/Makefile
new file mode 100644
index 000000000000..7661a24beae3
--- /dev/null
+++ b/graphics/khronos-texture/Makefile
@@ -0,0 +1,45 @@
+PORTNAME=	khronos-texture
+DISTVERSION=	4.3.1
+CATEGORIES=	graphics
+DISTVERSIONPREFIX=	v
+
+MAINTAINER=	vvd@FreeBSD.org
+COMMENT=	Khronos Texture is a container for textures for OpenGL/Vulkan/etc
+WWW=		https://github.com/KhronosGroup/KTX-Software
+
+LICENSE=	APACHE20
+
+BUILD_DEPENDS=	bash:shells/bash
+
+USES=		cmake compiler:c++11-lib python:build
+
+CMAKE_OFF=	FMT_INSTALL
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	KhronosGroup
+GH_PROJECT=	KTX-Software
+
+OPTIONS_SINGLE=			SIMD
+OPTIONS_SINGLE_SIMD=		AVX2 NEON NONE SSE2 SSE41
+OPTIONS_EXCLUDE=		${${ARCH} != amd64 && ${ARCH} != i386:?AVX2 SSE2 SSE41:}
+OPTIONS_EXCLUDE+=		${${ARCH} != armv6 && ${ARCH} != armv7 && ${ARCH} != aarch64:?NEON:}
+OPTIONS_DEFAULT_aarch64=	NEON
+OPTIONS_DEFAULT_amd64=		SSE2
+OPTIONS_DEFAULT_armv7=		NEON
+
+AVX2_DESC=		Use the AVX2 instruction set
+AVX2_CMAKE_ON=		-DASTCENC_ISA_AVX2:BOOL=ON -DBASISU_SUPPORT_SSE:BOOL=ON
+
+NEON_DESC=		Use the NEON instruction set
+NEON_CMAKE_ON=		-DASTCENC_ISA_NEON:BOOL=ON
+
+NONE_DESC=		Don't use any SIMD instructions
+NONE_CMAKE_ON=		-DASTCENC_ISA_NONE:BOOL=ON -DBASISU_SUPPORT_SSE:BOOL=OFF
+
+SSE2_DESC=		Use the SSE2 instruction set
+SSE2_CMAKE_ON=		-DASTCENC_ISA_SSE2:BOOL=ON -DBASISU_SUPPORT_SSE:BOOL=OFF
+
+SSE41_DESC=		Use the SSE4.1 instruction set
+SSE41_CMAKE_ON=		-DASTCENC_ISA_SSE41:BOOL=ON -DBASISU_SUPPORT_SSE:BOOL=ON
+
+.include <bsd.port.mk>
diff --git a/graphics/khronos-texture/distinfo b/graphics/khronos-texture/distinfo
new file mode 100644
index 000000000000..01d97fded529
--- /dev/null
+++ b/graphics/khronos-texture/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1709307214
+SHA256 (KhronosGroup-KTX-Software-v4.3.1_GH0.tar.gz) = 98f051c91e723f85f3a5136a75dfa0ee186d72cc93223fd0daa1b3c8077ccb69
+SIZE (KhronosGroup-KTX-Software-v4.3.1_GH0.tar.gz) = 252417872
diff --git a/graphics/khronos-texture/pkg-descr b/graphics/khronos-texture/pkg-descr
new file mode 100644
index 000000000000..a0ed424eb75b
--- /dev/null
+++ b/graphics/khronos-texture/pkg-descr
@@ -0,0 +1,11 @@
+KTX (Khronos Texture) is a lightweight container for textures for OpenGL(R),
+Vulkan(R) and other GPU APIs. KTX files contain all the parameters needed
+for texture loading. A single file can contain anything from a simple
+base-level 2D texture through to a cubemap array texture with mipmaps.
+Contained textures can be in a Basis Universal format, in any of the
+block-compressed formats supported by OpenGL family and Vulkan APIs and
+extensions or in an uncompressed single-plane format. Basis Universal
+currently encompasses two formats that can be quickly transcoded to any
+GPU-supported format: LZ/ETC1S, which combines block-compression and
+supercompression, and UASTC, a block-compressed format. Formats other than
+LZ/ETC1S can be supercompressed with Zstd and ZLIB.
diff --git a/graphics/khronos-texture/pkg-plist b/graphics/khronos-texture/pkg-plist
new file mode 100644
index 000000000000..fff210b157c0
--- /dev/null
+++ b/graphics/khronos-texture/pkg-plist
@@ -0,0 +1,16 @@
+bin/ktx
+bin/ktx2check
+bin/ktx2ktx2
+bin/ktxinfo
+bin/ktxsc
+bin/toktx
+include/KHR/khr_df.h
+include/ktx.h
+include/ktxvulkan.h
+lib/cmake/ktx/KtxConfig.cmake
+lib/cmake/ktx/KtxConfigVersion.cmake
+lib/cmake/ktx/KtxTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/ktx/KtxTargets.cmake
+lib/libktx.so
+lib/libktx.so.0
+lib/libktx.so.0.0.0