[Update] protobuf-c to 1.3.2

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Update] protobuf-c to 1.3.2

Jonathon Sisson-2
Hello,

Here is a trivial update of protobuf-c to 1.3.2.

Many patches removed, as they've been included upstream.

Will be submitting a protobuf diff shortly as well, with the hopes that the version updates will allow protobuf-c to resume building on arm64.  If not, may Otto@ return from vacation fully rested and ready to debug Signal 11s in protoc =)

Jonathon



Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/protobuf-c/Makefile,v
retrieving revision 1.15
diff -u -p -u -p -r1.15 Makefile
--- Makefile 12 Jul 2019 20:45:16 -0000 1.15
+++ Makefile 20 Jul 2019 10:55:05 -0000
@@ -2,7 +2,7 @@
 
 COMMENT = c protocol buffers
 
-V = 1.3.0
+V = 1.3.2
 DISTNAME = protobuf-c-$V
 
 SHARED_LIBS = protobuf-c 2.0 # 2.0
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/protobuf-c/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo 10 Jul 2018 10:49:43 -0000 1.4
+++ distinfo 20 Jul 2019 10:55:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (protobuf-c-1.3.0.tar.gz) = XcmtepuInPfI/2v3IhXxh0qQJg9grU+IrPIbsV0nUqE=
-SIZE (protobuf-c-1.3.0.tar.gz) = 488443
+SHA256 (protobuf-c-1.3.2.tar.gz) = U/JR8UxZe9sIeuzwtjYw9DTXP1oQ/BrFRQc1l1NbnnQ=
+SIZE (protobuf-c-1.3.2.tar.gz) = 500100
Index: patches/patch-protoc-c_c_field_cc
===================================================================
RCS file: patches/patch-protoc-c_c_field_cc
diff -N patches/patch-protoc-c_c_field_cc
--- patches/patch-protoc-c_c_field_cc 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-protoc-c_c_field_cc,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_field.cc
---- protoc-c/c_field.cc.orig
-+++ protoc-c/c_field.cc
-@@ -189,7 +189,7 @@ void FieldGenerator::GenerateDescriptorInitializerGene
- FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor)
-   : descriptor_(descriptor),
-     field_generators_(
--      new scoped_ptr<FieldGenerator>[descriptor->field_count()]) {
-+      new std::unique_ptr<FieldGenerator>[descriptor->field_count()]) {
-   // Construct all the FieldGenerators.
-   for (int i = 0; i < descriptor->field_count(); i++) {
-     field_generators_[i].reset(MakeGenerator(descriptor->field(i)));
Index: patches/patch-protoc-c_c_field_h
===================================================================
RCS file: patches/patch-protoc-c_c_field_h
diff -N patches/patch-protoc-c_c_field_h
--- patches/patch-protoc-c_c_field_h 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-protoc-c_c_field_h,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_field.h
---- protoc-c/c_field.h.orig
-+++ protoc-c/c_field.h
-@@ -117,7 +117,7 @@ class FieldGeneratorMap {
-
-  private:
-   const Descriptor* descriptor_;
--  scoped_array<scoped_ptr<FieldGenerator> > field_generators_;
-+  std::unique_ptr<std::unique_ptr<FieldGenerator>[] > field_generators_;
-
-   static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
-
Index: patches/patch-protoc-c_c_file_cc
===================================================================
RCS file: patches/patch-protoc-c_c_file_cc
diff -N patches/patch-protoc-c_c_file_cc
--- patches/patch-protoc-c_c_file_cc 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-protoc-c_c_file_cc,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_file.cc
---- protoc-c/c_file.cc.orig
-+++ protoc-c/c_file.cc
-@@ -83,13 +83,13 @@ FileGenerator::FileGenerator(const FileDescriptor* fil
-                              const string& dllexport_decl)
-   : file_(file),
-     message_generators_(
--      new scoped_ptr<MessageGenerator>[file->message_type_count()]),
-+      new std::unique_ptr<MessageGenerator>[file->message_type_count()]),
-     enum_generators_(
--      new scoped_ptr<EnumGenerator>[file->enum_type_count()]),
-+      new std::unique_ptr<EnumGenerator>[file->enum_type_count()]),
-     service_generators_(
--      new scoped_ptr<ServiceGenerator>[file->service_count()]),
-+      new std::unique_ptr<ServiceGenerator>[file->service_count()]),
-     extension_generators_(
--      new scoped_ptr<ExtensionGenerator>[file->extension_count()]) {
-+      new std::unique_ptr<ExtensionGenerator>[file->extension_count()]) {
-
-   for (int i = 0; i < file->message_type_count(); i++) {
-     message_generators_[i].reset(
Index: patches/patch-protoc-c_c_file_h
===================================================================
RCS file: patches/patch-protoc-c_c_file_h
diff -N patches/patch-protoc-c_c_file_h
--- patches/patch-protoc-c_c_file_h 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-protoc-c_c_file_h,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_file.h
---- protoc-c/c_file.h.orig
-+++ protoc-c/c_file.h
-@@ -98,13 +98,13 @@ class FileGenerator {
-  private:
-   const FileDescriptor* file_;
-
--  scoped_array<scoped_ptr<MessageGenerator> > message_generators_;
--  scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
--  scoped_array<scoped_ptr<ServiceGenerator> > service_generators_;
--  scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
-+  std::unique_ptr<std::unique_ptr<MessageGenerator>[] > message_generators_;
-+  std::unique_ptr<std::unique_ptr<EnumGenerator>[] > enum_generators_;
-+  std::unique_ptr<std::unique_ptr<ServiceGenerator>[] > service_generators_;
-+  std::unique_ptr<std::unique_ptr<ExtensionGenerator>[] > extension_generators_;
-
-   // E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}.
--  vector<string> package_parts_;
-+  std::vector<string> package_parts_;
-
-   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
- };
Index: patches/patch-protoc-c_c_generator_cc
===================================================================
RCS file: patches/patch-protoc-c_c_generator_cc
diff -N patches/patch-protoc-c_c_generator_cc
--- patches/patch-protoc-c_c_generator_cc 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-$OpenBSD: patch-protoc-c_c_generator_cc,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_generator.cc
---- protoc-c/c_generator.cc.orig
-+++ protoc-c/c_generator.cc
-@@ -80,13 +80,13 @@ namespace c {
- //   "foo=bar,baz,qux=corge"
- // parses to the pairs:
- //   ("foo", "bar"), ("baz", ""), ("qux", "corge")
--void ParseOptions(const string& text, vector<pair<string, string> >* output) {
--  vector<string> parts;
-+void ParseOptions(const string& text, std::vector<std::pair<string, string> >* output) {
-+  std::vector<string> parts;
-   SplitStringUsing(text, ",", &parts);
-
-   for (unsigned i = 0; i < parts.size(); i++) {
-     string::size_type equals_pos = parts[i].find_first_of('=');
--    pair<string, string> value;
-+    std::pair<string, string> value;
-     if (equals_pos == string::npos) {
-       value.first = parts[i];
-       value.second = "";
-@@ -105,7 +105,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
-                             const string& parameter,
-                             OutputDirectory* output_directory,
-                             string* error) const {
--  vector<pair<string, string> > options;
-+  std::vector<std::pair<string, string> > options;
-   ParseOptions(parameter, &options);
-
-   // -----------------------------------------------------------------
-@@ -149,7 +149,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
-
-   // Generate header.
-   {
--    scoped_ptr<io::ZeroCopyOutputStream> output(
-+    std::unique_ptr<io::ZeroCopyOutputStream> output(
-       output_directory->Open(basename + ".h"));
-     io::Printer printer(output.get(), '$');
-     file_generator.GenerateHeader(&printer);
-@@ -157,7 +157,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
-
-   // Generate cc file.
-   {
--    scoped_ptr<io::ZeroCopyOutputStream> output(
-+    std::unique_ptr<io::ZeroCopyOutputStream> output(
-       output_directory->Open(basename + ".c"));
-     io::Printer printer(output.get(), '$');
-     file_generator.GenerateSource(&printer);
Index: patches/patch-protoc-c_c_helpers_cc
===================================================================
RCS file: patches/patch-protoc-c_c_helpers_cc
diff -N patches/patch-protoc-c_c_helpers_cc
--- patches/patch-protoc-c_c_helpers_cc 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,64 +0,0 @@
-$OpenBSD: patch-protoc-c_c_helpers_cc,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_helpers.cc
---- protoc-c/c_helpers.cc.orig
-+++ protoc-c/c_helpers.cc
-@@ -177,7 +177,7 @@ string ToCamel(const string &name) {
- }
-
- string FullNameToLower(const string &full_name) {
--  vector<string> pieces;
-+  std::vector<string> pieces;
-   SplitStringUsing(full_name, ".", &pieces);
-   string rv = "";
-   for (unsigned i = 0; i < pieces.size(); i++) {
-@@ -188,7 +188,7 @@ string FullNameToLower(const string &full_name) {
-   return rv;
- }
- string FullNameToUpper(const string &full_name) {
--  vector<string> pieces;
-+  std::vector<string> pieces;
-   SplitStringUsing(full_name, ".", &pieces);
-   string rv = "";
-   for (unsigned i = 0; i < pieces.size(); i++) {
-@@ -199,7 +199,7 @@ string FullNameToUpper(const string &full_name) {
-   return rv;
- }
- string FullNameToC(const string &full_name) {
--  vector<string> pieces;
-+  std::vector<string> pieces;
-   SplitStringUsing(full_name, ".", &pieces);
-   string rv = "";
-   for (unsigned i = 0; i < pieces.size(); i++) {
-@@ -214,7 +214,7 @@ void PrintComment (io::Printer* printer, string commen
- {
-    if (!comment.empty())
-    {
--      vector<string> comment_lines;
-+      std::vector<string> comment_lines;
-       SplitStringUsing (comment, "\r\n", &comment_lines);
-       printer->Print ("/*\n");
-       for (int i = 0; i < comment_lines.size(); i++)
-@@ -503,8 +503,8 @@ void SplitStringToIteratorUsing(const string& full,
-
- void SplitStringUsing(const string& full,
-                       const char* delim,
--                      vector<string>* result) {
--  std::back_insert_iterator< vector<string> > it(*result);
-+                      std::vector<string>* result) {
-+  std::back_insert_iterator< std::vector<string> > it(*result);
-   SplitStringToIteratorUsing(full, delim, it);
- }
-
-@@ -559,7 +559,7 @@ static int CEscapeInternal(const char* src, int src_le
- }
- string CEscape(const string& src) {
-   const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
--  scoped_array<char> dest(new char[dest_length]);
-+  std::unique_ptr<char[]> dest(new char[dest_length]);
-   const int len = CEscapeInternal(src.data(), src.size(),
-                                   dest.get(), dest_length, false);
-   GOOGLE_DCHECK_GE(len, 0);
Index: patches/patch-protoc-c_c_message_cc
===================================================================
RCS file: patches/patch-protoc-c_c_message_cc
diff -N patches/patch-protoc-c_c_message_cc
--- patches/patch-protoc-c_c_message_cc 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-protoc-c_c_message_cc,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_message.cc
---- protoc-c/c_message.cc.orig
-+++ protoc-c/c_message.cc
-@@ -83,11 +83,11 @@ MessageGenerator::MessageGenerator(const Descriptor* d
-   : descriptor_(descriptor),
-     dllexport_decl_(dllexport_decl),
-     field_generators_(descriptor),
--    nested_generators_(new scoped_ptr<MessageGenerator>[
-+    nested_generators_(new std::unique_ptr<MessageGenerator>[
-       descriptor->nested_type_count()]),
--    enum_generators_(new scoped_ptr<EnumGenerator>[
-+    enum_generators_(new std::unique_ptr<EnumGenerator>[
-       descriptor->enum_type_count()]),
--    extension_generators_(new scoped_ptr<ExtensionGenerator>[
-+    extension_generators_(new std::unique_ptr<ExtensionGenerator>[
-       descriptor->extension_count()]) {
-
-   for (int i = 0; i < descriptor->nested_type_count(); i++) {
Index: patches/patch-protoc-c_c_message_h
===================================================================
RCS file: patches/patch-protoc-c_c_message_h
diff -N patches/patch-protoc-c_c_message_h
--- patches/patch-protoc-c_c_message_h 10 Jul 2018 10:49:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-protoc-c_c_message_h,v 1.1 2018/07/10 10:49:43 tb Exp $
-
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
-Index: protoc-c/c_message.h
---- protoc-c/c_message.h.orig
-+++ protoc-c/c_message.h
-@@ -126,9 +126,9 @@ class MessageGenerator {
-   const Descriptor* descriptor_;
-   string dllexport_decl_;
-   FieldGeneratorMap field_generators_;
--  scoped_array<scoped_ptr<MessageGenerator> > nested_generators_;
--  scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
--  scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
-+  std::unique_ptr<std::unique_ptr<MessageGenerator>[] > nested_generators_;
-+  std::unique_ptr<std::unique_ptr<EnumGenerator>[] > enum_generators_;
-+  std::unique_ptr<std::unique_ptr<ExtensionGenerator>[] > extension_generators_;
-
-   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
- };

Reply | Threaded
Open this post in threaded view
|

Re: [Update] protobuf-c to 1.3.2

Stuart Henderson
On 2019/07/20 04:01, Jonathon Sisson wrote:
> Hello,
>
> Here is a trivial update of protobuf-c to 1.3.2.
>
> Many patches removed, as they've been included upstream.

I've committed this.

The remaining patch and use of autoconf+automake isn't needed either -
doxygen is detected in "make configure" but isn't used unless you run "make html"
so this can just go.  OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/protobuf-c/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- Makefile 20 Jul 2019 17:44:50 -0000 1.16
+++ Makefile 20 Jul 2019 17:49:25 -0000
@@ -25,10 +25,7 @@ CXXFLAGS += -std=gnu++11
 
 LIB_DEPENDS = devel/protobuf
 
-AUTOCONF_VERSION = 2.69
-AUTOMAKE_VERSION = 1.15
-
-CONFIGURE_STYLE = autoreconf
+CONFIGURE_STYLE = gnu
 
 CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
  LDFLAGS="-L${LOCALBASE}/lib"
Index: patches/patch-Makefile_am
===================================================================
RCS file: patches/patch-Makefile_am
diff -N patches/patch-Makefile_am
--- patches/patch-Makefile_am 10 Jul 2018 10:49:43 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-Makefile_am,v 1.4 2018/07/10 10:49:43 tb Exp $
-Index: Makefile.am
---- Makefile.am.orig
-+++ Makefile.am
-@@ -274,21 +274,4 @@ install-data-hook:
- $(MKDIR_P) $(DESTDIR)$(includedir)/google/protobuf-c
- cd $(DESTDIR)$(includedir)/google/protobuf-c && rm -f protobuf-c.h
- cd $(DESTDIR)$(includedir)/google/protobuf-c && $(LN_S) ../../protobuf-c/protobuf-c.h protobuf-c.h
--
--#
--# documentation
--#
--
--if HAVE_DOXYGEN
--stamp-html: $(DOXYGEN_INPUT_FILES) $(top_builddir)/Doxyfile $(top_srcdir)/DoxygenLayout.xml $(include_HEADERS) $(nobase_include_HEADERS)
-- $(AM_V_GEN) $(DOXYGEN)
-- @touch $@
--html-local: stamp-html
--
--clean-local:
-- rm -rf $(top_builddir)/html $(top_builddir)/stamp-html
--endif
--
--EXTRA_DIST += Doxyfile.in
--EXTRA_DIST += DoxygenLayout.xml
- EXTRA_DIST += build-cmake/CMakeLists.txt


Reply | Threaded
Open this post in threaded view
|

Re: [Update] protobuf-c to 1.3.2

Theo Buehler-3
On Sat, Jul 20, 2019 at 06:50:15PM +0100, Stuart Henderson wrote:

> On 2019/07/20 04:01, Jonathon Sisson wrote:
> > Hello,
> >
> > Here is a trivial update of protobuf-c to 1.3.2.
> >
> > Many patches removed, as they've been included upstream.
>
> I've committed this.
>
> The remaining patch and use of autoconf+automake isn't needed either -
> doxygen is detected in "make configure" but isn't used unless you run "make html"
> so this can just go.  OK?

ok