]> git.pld-linux.org Git - packages/protobuf.git/blame - system-gtest.patch
- use system gtest
[packages/protobuf.git] / system-gtest.patch
CommitLineData
0759da77
ER
1diff -up protobuf-2.3.0/autogen.sh.orig protobuf-2.3.0/autogen.sh
2--- protobuf-2.3.0/autogen.sh.orig 2010-04-21 18:55:43.857266895 -0600
3+++ protobuf-2.3.0/autogen.sh 2010-04-21 19:54:57.386270273 -0600
4@@ -15,25 +15,8 @@ __EOF__
5 exit 1
6 fi
7
8-# Check that gtest is present. Usually it is already there since the
9-# directory is set up as an SVN external.
10-if test ! -e gtest; then
11- echo "Google Test not present. Fetching gtest-1.3.0 from the web..."
12- curl http://googletest.googlecode.com/files/gtest-1.3.0.tar.bz2 | tar jx
13- mv gtest-1.3.0 gtest
14-fi
15-
16 set -ex
17
18-# Temporary hack: Must change C runtime library to "multi-threaded DLL",
19-# otherwise it will be set to "multi-threaded static" when MSVC upgrades
20-# the project file to MSVC 2005/2008. vladl of Google Test says gtest will
21-# probably change their default to match, then this will be unnecessary.
22-# One of these mappings converts the debug configuration and the other
23-# converts the release configuration. I don't know which is which.
24-sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
25- s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj
26-
27 # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
28 autoreconf -f -i -Wall,no-obsolete
29
30diff -up protobuf-2.3.0/Makefile.am.orig protobuf-2.3.0/Makefile.am
31--- protobuf-2.3.0/Makefile.am.orig 2010-04-21 18:55:38.009265866 -0600
32+++ protobuf-2.3.0/Makefile.am 2010-04-21 18:56:15.068016238 -0600
33@@ -11,27 +11,6 @@ SUBDIRS = . src
34 # Always include gtest in distributions.
35 DIST_SUBDIRS = $(subdirs) src
36
37-# Build gtest before we build protobuf tests. We don't add gtest to SUBDIRS
38-# because then "make check" would also build and run all of gtest's own tests,
39-# which takes a lot of time and is generally not useful to us. Also, we don't
40-# want "make install" to recurse into gtest since we don't want to overwrite
41-# the installed version of gtest if there is one.
42-check-local:
43- @echo "Making lib/libgtest.a lib/libgtest_main.a in gtest"
44- @cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
45-
46-# We would like to clean gtest when "make clean" is invoked. But we have to
47-# be careful because clean-local is also invoked during "make distclean", but
48-# "make distclean" already recurses into gtest because it's listed among the
49-# DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to
50-# cd to the directory again and "make clean" it will fail. So, check that the
51-# Makefile exists before recursing.
52-clean-local:
53- @if test -e gtest/Makefile; then \
54- echo "Making clean in gtest"; \
55- cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \
56- fi
57-
58 pkgconfigdir = $(libdir)/pkgconfig
59 pkgconfig_DATA = protobuf.pc protobuf-lite.pc
60
61diff -up protobuf-2.3.0/src/Makefile.am.orig protobuf-2.3.0/src/Makefile.am
62--- protobuf-2.3.0/src/Makefile.am.orig 2010-04-21 18:56:57.342268786 -0600
63+++ protobuf-2.3.0/src/Makefile.am 2010-04-21 20:02:40.168268698 -0600
64@@ -276,10 +276,8 @@ COMMON_TEST_SOURCES =
65 check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
66 protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
67 protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
68- $(top_builddir)/gtest/lib/libgtest.la \
69- $(top_builddir)/gtest/lib/libgtest_main.la
70-protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
71- -I$(top_builddir)/gtest/include
72+ -lgtest -lgtest_main
73+protobuf_test_CPPFLAGS =
74 # Disable optimization for tests unless the user explicitly asked for it,
75 # since test_util.cc takes forever to compile with optimization (with GCC).
76 # See configure.ac for more info.
77@@ -319,11 +317,8 @@ nodist_protobuf_test_SOURCES = $(protoc_
78
79 # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
80 protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
81- $(top_builddir)/gtest/lib/libgtest.la \
82- $(top_builddir)/gtest/lib/libgtest_main.la
83-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
84- -I$(top_builddir)/gtest/include \
85- -DPROTOBUF_TEST_NO_DESCRIPTORS
86+ -lgtest -lgtest_main
87+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
88 protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
89 protobuf_lazy_descriptor_test_SOURCES = \
90 google/protobuf/compiler/cpp/cpp_unittest.cc \
91@@ -341,7 +336,7 @@ nodist_protobuf_lite_test_SOURCES = $(pr
92
93 # Test plugin binary.
94 test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
95- $(top_builddir)/gtest/lib/libgtest.la
96+ -lgtest
97 test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \
98 -I$(top_builddir)/gtest/include
99 test_plugin_SOURCES = \
This page took 0.056789 seconds and 4 git commands to generate.