commit:     c8c6337dc8dbc5d479cc6b9d337593f3027a9c70
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Wed Mar  4 01:11:15 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  4 01:23:29 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8c6337d

dev-cpp/jsoncons: remove -Werror

Closes: https://bugs.gentoo.org/970841
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/209
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/jsoncons/files/jsoncons-1.5.0-werror.patch | 27 ++++++++++++++++++++++
 dev-cpp/jsoncons/jsoncons-1.5.0.ebuild             |  6 ++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/dev-cpp/jsoncons/files/jsoncons-1.5.0-werror.patch 
b/dev-cpp/jsoncons/files/jsoncons-1.5.0-werror.patch
new file mode 100644
index 000000000000..d810857f9418
--- /dev/null
+++ b/dev-cpp/jsoncons/files/jsoncons-1.5.0-werror.patch
@@ -0,0 +1,27 @@
+Remove -Werror
+
+https://bugs.gentoo.org/970841
+
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -219,20 +219,6 @@ target_compile_options(unit_tests PRIVATE
+     $<$<CXX_COMPILER_ID:MSVC>: /EHsc /MP /bigobj /W4>
+ )
+ 
+-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION 
VERSION_GREATER_EQUAL "8.0")
+-    message(STATUS Version " ${CMAKE_CXX_COMPILER_VERSION}")
+-    # older GCC versions don't support 
+-   target_compile_options(unit_tests PRIVATE
+-       $<$<CXX_COMPILER_ID:GNU>:-Werror=maybe-uninitialized 
-Wnon-virtual-dtor -Werror=free-nonheap-object -Werror=stringop-overflow 
-Werror -Wall -Wextra -Wcast-align -Wcast-qual -Wimplicit-fallthrough 
-Wsign-compare -pedantic -Wnonnull -Wnull-dereference -Werror=nonnull>
+-   )
+-endif()
+-
+-if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+-target_compile_options(unit_tests PRIVATE
+-    $<$<CXX_COMPILER_ID:Clang>:-Werror=uninitialized -Werror -Wall -Wextra 
-Wimplicit-fallthrough -Wcast-align -Wcast-qual -Wsign-compare -pedantic>
+-)
+-endif()
+-
+ add_test(NAME unit_tests COMMAND unit_tests WORKING_DIRECTORY 
${CMAKE_SOURCE_DIR}/test)
+ 
+ target_include_directories (unit_tests 

diff --git a/dev-cpp/jsoncons/jsoncons-1.5.0.ebuild 
b/dev-cpp/jsoncons/jsoncons-1.5.0.ebuild
index 79fff7668853..466bf282e863 100644
--- a/dev-cpp/jsoncons/jsoncons-1.5.0.ebuild
+++ b/dev-cpp/jsoncons/jsoncons-1.5.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2025 Gentoo Authors
+# Copyright 2025-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -17,6 +17,10 @@ RESTRICT="!test? ( test )"
 
 DOCS=( doc )
 
+PATCHES=(
+       "${FILESDIR}/jsoncons-1.5.0-werror.patch"
+)
+
 # uses modified version of catch.hpp, doesn't work with upstream catch2
 
 src_configure() {

Reply via email to