diff --git a/.gitignore b/.gitignore index b869372..9a7211e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ gtest-1.4.0.tar.bz2 /release-1.8.0.tar.gz /release-1.8.1.tar.gz /googletest-release-1.10.0.tar.gz +/googletest-release-1.11.0.tar.gz diff --git a/gtest-1.10.0-add-missing-pkgconfig-requires.patch b/gtest-1.10.0-add-missing-pkgconfig-requires.patch deleted file mode 100644 index 6fb997e..0000000 --- a/gtest-1.10.0-add-missing-pkgconfig-requires.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/googlemock/cmake/gmock.pc.in b/googlemock/cmake/gmock.pc.in -index 5780fcaa5..23c67b5c8 100644 ---- a/googlemock/cmake/gmock.pc.in -+++ b/googlemock/cmake/gmock.pc.in -@@ -5,6 +5,6 @@ Name: gmock - Description: GoogleMock (without main() function) - Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest --Requires: gtest -+Requires: gtest = @PROJECT_VERSION@ - Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ - Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ -diff --git a/googlemock/cmake/gmock_main.pc.in b/googlemock/cmake/gmock_main.pc.in -index f2dfe69e0..66ffea7f4 100644 ---- a/googlemock/cmake/gmock_main.pc.in -+++ b/googlemock/cmake/gmock_main.pc.in -@@ -5,6 +5,6 @@ Name: gmock_main - Description: GoogleMock (with main() function) - Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest --Requires: gmock -+Requires: gmock = @PROJECT_VERSION@ - Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ - Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ -diff --git a/googletest/cmake/gtest_main.pc.in b/googletest/cmake/gtest_main.pc.in -index 1e01bd19a..38c88c54d 100644 ---- a/googletest/cmake/gtest_main.pc.in -+++ b/googletest/cmake/gtest_main.pc.in -@@ -5,6 +5,6 @@ Name: gtest_main - Description: GoogleTest (with main() function) - Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest --Requires: gtest -+Requires: gtest = @PROJECT_VERSION@ - Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ - Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ diff --git a/gtest-1.8.1-libversion.patch b/gtest-1.8.1-libversion.patch deleted file mode 100644 index 609ab5f..0000000 --- a/gtest-1.8.1-libversion.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt -index 8a8de1f..d67c0f5 100644 ---- a/googlemock/CMakeLists.txt -+++ b/googlemock/CMakeLists.txt -@@ -109,8 +109,10 @@ if (MSVC) - else() - cxx_library(gmock "${cxx_strict}" src/gmock-all.cc) - target_link_libraries(gmock PUBLIC gtest) -+ set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION}) - cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) - target_link_libraries(gmock_main PUBLIC gmock) -+ set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION}) - endif() - # If the CMake version supports it, attach header directory information - # to the targets for when we are part of a parent build (ie being pulled -diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt -index 9ee7940..1f3de11 100644 ---- a/googletest/CMakeLists.txt -+++ b/googletest/CMakeLists.txt -@@ -131,7 +131,9 @@ endif() - # are used for other targets, to ensure that gtest can be compiled by a user - # aggressive about warnings. - cxx_library(gtest "${cxx_strict}" src/gtest-all.cc) -+set_target_properties(gtest PROPERTIES VERSION ${GOOGLETEST_VERSION}) - cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc) -+set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION}) - # If the CMake version supports it, attach header directory information - # to the targets for when we are part of a parent build (ie being pulled - # in via add_subdirectory() rather than being a standalone build). diff --git a/gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch b/gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch deleted file mode 100644 index 0e72fad..0000000 --- a/gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 5126ff48d9ac54828d1947d1423a5ef2a8efee3b Mon Sep 17 00:00:00 2001 -From: David Seifert -Date: Sat, 5 Oct 2019 15:58:45 +0200 -Subject: [PATCH 1/2] Revert "Use pcfiledir for prefix in pkgconfig file" - -The change makes implicit assumptions on the layout of the install -tree, which is going to break in many ways. - -The correct solution is to use the `PKG_CONFIG_SYSROOT_DIR` variable -to inject the cross-compiled sysroot into `-I` and `-L` paths. ---- - googlemock/cmake/gmock.pc.in | 5 ++--- - googlemock/cmake/gmock_main.pc.in | 5 ++--- - googletest/cmake/gtest.pc.in | 5 ++--- - googletest/cmake/gtest_main.pc.in | 5 ++--- - 4 files changed, 8 insertions(+), 12 deletions(-) - -diff --git a/googlemock/cmake/gmock.pc.in b/googlemock/cmake/gmock.pc.in -index 08e045474..2ef0fbca1 100644 ---- a/googlemock/cmake/gmock.pc.in -+++ b/googlemock/cmake/gmock.pc.in -@@ -1,6 +1,5 @@ --prefix=${pcfiledir}/../.. --libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ --includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ -+libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - - Name: gmock - Description: GoogleMock (without main() function) -diff --git a/googlemock/cmake/gmock_main.pc.in b/googlemock/cmake/gmock_main.pc.in -index b22fe6148..04658fe2e 100644 ---- a/googlemock/cmake/gmock_main.pc.in -+++ b/googlemock/cmake/gmock_main.pc.in -@@ -1,6 +1,5 @@ --prefix=${pcfiledir}/../.. --libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ --includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ -+libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - - Name: gmock_main - Description: GoogleMock (with main() function) -diff --git a/googletest/cmake/gtest.pc.in b/googletest/cmake/gtest.pc.in -index 9aae29e26..e7967ad56 100644 ---- a/googletest/cmake/gtest.pc.in -+++ b/googletest/cmake/gtest.pc.in -@@ -1,6 +1,5 @@ --prefix=${pcfiledir}/../.. --libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ --includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ -+libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - - Name: gtest - Description: GoogleTest (without main() function) -diff --git a/googletest/cmake/gtest_main.pc.in b/googletest/cmake/gtest_main.pc.in -index 915f2973a..fe25d9c73 100644 ---- a/googletest/cmake/gtest_main.pc.in -+++ b/googletest/cmake/gtest_main.pc.in -@@ -1,6 +1,5 @@ --prefix=${pcfiledir}/../.. --libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ --includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ -+libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - - Name: gtest_main - Description: GoogleTest (with main() function) - -From b96832a44b4994cafc824f200d69232d79f30d81 Mon Sep 17 00:00:00 2001 -From: David Seifert -Date: Sat, 5 Oct 2019 15:58:48 +0200 -Subject: [PATCH 2/2] Add documentation for pkg-config in cross-compilation - settings - ---- - googletest/docs/pkgconfig.md | 78 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 78 insertions(+) - -diff --git a/googletest/docs/pkgconfig.md b/googletest/docs/pkgconfig.md -index 6dc067388..d5f361448 100644 ---- a/googletest/docs/pkgconfig.md -+++ b/googletest/docs/pkgconfig.md -@@ -139,3 +139,81 @@ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig - ``` - - pkg-config will also try to look in `PKG_CONFIG_PATH` to find `gtest_main.pc`. -+ -+### Using pkg-config in a cross-compilation setting -+ -+Pkg-config can be used in a cross-compilation setting too. To do this, let's -+assume the final prefix of the cross-compiled installation will be `/usr`, -+and your sysroot is `/home/MYUSER/sysroot`. Configure and install GTest using -+ -+``` -+mkdir build && cmake -DCMAKE_INSTALL_PREFIX=/usr .. -+``` -+ -+Install into the sysroot using `DESTDIR`: -+ -+``` -+make -j install DESTDIR=/home/MYUSER/sysroot -+``` -+ -+Before we continue, it is recommended to **always** define the following two -+variables for pkg-config in a cross-compilation setting: -+ -+``` -+export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=yes -+export PKG_CONFIG_ALLOW_SYSTEM_LIBS=yes -+``` -+ -+otherwise `pkg-config` will filter `-I` and `-L` flags against standard -+prefixes such as `/usr` (see https://bugs.freedesktop.org/show_bug.cgi?id=28264#c3 -+for reasons why this stripping needs to occur usually). -+ -+If you look at the generated pkg-config file, it will look something like -+ -+``` -+libdir=/usr/lib64 -+includedir=/usr/include -+ -+Name: gtest -+Description: GoogleTest (without main() function) -+Version: 1.10.0 -+URL: https://github.com/google/googletest -+Libs: -L${libdir} -lgtest -lpthread -+Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -lpthread -+``` -+ -+Notice that the sysroot is not included in `libdir` and `includedir`! If you -+try to run `pkg-config` with the correct -+`PKG_CONFIG_LIBDIR=/home/MYUSER/sysroot/usr/lib64/pkgconfig` against this `.pc` -+file, you will get -+ -+``` -+$ pkg-config --cflags gtest -+-DGTEST_HAS_PTHREAD=1 -lpthread -I/usr/include -+$ pkg-config --libs gtest -+-L/usr/lib64 -lgtest -lpthread -+``` -+ -+which is obviously wrong and points to the `CBUILD` and not `CHOST` root. -+In order to use this in a cross-compilation setting, we need to tell -+pkg-config to inject the actual sysroot into `-I` and `-L` variables. Let us -+now tell pkg-config about the actual sysroot -+ -+``` -+export PKG_CONFIG_DIR= -+export PKG_CONFIG_SYSROOT_DIR=/home/MYUSER/sysroot -+export PKG_CONFIG_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}/usr/lib64/pkgconfig -+``` -+ -+and running `pkg-config` again we get -+ -+``` -+$ pkg-config --cflags gtest -+-DGTEST_HAS_PTHREAD=1 -lpthread -I/home/MYUSER/sysroot/usr/include -+$ pkg-config --libs gtest -+-L/home/MYUSER/sysroot/usr/lib64 -lgtest -lpthread -+``` -+ -+which contains the correct sysroot now. For a more comprehensive guide to -+also including `${CHOST}` in build system calls, see the excellent tutorial -+by Diego Elio Pettenò: https://autotools.io/pkgconfig/cross-compiling.html diff --git a/gtest-PR2556-pkg-config-Remove-pthread-link-flag-from-Cflags.patch b/gtest-PR2556-pkg-config-Remove-pthread-link-flag-from-Cflags.patch deleted file mode 100644 index 80f9ce7..0000000 --- a/gtest-PR2556-pkg-config-Remove-pthread-link-flag-from-Cflags.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 6caa879a42d97f1b02ecc90c77fc486220251fa1 Mon Sep 17 00:00:00 2001 -From: Martin Erik Werner -Date: Sat, 19 Oct 2019 19:37:16 +0200 -Subject: [PATCH] pkg-config: Remove pthread link flag from Cflags - -Remove the threads link library variable references from the pkg-config -Cflags: field, removing -lpthread(s) from the compile flags. - -"-l*" linker flags should only be part of the Libs: section and should -not be part of the Cflags: section in pkg-config files. - -This was first suggested in -https://github.com/google/googletest/pull/2006 and further discussed in -https://github.com/google/googletest/pull/2483 . ---- - googlemock/cmake/gmock.pc.in | 2 +- - googlemock/cmake/gmock_main.pc.in | 2 +- - googletest/cmake/gtest.pc.in | 2 +- - googletest/cmake/gtest_main.pc.in | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/googlemock/cmake/gmock.pc.in b/googlemock/cmake/gmock.pc.in -index 08e045474..99eb3e178 100644 ---- a/googlemock/cmake/gmock.pc.in -+++ b/googlemock/cmake/gmock.pc.in -@@ -8,4 +8,4 @@ Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest - Requires: gtest - Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ --Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ -+Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ -diff --git a/googlemock/cmake/gmock_main.pc.in b/googlemock/cmake/gmock_main.pc.in -index b22fe6148..3186f8edc 100644 ---- a/googlemock/cmake/gmock_main.pc.in -+++ b/googlemock/cmake/gmock_main.pc.in -@@ -8,4 +8,4 @@ Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest - Requires: gmock - Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ --Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ -+Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ -diff --git a/googletest/cmake/gtest.pc.in b/googletest/cmake/gtest.pc.in -index 9aae29e26..49d70c9bb 100644 ---- a/googletest/cmake/gtest.pc.in -+++ b/googletest/cmake/gtest.pc.in -@@ -7,4 +7,4 @@ Description: GoogleTest (without main() function) - Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest - Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@ --Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ -+Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ -diff --git a/googletest/cmake/gtest_main.pc.in b/googletest/cmake/gtest_main.pc.in -index 915f2973a..e0d81a8d6 100644 ---- a/googletest/cmake/gtest_main.pc.in -+++ b/googletest/cmake/gtest_main.pc.in -@@ -8,4 +8,4 @@ Version: @PROJECT_VERSION@ - URL: https://github.com/google/googletest - Requires: gtest - Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ --Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ -+Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ diff --git a/gtest-gcc11.patch b/gtest-gcc11.patch deleted file mode 100644 index 85ff110..0000000 --- a/gtest-gcc11.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc -index da09a1c..4d6343f 100644 ---- a/googletest/src/gtest-death-test.cc -+++ b/googletest/src/gtest-death-test.cc -@@ -1289,7 +1289,10 @@ static void StackLowerThanAddress(const void* ptr, - GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ - static void StackLowerThanAddress(const void* ptr, bool* result) { - int dummy; -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wpointer-compare" - *result = (&dummy < ptr); -+#pragma GCC diagnostic push - } - - // Make sure AddressSanitizer does not tamper with the stack here. diff --git a/gtest.spec b/gtest.spec index 0f2a929..81e85a4 100644 --- a/gtest.spec +++ b/gtest.spec @@ -1,24 +1,11 @@ Summary: Google C++ testing framework Name: gtest -Version: 1.10.0 -Release: 7%{?dist} +Version: 1.11.0 +Release: 1%{?dist} # scripts/generator/* are ASL 2.0 License: BSD and ASL 2.0 URL: https://github.com/google/googletest Source0: https://github.com/google/googletest/archive/release-%{version}/googletest-release-%{version}.tar.gz -# Backports from upstream -# From: https://github.com/google/googletest/pull/2491 -Patch0: gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch -# From: https://github.com/google/googletest/pull/2556 -Patch1: gtest-PR2556-pkg-config-Remove-pthread-link-flag-from-Cflags.patch -# Fedora-specific patches -## Set libversion for libraries to version of gtest -### Submitted: https://github.com/google/googletest/pull/2755 -Patch100: gtest-1.8.1-libversion.patch -## Add missing pkgconfig requires information to reflect reality -### Submitted: https://github.com/google/googletest/pull/2756 -Patch101: gtest-1.10.0-add-missing-pkgconfig-requires.patch -Patch102: %{name}-gcc11.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake @@ -82,13 +69,13 @@ sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMa %ctest %files -%license googletest/LICENSE +%license LICENSE %{_libdir}/libgtest.so.%{version} %{_libdir}/libgtest_main.so.%{version} %files -n gtest-devel -%doc googletest/{CHANGES,CONTRIBUTORS,README.md} -%doc googletest/docs/ +%doc {CHANGES,CONTRIBUTORS,README.md} +%doc docs/ %doc googletest/samples %{_includedir}/gtest/ %{_libdir}/libgtest.so @@ -98,13 +85,13 @@ sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMa %{_libdir}/pkgconfig/gtest_main.pc %files -n gmock -%license googlemock/LICENSE +%license LICENSE %{_libdir}/libgmock.so.%{version} %{_libdir}/libgmock_main.so.%{version} %files -n gmock-devel -%doc googlemock/{CHANGES,CONTRIBUTORS,README.md} -%doc googlemock/docs/ +%doc {CHANGES,CONTRIBUTORS,README.md} +%doc docs/ %{_includedir}/gmock/ %{_libdir}/libgmock.so %{_libdir}/libgmock_main.so @@ -112,6 +99,9 @@ sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMa %{_libdir}/pkgconfig/gmock_main.pc %changelog +* Thu Aug 19 2021 Federico Pellegrin - 1.11.0-1 +- Bump to version 1.11.0, removing now upstreamed patches + * Thu Jul 22 2021 Fedora Release Engineering - 1.10.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index ac4d76e..665044f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (googletest-release-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 +SHA512 (googletest-release-1.11.0.tar.gz) = 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28