1 |
commit: fd96fadd9439a276fa2d2ee6ea22f6df47e8aa8c |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Mon Sep 14 08:00:00 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 15 18:33:39 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd96fadd |
7 |
|
8 |
dev-libs/protobuf: Version bump (3.13.0). |
9 |
|
10 |
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
dev-libs/protobuf/Manifest | 1 + |
14 |
.../protobuf-3.13.0-disable_no-warning-test.patch | 19 ++ |
15 |
...protobuf-3.13.0-protoc_input_output_files.patch | 262 +++++++++++++++++++++ |
16 |
.../files/protobuf-3.13.0-system_libraries.patch | 121 ++++++++++ |
17 |
...protobuf-9999.ebuild => protobuf-3.13.0.ebuild} | 23 +- |
18 |
dev-libs/protobuf/protobuf-9999.ebuild | 8 +- |
19 |
6 files changed, 425 insertions(+), 9 deletions(-) |
20 |
|
21 |
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest |
22 |
index 16296678879..a49bf7847ed 100644 |
23 |
--- a/dev-libs/protobuf/Manifest |
24 |
+++ b/dev-libs/protobuf/Manifest |
25 |
@@ -2,3 +2,4 @@ DIST protobuf-3.10.1.tar.gz 4905995 BLAKE2B 1dde3b6260918da8430c2ce69210462f339c |
26 |
DIST protobuf-3.11.4.tar.gz 5140799 BLAKE2B 97b450c0623593efe6a42b66582ff183344b8831689e6a5b4d36096dbd57c33da9569bbf26578536aaf73ecd866ac0588b6cb7d55a6a9b9a6e840d4c57099001 SHA512 777bbb0e9e2375eaebe6b8c87abd660bac70ee469c9ad00dd25917b82d7fb5bbe33cf87f0d69c90e19d55c07a7285ec20974ba4768623ce9ccfadf147fd5e261 |
27 |
DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f309f73d664192209de10580e0ef850bf56f6f394b860f21912e341141f7bbb1f63198eaee55fd7ad74d86b00c3b1f SHA512 84a349a1dcb5bce6a6a892cf11264390b557ed1e7b05883b71fa9cfb7460d9f73119da1f2861066869e33c752246ea438d5ce2c2b3ff7a4b07696d9450b7916b |
28 |
DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c |
29 |
+DIST protobuf-3.13.0.tar.gz 5277913 BLAKE2B 168aaa5beef83be675cd2543ca8efeaf5174f5e7fd861a056b04b01c8c781dc7b1fcbd05068ae89f051dfacfdc47c34b19cc33c8d09dd3212d3827746e3408f2 SHA512 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd |
30 |
|
31 |
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.13.0-disable_no-warning-test.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..1c583fec0fd |
34 |
--- /dev/null |
35 |
+++ b/dev-libs/protobuf/files/protobuf-3.13.0-disable_no-warning-test.patch |
36 |
@@ -0,0 +1,19 @@ |
37 |
+Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings. |
38 |
+ |
39 |
+--- /src/Makefile.am |
40 |
++++ /src/Makefile.am |
41 |
+@@ -708,7 +708,7 @@ |
42 |
+ GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock |
43 |
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ |
44 |
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \ |
45 |
+- no-warning-test $(GZCHECKPROGRAMS) |
46 |
++ $(GZCHECKPROGRAMS) |
47 |
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
48 |
+ $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ |
49 |
+ $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ |
50 |
+@@ -895,4 +895,4 @@ |
51 |
+ |
52 |
+ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ |
53 |
+ google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \ |
54 |
+- protobuf-lite-arena-test no-warning-test |
55 |
++ protobuf-lite-arena-test |
56 |
|
57 |
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch |
58 |
new file mode 100644 |
59 |
index 00000000000..0416aac68f6 |
60 |
--- /dev/null |
61 |
+++ b/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch |
62 |
@@ -0,0 +1,262 @@ |
63 |
+https://github.com/protocolbuffers/protobuf/pull/235 |
64 |
+ |
65 |
+--- /src/google/protobuf/compiler/command_line_interface.cc |
66 |
++++ /src/google/protobuf/compiler/command_line_interface.cc |
67 |
+@@ -997,6 +997,28 @@ |
68 |
+ } |
69 |
+ |
70 |
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) { |
71 |
++ bool success = false; |
72 |
++ int in_fd = STDIN_FILENO; |
73 |
++ int out_fd = STDOUT_FILENO; |
74 |
++ |
75 |
++ if (!protobuf_in_path_.empty()) { |
76 |
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY); |
77 |
++ if (in_fd == -1) { |
78 |
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl; |
79 |
++ return 1; |
80 |
++ } |
81 |
++ } |
82 |
++ if (!protobuf_out_path_.empty()) { |
83 |
++ out_fd = open(protobuf_out_path_.c_str(), |
84 |
++ O_WRONLY | O_CREAT | O_TRUNC, |
85 |
++ 0644); |
86 |
++ if (out_fd == -1) { |
87 |
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl; |
88 |
++ close(in_fd); |
89 |
++ return 1; |
90 |
++ } |
91 |
++ } |
92 |
++ |
93 |
+ if (codec_type_.empty()) { |
94 |
+ // HACK: Define an EmptyMessage type to use for decoding. |
95 |
+ DescriptorPool pool; |
96 |
+@@ -1005,13 +1027,20 @@ |
97 |
+ file.add_message_type()->set_name("EmptyMessage"); |
98 |
+ GOOGLE_CHECK(pool.BuildFile(file) != NULL); |
99 |
+ codec_type_ = "EmptyMessage"; |
100 |
+- if (!EncodeOrDecode(&pool)) { |
101 |
+- return 1; |
102 |
+- } |
103 |
++ success = EncodeOrDecode(&pool, in_fd, out_fd); |
104 |
+ } else { |
105 |
+- if (!EncodeOrDecode(descriptor_pool.get())) { |
106 |
+- return 1; |
107 |
+- } |
108 |
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd); |
109 |
++ } |
110 |
++ |
111 |
++ if (in_fd != STDIN_FILENO) { |
112 |
++ close(in_fd); |
113 |
++ } |
114 |
++ if (out_fd != STDOUT_FILENO) { |
115 |
++ close(out_fd); |
116 |
++ } |
117 |
++ |
118 |
++ if (!success) { |
119 |
++ return 1; |
120 |
+ } |
121 |
+ } |
122 |
+ |
123 |
+@@ -1049,6 +1078,11 @@ |
124 |
+ for (int i = 0; i < proto_path_.size(); i++) { |
125 |
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second); |
126 |
+ } |
127 |
++ if (mode_ == MODE_COMPILE && |
128 |
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) { |
129 |
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with " |
130 |
++ << "decode operations. Ignoring."; |
131 |
++ } |
132 |
+ |
133 |
+ // Map input files to virtual paths if possible. |
134 |
+ if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) { |
135 |
+@@ -1754,6 +1788,12 @@ |
136 |
+ |
137 |
+ codec_type_ = value; |
138 |
+ |
139 |
++ } else if (name == "--protobuf_in") { |
140 |
++ protobuf_in_path_ = value; |
141 |
++ |
142 |
++ } else if (name == "--protobuf_out") { |
143 |
++ protobuf_out_path_ = value; |
144 |
++ |
145 |
+ } else if (name == "--error_format") { |
146 |
+ if (value == "gcc") { |
147 |
+ error_format_ = ERROR_FORMAT_GCC; |
148 |
+@@ -1890,29 +1930,50 @@ |
149 |
+ " -h, --help Show this text and exit.\n" |
150 |
+ " --encode=MESSAGE_TYPE Read a text-format message of the " |
151 |
+ "given type\n" |
152 |
+- " from standard input and write it in " |
153 |
+- "binary\n" |
154 |
+- " to standard output. The message type " |
155 |
+- "must\n" |
156 |
++ " and write it in binary. The message " |
157 |
++ "type must\n" |
158 |
+ " be defined in PROTO_FILES or their " |
159 |
+ "imports.\n" |
160 |
++ " The input/output protobuf files are " |
161 |
++ "specified\n" |
162 |
++ " using the --protobuf_in and " |
163 |
++ "--protobuf_out\n" |
164 |
++ " command line flags.\n" |
165 |
+ " --decode=MESSAGE_TYPE Read a binary message of the given " |
166 |
+- "type from\n" |
167 |
+- " standard input and write it in text " |
168 |
+- "format\n" |
169 |
+- " to standard output. The message type " |
170 |
+- "must\n" |
171 |
+- " be defined in PROTO_FILES or their " |
172 |
+- "imports.\n" |
173 |
++ "type and\n" |
174 |
++ " write it in text format. The message " |
175 |
++ "type\n" |
176 |
++ " must be defined in PROTO_FILES or " |
177 |
++ "their imports.\n" |
178 |
++ " The input/output protobuf files are " |
179 |
++ "specified\n" |
180 |
++ " using the --protobuf_in and " |
181 |
++ "--protobuf_out\n" |
182 |
++ " command line flags.\n" |
183 |
+ " --decode_raw Read an arbitrary protocol message " |
184 |
+- "from\n" |
185 |
+- " standard input and write the raw " |
186 |
+- "tag/value\n" |
187 |
+- " pairs in text format to standard " |
188 |
+- "output. No\n" |
189 |
++ "and write\n" |
190 |
++ " the raw tag/value pairs in text format." |
191 |
++ " No\n" |
192 |
+ " PROTO_FILES should be given when using " |
193 |
+ "this\n" |
194 |
+- " flag.\n" |
195 |
++ " flag. The input/output protobuf files " |
196 |
++ "are\n" |
197 |
++ " specified using the --protobuf_in and\n" |
198 |
++ " --protobuf_out command line flags.\n" |
199 |
++ " --protobuf_in=FILE Absolute path to the protobuf file " |
200 |
++ "from which\n" |
201 |
++ " input of encoding/decoding operation " |
202 |
++ "will be\n" |
203 |
++ " read. If omitted, input will be read " |
204 |
++ "from\n" |
205 |
++ " standard input.\n" |
206 |
++ " --protobuf_out=FILE Absolute path to the protobuf file " |
207 |
++ "to which\n" |
208 |
++ " output of encoding/decoding operation " |
209 |
++ "will be\n" |
210 |
++ " written. If omitted, output will be " |
211 |
++ "written to\n" |
212 |
++ " standard output.\n" |
213 |
+ " --descriptor_set_in=FILES Specifies a delimited list of FILES\n" |
214 |
+ " each containing a FileDescriptorSet " |
215 |
+ "(a\n" |
216 |
+@@ -2258,7 +2319,9 @@ |
217 |
+ return true; |
218 |
+ } |
219 |
+ |
220 |
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) { |
221 |
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool, |
222 |
++ int in_fd, |
223 |
++ int out_fd) { |
224 |
+ // Look up the type. |
225 |
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_); |
226 |
+ if (type == NULL) { |
227 |
+@@ -2270,15 +2333,15 @@ |
228 |
+ std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New()); |
229 |
+ |
230 |
+ if (mode_ == MODE_ENCODE) { |
231 |
+- SetFdToTextMode(STDIN_FILENO); |
232 |
+- SetFdToBinaryMode(STDOUT_FILENO); |
233 |
++ SetFdToTextMode(in_fd); |
234 |
++ SetFdToBinaryMode(out_fd); |
235 |
+ } else { |
236 |
+- SetFdToBinaryMode(STDIN_FILENO); |
237 |
+- SetFdToTextMode(STDOUT_FILENO); |
238 |
++ SetFdToBinaryMode(in_fd); |
239 |
++ SetFdToTextMode(out_fd); |
240 |
+ } |
241 |
+ |
242 |
+- io::FileInputStream in(STDIN_FILENO); |
243 |
+- io::FileOutputStream out(STDOUT_FILENO); |
244 |
++ io::FileInputStream in(in_fd); |
245 |
++ io::FileOutputStream out(out_fd); |
246 |
+ |
247 |
+ if (mode_ == MODE_ENCODE) { |
248 |
+ // Input is text. |
249 |
+--- /src/google/protobuf/compiler/command_line_interface.h |
250 |
++++ /src/google/protobuf/compiler/command_line_interface.h |
251 |
+@@ -296,7 +296,9 @@ |
252 |
+ GeneratorContext* generator_context, std::string* error); |
253 |
+ |
254 |
+ // Implements --encode and --decode. |
255 |
+- bool EncodeOrDecode(const DescriptorPool* pool); |
256 |
++ bool EncodeOrDecode(const DescriptorPool* pool, |
257 |
++ int in_fd, |
258 |
++ int out_fd); |
259 |
+ |
260 |
+ // Implements the --descriptor_set_out option. |
261 |
+ bool WriteDescriptorSet( |
262 |
+@@ -428,6 +430,13 @@ |
263 |
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty. |
264 |
+ std::vector<std::string> descriptor_set_in_names_; |
265 |
+ |
266 |
++ // When using --encode / --decode / --decode_raw absolute path to the output |
267 |
++ // file. (Empty string indicates write to STDOUT). |
268 |
++ std::string protobuf_out_path_; |
269 |
++ // When using --encode / --decode / --decode_raw, absolute path to the input |
270 |
++ // file. (Empty string indicates read from STDIN). |
271 |
++ std::string protobuf_in_path_; |
272 |
++ |
273 |
+ // If --descriptor_set_out was given, this is the filename to which the |
274 |
+ // FileDescriptorSet should be written. Otherwise, empty. |
275 |
+ std::string descriptor_set_out_name_; |
276 |
+--- /src/google/protobuf/compiler/command_line_interface_unittest.cc |
277 |
++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc |
278 |
+@@ -95,7 +95,7 @@ |
279 |
+ virtual void SetUp(); |
280 |
+ virtual void TearDown(); |
281 |
+ |
282 |
+- // Runs the CommandLineInterface with the given command line. The |
283 |
++ // Run the CommandLineInterface with the given command line. The |
284 |
+ // command is automatically split on spaces, and the string "$tmpdir" |
285 |
+ // is replaced with TestTempDir(). |
286 |
+ void Run(const std::string& command); |
287 |
+@@ -2627,6 +2627,17 @@ |
288 |
+ std::string::npos); |
289 |
+ } |
290 |
+ |
291 |
++ void ExpectBinaryFilesMatch(const string &expected_file, |
292 |
++ const string &actual_file) { |
293 |
++ string expected_output, actual_output; |
294 |
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output)); |
295 |
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output)); |
296 |
++ |
297 |
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to |
298 |
++ // stdout on failure. |
299 |
++ EXPECT_TRUE(expected_output == actual_output); |
300 |
++ } |
301 |
++ |
302 |
+ private: |
303 |
+ void WriteUnittestProtoDescriptorSet() { |
304 |
+ unittest_proto_descriptor_set_filename_ = |
305 |
+@@ -2721,6 +2732,19 @@ |
306 |
+ "net/proto2/internal/no_such_file.proto: No such file or directory\n"); |
307 |
+ } |
308 |
+ |
309 |
++TEST_P(EncodeDecodeTest, RedirectInputOutput) { |
310 |
++ string out_file = TestTempDir() + "/golden_message_out.pbf"; |
311 |
++ EXPECT_TRUE( |
312 |
++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") + |
313 |
++ " --encode=protobuf_unittest.TestAllTypes" + |
314 |
++ " --protobuf_in=" + TestUtil::GetTestDataPath( |
315 |
++ "net/proto2/internal/" |
316 |
++ "testdata/text_format_unittest_data_oneof_implemented.txt") + |
317 |
++ " --protobuf_out=" + out_file)); |
318 |
++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath( |
319 |
++ "net/proto2/internal/testdata/golden_message_oneof_implemented")); |
320 |
++} |
321 |
++ |
322 |
+ INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest, |
323 |
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN)); |
324 |
+ } // anonymous namespace |
325 |
|
326 |
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.13.0-system_libraries.patch |
327 |
new file mode 100644 |
328 |
index 00000000000..990081ae1ab |
329 |
--- /dev/null |
330 |
+++ b/dev-libs/protobuf/files/protobuf-3.13.0-system_libraries.patch |
331 |
@@ -0,0 +1,121 @@ |
332 |
+--- /Makefile.am |
333 |
++++ /Makefile.am |
334 |
+@@ -11,28 +11,10 @@ |
335 |
+ # Always include third_party directories in distributions. |
336 |
+ DIST_SUBDIRS = src conformance benchmarks third_party/googletest |
337 |
+ |
338 |
+-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS |
339 |
+-# because then "make check" would also build and run all of gmock's own tests, |
340 |
+-# which takes a lot of time and is generally not useful to us. Also, we don't |
341 |
+-# want "make install" to recurse into gmock since we don't want to overwrite |
342 |
+-# the installed version of gmock if there is one. |
343 |
+ check-local: |
344 |
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock" |
345 |
+- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la |
346 |
+- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la |
347 |
+ |
348 |
+-# We would like to clean gmock when "make clean" is invoked. But we have to |
349 |
+-# be careful because clean-local is also invoked during "make distclean", but |
350 |
+-# "make distclean" already recurses into gmock because it's listed among the |
351 |
+-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to |
352 |
+-# cd to the directory again and "make clean" it will fail. So, check that the |
353 |
+-# Makefile exists before recursing. |
354 |
+ clean-local: |
355 |
+- @if test -e third_party/googletest/Makefile; then \ |
356 |
+- echo "Making clean in googletest"; \ |
357 |
+- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \ |
358 |
+- fi; \ |
359 |
+- if test -e conformance/Makefile; then \ |
360 |
++ @if test -e conformance/Makefile; then \ |
361 |
+ echo "Making clean in conformance"; \ |
362 |
+ cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \ |
363 |
+ fi; \ |
364 |
+--- /configure.ac |
365 |
++++ /configure.ac |
366 |
+@@ -223,12 +223,5 @@ |
367 |
+ esac |
368 |
+ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1]) |
369 |
+ |
370 |
+-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS, |
371 |
+-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock |
372 |
+-# too. |
373 |
+-export CFLAGS |
374 |
+-export CXXFLAGS |
375 |
+-AC_CONFIG_SUBDIRS([third_party/googletest]) |
376 |
+- |
377 |
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) |
378 |
+ AC_OUTPUT |
379 |
+--- /src/Makefile.am |
380 |
++++ /src/Makefile.am |
381 |
+@@ -702,19 +702,11 @@ |
382 |
+ google/protobuf/testing/file.cc \ |
383 |
+ google/protobuf/testing/file.h |
384 |
+ |
385 |
+-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest |
386 |
+-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock |
387 |
+-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest |
388 |
+-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock |
389 |
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ |
390 |
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \ |
391 |
+ $(GZCHECKPROGRAMS) |
392 |
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
393 |
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ |
394 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ |
395 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la |
396 |
+-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ |
397 |
+- -I$(GOOGLEMOCK_SRC_DIR)/include |
398 |
++ -lgtest -lgmock -lgmock_main |
399 |
+ # Disable optimization for tests unless the user explicitly asked for it, |
400 |
+ # since test_util.cc takes forever to compile with optimization (with GCC). |
401 |
+ # See configure.ac for more info. |
402 |
+@@ -806,12 +798,8 @@ |
403 |
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. |
404 |
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ |
405 |
+ libprotoc.la \ |
406 |
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ |
407 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ |
408 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la |
409 |
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ |
410 |
+- -I$(GOOGLETEST_SRC_DIR)/include \ |
411 |
+- -DPROTOBUF_TEST_NO_DESCRIPTORS |
412 |
++ -lgtest -lgmock -lgmock_main |
413 |
++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS |
414 |
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
415 |
+ protobuf_lazy_descriptor_test_SOURCES = \ |
416 |
+ google/protobuf/compiler/cpp/cpp_unittest.cc \ |
417 |
+@@ -832,11 +820,7 @@ |
418 |
+ # full runtime and we want to make sure this test builds without full |
419 |
+ # runtime. |
420 |
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ |
421 |
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ |
422 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ |
423 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la |
424 |
+-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ |
425 |
+- -I$(GOOGLETEST_SRC_DIR)/include |
426 |
++ -lgtest -lgmock -lgmock_main |
427 |
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
428 |
+ protobuf_lite_test_SOURCES = \ |
429 |
+ google/protobuf/lite_unittest.cc \ |
430 |
+@@ -848,11 +832,7 @@ |
431 |
+ # gtest when building the test internally our memory sanitizer doesn't detect |
432 |
+ # memory leaks (don't know why). |
433 |
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ |
434 |
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ |
435 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ |
436 |
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la |
437 |
+-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ |
438 |
+- -I$(GOOGLETEST_SRC_DIR)/include |
439 |
++ -lgtest -lgmock -lgmock_main |
440 |
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
441 |
+ protobuf_lite_arena_test_SOURCES = \ |
442 |
+ google/protobuf/lite_arena_unittest.cc \ |
443 |
+@@ -862,8 +842,7 @@ |
444 |
+ |
445 |
+ # Test plugin binary. |
446 |
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
447 |
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la |
448 |
+-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include |
449 |
++ -lgtest |
450 |
+ test_plugin_SOURCES = \ |
451 |
+ google/protobuf/compiler/mock_code_generator.cc \ |
452 |
+ google/protobuf/testing/file.cc \ |
453 |
|
454 |
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.13.0.ebuild |
455 |
similarity index 76% |
456 |
copy from dev-libs/protobuf/protobuf-9999.ebuild |
457 |
copy to dev-libs/protobuf/protobuf-3.13.0.ebuild |
458 |
index 510fd724cea..ae5381a0692 100644 |
459 |
--- a/dev-libs/protobuf/protobuf-9999.ebuild |
460 |
+++ b/dev-libs/protobuf/protobuf-3.13.0.ebuild |
461 |
@@ -22,7 +22,7 @@ fi |
462 |
|
463 |
LICENSE="BSD" |
464 |
SLOT="0/24" |
465 |
-KEYWORDS="" |
466 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
467 |
IUSE="emacs examples static-libs test zlib" |
468 |
RESTRICT="!test? ( test )" |
469 |
|
470 |
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* ) |
471 |
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" |
472 |
|
473 |
PATCHES=( |
474 |
- "${FILESDIR}/${PN}-3.12.0-disable_no-warning-test.patch" |
475 |
- "${FILESDIR}/${PN}-3.12.0-system_libraries.patch" |
476 |
- "${FILESDIR}/${PN}-3.12.0-protoc_input_output_files.patch" |
477 |
+ "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch" |
478 |
+ "${FILESDIR}/${PN}-3.13.0-system_libraries.patch" |
479 |
+ "${FILESDIR}/${PN}-3.13.0-protoc_input_output_files.patch" |
480 |
) |
481 |
|
482 |
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) |
483 |
|
484 |
src_prepare() { |
485 |
default |
486 |
+ |
487 |
+ # https://github.com/protocolbuffers/protobuf/issues/7413 |
488 |
+ sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die |
489 |
+ |
490 |
+ # https://github.com/protocolbuffers/protobuf/issues/7682 |
491 |
+ sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"T is overaligned, see b\/151247138\");$/d" -i src/google/protobuf/arena.h || die |
492 |
+ |
493 |
eautoreconf |
494 |
} |
495 |
|
496 |
src_configure() { |
497 |
append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI |
498 |
+ |
499 |
+ if tc-ld-is-gold; then |
500 |
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 |
501 |
+ tc-ld-disable-gold |
502 |
+ fi |
503 |
+ |
504 |
multilib-minimal_src_configure |
505 |
} |
506 |
|
507 |
@@ -89,7 +102,7 @@ multilib_src_test() { |
508 |
} |
509 |
|
510 |
multilib_src_install_all() { |
511 |
- find "${D}" -name "*.la" -type f -delete || die |
512 |
+ find "${ED}" -name "*.la" -delete || die |
513 |
|
514 |
insinto /usr/share/vim/vimfiles/syntax |
515 |
doins editors/proto.vim |
516 |
|
517 |
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild |
518 |
index 510fd724cea..c30e4aa6d46 100644 |
519 |
--- a/dev-libs/protobuf/protobuf-9999.ebuild |
520 |
+++ b/dev-libs/protobuf/protobuf-9999.ebuild |
521 |
@@ -33,9 +33,9 @@ RDEPEND="emacs? ( app-editors/emacs:* ) |
522 |
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" |
523 |
|
524 |
PATCHES=( |
525 |
- "${FILESDIR}/${PN}-3.12.0-disable_no-warning-test.patch" |
526 |
- "${FILESDIR}/${PN}-3.12.0-system_libraries.patch" |
527 |
- "${FILESDIR}/${PN}-3.12.0-protoc_input_output_files.patch" |
528 |
+ "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch" |
529 |
+ "${FILESDIR}/${PN}-3.13.0-system_libraries.patch" |
530 |
+ "${FILESDIR}/${PN}-3.13.0-protoc_input_output_files.patch" |
531 |
) |
532 |
|
533 |
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) |
534 |
@@ -89,7 +89,7 @@ multilib_src_test() { |
535 |
} |
536 |
|
537 |
multilib_src_install_all() { |
538 |
- find "${D}" -name "*.la" -type f -delete || die |
539 |
+ find "${ED}" -name "*.la" -delete || die |
540 |
|
541 |
insinto /usr/share/vim/vimfiles/syntax |
542 |
doins editors/proto.vim |