From 4a4f3990296c795a591896e58a924da7b63bc49f Mon Sep 17 00:00:00 2001 From: Lev Shamardin Date: Fri, 18 Sep 2009 12:56:32 +0000 Subject: [PATCH] updated for protobuf-2.2.0 --- protobuf-2.0.2-includes.patch | 33 -- protobuf-2.2.0-fedora-gtest.patch | 97 ++++ protobuf-fedora-gtest.patch | 111 ---- protobuf-gcc-4.3.0.patch | 799 ----------------------------- protobuf-pkgconfig-autotools.patch | 21 - protobuf.pc.in | 15 - protobuf.spec | 97 ++-- 7 files changed, 165 insertions(+), 1008 deletions(-) delete mode 100644 protobuf-2.0.2-includes.patch create mode 100644 protobuf-2.2.0-fedora-gtest.patch delete mode 100644 protobuf-fedora-gtest.patch delete mode 100644 protobuf-gcc-4.3.0.patch delete mode 100644 protobuf-pkgconfig-autotools.patch delete mode 100644 protobuf.pc.in diff --git a/protobuf-2.0.2-includes.patch b/protobuf-2.0.2-includes.patch deleted file mode 100644 index bf2cf8f..0000000 --- a/protobuf-2.0.2-includes.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ru protobuf-2.0.2.orig/src/google/protobuf/compiler/command_line_interface.cc protobuf-2.0.2/src/google/protobuf/compiler/command_line_interface.cc ---- protobuf-2.0.2.orig/src/google/protobuf/compiler/command_line_interface.cc 2009-03-01 10:14:52.000000000 +0000 -+++ protobuf-2.0.2/src/google/protobuf/compiler/command_line_interface.cc 2009-03-01 10:27:11.000000000 +0000 -@@ -44,6 +44,7 @@ - #include - #include - #include -+#include - - #include - #include -diff -ru protobuf-2.0.2.orig/src/google/protobuf/stubs/strutil.cc protobuf-2.0.2/src/google/protobuf/stubs/strutil.cc ---- protobuf-2.0.2.orig/src/google/protobuf/stubs/strutil.cc 2009-03-01 10:14:52.000000000 +0000 -+++ protobuf-2.0.2/src/google/protobuf/stubs/strutil.cc 2009-03-01 10:15:40.000000000 +0000 -@@ -35,6 +35,7 @@ - #include // FLT_DIG and DBL_DIG - #include - #include -+#include - - #ifdef _WIN32 - // MSVC has only _snprintf, not snprintf. -diff -ru protobuf-2.0.2.orig/src/google/protobuf/text_format.cc protobuf-2.0.2/src/google/protobuf/text_format.cc ---- protobuf-2.0.2.orig/src/google/protobuf/text_format.cc 2009-03-01 10:14:52.000000000 +0000 -+++ protobuf-2.0.2/src/google/protobuf/text_format.cc 2009-03-01 10:23:07.000000000 +0000 -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #include - diff --git a/protobuf-2.2.0-fedora-gtest.patch b/protobuf-2.2.0-fedora-gtest.patch new file mode 100644 index 0000000..f6dbf49 --- /dev/null +++ b/protobuf-2.2.0-fedora-gtest.patch @@ -0,0 +1,97 @@ +From 2118fa2281c9554dd93f2fcd917e826d6b191daf Mon Sep 17 00:00:00 2001 +From: Lev Shamardin +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 + diff --git a/protobuf-fedora-gtest.patch b/protobuf-fedora-gtest.patch deleted file mode 100644 index dd4f701..0000000 --- a/protobuf-fedora-gtest.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 32edd48..69d1ed8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -27,6 +27,7 @@ AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h]) - AC_FUNC_MEMCMP - AC_FUNC_STRTOD - AC_CHECK_FUNCS([ftruncate memset mkdir strchr strerror strtol]) -+GTEST_LIB_CHECK - - ACX_PTHREAD - AC_CXX_STL_HASH -diff --git a/src/Makefile.am b/src/Makefile.am -index c2729da..0d2583f 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -163,12 +163,7 @@ EXTRA_DIST = \ - google/protobuf/testdata/text_format_unittest_extensions_data.txt \ - google/protobuf/package_info.h \ - google/protobuf/io/package_info.h \ -- google/protobuf/compiler/package_info.h \ -- gtest/CHANGES \ -- gtest/CONTRIBUTORS \ -- gtest/COPYING \ -- gtest/README \ -- gtest/gen_gtest_pred_impl.py -+ google/protobuf/compiler/package_info.h - - protoc_outputs = \ - google/protobuf/unittest.pb.cc \ -@@ -205,7 +200,9 @@ unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) - $(protoc_outputs): unittest_proto_middleman - - noinst_PROGRAMS = protobuf-test --protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la -+protobuf_test_CPPFLAGS = $(GTEST_CPPFLAGS) -+protobuf_test_CXXFLAGS = $(GTEST_CXXFLAGS) -+protobuf_test_LDADD = $(PTHREAD_LIBS) $(GTEST_LDFLAGS) $(GTEST_LIBS) libprotobuf.la libprotoc.la - protobuf_test_SOURCES = \ - google/protobuf/stubs/common_unittest.cc \ - google/protobuf/stubs/strutil_unittest.cc \ -@@ -235,23 +232,7 @@ protobuf_test_SOURCES = \ - google/protobuf/testing/googletest.h \ - google/protobuf/testing/file.cc \ - google/protobuf/testing/file.h \ -- gtest/gtest.cc \ -- gtest/gtest.h \ -- gtest/gtest-death-test.cc \ -- gtest/gtest-death-test.h \ -- gtest/gtest-filepath.cc \ -- gtest/gtest-internal-inl.h \ -- gtest/gtest-message.h \ -- gtest/gtest-port.cc \ -- gtest/gtest-spi.h \ -- gtest/gtest_main.cc \ -- gtest/gtest_pred_impl.h \ -- gtest/gtest_prod.h \ -- gtest/internal/gtest-death-test-internal.h \ -- gtest/internal/gtest-filepath.h \ -- gtest/internal/gtest-internal.h \ -- gtest/internal/gtest-port.h \ -- gtest/internal/gtest-string.h -+ google/protobuf/testing/gtest_main.cc - - nodist_protobuf_test_SOURCES = $(protoc_outputs) - -diff --git a/src/google/protobuf/testing/gtest_main.cc b/src/google/protobuf/testing/gtest_main.cc -new file mode 100644 -index 0000000..d20c02f ---- /dev/null -+++ b/src/google/protobuf/testing/gtest_main.cc -@@ -0,0 +1,39 @@ -+// Copyright 2006, Google Inc. -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following disclaimer -+// in the documentation and/or other materials provided with the -+// distribution. -+// * Neither the name of Google Inc. nor the names of its -+// contributors may be used to endorse or promote products derived from -+// this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#include -+ -+#include -+ -+int main(int argc, char **argv) { -+ std::cout << "Running main() from gtest_main.cc\n"; -+ -+ testing::InitGoogleTest(&argc, argv); -+ return RUN_ALL_TESTS(); -+} diff --git a/protobuf-gcc-4.3.0.patch b/protobuf-gcc-4.3.0.patch deleted file mode 100644 index 26c9181..0000000 --- a/protobuf-gcc-4.3.0.patch +++ /dev/null @@ -1,799 +0,0 @@ -Index: src/google/protobuf/descriptor.pb.cc -=================================================================== ---- src/google/protobuf/descriptor.pb.cc (revision 69) -+++ src/google/protobuf/descriptor.pb.cc (revision 70) -@@ -76,11 +76,14 @@ - void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors(const ::google::protobuf::FileDescriptor* file) { - FileDescriptorSet_descriptor_ = file->message_type(0); - FileDescriptorSet::default_instance_ = new FileDescriptorSet(); -+ static const int FileDescriptorSet_offsets_[1] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_), -+ }; - FileDescriptorSet_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FileDescriptorSet_descriptor_, - FileDescriptorSet::default_instance_, -- FileDescriptorSet::_offsets_, -+ FileDescriptorSet_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _unknown_fields_), - -1, -@@ -89,11 +92,21 @@ - FileDescriptorSet_descriptor_, FileDescriptorSet::default_instance_); - FileDescriptorProto_descriptor_ = file->message_type(1); - FileDescriptorProto::default_instance_ = new FileDescriptorProto(); -+ static const int FileDescriptorProto_offsets_[8] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_), -+ }; - FileDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FileDescriptorProto_descriptor_, - FileDescriptorProto::default_instance_, -- FileDescriptorProto::_offsets_, -+ FileDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _unknown_fields_), - -1, -@@ -102,22 +115,35 @@ - FileDescriptorProto_descriptor_, FileDescriptorProto::default_instance_); - DescriptorProto_descriptor_ = file->message_type(2); - DescriptorProto::default_instance_ = new DescriptorProto(); -+ static const int DescriptorProto_offsets_[7] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_), -+ }; - DescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - DescriptorProto_descriptor_, - DescriptorProto::default_instance_, -- DescriptorProto::_offsets_, -+ DescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool()); - DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0); - DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange(); -+ static const int DescriptorProto_ExtensionRange_offsets_[2] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_), -+ }; - DescriptorProto_ExtensionRange_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - DescriptorProto_ExtensionRange_descriptor_, - DescriptorProto_ExtensionRange::default_instance_, -- DescriptorProto_ExtensionRange::_offsets_, -+ DescriptorProto_ExtensionRange_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _unknown_fields_), - -1, -@@ -128,11 +154,21 @@ - DescriptorProto_descriptor_, DescriptorProto::default_instance_); - FieldDescriptorProto_descriptor_ = file->message_type(3); - FieldDescriptorProto::default_instance_ = new FieldDescriptorProto(); -+ static const int FieldDescriptorProto_offsets_[8] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_), -+ }; - FieldDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FieldDescriptorProto_descriptor_, - FieldDescriptorProto::default_instance_, -- FieldDescriptorProto::_offsets_, -+ FieldDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _unknown_fields_), - -1, -@@ -143,11 +179,16 @@ - FieldDescriptorProto_descriptor_, FieldDescriptorProto::default_instance_); - EnumDescriptorProto_descriptor_ = file->message_type(4); - EnumDescriptorProto::default_instance_ = new EnumDescriptorProto(); -+ static const int EnumDescriptorProto_offsets_[3] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_), -+ }; - EnumDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumDescriptorProto_descriptor_, - EnumDescriptorProto::default_instance_, -- EnumDescriptorProto::_offsets_, -+ EnumDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _unknown_fields_), - -1, -@@ -156,11 +197,16 @@ - EnumDescriptorProto_descriptor_, EnumDescriptorProto::default_instance_); - EnumValueDescriptorProto_descriptor_ = file->message_type(5); - EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto(); -+ static const int EnumValueDescriptorProto_offsets_[3] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_), -+ }; - EnumValueDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumValueDescriptorProto_descriptor_, - EnumValueDescriptorProto::default_instance_, -- EnumValueDescriptorProto::_offsets_, -+ EnumValueDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _unknown_fields_), - -1, -@@ -169,11 +215,16 @@ - EnumValueDescriptorProto_descriptor_, EnumValueDescriptorProto::default_instance_); - ServiceDescriptorProto_descriptor_ = file->message_type(6); - ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto(); -+ static const int ServiceDescriptorProto_offsets_[3] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_), -+ }; - ServiceDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - ServiceDescriptorProto_descriptor_, - ServiceDescriptorProto::default_instance_, -- ServiceDescriptorProto::_offsets_, -+ ServiceDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _unknown_fields_), - -1, -@@ -182,11 +233,17 @@ - ServiceDescriptorProto_descriptor_, ServiceDescriptorProto::default_instance_); - MethodDescriptorProto_descriptor_ = file->message_type(7); - MethodDescriptorProto::default_instance_ = new MethodDescriptorProto(); -+ static const int MethodDescriptorProto_offsets_[4] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_), -+ }; - MethodDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - MethodDescriptorProto_descriptor_, - MethodDescriptorProto::default_instance_, -- MethodDescriptorProto::_offsets_, -+ MethodDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _unknown_fields_), - -1, -@@ -195,11 +252,18 @@ - MethodDescriptorProto_descriptor_, MethodDescriptorProto::default_instance_); - FileOptions_descriptor_ = file->message_type(8); - FileOptions::default_instance_ = new FileOptions(); -+ static const int FileOptions_offsets_[5] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_), -+ }; - FileOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FileOptions_descriptor_, - FileOptions::default_instance_, -- FileOptions::_offsets_, -+ FileOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_), -@@ -209,11 +273,15 @@ - FileOptions_descriptor_, FileOptions::default_instance_); - MessageOptions_descriptor_ = file->message_type(9); - MessageOptions::default_instance_ = new MessageOptions(); -+ static const int MessageOptions_offsets_[2] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_), -+ }; - MessageOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - MessageOptions_descriptor_, - MessageOptions::default_instance_, -- MessageOptions::_offsets_, -+ MessageOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_), -@@ -222,11 +290,16 @@ - MessageOptions_descriptor_, MessageOptions::default_instance_); - FieldOptions_descriptor_ = file->message_type(10); - FieldOptions::default_instance_ = new FieldOptions(); -+ static const int FieldOptions_offsets_[3] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, experimental_map_key_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_), -+ }; - FieldOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FieldOptions_descriptor_, - FieldOptions::default_instance_, -- FieldOptions::_offsets_, -+ FieldOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_), -@@ -236,11 +309,14 @@ - FieldOptions_descriptor_, FieldOptions::default_instance_); - EnumOptions_descriptor_ = file->message_type(11); - EnumOptions::default_instance_ = new EnumOptions(); -+ static const int EnumOptions_offsets_[1] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_), -+ }; - EnumOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumOptions_descriptor_, - EnumOptions::default_instance_, -- EnumOptions::_offsets_, -+ EnumOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_), -@@ -249,11 +325,14 @@ - EnumOptions_descriptor_, EnumOptions::default_instance_); - EnumValueOptions_descriptor_ = file->message_type(12); - EnumValueOptions::default_instance_ = new EnumValueOptions(); -+ static const int EnumValueOptions_offsets_[1] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_), -+ }; - EnumValueOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumValueOptions_descriptor_, - EnumValueOptions::default_instance_, -- EnumValueOptions::_offsets_, -+ EnumValueOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_), -@@ -262,11 +341,14 @@ - EnumValueOptions_descriptor_, EnumValueOptions::default_instance_); - ServiceOptions_descriptor_ = file->message_type(13); - ServiceOptions::default_instance_ = new ServiceOptions(); -+ static const int ServiceOptions_offsets_[1] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_), -+ }; - ServiceOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - ServiceOptions_descriptor_, - ServiceOptions::default_instance_, -- ServiceOptions::_offsets_, -+ ServiceOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_), -@@ -275,11 +357,14 @@ - ServiceOptions_descriptor_, ServiceOptions::default_instance_); - MethodOptions_descriptor_ = file->message_type(14); - MethodOptions::default_instance_ = new MethodOptions(); -+ static const int MethodOptions_offsets_[1] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_), -+ }; - MethodOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - MethodOptions_descriptor_, - MethodOptions::default_instance_, -- MethodOptions::_offsets_, -+ MethodOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_), -@@ -288,22 +373,34 @@ - MethodOptions_descriptor_, MethodOptions::default_instance_); - UninterpretedOption_descriptor_ = file->message_type(15); - UninterpretedOption::default_instance_ = new UninterpretedOption(); -+ static const int UninterpretedOption_offsets_[6] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_), -+ }; - UninterpretedOption_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - UninterpretedOption_descriptor_, - UninterpretedOption::default_instance_, -- UninterpretedOption::_offsets_, -+ UninterpretedOption_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool()); - UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0); - UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart(); -+ static const int UninterpretedOption_NamePart_offsets_[2] = { -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_), -+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_), -+ }; - UninterpretedOption_NamePart_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - UninterpretedOption_NamePart_descriptor_, - UninterpretedOption_NamePart::default_instance_, -- UninterpretedOption_NamePart::_offsets_, -+ UninterpretedOption_NamePart_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _unknown_fields_), - -1, -@@ -442,10 +539,6 @@ - // =================================================================== - - --const int FileDescriptorSet::_offsets_[1] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_), --}; -- - FileDescriptorSet::FileDescriptorSet() - : ::google::protobuf::Message(), - _cached_size_(0) { -@@ -617,17 +710,6 @@ - - - --const int FileDescriptorProto::_offsets_[8] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_), --}; -- - FileDescriptorProto::FileDescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -1032,11 +1114,6 @@ - - - --const int DescriptorProto_ExtensionRange::_offsets_[2] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_), --}; -- - DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -1244,16 +1321,6 @@ - - - --const int DescriptorProto::_offsets_[7] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_), --}; -- - DescriptorProto::DescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -1703,17 +1770,6 @@ - const ::std::string FieldDescriptorProto::_default_extendee_; - const ::std::string FieldDescriptorProto::_default_default_value_; - --const int FieldDescriptorProto::_offsets_[8] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_), --}; -- - FieldDescriptorProto::FieldDescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -2137,12 +2193,6 @@ - const ::std::string EnumDescriptorProto::_default_name_; - - --const int EnumDescriptorProto::_offsets_[3] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_), --}; -- - EnumDescriptorProto::EnumDescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -2388,12 +2438,6 @@ - const ::std::string EnumValueDescriptorProto::_default_name_; - - --const int EnumValueDescriptorProto::_offsets_[3] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_), --}; -- - EnumValueDescriptorProto::EnumValueDescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -2639,12 +2683,6 @@ - const ::std::string ServiceDescriptorProto::_default_name_; - - --const int ServiceDescriptorProto::_offsets_[3] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_), --}; -- - ServiceDescriptorProto::ServiceDescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -2891,13 +2929,6 @@ - const ::std::string MethodDescriptorProto::_default_input_type_; - const ::std::string MethodDescriptorProto::_default_output_type_; - --const int MethodDescriptorProto::_offsets_[4] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_), --}; -- - MethodDescriptorProto::MethodDescriptorProto() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -3205,14 +3236,6 @@ - - - --const int FileOptions::_offsets_[5] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_), --}; -- - FileOptions::FileOptions() - : ::google::protobuf::Message(), - _extensions_(&FileOptions_descriptor_, -@@ -3539,11 +3562,6 @@ - - - --const int MessageOptions::_offsets_[2] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_), --}; -- - MessageOptions::MessageOptions() - : ::google::protobuf::Message(), - _extensions_(&MessageOptions_descriptor_, -@@ -3784,12 +3802,6 @@ - - const ::std::string FieldOptions::_default_experimental_map_key_; - --const int FieldOptions::_offsets_[3] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, experimental_map_key_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_), --}; -- - FieldOptions::FieldOptions() - : ::google::protobuf::Message(), - _extensions_(&FieldOptions_descriptor_, -@@ -4049,10 +4061,6 @@ - // =================================================================== - - --const int EnumOptions::_offsets_[1] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_), --}; -- - EnumOptions::EnumOptions() - : ::google::protobuf::Message(), - _extensions_(&EnumOptions_descriptor_, -@@ -4236,10 +4244,6 @@ - // =================================================================== - - --const int EnumValueOptions::_offsets_[1] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_), --}; -- - EnumValueOptions::EnumValueOptions() - : ::google::protobuf::Message(), - _extensions_(&EnumValueOptions_descriptor_, -@@ -4423,10 +4427,6 @@ - // =================================================================== - - --const int ServiceOptions::_offsets_[1] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_), --}; -- - ServiceOptions::ServiceOptions() - : ::google::protobuf::Message(), - _extensions_(&ServiceOptions_descriptor_, -@@ -4610,10 +4610,6 @@ - // =================================================================== - - --const int MethodOptions::_offsets_[1] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_), --}; -- - MethodOptions::MethodOptions() - : ::google::protobuf::Message(), - _extensions_(&MethodOptions_descriptor_, -@@ -4798,11 +4794,6 @@ - - const ::std::string UninterpretedOption_NamePart::_default_name_part_; - --const int UninterpretedOption_NamePart::_offsets_[2] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_), --}; -- - UninterpretedOption_NamePart::UninterpretedOption_NamePart() - : ::google::protobuf::Message(), - _cached_size_(0), -@@ -5012,15 +5003,6 @@ - - - const ::std::string UninterpretedOption::_default_string_value_; --const int UninterpretedOption::_offsets_[6] = { -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_), -- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_), --}; -- - UninterpretedOption::UninterpretedOption() - : ::google::protobuf::Message(), - _cached_size_(0), -Index: src/google/protobuf/compiler/cpp/cpp_message.cc -=================================================================== ---- src/google/protobuf/compiler/cpp/cpp_message.cc (revision 69) -+++ src/google/protobuf/compiler/cpp/cpp_message.cc (revision 70) -@@ -508,8 +508,6 @@ - - if (descriptor_->field_count() > 0) { - printer->Print(vars, -- "static const int _offsets_[$field_count$];\n" -- "\n" - "::google::protobuf::uint32 _has_bits_[($field_count$ + 31) / 32];\n"); - } else { - // Zero-size arrays aren't technically allowed, and MSVC in particular -@@ -517,8 +515,6 @@ - // other code compile. Since this is an uncommon case, we'll just declare - // them with size 1 and waste some space. Oh well. - printer->Print( -- "static const int _offsets_[1];\n" -- "\n" - "::google::protobuf::uint32 _has_bits_[1];\n"); - } - -@@ -598,13 +594,16 @@ - printer->Print(vars, - "$classname$::default_instance_ = new $classname$();\n"); - -+ // Generate the offsets. -+ GenerateOffsets(printer); -+ - // Construct the reflection object. - printer->Print(vars, - "$classname$_reflection_ =\n" - " new ::google::protobuf::internal::GeneratedMessageReflection(\n" - " $classname$_descriptor_,\n" - " $classname$::default_instance_,\n" -- " $classname$::_offsets_,\n" -+ " $classname$_offsets_,\n" - " GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET($classname$, _has_bits_[0]),\n" - " GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(" - "$classname$, _unknown_fields_),\n"); -@@ -672,9 +671,6 @@ - extension_generators_[i]->GenerateDefinition(printer); - } - -- GenerateOffsets(printer); -- printer->Print("\n"); -- - GenerateStructors(printer); - printer->Print("\n"); - -@@ -718,7 +714,7 @@ - void MessageGenerator:: - GenerateOffsets(io::Printer* printer) { - printer->Print( -- "const int $classname$::_offsets_[$field_count$] = {\n", -+ "static const int $classname$_offsets_[$field_count$] = {\n", - "classname", classname_, - "field_count", SimpleItoa(max(1, descriptor_->field_count()))); - printer->Indent(); -Index: src/google/protobuf/descriptor.pb.h -=================================================================== ---- src/google/protobuf/descriptor.pb.h (revision 69) -+++ src/google/protobuf/descriptor.pb.h (revision 70) -@@ -169,8 +169,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[1]; -- - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -325,8 +323,6 @@ - ::google::protobuf::FileOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[8]; -- - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -414,8 +410,6 @@ - ::google::protobuf::int32 end_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[2]; -- - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -558,8 +552,6 @@ - ::google::protobuf::MessageOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[7]; -- - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -748,8 +740,6 @@ - ::google::protobuf::FieldOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[8]; -- - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -850,8 +840,6 @@ - ::google::protobuf::EnumOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[3]; -- - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -949,8 +937,6 @@ - ::google::protobuf::EnumValueOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[3]; -- - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -1051,8 +1037,6 @@ - ::google::protobuf::ServiceOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[3]; -- - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -1163,8 +1147,6 @@ - ::google::protobuf::MethodOptions* options_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[4]; -- - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -1379,8 +1361,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[5]; -- - ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -1553,8 +1533,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[2]; -- - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -1752,8 +1730,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[3]; -- - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -1919,8 +1895,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[1]; -- - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -2086,8 +2060,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[1]; -- - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -2253,8 +2225,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[1]; -- - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -2420,8 +2390,6 @@ - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[1]; -- - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -2512,8 +2480,6 @@ - bool is_extension_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[2]; -- - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? -@@ -2641,8 +2607,6 @@ - static const ::std::string _default_string_value_; - friend void protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto_AssignGlobalDescriptors( - const ::google::protobuf::FileDescriptor* file); -- static const int _offsets_[6]; -- - ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? diff --git a/protobuf-pkgconfig-autotools.patch b/protobuf-pkgconfig-autotools.patch deleted file mode 100644 index 28afd3c..0000000 --- a/protobuf-pkgconfig-autotools.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- protobuf-2.0.2/configure.ac.orig 2008-10-03 17:54:31.000000000 +0000 -+++ protobuf-2.0.2/configure.ac 2008-10-06 08:31:06.000000000 +0000 -@@ -31,5 +31,5 @@ - ACX_PTHREAD - AC_CXX_STL_HASH - --AC_CONFIG_FILES([Makefile src/Makefile ]) -+AC_CONFIG_FILES([Makefile src/Makefile protobuf.pc ]) - AC_OUTPUT ---- protobuf-2.0.0beta/Makefile.am.orig 2008-07-03 15:41:02.000000000 -0600 -+++ protobuf-2.0.0beta/Makefile.am 2008-08-13 10:09:59.000000000 -0600 -@@ -113,5 +113,9 @@ - Makefile.in \ - missing \ - mkinstalldirs \ - config.h.in \ - stamp.h.in -+ -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = protobuf.pc -+ diff --git a/protobuf.pc.in b/protobuf.pc.in deleted file mode 100644 index e2cc3a3..0000000 --- a/protobuf.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################# -## Copyright (C) 2008 by Rick L. Vinyard, Jr. ## -## rvinyard@cs.nmsu.edu ## -############################################################################# -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: protobuf -Description: Protocol Buffers are a way of encoding structured data -Requires: -Version: 2.0.2 -Libs: -L${libdir} -lprotobuf -Cflags: -I${includedir}/google/ diff --git a/protobuf.spec b/protobuf.spec index f8f030c..239c024 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -12,18 +12,14 @@ Summary: Protocol Buffers - Google's data interchange format Name: protobuf -Version: 2.0.2 -Release: 10%{?dist} +Version: 2.2.0 +Release: 1%{?dist} License: BSD Group: Development/Libraries Source: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2 -Source1: protobuf.pc.in -Source2: ftdetect-proto.vim -Patch0: protobuf-pkgconfig-autotools.patch -Patch1: protobuf-fedora-gtest.patch +Source1: ftdetect-proto.vim +Patch1: protobuf-%{version}-fedora-gtest.patch Patch2: protobuf-java-notests.patch -Patch3: protobuf-gcc-4.3.0.patch -Patch4: protobuf-2.0.2-includes.patch URL: http://code.google.com/p/protobuf/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: automake autoconf libtool pkgconfig @@ -72,6 +68,43 @@ Requires: %{name} = %{version}-%{release} %description static Static libraries for Protocol Buffers +%package lite +Summary: Protocol Buffers LITE_RUNTIME libraries +Group: Development/Libraries + +%description lite +Protocol Buffers built with optimize_for = LITE_RUNTIME. + +The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code +which only depends libprotobuf-lite, which is much smaller than libprotobuf but +lacks descriptors, reflection, and some other features. + +%package lite-devel +Summary: Protocol Buffers LITE_RUNTIME development libraries +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-lite = %{version}-%{release} + +%description lite-devel +This package contains development libraries built with +optimize_for = LITE_RUNTIME. + +The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code +which only depends libprotobuf-lite, which is much smaller than libprotobuf but +lacks descriptors, reflection, and some other features. + +%package lite-static +Summary: Static development files for %{name}-lite +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description lite-static +This package contains static development libraries built with +optimize_for = LITE_RUNTIME. + +The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code +which only depends libprotobuf-lite, which is much smaller than libprotobuf but +lacks descriptors, reflection, and some other features. + %if %{with_python} %package python Summary: Python bindings for Google Protocol Buffers @@ -132,30 +165,21 @@ This package contains the API documentation for %{name}-java. %prep %setup -q -%patch0 -p1 %if !%{without_gtest} -rm -rf src/gtest -%patch1 -p1 +rm -rf gtest +%patch1 -p2 %endif -cp -p %{SOURCE1} . chmod 644 examples/* %if %{with_java} %patch2 rm -rf java/src/test %endif -%patch3 -p0 -%patch4 -p1 %build +iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 +mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt ./autogen.sh -%if !%{without_gtest} -export GTEST_CONFIG=`which gtest-config` -sed -i -e 's|AS_IF(\[test "x$HAVE_GTEST" = "xyes"\],||' -e 's|\[m4_ifval(\[$2\], \[$2\])\],||' -e 's|\[m4_ifval(\[$3\], \[$3\])\])||' aclocal.m4 -autoconf -%configure --enable-gtest -%else %configure -%endif make %{?_smp_mflags} @@ -181,12 +205,13 @@ make %{?_smp_mflags} check rm -rf %{buildroot} make %{?_smp_mflags} install DESTDIR=%{buildroot} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p" find %{buildroot} -type f -name "*.la" -exec rm -f {} \; + %if %{with_python} pushd python python ./setup.py install --root=%{buildroot} --single-version-externally-managed --record=INSTALLED_FILES --optimize=1 popd %endif -install -p -m 644 -D %{SOURCE2} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim +install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim %if %{with_java} @@ -206,6 +231,9 @@ install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post lite -p /sbin/ldconfig +%postun lite -p /sbin/ldconfig + %post compiler -p /sbin/ldconfig %postun compiler -p /sbin/ldconfig @@ -245,13 +273,26 @@ rm -rf %{buildroot} %{_libdir}/libprotobuf.a %{_libdir}/libprotoc.a +%files lite +%defattr(-, root, root, -) +%{_libdir}/libprotobuf-lite.so.* + +%files lite-devel +%defattr(-, root, root, -) +%{_libdir}/libprotobuf-lite.so +%{_libdir}/pkgconfig/protobuf-lite.pc + +%files lite-static +%defattr(-, root, root, -) +%{_libdir}/libprotobuf-lite.a + %if %{with_python} %files python %defattr(-, root, root, -) %dir %{python_sitelib}/google %{python_sitelib}/google/protobuf/ -%{python_sitelib}/protobuf-2.0.2-py2.6.egg-info/ -%{python_sitelib}/protobuf-2.0.2-py2.6-nspkg.pth +%{python_sitelib}/protobuf-%{version}-py2.6.egg-info/ +%{python_sitelib}/protobuf-%{version}-py2.6-nspkg.pth %doc python/README.txt %doc examples/add_person.py examples/list_people.py examples/addressbook.proto %endif @@ -275,11 +316,9 @@ rm -rf %{buildroot} %endif %changelog -* Wed Sep 2 2009 Milos Jakubicek - 2.0.2-10 -- Fix FTBFS (BZ#511491): fix autotools to find gtest-config - -* Sun Jul 26 2009 Fedora Release Engineering - 2.0.2-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild +* Fri Sep 18 2009 Lev Shamardin - 2.2.0-1 +- Upgraded to upstream protobuf-2.2.0 +- New -lite packages * Sun Mar 01 2009 Caolán McNamra - 2.0.2-8 - add stdio.h for sprintf, perror, etc.