From 1c18e46d1f0620c85b470371a4ce786962151f36 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 2 May 2017 10:49:30 +0000 Subject: [PATCH] Updated protobuf to 3.3.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) Planned Future Changes * There are some changes that are not included in this release but are planned for the near future: - Preserve unknown fields in proto3: please read this doc: https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view for the timeline and follow up this github issue: https://github.com/google/protobuf/issues/272 for discussion. - Make C++ implementation C++11 only: we plan to require C++11 to build protobuf code starting from 3.4.0 or 3.5.0 release. Please join this github issue: https://github.com/google/protobuf/issues/2780 to provide your feedback. C++ * Fixed map fields serialization of DynamicMessage to correctly serialize both key and value regardless of their presence. * Parser now rejects field number 0 correctly. * New API Message::SpaceUsedLong() that’s equivalent to Message::SpaceUsed() but returns the value in size_t. * JSON support - New flag always_print_enums_as_ints in JsonPrintOptions. - New flag preserve_proto_field_names in JsonPrintOptions. It will instruct the JSON printer to use the original field name declared in the .proto file instead of converting them to lowerCamelCase when printing JSON. - JsonPrintOptions.always_print_primtive_fields now works for oneof message fields. - Fixed a bug that doesn’t allow different fields to set the same json_name value. - Fixed a performance bug that causes excessive memory copy when printing large messages. * Various performance optimizations. Java * Map field setters eagerly validate inputs and throw NullPointerExceptions as appropriate. * Added ByteBuffer overloads to the generated parsing methods and the Parser interface. * proto3 enum's getNumber() method now throws on UNRECOGNIZED values. * Output of JsonFormat is now locale independent. Python * Added FindServiceByName() in the pure-Python DescriptorPool. This works only for descriptors added with DescriptorPool.Add(). Generated descriptor_pool does not support this yet. * Added a descriptor_pool parameter for parsing Any in text_format.Parse(). * descriptor_pool.FindFileContainingSymbol() now is able to find nested extensions. * Extending empty [] to repeated field now sets parent message presence. PHP * Added file option php_class_prefix. The prefix will be prepended to all generated classes defined in the file. * When encoding, negative int32 values are sign-extended to int64. * Repeated/Map field setter accepts a regular PHP array. Type checking is done on the array elements. * encode/decode are renamed to serializeToString/mergeFromString. * Added mergeFrom, clear method on Message. * Fixed a bug that oneof accessor didn’t return the field name that is actually set. * C extension now works with php7. * This is the first GA release of PHP. We guarantee that old generated code can always work with new runtime and new generated code. Objective-C * Fixed help for GPBTimestamp for dates before the epoch that contain fractional seconds. * Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a message and any sub messages. * Addressed a threading race in extension registration/lookup. * Increased the max message parsing depth to 100 to match the other languages. * Removed some use of dispatch_once in favor of atomic compare/set since it needs to be heap based. * Fixes for new Xcode 8.3 warnings. C# * Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily if provided exactly the right size of array to copy to. * Fixed enum JSON formatting when multiple names mapped to the same numeric value. * Added JSON formatting option to format enums as integers. * Modified RepeatedField to implement IReadOnlyList. * Introduced the start of custom option handling; it's not as pleasant as it might be, but the information is at least present. We expect to extend code generation to improve this in the future. * Introduced ByteString.FromStream and ByteString.FromStreamAsync to efficiently create a ByteString from a stream. * Added whole-message deprecation, which decorates the class with [Obsolete]. Ruby * Fixed Message#to_h for messages with map fields. * Fixed memcpy() in binary gems to work for old glibc, without breaking the build for non-glibc libc’s like musl. Javascript * Added compatibility tests for version 3.0.0. * Added conformance tests. * Fixed serialization of extensions: we need to emit a value even if it is falsy (like the number 0). * Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript. --- devel/protobuf/Makefile.common | 4 ++-- devel/protobuf/PLIST | 8 ++++++-- devel/protobuf/distinfo | 13 +++++++------ devel/protobuf/patches/patch-configure | 13 +++++++++++++ devel/protobuf/patches/patch-configure.ac | 13 +++++++++++++ 5 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 devel/protobuf/patches/patch-configure create mode 100644 devel/protobuf/patches/patch-configure.ac diff --git a/devel/protobuf/Makefile.common b/devel/protobuf/Makefile.common index a9e9734d0e25c..7a2bc1246b907 100644 --- a/devel/protobuf/Makefile.common +++ b/devel/protobuf/Makefile.common @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.common,v 1.6 2017/02/07 13:50:31 wiz Exp $ +# $NetBSD: Makefile.common,v 1.7 2017/05/02 10:49:30 wiz Exp $ # # used by devel/protobuf/Makefile # used by devel/py-protobuf/Makefile -PROTOBUFVER= 3.2.0 +PROTOBUFVER= 3.3.0 MASTER_SITES= ${MASTER_SITE_GITHUB:=google/} GITHUB_PROJECT= protobuf diff --git a/devel/protobuf/PLIST b/devel/protobuf/PLIST index 33b9263e1bea4..7c45ec75c8a02 100644 --- a/devel/protobuf/PLIST +++ b/devel/protobuf/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2017/02/07 13:50:31 wiz Exp $ +@comment $NetBSD: PLIST,v 1.7 2017/05/02 10:49:30 wiz Exp $ bin/protoc include/google/protobuf/any.h include/google/protobuf/any.pb.h @@ -25,6 +25,8 @@ include/google/protobuf/compiler/php/php_generator.h include/google/protobuf/compiler/plugin.h include/google/protobuf/compiler/plugin.pb.h include/google/protobuf/compiler/plugin.proto +include/google/protobuf/compiler/profile.pb.h +include/google/protobuf/compiler/profile.proto include/google/protobuf/compiler/python/python_generator.h include/google/protobuf/compiler/ruby/ruby_generator.h include/google/protobuf/descriptor.h @@ -42,6 +44,7 @@ include/google/protobuf/field_mask.proto include/google/protobuf/generated_enum_reflection.h include/google/protobuf/generated_enum_util.h include/google/protobuf/generated_message_reflection.h +include/google/protobuf/generated_message_table_driven.h include/google/protobuf/generated_message_util.h include/google/protobuf/has_bits.h include/google/protobuf/io/coded_stream.h @@ -62,6 +65,7 @@ include/google/protobuf/map_type_handler.h include/google/protobuf/message.h include/google/protobuf/message_lite.h include/google/protobuf/metadata.h +include/google/protobuf/metadata_lite.h include/google/protobuf/reflection.h include/google/protobuf/reflection_ops.h include/google/protobuf/repeated_field.h @@ -78,7 +82,6 @@ include/google/protobuf/stubs/atomicops_internals_arm_qnx.h include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h include/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h include/google/protobuf/stubs/atomicops_internals_generic_gcc.h -include/google/protobuf/stubs/atomicops_internals_macosx.h include/google/protobuf/stubs/atomicops_internals_mips_gcc.h include/google/protobuf/stubs/atomicops_internals_power.h include/google/protobuf/stubs/atomicops_internals_ppc_gcc.h @@ -112,6 +115,7 @@ include/google/protobuf/timestamp.proto include/google/protobuf/type.pb.h include/google/protobuf/type.proto include/google/protobuf/unknown_field_set.h +include/google/protobuf/util/delimited_message_util.h include/google/protobuf/util/field_comparator.h include/google/protobuf/util/field_mask_util.h include/google/protobuf/util/json_util.h diff --git a/devel/protobuf/distinfo b/devel/protobuf/distinfo index 125051dce02ea..1e05efcf9e80d 100644 --- a/devel/protobuf/distinfo +++ b/devel/protobuf/distinfo @@ -1,12 +1,13 @@ -$NetBSD: distinfo,v 1.13 2017/02/07 13:50:31 wiz Exp $ +$NetBSD: distinfo,v 1.14 2017/05/02 10:49:30 wiz Exp $ -SHA1 (protobuf-cpp-3.2.0.tar.gz) = 7518aef2471e7398ebd0d85a53836d6a076222d5 -RMD160 (protobuf-cpp-3.2.0.tar.gz) = f83bddecef7c2b545ea342d1acac568fa5454242 -SHA512 (protobuf-cpp-3.2.0.tar.gz) = dd005f5e862ff24bb233b9eaed1d7f44c42f1cc8c647c0839fe2ecc2d91178845195d79776cfa2e31d224c16eed11b05ad824b66b743e685334057d8180f17aa -Size (protobuf-cpp-3.2.0.tar.gz) = 4148324 bytes +SHA1 (protobuf-cpp-3.3.0.tar.gz) = 886010a222d5d52bba137ce35da369949d0e8913 +RMD160 (protobuf-cpp-3.3.0.tar.gz) = fd8611a77b5d70295ae925e3b66ff3091af3b109 +SHA512 (protobuf-cpp-3.3.0.tar.gz) = 3fbee5ebaf8aa83793af87ce593fb2511057e26251ff7276c0cb108edd8c4699cbe376e30679f23953900219d89cd13f5bf5232eb717e6ce6e702ed48dadfaa8 +Size (protobuf-cpp-3.3.0.tar.gz) = 4214662 bytes +SHA1 (patch-configure) = 5faf2311cc163d49e2beacb030845ffe14d3b9a2 +SHA1 (patch-configure.ac) = f6556f2f82e728459da7d7b090ccdfbd7be1411a SHA1 (patch-gmock_configure) = 49a4c9301ad4c1973ee7058213df50a7833161f0 SHA1 (patch-gmock_configure.ac) = cfd7b7c87eff4b06ce6ecb34dec046561bbdc113 -SHA1 (patch-src_google_protobuf_compiler_plugin.pb.h) = e13704e04858e747e5c3e52fd3d399458face3f0 SHA1 (patch-src_google_protobuf_message__lite.cc) = 8f2ffe07b2710de5365148153978ad6d9939f522 SHA1 (patch-src_google_protobuf_stubs_atomicops.h) = 9ec851134da674980a49302e9582a432a47f7974 SHA1 (patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h) = d60c554be8ff7fc9370bb036eef9101f9a6433e3 diff --git a/devel/protobuf/patches/patch-configure b/devel/protobuf/patches/patch-configure new file mode 100644 index 0000000000000..5e22c1b451463 --- /dev/null +++ b/devel/protobuf/patches/patch-configure @@ -0,0 +1,13 @@ +$NetBSD: patch-configure,v 1.1 2017/05/02 10:49:30 wiz Exp $ + +--- configure.orig 2017-04-06 00:37:52.000000000 +0000 ++++ configure +@@ -18003,7 +18003,7 @@ fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +- if test "$have_ld_version_script" == "yes"; then ++ if test "$have_ld_version_script" = "yes"; then + HAVE_LD_VERSION_SCRIPT_TRUE= + HAVE_LD_VERSION_SCRIPT_FALSE='#' + else diff --git a/devel/protobuf/patches/patch-configure.ac b/devel/protobuf/patches/patch-configure.ac new file mode 100644 index 0000000000000..e4024d1352eb0 --- /dev/null +++ b/devel/protobuf/patches/patch-configure.ac @@ -0,0 +1,13 @@ +$NetBSD: patch-configure.ac,v 1.1 2017/05/02 10:49:30 wiz Exp $ + +--- configure.ac.orig 2017-04-06 00:15:19.000000000 +0000 ++++ configure.ac +@@ -110,7 +110,7 @@ AC_LINK_IFELSE( + [have_ld_version_script=yes; AC_MSG_RESULT(yes)], + [have_ld_version_script=no; AC_MSG_RESULT(no)]) + LDFLAGS=$save_LDFLAGS +-AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"]) ++AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" = "yes"]) + + # Checks for header files. + AC_HEADER_STDC