From 201b3af739bc673f6a359eaa076b0765c6d8c47b329c8300825e92c1bb9d06e0 Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Wed, 3 Apr 2024 12:54:48 +0000 Subject: [PATCH] Accepting request 1164360 from home:AndreasStieger:branches:security:privacy - switch to C++14 to fix build with new GoogleTest 1.14.0 add rnp-v0.17.0-cpp14-googletest.patch OBS-URL: https://build.opensuse.org/request/show/1164360 OBS-URL: https://build.opensuse.org/package/show/security:privacy/rnp?expand=0&rev=31 --- rnp-v0.17.0-cpp14-googletest.patch | 20 ++++++++++++++++++++ rnp.changes | 6 ++++++ rnp.spec | 1 + 3 files changed, 27 insertions(+) create mode 100644 rnp-v0.17.0-cpp14-googletest.patch diff --git a/rnp-v0.17.0-cpp14-googletest.patch b/rnp-v0.17.0-cpp14-googletest.patch new file mode 100644 index 0000000..2496011 --- /dev/null +++ b/rnp-v0.17.0-cpp14-googletest.patch @@ -0,0 +1,20 @@ +https://github.com/rnpgp/rnp/pull/2209 +GoogleTest 1.14.0 requires C++ 14: + +[ 26s] /usr/include/gtest/internal/gtest-port.h:279:2: error: #error C++ versions less than C++14 are not supported. +[ 26s] 279 | #error C++ versions less than C++14 are not supported. +[ 26s] | ^~~~~ + +Index: rnp-v0.17.0/CMakeLists.txt +=================================================================== +--- rnp-v0.17.0.orig/CMakeLists.txt ++++ rnp-v0.17.0/CMakeLists.txt +@@ -137,7 +137,7 @@ endif(WIN32) + + # set a few other things at the top level to prevent incompatibilities + set(CMAKE_C_STANDARD 99) +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + add_definitions(-D_GNU_SOURCE) diff --git a/rnp.changes b/rnp.changes index bf6cb42..bfef6e2 100644 --- a/rnp.changes +++ b/rnp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 3 11:14:34 UTC 2024 - Andreas Stieger + +- switch to C++14 to fix build with new GoogleTest 1.14.0 + add rnp-v0.17.0-cpp14-googletest.patch + ------------------------------------------------------------------- Sat Jan 20 09:52:21 UTC 2024 - Andreas Stieger diff --git a/rnp.spec b/rnp.spec index 37f1119..26c3e5c 100644 --- a/rnp.spec +++ b/rnp.spec @@ -30,6 +30,7 @@ Patch0: rnp-v0.17.0-disable-static.patch Patch2: rnp-v0.17.0-system-sexp.patch Patch3: rnp-v0.17.0-tests.patch Patch4: rnp-v0.17.0-test-SHA1-cutoff.patch +Patch5: rnp-v0.17.0-cpp14-googletest.patch BuildRequires: cmake >= 3.18 BuildRequires: gcc-c++ BuildRequires: gpg2 >= 2.2