%define major %{version} %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define mocklibname %mklibname gmock %{major} %define mockdevelname %mklibname gmock -d Name: gtest Summary: Google's framework for writing C++ tests Version: 1.14.0 Release: %mkrel 1 License: BSD Group: Development/C++ URL: https://github.com/google/googletest Source0: https://github.com/google/googletest/archive/v%{version}/googletest-%{version}.tar.gz # Backports from upstream # # Mageia-specific patches # BuildRequires: pkgconfig(python3) BuildRequires: cmake BuildRequires: ninja %description Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, 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, value- and type-parameterized tests, various options for running the tests, and XML test report generation. %package -n %{libname} Summary: Shared libraries for %{name} Group: System/Libraries %description -n %{libname} Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, 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, value- and type-parameterized tests, various options for running the tests, and XML test report generation. This package contains the shared %{name} libraries. %package -n %{develname} Summary: Development files for %{name} Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Requires: gmock-devel = %{version}-%{release} %description -n %{develname} This package contains development files for %{name}. %package -n %{mocklibname} Summary: Shared libraries for gmock Group: System/Libraries %description -n %{mocklibname} 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: o lets you create mock classes trivially using simple macros, o supports a rich set of matchers and actions, o handles unordered, partially ordered, or completely ordered expectations, o is extensible by users, and o works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and Symbian. %package -n %{mockdevelname} Summary: Development files for gmock Group: Development/C++ Requires: %{mocklibname} = %{version}-%{release} Provides: gmock-devel = %{version}-%{release} %description -n %{mockdevelname} This package contains development files for gmock. %prep %autosetup -p1 -n googletest-%{version} # Set the version correctly sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt %build %cmake -GNinja \ -Dgtest_build_tests=ON \ -DPYTHON_EXECUTABLE=%{__python3} \ -Dgtest_build_samples=ON %cmake_build %install %cmake_install pushd googletest install -d %{buildroot}%{_usrsrc}/gtest/src install -p -m 644 src/* %{buildroot}%{_usrsrc}/gtest/src popd pushd googlemock install -d %{buildroot}%{_usrsrc}/gmock/src install -p -m 644 src/* %{buildroot}%{_usrsrc}/gmock/src popd %ifnarch %{ix86} %check %ctest %endif %files -n %{libname} %doc googletest/README.md %license LICENSE %{_libdir}/lib%{name}*.so.%{major}{,.*} %files -n %{develname} %doc googletest/docs/ %doc googletest/samples %{_libdir}/lib%{name}*.so %{_libdir}/pkgconfig/%{name}*.pc %{_libdir}/cmake/GTest/ %{_includedir}/%{name}/ %{_usrsrc}/%{name}/ %files -n %{mocklibname} %doc googlemock/README.md %license LICENSE %{_libdir}/libgmock*.so.%{major}{,.*} %files -n %{mockdevelname} %doc googlemock/docs/ %{_libdir}/libgmock*.so %{_libdir}/pkgconfig/gmock*.pc %{_includedir}/gmock/ %{_usrsrc}/gmock/ %changelog * Fri Oct 27 2023 kekepower <kekepower> 1.14.0-1.mga10 + Revision: 2002145 - Update to version 1.14.0 * Tue Sep 26 2023 daviddavid <daviddavid> 1.13.0-2.mga10 + Revision: 1991021 - new version: 1.13.0 * Thu Dec 22 2022 wally <wally> 1.12.1-2.mga9 + Revision: 1925745 - build using C++14 * Sun Aug 28 2022 wally <wally> 1.12.1-1.mga9 + Revision: 1881368 - new version 1.12.1 * Mon Aug 08 2022 wally <wally> 1.12.0-1.mga9 + Revision: 1876196 - new version 1.12.0 - drop old obsoletes * Mon Mar 28 2022 umeabot <umeabot> 1.11.0-4.mga9 + Revision: 1830871 - Mageia 9 Mass Rebuild * Fri Dec 31 2021 wally <wally> 1.11.0-3.mga9 + Revision: 1765551 - fix obsoletes after lib pkg name change * Wed Dec 29 2021 wally <wally> 1.11.0-2.mga9 + Revision: 1765180 - fix lib pkg names * Tue Dec 28 2021 wally <wally> 1.11.0-1.mga9 + Revision: 1765078 - new version 1.11.0 * Fri Apr 23 2021 daviddavid <daviddavid> 1.10.0-2.mga9 + Revision: 1718103 - gtest-devel now requires gmock-devel * The imported target "GTest::gmock" references the file "/usr/lib64/libgmock.so.0.0.0" but this file does not exist. * Tue Mar 02 2021 daviddavid <daviddavid> 1.10.0-1.mga9 + Revision: 1695756 - new version: 1.10.0 - remove upstreamed patches - backport fixes from upstream for pkgconfig files - refresh pkgconfig dependency information patch * Fri Feb 14 2020 umeabot <umeabot> 1.8.1-3.mga8 + Revision: 1515759 - Mageia 8 Mass Rebuild + wally <wally> - build with new cmake macros * Sat Sep 29 2018 daviddavid <daviddavid> 1.8.1-2.mga7 + Revision: 1310915 - fix the build to set the version in the CMakeLists correctly - fix the pkgconfig dependency information - add missing strong dependency on gtest by gmock - add patch to make tests work with Python 3 - add back the "/usr/src/gtest/src" files (needed for movit) * Wed Sep 12 2018 daviddavid <daviddavid> 1.8.1-1.mga7 + Revision: 1258534 - new version: 1.8.1 - says hello to gmock * Thu Feb 11 2016 umeabot <umeabot> 1.7.0-2.mga7 + Revision: 954227 - Mageia 6 Mass Rebuild * Mon Aug 24 2015 joequant <joequant> 1.7.0-1.mga6 + Revision: 868892 - update to 1.7.0 * Wed Jan 14 2015 sander85 <sander85> 1.6.0-6.mga5 + Revision: 810620 - Include src directory (needed for thumbnailer) * Wed Oct 15 2014 umeabot <umeabot> 1.6.0-5.mga5 + Revision: 742384 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 1.6.0-4.mga5 + Revision: 679992 - Mageia 5 Mass Rebuild * Fri Oct 18 2013 umeabot <umeabot> 1.6.0-3.mga4 + Revision: 505304 - Mageia 4 Mass Rebuild * Sat Jan 12 2013 umeabot <umeabot> 1.6.0-2.mga3 + Revision: 352784 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Dec 31 2012 wally <wally> 1.6.0-1.mga3 + Revision: 336611 - new version 1.6.0 - change to cmake - sync with Fedora * Mon Mar 28 2011 ennael <ennael> 1.5.0-1.mga1 + Revision: 78333 - clean spec file - imported package gtest