This update depends on my protobuf 3.6.0 update from a few minutes ago. Switch to release assets instead of using GH_* variables.
A few incompatibilities with the very recent protobuf 3.6.0 need to be patched. As far as I can tell, all dependent ports still build, pass tests and light runtime testing (for details see my other mail). Index: protobuf-c/Makefile =================================================================== RCS file: /var/cvs/ports/devel/protobuf-c/Makefile,v retrieving revision 1.12 diff -u -p -r1.12 Makefile --- protobuf-c/Makefile 26 Jul 2017 22:45:18 -0000 1.12 +++ protobuf-c/Makefile 21 Jun 2018 10:56:54 -0000 @@ -2,18 +2,16 @@ COMMENT = c protocol buffers -V = 1.0.2 -GH_ACCOUNT = protobuf-c -GH_PROJECT = protobuf-c -GH_TAGNAME = v${V} -DISTNAME = ${GH_PROJECT}-${V} -REVISION = 0 +V = 1.3.0 +DISTNAME = protobuf-c-$V -SHARED_LIBS = protobuf-c 1.0 # 1.0 +SHARED_LIBS = protobuf-c 2.0 # 2.0 CATEGORIES = devel HOMEPAGE = https://github.com/protobuf-c/protobuf-c/wiki + +MASTER_SITES= https://github.com/protobuf-c/protobuf-c/releases/download/v$V/ MAINTAINER = Jonathon Sisson <sisso...@gmail.com> Index: protobuf-c/distinfo =================================================================== RCS file: /var/cvs/ports/devel/protobuf-c/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- protobuf-c/distinfo 12 Jun 2015 10:59:46 -0000 1.3 +++ protobuf-c/distinfo 21 Jun 2018 10:53:07 -0000 @@ -1,2 +1,2 @@ -SHA256 (protobuf-c-1.0.2.tar.gz) = Zo5jA8a1tY1G4qg159dwFAWV0Wnyjl4bn0j4tgLfLn0= -SIZE (protobuf-c-1.0.2.tar.gz) = 111228 +SHA256 (protobuf-c-1.3.0.tar.gz) = XcmtepuInPfI/2v3IhXxh0qQJg9grU+IrPIbsV0nUqE= +SIZE (protobuf-c-1.3.0.tar.gz) = 488443 Index: protobuf-c/patches/patch-Makefile_am =================================================================== RCS file: /var/cvs/ports/devel/protobuf-c/patches/patch-Makefile_am,v retrieving revision 1.3 diff -u -p -r1.3 patch-Makefile_am --- protobuf-c/patches/patch-Makefile_am 28 Jun 2017 13:16:49 -0000 1.3 +++ protobuf-c/patches/patch-Makefile_am 21 Jun 2018 08:47:41 -0000 @@ -2,9 +2,9 @@ $OpenBSD: patch-Makefile_am,v 1.3 2017/0 Index: Makefile.am --- Makefile.am.orig +++ Makefile.am -@@ -191,21 +191,4 @@ install-data-hook: +@@ -274,21 +274,4 @@ install-data-hook: $(MKDIR_P) $(DESTDIR)$(includedir)/google/protobuf-c - cd $(DESTDIR)$(includedir)/google/protobuf-c && rm -vf protobuf-c.h + 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 - -# Index: protobuf-c/patches/patch-configure_ac =================================================================== RCS file: protobuf-c/patches/patch-configure_ac diff -N protobuf-c/patches/patch-configure_ac --- protobuf-c/patches/patch-configure_ac 12 Jun 2015 10:59:47 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-configure_ac,v 1.1 2015/06/12 10:59:47 dcoppa Exp $ ---- configure.ac.orig Fri Jun 12 12:24:50 2015 -+++ configure.ac Fri Jun 12 12:25:10 2015 -@@ -47,7 +47,7 @@ AC_ARG_ENABLE([protoc], - AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)])) - if test "x$enable_protoc" != "xno"; then - AC_LANG_PUSH([C++]) -- PKG_CHECK_MODULES([protobuf], [protobuf >= 2.5.0]) -+ PKG_CHECK_MODULES([protobuf], [protobuf]) - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS" Index: protobuf-c/patches/patch-protobuf-c_protobuf-c_c =================================================================== RCS file: protobuf-c/patches/patch-protobuf-c_protobuf-c_c diff -N protobuf-c/patches/patch-protobuf-c_protobuf-c_c --- protobuf-c/patches/patch-protobuf-c_protobuf-c_c 12 Jun 2015 10:59:47 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,19 +0,0 @@ -$OpenBSD: patch-protobuf-c_protobuf-c_c,v 1.1 2015/06/12 10:59:47 dcoppa Exp $ - -commit 060c071209638c2c342fad8338e25005b4bd920e -Author: Ilya Lipnitskiy <ilya.lipnits...@gmail.com> -Date: Tue Nov 18 23:51:37 2014 -0800 - -protobuf-c.c: Fix a bug when merging optional byte fields - ---- protobuf-c/protobuf-c.c.orig Fri Sep 12 22:32:42 2014 -+++ protobuf-c/protobuf-c.c Fri Jun 12 12:34:06 2015 -@@ -2001,7 +2001,7 @@ merge_messages(ProtobufCMessage *earlier_msg, - - need_to_merge = - (e_data != NULL && -- (d_bd != NULL && -+ (d_bd == NULL || - e_data != d_bd->data)) && - (l_data == NULL || - (d_bd != NULL && Index: protobuf-c/patches/patch-protoc-c_c_field_cc =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_field_cc diff -N protobuf-c/patches/patch-protoc-c_c_field_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_field_cc 21 Jun 2018 09:26:29 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_field_h =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_field_h diff -N protobuf-c/patches/patch-protoc-c_c_field_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_field_h 21 Jun 2018 09:26:29 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_file_cc =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_file_cc diff -N protobuf-c/patches/patch-protoc-c_c_file_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_file_cc 21 Jun 2018 09:26:29 -0000 @@ -0,0 +1,26 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_file_h =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_file_h diff -N protobuf-c/patches/patch-protoc-c_c_file_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_file_h 21 Jun 2018 09:26:30 -0000 @@ -0,0 +1,27 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_generator_cc =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_generator_cc diff -N protobuf-c/patches/patch-protoc-c_c_generator_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_generator_cc 21 Jun 2018 09:26:30 -0000 @@ -0,0 +1,52 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_helpers_cc =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_helpers_cc diff -N protobuf-c/patches/patch-protoc-c_c_helpers_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_helpers_cc 21 Jun 2018 09:26:30 -0000 @@ -0,0 +1,64 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_message_cc =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_message_cc diff -N protobuf-c/patches/patch-protoc-c_c_message_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_message_cc 21 Jun 2018 09:26:30 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +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: protobuf-c/patches/patch-protoc-c_c_message_h =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_message_h diff -N protobuf-c/patches/patch-protoc-c_c_message_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ protobuf-c/patches/patch-protoc-c_c_message_h 21 Jun 2018 09:26:30 -0000 @@ -0,0 +1,21 @@ +$OpenBSD$ + +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); + }; Index: protobuf-c/patches/patch-protoc-c_c_service_cc =================================================================== RCS file: protobuf-c/patches/patch-protoc-c_c_service_cc diff -N protobuf-c/patches/patch-protoc-c_c_service_cc --- protobuf-c/patches/patch-protoc-c_c_service_cc 12 Jun 2015 10:59:47 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ -$OpenBSD: patch-protoc-c_c_service_cc,v 1.1 2015/06/12 10:59:47 dcoppa Exp $ - -commit 812ecf9326f61d330feed6d1f3d34a01ed1e127b -Author: Andrey Myznikov <andrey.myzni...@gmail.com> -Date: Wed Mar 11 01:51:48 2015 +0200 - -Fix incorrect 'Short version of service name' generation for -ProtobufCServiceDescriptor - ---- protoc-c/c_service.cc.orig Fri Jun 12 12:36:13 2015 -+++ protoc-c/c_service.cc Fri Jun 12 12:36:51 2015 -@@ -224,6 +224,8 @@ void ServiceGenerator::GenerateServiceDescriptor(io::P - } - printer->Print(vars_, "};\n"); - -+ vars_["name"] = descriptor_->name(); -+ - printer->Print(vars_, "const ProtobufCServiceDescriptor $lcfullname$__descriptor =\n" - "{\n" - " PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC,\n" Index: protobuf-c/patches/patch-t_test-full_proto =================================================================== RCS file: protobuf-c/patches/patch-t_test-full_proto diff -N protobuf-c/patches/patch-t_test-full_proto --- protobuf-c/patches/patch-t_test-full_proto 12 Jun 2015 10:59:47 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ -$OpenBSD: patch-t_test-full_proto,v 1.1 2015/06/12 10:59:47 dcoppa Exp $ ---- t/test-full.proto.orig Fri Jun 12 12:25:26 2015 -+++ t/test-full.proto Fri Jun 12 12:25:43 2015 -@@ -45,7 +45,6 @@ enum TestEnumDupValues { - VALUE_F = 1000; - VALUE_AA = 1000; - VALUE_BB = 1001; -- option allow_alias = true; - } - - message TestFieldNo15 { // should use 1 byte header Index: protobuf-c/pkg/PLIST =================================================================== RCS file: /var/cvs/ports/devel/protobuf-c/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- protobuf-c/pkg/PLIST 4 Sep 2014 12:32:45 -0000 1.2 +++ protobuf-c/pkg/PLIST 21 Jun 2018 12:54:43 -0000 @@ -1,6 +1,6 @@ @comment $OpenBSD: PLIST,v 1.2 2014/09/04 12:32:45 dcoppa Exp $ -@bin bin/protoc-c -include/google/ +bin/protoc-c +@bin bin/protoc-gen-c include/google/protobuf-c/ include/google/protobuf-c/protobuf-c.h include/protobuf-c/