|
@@ -1,18 +1,31 @@
|
|
|
Summary: Google C++ testing framework
|
|
|
Summary(ja): Google C++ テスティングフレームワーク
|
|
|
Name: gtest
|
|
|
-Version: 1.7.0
|
|
|
-Release: 2%{?_dist_release}
|
|
|
+Version: 1.8.1
|
|
|
+Release: 1%{?_dist_release}
|
|
|
License: New BSD
|
|
|
Group: Development/Tools
|
|
|
-URL: http://code.google.com/p/googletest/
|
|
|
-Source0: http://googletest.googlecode.com/files/%{name}-%{version}.tar.xz
|
|
|
-Patch0: gtest-1.6.0_install.patch
|
|
|
-
|
|
|
+URL: https://github.com/google/googletest
|
|
|
+
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+
|
|
|
+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
|
|
|
+# Fedora-specific patches
|
|
|
+## Set libversion for libraries to version of gtest
|
|
|
+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
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
-BuildRequires: chrpath
|
|
|
-BuildRequires: python >= 2.3
|
|
|
+BuildRequires: cmake
|
|
|
+BuildRequires: python3-devel
|
|
|
+BuildRequires: python3-rpm-macros
|
|
|
|
|
|
%description
|
|
|
Google's framework for writing C++ tests on a variety of platforms (GNU/Linux,
|
|
@@ -21,49 +34,71 @@ 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.
|
|
|
|
|
|
+
|
|
|
%package devel
|
|
|
Summary: Development files for %{name}
|
|
|
Summary(ja): %{name} の開発ファイル
|
|
|
Group: Development/Libraries
|
|
|
-
|
|
|
-Requires: automake
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description devel
|
|
|
This package contains development files for %{name}.
|
|
|
|
|
|
-%prep
|
|
|
-%setup -q
|
|
|
-%patch0 -p1
|
|
|
|
|
|
-# Keep a clean copy of samples.
|
|
|
-cp -pr ./samples ./samples.orig
|
|
|
+%package -n gmock
|
|
|
+Summary: Google C++ Mocking Framework
|
|
|
+Group: Development/Tools
|
|
|
+Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
-%build
|
|
|
-%configure --disable-static
|
|
|
+%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.
|
|
|
|
|
|
-# Omit unused direct shared library dependencies.
|
|
|
-sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool
|
|
|
+Google Mock:
|
|
|
|
|
|
-make %{?_smp_mflags}
|
|
|
+ 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.
|
|
|
|
|
|
-%check
|
|
|
-# Two tests fail here, unclear as to why.
|
|
|
-make check
|
|
|
|
|
|
-# Restore the clean copy of samples.
|
|
|
-# To be later listed against %doc.
|
|
|
-rm -rf ./samples
|
|
|
-mv ./samples.orig ./samples
|
|
|
+%package -n gmock-devel
|
|
|
+Summary: Development files for gmock
|
|
|
+Group: Development/Libraries
|
|
|
+Requires: gmock = %{version}-%{release}
|
|
|
+
|
|
|
+%description -n gmock-devel
|
|
|
+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
|
|
|
+mkdir build && cd build
|
|
|
+%cmake -DBUILD_SHARED_LIBS=ON \
|
|
|
+ -DPYTHON_EXECUTABLE=%{__python3} \
|
|
|
+ -Dgtest_build_tests=ON ..
|
|
|
+%make_build
|
|
|
+
|
|
|
|
|
|
%install
|
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
+cd build
|
|
|
+%make_install
|
|
|
+
|
|
|
|
|
|
-make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
|
|
|
-find $RPM_BUILD_ROOT -type f -name "*.la" -delete
|
|
|
+%check
|
|
|
+cd build
|
|
|
+make test
|
|
|
|
|
|
-# Remove rpaths.
|
|
|
-chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libgtest_main.so.0.0.0
|
|
|
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
@@ -72,28 +107,49 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
+%post -n gmock -p /sbin/ldconfig
|
|
|
+
|
|
|
+%postun -n gmock -p /sbin/ldconfig
|
|
|
+
|
|
|
%files
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc CHANGES
|
|
|
-%doc CONTRIBUTORS
|
|
|
-%doc COPYING
|
|
|
-%doc README
|
|
|
-%{_libdir}/libgtest.so.*
|
|
|
-%{_libdir}/libgtest_main.so.*
|
|
|
+%license googletest/LICENSE
|
|
|
+%{_libdir}/libgtest.so.%{version}
|
|
|
+%{_libdir}/libgtest_main.so.%{version}
|
|
|
|
|
|
%files devel
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc samples
|
|
|
-#%{_bindir}/%{name}-config
|
|
|
-%{_datadir}/aclocal/%{name}.m4
|
|
|
+%doc googletest/{CHANGES,CONTRIBUTORS,README.md}
|
|
|
+%doc googletest/docs/
|
|
|
+%doc googletest/samples
|
|
|
+%{_includedir}/gtest/
|
|
|
%{_libdir}/libgtest.so
|
|
|
%{_libdir}/libgtest_main.so
|
|
|
+%{_libdir}/cmake/GTest/
|
|
|
+%{_libdir}/pkgconfig/gtest.pc
|
|
|
+%{_libdir}/pkgconfig/gtest_main.pc
|
|
|
+
|
|
|
+%files -n gmock
|
|
|
+%license googlemock/LICENSE
|
|
|
+%{_libdir}/libgmock.so.%{version}
|
|
|
+%{_libdir}/libgmock_main.so.%{version}
|
|
|
+
|
|
|
+%files -n gmock-devel
|
|
|
+%doc googlemock/{CHANGES,CONTRIBUTORS,README.md}
|
|
|
+%doc googlemock/docs/
|
|
|
+%{_includedir}/gmock/
|
|
|
+%{_libdir}/libgmock.so
|
|
|
+%{_libdir}/libgmock_main.so
|
|
|
+%{_libdir}/pkgconfig/gmock.pc
|
|
|
+%{_libdir}/pkgconfig/gmock_main.pc
|
|
|
|
|
|
-%dir %{_includedir}/%{name}
|
|
|
-%{_includedir}/%{name}/*.h
|
|
|
-%{_includedir}/%{name}/internal
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Sep 11 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.8.1-1
|
|
|
+- new upstream release.
|
|
|
+- dropped Patch0.
|
|
|
+- imported patches from rawhide.
|
|
|
+
|
|
|
* Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.7.0-2
|
|
|
- rebuilt with new toolchain.
|
|
|
|