Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152512380
D44120.id135100.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D44120.id135100.diff
View Options
diff --git a/graphics/khronos-texture/Makefile b/graphics/khronos-texture/Makefile
new file mode 100644
--- /dev/null
+++ b/graphics/khronos-texture/Makefile
@@ -0,0 +1,45 @@
+PORTNAME= khronos-texture
+DISTVERSION= 4.3.1
+CATEGORIES= graphics
+
+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
+
+LIB_DEPENDS= libfmt.so:devel/libfmt
+BUILD_DEPENDS= bash:shells/bash
+
+USES= cmake compiler:c++11-lib localbase:ldflags python:build
+LDFLAGS+= -lfmt
+
+USE_GITHUB= yes
+GH_ACCOUNT= KhronosGroup
+GH_PROJECT= KTX-Software
+GH_TAGNAME= v${DISTVERSION}
+
+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
--- /dev/null
+++ b/graphics/khronos-texture/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1709040588
+SHA256 (KhronosGroup-KTX-Software-4.3.1-v4.3.1_GH0.tar.gz) = 98f051c91e723f85f3a5136a75dfa0ee186d72cc93223fd0daa1b3c8077ccb69
+SIZE (KhronosGroup-KTX-Software-4.3.1-v4.3.1_GH0.tar.gz) = 252417872
diff --git a/graphics/khronos-texture/files/patch-CMakeLists.txt b/graphics/khronos-texture/files/patch-CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/graphics/khronos-texture/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2024-02-27 15:40:40 UTC
++++ CMakeLists.txt
+@@ -1065,7 +1065,7 @@ endif()
+ # except for building the ktx library.
+ if((KTX_FEATURE_TOOLS OR KTX_FEATURE_TESTS) AND NOT TARGET fmt::fmt)
+ set(FMT_SYSTEM_HEADERS ON)
+- add_subdirectory(other_projects/fmt)
++# add_subdirectory(other_projects/fmt)
+ endif()
+ if(KTX_FEATURE_TOOLS AND NOT TARGET cxxopts::cxxopts)
+ add_subdirectory(other_projects/cxxopts)
diff --git a/graphics/khronos-texture/files/patch-tests_tests.cmake b/graphics/khronos-texture/files/patch-tests_tests.cmake
new file mode 100644
--- /dev/null
+++ b/graphics/khronos-texture/files/patch-tests_tests.cmake
@@ -0,0 +1,11 @@
+--- tests/tests.cmake.orig 2024-02-27 15:41:38 UTC
++++ tests/tests.cmake
+@@ -62,7 +62,7 @@ target_link_libraries(
+ unittests
+ gtest
+ ktx
+- fmt::fmt
++# fmt::fmt
+ ${CMAKE_THREAD_LIBS_INIT}
+ )
+
diff --git a/graphics/khronos-texture/files/patch-tools_imageio_CMakeLists.txt b/graphics/khronos-texture/files/patch-tools_imageio_CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/graphics/khronos-texture/files/patch-tools_imageio_CMakeLists.txt
@@ -0,0 +1,9 @@
+--- tools/imageio/CMakeLists.txt.orig 2024-02-27 15:41:01 UTC
++++ tools/imageio/CMakeLists.txt
+@@ -71,4 +71,5 @@ set_target_properties(imageio PROPERTIES
+ CXX_VISIBILITY_PRESET ${STATIC_APP_LIB_SYMBOL_VISIBILITY}
+ )
+
+-target_link_libraries(imageio fmt::fmt)
++#target_link_libraries(imageio fmt::fmt)
++target_link_libraries(imageio)
diff --git a/graphics/khronos-texture/files/patch-tools_ktx_CMakeLists.txt b/graphics/khronos-texture/files/patch-tools_ktx_CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/graphics/khronos-texture/files/patch-tools_ktx_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- tools/ktx/CMakeLists.txt.orig 2024-02-27 15:41:19 UTC
++++ tools/ktx/CMakeLists.txt
+@@ -63,7 +63,7 @@ PRIVATE
+ ktx
+ ${ASTCENC_LIB_TARGET}
+ $<IF:$<BOOL:${WIN32}>,Pathcch,> # For PathCchRemoveFileSpec on Windows
+- fmt::fmt
++# fmt::fmt
+ cxxopts::cxxopts
+ )
+
diff --git a/graphics/khronos-texture/pkg-descr b/graphics/khronos-texture/pkg-descr
new file mode 100644
--- /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
--- /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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 10:32 AM (9 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31596280
Default Alt Text
D44120.id135100.diff (5 KB)
Attached To
Mode
D44120: graphics/khronos-texture: new port - required for games/lwjgl3
Attached
Detach File
Event Timeline
Log In to Comment