98 lines
4.5 KiB
Diff
98 lines
4.5 KiB
Diff
From 2118fa2281c9554dd93f2fcd917e826d6b191daf Mon Sep 17 00:00:00 2001
|
|
From: Lev Shamardin <shamardin@gmail.com>
|
|
Date: Fri, 18 Sep 2009 13:20:48 +0400
|
|
Subject: [PATCH] fedora-gmake.patch
|
|
|
|
---
|
|
protobuf-2.2.0/Makefile.am | 21 ---------------------
|
|
protobuf-2.2.0/autogen.sh | 9 ---------
|
|
protobuf-2.2.0/src/Makefile.am | 13 ++++---------
|
|
3 files changed, 4 insertions(+), 39 deletions(-)
|
|
|
|
diff --git a/protobuf-2.2.0/Makefile.am b/protobuf-2.2.0/Makefile.am
|
|
index c311fe0..23ee406 100644
|
|
--- a/protobuf-2.2.0/Makefile.am
|
|
+++ b/protobuf-2.2.0/Makefile.am
|
|
@@ -11,27 +11,6 @@ SUBDIRS = . src
|
|
# Always include gtest in distributions.
|
|
DIST_SUBDIRS = $(subdirs) src
|
|
|
|
-# Build gtest before we build protobuf tests. We don't add gtest to SUBDIRS
|
|
-# because then "make check" would also build and run all of gtest's own tests,
|
|
-# which takes a lot of time and is generally not useful to us. Also, we don't
|
|
-# want "make install" to recurse into gtest since we don't want to overwrite
|
|
-# the installed version of gtest if there is one.
|
|
-check-local:
|
|
- @echo "Making lib/libgtest.a lib/libgtest_main.a in gtest"
|
|
- @cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
|
|
-
|
|
-# We would like to clean gtest when "make clean" is invoked. But we have to
|
|
-# be careful because clean-local is also invoked during "make distclean", but
|
|
-# "make distclean" already recurses into gtest because it's listed among the
|
|
-# DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to
|
|
-# cd to the directory again and "make clean" it will fail. So, check that the
|
|
-# Makefile exists before recursing.
|
|
-clean-local:
|
|
- @if test -e gtest/Makefile; then \
|
|
- echo "Making clean in gtest"; \
|
|
- cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \
|
|
- fi
|
|
-
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
pkgconfig_DATA = protobuf.pc protobuf-lite.pc
|
|
|
|
diff --git a/protobuf-2.2.0/autogen.sh b/protobuf-2.2.0/autogen.sh
|
|
index 519bb8f..c17e316 100755
|
|
--- a/protobuf-2.2.0/autogen.sh
|
|
+++ b/protobuf-2.2.0/autogen.sh
|
|
@@ -15,15 +15,6 @@ fi
|
|
|
|
set -ex
|
|
|
|
-# Temporary hack: Must change C runtime library to "multi-threaded DLL",
|
|
-# otherwise it will be set to "multi-threaded static" when MSVC upgrades
|
|
-# the project file to MSVC 2005/2008. vladl of Google Test says gtest will
|
|
-# probably change their default to match, then this will be unnecessary.
|
|
-# One of these mappings converts the debug configuration and the other
|
|
-# converts the release configuration. I don't know which is which.
|
|
-sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
|
|
- s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj
|
|
-
|
|
# TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
|
|
autoreconf -f -i -Wall,no-obsolete
|
|
|
|
diff --git a/protobuf-2.2.0/src/Makefile.am b/protobuf-2.2.0/src/Makefile.am
|
|
index f009838..373c463 100644
|
|
--- a/protobuf-2.2.0/src/Makefile.am
|
|
+++ b/protobuf-2.2.0/src/Makefile.am
|
|
@@ -267,10 +267,8 @@ COMMON_TEST_SOURCES = \
|
|
|
|
check_PROGRAMS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test $(GZCHECKPROGRAMS)
|
|
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
|
- $(top_builddir)/gtest/lib/libgtest.la \
|
|
- $(top_builddir)/gtest/lib/libgtest_main.la
|
|
-protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
|
|
- -I$(top_builddir)/gtest/include
|
|
+ -lgtest -lgtest_main
|
|
+protobuf_test_CPPFLAGS =
|
|
# Disable optimization for tests unless the user explicitly asked for it,
|
|
# since test_util.cc takes forever to compile with optimization (with GCC).
|
|
# See configure.ac for more info.
|
|
@@ -305,11 +303,8 @@ nodist_protobuf_test_SOURCES = $(protoc_outputs)
|
|
|
|
# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
|
|
protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
|
|
- $(top_builddir)/gtest/lib/libgtest.la \
|
|
- $(top_builddir)/gtest/lib/libgtest_main.la
|
|
-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
|
|
- -I$(top_builddir)/gtest/include \
|
|
- -DPROTOBUF_TEST_NO_DESCRIPTORS
|
|
+ -lgtest -lgtest_main
|
|
+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
|
|
protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
|
protobuf_lazy_descriptor_test_SOURCES = \
|
|
google/protobuf/compiler/cpp/cpp_unittest.cc \
|
|
--
|
|
1.6.2.5
|
|
|