commit:     492ff32229b541198c6ac3822e34d7f29912d3cf
Author:     Patrick Nicolas <patricknicolas <AT> laposte <DOT> net>
AuthorDate: Mon Nov 10 16:22:20 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Nov 10 16:22:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=492ff322

media-gfx/KTX-Software: add 4.4.2

Signed-off-by: Patrick Nicolas <patricknicolas <AT> laposte.net>

 media-gfx/KTX-Software/KTX-Software-4.4.2.ebuild   | 46 ++++++++++++++++++++++
 media-gfx/KTX-Software/Manifest                    |  1 +
 .../files/KTX-Software-4.4.2-remove-O3.patch       | 16 ++++++++
 3 files changed, 63 insertions(+)

diff --git a/media-gfx/KTX-Software/KTX-Software-4.4.2.ebuild 
b/media-gfx/KTX-Software/KTX-Software-4.4.2.ebuild
new file mode 100644
index 0000000000..4bff770588
--- /dev/null
+++ b/media-gfx/KTX-Software/KTX-Software-4.4.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="KTX (Khronos Texture) Library and Tools"
+HOMEPAGE="https://github.com/KhronosGroup/KTX-Software";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+SRC_URI="https://github.com/KhronosGroup/KTX-Software/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+RDEPEND="
+"
+DEPEND="
+       ${RDEPEND}
+"
+BDEPEND="
+       app-shells/bash
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-remove-O3.patch"
+)
+
+src_configure() {
+       # basisu_kernels_sse.cpp has a #error if any of those are set
+       append-cxxflags $(test-flags-CXX -mno-avx)
+       append-cxxflags $(test-flags-CXX -mno-avx2)
+       append-cxxflags $(test-flags-CXX -mno-avx512f)
+       local mycmakeargs=(
+               -DKTX_VERSION=${PV}
+               -DKTX_FEATURE_TESTS=OFF
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+}

diff --git a/media-gfx/KTX-Software/Manifest b/media-gfx/KTX-Software/Manifest
index ed0a3266c6..b4daf2ef62 100644
--- a/media-gfx/KTX-Software/Manifest
+++ b/media-gfx/KTX-Software/Manifest
@@ -1 +1,2 @@
 DIST KTX-Software-4.3.2.tar.gz 252429885 BLAKE2B 
3d0950877c8192f009b8e80c366be152b9b536b84ea899ec43c115a41e7f2d7b896acce36091c3b5507facd16542d4a47f3d49721ecd9e4da146b41a261235f5
 SHA512 
0077315fe2b4e676e97e3a158c2c6e1f6ba426e14ad23342592cd69be28cfce64c40614e0a84d58a9634877ab334e713b94d4c962132c98bfea308e91bc8a98a
+DIST KTX-Software-4.4.2.tar.gz 212599126 BLAKE2B 
3e3951fc8904d9bcd7c2e25502248f8af18830d6a7273a4666268d84f9e09fba610ea8dbd7b6088630c56f9ca7efc4ef001988cf257f90f1cf06a01aabfcb388
 SHA512 
19514da2d5b021d7fd1e24251dfd27d0e032018bdb84c7f76328de0ad431aeff12a77e7b3c857a1933a0b258a83ffd4b77cd053672702cc6f7132afcd1fa253e

diff --git a/media-gfx/KTX-Software/files/KTX-Software-4.4.2-remove-O3.patch 
b/media-gfx/KTX-Software/files/KTX-Software-4.4.2-remove-O3.patch
new file mode 100644
index 0000000000..915b760c79
--- /dev/null
+++ b/media-gfx/KTX-Software/files/KTX-Software-4.4.2-remove-O3.patch
@@ -0,0 +1,16 @@
+diff '--color=auto' -rdu KTX-Software-4.4.2.orig/CMakeLists.txt 
KTX-Software-4.4.2/CMakeLists.txt
+--- KTX-Software-4.4.2.orig/CMakeLists.txt     2025-10-04 10:06:54.000000000 
+0200
++++ KTX-Software-4.4.2/CMakeLists.txt  2025-11-10 17:09:38.915364210 +0100
+@@ -311,12 +311,6 @@
+ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU"
+        OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+     add_compile_options( -Wall -Wextra $<$<BOOL:${KTX_WERROR}>:-Werror>)
+-    add_compile_options( $<IF:$<CONFIG:Debug>,-O0$<SEMICOLON>-g,-O3> )
+-    if(EMSCRIPTEN)
+-        add_link_options( $<IF:$<CONFIG:Debug>,-gsource-map,-O3> )
+-    else()
+-        add_link_options( $<IF:$<CONFIG:Debug>,-g,-O3> )
+-    endif()
+ else()
+     message(FATAL_ERROR "${CMAKE_CXX_COMPILER_ID} not yet supported.")
+ endif()

Reply via email to