New upstream release.
- Using autotools isn't supported in upstream anymore. switching to cmake. - undefined reference issues seems gone now. (#813825)
This commit is contained in:
parent
4c2da6c22b
commit
bebbcaddf4
@ -1,38 +0,0 @@
|
||||
--- gtest-1.5.0/Makefile.am 2011-03-19 10:54:43.000000000 +0100
|
||||
+++ gtest-1.5.0/Makefile.am 2011-03-19 10:58:37.000000000 +0100
|
||||
@@ -234,6 +234,7 @@ TESTS += samples/sample1_unittest
|
||||
check_PROGRAMS += samples/sample1_unittest
|
||||
samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
|
||||
samples_sample1_unittest_LDADD = lib/libgtest_main.la \
|
||||
+ lib/libgtest.la \
|
||||
samples/libsamples.la
|
||||
|
||||
# Another sample. It also verifies that libgtest works.
|
||||
@@ -247,7 +248,8 @@ samples_sample10_unittest_LDADD = lib/li
|
||||
TESTS += test/gtest_all_test
|
||||
check_PROGRAMS += test/gtest_all_test
|
||||
test_gtest_all_test_SOURCES = test/gtest_all_test.cc
|
||||
-test_gtest_all_test_LDADD = lib/libgtest_main.la
|
||||
+test_gtest_all_test_LDADD = lib/libgtest_main.la \
|
||||
+ lib/libgtest.la
|
||||
|
||||
# Tests that fused gtest files compile and work.
|
||||
FUSED_GTEST_SRC = \
|
||||
--- gtest-1.5.0/Makefile.in 2011-03-19 10:54:49.000000000 +0100
|
||||
+++ gtest-1.5.0/Makefile.in 2011-03-19 10:58:53.000000000 +0100
|
||||
@@ -444,12 +444,14 @@ TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(
|
||||
|
||||
samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
|
||||
samples_sample1_unittest_LDADD = lib/libgtest_main.la \
|
||||
+ lib/libgtest.la \
|
||||
samples/libsamples.la
|
||||
|
||||
samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
|
||||
samples_sample10_unittest_LDADD = lib/libgtest.la
|
||||
test_gtest_all_test_SOURCES = test/gtest_all_test.cc
|
||||
-test_gtest_all_test_LDADD = lib/libgtest_main.la
|
||||
+test_gtest_all_test_LDADD = lib/libgtest_main.la \
|
||||
+ lib/libgtest.la
|
||||
|
||||
# Tests that fused gtest files compile and work.
|
||||
FUSED_GTEST_SRC = \
|
||||
12
gtest-soname.patch
Normal file
12
gtest-soname.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- gtest-1.6.0.orig/CMakeLists.txt 2011-04-16 04:49:11.000000000 +0900
|
||||
+++ gtest-1.6.0/CMakeLists.txt 2012-09-28 14:20:19.000000000 +0900
|
||||
@@ -68,7 +68,9 @@ link_directories(${gtest_BINARY_DIR}/src
|
||||
# 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 0.0.0 SOVERSION 0)
|
||||
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
|
||||
+set_target_properties(gtest_main PROPERTIES VERSION 0.0.0 SOVERSION 0)
|
||||
target_link_libraries(gtest_main gtest)
|
||||
|
||||
########################################################################
|
||||
51
gtest.spec
51
gtest.spec
@ -1,13 +1,13 @@
|
||||
Summary: Google C++ testing framework
|
||||
Name: gtest
|
||||
Version: 1.5.0
|
||||
Release: 7%{?dist}
|
||||
Version: 1.6.0
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
Group: Development/Tools
|
||||
URL: http://code.google.com/p/googletest/
|
||||
Source0: http://googletest.googlecode.com/files/gtest-%{version}.tar.bz2
|
||||
Patch0: gtest-1.5.0-make-check.patch
|
||||
BuildRequires: python libtool autoconf
|
||||
Source0: http://googletest.googlecode.com/files/gtest-%{version}.zip
|
||||
Patch0: gtest-soname.patch
|
||||
BuildRequires: python cmake libtool
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
%description
|
||||
@ -29,26 +29,22 @@ This package contains development files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch0 -p1 -b .0-soname
|
||||
|
||||
# keep a clean copy of samples.
|
||||
cp -pr ./samples ./samples.orig
|
||||
|
||||
# Keep the latest libtool as the working copy
|
||||
libtoolize -f -c
|
||||
autoreconf
|
||||
|
||||
%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
|
||||
# this is odd but needed only to generate gtest-config.
|
||||
%configure
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_BUILD_RPATH=TRUE -DPYTHON_EXECUTABLE=%{__python} -Dgtest_build_tests=ON ..
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build make test
|
||||
|
||||
# Restore the clean copy of samples.
|
||||
# To be later listed against doc.
|
||||
@ -57,8 +53,20 @@ mv ./samples.orig ./samples
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
|
||||
find %{buildroot} -type f -name "*.la" -delete
|
||||
# make install doesn't work anymore.
|
||||
# need to install them manually.
|
||||
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/aclocal,%{_includedir}/gtest{,/internal},%{_libdir}}
|
||||
# just for backward compatibility
|
||||
install -p -m 0755 build/libgtest.so.*.* build/libgtest_main.so.*.* $RPM_BUILD_ROOT%{_libdir}/
|
||||
(cd $RPM_BUILD_ROOT%{_libdir};
|
||||
ln -sf libgtest.so.*.* $RPM_BUILD_ROOT%{_libdir}/libgtest.so
|
||||
ln -sf libgtest_main.so.*.* $RPM_BUILD_ROOT%{_libdir}/libgtest_main.so
|
||||
)
|
||||
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
|
||||
install -p -m 0755 scripts/gtest-config $RPM_BUILD_ROOT%{_bindir}
|
||||
install -p -m 0644 include/gtest/*.h $RPM_BUILD_ROOT%{_includedir}/gtest/
|
||||
install -p -m 0644 include/gtest/internal/*.h $RPM_BUILD_ROOT%{_includedir}/gtest/internal/
|
||||
install -p -m 0644 m4/gtest.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal/
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -83,6 +91,11 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/gtest
|
||||
|
||||
%changelog
|
||||
* Fri Sep 28 2012 Akira TAGOH <tagoh@redhat.com> - 1.6.0-1
|
||||
- New upstream release.
|
||||
- Using autotools isn't supported in upstream anymore. switching to cmake.
|
||||
- undefined reference issues seems gone now. (#813825)
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user