From ec321939a77843497c860196ea06d7776d94b755 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 2 Sep 2022 22:17:13 +0100 Subject: gentoo auto-resync : 02:09:2022 - 22:17:13 --- dev-libs/Manifest.gz | Bin 95595 -> 95597 bytes dev-libs/protobuf/Manifest | 5 +- ...protobuf-3.20.1-protoc_input_output_files.patch | 240 +++++++++++++++++++++ dev-libs/protobuf/protobuf-3.20.1-r1.ebuild | 143 ++++++++++++ dev-libs/protobuf/protobuf-9999.ebuild | 33 ++- 5 files changed, 416 insertions(+), 5 deletions(-) create mode 100644 dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch create mode 100644 dev-libs/protobuf/protobuf-3.20.1-r1.ebuild (limited to 'dev-libs') diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz index 4ae5e8cf5d39..a335a1491b09 100644 Binary files a/dev-libs/Manifest.gz and b/dev-libs/Manifest.gz differ diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index b4a8bf582ae7..536b9e573c04 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -3,7 +3,10 @@ AUX proto.vim 49 BLAKE2B 9b6d31105811a8f8cbcf76328172fda5b66b33351bb16573ed1ed08 AUX protobuf-3.16.0-protoc_input_output_files.patch 10060 BLAKE2B e91d2e60ec9a901df0b0e11a8e51ff92b8765357e052231a915a2afa996c78096e18cf443708bf32e51b882c3fe2512e2ab9f7bb8ec1c6141f2c9bb7fb98af95 SHA512 03721151866f25564e203eb5af987649bf3c148ba7b9e1a2a837b336062b911d892714c4deaa5b19572a3ec47e3b309114ce67b0ec0adcff50d208b73283a7b5 AUX protobuf-3.19.0-disable_no-warning-test.patch 1620 BLAKE2B e4f324ed59b2c31662cc625e9d3f1fdb20ee2a25769dbf86093e5000f73a01e11f05459989aaefeaf0414648cd52f1f1025b9d4f1423cdca4844e42e96f54836 SHA512 8c4bc72976a7eb3418b51e7a1c45b49d7ffaeb91a86f440008e6f162773b1db7afed4a6ae1d0b3510d49361c369b6552a9ba4976d104d804d825227aa7113d95 AUX protobuf-3.19.0-system_libraries.patch 7514 BLAKE2B 1ff5c226232c325ed48cf16e2c47652615c4bd1503f1be8560e7f2e8658ffefeffeef72a6baf4368f758e30a4a81d582769b61dd0b3e383c8188cd03bf409c01 SHA512 b6a58e483dbb1f6151c2f7c735fbd55f34bcf98d6370eabb425dbd96e10cb87e8dfbf5024ad8f888cb80a095bc26598aceb55d576d37166550ee62db41c51a44 +AUX protobuf-3.20.1-protoc_input_output_files.patch 10066 BLAKE2B 1a5c045cc1c30ddf520ce6f68495f373a2dc4265ae3629b2e2deb6abb37935aea4c17267977442b5fe4e5b81d1c9467fddf5ca5e9045b444a4212a28e31ffab1 SHA512 7ca9fa2d602d0a11eea35e8284cd11f12e4e3ad3e6b0bba99f8e2c47a804f3f196810f0507806fb8d559c44f73b87a771f8fa9e9ce2c0acf4405f44894f2d13a DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6 +DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0 EBUILD protobuf-3.19.3.ebuild 4138 BLAKE2B b37b99abbd41acfb2299e1a054d3c36547bdd63542ecc76d03d69344d7e89a03870eda97bba1ae6ae3284c33abdfca6930e74b6ab7109d93cd588c522d6d52f6 SHA512 2eadab6fd0f4b30338a294b69c866ff945e98f05549403484700b2e44314433736a682ab033bc4c2eb0a802934cba92567e6c9bad4d30d79a67d671f88e04591 -EBUILD protobuf-9999.ebuild 2672 BLAKE2B 5627d3ad014e4360622b5837088bd6bdbc24b78886d734b1b37d01b474a4013e1ddec73422224c235e4908e8c1601e9650a69ee13d2ddb024d734c05080ab344 SHA512 bf151189787bbd05ff37f7d4e7e160d29b52ae1740704dd2b3446cb94e34e141e41d53b5a28d829c74c50e7f3fa5fd36a6bf528f0ad00af7fdc5be972c5738fc +EBUILD protobuf-3.20.1-r1.ebuild 3937 BLAKE2B d0212072ae43761d3e3b295867f2c12a36ba83da1d99f9189a2e5f3b6b3a8ba7aa40889da38d51ca0c1c61f0fb0ebb8a4ce1d5e8a563ddba60e32e1f2b25468c SHA512 38dcf75fed5f515b2d38427d478abfa12f315dc7775fea93c5d900dc9bdd337b462917b5af9785e7907440b7aca0fedc4b1af88eb1dbbf546a12c0e117b73c46 +EBUILD protobuf-9999.ebuild 3938 BLAKE2B 35b8a868ae096c0f74b5037051278e79ec8f0cf869b9effb038015ec11ff4775d04d13b6ffa8978066111e86d9387b23d2872ddc5991f3f9f71f11f2aebac064 SHA512 8edbd0f333611fdc9590369339cd68bff7e32a7f193c3cba72ccc3e923a970b205147accc430a4fe0df3e1edc0a0970f2857782728b82a6e78d4a631109e3849 MISC metadata.xml 595 BLAKE2B ba1b916e26b1e53f68e660f03d2e53fea8d22db04e8241ebec3ec20fbb251c2b164cf25d5fb6118423ce7721a822ae2302aab137b0748730e9a6860bf8e65668 SHA512 785e2550621b79b6350e1a6b52ed9992610769885fb29a9e92ee45a35158cc08707a3590dfcbece9ee9a5e16e1abfb614e8186132da7b942f2761b5e6ecfa827 diff --git a/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch new file mode 100644 index 000000000000..812882cf6b09 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch @@ -0,0 +1,240 @@ +https://github.com/protocolbuffers/protobuf/pull/235 + +--- /src/google/protobuf/compiler/command_line_interface.cc ++++ /src/google/protobuf/compiler/command_line_interface.cc +@@ -1110,6 +1110,28 @@ + } + + if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) { ++ bool success = false; ++ int in_fd = STDIN_FILENO; ++ int out_fd = STDOUT_FILENO; ++ ++ if (!protobuf_in_path_.empty()) { ++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY); ++ if (in_fd == -1) { ++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl; ++ return 1; ++ } ++ } ++ if (!protobuf_out_path_.empty()) { ++ out_fd = open(protobuf_out_path_.c_str(), ++ O_WRONLY | O_CREAT | O_TRUNC, ++ 0644); ++ if (out_fd == -1) { ++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl; ++ close(in_fd); ++ return 1; ++ } ++ } ++ + if (codec_type_.empty()) { + // HACK: Define an EmptyMessage type to use for decoding. + DescriptorPool pool; +@@ -1118,13 +1140,20 @@ + file.add_message_type()->set_name("EmptyMessage"); + GOOGLE_CHECK(pool.BuildFile(file) != NULL); + codec_type_ = "EmptyMessage"; +- if (!EncodeOrDecode(&pool)) { +- return 1; +- } ++ success = EncodeOrDecode(&pool, in_fd, out_fd); + } else { +- if (!EncodeOrDecode(descriptor_pool.get())) { +- return 1; +- } ++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd); ++ } ++ ++ if (in_fd != STDIN_FILENO) { ++ close(in_fd); ++ } ++ if (out_fd != STDOUT_FILENO) { ++ close(out_fd); ++ } ++ ++ if (!success) { ++ return 1; + } + } + +@@ -1163,6 +1192,11 @@ + for (int i = 0; i < proto_path_.size(); i++) { + source_tree->MapPath(proto_path_[i].first, proto_path_[i].second); + } ++ if (mode_ == MODE_COMPILE && ++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) { ++ std::cerr << "--protobuf_in and --protobuf_out are only valid with " ++ << "decode operations. Ignoring."; ++ } + + // Map input files to virtual paths if possible. + if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) { +@@ -1885,6 +1919,12 @@ + } else if (name == "--deterministic_output") { + deterministic_output_ = true; + ++ } else if (name == "--protobuf_in") { ++ protobuf_in_path_ = value; ++ ++ } else if (name == "--protobuf_out") { ++ protobuf_out_path_ = value; ++ + } else if (name == "--error_format") { + if (value == "gcc") { + error_format_ = ERROR_FORMAT_GCC; +@@ -2018,22 +2058,38 @@ + --version Show version info and exit. + -h, --help Show this text and exit. + --encode=MESSAGE_TYPE Read a text-format message of the given type +- from standard input and write it in binary +- to standard output. The message type must ++ from input protobuf file and write it in binary ++ to output protobuf file. The message type must + be defined in PROTO_FILES or their imports. ++ The input/output protobuf files are specified ++ using the --protobuf_in and --protobuf_out ++ command line flags. + --deterministic_output When using --encode, ensure map fields are + deterministically ordered. Note that this order + is not canonical, and changes across builds or + releases of protoc. + --decode=MESSAGE_TYPE Read a binary message of the given type from +- standard input and write it in text format +- to standard output. The message type must ++ input protobuf file and write it in text format ++ to output protobuf file. The message type must + be defined in PROTO_FILES or their imports. ++ The input/output protobuf files are specified ++ using the --protobuf_in and --protobuf_out ++ command line flags. + --decode_raw Read an arbitrary protocol message from +- standard input and write the raw tag/value +- pairs in text format to standard output. No ++ input protobuf file and write the raw tag/value ++ pairs in text format to output protobuf file. No + PROTO_FILES should be given when using this +- flag. ++ flag. The input/output protobuf files are ++ specified using the --protobuf_in and ++ --protobuf_out command line flags. ++ --protobuf_in=FILE Absolute path to the protobuf file from which ++ input of encoding/decoding operation will be ++ read. If omitted, input will be read from ++ standard input. ++ --protobuf_out=FILE Absolute path to the protobuf file to which ++ output of encoding/decoding operation will be ++ written. If omitted, output will be written to ++ standard output. + --descriptor_set_in=FILES Specifies a delimited list of FILES + each containing a FileDescriptorSet (a + protocol buffer defined in descriptor.proto). +@@ -2344,7 +2400,9 @@ + return true; + } + +-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) { ++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool, ++ int in_fd, ++ int out_fd) { + // Look up the type. + const Descriptor* type = pool->FindMessageTypeByName(codec_type_); + if (type == NULL) { +@@ -2356,15 +2414,15 @@ + std::unique_ptr message(dynamic_factory.GetPrototype(type)->New()); + + if (mode_ == MODE_ENCODE) { +- SetFdToTextMode(STDIN_FILENO); +- SetFdToBinaryMode(STDOUT_FILENO); ++ SetFdToTextMode(in_fd); ++ SetFdToBinaryMode(out_fd); + } else { +- SetFdToBinaryMode(STDIN_FILENO); +- SetFdToTextMode(STDOUT_FILENO); ++ SetFdToBinaryMode(in_fd); ++ SetFdToTextMode(out_fd); + } + +- io::FileInputStream in(STDIN_FILENO); +- io::FileOutputStream out(STDOUT_FILENO); ++ io::FileInputStream in(in_fd); ++ io::FileOutputStream out(out_fd); + + if (mode_ == MODE_ENCODE) { + // Input is text. +--- /src/google/protobuf/compiler/command_line_interface.h ++++ /src/google/protobuf/compiler/command_line_interface.h +@@ -292,7 +292,9 @@ + GeneratorContext* generator_context, std::string* error); + + // Implements --encode and --decode. +- bool EncodeOrDecode(const DescriptorPool* pool); ++ bool EncodeOrDecode(const DescriptorPool* pool, ++ int in_fd, ++ int out_fd); + + // Implements the --descriptor_set_out option. + bool WriteDescriptorSet( +@@ -427,6 +429,13 @@ + // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty. + std::vector descriptor_set_in_names_; + ++ // When using --encode / --decode / --decode_raw absolute path to the output ++ // file. (Empty string indicates write to STDOUT). ++ std::string protobuf_out_path_; ++ // When using --encode / --decode / --decode_raw, absolute path to the input ++ // file. (Empty string indicates read from STDIN). ++ std::string protobuf_in_path_; ++ + // If --descriptor_set_out was given, this is the filename to which the + // FileDescriptorSet should be written. Otherwise, empty. + std::string descriptor_set_out_name_; +--- /src/google/protobuf/compiler/command_line_interface_unittest.cc ++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc +@@ -99,7 +99,7 @@ + virtual void SetUp(); + virtual void TearDown(); + +- // Runs the CommandLineInterface with the given command line. The ++ // Run the CommandLineInterface with the given command line. The + // command is automatically split on spaces, and the string "$tmpdir" + // is replaced with TestTempDir(). + void Run(const std::string& command); +@@ -2626,6 +2626,17 @@ + std::string::npos); + } + ++ void ExpectBinaryFilesMatch(const std::string &expected_file, ++ const std::string &actual_file) { ++ std::string expected_output, actual_output; ++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output)); ++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output)); ++ ++ // Don't use EXPECT_EQ because we don't want to print raw binary data to ++ // stdout on failure. ++ EXPECT_TRUE(expected_output == actual_output); ++ } ++ + private: + void WriteUnittestProtoDescriptorSet() { + unittest_proto_descriptor_set_filename_ = +@@ -2749,6 +2760,19 @@ + "Can only use --deterministic_output with --encode.\n"); + } + ++TEST_P(EncodeDecodeTest, RedirectInputOutput) { ++ std::string out_file = TestTempDir() + "/golden_message_out.pbf"; ++ EXPECT_TRUE( ++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") + ++ " --encode=protobuf_unittest.TestAllTypes" + ++ " --protobuf_in=" + TestUtil::GetTestDataPath( ++ "net/proto2/internal/" ++ "testdata/text_format_unittest_data_oneof_implemented.txt") + ++ " --protobuf_out=" + out_file)); ++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath( ++ "net/proto2/internal/testdata/golden_message_oneof_implemented")); ++} ++ + INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest, + testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN)); + } // anonymous namespace diff --git a/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild b/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild new file mode 100644 index 000000000000..b8655b4c64ea --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild @@ -0,0 +1,143 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/31" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.19.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.20.1-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9433 + sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild index fe2db6a46086..0e620717ec44 100644 --- a/dev-libs/protobuf/protobuf-9999.ebuild +++ b/dev-libs/protobuf/protobuf-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 2008-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs @@ -18,11 +18,11 @@ if [[ "${PV}" == "9999" ]]; then SRC_URI="" else SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" fi LICENSE="BSD" -SLOT="0/30" -KEYWORDS="" +SLOT="0/31" IUSE="emacs examples static-libs test zlib" RESTRICT="!test? ( test )" @@ -35,18 +35,43 @@ RDEPEND="emacs? ( app-editors/emacs:* ) PATCHES=( "${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch" "${FILESDIR}/${PN}-3.19.0-system_libraries.patch" - "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" + "${FILESDIR}/${PN}-3.20.1-protoc_input_output_files.patch" ) DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) src_prepare() { default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9433 + sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die + eautoreconf } src_configure() { append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + multilib-minimal_src_configure } -- cgit v1.2.3