From dab47ccc26a61cb1fa68f2ab787233a1d12af4d1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Jun 2023 01:36:25 +0100 Subject: gentoo auto-resync : 28:06:2023 - 01:36:25 --- dev-libs/protobuf/Manifest | 13 -- ...protobuf-3.16.0-protoc_input_output_files.patch | 240 --------------------- ...protobuf-3.20.1-protoc_input_output_files.patch | 240 --------------------- dev-libs/protobuf/protobuf-21.8.ebuild | 148 ------------- dev-libs/protobuf/protobuf-3.19.3.ebuild | 146 ------------- dev-libs/protobuf/protobuf-3.19.6.ebuild | 151 ------------- dev-libs/protobuf/protobuf-3.20.1-r1.ebuild | 143 ------------ dev-libs/protobuf/protobuf-3.20.3.ebuild | 148 ------------- dev-libs/protobuf/protobuf-9999.ebuild | 148 ------------- 9 files changed, 1377 deletions(-) delete mode 100644 dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch delete mode 100644 dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch delete mode 100644 dev-libs/protobuf/protobuf-21.8.ebuild delete mode 100644 dev-libs/protobuf/protobuf-3.19.3.ebuild delete mode 100644 dev-libs/protobuf/protobuf-3.19.6.ebuild delete mode 100644 dev-libs/protobuf/protobuf-3.20.1-r1.ebuild delete mode 100644 dev-libs/protobuf/protobuf-3.20.3.ebuild delete mode 100644 dev-libs/protobuf/protobuf-9999.ebuild (limited to 'dev-libs/protobuf') diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index 64d9eb7d5a76..482ba703cadd 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -1,22 +1,9 @@ AUX 70protobuf-gentoo.el 170 BLAKE2B 6d9a92bd3310ca09d18dd762bc0bbd4b0b36184c17f95c80c02183c457fe4ff1142ca1e3207e5a77c078fe5f768cb3e85abc712abc1f4c85774ca1ebf178059b SHA512 ed73cd6b1bf6c0019e4da73c3a480b0f917e949dfad2696336e805263c81610b2a8a0514840e389db0f0e78252cf053d754c5e07731dc5e9c93c9e88f0b2923c AUX proto.vim 49 BLAKE2B 9b6d31105811a8f8cbcf76328172fda5b66b33351bb16573ed1ed08d4c553af2805962a6d6609fbdad4a2644bf9cecd1e771a557f138111ad2c0be959b497ee9 SHA512 65c1f49887c17973d1dfce07fa86d04c5079d2382826eaeb22e128570717f181c53d22ba50905252021f7e476a90ecd29f9d18799c1ccea64b01f4638323538e AUX protobuf-21.9-disable-32-bit-tests.patch 5942 BLAKE2B dcc1d5474c704358287a5033aaae3474b57324e853aa670aa723dc1d3d8b8cdb14ac588e3d3b3c998878d9f346fc91347379bbc3d88057b761b02515582ebcbd SHA512 97d60343e96fe03fefae621b70787fa284e38db5f94b7d205927d0852e9d20e9176e07182caa0ffca704bc08e439854ae3d109c3eca61c3101ae178a0426624d -AUX protobuf-3.16.0-protoc_input_output_files.patch 10066 BLAKE2B c296f1696fae9f039baac8d3ac4836cf70d87b59f842caa2db73e474a950edc925f74534e7ec06d002f2ee1375c8a33d97ef8d60c6129ebb10c235a18bf6efcf SHA512 12c24ff2748bd49484cb4de08d0d5d8cc407e4efc41c77d4580912fde4d53e68fc06325a5491e472b9717a8395d96cd7c021902fa907377aa8b8130ded39329d 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 10072 BLAKE2B 6f92674c60fa6fff181814cafb81fd456542567e7911784f9926947057e9920698935e7c464e05e7b7770a6640c669ca3f27fb1fa08dcce3fd8ea9862e02e71a SHA512 3a801b4e8fbee6706222157cc62a00df3fea1e38eed17675601d0e1156a38d6ec14cb021ca7c1b7f86472d599127341adc12f915083ada9bf899da0d6fe35738 AUX protobuf-3.20.2-protoc_input_output_files.patch 10080 BLAKE2B f52ea613b1104aa703e5e10eb5f968e33e46f05523e13fe84369a24ccbc16cecbcce3221b64b1acd624500864d224ccb59d1ce626157a0d0d77870f79ea64bd8 SHA512 dcf5dbd7be4a025d9ee96ed9be4566452ae4f946d0e1ae4c411a0dc3b7071fc156aca796497c0f2b67563a8ee884bded1a931d712cd7a3727301bbe37ec646f0 -DIST protobuf-21.8.tar.gz 5110670 BLAKE2B 3c1b0c857a86e9586481d63896341d0cb11290dbd710d87a6f7889d34f5f262abe2986a29ed19a730f8fa5df0b5c62d77a4db6aa415a72b239f7483ae8d6380c SHA512 cb17be759311e91172801add1f88fe7a0291b547170c40d2e3303f5c248570dddeade96bd48740edd628215f55269c97475e2f4c4a41c50f1018d525f52036cb DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1 -DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6 -DIST protobuf-3.19.6.tar.gz 5299501 BLAKE2B 3121f76b95f83c5309ce49ce296b738eff7be9d3a5093c564fbe2339fb5f3729e406f1b44bfcc05feb0d31ab63838bb4f54685017977c73a33b91215a6776072 SHA512 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4 -DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0 -DIST protobuf-3.20.3.tar.gz 5374320 BLAKE2B fb51f2a0ecf5b83235f5252051f8192ae377bb7a5e030c3f3e9435ccde25919c059830cf476e840fa6c970928a32c0075e213c9d5d4d9e3d3b24732c39a9fbfa SHA512 01d6703bdbe769a1200ee6e4ebcdcb99688ec21f576988c60d82ec36e0822820fb245fcb4ca53293143d53e666d748b5a0c6937bc659fb3cdc4cd9b05ed12a1c -EBUILD protobuf-21.8.ebuild 4124 BLAKE2B ae66579a111e158ecb2d37f8190943c33e3f29eeb2a1806915423d88229b9f388b10a0d4baf055948344c89bfb16a7bc62f37d9acf96841d1372a18d2e95d994 SHA512 e70c0f5aecce8d0220d3a1d538c23ecbeef78539dc36f8f7f4e5a74e55b1e221a3366ed2ecad8cb300ed56a0bcf849c8eb9a5d85e386d6c1fc2e12a6db482c7f EBUILD protobuf-21.9.ebuild 4169 BLAKE2B 26d7458698701fc08d93a7fde27933b34d39975ae403531af31a7dfd8471e2ca20d9f471875ba15a88388616c353bb7b6fd29ed1a6d4b94391fccee2f448d4c5 SHA512 32699153aaf64ece98cd694826b6ba01e32af8a278143e8dacbe05a9eb23f37017a40807247eb1809a5be5e6300a922c8758f3e53be166a1d2e5d48735a63fad -EBUILD protobuf-3.19.3.ebuild 4138 BLAKE2B b37b99abbd41acfb2299e1a054d3c36547bdd63542ecc76d03d69344d7e89a03870eda97bba1ae6ae3284c33abdfca6930e74b6ab7109d93cd588c522d6d52f6 SHA512 2eadab6fd0f4b30338a294b69c866ff945e98f05549403484700b2e44314433736a682ab033bc4c2eb0a802934cba92567e6c9bad4d30d79a67d671f88e04591 -EBUILD protobuf-3.19.6.ebuild 4331 BLAKE2B 0672fb5ecbd4080811f6c51f18accbaa1665d2e63ba5e9d6d422531638ac17ac475ff094cb59313c8c6ea0bf232b071b875091e15e033284e9f74f35fcaf194d SHA512 7ac1389f1895200c9c6d5067b03bbd95ee428ce6cbcee334eb23ec81102b9e0c24b548b755e5c26c5afbf72603e92600ab8118504f8e9127b288d33cc0b308fe -EBUILD protobuf-3.20.1-r1.ebuild 3929 BLAKE2B fd5ea8d0e503215b3ffc2ded61800d21f3365818d062de9ee0e3215d6eaddc52f6c5b5fee434f58645f89082d1539172ad79066c64ad4b8dd7627cf5cb2b0cb2 SHA512 e823f8b61643c76da04879cd079939c0b447b615c8b635a549ebe4b30fb20e24cf61a5a5a794f2f898ff7290793873c89206d1b6a63f5fcacac8b4f47052a723 -EBUILD protobuf-3.20.3.ebuild 4124 BLAKE2B 63f38b9330d49ae36131aa934e5b38cf87e10408370d92a59720b103ea499f00af61a4d22935ea361655349fcf6e584fdff45663b0d521bbc358d1039a1372b5 SHA512 511aad6e3a7af19a3f207657e9f9c6f20ef8c283e673d17f5ac1237f34bef615ae29b04a1461c0b743afbf9aa110007bf7fba847b2448c0eef3ba93c72fe970a -EBUILD protobuf-9999.ebuild 4124 BLAKE2B 80612d28804cb40f5dd36e014ffc996cae88c7a29f7da51654df768c938f5f91c736c7bba53a4dd4ed80dc7de460a48aeecba695312e63c9814e244053fa1b87 SHA512 57a1305fbe4500c43cda4bb6408a43e8b9e3e9cb9c0210a9f59ed3094f2f58bbbd21818c436f091918864e682ff8314b0aa8d30cddae03efccc58a5d06ccd2f7 MISC metadata.xml 595 BLAKE2B ba1b916e26b1e53f68e660f03d2e53fea8d22db04e8241ebec3ec20fbb251c2b164cf25d5fb6118423ce7721a822ae2302aab137b0748730e9a6860bf8e65668 SHA512 785e2550621b79b6350e1a6b52ed9992610769885fb29a9e92ee45a35158cc08707a3590dfcbece9ee9a5e16e1abfb614e8186132da7b942f2761b5e6ecfa827 diff --git a/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch deleted file mode 100644 index 60c450eb2822..000000000000 --- a/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch +++ /dev/null @@ -1,240 +0,0 @@ -https://github.com/protocolbuffers/protobuf/pull/235 - ---- a/src/google/protobuf/compiler/command_line_interface.cc -+++ b/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. ---- a/src/google/protobuf/compiler/command_line_interface.h -+++ b/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_; ---- a/src/google/protobuf/compiler/command_line_interface_unittest.cc -+++ b/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 string &expected_file, -+ const string &actual_file) { -+ 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) { -+ 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/files/protobuf-3.20.1-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch deleted file mode 100644 index 39a68650a74a..000000000000 --- a/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch +++ /dev/null @@ -1,240 +0,0 @@ -https://github.com/protocolbuffers/protobuf/pull/235 - ---- a/src/google/protobuf/compiler/command_line_interface.cc -+++ b/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. ---- a/src/google/protobuf/compiler/command_line_interface.h -+++ b/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_; ---- a/src/google/protobuf/compiler/command_line_interface_unittest.cc -+++ b/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-21.8.ebuild b/dev-libs/protobuf/protobuf-21.8.ebuild deleted file mode 100644 index 523c763c265c..000000000000 --- a/dev-libs/protobuf/protobuf-21.8.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# 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.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/protocolbuffers/protobuf/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 - -DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE=" - https://developers.google.com/protocol-buffers/ -" - -LICENSE="BSD" -SLOT="0/32" -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.2-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 - - if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then - eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ - "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" - die "Please update SLOT variable" - fi - - 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-3.19.3.ebuild b/dev-libs/protobuf/protobuf-3.19.3.ebuild deleted file mode 100644 index 5a3b627ea4de..000000000000 --- a/dev-libs/protobuf/protobuf-3.19.3.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 2008-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -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/30" -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.16.0-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/9392 - sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die - - # https://github.com/protocolbuffers/protobuf/issues/9433 - sed -e "/^[[:space:]]*static_assert(alignof(T) <= 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-3.19.6.ebuild b/dev-libs/protobuf/protobuf-3.19.6.ebuild deleted file mode 100644 index 8784499c1fd7..000000000000 --- a/dev-libs/protobuf/protobuf-3.19.6.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# 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.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/protocolbuffers/protobuf/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 - -DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE=" - https://developers.google.com/protocol-buffers/ -" - -LICENSE="BSD" -SLOT="0/30" -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.16.0-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/9392 - sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die - - # https://github.com/protocolbuffers/protobuf/issues/9433 - sed -e "/^[[:space:]]*static_assert(alignof(T) <= 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 - - if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then - eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ - "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" - die "Please update SLOT variable" - fi - - 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-3.20.1-r1.ebuild b/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild deleted file mode 100644 index 9d47f00fd02f..000000000000 --- a/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild +++ /dev/null @@ -1,143 +0,0 @@ -# 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-3.20.3.ebuild b/dev-libs/protobuf/protobuf-3.20.3.ebuild deleted file mode 100644 index cade7f688a49..000000000000 --- a/dev-libs/protobuf/protobuf-3.20.3.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# 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.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/protocolbuffers/protobuf/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 - -DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE=" - https://developers.google.com/protocol-buffers/ -" - -LICENSE="BSD" -SLOT="0/31" -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.2-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 - - if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then - eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ - "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" - die "Please update SLOT variable" - fi - - 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 deleted file mode 100644 index 9f84c789877f..000000000000 --- a/dev-libs/protobuf/protobuf-9999.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# 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.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/protocolbuffers/protobuf/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 - -DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE=" - https://developers.google.com/protocol-buffers/ -" - -LICENSE="BSD" -SLOT="0/32" -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 - - if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then - eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ - "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" - die "Please update SLOT variable" - fi - - 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 -} -- cgit v1.2.3