Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/mozc/files/, app-i18n/mozc/
Date: Sat, 29 Jan 2022 15:20:18
Message-Id: 1643469515.da6212a99d181d54f22c73fb2a9b8a9a5df2d21b.dlan@gentoo
1 commit: da6212a99d181d54f22c73fb2a9b8a9a5df2d21b
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Wed Jan 12 00:00:00 2022 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 15:18:35 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da6212a9
7
8 app-i18n/mozc: Fix building with >=dev-libs/protobuf-3.18.0
9
10 Closes: https://bugs.gentoo.org/828527
11 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
12 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
13
14 app-i18n/mozc/files/mozc-2.23.2815.102-protobuf-3.18.patch | 13 +++++++++++++
15 ...zc-2.23.2815.102-r1.ebuild => mozc-2.23.2815.102.ebuild} | 7 ++++---
16 2 files changed, 17 insertions(+), 3 deletions(-)
17
18 diff --git a/app-i18n/mozc/files/mozc-2.23.2815.102-protobuf-3.18.patch b/app-i18n/mozc/files/mozc-2.23.2815.102-protobuf-3.18.patch
19 new file mode 100644
20 index 000000000000..15077bb1752a
21 --- /dev/null
22 +++ b/app-i18n/mozc/files/mozc-2.23.2815.102-protobuf-3.18.patch
23 @@ -0,0 +1,13 @@
24 +Fix building with Protocol Buffers >=3.18.
25 +
26 +--- /src/dictionary/user_dictionary_storage.cc
27 ++++ /src/dictionary/user_dictionary_storage.cc
28 +@@ -108,7 +108,7 @@
29 + // wants to use more than 512MB.
30 + mozc::protobuf::io::IstreamInputStream zero_copy_input(&ifs);
31 + mozc::protobuf::io::CodedInputStream decoder(&zero_copy_input);
32 +- decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1);
33 ++ decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit);
34 + if (!user_dictionary_storage_base.ParseFromCodedStream(&decoder)) {
35 + LOG(ERROR) << "Failed to parse";
36 + if (!decoder.ConsumedEntireMessage() || !ifs.eof()) {
37
38 diff --git a/app-i18n/mozc/mozc-2.23.2815.102-r1.ebuild b/app-i18n/mozc/mozc-2.23.2815.102.ebuild
39 similarity index 98%
40 rename from app-i18n/mozc/mozc-2.23.2815.102-r1.ebuild
41 rename to app-i18n/mozc/mozc-2.23.2815.102.ebuild
42 index 0d8162f9bcdb..88ce0b3c1c22 100644
43 --- a/app-i18n/mozc/mozc-2.23.2815.102-r1.ebuild
44 +++ b/app-i18n/mozc/mozc-2.23.2815.102.ebuild
45 @@ -1,4 +1,4 @@
46 -# Copyright 2010-2021 Gentoo Authors
47 +# Copyright 2010-2022 Gentoo Authors
48 # Distributed under the terms of the GNU General Public License v2
49
50 EAPI="7"
51 @@ -41,13 +41,13 @@ REQUIRED_USE="|| ( emacs fcitx4 ibus ) gui? ( ^^ ( handwriting-tegaki handwritin
52 RESTRICT="!test? ( test )"
53
54 BDEPEND="${PYTHON_DEPS}
55 - <dev-libs/protobuf-3.19
56 + >=dev-libs/protobuf-3.0.0
57 dev-util/gyp
58 dev-util/ninja
59 virtual/pkgconfig
60 emacs? ( app-editors/emacs:* )
61 fcitx4? ( sys-devel/gettext )"
62 -RDEPEND="<dev-libs/protobuf-3.19:=
63 +RDEPEND=">=dev-libs/protobuf-3.0.0:=
64 emacs? ( app-editors/emacs:* )
65 fcitx4? (
66 app-i18n/fcitx:4
67 @@ -113,6 +113,7 @@ src_prepare() {
68 eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-system_libraries.patch"
69 eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-gcc-8.patch"
70 eapply -p2 "${DISTDIR}/${PN}-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch"
71 + eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-protobuf-3.18.patch"
72 eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-environmental_variables.patch"
73 eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-reiwa.patch"
74 eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-server_path_check.patch"