summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorJens Rehsack <sno@netbsd.org>2018-08-28 16:20:09 +0200
committerKhem Raj <raj.khem@gmail.com>2018-08-28 09:37:33 -0700
commitaa6b137ace9bc680a69171d31af288ca4b7bbd1e (patch)
tree87f239ecb81c1c1ff6f46f84d72799d10d4f387a /meta-oe
parent60f6414ba9ef7ac558d026b72d04441bf5d958fd (diff)
downloadmeta-openembedded-aa6b137ace9bc680a69171d31af288ca4b7bbd1e.tar.gz
protobuf-c: Update 1.3.0 -> 1.3.1
Updating protobuf-c to 3.6.1: [ Robert Edmonds ] * Release 1.3.1. * Restore protobuf-2.x compatibility (#284, #285). * Use xenial and protobuf 3.6.1 in the Travis-CI environment (#332). * Convert uses of protobuf's scoped_ptr.h to C++11 std::unique_ptr, needed to compile against protobuf 3.6.1 (#320, #333). * Use AX_CXX_COMPILE_STDCXX macro to enable C++11 support in old compilers (#312, #317, #327, #334). [ Fredrik Gustafsson ] * Add std:: to some types (#294, #305, #309). [ Sam Collinson ] * Check the return value of int_range_lookup before using as an array index; it can return -1 (#315). [ Matthias Dittrich ] * Fix compilation on mingw by using explicit protoc --plugin=NAME=PATH syntax in Makefile.am (#289, #290). Removing deprecated 0001-protobuf-c-fix-compile-error-with-protobuf-3.6.0.1.patch Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c/0001-protobuf-c-fix-compile-error-with-protobuf-3.6.0.1.patch207
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.0.bb)6
2 files changed, 2 insertions, 211 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-protobuf-c-fix-compile-error-with-protobuf-3.6.0.1.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-protobuf-c-fix-compile-error-with-protobuf-3.6.0.1.patch
deleted file mode 100644
index e6239ee32..000000000
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-protobuf-c-fix-compile-error-with-protobuf-3.6.0.1.patch
+++ /dev/null
@@ -1,207 +0,0 @@
1From fb77cbce29d9ea4d4acbfd6ba72cb1cffabf649a Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 20 Jul 2018 11:47:53 +0800
4Subject: [PATCH] protobuf-c: fix compile error with protobuf 3.6.0.1
5
6Upstream-Status: Backport[https://github.com/protobuf-c/protobuf-c/pull/328]
7
81. protoc-c depend on protobuf, from protobuf 3.6.0.1,
9scoped_array is removed, but protoc-c still use scoped_array,
10caused compile error.
11
122. fix compile error since missing namespace
13
14
15Signed-off-by: Changqing Li <changqing.li@windriver.com>
16---
17 protoc-c/c_field.cc | 2 +-
18 protoc-c/c_field.h | 2 +-
19 protoc-c/c_file.cc | 8 ++++----
20 protoc-c/c_file.h | 10 +++++-----
21 protoc-c/c_generator.cc | 12 ++++++------
22 protoc-c/c_helpers.cc | 4 +++-
23 protoc-c/c_message.cc | 6 +++---
24 protoc-c/c_message.h | 7 ++++---
25 8 files changed, 27 insertions(+), 24 deletions(-)
26
27diff --git a/protoc-c/c_field.cc b/protoc-c/c_field.cc
28index 9fa56ef..eaa38d2 100644
29--- a/protoc-c/c_field.cc
30+++ b/protoc-c/c_field.cc
31@@ -189,7 +189,7 @@ void FieldGenerator::GenerateDescriptorInitializerGeneric(io::Printer* printer,
32 FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor)
33 : descriptor_(descriptor),
34 field_generators_(
35- new scoped_ptr<FieldGenerator>[descriptor->field_count()]) {
36+ new std::unique_ptr<FieldGenerator>[descriptor->field_count()]) {
37 // Construct all the FieldGenerators.
38 for (int i = 0; i < descriptor->field_count(); i++) {
39 field_generators_[i].reset(MakeGenerator(descriptor->field(i)));
40diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h
41index 91f1a03..94b2fad 100644
42--- a/protoc-c/c_field.h
43+++ b/protoc-c/c_field.h
44@@ -117,7 +117,7 @@ class FieldGeneratorMap {
45
46 private:
47 const Descriptor* descriptor_;
48- scoped_array<scoped_ptr<FieldGenerator> > field_generators_;
49+ std::unique_ptr<std::unique_ptr<FieldGenerator>[]> field_generators_;
50
51 static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
52
53diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc
54index 9851768..6dae516 100644
55--- a/protoc-c/c_file.cc
56+++ b/protoc-c/c_file.cc
57@@ -83,13 +83,13 @@ FileGenerator::FileGenerator(const FileDescriptor* file,
58 const string& dllexport_decl)
59 : file_(file),
60 message_generators_(
61- new scoped_ptr<MessageGenerator>[file->message_type_count()]),
62+ new std::unique_ptr<MessageGenerator>[file->message_type_count()]),
63 enum_generators_(
64- new scoped_ptr<EnumGenerator>[file->enum_type_count()]),
65+ new std::unique_ptr<EnumGenerator>[file->enum_type_count()]),
66 service_generators_(
67- new scoped_ptr<ServiceGenerator>[file->service_count()]),
68+ new std::unique_ptr<ServiceGenerator>[file->service_count()]),
69 extension_generators_(
70- new scoped_ptr<ExtensionGenerator>[file->extension_count()]) {
71+ new std::unique_ptr<ExtensionGenerator>[file->extension_count()]) {
72
73 for (int i = 0; i < file->message_type_count(); i++) {
74 message_generators_[i].reset(
75diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h
76index ed38ce4..adc2841 100644
77--- a/protoc-c/c_file.h
78+++ b/protoc-c/c_file.h
79@@ -98,13 +98,13 @@ class FileGenerator {
80 private:
81 const FileDescriptor* file_;
82
83- scoped_array<scoped_ptr<MessageGenerator> > message_generators_;
84- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
85- scoped_array<scoped_ptr<ServiceGenerator> > service_generators_;
86- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
87+ std::unique_ptr<std::unique_ptr<MessageGenerator>[]> message_generators_;
88+ std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
89+ std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_;
90+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
91
92 // E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}.
93- vector<string> package_parts_;
94+ std::vector<string> package_parts_;
95
96 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
97 };
98diff --git a/protoc-c/c_generator.cc b/protoc-c/c_generator.cc
99index a0d0cb6..c46cfe4 100644
100--- a/protoc-c/c_generator.cc
101+++ b/protoc-c/c_generator.cc
102@@ -80,13 +80,13 @@ namespace c {
103 // "foo=bar,baz,qux=corge"
104 // parses to the pairs:
105 // ("foo", "bar"), ("baz", ""), ("qux", "corge")
106-void ParseOptions(const string& text, vector<pair<string, string> >* output) {
107- vector<string> parts;
108+void ParseOptions(const string& text, std::vector<std::pair<string, string> >* output) {
109+ std::vector<string> parts;
110 SplitStringUsing(text, ",", &parts);
111
112 for (unsigned i = 0; i < parts.size(); i++) {
113 string::size_type equals_pos = parts[i].find_first_of('=');
114- pair<string, string> value;
115+ std::pair<string, string> value;
116 if (equals_pos == string::npos) {
117 value.first = parts[i];
118 value.second = "";
119@@ -105,7 +105,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
120 const string& parameter,
121 OutputDirectory* output_directory,
122 string* error) const {
123- vector<pair<string, string> > options;
124+ std::vector<std::pair<string, string> > options;
125 ParseOptions(parameter, &options);
126
127 // -----------------------------------------------------------------
128@@ -149,7 +149,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
129
130 // Generate header.
131 {
132- scoped_ptr<io::ZeroCopyOutputStream> output(
133+ std::unique_ptr<io::ZeroCopyOutputStream> output(
134 output_directory->Open(basename + ".h"));
135 io::Printer printer(output.get(), '$');
136 file_generator.GenerateHeader(&printer);
137@@ -157,7 +157,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
138
139 // Generate cc file.
140 {
141- scoped_ptr<io::ZeroCopyOutputStream> output(
142+ std::unique_ptr<io::ZeroCopyOutputStream> output(
143 output_directory->Open(basename + ".c"));
144 io::Printer printer(output.get(), '$');
145 file_generator.GenerateSource(&printer);
146diff --git a/protoc-c/c_helpers.cc b/protoc-c/c_helpers.cc
147index b79b5b0..f4ef73d 100644
148--- a/protoc-c/c_helpers.cc
149+++ b/protoc-c/c_helpers.cc
150@@ -86,6 +86,8 @@ namespace c {
151 #pragma warning(disable:4996)
152 #endif
153
154+using std::vector;
155+
156 string DotsToUnderscores(const string& name) {
157 return StringReplace(name, ".", "_", true);
158 }
159@@ -559,7 +561,7 @@ static int CEscapeInternal(const char* src, int src_len, char* dest,
160 }
161 string CEscape(const string& src) {
162 const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
163- scoped_array<char> dest(new char[dest_length]);
164+ std::unique_ptr<char[]> dest(new char[dest_length]);
165 const int len = CEscapeInternal(src.data(), src.size(),
166 dest.get(), dest_length, false);
167 GOOGLE_DCHECK_GE(len, 0);
168diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc
169index 6b22c71..85a946e 100755
170--- a/protoc-c/c_message.cc
171+++ b/protoc-c/c_message.cc
172@@ -83,11 +83,11 @@ MessageGenerator::MessageGenerator(const Descriptor* descriptor,
173 : descriptor_(descriptor),
174 dllexport_decl_(dllexport_decl),
175 field_generators_(descriptor),
176- nested_generators_(new scoped_ptr<MessageGenerator>[
177+ nested_generators_(new std::unique_ptr<MessageGenerator>[
178 descriptor->nested_type_count()]),
179- enum_generators_(new scoped_ptr<EnumGenerator>[
180+ enum_generators_(new std::unique_ptr<EnumGenerator>[
181 descriptor->enum_type_count()]),
182- extension_generators_(new scoped_ptr<ExtensionGenerator>[
183+ extension_generators_(new std::unique_ptr<ExtensionGenerator>[
184 descriptor->extension_count()]) {
185
186 for (int i = 0; i < descriptor->nested_type_count(); i++) {
187diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h
188index 8b115d1..114c2d0 100644
189--- a/protoc-c/c_message.h
190+++ b/protoc-c/c_message.h
191@@ -126,9 +126,10 @@ class MessageGenerator {
192 const Descriptor* descriptor_;
193 string dllexport_decl_;
194 FieldGeneratorMap field_generators_;
195- scoped_array<scoped_ptr<MessageGenerator> > nested_generators_;
196- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
197- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
198+
199+ std::unique_ptr<std::unique_ptr<MessageGenerator>[]> nested_generators_;
200+ std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
201+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
202
203 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
204 };
205--
2062.7.4
207
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.0.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb
index 209bb47e8..7ef030092 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.0.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb
@@ -13,11 +13,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cb901168715f4782a2b06c3ddaefa558"
13DEPENDS = "protobuf-native protobuf" 13DEPENDS = "protobuf-native protobuf"
14 14
15PV .= "+git${SRCPV}" 15PV .= "+git${SRCPV}"
16SRCREV = "dac1a65feac4ad72f612aab99f487056fbcf5c1a" 16SRCREV = "269771b4b45d3aba04e59569f53600003db8d9ff"
17 17
18SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \ 18SRC_URI = "git://github.com/protobuf-c/protobuf-c.git"
19 file://0001-protobuf-c-fix-compile-error-with-protobuf-3.6.0.1.patch \
20"
21 19
22S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
23 21