From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 26E64158020 for ; Tue, 25 Oct 2022 21:55:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1BBCEE0DBB; Tue, 25 Oct 2022 21:55:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 19565E0DBB for ; Tue, 25 Oct 2022 21:55:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6672340B65 for ; Tue, 25 Oct 2022 21:55:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EC625620 for ; Tue, 25 Oct 2022 21:55:19 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1666734802.f5f90f3cfac15df1fa6ab52f34382b977f62d85a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/protobuf/Manifest dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch dev-libs/protobuf/protobuf-21.8.ebuild dev-libs/protobuf/protobuf-3.19.6.ebuild dev-libs/protobuf/protobuf-3.20.3.ebuild dev-libs/protobuf/protobuf-9999.ebuild X-VCS-Directories: dev-libs/protobuf/files/ dev-libs/protobuf/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f5f90f3cfac15df1fa6ab52f34382b977f62d85a X-VCS-Branch: master Date: Tue, 25 Oct 2022 21:55:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0c730b1d-28eb-414c-ad49-e2e7c1634698 X-Archives-Hash: 9f948ffdf938fa852ba7a8372028c5ba commit: f5f90f3cfac15df1fa6ab52f34382b977f62d85a Author: Thibaud CANALE thican net> AuthorDate: Tue Aug 16 22:13:04 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Oct 25 21:53:22 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5f90f3c dev-libs/protobuf: add 3.19.6, 3.20.3, 21.8 Signed-off-by: Thibaud CANALE thican.net> Signed-off-by: Sam James gentoo.org> dev-libs/protobuf/Manifest | 3 + ...protobuf-3.20.2-protoc_input_output_files.patch | 240 +++++++++++++++++++++ .../{protobuf-9999.ebuild => protobuf-21.8.ebuild} | 27 ++- ...protobuf-9999.ebuild => protobuf-3.19.6.ebuild} | 32 +-- ...protobuf-9999.ebuild => protobuf-3.20.3.ebuild} | 25 ++- dev-libs/protobuf/protobuf-9999.ebuild | 25 ++- 6 files changed, 309 insertions(+), 43 deletions(-) diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index dfb0564c5120..74313749d43f 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -1,2 +1,5 @@ +DIST protobuf-21.8.tar.gz 5110670 BLAKE2B 3c1b0c857a86e9586481d63896341d0cb11290dbd710d87a6f7889d34f5f262abe2986a29ed19a730f8fa5df0b5c62d77a4db6aa415a72b239f7483ae8d6380c SHA512 cb17be759311e91172801add1f88fe7a0291b547170c40d2e3303f5c248570dddeade96bd48740edd628215f55269c97475e2f4c4a41c50f1018d525f52036cb 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 diff --git a/dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch new file mode 100644 index 000000000000..e4bf6858974a --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch @@ -0,0 +1,240 @@ +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 +@@ -1112,6 +1112,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; +@@ -1120,13 +1142,20 @@ + file.add_message_type()->set_name("EmptyMessage"); + GOOGLE_CHECK(pool.BuildFile(file) != nullptr); + 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; + } + } + +@@ -1165,6 +1194,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)) { +@@ -1888,6 +1922,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; +@@ -2021,22 +2061,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). +@@ -2347,7 +2403,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 == nullptr) { +@@ -2359,15 +2417,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 +@@ -294,7 +294,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( +@@ -429,6 +431,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 @@ + void SetUp() override; + void TearDown() override; + +- // 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-9999.ebuild b/dev-libs/protobuf/protobuf-21.8.ebuild similarity index 85% copy from dev-libs/protobuf/protobuf-9999.ebuild copy to dev-libs/protobuf/protobuf-21.8.ebuild index 0e620717ec44..523c763c265c 100644 --- a/dev-libs/protobuf/protobuf-9999.ebuild +++ b/dev-libs/protobuf/protobuf-21.8.ebuild @@ -5,24 +5,23 @@ EAPI=8 inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs -if [[ "${PV}" == "9999" ]]; then +if [[ "${PV}" == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" 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" + 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" +SLOT="0/32" IUSE="emacs examples static-libs test zlib" RESTRICT="!test? ( test )" @@ -35,7 +34,7 @@ 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.20.1-protoc_input_output_files.patch" + "${FILESDIR}/${PN}-3.20.2-protoc_input_output_files.patch" ) DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) @@ -116,6 +115,12 @@ multilib_src_test() { 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 diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.19.6.ebuild similarity index 80% copy from dev-libs/protobuf/protobuf-9999.ebuild copy to dev-libs/protobuf/protobuf-3.19.6.ebuild index 0e620717ec44..8784499c1fd7 100644 --- a/dev-libs/protobuf/protobuf-9999.ebuild +++ b/dev-libs/protobuf/protobuf-3.19.6.ebuild @@ -5,24 +5,23 @@ EAPI=8 inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs -if [[ "${PV}" == "9999" ]]; then +if [[ "${PV}" == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" 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" + 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" +SLOT="0/30" IUSE="emacs examples static-libs test zlib" RESTRICT="!test? ( test )" @@ -35,7 +34,7 @@ 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.20.1-protoc_input_output_files.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" ) DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) @@ -58,8 +57,11 @@ src_prepare() { # 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(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die + sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die eautoreconf } @@ -116,6 +118,12 @@ multilib_src_test() { 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 diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.20.3.ebuild similarity index 85% copy from dev-libs/protobuf/protobuf-9999.ebuild copy to dev-libs/protobuf/protobuf-3.20.3.ebuild index 0e620717ec44..cade7f688a49 100644 --- a/dev-libs/protobuf/protobuf-9999.ebuild +++ b/dev-libs/protobuf/protobuf-3.20.3.ebuild @@ -5,22 +5,21 @@ EAPI=8 inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs -if [[ "${PV}" == "9999" ]]; then +if [[ "${PV}" == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" 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" + 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" @@ -35,7 +34,7 @@ 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.20.1-protoc_input_output_files.patch" + "${FILESDIR}/${PN}-3.20.2-protoc_input_output_files.patch" ) DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) @@ -116,6 +115,12 @@ multilib_src_test() { 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 diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild index 0e620717ec44..9f84c789877f 100644 --- a/dev-libs/protobuf/protobuf-9999.ebuild +++ b/dev-libs/protobuf/protobuf-9999.ebuild @@ -5,24 +5,23 @@ EAPI=8 inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs -if [[ "${PV}" == "9999" ]]; then +if [[ "${PV}" == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" 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" + 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" +SLOT="0/32" IUSE="emacs examples static-libs test zlib" RESTRICT="!test? ( test )" @@ -116,6 +115,12 @@ multilib_src_test() { 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