--- /dev/null
+diff --git a/googlemock/cmake/gmock.pc.in b/googlemock/cmake/gmock.pc.in
+index c441642..e80b506 100644
+--- a/googlemock/cmake/gmock.pc.in
++++ b/googlemock/cmake/gmock.pc.in
+@@ -5,5 +5,6 @@ Name: gmock
+ Description: GoogleMock (without main() function)
+ Version: @PROJECT_VERSION@
+ URL: https://github.com/google/googletest
++Requires: gtest = @PROJECT_VERSION@
+ Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@
+ Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
+diff --git a/googlemock/cmake/gmock_main.pc.in b/googlemock/cmake/gmock_main.pc.in
+index c377dba..752f14d 100644
+--- a/googlemock/cmake/gmock_main.pc.in
++++ b/googlemock/cmake/gmock_main.pc.in
+@@ -5,5 +5,6 @@ Name: gmock_main
+ Description: GoogleMock (with main() function)
+ Version: @PROJECT_VERSION@
+ URL: https://github.com/google/googletest
++Requires: gmock = @PROJECT_VERSION@
+ Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@
+ Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
+diff --git a/googletest/cmake/gtest_main.pc.in b/googletest/cmake/gtest_main.pc.in
+index fe25d9c..63b2b14 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@ @CMAKE_THREAD_LIBS_INIT@
--- /dev/null
+--- googletest-release-1.8.1/configure.ac.orig 2018-08-31 17:21:57.000000000 +0200
++++ googletest-release-1.8.1/configure.ac 2018-10-16 16:34:16.015945823 +0200
+@@ -1,5 +1,5 @@
+ AC_INIT([Google C++ Mocking and Testing Frameworks],
+- [1.8.0],
++ [1.8.1],
+ [googlemock@googlegroups.com],
+ [googletest])
+
+--- googletest-release-1.8.1/CMakeLists.txt.orig 2018-08-31 17:21:57.000000000 +0200
++++ googletest-release-1.8.1/CMakeLists.txt 2018-10-16 16:34:29.929279000 +0200
+@@ -5,7 +5,7 @@
+ endif (POLICY CMP0048)
+
+ project(googletest-distribution)
+-set(GOOGLETEST_VERSION 1.9.0)
++set(GOOGLETEST_VERSION 1.8.1)
+
+ enable_testing()
+
+--- googletest-release-1.8.1/googletest/configure.ac.orig 2018-08-31 17:21:57.000000000 +0200
++++ googletest-release-1.8.1/googletest/configure.ac 2018-10-16 16:32:10.055947264 +0200
+@@ -5,7 +5,7 @@
+ # "[1.0.1]"). It also asumes that there won't be any closing parenthesis
+ # between "AC_INIT(" and the closing ")" including comments and strings.
+ AC_INIT([Google C++ Testing Framework],
+- [1.8.0],
++ [1.8.1],
+ [googletestframework@googlegroups.com],
+ [gtest])
+
+--- googletest-release-1.8.1/googlemock/configure.ac.orig 2018-10-16 16:29:59.762615418 +0200
++++ googletest-release-1.8.1/googlemock/configure.ac 2018-10-16 16:34:39.462612224 +0200
+@@ -1,7 +1,7 @@
+ m4_include(../googletest/m4/acx_pthread.m4)
+
+ AC_INIT([Google C++ Mocking Framework],
+- [1.8.0],
++ [1.8.1],
+ [googlemock@googlegroups.com],
+ [gmock])
+
--- /dev/null
+#
+# Conditional build:
+%bcond_without tests # do not perform "make check"
+#
+Summary: Google C++ testing framework
+Summary(pl.UTF-8): Szkielet testów w C++ stworzony przez Google
+Name: gtest
+Version: 1.8.1
+Release: 1
+License: BSD
+Group: Development/Tools
+#Source0Download: https://github.com/google/googletest/releases
+Source0: https://github.com/google/googletest/archive/release-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 2e6fbeb6a91310a16efe181886c59596
+Patch0: %{name}-version.patch
+Patch1: libversion.patch
+Patch2: add-missing-pkgconfig-requires.patch
+Patch3: python3-support.patch
+URL: https://github.com/google/googletest
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1:1.9
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:1.5
+BuildRequires: python >= 2.3
+BuildRequires: python-modules >= 2.3
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Google's framework for writing C++ tests on a variety of platforms
+(GNU/Linux, Mac OS X, Windows, Windows CE, and Symbian). Based on the
+xUnit architecture. Supports automatic test discovery, a rich set of
+assertions, user-defined assertions, death tests, fatal and non-fatal
+failures, various options for running the tests, and XML test report
+generation.
+
+%description -l pl.UTF-8
+Stworzony przez Google szkielet do pisania testów w C++ na różnych
+platformach (GNU/Linux, Mac OS X, Windows, Windows CE, Symbian). Jest
+oparty na architekturze xUnit. Obsługuje automatyczne wykrywanie
+testów, bogaty zbiór zapewnień, zapewnienia zdefiniowane przez
+użytkownika, testy śmierci, niepowodzenia krytyczne i niekrytyczne,
+różne opcje uruchamiania testów oraz tworzenie raportów z testów w
+XML-u.
+
+%package devel
+Summary: Development files for gtest framework
+Summary(pl.UTF-8): Pliki programistyczne szkieletu gtest
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libstdc++-devel
+
+%description devel
+This package contains development files for gtest framework.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki programistyczne szkieletu gtest.
+
+%package static
+Summary: Static gtest libraries
+Summary(pl.UTF-8): Statyczne biblioteki gtest
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static gtest libraries.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki gtest.
+
+%package -n gmock
+Summary: Google C++ Mocking Framework
+Summary(pl.UTF-8): Szkielet Google Mock dla C++
+Group: Development/Tools
+Obsoletes: gmock < 1.6.0-3
+
+%description -n gmock
+Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
+specifics in mind, Google C++ Mocking Framework (or Google Mock for
+short) is a library for writing and using C++ mock classes.
+
+Google Mock:
+- lets you create mock classes trivially using simple macros,
+- supports a rich set of matchers and actions,
+- handles unordered, partially ordered, or completely ordered
+ expectations,
+- is extensible by users, and
+- works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
+ Symbian.
+
+%description -n gmock -l pl.UTF-8
+Google C++ Mocking Framework (w skrócie Google Mock) to zainspirowana
+przez jMock, EasyMock i Hamcrest, zaprojektowana z myślą o specyfice
+C++ biblioteka do pisania i wykorzystywania klas "mock" w C++.
+
+Google Mock:
+- pozwala tworzyć klasy "mock" w sposób trywialny przy użyciu makr;
+- obsługuje bogaty zbiór dopasowań i akcji;
+- obsługuje oczekiwania nieuporządkowane, częściowo uporządkowane
+ lub w pełni uporządkowane;
+- jest rozszerzalna dla użytkownika;
+- działa na Linuksie, Mac OS X, Windows, Windows Mobile, minGW oraz
+ Symbianie.
+
+%package -n gmock-devel
+Summary: Google C++ Mocking Framework
+Summary(pl.UTF-8): Szkielet Google Mock dla C++
+Group: Development/Libraries
+Requires: gtest-devel = %{version}-%{release}
+Requires: libstdc++-devel
+Provides: gmock = %{version}-%{release}
+Obsoletes: gmock < 1.6.0-3
+
+%description -n gmock-devel
+Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
+specifics in mind, Google C++ Mocking Framework (or Google Mock for
+short) is a library for writing and using C++ mock classes.
+
+Google Mock:
+- lets you create mock classes trivially using simple macros,
+- supports a rich set of matchers and actions,
+- handles unordered, partially ordered, or completely ordered
+ expectations,
+- is extensible by users, and
+- works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
+ Symbian.
+
+%description -n gmock-devel -l pl.UTF-8
+Google C++ Mocking Framework (w skrócie Google Mock) to zainspirowana
+przez jMock, EasyMock i Hamcrest, zaprojektowana z myślą o specyfice
+C++ biblioteka do pisania i wykorzystywania klas "mock" w C++.
+
+Google Mock:
+- pozwala tworzyć klasy "mock" w sposób trywialny przy użyciu makr;
+- obsługuje bogaty zbiór dopasowań i akcji;
+- obsługuje oczekiwania nieuporządkowane, częściowo uporządkowane
+ lub w pełni uporządkowane;
+- jest rozszerzalna dla użytkownika;
+- działa na Linuksie, Mac OS X, Windows, Windows Mobile, minGW oraz
+ Symbianie.
+
+
+%prep
+%setup -q -n googletest-release-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%{__sed} -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt
+
+%build
+install -d build
+cd build
+%cmake .. \
+ -DBUILD_SHARED_LIBS=ON \
+ -DPYTHON_EXECUTABLE=%{__python3} \
+ %{?with_tests:-Dgtest_build_tests=ON} ..
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ INSTALL="%{__install} -p" \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc googletest/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
+%attr(755,root,root) %{_libdir}/libgtest.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgtest.so.0
+%attr(755,root,root) %{_libdir}/libgtest_main.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgtest_main.so.0
+
+%files -n gmock
+%defattr(644,root,root,755)
+%doc googletest/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
+%attr(755,root,root) %{_libdir}/libgmock.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgmock.so.0
+%attr(755,root,root) %{_libdir}/libgmock_main.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgmock_main.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgtest.so
+%attr(755,root,root) %{_libdir}/libgtest_main.so
+%{_libdir}/cmake/GTest
+%{_includedir}/gtest
+%{_pkgconfigdir}/gtest.pc
+%{_pkgconfigdir}/gtest_main.pc
+
+%files -n gmock-devel
+%defattr(644,root,root,755)
+%doc googlemock/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
+%attr(755,root,root) %{_libdir}/libgmock.so
+%attr(755,root,root) %{_libdir}/libgmock_main.so
+%{_includedir}/gmock
+%{_pkgconfigdir}/gmock.pc
+%{_pkgconfigdir}/gmock_main.pc
--- /dev/null
+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 1.8.1 SOVERSION 0)
+ cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
+ target_link_libraries(gmock_main PUBLIC gmock)
++ set_target_properties(gmock_main PROPERTIES VERSION 1.8.1 SOVERSION 0)
+ 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 1.8.1 SOVERSION 0)
+ cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
++set_target_properties(gtest_main PROPERTIES VERSION 1.8.1 SOVERSION 0)
+ # 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).
--- /dev/null
+From 149c0d24148da9a339d6c9d03e638a39c59731f6 Mon Sep 17 00:00:00 2001
+From: Peter Levine <plevine457@gmail.com>
+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))