%define major 0 %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.8.1 Release: %mkrel 2 License: BSD Group: Development/C++ URL: https://github.com/google/googletest Source0: https://github.com/google/googletest/archive/release-%{version}.tar.gz Patch0: gtest-1.8.1-soname.patch # https://github.com/google/googletest/pull/967 Patch1: gtest-1.8.1-null-pointer.patch # https://github.com/google/googletest/pull/1839 Patch2: gtest-PR1839-Fix-Python3-support.patch ## Add missing pkgconfig requires information to reflect reality Patch3: gtest-1.8.1-add-missing-pkgconfig-requires.patch BuildRequires: pkgconfig(python3) BuildRequires: cmake %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} Obsoletes: %{_lib}gtest-static-devel < 1.6.0 %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-release-%{version} # Set the version correctly sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt %build %cmake \ -Dgtest_build_tests=ON \ -DPYTHON_EXECUTABLE=%{__python3} \ -Dgtest_build_samples=ON %make_build %install %make_install -C build pushd googletest install -d %{buildroot}%{_usrsrc}/gtest/src install -d %{buildroot}%{_datadir}/aclocal install -p -m 644 m4/gtest.m4 %{buildroot}%{_datadir}/aclocal 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 %check #make test -C build %files -n %{libname} %doc googletest/{CHANGES,CONTRIBUTORS,README.md} %license googletest/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}/ %{_datadir}/aclocal/%{name}.m4 %{_usrsrc}/%{name}/ %files -n %{mocklibname} %doc googlemock/{CHANGES,CONTRIBUTORS,README.md} %license googlemock/LICENSE %{_libdir}/libgmock*.so.%{major}{,.*} %files -n %{mockdevelname} %doc googlemock/docs/ %{_libdir}/libgmock*.so %{_libdir}/pkgconfig/gmock*.pc %{_includedir}/gmock/ %{_usrsrc}/gmock/ %changelog * Sat Sep 29 2018 daviddavid <daviddavid> 1.8.1-2.mga7 (not released yet) + 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 * Tue Feb 22 2011 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.5.0-1mdv2011.0 + Revision: 639300 - New version: 1.5.0 - Fix underlinking problem - Use configure2_5x * Thu Dec 02 2010 Oden Eriksson <oeriksson@mandriva.com> 1.4.0-3mdv2011.0 + Revision: 605506 - rebuild * Sat Nov 14 2009 Jérôme Brenier <incubusss@mandriva.org> 1.4.0-2mdv2010.1 + Revision: 466108 - fix Requires name in the devel subpackage * Sat Nov 14 2009 Jérôme Brenier <incubusss@mandriva.org> 1.4.0-1mdv2010.1 + Revision: 466063 - fix groups - add a %%check section (+ needed python BR) - import gtest