[packages/gtest] - updated to 1.15.2, force C++17 for std::string_view support
qboosh
qboosh at pld-linux.org
Mon Sep 9 07:52:44 CEST 2024
commit a5d1a965fc95498e2e05b43b20af415895b57142
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Sep 9 06:31:51 2024 +0200
- updated to 1.15.2, force C++17 for std::string_view support
cmake.patch | 6 +++---
gtest.spec | 18 ++++++++++--------
2 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/gtest.spec b/gtest.spec
index ccb1e26..2d0ec07 100644
--- a/gtest.spec
+++ b/gtest.spec
@@ -6,19 +6,17 @@
Summary: Google C++ testing framework
Summary(pl.UTF-8): Szkielet testów w C++ stworzony przez Google
Name: gtest
-Version: 1.14.0
+Version: 1.15.2
Release: 1
License: BSD
Group: Development/Tools
#Source0Download: https://github.com/google/googletest/releases
Source0: https://github.com/google/googletest/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: c8340a482851ef6a3fe618a082304cfc
+# Source0-md5: 7e11f6cfcf6498324ac82d567dcb891e
Patch0: cmake.patch
URL: https://github.com/google/googletest
BuildRequires: cmake >= 3.13
-BuildRequires: libstdc++-devel >= 6:5
-BuildRequires: python >= 2.3
-BuildRequires: python-modules >= 2.3
+BuildRequires: libstdc++-devel >= 6:7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -43,7 +41,7 @@ Summary: Development files for gtest framework
Summary(pl.UTF-8): Pliki programistyczne szkieletu gtest
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: libstdc++-devel >= 6:5
+Requires: libstdc++-devel >= 6:7
%description devel
This package contains development files for gtest framework.
@@ -154,13 +152,17 @@ Kod źródłowy szkieletu gmock do osadzania go w innych projektach.
%build
# Note: official build system is now Bazel - but it's extremely distro unfriendly.
# Use unofficial, community maintained CMake suite.
+# Force C++17 for std::string_view support.
%if %{with static_libs}
%cmake -B build-static \
- -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_SHARED_LIBS=OFF \
+ -DCMAKE_CXX_STANDARD=17
+
%{__make} -C build-static
%endif
-%cmake -B build
+%cmake -B build \
+ -DCMAKE_CXX_STANDARD=17
%{__make} -C build
diff --git a/cmake.patch b/cmake.patch
index f108754..db5f3e5 100644
--- a/cmake.patch
+++ b/cmake.patch
@@ -1,5 +1,5 @@
---- googletest-1.14.0/googletest/CMakeLists.txt.orig 2023-12-16 20:46:54.618198769 +0100
-+++ googletest-1.14.0/googletest/CMakeLists.txt 2023-12-16 20:48:29.031020624 +0100
+--- googletest-1.15.2/googletest/CMakeLists.txt.orig 2024-09-08 17:02:41.518431592 +0200
++++ googletest-1.15.2/googletest/CMakeLists.txt 2024-09-08 17:04:15.467922624 +0200
@@ -143,10 +143,10 @@ set_target_properties(gtest_main PROPERT
string(REPLACE ";" "$<SEMICOLON>" dirs "${gtest_build_include_dirs}")
target_include_directories(gtest SYSTEM INTERFACE
@@ -10,7 +10,7 @@
"$<BUILD_INTERFACE:${dirs}>"
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
- if(CMAKE_SYSTEM_NAME MATCHES "QNX")
+ if(CMAKE_SYSTEM_NAME MATCHES "QNX" AND CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 7.1)
target_link_libraries(gtest PUBLIC regex)
endif()
--- googletest-1.14.0/googlemock/CMakeLists.txt.orig 2023-12-16 20:46:54.621532084 +0100
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gtest.git/commitdiff/a5d1a965fc95498e2e05b43b20af415895b57142
More information about the pld-cvs-commit
mailing list