From c1ec749bf2a0b0b1be42b8b72555dd4936e669cc Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sat, 21 Mar 2020 06:08:19 -0400 Subject: [PATCH] Rebase to 1.10.0 (rhbz#1810432) - Remove upstreamed patches - Backport fixes from upstream for pkgconfig files - Refresh pkgconfig dependency information patch --- .gitignore | 1 + ....10.0-add-missing-pkgconfig-requires.patch | 18 +- gtest-1.8.1-null-pointer.patch | 17 -- gtest-PR1839-Fix-Python3-support.patch | 149 ---------------- ...2491-Fix-gnu-install-dirs-pkg-config.patch | 166 ++++++++++++++++++ ...Remove-pthread-link-flag-from-Cflags.patch | 61 +++++++ gtest.spec | 25 ++- sources | 2 +- 8 files changed, 256 insertions(+), 183 deletions(-) rename gtest-1.8.1-add-missing-pkgconfig-requires.patch => gtest-1.10.0-add-missing-pkgconfig-requires.patch (75%) delete mode 100644 gtest-1.8.1-null-pointer.patch delete mode 100644 gtest-PR1839-Fix-Python3-support.patch create mode 100644 gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch create mode 100644 gtest-PR2556-pkg-config-Remove-pthread-link-flag-from-Cflags.patch diff --git a/.gitignore b/.gitignore index 9f18597..b869372 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ gtest-1.4.0.tar.bz2 /gtest-1.7.0.zip /release-1.8.0.tar.gz /release-1.8.1.tar.gz +/googletest-release-1.10.0.tar.gz diff --git a/gtest-1.8.1-add-missing-pkgconfig-requires.patch b/gtest-1.10.0-add-missing-pkgconfig-requires.patch similarity index 75% rename from gtest-1.8.1-add-missing-pkgconfig-requires.patch rename to gtest-1.10.0-add-missing-pkgconfig-requires.patch index fdb1109..6fb997e 100644 --- a/gtest-1.8.1-add-missing-pkgconfig-requires.patch +++ b/gtest-1.10.0-add-missing-pkgconfig-requires.patch @@ -1,27 +1,29 @@ diff --git a/googlemock/cmake/gmock.pc.in b/googlemock/cmake/gmock.pc.in -index c441642..e80b506 100644 +index 5780fcaa5..23c67b5c8 100644 --- a/googlemock/cmake/gmock.pc.in +++ b/googlemock/cmake/gmock.pc.in -@@ -5,5 +5,6 @@ Name: gmock +@@ -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@ @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 c377dba..752f14d 100644 +index f2dfe69e0..66ffea7f4 100644 --- a/googlemock/cmake/gmock_main.pc.in +++ b/googlemock/cmake/gmock_main.pc.in -@@ -5,5 +5,6 @@ Name: gmock_main +@@ -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@ @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 fe25d9c..63b2b14 100644 +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 @@ -31,4 +33,4 @@ index fe25d9c..63b2b14 100644 -Requires: gtest +Requires: gtest = @PROJECT_VERSION@ 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-1.8.1-null-pointer.patch b/gtest-1.8.1-null-pointer.patch deleted file mode 100644 index d062bac..0000000 --- a/gtest-1.8.1-null-pointer.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc -index 96b07c6..4af3e5a 100644 ---- a/googletest/src/gtest.cc -+++ b/googletest/src/gtest.cc -@@ -2693,10 +2693,12 @@ void TestInfo::Run() { - test->Run(); - } - -+ if (test != NULL) { - // Deletes the test object. - impl->os_stack_trace_getter()->UponLeavingGTest(); - internal::HandleExceptionsInMethodIfSupported( - test, &Test::DeleteSelf_, "the test fixture's destructor"); -+ } - - result_.set_elapsed_time(internal::GetTimeInMillis() - start); - diff --git a/gtest-PR1839-Fix-Python3-support.patch b/gtest-PR1839-Fix-Python3-support.patch deleted file mode 100644 index ff4f27b..0000000 --- a/gtest-PR1839-Fix-Python3-support.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 149c0d24148da9a339d6c9d03e638a39c59731f6 Mon Sep 17 00:00:00 2001 -From: Peter Levine -Date: Fri, 14 Sep 2018 19:40:51 -0400 -Subject: [PATCH] Fix Python3 support - ---- - googletest/test/googletest-env-var-test.py | 4 ++-- - googletest/test/googletest-filter-unittest.py | 13 ++++++++----- - googletest/test/googletest-output-test.py | 2 +- - googletest/test/googletest-throw-on-failure-test.py | 2 +- - googletest/test/googletest-uninitialized-test.py | 4 ++-- - googletest/test/gtest_xml_output_unittest.py | 3 ++- - googletest/test/gtest_xml_test_utils.py | 2 +- - 7 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/googletest/test/googletest-env-var-test.py b/googletest/test/googletest-env-var-test.py -index e1efeee1e..2f0e406af 100755 ---- a/googletest/test/googletest-env-var-test.py -+++ b/googletest/test/googletest-env-var-test.py -@@ -45,8 +45,8 @@ - - def AssertEq(expected, actual): - if expected != actual: -- print 'Expected: %s' % (expected,) -- print ' Actual: %s' % (actual,) -+ print('Expected: %s' % (expected,)) -+ print(' Actual: %s' % (actual,)) - raise AssertionError - - -diff --git a/googletest/test/googletest-filter-unittest.py b/googletest/test/googletest-filter-unittest.py -index dc0b5bd9a..6b32f2d21 100755 ---- a/googletest/test/googletest-filter-unittest.py -+++ b/googletest/test/googletest-filter-unittest.py -@@ -42,7 +42,10 @@ - - import os - import re --import sets -+try: -+ from sets import Set as set # For Python 2.3 compatibility -+except ImportError: -+ pass - import sys - import gtest_test_utils - -@@ -57,7 +60,7 @@ - if sys.executable: - os.environ['EMPTY_VAR'] = '' - child = gtest_test_utils.Subprocess( -- [sys.executable, '-c', 'import os; print \'EMPTY_VAR\' in os.environ']) -+ [sys.executable, '-c', 'import os; print(\'EMPTY_VAR\' in os.environ)']) - CAN_PASS_EMPTY_ENV = eval(child.output) - - -@@ -72,7 +75,7 @@ - os.environ['UNSET_VAR'] = 'X' - del os.environ['UNSET_VAR'] - child = gtest_test_utils.Subprocess( -- [sys.executable, '-c', 'import os; print \'UNSET_VAR\' not in os.environ' -+ [sys.executable, '-c', 'import os; print(\'UNSET_VAR\' not in os.environ)' - ]) - CAN_UNSET_ENV = eval(child.output) - -@@ -245,14 +248,14 @@ def AssertPartitionIsValid(self, set_var, list_of_sets): - for slice_var in list_of_sets: - full_partition.extend(slice_var) - self.assertEqual(len(set_var), len(full_partition)) -- self.assertEqual(sets.Set(set_var), sets.Set(full_partition)) -+ self.assertEqual(set(set_var), set(full_partition)) - - def AdjustForParameterizedTests(self, tests_to_run): - """Adjust tests_to_run in case value parameterized tests are disabled.""" - - global param_tests_present - if not param_tests_present: -- return list(sets.Set(tests_to_run) - sets.Set(PARAM_TESTS)) -+ return list(set(tests_to_run) - set(PARAM_TESTS)) - else: - return tests_to_run - -diff --git a/googletest/test/googletest-output-test.py b/googletest/test/googletest-output-test.py -index 2d69e353a..1a9ee6e3b 100755 ---- a/googletest/test/googletest-output-test.py -+++ b/googletest/test/googletest-output-test.py -@@ -287,7 +287,7 @@ def testOutput(self): - # sequences when we read the golden file irrespective of an operating - # system used. Therefore, we need to strip those \r's from newlines - # unconditionally. -- golden = ToUnixLineEnding(golden_file.read()) -+ golden = ToUnixLineEnding(golden_file.read().decode()) - golden_file.close() - - # We want the test to pass regardless of certain features being -diff --git a/googletest/test/googletest-throw-on-failure-test.py b/googletest/test/googletest-throw-on-failure-test.py -index 46cb9f6da..204e43e79 100755 ---- a/googletest/test/googletest-throw-on-failure-test.py -+++ b/googletest/test/googletest-throw-on-failure-test.py -@@ -68,7 +68,7 @@ def SetEnvVar(env_var, value): - def Run(command): - """Runs a command; returns True/False if its exit code is/isn't 0.""" - -- print 'Running "%s". . .' % ' '.join(command) -+ print('Running "%s". . .' % ' '.join(command)) - p = gtest_test_utils.Subprocess(command) - return p.exited and p.exit_code == 0 - -diff --git a/googletest/test/googletest-uninitialized-test.py b/googletest/test/googletest-uninitialized-test.py -index 5b7d1e74f..69595a0dd 100755 ---- a/googletest/test/googletest-uninitialized-test.py -+++ b/googletest/test/googletest-uninitialized-test.py -@@ -43,8 +43,8 @@ def Assert(condition): - - def AssertEq(expected, actual): - if expected != actual: -- print 'Expected: %s' % (expected,) -- print ' Actual: %s' % (actual,) -+ print('Expected: %s' % (expected,)) -+ print(' Actual: %s' % (actual,)) - raise AssertionError - - -diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py -index faedd4e6c..8669f19e5 100755 ---- a/googletest/test/gtest_xml_output_unittest.py -+++ b/googletest/test/gtest_xml_output_unittest.py -@@ -266,7 +266,8 @@ def testDefaultOutputFile(self): - 'gtest_no_test_unittest') - try: - os.remove(output_file) -- except OSError, e: -+ except OSError: -+ e = sys.exc_info()[1] - if e.errno != errno.ENOENT: - raise - -diff --git a/googletest/test/gtest_xml_test_utils.py b/googletest/test/gtest_xml_test_utils.py -index 1e0358592..afcf55e0d 100755 ---- a/googletest/test/gtest_xml_test_utils.py -+++ b/googletest/test/gtest_xml_test_utils.py -@@ -94,7 +94,7 @@ def AssertEquivalentNodes(self, expected_node, actual_node): - self.assertEquals( - len(expected_children), len(actual_children), - 'number of child elements differ in element ' + actual_node.tagName) -- for child_id, child in expected_children.iteritems(): -+ for child_id, child in expected_children.items(): - self.assert_(child_id in actual_children, - '<%s> is not in <%s> (in element %s)' % - (child_id, actual_children, actual_node.tagName)) diff --git a/gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch b/gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch new file mode 100644 index 0000000..0e72fad --- /dev/null +++ b/gtest-PR2491-Fix-gnu-install-dirs-pkg-config.patch @@ -0,0 +1,166 @@ +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 new file mode 100644 index 0000000..80f9ce7 --- /dev/null +++ b/gtest-PR2556-pkg-config-Remove-pthread-link-flag-from-Cflags.patch @@ -0,0 +1,61 @@ +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.spec b/gtest.spec index 236156d..b72cffb 100644 --- a/gtest.spec +++ b/gtest.spec @@ -1,20 +1,23 @@ Summary: Google C++ testing framework Name: gtest -Version: 1.8.1 -Release: 5%{?dist} +Version: 1.10.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}.tar.gz -# https://github.com/google/googletest/pull/967 -Patch0: gtest-1.8.1-null-pointer.patch -# https://github.com/google/googletest/pull/1839 -Patch1: gtest-PR1839-Fix-Python3-support.patch +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 -Patch101: gtest-1.8.1-add-missing-pkgconfig-requires.patch +### Submitted: https://github.com/google/googletest/pull/2756 +Patch101: gtest-1.10.0-add-missing-pkgconfig-requires.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake @@ -110,6 +113,12 @@ make test %{_libdir}/pkgconfig/gmock_main.pc %changelog +* Sat Mar 21 2020 Neal Gompa - 1.10.0-1 +- Rebase to 1.10.0 (rhbz#1810432) +- Remove upstreamed patches +- Backport fixes from upstream for pkgconfig files +- Refresh pkgconfig dependency information patch + * Wed Jan 29 2020 Fedora Release Engineering - 1.8.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 3445132..ac4d76e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (release-1.8.1.tar.gz) = e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7 +SHA512 (googletest-release-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9