New upstream release.

- Using autotools isn't supported in upstream anymore. switching to cmake.
- undefined reference issues seems gone now. (#813825)
epel9
Akira TAGOH 12 years ago
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 = \

@ -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)
########################################################################

@ -1,13 +1,13 @@
Summary: Google C++ testing framework Summary: Google C++ testing framework
Name: gtest Name: gtest
Version: 1.5.0 Version: 1.6.0
Release: 7%{?dist} Release: 1%{?dist}
License: BSD License: BSD
Group: Development/Tools Group: Development/Tools
URL: http://code.google.com/p/googletest/ URL: http://code.google.com/p/googletest/
Source0: http://googletest.googlecode.com/files/gtest-%{version}.tar.bz2 Source0: http://googletest.googlecode.com/files/gtest-%{version}.zip
Patch0: gtest-1.5.0-make-check.patch Patch0: gtest-soname.patch
BuildRequires: python libtool autoconf BuildRequires: python cmake libtool
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description %description
@ -29,26 +29,22 @@ This package contains development files for %{name}.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1 -b .0-soname
# keep a clean copy of samples. # keep a clean copy of samples.
cp -pr ./samples ./samples.orig cp -pr ./samples ./samples.orig
# Keep the latest libtool as the working copy
libtoolize -f -c
autoreconf
%build %build
%configure --disable-static # this is odd but needed only to generate gtest-config.
# omit unused direct shared library dependencies. %configure
sed -i -e's| -shared | -Wl,--as-needed\0|g' libtool mkdir build
## remove rpath cd build
#sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_BUILD_RPATH=TRUE -DPYTHON_EXECUTABLE=%{__python} -Dgtest_build_tests=ON ..
#sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags} make %{?_smp_mflags}
%check %check
make check LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build make test
# Restore the clean copy of samples. # Restore the clean copy of samples.
# To be later listed against doc. # To be later listed against doc.
@ -57,8 +53,20 @@ mv ./samples.orig ./samples
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot} # make install doesn't work anymore.
find %{buildroot} -type f -name "*.la" -delete # 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 %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -83,6 +91,11 @@ rm -rf %{buildroot}
%{_includedir}/gtest %{_includedir}/gtest
%changelog %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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

Loading…
Cancel
Save