Gentoo Archives: gentoo-commits

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