summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch22
-rw-r--r--dev-cpp/magic_enum/magic_enum-0.9.5.ebuild4
2 files changed, 26 insertions, 0 deletions
diff --git a/dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch b/dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch
new file mode 100644
index 000000000000..6f28fa7ef704
--- /dev/null
+++ b/dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch
@@ -0,0 +1,22 @@
+--- a/example/CMakeLists.txt
++++ b/example/CMakeLists.txt
+@@ -2,7 +2,7 @@ include(CheckCXXCompilerFlag)
+
+ set(CMAKE_CXX_STANDARD 17)
+ if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+- set(OPTIONS -Wall -Wextra -pedantic-errors -Werror)
++ set(OPTIONS -Wall -Wextra)
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ set(OPTIONS /W4 /WX)
+ if(HAS_PERMISSIVE_FLAG)
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -12,7 +12,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG)
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+ set(CMAKE_VERBOSE_MAKEFILE ON)
+- set(OPTIONS -Wall -Wextra -pedantic-errors -Werror)
++ set(OPTIONS -Wall -Wextra)
+
+ check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG)
+ check_cxx_compiler_flag(-std=c++23 HAS_CPP23_FLAG)
diff --git a/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild b/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild
index 6dea37219253..1077c351e165 100644
--- a/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild
+++ b/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild
@@ -17,6 +17,10 @@ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86"
IUSE="test"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.5-werror.patch
+)
+
src_configure() {
local mycmakeargs=(
-DMAGIC_ENUM_OPT_BUILD_TESTS=$(usex test)