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