pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/protobuf-c devel/protobuf-c: Make this build wit...
details: https://anonhg.NetBSD.org/pkgsrc/rev/102a8d2a6637
branches: trunk
changeset: 383559:102a8d2a6637
user: minskim <minskim%pkgsrc.org@localhost>
date: Sat Aug 04 21:36:16 2018 +0000
description:
devel/protobuf-c: Make this build with protobuf-3.6.0
diffstat:
devel/protobuf-c/Makefile | 6 +-
devel/protobuf-c/distinfo | 11 ++-
devel/protobuf-c/patches/patch-protoc-c_c__field.cc | 15 ++++
devel/protobuf-c/patches/patch-protoc-c_c__field.h | 15 ++++
devel/protobuf-c/patches/patch-protoc-c_c__file.cc | 24 ++++++
devel/protobuf-c/patches/patch-protoc-c_c__file.h | 26 +++++++
devel/protobuf-c/patches/patch-protoc-c_c__generator.cc | 51 +++++++++++++
devel/protobuf-c/patches/patch-protoc-c_c__helpers.cc | 63 +++++++++++++++++
devel/protobuf-c/patches/patch-protoc-c_c__message.cc | 21 +++++
devel/protobuf-c/patches/patch-protoc-c_c__message.h | 19 +++++
10 files changed, 246 insertions(+), 5 deletions(-)
diffs (truncated from 308 to 300 lines):
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/Makefile
--- a/devel/protobuf-c/Makefile Sat Aug 04 21:33:01 2018 +0000
+++ b/devel/protobuf-c/Makefile Sat Aug 04 21:36:16 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2018/01/17 12:10:37 jperkin Exp $
+# $NetBSD: Makefile,v 1.5 2018/08/04 21:36:16 minskim Exp $
DISTNAME= protobuf-c-1.3.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=protobuf-c/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -14,7 +14,7 @@
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config aclocal autoconf automake gmake
-USE_LANGUAGES= c99 c++
+USE_LANGUAGES= c99 c++11
PKGCONFIG_OVERRIDE+= protobuf-c/libprotobuf-c.pc.in
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/distinfo
--- a/devel/protobuf-c/distinfo Sat Aug 04 21:33:01 2018 +0000
+++ b/devel/protobuf-c/distinfo Sat Aug 04 21:36:16 2018 +0000
@@ -1,7 +1,14 @@
-$NetBSD: distinfo,v 1.4 2017/08/30 11:05:05 wiedi Exp $
+$NetBSD: distinfo,v 1.5 2018/08/04 21:36:16 minskim Exp $
SHA1 (protobuf-c-1.3.0.tar.gz) = b1df242c1445e2cc22708ca1889f5ce63bcbfc6c
RMD160 (protobuf-c-1.3.0.tar.gz) = 528c1ae07297990f1e3405db2e3129eef9823698
SHA512 (protobuf-c-1.3.0.tar.gz) = 52a8564c4570ce45de41f664d2c8edaa0712a5c076d6c9b48a4a1022df83ba5f2e1950823a0e91c2754d9ea9922e11d0cc86f82c23ba77e0f0c5659ed43126aa
Size (protobuf-c-1.3.0.tar.gz) = 123153 bytes
-SHA1 (patch-Makefile.am) = 7e037f255e8415cf3584adb0f652aabc71b4ecfe
+SHA1 (patch-protoc-c_c__field.cc) = 79f649fcc6deeda7f86e4ba83f7e279b3aef2070
+SHA1 (patch-protoc-c_c__field.h) = 9b6a71cb880b774a676c14783cc60bff21ebb6c3
+SHA1 (patch-protoc-c_c__file.cc) = 27a9e34d34cae5f726ecef3f4d96ad6bdc9ddd9f
+SHA1 (patch-protoc-c_c__file.h) = 7e7e42a56939d3cf6b23f5e53a9dd7a89e04db1b
+SHA1 (patch-protoc-c_c__generator.cc) = fc5795bec0c6536713ee7043777edd10b07db9b4
+SHA1 (patch-protoc-c_c__helpers.cc) = 236b1ead1a5f452cf8532507326bd6316e6c6c17
+SHA1 (patch-protoc-c_c__message.cc) = f36502a761f46cb555708ef14d26e4aec5725001
+SHA1 (patch-protoc-c_c__message.h) = b5f2761ab1f1f735fd0a795342b3479e6b253832
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__field.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__field.cc Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-protoc-c_c__field.cc,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_field.cc.orig 2017-08-05 21:41:36.000000000 +0000
++++ protoc-c/c_field.cc
+@@ -189,7 +189,7 @@ void FieldGenerator::GenerateDescriptorI
+ 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)));
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__field.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__field.h Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-protoc-c_c__field.h,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_field.h.orig 2017-08-05 21:41:36.000000000 +0000
++++ 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);
+
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__file.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__file.cc Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-protoc-c_c__file.cc,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_file.cc.orig 2017-08-05 21:41:36.000000000 +0000
++++ protoc-c/c_file.cc
+@@ -83,13 +83,13 @@ FileGenerator::FileGenerator(const FileD
+ 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(
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__file.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__file.h Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-protoc-c_c__file.h,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/309
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_file.h.orig 2017-08-05 21:41:36.000000000 +0000
++++ 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);
+ };
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__generator.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__generator.cc Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-protoc-c_c__generator.cc,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/309
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_generator.cc.orig 2017-08-05 21:41:36.000000000 +0000
++++ 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 FileDesc
+ 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 FileDesc
+
+ // 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 FileDesc
+
+ // 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);
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__helpers.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__helpers.cc Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,63 @@
+$NetBSD: patch-protoc-c_c__helpers.cc,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/309
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_helpers.cc.orig 2017-08-05 21:41:36.000000000 +0000
++++ 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 &ful
+ 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 &ful
+ 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,
+ {
+ 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 st
+
+ 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* s
+ }
+ 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);
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__message.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__message.cc Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-protoc-c_c__message.cc,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_message.cc.orig 2017-08-05 21:41:36.000000000 +0000
++++ protoc-c/c_message.cc
+@@ -83,11 +83,11 @@ MessageGenerator::MessageGenerator(const
+ : 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++) {
diff -r 03baf397b7b9 -r 102a8d2a6637 devel/protobuf-c/patches/patch-protoc-c_c__message.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/protobuf-c/patches/patch-protoc-c_c__message.h Sat Aug 04 21:36:16 2018 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-protoc-c_c__message.h,v 1.1 2018/08/04 21:36:16 minskim Exp $
+
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- protoc-c/c_message.h.orig 2017-08-05 21:41:36.000000000 +0000
++++ 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_;
Home |
Main Index |
Thread Index |
Old Index