1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
Summary: Google C++ testing framework
Name: gtest
Version: 1.5.0
Release: 2%{?dist}
License: BSD
Group: Development/Tools
URL: http://code.google.com/p/googletest/
Source0: http://googletest.googlecode.com/files/gtest-%{version}.tar.bz2
BuildRequires: python
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%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.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: automake
Requires: %{name} = %{version}-%{release}
%description devel
This package contains development files for %{name}.
%prep
%setup -q
# keep a clean copy of samples.
cp -pr ./samples ./samples.orig
%build
%configure --disable-static
# omit unused direct shared library dependencies.
sed -i -e's| -shared | -Wl,--as-needed\0|g' libtool
# remove rpath
sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%check
# Two tests fail here, unclear as to why.
# Some extra magic, however still fails...
export LD_LIBRARY_PATH=$(pwd)/lib/.libs
make check AM_LDFLAGS='-Wl,--add-needed' LDFLAGS='lib/.libs/libgtest.so' || :
# Restore the clean copy of samples.
# To be later listed against doc.
rm -rf ./samples
mv ./samples.orig ./samples
%install
rm -rf %{buildroot}
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
find %{buildroot} -type f -name "*.la" -delete
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root, -)
%doc CHANGES CONTRIBUTORS COPYING README
%{_libdir}/libgtest.so.*
%{_libdir}/libgtest_main.so.*
%files devel
%defattr(-, root, root, -)
%doc samples
%{_bindir}/gtest-config
%{_datadir}/aclocal/gtest.m4
%{_libdir}/libgtest.so
%{_libdir}/libgtest_main.so
%{_includedir}/gtest
%changelog
* Sun Jan 16 2011 Terje Rosten <terje.rosten@ntnu.no> - 1.5.0-2
- Add python to buildreq
* Wed Jan 12 2011 Terje Rosten <terje.rosten@ntnu.no> - 1.5.0-1
- 1.5.0
- some cleanup
* Sat Aug 26 2010 Dan HorĂ¡k <dan[at]danny.cz> - 1.4.0-2
- added workaround for linking the tests on Fedora >= 13 (#564953, #599865)
* Sat Nov 14 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.4.0-1
- Version bump to 1.4.0.
* New feature: the event listener API.
* New feature: test shuffling.
* New feature: the XML report format is closer to junitreport and can
be parsed by Hudson now.
* New feature: elapsed time for the tests is printed by default.
* New feature: comes with a TR1 tuple implementation such that Boost
is no longer needed for Combine().
* New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
* New feature: the Xcode project can now produce static gtest libraries in
addition to a framework.
* Compatibility fixes for gcc and minGW.
* Bug fixes and implementation clean-ups.
* Fri Jul 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 1.3.0-2.20090601svn257
- Autorebuild for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Jun 01 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.3.0-1
- Version bump to 1.3.0.
* New feature: ability to use Google Test assertions in other testing
frameworks.
* New feature: ability to run disabled test via
--gtest_also_run_disabled_tests.
* New feature: the --help flag for printing the usage.
* New feature: access to Google Test flag values in user code.
* New feature: a script that packs Google Test into one .h and one .cc file
for easy deployment.
* New feature: support for distributing test functions to multiple machines
(requires support from the test runner).
* Bug fixes and implementation clean-ups.
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jul 05 2008 Debarshi Ray <rishi@fedoraproject.org> - 1.0.0-1
- Initial build.
|