media-gfx/KTX-Software: patches for O3 and Werror

Signed-off-by: Patrick Nicolas <patricknicolas@laposte.net>
This commit is contained in:
Patrick Nicolas 2024-10-30 16:30:32 +01:00
parent 70c54412ff
commit 8b6cc09e70
No known key found for this signature in database
GPG Key ID: 71552118060DD0C5
3 changed files with 32 additions and 0 deletions

View File

@ -24,6 +24,10 @@ BDEPEND="
app-shells/bash
"
PATCHES=(
"${FILESDIR}/${P}-remove-O3.patch"
"${FILESDIR}/${P}-remove-Werror.patch"
)
src_configure() {
# basisu_kernels_sse.cpp has a #error if any of those are set

View File

@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e99fb143..05691fa4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,11 +280,8 @@ if(MSVC)
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,-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.")

View File

@ -0,0 +1,12 @@
diff --git a/lib/astc-encoder/Source/cmake_core.cmake b/lib/astc-encoder/Source/cmake_core.cmake
index eec1f459..eb149503 100644
--- a/lib/astc-encoder/Source/cmake_core.cmake
+++ b/lib/astc-encoder/Source/cmake_core.cmake
@@ -168,7 +168,6 @@ macro(astcenc_set_properties ASTCENC_TARGET_NAME ASTCENC_IS_VENEER)
$<${is_gnu_fe}:-Wall>
$<${is_gnu_fe}:-Wextra>
$<${is_gnu_fe}:-Wpedantic>
- $<${is_gnu_fe}:-Werror>
$<${is_gnu_fe}:-Wshadow>
$<${is_gnu_fe}:-Wdouble-promotion>
$<${is_clang}:-Wdocumentation>