Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc)
@ 2021-04-25 15:55 sgn
  2021-04-27  1:26 ` [PR PATCH] [Updated] " sgn
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: sgn @ 2021-04-25 15:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fcitx5-mozc
https://github.com/void-linux/void-packages/pull/30492

[WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc)
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30492.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fcitx5-mozc-30492.patch --]
[-- Type: text/x-diff, Size: 10130 bytes --]

From c0e57a08962d505e478c2b22c660e44d748b36cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 25 Apr 2021 22:53:14 +0700
Subject: [PATCH] mozc: update to 2.26.4346.100.

---
 srcpkgs/fcitx5-mozc                  |  1 +
 srcpkgs/mozc/patches/fcitx.patch     | 13 +++++
 srcpkgs/mozc/patches/fcitx5.patch    | 41 ++++++++++++++
 srcpkgs/mozc/patches/reiwa-era.patch | 13 +++++
 srcpkgs/mozc/patches/standard.patch  | 16 ++++++
 srcpkgs/mozc/template                | 82 +++++++++++++++++-----------
 6 files changed, 135 insertions(+), 31 deletions(-)
 create mode 120000 srcpkgs/fcitx5-mozc
 create mode 100644 srcpkgs/mozc/patches/fcitx.patch
 create mode 100644 srcpkgs/mozc/patches/fcitx5.patch
 create mode 100644 srcpkgs/mozc/patches/reiwa-era.patch
 create mode 100644 srcpkgs/mozc/patches/standard.patch

diff --git a/srcpkgs/fcitx5-mozc b/srcpkgs/fcitx5-mozc
new file mode 120000
index 000000000000..6874ca426b5f
--- /dev/null
+++ b/srcpkgs/fcitx5-mozc
@@ -0,0 +1 @@
+mozc
\ No newline at end of file
diff --git a/srcpkgs/mozc/patches/fcitx.patch b/srcpkgs/mozc/patches/fcitx.patch
new file mode 100644
index 000000000000..1ed6d01516f5
--- /dev/null
+++ b/srcpkgs/mozc/patches/fcitx.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/unix/fcitx/fcitx.gyp
+===================================================================
+--- mozc/src/unix/fcitx/fcitx.gyp.orig
++++ mozc/src/unix/fcitx/fcitx.gyp
+@@ -96,7 +96,7 @@
+         '<@(fcitx_dep_include_dirs)',
+       ],
+       'defines': [
+-        'LOCALEDIR="<!@(fcitx4-config --prefix)/share/locale/"',
++        'LOCALEDIR="/usr/share/locale/"',
+       ],
+     },
+   ],
diff --git a/srcpkgs/mozc/patches/fcitx5.patch b/srcpkgs/mozc/patches/fcitx5.patch
new file mode 100644
index 000000000000..388a6de0ae55
--- /dev/null
+++ b/srcpkgs/mozc/patches/fcitx5.patch
@@ -0,0 +1,41 @@
+Index: mozc/src/unix/fcitx5/mozc_response_parser.cc
+===================================================================
+--- mozc/src/unix/fcitx5/mozc_response_parser.cc.orig
++++ mozc/src/unix/fcitx5/mozc_response_parser.cc
+@@ -169,9 +169,9 @@ class MozcCandidateList final : public C
+     return labels_[idx];
+   }
+ 
+-  std::shared_ptr<const CandidateWord> candidate(int idx) const override {
++  const CandidateWord& candidate(int idx) const override {
+     checkIndex(idx);
+-    return candidateWords_[idx];
++    return *candidateWords_[idx];
+   }
+   int size() const override { return candidateWords_.size(); }
+ 
+Index: mozc/src/unix/fcitx5/mozc_state.cc
+===================================================================
+--- mozc/src/unix/fcitx5/mozc_state.cc.orig
++++ mozc/src/unix/fcitx5/mozc_state.cc
+@@ -241,7 +241,7 @@ bool MozcState::ProcessKeyEvent(KeySym s
+ 
+     if (normalized_key.check(Key(FcitxKey_Escape))) {
+       displayUsage_ = false;
+-      ProcessKeyEvent(FcitxKey_VoidSymbol, 0, KeyState::None, layout_is_jp,
++      ProcessKeyEvent(FcitxKey_VoidSymbol, 0, KeyState::NoState, layout_is_jp,
+                       false);
+     }
+     return true;
+Index: mozc/src/unix/fcitx5/mozc.conf
+===================================================================
+--- mozc/src/unix/fcitx5/mozc.conf.orig
++++ mozc/src/unix/fcitx5/mozc.conf
+@@ -1,6 +1,6 @@
+ [InputMethod]
+ Name=Mozc
+-Icon=PREFIX/share/fcitx5/mozc/icon/mozc.png
++Icon=/usr/share/fcitx5/mozc/icon/mozc.png
+ Label=あ
+ LangCode=ja
+ Addon=mozc
diff --git a/srcpkgs/mozc/patches/reiwa-era.patch b/srcpkgs/mozc/patches/reiwa-era.patch
new file mode 100644
index 000000000000..ad9eb4444e0c
--- /dev/null
+++ b/srcpkgs/mozc/patches/reiwa-era.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/data/dictionary_oss/dictionary08.txt
+===================================================================
+--- mozc/src/data/dictionary_oss/dictionary08.txt.orig
++++ mozc/src/data/dictionary_oss/dictionary08.txt
+@@ -8591,6 +8591,8 @@
+ れいれいと	12	12	7349	れいれいと
+ れいろう	1847	1847	7276	玲瓏
+ れいわ	1847	1847	8251	例話
++れいわ	1895	1895	1690	令和
++れいわ	1898	1898	4000	令和
+ れいんこーと	1847	1847	5568	レインコート
+ れいんじゃー	1847	1847	7459	レインジャー
+ れいんず	1917	1917	3548	レインズ
diff --git a/srcpkgs/mozc/patches/standard.patch b/srcpkgs/mozc/patches/standard.patch
new file mode 100644
index 000000000000..ca002e8b9854
--- /dev/null
+++ b/srcpkgs/mozc/patches/standard.patch
@@ -0,0 +1,16 @@
+Index: mozc/src/unix/fcitx5/fcitx5.gyp
+===================================================================
+--- mozc/src/unix/fcitx5/fcitx5.gyp.orig
++++ mozc/src/unix/fcitx5/fcitx5.gyp
+@@ -112,10 +112,10 @@
+         'fcitx5_build_environment',
+       ],
+       'cflags_cc': [
+-        '-std=c++14',
++        '-std=c++17',
+       ],
+       'cflags_cc!': [
+         '-std=gnu++0x'
+       ],
+       'cflags!': [
+         '-fno-exceptions',
diff --git a/srcpkgs/mozc/template b/srcpkgs/mozc/template
index 71d32eb5b9cd..565310f60bdd 100644
--- a/srcpkgs/mozc/template
+++ b/srcpkgs/mozc/template
@@ -1,32 +1,30 @@
 # Template file for 'mozc'
 pkgname=mozc
-version=2.23.2815.102
-revision=10
+version=2.26.4346.100
+revision=1
 create_wrksrc=yes
 build_wrksrc=mozc/src
-hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which"
+hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which
+ qt5-qmake qt5-host-tools"
 makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel
- fcitx-devel"
+ fcitx-devel libfcitx5-devel"
 depends="tegaki-zinnia-japanese>=0.3"
 short_desc="Japanese IME (Open Source version of Google Japanese Input)"
 maintainer="Matthias von Faber <mvf@gmx.eu>"
 license="BSD-3-Clause"
 homepage="https://github.com/google/mozc"
 distfiles="
- https://gitlab.com/fcitx/mozc/repository/dad94584ea5012110ad1d204e433964243a1639d/archive.tar.bz2>${pkgname}-${version}.tar.bz2
- https://github.com/bnoordhuis/gyp/archive/c6f471687407bf28ddfc63f1a8f47aeb7bf54edc.tar.gz
+ https://github.com/fcitx/mozc/archive/dad94584ea5012110ad1d204e433964243a1639d.tar.gz
+ ${DEBIAN_SITE}/main/g/gyp/gyp_0.1+20200513gitcaa6002.orig.tar.gz
  https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
 "
-checksum="
- e38457e63a7fa8d62d87b4f8b3e89fe5f6939d92e3c4fd287a93358375693892
- 882f074cbb3a4f2bba550fb615e63949c0fbf39eeb1718a0330b4a545ab97616
- 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1
-"
+checksum="09835994e4fa0f4e4e2ea4e171900c5e37c35680c4db86eb5a89be7bd82c420f
+ 8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
+ 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"
 
 CXXFLAGS="-D_GNU_SOURCE"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-devel"
 	subpackages="ibus-mozc fcitx-mozc"
 fi
 
@@ -36,7 +34,6 @@ fi
 
 post_extract() {
 	ln -s mozc-* mozc
-	rm -rf mozc/src/unix/fcitx5
 
 	# symlink "submodules" into place
 	for _src_dest in gyp japanese-usage-dictionary:japanese_usage_dictionary; do
@@ -45,17 +42,15 @@ post_extract() {
 		rmdir $_dst
 		ln -sr $_src-* $_dst
 	done
+}
 
-	if [ "$CROSS_BUILD" ]; then
-		# find fcitx4-config
-		sed -i -e "s;fcitx4-config;${XBPS_CROSS_BASE}/usr/bin/fcitx4-config;" mozc/src/unix/fcitx/fcitx.gyp
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc
 	fi
 }
 
 do_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) sed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc ;;
-	esac
 	GYP_DEFINES="
 	 document_dir=/usr/share/licenses/${pkgname}
 	 use_libprotobuf=1
@@ -64,16 +59,14 @@ do_configure() {
 }
 
 do_build() {
-	local targets
-	targets="
-	 server/server.gyp:mozc_server
-	 gui/gui.gyp:mozc_tool
-	 unix/emacs/emacs.gyp:mozc_emacs_helper
-	 unix/ibus/ibus.gyp:ibus_mozc
-	 renderer/renderer.gyp:mozc_renderer
-	 unix/fcitx/fcitx.gyp:fcitx-mozc
-	"
-	python2 build_mozc.py build -c Release $targets
+	python2 build_mozc.py build -c Release \
+		server/server.gyp:mozc_server \
+		gui/gui.gyp:mozc_tool \
+		unix/emacs/emacs.gyp:mozc_emacs_helper \
+		unix/ibus/ibus.gyp:ibus_mozc \
+		renderer/renderer.gyp:mozc_renderer \
+		unix/fcitx/fcitx.gyp:fcitx-mozc \
+		unix/fcitx5/fcitx5.gyp:fcitx5-mozc
 
 	sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' out_linux/Release/gen/unix/ibus/mozc.xml
 }
@@ -82,7 +75,7 @@ do_install() {
 	vinstall out_linux/Release/mozc_server 755 usr/lib/mozc
 	vinstall out_linux/Release/mozc_tool 755 usr/lib/mozc
 
-	head -n 29 server/mozc_server.cc > LICENSE
+	head -n 29 unix/fcitx5/fcitx_key_translator.cc >LICENSE
 	for i in LICENSE data/installer/*.html; do
 		vlicense "$i"
 	done
@@ -115,10 +108,37 @@ fcitx-mozc_package() {
 	short_desc="Mozc engine for fcitx - Client of the Mozc input method"
 	depends="${sourcepkg}-${version}_${revision} fcitx>=4.2.9"
 	homepage="https://fcitx-im.org/"
-	license="GPL-2.0-or-later"
 	pkg_install() {
+		local _file _lang
+		head -n 29 unix/fcitx/fcitx_key_translator.cc \
+			>unix/fcitx/LICENSE
+		vlicense unix/fcitx/LICENSE
 		vinstall out_linux/Release/fcitx-mozc.so 644 usr/lib/fcitx
 		vinstall unix/fcitx/fcitx-mozc.conf 644 usr/share/fcitx/addon
 		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		for _file in out_linux/Release/gen/unix/fcitx/po/*.mo
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.mo}
+			vinstall "$_file" 644 usr/share/locale/$_lang fcitx-mozc.mo
+		done
+	}
+}
+
+fcitx5-mozc_package() {
+	short_desc="Mozc engine for fcitx v5"
+	depends="${sourcepkg}-${version}_${revision} fcitx5"
+	homepage="https://fcitx-im.org/"
+	pkg_install() {
+		local _file _lang
+		vinstall out_linux/Release/fcitx5-mozc.so 644 usr/lib/fcitx5
+		vinstall unix/fcitx5/mozc-addon.conf 644 usr/share/fcitx/addon
+		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		for _file in out_linux/Release/gen/unix/fcitx5/po/*.mo
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.mo}
+			vinstall "$_file" 644 usr/share/locale/$_lang fcitx5-mozc.mo
+		done
 	}
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
@ 2021-04-27  1:26 ` sgn
  2021-04-30  7:56 ` sgn
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-04-27  1:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fcitx5-mozc
https://github.com/void-linux/void-packages/pull/30492

[WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc)
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30492.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fcitx5-mozc-30492.patch --]
[-- Type: text/x-diff, Size: 51937 bytes --]

From c0e57a08962d505e478c2b22c660e44d748b36cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 25 Apr 2021 22:53:14 +0700
Subject: [PATCH 1/2] mozc: update to 2.26.4346.100.

---
 srcpkgs/fcitx5-mozc                  |  1 +
 srcpkgs/mozc/patches/fcitx.patch     | 13 +++++
 srcpkgs/mozc/patches/fcitx5.patch    | 41 ++++++++++++++
 srcpkgs/mozc/patches/reiwa-era.patch | 13 +++++
 srcpkgs/mozc/patches/standard.patch  | 16 ++++++
 srcpkgs/mozc/template                | 82 +++++++++++++++++-----------
 6 files changed, 135 insertions(+), 31 deletions(-)
 create mode 120000 srcpkgs/fcitx5-mozc
 create mode 100644 srcpkgs/mozc/patches/fcitx.patch
 create mode 100644 srcpkgs/mozc/patches/fcitx5.patch
 create mode 100644 srcpkgs/mozc/patches/reiwa-era.patch
 create mode 100644 srcpkgs/mozc/patches/standard.patch

diff --git a/srcpkgs/fcitx5-mozc b/srcpkgs/fcitx5-mozc
new file mode 120000
index 000000000000..6874ca426b5f
--- /dev/null
+++ b/srcpkgs/fcitx5-mozc
@@ -0,0 +1 @@
+mozc
\ No newline at end of file
diff --git a/srcpkgs/mozc/patches/fcitx.patch b/srcpkgs/mozc/patches/fcitx.patch
new file mode 100644
index 000000000000..1ed6d01516f5
--- /dev/null
+++ b/srcpkgs/mozc/patches/fcitx.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/unix/fcitx/fcitx.gyp
+===================================================================
+--- mozc/src/unix/fcitx/fcitx.gyp.orig
++++ mozc/src/unix/fcitx/fcitx.gyp
+@@ -96,7 +96,7 @@
+         '<@(fcitx_dep_include_dirs)',
+       ],
+       'defines': [
+-        'LOCALEDIR="<!@(fcitx4-config --prefix)/share/locale/"',
++        'LOCALEDIR="/usr/share/locale/"',
+       ],
+     },
+   ],
diff --git a/srcpkgs/mozc/patches/fcitx5.patch b/srcpkgs/mozc/patches/fcitx5.patch
new file mode 100644
index 000000000000..388a6de0ae55
--- /dev/null
+++ b/srcpkgs/mozc/patches/fcitx5.patch
@@ -0,0 +1,41 @@
+Index: mozc/src/unix/fcitx5/mozc_response_parser.cc
+===================================================================
+--- mozc/src/unix/fcitx5/mozc_response_parser.cc.orig
++++ mozc/src/unix/fcitx5/mozc_response_parser.cc
+@@ -169,9 +169,9 @@ class MozcCandidateList final : public C
+     return labels_[idx];
+   }
+ 
+-  std::shared_ptr<const CandidateWord> candidate(int idx) const override {
++  const CandidateWord& candidate(int idx) const override {
+     checkIndex(idx);
+-    return candidateWords_[idx];
++    return *candidateWords_[idx];
+   }
+   int size() const override { return candidateWords_.size(); }
+ 
+Index: mozc/src/unix/fcitx5/mozc_state.cc
+===================================================================
+--- mozc/src/unix/fcitx5/mozc_state.cc.orig
++++ mozc/src/unix/fcitx5/mozc_state.cc
+@@ -241,7 +241,7 @@ bool MozcState::ProcessKeyEvent(KeySym s
+ 
+     if (normalized_key.check(Key(FcitxKey_Escape))) {
+       displayUsage_ = false;
+-      ProcessKeyEvent(FcitxKey_VoidSymbol, 0, KeyState::None, layout_is_jp,
++      ProcessKeyEvent(FcitxKey_VoidSymbol, 0, KeyState::NoState, layout_is_jp,
+                       false);
+     }
+     return true;
+Index: mozc/src/unix/fcitx5/mozc.conf
+===================================================================
+--- mozc/src/unix/fcitx5/mozc.conf.orig
++++ mozc/src/unix/fcitx5/mozc.conf
+@@ -1,6 +1,6 @@
+ [InputMethod]
+ Name=Mozc
+-Icon=PREFIX/share/fcitx5/mozc/icon/mozc.png
++Icon=/usr/share/fcitx5/mozc/icon/mozc.png
+ Label=あ
+ LangCode=ja
+ Addon=mozc
diff --git a/srcpkgs/mozc/patches/reiwa-era.patch b/srcpkgs/mozc/patches/reiwa-era.patch
new file mode 100644
index 000000000000..ad9eb4444e0c
--- /dev/null
+++ b/srcpkgs/mozc/patches/reiwa-era.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/data/dictionary_oss/dictionary08.txt
+===================================================================
+--- mozc/src/data/dictionary_oss/dictionary08.txt.orig
++++ mozc/src/data/dictionary_oss/dictionary08.txt
+@@ -8591,6 +8591,8 @@
+ れいれいと	12	12	7349	れいれいと
+ れいろう	1847	1847	7276	玲瓏
+ れいわ	1847	1847	8251	例話
++れいわ	1895	1895	1690	令和
++れいわ	1898	1898	4000	令和
+ れいんこーと	1847	1847	5568	レインコート
+ れいんじゃー	1847	1847	7459	レインジャー
+ れいんず	1917	1917	3548	レインズ
diff --git a/srcpkgs/mozc/patches/standard.patch b/srcpkgs/mozc/patches/standard.patch
new file mode 100644
index 000000000000..ca002e8b9854
--- /dev/null
+++ b/srcpkgs/mozc/patches/standard.patch
@@ -0,0 +1,16 @@
+Index: mozc/src/unix/fcitx5/fcitx5.gyp
+===================================================================
+--- mozc/src/unix/fcitx5/fcitx5.gyp.orig
++++ mozc/src/unix/fcitx5/fcitx5.gyp
+@@ -112,10 +112,10 @@
+         'fcitx5_build_environment',
+       ],
+       'cflags_cc': [
+-        '-std=c++14',
++        '-std=c++17',
+       ],
+       'cflags_cc!': [
+         '-std=gnu++0x'
+       ],
+       'cflags!': [
+         '-fno-exceptions',
diff --git a/srcpkgs/mozc/template b/srcpkgs/mozc/template
index 71d32eb5b9cd..565310f60bdd 100644
--- a/srcpkgs/mozc/template
+++ b/srcpkgs/mozc/template
@@ -1,32 +1,30 @@
 # Template file for 'mozc'
 pkgname=mozc
-version=2.23.2815.102
-revision=10
+version=2.26.4346.100
+revision=1
 create_wrksrc=yes
 build_wrksrc=mozc/src
-hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which"
+hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which
+ qt5-qmake qt5-host-tools"
 makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel
- fcitx-devel"
+ fcitx-devel libfcitx5-devel"
 depends="tegaki-zinnia-japanese>=0.3"
 short_desc="Japanese IME (Open Source version of Google Japanese Input)"
 maintainer="Matthias von Faber <mvf@gmx.eu>"
 license="BSD-3-Clause"
 homepage="https://github.com/google/mozc"
 distfiles="
- https://gitlab.com/fcitx/mozc/repository/dad94584ea5012110ad1d204e433964243a1639d/archive.tar.bz2>${pkgname}-${version}.tar.bz2
- https://github.com/bnoordhuis/gyp/archive/c6f471687407bf28ddfc63f1a8f47aeb7bf54edc.tar.gz
+ https://github.com/fcitx/mozc/archive/dad94584ea5012110ad1d204e433964243a1639d.tar.gz
+ ${DEBIAN_SITE}/main/g/gyp/gyp_0.1+20200513gitcaa6002.orig.tar.gz
  https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
 "
-checksum="
- e38457e63a7fa8d62d87b4f8b3e89fe5f6939d92e3c4fd287a93358375693892
- 882f074cbb3a4f2bba550fb615e63949c0fbf39eeb1718a0330b4a545ab97616
- 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1
-"
+checksum="09835994e4fa0f4e4e2ea4e171900c5e37c35680c4db86eb5a89be7bd82c420f
+ 8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
+ 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"
 
 CXXFLAGS="-D_GNU_SOURCE"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-devel"
 	subpackages="ibus-mozc fcitx-mozc"
 fi
 
@@ -36,7 +34,6 @@ fi
 
 post_extract() {
 	ln -s mozc-* mozc
-	rm -rf mozc/src/unix/fcitx5
 
 	# symlink "submodules" into place
 	for _src_dest in gyp japanese-usage-dictionary:japanese_usage_dictionary; do
@@ -45,17 +42,15 @@ post_extract() {
 		rmdir $_dst
 		ln -sr $_src-* $_dst
 	done
+}
 
-	if [ "$CROSS_BUILD" ]; then
-		# find fcitx4-config
-		sed -i -e "s;fcitx4-config;${XBPS_CROSS_BASE}/usr/bin/fcitx4-config;" mozc/src/unix/fcitx/fcitx.gyp
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc
 	fi
 }
 
 do_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) sed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc ;;
-	esac
 	GYP_DEFINES="
 	 document_dir=/usr/share/licenses/${pkgname}
 	 use_libprotobuf=1
@@ -64,16 +59,14 @@ do_configure() {
 }
 
 do_build() {
-	local targets
-	targets="
-	 server/server.gyp:mozc_server
-	 gui/gui.gyp:mozc_tool
-	 unix/emacs/emacs.gyp:mozc_emacs_helper
-	 unix/ibus/ibus.gyp:ibus_mozc
-	 renderer/renderer.gyp:mozc_renderer
-	 unix/fcitx/fcitx.gyp:fcitx-mozc
-	"
-	python2 build_mozc.py build -c Release $targets
+	python2 build_mozc.py build -c Release \
+		server/server.gyp:mozc_server \
+		gui/gui.gyp:mozc_tool \
+		unix/emacs/emacs.gyp:mozc_emacs_helper \
+		unix/ibus/ibus.gyp:ibus_mozc \
+		renderer/renderer.gyp:mozc_renderer \
+		unix/fcitx/fcitx.gyp:fcitx-mozc \
+		unix/fcitx5/fcitx5.gyp:fcitx5-mozc
 
 	sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' out_linux/Release/gen/unix/ibus/mozc.xml
 }
@@ -82,7 +75,7 @@ do_install() {
 	vinstall out_linux/Release/mozc_server 755 usr/lib/mozc
 	vinstall out_linux/Release/mozc_tool 755 usr/lib/mozc
 
-	head -n 29 server/mozc_server.cc > LICENSE
+	head -n 29 unix/fcitx5/fcitx_key_translator.cc >LICENSE
 	for i in LICENSE data/installer/*.html; do
 		vlicense "$i"
 	done
@@ -115,10 +108,37 @@ fcitx-mozc_package() {
 	short_desc="Mozc engine for fcitx - Client of the Mozc input method"
 	depends="${sourcepkg}-${version}_${revision} fcitx>=4.2.9"
 	homepage="https://fcitx-im.org/"
-	license="GPL-2.0-or-later"
 	pkg_install() {
+		local _file _lang
+		head -n 29 unix/fcitx/fcitx_key_translator.cc \
+			>unix/fcitx/LICENSE
+		vlicense unix/fcitx/LICENSE
 		vinstall out_linux/Release/fcitx-mozc.so 644 usr/lib/fcitx
 		vinstall unix/fcitx/fcitx-mozc.conf 644 usr/share/fcitx/addon
 		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		for _file in out_linux/Release/gen/unix/fcitx/po/*.mo
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.mo}
+			vinstall "$_file" 644 usr/share/locale/$_lang fcitx-mozc.mo
+		done
+	}
+}
+
+fcitx5-mozc_package() {
+	short_desc="Mozc engine for fcitx v5"
+	depends="${sourcepkg}-${version}_${revision} fcitx5"
+	homepage="https://fcitx-im.org/"
+	pkg_install() {
+		local _file _lang
+		vinstall out_linux/Release/fcitx5-mozc.so 644 usr/lib/fcitx5
+		vinstall unix/fcitx5/mozc-addon.conf 644 usr/share/fcitx/addon
+		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		for _file in out_linux/Release/gen/unix/fcitx5/po/*.mo
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.mo}
+			vinstall "$_file" 644 usr/share/locale/$_lang fcitx5-mozc.mo
+		done
 	}
 }

From 6b8be241428f2be8e1fbbd014a9492a94136da7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Tue, 27 Apr 2021 08:24:37 +0700
Subject: [PATCH 2/2] mozc: update to 2.26.4353.100.

---
 srcpkgs/mozc/patches/abseil.patch             |  93 +++++
 srcpkgs/mozc/patches/cross.patch              |  10 +-
 srcpkgs/mozc/patches/cxx-stdlib.patch         |  29 ++
 .../default_hiragana_from_environment.patch   |  20 --
 srcpkgs/mozc/patches/fcitx5.patch             |  41 ---
 srcpkgs/mozc/patches/no-parallel.patch        |   6 +-
 srcpkgs/mozc/patches/protobuf-370.patch       | 327 ------------------
 srcpkgs/mozc/patches/reiwa-era.patch          |  14 +-
 srcpkgs/mozc/patches/standard.patch           |  16 -
 srcpkgs/mozc/patches/unsigned-int.patch       | 210 +++++++++++
 srcpkgs/mozc/template                         |  43 ++-
 11 files changed, 373 insertions(+), 436 deletions(-)
 create mode 100644 srcpkgs/mozc/patches/abseil.patch
 create mode 100644 srcpkgs/mozc/patches/cxx-stdlib.patch
 delete mode 100644 srcpkgs/mozc/patches/default_hiragana_from_environment.patch
 delete mode 100644 srcpkgs/mozc/patches/fcitx5.patch
 delete mode 100644 srcpkgs/mozc/patches/protobuf-370.patch
 delete mode 100644 srcpkgs/mozc/patches/standard.patch
 create mode 100644 srcpkgs/mozc/patches/unsigned-int.patch

diff --git a/srcpkgs/mozc/patches/abseil.patch b/srcpkgs/mozc/patches/abseil.patch
new file mode 100644
index 000000000000..888762d55529
--- /dev/null
+++ b/srcpkgs/mozc/patches/abseil.patch
@@ -0,0 +1,93 @@
+
+Ported from grpc's patches
+
+An all-in-one patch that fixes several issues:
+
+1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
+2) powerpc stacktrace implementation only works on glibc (disabled on musl)
+3) powerpc stacktrace implementation has ppc64 assumptions (fixed)
+4) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
+
+--- mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
++++ mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
+@@ -20,7 +20,7 @@
+ #include <intrin.h>
+ #endif
+ 
+-#if defined(__powerpc__) || defined(__ppc__)
++#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
+ #ifdef __GLIBC__
+ #include <sys/platform/ppc.h>
+ #elif defined(__FreeBSD__)
+@@ -59,7 +59,7 @@
+   return base_internal::NominalCPUFrequency();
+ }
+ 
+-#elif defined(__powerpc__) || defined(__ppc__)
++#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
+ 
+ int64_t UnscaledCycleClock::Now() {
+ #ifdef __GLIBC__
+--- mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
++++ mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
+@@ -46,7 +46,7 @@
+ 
+ // The following platforms have an implementation of a hardware counter.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
+-  defined(__powerpc__) || defined(__ppc__) || \
++  ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
+   defined(_M_IX86) || defined(_M_X64)
+ #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
+ #else
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
+@@ -27,6 +27,10 @@
+ #include <csignal>
+ #include <cstdio>
+ 
++#if defined(__powerpc__)
++#include <asm/ptrace.h>
++#endif
++
+ #include "absl/base/attributes.h"
+ #include "absl/base/internal/raw_logging.h"
+ #include "absl/base/macros.h"
+@@ -55,8 +59,10 @@
+     return reinterpret_cast<void*>(context->uc_mcontext.pc);
+ #elif defined(__powerpc64__)
+     return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
+-#elif defined(__powerpc__)
++#elif defined(__powerpc__) && defined(__GLIBC__)
+     return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
++#elif defined(__powerpc__)
++    return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->nip);
+ #elif defined(__riscv)
+     return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
+ #elif defined(__s390__) && !defined(__s390x__)
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
+@@ -64,7 +64,7 @@
+ #elif defined(__i386__) || defined(__x86_64__)
+ #define ABSL_STACKTRACE_INL_HEADER \
+   "absl/debugging/internal/stacktrace_x86-inl.inc"
+-#elif defined(__ppc__) || defined(__PPC__)
++#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
+ #define ABSL_STACKTRACE_INL_HEADER \
+   "absl/debugging/internal/stacktrace_powerpc-inl.inc"
+ #elif defined(__aarch64__)
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc
+@@ -130,8 +130,13 @@
+         StacktracePowerPCGetLR(new_sp) == kernel_sigtramp_rt64_address) {
+       const ucontext_t* signal_context =
+           reinterpret_cast<const ucontext_t*>(uc);
++#if defined(__powerpc64__)
+       void **const sp_before_signal =
+           reinterpret_cast<void**>(signal_context->uc_mcontext.gp_regs[PT_R1]);
++#else
++      void **const sp_before_signal =
++          reinterpret_cast<void**>(signal_context->uc_mcontext.uc_regs->gregs[PT_R1]);
++#endif
+       // Check that alleged sp before signal is nonnull and is reasonably
+       // aligned.
+       if (sp_before_signal != nullptr &&
diff --git a/srcpkgs/mozc/patches/cross.patch b/srcpkgs/mozc/patches/cross.patch
index 17d47a900eb9..d73c5f82b430 100644
--- a/srcpkgs/mozc/patches/cross.patch
+++ b/srcpkgs/mozc/patches/cross.patch
@@ -1,7 +1,9 @@
---- mozc/src/gyp/common.gypi
+Index: mozc/src/gyp/common.gypi
+===================================================================
+--- mozc/src/gyp/common.gypi.orig
 +++ mozc/src/gyp/common.gypi
-@@ -444,12 +444,12 @@
-     }],
+@@ -409,12 +409,12 @@
+   'conditions': [
      ['target_platform=="Linux"', {
        'make_global_settings': [
 -        ['AR', '<!(which ar)'],
@@ -19,7 +21,7 @@
        ],
      }],
      ['target_platform=="Android"', {
-@@ -494,12 +494,12 @@
+@@ -459,12 +459,12 @@
          ['LD', '<(ndk_bin_dir)/<(toolchain_prefix)-ld'],
          ['NM', '<(ndk_bin_dir)/<(toolchain_prefix)-nm'],
          ['READELF', '<(ndk_bin_dir)/<(toolchain_prefix)-readelf'],
diff --git a/srcpkgs/mozc/patches/cxx-stdlib.patch b/srcpkgs/mozc/patches/cxx-stdlib.patch
new file mode 100644
index 000000000000..0bccaf8ddc4f
--- /dev/null
+++ b/srcpkgs/mozc/patches/cxx-stdlib.patch
@@ -0,0 +1,29 @@
+Index: mozc/src/gyp/common.gypi
+===================================================================
+--- mozc/src/gyp/common.gypi
++++ mozc/src/gyp/common.gypi
+@@ -105,7 +105,7 @@
+     ],
+     # Libraries for GNU/Linux environment.
+     'linux_ldflags': [
+-      '-lc++',
++      '-lstdc++',
+       '-pthread',
+     ],
+ 
+@@ -205,7 +205,6 @@
+               '-Wtype-limits',
+             ],
+             'cflags_cc': [
+-              '-stdlib=libc++',
+               '-Wno-covered-switch-default',
+               '-Wno-unnamed-type-template-args',
+               '-Wno-c++11-narrowing',
+@@ -225,7 +224,6 @@
+               '-Wtype-limits',
+             ],
+             'cflags_cc': [
+-              '-stdlib=libc++',
+               '-Wno-covered-switch-default',
+               '-Wno-unnamed-type-template-args',
+               '-Wno-c++11-narrowing',
diff --git a/srcpkgs/mozc/patches/default_hiragana_from_environment.patch b/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
deleted file mode 100644
index d733635ac5a1..000000000000
--- a/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- mozc/src/unix/ibus/property_handler.cc
-+++ mozc/src/unix/ibus/property_handler.cc
-@@ -40,6 +40,8 @@
- #include "unix/ibus/mozc_engine_property.h"
- #include "unix/ibus/path_util.h"
- 
-+#include <cstdlib>
-+
- // On Gnome Shell with IBus 1.5, new property named "symbol" is used to
- // represent the mode indicator on the system panel. Note that "symbol" does
- // not exist in IBus 1.4.x.
-@@ -80,7 +82,7 @@ bool GetDisabled(IBusEngine *engine) {
- // On IBus 1.4.x, IBus expects that an IME should always be turned on and
- // IME on/off keys are handled by IBus itself rather than each IME.
- #if IBUS_CHECK_VERSION(1, 5, 0)
--const bool kActivatedOnLaunch = false;
-+const bool kActivatedOnLaunch = !!::std::getenv("IBUS_MOZC_DEFAULT_HIRAGANA");
- #else
- const bool kActivatedOnLaunch = true;
- #endif  // IBus>=1.5.0
diff --git a/srcpkgs/mozc/patches/fcitx5.patch b/srcpkgs/mozc/patches/fcitx5.patch
deleted file mode 100644
index 388a6de0ae55..000000000000
--- a/srcpkgs/mozc/patches/fcitx5.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Index: mozc/src/unix/fcitx5/mozc_response_parser.cc
-===================================================================
---- mozc/src/unix/fcitx5/mozc_response_parser.cc.orig
-+++ mozc/src/unix/fcitx5/mozc_response_parser.cc
-@@ -169,9 +169,9 @@ class MozcCandidateList final : public C
-     return labels_[idx];
-   }
- 
--  std::shared_ptr<const CandidateWord> candidate(int idx) const override {
-+  const CandidateWord& candidate(int idx) const override {
-     checkIndex(idx);
--    return candidateWords_[idx];
-+    return *candidateWords_[idx];
-   }
-   int size() const override { return candidateWords_.size(); }
- 
-Index: mozc/src/unix/fcitx5/mozc_state.cc
-===================================================================
---- mozc/src/unix/fcitx5/mozc_state.cc.orig
-+++ mozc/src/unix/fcitx5/mozc_state.cc
-@@ -241,7 +241,7 @@ bool MozcState::ProcessKeyEvent(KeySym s
- 
-     if (normalized_key.check(Key(FcitxKey_Escape))) {
-       displayUsage_ = false;
--      ProcessKeyEvent(FcitxKey_VoidSymbol, 0, KeyState::None, layout_is_jp,
-+      ProcessKeyEvent(FcitxKey_VoidSymbol, 0, KeyState::NoState, layout_is_jp,
-                       false);
-     }
-     return true;
-Index: mozc/src/unix/fcitx5/mozc.conf
-===================================================================
---- mozc/src/unix/fcitx5/mozc.conf.orig
-+++ mozc/src/unix/fcitx5/mozc.conf
-@@ -1,6 +1,6 @@
- [InputMethod]
- Name=Mozc
--Icon=PREFIX/share/fcitx5/mozc/icon/mozc.png
-+Icon=/usr/share/fcitx5/mozc/icon/mozc.png
- Label=あ
- LangCode=ja
- Addon=mozc
diff --git a/srcpkgs/mozc/patches/no-parallel.patch b/srcpkgs/mozc/patches/no-parallel.patch
index 14b23367f09e..5952cbc6a040 100644
--- a/srcpkgs/mozc/patches/no-parallel.patch
+++ b/srcpkgs/mozc/patches/no-parallel.patch
@@ -1,6 +1,8 @@
---- mozc/src/build_mozc.py
+Index: mozc/src/build_mozc.py
+===================================================================
+--- mozc/src/build_mozc.py.orig
 +++ mozc/src/build_mozc.py
-@@ -728,6 +728,7 @@ def GypMain(options, unused_args):
+@@ -496,6 +496,7 @@ def GypMain(options, unused_args):
    gyp_options.extend(['--generator-output=.'])
    short_basename = GetBuildShortBaseName(target_platform)
    gyp_options.extend(['-G', 'output_dir=%s' % short_basename])
diff --git a/srcpkgs/mozc/patches/protobuf-370.patch b/srcpkgs/mozc/patches/protobuf-370.patch
deleted file mode 100644
index 59d4e0bb995d..000000000000
--- a/srcpkgs/mozc/patches/protobuf-370.patch
+++ /dev/null
@@ -1,327 +0,0 @@
---- mozc/src/dictionary/user_dictionary.cc
-+++ mozc/src/dictionary/user_dictionary.cc
-@@ -289,7 +289,7 @@ class UserDictionary::UserDictionaryReloader : public Thread {
-     }
- 
-     auto_register_mode_ = false;
--    dic_->Load(*(storage.get()));
-+    dic_->Load(*(storage->storage()));
-   }
- 
-  private:
---- mozc/src/dictionary/user_dictionary_session.cc
-+++ mozc/src/dictionary/user_dictionary_session.cc
-@@ -144,7 +144,7 @@ class UndoRenameDictionaryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -169,7 +169,7 @@ class UndoAddEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL || dictionary->entries_size() == 0) {
-       return false;
-     }
-@@ -195,7 +195,7 @@ class UndoEditEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL ||
-         index_ < 0 || dictionary->entries_size() <= index_) {
-       return false;
-@@ -240,7 +240,7 @@ class UndoDeleteEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -306,7 +306,7 @@ class UndoImportFromStringCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -345,7 +345,7 @@ UserDictionarySession::~UserDictionarySession() {
- 
- // TODO(hidehiko) move this to header.
- const UserDictionaryStorage &UserDictionarySession::storage() const {
--  return *storage_;
-+  return *storage_->storage();
- }
- mozc::UserDictionaryStorage *UserDictionarySession::mutable_storage() {
-   return storage_.get();
-@@ -464,7 +464,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::CreateDictionary(
-     const string &dictionary_name, uint64 *new_dictionary_id) {
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), dictionary_name, new_dictionary_id);
-+          storage_->storage(), dictionary_name, new_dictionary_id);
-   if (status == UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-     AddUndoCommand(new UndoCreateDictionaryCommand);
-   }
-@@ -488,7 +488,7 @@ UserDictionarySession::DeleteDictionaryInternal(
-   int original_index;
-   UserDictionary *deleted_dictionary;
-   if (!UserDictionaryUtil::DeleteDictionary(
--          storage_.get(), dictionary_id,
-+          storage_->storage(), dictionary_id,
-           &original_index, &deleted_dictionary)) {
-     // Failed to delete the dictionary.
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-@@ -510,7 +510,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::RenameDictionary(
-     uint64 dictionary_id, const string &dictionary_name) {
-   string original_name;
-   const UserDictionary *dictionary =
--      UserDictionaryUtil::GetUserDictionaryById(*storage_, dictionary_id);
-+      UserDictionaryUtil::GetUserDictionaryById(*storage_->storage(), dictionary_id);
-   if (dictionary != NULL) {
-     // Note that if dictionary is null, it means the dictionary_id is invalid
-     // so following RenameDictionary will fail, and error handling is done
-@@ -547,7 +547,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::AddEntry(
-     uint64 dictionary_id, const UserDictionary::Entry &entry) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -575,7 +575,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::EditEntry(
-     uint64 dictionary_id, int index, const UserDictionary::Entry &entry) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -604,7 +604,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::DeleteEntry(
-     uint64 dictionary_id, const std::vector<int> &index_list) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -644,7 +644,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::ImportFromString(
-     uint64 dictionary_id, const string &data) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -699,7 +699,7 @@ UserDictionarySession::ImportToNewDictionaryFromString(
-     uint64 *new_dictionary_id) {
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), dictionary_name, new_dictionary_id);
-+          storage_->storage(), dictionary_name, new_dictionary_id);
-   if (status != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-     return status;
-   }
-@@ -709,7 +709,7 @@ UserDictionarySession::ImportToNewDictionaryFromString(
- 
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), *new_dictionary_id);
-+          storage_->storage(), *new_dictionary_id);
-   if (dictionary == NULL) {
-     // The dictionary should be always found.
-     return UserDictionaryCommandStatus::UNKNOWN_ERROR;
-@@ -728,7 +728,7 @@ bool UserDictionarySession::EnsureNonEmptyStorage() {
-   uint64 new_dictionary_id;
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), default_dictionary_name_, &new_dictionary_id);
-+          storage_->storage(), default_dictionary_name_, &new_dictionary_id);
-   CHECK_EQ(
-       status, UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS);
-   return true;
---- mozc/src/dictionary/user_dictionary_storage.cc
-+++ mozc/src/dictionary/user_dictionary_storage.cc
-@@ -109,7 +109,7 @@ bool UserDictionaryStorage::LoadInternal() {
-   mozc::protobuf::io::IstreamInputStream zero_copy_input(&ifs);
-   mozc::protobuf::io::CodedInputStream decoder(&zero_copy_input);
-   decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1);
--  if (!ParseFromCodedStream(&decoder)) {
-+  if (!storage_.ParseFromCodedStream(&decoder)) {
-     LOG(ERROR) << "Failed to parse";
-     if (!decoder.ConsumedEntireMessage() || !ifs.eof()) {
-       LOG(ERROR) << "ParseFromStream failed: file seems broken";
-@@ -141,7 +141,7 @@ bool UserDictionaryStorage::Load() {
-     const UserDictionary &dict = dictionaries(i);
-     if (dict.id() == 0) {
-       mutable_dictionaries(i)->set_id(
--          UserDictionaryUtil::CreateNewDictionaryId(*this));
-+          UserDictionaryUtil::CreateNewDictionaryId(storage_));
-     }
-   }
- 
-@@ -171,7 +171,7 @@ bool UserDictionaryStorage::Save() {
-       return false;
-     }
- 
--    if (!SerializeToOstream(&ofs)) {
-+    if (!storage_.SerializeToOstream(&ofs)) {
-       LOG(ERROR) << "SerializeToString failed";
-       last_error_type_ = SYNC_FAILURE;
-       return false;
-@@ -241,7 +241,7 @@ bool UserDictionaryStorage::ExportDictionary(
- bool UserDictionaryStorage::CreateDictionary(
-     const string &dic_name, uint64 *new_dic_id) {
-   UserDictionaryCommandStatus::Status status =
--      UserDictionaryUtil::CreateDictionary(this, dic_name, new_dic_id);
-+      UserDictionaryUtil::CreateDictionary(&storage_, dic_name, new_dic_id);
-   // Update last_error_type_
-   switch (status) {
-     case UserDictionaryCommandStatus::DICTIONARY_NAME_EMPTY:
-@@ -273,7 +273,7 @@ bool UserDictionaryStorage::CreateDictionary(
- }
- 
- bool UserDictionaryStorage::DeleteDictionary(uint64 dic_id) {
--  if (!UserDictionaryUtil::DeleteDictionary(this, dic_id, NULL, NULL)) {
-+  if (!UserDictionaryUtil::DeleteDictionary(&storage_, dic_id, NULL, NULL)) {
-     // Failed to delete dictionary.
-     last_error_type_ = INVALID_DICTIONARY_ID;
-     return false;
-@@ -318,7 +318,7 @@ bool UserDictionaryStorage::RenameDictionary(uint64 dic_id,
- }
- 
- int UserDictionaryStorage::GetUserDictionaryIndex(uint64 dic_id) const {
--  return UserDictionaryUtil::GetUserDictionaryIndexById(*this, dic_id);
-+  return UserDictionaryUtil::GetUserDictionaryIndexById(storage_, dic_id);
- }
- 
- bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name,
-@@ -335,7 +335,7 @@ bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name,
- 
- user_dictionary::UserDictionary *UserDictionaryStorage::GetUserDictionary(
-     uint64 dic_id) {
--  return UserDictionaryUtil::GetMutableUserDictionaryById(this, dic_id);
-+  return UserDictionaryUtil::GetMutableUserDictionaryById(&storage_, dic_id);
- }
- 
- UserDictionaryStorage::UserDictionaryStorageErrorType
-@@ -361,14 +361,14 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary(
- 
-   UserDictionary *dic = NULL;
-   if (auto_index == -1) {
--    if (UserDictionaryUtil::IsStorageFull(*this)) {
-+    if (UserDictionaryUtil::IsStorageFull(storage_)) {
-       last_error_type_ = TOO_MANY_DICTIONARIES;
-       LOG(ERROR) << "too many dictionaries";
-       UnLock();
-       return false;
-     }
-     dic = add_dictionaries();
--    dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(*this));
-+    dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(storage_));
-     dic->set_name(kAutoRegisteredDictionaryName);
-   } else {
-     dic = mutable_dictionaries(auto_index);
-@@ -410,7 +410,7 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary(
- }
- 
- bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
--  if (CountSyncableDictionaries(*this) == 0) {
-+  if (CountSyncableDictionaries(storage_) == 0) {
-     return false;
-   }
- 
-@@ -445,7 +445,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
-           kDictionaryNameConvertedFromSyncableDictionary;
-       int index = 0;
-       while (UserDictionaryUtil::ValidateDictionaryName(
--                 *this, new_dictionary_name)
-+                 storage_, new_dictionary_name)
-              != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-         ++index;
-         new_dictionary_name = Util::StringPrintf(
-@@ -456,7 +456,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
-     dic->set_syncable(false);
-   }
- 
--  DCHECK_EQ(0, CountSyncableDictionaries(*this));
-+  DCHECK_EQ(0, CountSyncableDictionaries(storage_));
- 
-   return true;
- }
---- mozc/src/dictionary/user_dictionary_storage.h
-+++ mozc/src/dictionary/user_dictionary_storage.h
-@@ -74,8 +74,20 @@ class ProcessMutex;
- 
- // Inherit from ProtocolBuffer
- // TODO(hidehiko): Get rid of this implementation.
--class UserDictionaryStorage : public user_dictionary::UserDictionaryStorage {
-+class UserDictionaryStorage {
-+ private:
-+  user_dictionary::UserDictionaryStorage storage_;
-  public:
-+  static const user_dictionary::UserDictionaryStorage& default_instance() { return user_dictionary::UserDictionaryStorage::default_instance(); }
-+  user_dictionary::UserDictionaryStorage *storage() { return &storage_; }
-+  int dictionaries_size() const { return storage_.dictionaries_size(); }
-+  void clear_dictionaries() { storage_.clear_dictionaries(); }
-+  user_dictionary::UserDictionary* mutable_dictionaries(int index) { return storage_.mutable_dictionaries(index); }
-+  ::google::protobuf::RepeatedPtrField<user_dictionary::UserDictionary >* mutable_dictionaries() { return storage_.mutable_dictionaries(); }
-+  const ::google::protobuf::RepeatedPtrField<user_dictionary::UserDictionary >& dictionaries() const { return storage_.dictionaries(); }
-+  const user_dictionary::UserDictionary& dictionaries(int index) const { return storage_.dictionaries(index); }
-+  user_dictionary::UserDictionary* add_dictionaries() { return storage_.add_dictionaries(); }
-+
-   typedef user_dictionary::UserDictionary UserDictionary;
-   typedef user_dictionary::UserDictionary::Entry UserDictionaryEntry;
- 
---- mozc/src/prediction/user_history_predictor.cc
-+++ mozc/src/prediction/user_history_predictor.cc
-@@ -291,7 +291,7 @@ bool UserHistoryStorage::Load() {
-     return false;
-   }
- 
--  if (!ParseFromString(input)) {
-+  if (!userHistory_.ParseFromString(input)) {
-     LOG(ERROR) << "ParseFromString failed. message looks broken";
-     return false;
-   }
-@@ -307,7 +307,7 @@ bool UserHistoryStorage::Save() const {
-   }
- 
-   string output;
--  if (!AppendToString(&output)) {
-+  if (!userHistory_.AppendToString(&output)) {
-     LOG(ERROR) << "AppendToString failed";
-     return false;
-   }
---- mozc/src/prediction/user_history_predictor.h
-+++ mozc/src/prediction/user_history_predictor.h
-@@ -61,8 +61,13 @@ class Segments;
- class UserHistoryPredictorSyncer;
- 
- // Added serialization method for UserHistory.
--class UserHistoryStorage : public mozc::user_history_predictor::UserHistory {
-+class UserHistoryStorage {
-+ private:
-+  user_history_predictor::UserHistory userHistory_;
-  public:
-+  int entries_size() const { return userHistory_.entries_size(); }
-+  const user_history_predictor::UserHistory_Entry& entries(int index) const { return userHistory_.entries(index); }
-+  user_history_predictor::UserHistory_Entry* add_entries() { return userHistory_.add_entries(); }
-   explicit UserHistoryStorage(const string &filename);
-   ~UserHistoryStorage();
- 
diff --git a/srcpkgs/mozc/patches/reiwa-era.patch b/srcpkgs/mozc/patches/reiwa-era.patch
index ad9eb4444e0c..ab178a09a0b5 100644
--- a/srcpkgs/mozc/patches/reiwa-era.patch
+++ b/srcpkgs/mozc/patches/reiwa-era.patch
@@ -2,12 +2,12 @@ Index: mozc/src/data/dictionary_oss/dictionary08.txt
 ===================================================================
 --- mozc/src/data/dictionary_oss/dictionary08.txt.orig
 +++ mozc/src/data/dictionary_oss/dictionary08.txt
-@@ -8591,6 +8591,8 @@
- れいれいと	12	12	7349	れいれいと
- れいろう	1847	1847	7276	玲瓏
- れいわ	1847	1847	8251	例話
+@@ -6266,6 +6266,8 @@
+ れいれいと	12	12	7288	れいれいと
+ れいろう	1847	1847	7151	玲瓏
+ れいわ	1847	1847	8253	例話
 +れいわ	1895	1895	1690	令和
 +れいわ	1898	1898	4000	令和
- れいんこーと	1847	1847	5568	レインコート
- れいんじゃー	1847	1847	7459	レインジャー
- れいんず	1917	1917	3548	レインズ
+ れいんこーと	1847	1847	5564	レインコート
+ れいんじゃー	1847	1847	7559	レインジャー
+ れいんず	1917	1917	3497	レインズ
diff --git a/srcpkgs/mozc/patches/standard.patch b/srcpkgs/mozc/patches/standard.patch
deleted file mode 100644
index ca002e8b9854..000000000000
--- a/srcpkgs/mozc/patches/standard.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: mozc/src/unix/fcitx5/fcitx5.gyp
-===================================================================
---- mozc/src/unix/fcitx5/fcitx5.gyp.orig
-+++ mozc/src/unix/fcitx5/fcitx5.gyp
-@@ -112,10 +112,10 @@
-         'fcitx5_build_environment',
-       ],
-       'cflags_cc': [
--        '-std=c++14',
-+        '-std=c++17',
-       ],
-       'cflags_cc!': [
-         '-std=gnu++0x'
-       ],
-       'cflags!': [
-         '-fno-exceptions',
diff --git a/srcpkgs/mozc/patches/unsigned-int.patch b/srcpkgs/mozc/patches/unsigned-int.patch
new file mode 100644
index 000000000000..823db9f21993
--- /dev/null
+++ b/srcpkgs/mozc/patches/unsigned-int.patch
@@ -0,0 +1,210 @@
+Index: mozc/src/gui/word_register_dialog/word_register_dialog.cc
+===================================================================
+--- mozc/src/gui/word_register_dialog/word_register_dialog.cc
++++ mozc/src/gui/word_register_dialog/word_register_dialog.cc
+@@ -94,7 +94,7 @@ QString GetEnv(const char *envname) {
+       return QString::fromUtf16(reinterpret_cast<const ushort *>(buffer.get()));
+     } else {
+       // This is a fallback just in case.
+-      return QString::fromUcs4(reinterpret_cast<const uint *>(buffer.get()));
++      return QString::fromUcs4(reinterpret_cast<const unsigned *>(buffer.get()));
+     }
+   }
+   return QLatin1String("");
+Index: mozc/src/unix/fcitx/surrounding_text_util.cc
+===================================================================
+--- mozc/src/unix/fcitx/surrounding_text_util.cc
++++ mozc/src/unix/fcitx/surrounding_text_util.cc
+@@ -41,10 +41,10 @@
+ namespace mozc {
+ namespace fcitx {
+ 
+-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
++bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
+   DCHECK(delta);
+ 
+-  static_assert(sizeof(int64) >= sizeof(uint),
++  static_assert(sizeof(int64) >= sizeof(unsigned),
+                 "int64 must be sufficient to store a guint value.");
+   static_assert(sizeof(int64) == sizeof(llabs(0)),
+                 "|llabs(0)| must returns a 64-bit integer.");
+@@ -113,8 +113,8 @@ bool SearchAnchorPosForward(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+     size_t selected_chars_len,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Move |iter| to cursor pos.
+@@ -137,15 +137,15 @@ bool SearchAnchorPosBackward(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+     size_t selected_chars_len,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+   if (cursor_pos < selected_chars_len) {
+     return false;
+   }
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Skip |iter| to (potential) anchor pos.
+-  const uint skip_count = cursor_pos - selected_chars_len;
++  const unsigned skip_count = cursor_pos - selected_chars_len;
+   DCHECK_LE(skip_count, cursor_pos);
+   if (!Skip(&iter, skip_count)) {
+     return false;
+@@ -164,8 +164,8 @@ bool SearchAnchorPosBackward(
+ bool SurroundingTextUtil::GetAnchorPosFromSelection(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+   DCHECK(anchor_pos);
+ 
+   if (surrounding_text.empty()) {
+@@ -196,8 +196,8 @@ bool GetSurroundingText(FcitxInstance* i
+         return false;
+     }
+ 
+-    uint cursor_pos = 0;
+-    uint anchor_pos = 0;
++    unsigned cursor_pos = 0;
++    unsigned anchor_pos = 0;
+     char* str = NULL;
+ 
+     if (!FcitxInstanceGetSurroundingText(instance, ic, &str, &cursor_pos, &anchor_pos)) {
+@@ -211,7 +211,7 @@ bool GetSurroundingText(FcitxInstance* i
+         const char* primary = NULL;
+ 
+         if ((primary = FcitxClipboardGetPrimarySelection(instance, NULL)) != NULL) {
+-            uint new_anchor_pos = 0;
++            unsigned new_anchor_pos = 0;
+             const std::string primary_text(primary);
+             if (SurroundingTextUtil::GetAnchorPosFromSelection(
+                 surrounding_text, primary_text,
+Index: mozc/src/unix/fcitx/surrounding_text_util.h
+===================================================================
+--- mozc/src/unix/fcitx/surrounding_text_util.h
++++ mozc/src/unix/fcitx/surrounding_text_util.h
+@@ -55,7 +55,7 @@ class SurroundingTextUtil {
+   // Returns true when neither |abs(delta)| nor |-delta| does not cause
+   // integer overflow, that is, |delta| is in a safe range.
+   // Returns false otherwise.
+-  static bool GetSafeDelta(uint from, uint to, int32 *delta);
++  static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
+ 
+   // Returns true if
+   // 1. |surrounding_text| contains |selected_text|
+@@ -71,8 +71,8 @@ class SurroundingTextUtil {
+   static bool GetAnchorPosFromSelection(
+       const std::string &surrounding_text,
+       const std::string &selected_text,
+-      uint cursor_pos,
+-      uint *anchor_pos);
++      unsigned cursor_pos,
++      unsigned *anchor_pos);
+ 
+  private:
+   DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
+Index: mozc/src/unix/fcitx5/surrounding_text_util.cc
+===================================================================
+--- mozc/src/unix/fcitx5/surrounding_text_util.cc
++++ mozc/src/unix/fcitx5/surrounding_text_util.cc
+@@ -43,10 +43,10 @@ namespace fcitx {
+ 
+ using namespace mozc;
+ 
+-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
++bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
+   DCHECK(delta);
+ 
+-  static_assert(sizeof(int64) >= sizeof(uint),
++  static_assert(sizeof(int64) >= sizeof(unsigned),
+                 "int64 must be sufficient to store a guint value.");
+   static_assert(sizeof(int64) == sizeof(llabs(0)),
+                 "|llabs(0)| must returns a 64-bit integer.");
+@@ -110,8 +110,8 @@ bool StartsWith(ConstChar32Iterator *ite
+ // Otherwise returns false.
+ bool SearchAnchorPosForward(const std::string &surrounding_text,
+                             const std::string &selected_text,
+-                            size_t selected_chars_len, uint cursor_pos,
+-                            uint *anchor_pos) {
++                            size_t selected_chars_len, unsigned cursor_pos,
++                            unsigned *anchor_pos) {
+   ConstChar32Iterator iter(surrounding_text);
+   // Move |iter| to cursor pos.
+   if (!Skip(&iter, cursor_pos)) {
+@@ -131,15 +131,15 @@ bool SearchAnchorPosForward(const std::s
+ // Otherwise returns false.
+ bool SearchAnchorPosBackward(const std::string &surrounding_text,
+                              const std::string &selected_text,
+-                             size_t selected_chars_len, uint cursor_pos,
+-                             uint *anchor_pos) {
++                             size_t selected_chars_len, unsigned cursor_pos,
++                             unsigned *anchor_pos) {
+   if (cursor_pos < selected_chars_len) {
+     return false;
+   }
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Skip |iter| to (potential) anchor pos.
+-  const uint skip_count = cursor_pos - selected_chars_len;
++  const unsigned skip_count = cursor_pos - selected_chars_len;
+   DCHECK_LE(skip_count, cursor_pos);
+   if (!Skip(&iter, skip_count)) {
+     return false;
+@@ -157,7 +157,7 @@ bool SearchAnchorPosBackward(const std::
+ 
+ bool SurroundingTextUtil::GetAnchorPosFromSelection(
+     const std::string &surrounding_text, const std::string &selected_text,
+-    uint cursor_pos, uint *anchor_pos) {
++    unsigned cursor_pos, unsigned *anchor_pos) {
+   DCHECK(anchor_pos);
+ 
+   if (surrounding_text.empty()) {
+@@ -187,13 +187,13 @@ bool GetSurroundingText(InputContext *ic
+   }
+ 
+   const auto surrounding_text = ic->surroundingText().text();
+-  uint cursor_pos = ic->surroundingText().cursor();
+-  uint anchor_pos = ic->surroundingText().anchor();
++  unsigned cursor_pos = ic->surroundingText().cursor();
++  unsigned anchor_pos = ic->surroundingText().anchor();
+ 
+   if (cursor_pos == anchor_pos && clipboard) {
+     std::string primary = clipboard->call<IClipboard::primary>(ic);
+     if (!primary.empty()) {
+-      uint new_anchor_pos = 0;
++      unsigned new_anchor_pos = 0;
+       if (SurroundingTextUtil::GetAnchorPosFromSelection(
+               surrounding_text, primary, cursor_pos, &new_anchor_pos)) {
+         anchor_pos = new_anchor_pos;
+Index: mozc/src/unix/fcitx5/surrounding_text_util.h
+===================================================================
+--- mozc/src/unix/fcitx5/surrounding_text_util.h
++++ mozc/src/unix/fcitx5/surrounding_text_util.h
+@@ -56,7 +56,7 @@ class SurroundingTextUtil {
+   // Returns true when neither |abs(delta)| nor |-delta| does not cause
+   // integer overflow, that is, |delta| is in a safe range.
+   // Returns false otherwise.
+-  static bool GetSafeDelta(uint from, uint to, int32 *delta);
++  static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
+ 
+   // Returns true if
+   // 1. |surrounding_text| contains |selected_text|
+@@ -71,7 +71,7 @@ class SurroundingTextUtil {
+   // Otherwise returns false.
+   static bool GetAnchorPosFromSelection(const std::string &surrounding_text,
+                                         const std::string &selected_text,
+-                                        uint cursor_pos, uint *anchor_pos);
++                                        unsigned cursor_pos, unsigned *anchor_pos);
+ 
+  private:
+   DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
diff --git a/srcpkgs/mozc/template b/srcpkgs/mozc/template
index 565310f60bdd..c3d882e9d722 100644
--- a/srcpkgs/mozc/template
+++ b/srcpkgs/mozc/template
@@ -1,11 +1,12 @@
 # Template file for 'mozc'
 pkgname=mozc
-version=2.26.4346.100
+# src/data/version/mozc_version_template.bzl
+version=2.26.4353.100
 revision=1
 create_wrksrc=yes
 build_wrksrc=mozc/src
-hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which
- qt5-qmake qt5-host-tools"
+hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel
+ python3-six which qt5-qmake qt5-host-tools"
 makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel
  fcitx-devel libfcitx5-devel"
 depends="tegaki-zinnia-japanese>=0.3"
@@ -14,18 +15,21 @@ maintainer="Matthias von Faber <mvf@gmx.eu>"
 license="BSD-3-Clause"
 homepage="https://github.com/google/mozc"
 distfiles="
- https://github.com/fcitx/mozc/archive/dad94584ea5012110ad1d204e433964243a1639d.tar.gz
+ https://github.com/fcitx/mozc/archive/d384c3b3e7eed1aa54a6af3363781604fe538d65.tar.gz
+ https://github.com/abseil/abseil-cpp/archive/0f3bb466b868b523cf1dc9b2aaaed65c77b28862.tar.gz
  ${DEBIAN_SITE}/main/g/gyp/gyp_0.1+20200513gitcaa6002.orig.tar.gz
  https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
 "
-checksum="09835994e4fa0f4e4e2ea4e171900c5e37c35680c4db86eb5a89be7bd82c420f
+checksum="69cb26e1f9c03e20715356ef568b583f2baf996df5fd8536aca2ed8e7bd9444f
+ 3d74cdc98b42fd4257d91f652575206de195e2c824fcd8d6e6d227f85cb143ef
  8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
  0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"
 
 CXXFLAGS="-D_GNU_SOURCE"
+patch_args=-Np0
 
 if [ "$CROSS_BUILD" ]; then
-	subpackages="ibus-mozc fcitx-mozc"
+	subpackages="ibus-mozc fcitx-mozc fcitx5-mozc"
 fi
 
 if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
@@ -33,10 +37,13 @@ if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
 fi
 
 post_extract() {
-	ln -s mozc-* mozc
+	mv mozc-* mozc
 
 	# symlink "submodules" into place
-	for _src_dest in gyp japanese-usage-dictionary:japanese_usage_dictionary; do
+	for _src_dest in gyp \
+		abseil-cpp \
+		japanese-usage-dictionary:japanese_usage_dictionary
+	do
 		_src=${_src_dest%:*}
 		_dst=mozc/src/third_party/${_src_dest#*:}
 		rmdir $_dst
@@ -55,11 +62,11 @@ do_configure() {
 	 document_dir=/usr/share/licenses/${pkgname}
 	 use_libprotobuf=1
 	 use_libzinnia=1
-	" python2 build_mozc.py gyp --target_platform=Linux
+	" python3 build_mozc.py gyp --target_platform=Linux
 }
 
 do_build() {
-	python2 build_mozc.py build -c Release \
+	python3 build_mozc.py build -c Release \
 		server/server.gyp:mozc_server \
 		gui/gui.gyp:mozc_tool \
 		unix/emacs/emacs.gyp:mozc_emacs_helper \
@@ -75,10 +82,10 @@ do_install() {
 	vinstall out_linux/Release/mozc_server 755 usr/lib/mozc
 	vinstall out_linux/Release/mozc_tool 755 usr/lib/mozc
 
-	head -n 29 unix/fcitx5/fcitx_key_translator.cc >LICENSE
-	for i in LICENSE data/installer/*.html; do
-		vlicense "$i"
-	done
+	head -n 29 unix/fcitx5/fcitx_key_translator.cc >mozc.LICENSE
+	vlicense mozc.LICENSE
+	vlicense data/installer/credits_en.html
+	vlicense third_party/japanese_usage_dictionary/LICENSE dict.LICENSE
 }
 
 ibus-mozc_package() {
@@ -110,9 +117,6 @@ fcitx-mozc_package() {
 	homepage="https://fcitx-im.org/"
 	pkg_install() {
 		local _file _lang
-		head -n 29 unix/fcitx/fcitx_key_translator.cc \
-			>unix/fcitx/LICENSE
-		vlicense unix/fcitx/LICENSE
 		vinstall out_linux/Release/fcitx-mozc.so 644 usr/lib/fcitx
 		vinstall unix/fcitx/fcitx-mozc.conf 644 usr/share/fcitx/addon
 		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
@@ -132,8 +136,9 @@ fcitx5-mozc_package() {
 	pkg_install() {
 		local _file _lang
 		vinstall out_linux/Release/fcitx5-mozc.so 644 usr/lib/fcitx5
-		vinstall unix/fcitx5/mozc-addon.conf 644 usr/share/fcitx/addon
-		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		vinstall unix/fcitx5/mozc-addon.conf 644 \
+			usr/share/fcitx5/addon mozc.conf
+		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx5/inputmethod
 		for _file in out_linux/Release/gen/unix/fcitx5/po/*.mo
 		do
 			_lang=${_file##*/}

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
  2021-04-27  1:26 ` [PR PATCH] [Updated] " sgn
@ 2021-04-30  7:56 ` sgn
  2021-04-30  7:57 ` mozc: update to 2.26.4353.100. " sgn
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-04-30  7:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fcitx5-mozc
https://github.com/void-linux/void-packages/pull/30492

[WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc)
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30492.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fcitx5-mozc-30492.patch --]
[-- Type: text/x-diff, Size: 42706 bytes --]

From a7b56ec44332b7e42f2a6d328f78963b477e9c1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 25 Apr 2021 22:53:14 +0700
Subject: [PATCH] mozc: update to 2.26.4353.100.

---
 srcpkgs/fcitx5-mozc                           |   1 +
 srcpkgs/mozc/patches/abseil.patch             |  93 +++++
 srcpkgs/mozc/patches/cross.patch              |  10 +-
 srcpkgs/mozc/patches/cxx-stdlib.patch         |  29 ++
 .../default_hiragana_from_environment.patch   |  20 --
 srcpkgs/mozc/patches/fcitx.patch              |  13 +
 srcpkgs/mozc/patches/no-parallel.patch        |   6 +-
 srcpkgs/mozc/patches/protobuf-370.patch       | 327 ------------------
 srcpkgs/mozc/patches/reiwa-era.patch          |  13 +
 srcpkgs/mozc/patches/unsigned-int.patch       | 210 +++++++++++
 srcpkgs/mozc/template                         | 109 ++++--
 srcpkgs/mozc/update                           |   2 +
 12 files changed, 442 insertions(+), 391 deletions(-)
 create mode 120000 srcpkgs/fcitx5-mozc
 create mode 100644 srcpkgs/mozc/patches/abseil.patch
 create mode 100644 srcpkgs/mozc/patches/cxx-stdlib.patch
 delete mode 100644 srcpkgs/mozc/patches/default_hiragana_from_environment.patch
 create mode 100644 srcpkgs/mozc/patches/fcitx.patch
 delete mode 100644 srcpkgs/mozc/patches/protobuf-370.patch
 create mode 100644 srcpkgs/mozc/patches/reiwa-era.patch
 create mode 100644 srcpkgs/mozc/patches/unsigned-int.patch
 create mode 100644 srcpkgs/mozc/update

diff --git a/srcpkgs/fcitx5-mozc b/srcpkgs/fcitx5-mozc
new file mode 120000
index 000000000000..6874ca426b5f
--- /dev/null
+++ b/srcpkgs/fcitx5-mozc
@@ -0,0 +1 @@
+mozc
\ No newline at end of file
diff --git a/srcpkgs/mozc/patches/abseil.patch b/srcpkgs/mozc/patches/abseil.patch
new file mode 100644
index 000000000000..888762d55529
--- /dev/null
+++ b/srcpkgs/mozc/patches/abseil.patch
@@ -0,0 +1,93 @@
+
+Ported from grpc's patches
+
+An all-in-one patch that fixes several issues:
+
+1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
+2) powerpc stacktrace implementation only works on glibc (disabled on musl)
+3) powerpc stacktrace implementation has ppc64 assumptions (fixed)
+4) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
+
+--- mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
++++ mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
+@@ -20,7 +20,7 @@
+ #include <intrin.h>
+ #endif
+ 
+-#if defined(__powerpc__) || defined(__ppc__)
++#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
+ #ifdef __GLIBC__
+ #include <sys/platform/ppc.h>
+ #elif defined(__FreeBSD__)
+@@ -59,7 +59,7 @@
+   return base_internal::NominalCPUFrequency();
+ }
+ 
+-#elif defined(__powerpc__) || defined(__ppc__)
++#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
+ 
+ int64_t UnscaledCycleClock::Now() {
+ #ifdef __GLIBC__
+--- mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
++++ mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
+@@ -46,7 +46,7 @@
+ 
+ // The following platforms have an implementation of a hardware counter.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
+-  defined(__powerpc__) || defined(__ppc__) || \
++  ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
+   defined(_M_IX86) || defined(_M_X64)
+ #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
+ #else
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
+@@ -27,6 +27,10 @@
+ #include <csignal>
+ #include <cstdio>
+ 
++#if defined(__powerpc__)
++#include <asm/ptrace.h>
++#endif
++
+ #include "absl/base/attributes.h"
+ #include "absl/base/internal/raw_logging.h"
+ #include "absl/base/macros.h"
+@@ -55,8 +59,10 @@
+     return reinterpret_cast<void*>(context->uc_mcontext.pc);
+ #elif defined(__powerpc64__)
+     return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
+-#elif defined(__powerpc__)
++#elif defined(__powerpc__) && defined(__GLIBC__)
+     return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
++#elif defined(__powerpc__)
++    return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->nip);
+ #elif defined(__riscv)
+     return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
+ #elif defined(__s390__) && !defined(__s390x__)
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
+@@ -64,7 +64,7 @@
+ #elif defined(__i386__) || defined(__x86_64__)
+ #define ABSL_STACKTRACE_INL_HEADER \
+   "absl/debugging/internal/stacktrace_x86-inl.inc"
+-#elif defined(__ppc__) || defined(__PPC__)
++#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
+ #define ABSL_STACKTRACE_INL_HEADER \
+   "absl/debugging/internal/stacktrace_powerpc-inl.inc"
+ #elif defined(__aarch64__)
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc
+@@ -130,8 +130,13 @@
+         StacktracePowerPCGetLR(new_sp) == kernel_sigtramp_rt64_address) {
+       const ucontext_t* signal_context =
+           reinterpret_cast<const ucontext_t*>(uc);
++#if defined(__powerpc64__)
+       void **const sp_before_signal =
+           reinterpret_cast<void**>(signal_context->uc_mcontext.gp_regs[PT_R1]);
++#else
++      void **const sp_before_signal =
++          reinterpret_cast<void**>(signal_context->uc_mcontext.uc_regs->gregs[PT_R1]);
++#endif
+       // Check that alleged sp before signal is nonnull and is reasonably
+       // aligned.
+       if (sp_before_signal != nullptr &&
diff --git a/srcpkgs/mozc/patches/cross.patch b/srcpkgs/mozc/patches/cross.patch
index 17d47a900eb9..d73c5f82b430 100644
--- a/srcpkgs/mozc/patches/cross.patch
+++ b/srcpkgs/mozc/patches/cross.patch
@@ -1,7 +1,9 @@
---- mozc/src/gyp/common.gypi
+Index: mozc/src/gyp/common.gypi
+===================================================================
+--- mozc/src/gyp/common.gypi.orig
 +++ mozc/src/gyp/common.gypi
-@@ -444,12 +444,12 @@
-     }],
+@@ -409,12 +409,12 @@
+   'conditions': [
      ['target_platform=="Linux"', {
        'make_global_settings': [
 -        ['AR', '<!(which ar)'],
@@ -19,7 +21,7 @@
        ],
      }],
      ['target_platform=="Android"', {
-@@ -494,12 +494,12 @@
+@@ -459,12 +459,12 @@
          ['LD', '<(ndk_bin_dir)/<(toolchain_prefix)-ld'],
          ['NM', '<(ndk_bin_dir)/<(toolchain_prefix)-nm'],
          ['READELF', '<(ndk_bin_dir)/<(toolchain_prefix)-readelf'],
diff --git a/srcpkgs/mozc/patches/cxx-stdlib.patch b/srcpkgs/mozc/patches/cxx-stdlib.patch
new file mode 100644
index 000000000000..0bccaf8ddc4f
--- /dev/null
+++ b/srcpkgs/mozc/patches/cxx-stdlib.patch
@@ -0,0 +1,29 @@
+Index: mozc/src/gyp/common.gypi
+===================================================================
+--- mozc/src/gyp/common.gypi
++++ mozc/src/gyp/common.gypi
+@@ -105,7 +105,7 @@
+     ],
+     # Libraries for GNU/Linux environment.
+     'linux_ldflags': [
+-      '-lc++',
++      '-lstdc++',
+       '-pthread',
+     ],
+ 
+@@ -205,7 +205,6 @@
+               '-Wtype-limits',
+             ],
+             'cflags_cc': [
+-              '-stdlib=libc++',
+               '-Wno-covered-switch-default',
+               '-Wno-unnamed-type-template-args',
+               '-Wno-c++11-narrowing',
+@@ -225,7 +224,6 @@
+               '-Wtype-limits',
+             ],
+             'cflags_cc': [
+-              '-stdlib=libc++',
+               '-Wno-covered-switch-default',
+               '-Wno-unnamed-type-template-args',
+               '-Wno-c++11-narrowing',
diff --git a/srcpkgs/mozc/patches/default_hiragana_from_environment.patch b/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
deleted file mode 100644
index d733635ac5a1..000000000000
--- a/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- mozc/src/unix/ibus/property_handler.cc
-+++ mozc/src/unix/ibus/property_handler.cc
-@@ -40,6 +40,8 @@
- #include "unix/ibus/mozc_engine_property.h"
- #include "unix/ibus/path_util.h"
- 
-+#include <cstdlib>
-+
- // On Gnome Shell with IBus 1.5, new property named "symbol" is used to
- // represent the mode indicator on the system panel. Note that "symbol" does
- // not exist in IBus 1.4.x.
-@@ -80,7 +82,7 @@ bool GetDisabled(IBusEngine *engine) {
- // On IBus 1.4.x, IBus expects that an IME should always be turned on and
- // IME on/off keys are handled by IBus itself rather than each IME.
- #if IBUS_CHECK_VERSION(1, 5, 0)
--const bool kActivatedOnLaunch = false;
-+const bool kActivatedOnLaunch = !!::std::getenv("IBUS_MOZC_DEFAULT_HIRAGANA");
- #else
- const bool kActivatedOnLaunch = true;
- #endif  // IBus>=1.5.0
diff --git a/srcpkgs/mozc/patches/fcitx.patch b/srcpkgs/mozc/patches/fcitx.patch
new file mode 100644
index 000000000000..1ed6d01516f5
--- /dev/null
+++ b/srcpkgs/mozc/patches/fcitx.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/unix/fcitx/fcitx.gyp
+===================================================================
+--- mozc/src/unix/fcitx/fcitx.gyp.orig
++++ mozc/src/unix/fcitx/fcitx.gyp
+@@ -96,7 +96,7 @@
+         '<@(fcitx_dep_include_dirs)',
+       ],
+       'defines': [
+-        'LOCALEDIR="<!@(fcitx4-config --prefix)/share/locale/"',
++        'LOCALEDIR="/usr/share/locale/"',
+       ],
+     },
+   ],
diff --git a/srcpkgs/mozc/patches/no-parallel.patch b/srcpkgs/mozc/patches/no-parallel.patch
index 14b23367f09e..5952cbc6a040 100644
--- a/srcpkgs/mozc/patches/no-parallel.patch
+++ b/srcpkgs/mozc/patches/no-parallel.patch
@@ -1,6 +1,8 @@
---- mozc/src/build_mozc.py
+Index: mozc/src/build_mozc.py
+===================================================================
+--- mozc/src/build_mozc.py.orig
 +++ mozc/src/build_mozc.py
-@@ -728,6 +728,7 @@ def GypMain(options, unused_args):
+@@ -496,6 +496,7 @@ def GypMain(options, unused_args):
    gyp_options.extend(['--generator-output=.'])
    short_basename = GetBuildShortBaseName(target_platform)
    gyp_options.extend(['-G', 'output_dir=%s' % short_basename])
diff --git a/srcpkgs/mozc/patches/protobuf-370.patch b/srcpkgs/mozc/patches/protobuf-370.patch
deleted file mode 100644
index 59d4e0bb995d..000000000000
--- a/srcpkgs/mozc/patches/protobuf-370.patch
+++ /dev/null
@@ -1,327 +0,0 @@
---- mozc/src/dictionary/user_dictionary.cc
-+++ mozc/src/dictionary/user_dictionary.cc
-@@ -289,7 +289,7 @@ class UserDictionary::UserDictionaryReloader : public Thread {
-     }
- 
-     auto_register_mode_ = false;
--    dic_->Load(*(storage.get()));
-+    dic_->Load(*(storage->storage()));
-   }
- 
-  private:
---- mozc/src/dictionary/user_dictionary_session.cc
-+++ mozc/src/dictionary/user_dictionary_session.cc
-@@ -144,7 +144,7 @@ class UndoRenameDictionaryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -169,7 +169,7 @@ class UndoAddEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL || dictionary->entries_size() == 0) {
-       return false;
-     }
-@@ -195,7 +195,7 @@ class UndoEditEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL ||
-         index_ < 0 || dictionary->entries_size() <= index_) {
-       return false;
-@@ -240,7 +240,7 @@ class UndoDeleteEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -306,7 +306,7 @@ class UndoImportFromStringCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -345,7 +345,7 @@ UserDictionarySession::~UserDictionarySession() {
- 
- // TODO(hidehiko) move this to header.
- const UserDictionaryStorage &UserDictionarySession::storage() const {
--  return *storage_;
-+  return *storage_->storage();
- }
- mozc::UserDictionaryStorage *UserDictionarySession::mutable_storage() {
-   return storage_.get();
-@@ -464,7 +464,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::CreateDictionary(
-     const string &dictionary_name, uint64 *new_dictionary_id) {
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), dictionary_name, new_dictionary_id);
-+          storage_->storage(), dictionary_name, new_dictionary_id);
-   if (status == UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-     AddUndoCommand(new UndoCreateDictionaryCommand);
-   }
-@@ -488,7 +488,7 @@ UserDictionarySession::DeleteDictionaryInternal(
-   int original_index;
-   UserDictionary *deleted_dictionary;
-   if (!UserDictionaryUtil::DeleteDictionary(
--          storage_.get(), dictionary_id,
-+          storage_->storage(), dictionary_id,
-           &original_index, &deleted_dictionary)) {
-     // Failed to delete the dictionary.
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-@@ -510,7 +510,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::RenameDictionary(
-     uint64 dictionary_id, const string &dictionary_name) {
-   string original_name;
-   const UserDictionary *dictionary =
--      UserDictionaryUtil::GetUserDictionaryById(*storage_, dictionary_id);
-+      UserDictionaryUtil::GetUserDictionaryById(*storage_->storage(), dictionary_id);
-   if (dictionary != NULL) {
-     // Note that if dictionary is null, it means the dictionary_id is invalid
-     // so following RenameDictionary will fail, and error handling is done
-@@ -547,7 +547,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::AddEntry(
-     uint64 dictionary_id, const UserDictionary::Entry &entry) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -575,7 +575,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::EditEntry(
-     uint64 dictionary_id, int index, const UserDictionary::Entry &entry) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -604,7 +604,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::DeleteEntry(
-     uint64 dictionary_id, const std::vector<int> &index_list) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -644,7 +644,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::ImportFromString(
-     uint64 dictionary_id, const string &data) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -699,7 +699,7 @@ UserDictionarySession::ImportToNewDictionaryFromString(
-     uint64 *new_dictionary_id) {
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), dictionary_name, new_dictionary_id);
-+          storage_->storage(), dictionary_name, new_dictionary_id);
-   if (status != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-     return status;
-   }
-@@ -709,7 +709,7 @@ UserDictionarySession::ImportToNewDictionaryFromString(
- 
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), *new_dictionary_id);
-+          storage_->storage(), *new_dictionary_id);
-   if (dictionary == NULL) {
-     // The dictionary should be always found.
-     return UserDictionaryCommandStatus::UNKNOWN_ERROR;
-@@ -728,7 +728,7 @@ bool UserDictionarySession::EnsureNonEmptyStorage() {
-   uint64 new_dictionary_id;
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), default_dictionary_name_, &new_dictionary_id);
-+          storage_->storage(), default_dictionary_name_, &new_dictionary_id);
-   CHECK_EQ(
-       status, UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS);
-   return true;
---- mozc/src/dictionary/user_dictionary_storage.cc
-+++ mozc/src/dictionary/user_dictionary_storage.cc
-@@ -109,7 +109,7 @@ bool UserDictionaryStorage::LoadInternal() {
-   mozc::protobuf::io::IstreamInputStream zero_copy_input(&ifs);
-   mozc::protobuf::io::CodedInputStream decoder(&zero_copy_input);
-   decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1);
--  if (!ParseFromCodedStream(&decoder)) {
-+  if (!storage_.ParseFromCodedStream(&decoder)) {
-     LOG(ERROR) << "Failed to parse";
-     if (!decoder.ConsumedEntireMessage() || !ifs.eof()) {
-       LOG(ERROR) << "ParseFromStream failed: file seems broken";
-@@ -141,7 +141,7 @@ bool UserDictionaryStorage::Load() {
-     const UserDictionary &dict = dictionaries(i);
-     if (dict.id() == 0) {
-       mutable_dictionaries(i)->set_id(
--          UserDictionaryUtil::CreateNewDictionaryId(*this));
-+          UserDictionaryUtil::CreateNewDictionaryId(storage_));
-     }
-   }
- 
-@@ -171,7 +171,7 @@ bool UserDictionaryStorage::Save() {
-       return false;
-     }
- 
--    if (!SerializeToOstream(&ofs)) {
-+    if (!storage_.SerializeToOstream(&ofs)) {
-       LOG(ERROR) << "SerializeToString failed";
-       last_error_type_ = SYNC_FAILURE;
-       return false;
-@@ -241,7 +241,7 @@ bool UserDictionaryStorage::ExportDictionary(
- bool UserDictionaryStorage::CreateDictionary(
-     const string &dic_name, uint64 *new_dic_id) {
-   UserDictionaryCommandStatus::Status status =
--      UserDictionaryUtil::CreateDictionary(this, dic_name, new_dic_id);
-+      UserDictionaryUtil::CreateDictionary(&storage_, dic_name, new_dic_id);
-   // Update last_error_type_
-   switch (status) {
-     case UserDictionaryCommandStatus::DICTIONARY_NAME_EMPTY:
-@@ -273,7 +273,7 @@ bool UserDictionaryStorage::CreateDictionary(
- }
- 
- bool UserDictionaryStorage::DeleteDictionary(uint64 dic_id) {
--  if (!UserDictionaryUtil::DeleteDictionary(this, dic_id, NULL, NULL)) {
-+  if (!UserDictionaryUtil::DeleteDictionary(&storage_, dic_id, NULL, NULL)) {
-     // Failed to delete dictionary.
-     last_error_type_ = INVALID_DICTIONARY_ID;
-     return false;
-@@ -318,7 +318,7 @@ bool UserDictionaryStorage::RenameDictionary(uint64 dic_id,
- }
- 
- int UserDictionaryStorage::GetUserDictionaryIndex(uint64 dic_id) const {
--  return UserDictionaryUtil::GetUserDictionaryIndexById(*this, dic_id);
-+  return UserDictionaryUtil::GetUserDictionaryIndexById(storage_, dic_id);
- }
- 
- bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name,
-@@ -335,7 +335,7 @@ bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name,
- 
- user_dictionary::UserDictionary *UserDictionaryStorage::GetUserDictionary(
-     uint64 dic_id) {
--  return UserDictionaryUtil::GetMutableUserDictionaryById(this, dic_id);
-+  return UserDictionaryUtil::GetMutableUserDictionaryById(&storage_, dic_id);
- }
- 
- UserDictionaryStorage::UserDictionaryStorageErrorType
-@@ -361,14 +361,14 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary(
- 
-   UserDictionary *dic = NULL;
-   if (auto_index == -1) {
--    if (UserDictionaryUtil::IsStorageFull(*this)) {
-+    if (UserDictionaryUtil::IsStorageFull(storage_)) {
-       last_error_type_ = TOO_MANY_DICTIONARIES;
-       LOG(ERROR) << "too many dictionaries";
-       UnLock();
-       return false;
-     }
-     dic = add_dictionaries();
--    dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(*this));
-+    dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(storage_));
-     dic->set_name(kAutoRegisteredDictionaryName);
-   } else {
-     dic = mutable_dictionaries(auto_index);
-@@ -410,7 +410,7 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary(
- }
- 
- bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
--  if (CountSyncableDictionaries(*this) == 0) {
-+  if (CountSyncableDictionaries(storage_) == 0) {
-     return false;
-   }
- 
-@@ -445,7 +445,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
-           kDictionaryNameConvertedFromSyncableDictionary;
-       int index = 0;
-       while (UserDictionaryUtil::ValidateDictionaryName(
--                 *this, new_dictionary_name)
-+                 storage_, new_dictionary_name)
-              != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-         ++index;
-         new_dictionary_name = Util::StringPrintf(
-@@ -456,7 +456,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
-     dic->set_syncable(false);
-   }
- 
--  DCHECK_EQ(0, CountSyncableDictionaries(*this));
-+  DCHECK_EQ(0, CountSyncableDictionaries(storage_));
- 
-   return true;
- }
---- mozc/src/dictionary/user_dictionary_storage.h
-+++ mozc/src/dictionary/user_dictionary_storage.h
-@@ -74,8 +74,20 @@ class ProcessMutex;
- 
- // Inherit from ProtocolBuffer
- // TODO(hidehiko): Get rid of this implementation.
--class UserDictionaryStorage : public user_dictionary::UserDictionaryStorage {
-+class UserDictionaryStorage {
-+ private:
-+  user_dictionary::UserDictionaryStorage storage_;
-  public:
-+  static const user_dictionary::UserDictionaryStorage& default_instance() { return user_dictionary::UserDictionaryStorage::default_instance(); }
-+  user_dictionary::UserDictionaryStorage *storage() { return &storage_; }
-+  int dictionaries_size() const { return storage_.dictionaries_size(); }
-+  void clear_dictionaries() { storage_.clear_dictionaries(); }
-+  user_dictionary::UserDictionary* mutable_dictionaries(int index) { return storage_.mutable_dictionaries(index); }
-+  ::google::protobuf::RepeatedPtrField<user_dictionary::UserDictionary >* mutable_dictionaries() { return storage_.mutable_dictionaries(); }
-+  const ::google::protobuf::RepeatedPtrField<user_dictionary::UserDictionary >& dictionaries() const { return storage_.dictionaries(); }
-+  const user_dictionary::UserDictionary& dictionaries(int index) const { return storage_.dictionaries(index); }
-+  user_dictionary::UserDictionary* add_dictionaries() { return storage_.add_dictionaries(); }
-+
-   typedef user_dictionary::UserDictionary UserDictionary;
-   typedef user_dictionary::UserDictionary::Entry UserDictionaryEntry;
- 
---- mozc/src/prediction/user_history_predictor.cc
-+++ mozc/src/prediction/user_history_predictor.cc
-@@ -291,7 +291,7 @@ bool UserHistoryStorage::Load() {
-     return false;
-   }
- 
--  if (!ParseFromString(input)) {
-+  if (!userHistory_.ParseFromString(input)) {
-     LOG(ERROR) << "ParseFromString failed. message looks broken";
-     return false;
-   }
-@@ -307,7 +307,7 @@ bool UserHistoryStorage::Save() const {
-   }
- 
-   string output;
--  if (!AppendToString(&output)) {
-+  if (!userHistory_.AppendToString(&output)) {
-     LOG(ERROR) << "AppendToString failed";
-     return false;
-   }
---- mozc/src/prediction/user_history_predictor.h
-+++ mozc/src/prediction/user_history_predictor.h
-@@ -61,8 +61,13 @@ class Segments;
- class UserHistoryPredictorSyncer;
- 
- // Added serialization method for UserHistory.
--class UserHistoryStorage : public mozc::user_history_predictor::UserHistory {
-+class UserHistoryStorage {
-+ private:
-+  user_history_predictor::UserHistory userHistory_;
-  public:
-+  int entries_size() const { return userHistory_.entries_size(); }
-+  const user_history_predictor::UserHistory_Entry& entries(int index) const { return userHistory_.entries(index); }
-+  user_history_predictor::UserHistory_Entry* add_entries() { return userHistory_.add_entries(); }
-   explicit UserHistoryStorage(const string &filename);
-   ~UserHistoryStorage();
- 
diff --git a/srcpkgs/mozc/patches/reiwa-era.patch b/srcpkgs/mozc/patches/reiwa-era.patch
new file mode 100644
index 000000000000..ab178a09a0b5
--- /dev/null
+++ b/srcpkgs/mozc/patches/reiwa-era.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/data/dictionary_oss/dictionary08.txt
+===================================================================
+--- mozc/src/data/dictionary_oss/dictionary08.txt.orig
++++ mozc/src/data/dictionary_oss/dictionary08.txt
+@@ -6266,6 +6266,8 @@
+ れいれいと	12	12	7288	れいれいと
+ れいろう	1847	1847	7151	玲瓏
+ れいわ	1847	1847	8253	例話
++れいわ	1895	1895	1690	令和
++れいわ	1898	1898	4000	令和
+ れいんこーと	1847	1847	5564	レインコート
+ れいんじゃー	1847	1847	7559	レインジャー
+ れいんず	1917	1917	3497	レインズ
diff --git a/srcpkgs/mozc/patches/unsigned-int.patch b/srcpkgs/mozc/patches/unsigned-int.patch
new file mode 100644
index 000000000000..823db9f21993
--- /dev/null
+++ b/srcpkgs/mozc/patches/unsigned-int.patch
@@ -0,0 +1,210 @@
+Index: mozc/src/gui/word_register_dialog/word_register_dialog.cc
+===================================================================
+--- mozc/src/gui/word_register_dialog/word_register_dialog.cc
++++ mozc/src/gui/word_register_dialog/word_register_dialog.cc
+@@ -94,7 +94,7 @@ QString GetEnv(const char *envname) {
+       return QString::fromUtf16(reinterpret_cast<const ushort *>(buffer.get()));
+     } else {
+       // This is a fallback just in case.
+-      return QString::fromUcs4(reinterpret_cast<const uint *>(buffer.get()));
++      return QString::fromUcs4(reinterpret_cast<const unsigned *>(buffer.get()));
+     }
+   }
+   return QLatin1String("");
+Index: mozc/src/unix/fcitx/surrounding_text_util.cc
+===================================================================
+--- mozc/src/unix/fcitx/surrounding_text_util.cc
++++ mozc/src/unix/fcitx/surrounding_text_util.cc
+@@ -41,10 +41,10 @@
+ namespace mozc {
+ namespace fcitx {
+ 
+-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
++bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
+   DCHECK(delta);
+ 
+-  static_assert(sizeof(int64) >= sizeof(uint),
++  static_assert(sizeof(int64) >= sizeof(unsigned),
+                 "int64 must be sufficient to store a guint value.");
+   static_assert(sizeof(int64) == sizeof(llabs(0)),
+                 "|llabs(0)| must returns a 64-bit integer.");
+@@ -113,8 +113,8 @@ bool SearchAnchorPosForward(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+     size_t selected_chars_len,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Move |iter| to cursor pos.
+@@ -137,15 +137,15 @@ bool SearchAnchorPosBackward(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+     size_t selected_chars_len,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+   if (cursor_pos < selected_chars_len) {
+     return false;
+   }
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Skip |iter| to (potential) anchor pos.
+-  const uint skip_count = cursor_pos - selected_chars_len;
++  const unsigned skip_count = cursor_pos - selected_chars_len;
+   DCHECK_LE(skip_count, cursor_pos);
+   if (!Skip(&iter, skip_count)) {
+     return false;
+@@ -164,8 +164,8 @@ bool SearchAnchorPosBackward(
+ bool SurroundingTextUtil::GetAnchorPosFromSelection(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+   DCHECK(anchor_pos);
+ 
+   if (surrounding_text.empty()) {
+@@ -196,8 +196,8 @@ bool GetSurroundingText(FcitxInstance* i
+         return false;
+     }
+ 
+-    uint cursor_pos = 0;
+-    uint anchor_pos = 0;
++    unsigned cursor_pos = 0;
++    unsigned anchor_pos = 0;
+     char* str = NULL;
+ 
+     if (!FcitxInstanceGetSurroundingText(instance, ic, &str, &cursor_pos, &anchor_pos)) {
+@@ -211,7 +211,7 @@ bool GetSurroundingText(FcitxInstance* i
+         const char* primary = NULL;
+ 
+         if ((primary = FcitxClipboardGetPrimarySelection(instance, NULL)) != NULL) {
+-            uint new_anchor_pos = 0;
++            unsigned new_anchor_pos = 0;
+             const std::string primary_text(primary);
+             if (SurroundingTextUtil::GetAnchorPosFromSelection(
+                 surrounding_text, primary_text,
+Index: mozc/src/unix/fcitx/surrounding_text_util.h
+===================================================================
+--- mozc/src/unix/fcitx/surrounding_text_util.h
++++ mozc/src/unix/fcitx/surrounding_text_util.h
+@@ -55,7 +55,7 @@ class SurroundingTextUtil {
+   // Returns true when neither |abs(delta)| nor |-delta| does not cause
+   // integer overflow, that is, |delta| is in a safe range.
+   // Returns false otherwise.
+-  static bool GetSafeDelta(uint from, uint to, int32 *delta);
++  static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
+ 
+   // Returns true if
+   // 1. |surrounding_text| contains |selected_text|
+@@ -71,8 +71,8 @@ class SurroundingTextUtil {
+   static bool GetAnchorPosFromSelection(
+       const std::string &surrounding_text,
+       const std::string &selected_text,
+-      uint cursor_pos,
+-      uint *anchor_pos);
++      unsigned cursor_pos,
++      unsigned *anchor_pos);
+ 
+  private:
+   DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
+Index: mozc/src/unix/fcitx5/surrounding_text_util.cc
+===================================================================
+--- mozc/src/unix/fcitx5/surrounding_text_util.cc
++++ mozc/src/unix/fcitx5/surrounding_text_util.cc
+@@ -43,10 +43,10 @@ namespace fcitx {
+ 
+ using namespace mozc;
+ 
+-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
++bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
+   DCHECK(delta);
+ 
+-  static_assert(sizeof(int64) >= sizeof(uint),
++  static_assert(sizeof(int64) >= sizeof(unsigned),
+                 "int64 must be sufficient to store a guint value.");
+   static_assert(sizeof(int64) == sizeof(llabs(0)),
+                 "|llabs(0)| must returns a 64-bit integer.");
+@@ -110,8 +110,8 @@ bool StartsWith(ConstChar32Iterator *ite
+ // Otherwise returns false.
+ bool SearchAnchorPosForward(const std::string &surrounding_text,
+                             const std::string &selected_text,
+-                            size_t selected_chars_len, uint cursor_pos,
+-                            uint *anchor_pos) {
++                            size_t selected_chars_len, unsigned cursor_pos,
++                            unsigned *anchor_pos) {
+   ConstChar32Iterator iter(surrounding_text);
+   // Move |iter| to cursor pos.
+   if (!Skip(&iter, cursor_pos)) {
+@@ -131,15 +131,15 @@ bool SearchAnchorPosForward(const std::s
+ // Otherwise returns false.
+ bool SearchAnchorPosBackward(const std::string &surrounding_text,
+                              const std::string &selected_text,
+-                             size_t selected_chars_len, uint cursor_pos,
+-                             uint *anchor_pos) {
++                             size_t selected_chars_len, unsigned cursor_pos,
++                             unsigned *anchor_pos) {
+   if (cursor_pos < selected_chars_len) {
+     return false;
+   }
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Skip |iter| to (potential) anchor pos.
+-  const uint skip_count = cursor_pos - selected_chars_len;
++  const unsigned skip_count = cursor_pos - selected_chars_len;
+   DCHECK_LE(skip_count, cursor_pos);
+   if (!Skip(&iter, skip_count)) {
+     return false;
+@@ -157,7 +157,7 @@ bool SearchAnchorPosBackward(const std::
+ 
+ bool SurroundingTextUtil::GetAnchorPosFromSelection(
+     const std::string &surrounding_text, const std::string &selected_text,
+-    uint cursor_pos, uint *anchor_pos) {
++    unsigned cursor_pos, unsigned *anchor_pos) {
+   DCHECK(anchor_pos);
+ 
+   if (surrounding_text.empty()) {
+@@ -187,13 +187,13 @@ bool GetSurroundingText(InputContext *ic
+   }
+ 
+   const auto surrounding_text = ic->surroundingText().text();
+-  uint cursor_pos = ic->surroundingText().cursor();
+-  uint anchor_pos = ic->surroundingText().anchor();
++  unsigned cursor_pos = ic->surroundingText().cursor();
++  unsigned anchor_pos = ic->surroundingText().anchor();
+ 
+   if (cursor_pos == anchor_pos && clipboard) {
+     std::string primary = clipboard->call<IClipboard::primary>(ic);
+     if (!primary.empty()) {
+-      uint new_anchor_pos = 0;
++      unsigned new_anchor_pos = 0;
+       if (SurroundingTextUtil::GetAnchorPosFromSelection(
+               surrounding_text, primary, cursor_pos, &new_anchor_pos)) {
+         anchor_pos = new_anchor_pos;
+Index: mozc/src/unix/fcitx5/surrounding_text_util.h
+===================================================================
+--- mozc/src/unix/fcitx5/surrounding_text_util.h
++++ mozc/src/unix/fcitx5/surrounding_text_util.h
+@@ -56,7 +56,7 @@ class SurroundingTextUtil {
+   // Returns true when neither |abs(delta)| nor |-delta| does not cause
+   // integer overflow, that is, |delta| is in a safe range.
+   // Returns false otherwise.
+-  static bool GetSafeDelta(uint from, uint to, int32 *delta);
++  static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
+ 
+   // Returns true if
+   // 1. |surrounding_text| contains |selected_text|
+@@ -71,7 +71,7 @@ class SurroundingTextUtil {
+   // Otherwise returns false.
+   static bool GetAnchorPosFromSelection(const std::string &surrounding_text,
+                                         const std::string &selected_text,
+-                                        uint cursor_pos, uint *anchor_pos);
++                                        unsigned cursor_pos, unsigned *anchor_pos);
+ 
+  private:
+   DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
diff --git a/srcpkgs/mozc/template b/srcpkgs/mozc/template
index 71d32eb5b9cd..1a78d407f471 100644
--- a/srcpkgs/mozc/template
+++ b/srcpkgs/mozc/template
@@ -1,33 +1,36 @@
 # Template file for 'mozc'
 pkgname=mozc
-version=2.23.2815.102
-revision=10
+# src/data/version/mozc_version_template.bzl
+version=2.26.4353.100
+revision=1
 create_wrksrc=yes
 build_wrksrc=mozc/src
-hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which"
+hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel
+ python3-six which qt5-qmake qt5-host-tools"
 makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel
- fcitx-devel"
+ fcitx-devel libfcitx5-devel"
 depends="tegaki-zinnia-japanese>=0.3"
 short_desc="Japanese IME (Open Source version of Google Japanese Input)"
 maintainer="Matthias von Faber <mvf@gmx.eu>"
 license="BSD-3-Clause"
 homepage="https://github.com/google/mozc"
 distfiles="
- https://gitlab.com/fcitx/mozc/repository/dad94584ea5012110ad1d204e433964243a1639d/archive.tar.bz2>${pkgname}-${version}.tar.bz2
- https://github.com/bnoordhuis/gyp/archive/c6f471687407bf28ddfc63f1a8f47aeb7bf54edc.tar.gz
+ https://github.com/fcitx/mozc/archive/d384c3b3e7eed1aa54a6af3363781604fe538d65.tar.gz
+ https://github.com/abseil/abseil-cpp/archive/0f3bb466b868b523cf1dc9b2aaaed65c77b28862.tar.gz
+ ${DEBIAN_SITE}/main/g/gyp/gyp_0.1+20200513gitcaa6002.orig.tar.gz
  https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
 "
-checksum="
- e38457e63a7fa8d62d87b4f8b3e89fe5f6939d92e3c4fd287a93358375693892
- 882f074cbb3a4f2bba550fb615e63949c0fbf39eeb1718a0330b4a545ab97616
- 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1
-"
+checksum="69cb26e1f9c03e20715356ef568b583f2baf996df5fd8536aca2ed8e7bd9444f
+ 3d74cdc98b42fd4257d91f652575206de195e2c824fcd8d6e6d227f85cb143ef
+ 8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
+ 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"
 
 CXXFLAGS="-D_GNU_SOURCE"
+patch_args=-Np0
+lib32disabled=yes
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-devel"
-	subpackages="ibus-mozc fcitx-mozc"
+	subpackages="ibus-mozc fcitx-mozc fcitx5-mozc"
 fi
 
 if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
@@ -35,45 +38,43 @@ if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
 fi
 
 post_extract() {
-	ln -s mozc-* mozc
-	rm -rf mozc/src/unix/fcitx5
+	mv mozc-* mozc
 
 	# symlink "submodules" into place
-	for _src_dest in gyp japanese-usage-dictionary:japanese_usage_dictionary; do
+	for _src_dest in gyp \
+		abseil-cpp \
+		japanese-usage-dictionary:japanese_usage_dictionary
+	do
 		_src=${_src_dest%:*}
 		_dst=mozc/src/third_party/${_src_dest#*:}
 		rmdir $_dst
 		ln -sr $_src-* $_dst
 	done
+}
 
-	if [ "$CROSS_BUILD" ]; then
-		# find fcitx4-config
-		sed -i -e "s;fcitx4-config;${XBPS_CROSS_BASE}/usr/bin/fcitx4-config;" mozc/src/unix/fcitx/fcitx.gyp
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc
 	fi
 }
 
 do_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) sed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc ;;
-	esac
 	GYP_DEFINES="
 	 document_dir=/usr/share/licenses/${pkgname}
 	 use_libprotobuf=1
 	 use_libzinnia=1
-	" python2 build_mozc.py gyp --target_platform=Linux
+	" python3 build_mozc.py gyp --target_platform=Linux
 }
 
 do_build() {
-	local targets
-	targets="
-	 server/server.gyp:mozc_server
-	 gui/gui.gyp:mozc_tool
-	 unix/emacs/emacs.gyp:mozc_emacs_helper
-	 unix/ibus/ibus.gyp:ibus_mozc
-	 renderer/renderer.gyp:mozc_renderer
-	 unix/fcitx/fcitx.gyp:fcitx-mozc
-	"
-	python2 build_mozc.py build -c Release $targets
+	python3 build_mozc.py build -c Release \
+		server/server.gyp:mozc_server \
+		gui/gui.gyp:mozc_tool \
+		unix/emacs/emacs.gyp:mozc_emacs_helper \
+		unix/ibus/ibus.gyp:ibus_mozc \
+		renderer/renderer.gyp:mozc_renderer \
+		unix/fcitx/fcitx.gyp:fcitx-mozc \
+		unix/fcitx5/fcitx5.gyp:fcitx5-mozc
 
 	sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' out_linux/Release/gen/unix/ibus/mozc.xml
 }
@@ -82,15 +83,16 @@ do_install() {
 	vinstall out_linux/Release/mozc_server 755 usr/lib/mozc
 	vinstall out_linux/Release/mozc_tool 755 usr/lib/mozc
 
-	head -n 29 server/mozc_server.cc > LICENSE
-	for i in LICENSE data/installer/*.html; do
-		vlicense "$i"
-	done
+	head -n 29 unix/fcitx5/fcitx_key_translator.cc >mozc.LICENSE
+	vlicense mozc.LICENSE
+	vlicense data/installer/credits_en.html
+	vlicense third_party/japanese_usage_dictionary/LICENSE dict.LICENSE
 }
 
 ibus-mozc_package() {
 	short_desc="Mozc engine for IBus - Client of the Mozc input method"
 	depends="${sourcepkg}-${version}_${revision} ibus>=1.5.14"
+	lib32disabled=yes
 	pkg_install() {
 		vinstall out_linux/Release/ibus_mozc 755 usr/lib/ibus-mozc ibus-engine-mozc
 		vinstall out_linux/Release/gen/unix/ibus/mozc.xml 644 usr/share/ibus/component
@@ -105,6 +107,7 @@ ibus-mozc_package() {
 emacs-mozc_package() {
 	pkgdesc="Mozc for Emacs"
 	depends="${sourcepkg}-${version}_${revision} emacs"
+	lib32disabled=yes
 	pkg_install() {
 		vbin out_linux/Release/mozc_emacs_helper
 		vinstall unix/emacs/mozc.el 644 usr/share/emacs/site-lisp/emacs-mozc
@@ -115,10 +118,40 @@ fcitx-mozc_package() {
 	short_desc="Mozc engine for fcitx - Client of the Mozc input method"
 	depends="${sourcepkg}-${version}_${revision} fcitx>=4.2.9"
 	homepage="https://fcitx-im.org/"
-	license="GPL-2.0-or-later"
+	lib32disabled=yes
 	pkg_install() {
+		local _file _lang
 		vinstall out_linux/Release/fcitx-mozc.so 644 usr/lib/fcitx
 		vinstall unix/fcitx/fcitx-mozc.conf 644 usr/share/fcitx/addon
 		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		vinstall data/images/unix/ime_product_icon_opensource-32.png \
+			644 usr/share/fcitx/icon mozc.png
+		for _file in out_linux/Release/gen/unix/fcitx/po/*.mo
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.mo}
+			vinstall "$_file" 644 usr/share/locale/$_lang fcitx-mozc.mo
+		done
+	}
+}
+
+fcitx5-mozc_package() {
+	short_desc="Mozc engine for fcitx v5"
+	depends="${sourcepkg}-${version}_${revision} fcitx5"
+	homepage="https://fcitx-im.org/"
+	lib32disabled=yes
+	pkg_install() {
+		local _file _lang
+		vinstall out_linux/Release/fcitx5-mozc.so 644 usr/lib/fcitx5
+		vinstall unix/fcitx5/mozc-addon.conf 644 \
+			usr/share/fcitx5/addon mozc.conf
+		vinstall unix/fcitx5/mozc.conf 644 usr/share/fcitx5/inputmethod
+		for _file in unix/fcitx5/po/*.po
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.po}
+			vmkdir usr/share/locale/$_lang
+			msgfmt "$_file" -o $PKGDESTDIR/usr/share/locale/$_lang/fcitx5-mozc.mo
+		done
 	}
 }
diff --git a/srcpkgs/mozc/update b/srcpkgs/mozc/update
new file mode 100644
index 000000000000..5a7df464ba79
--- /dev/null
+++ b/srcpkgs/mozc/update
@@ -0,0 +1,2 @@
+# Google never tags any releases.
+ignore="*"

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
  2021-04-27  1:26 ` [PR PATCH] [Updated] " sgn
  2021-04-30  7:56 ` sgn
@ 2021-04-30  7:57 ` sgn
  2021-04-30  7:57 ` sgn
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-04-30  7:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-829916641

Comment:
@q66  please check if the ported patch is correct.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (2 preceding siblings ...)
  2021-04-30  7:57 ` mozc: update to 2.26.4353.100. " sgn
@ 2021-04-30  7:57 ` sgn
  2021-04-30  8:04 ` sgn
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-04-30  7:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-829916851

Comment:
I only have limited usage of Japanese.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (3 preceding siblings ...)
  2021-04-30  7:57 ` sgn
@ 2021-04-30  8:04 ` sgn
  2021-04-30 13:51 ` noarchwastaken
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-04-30  8:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-829920315

Comment:
@noarchwastaken it seems like you will be interested in this package.
Cc: @mvf 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (4 preceding siblings ...)
  2021-04-30  8:04 ` sgn
@ 2021-04-30 13:51 ` noarchwastaken
  2021-05-01  1:53 ` [PR PATCH] [Updated] " sgn
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: noarchwastaken @ 2021-04-30 13:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

New comment by noarchwastaken on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-830110465

Comment:
> @noarchwastaken it seems like you will be interested in this package.
> Cc: @mvf

yup.

For the patch, I noticed that the Reiwa era is already in `src/data/dictionary_manual/era.txt`, should we use that instead?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (5 preceding siblings ...)
  2021-04-30 13:51 ` noarchwastaken
@ 2021-05-01  1:53 ` sgn
  2021-05-01  2:00 ` sgn
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-05-01  1:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fcitx5-mozc
https://github.com/void-linux/void-packages/pull/30492

mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30492.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fcitx5-mozc-30492.patch --]
[-- Type: text/x-diff, Size: 41122 bytes --]

From a135a6a31b9ee0c7ccd4af7b15481c55354c1322 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 25 Apr 2021 22:53:14 +0700
Subject: [PATCH] mozc: update to 2.26.4353.100.

---
 srcpkgs/fcitx5-mozc                           |   1 +
 srcpkgs/mozc/patches/abseil.patch             |  73 ++++
 srcpkgs/mozc/patches/cross.patch              |  10 +-
 srcpkgs/mozc/patches/cxx-stdlib.patch         |  29 ++
 .../default_hiragana_from_environment.patch   |  20 --
 srcpkgs/mozc/patches/fcitx.patch              |  13 +
 srcpkgs/mozc/patches/no-parallel.patch        |   6 +-
 srcpkgs/mozc/patches/protobuf-370.patch       | 327 ------------------
 srcpkgs/mozc/patches/unsigned-int.patch       | 210 +++++++++++
 srcpkgs/mozc/template                         | 109 ++++--
 srcpkgs/mozc/update                           |   2 +
 11 files changed, 409 insertions(+), 391 deletions(-)
 create mode 120000 srcpkgs/fcitx5-mozc
 create mode 100644 srcpkgs/mozc/patches/abseil.patch
 create mode 100644 srcpkgs/mozc/patches/cxx-stdlib.patch
 delete mode 100644 srcpkgs/mozc/patches/default_hiragana_from_environment.patch
 create mode 100644 srcpkgs/mozc/patches/fcitx.patch
 delete mode 100644 srcpkgs/mozc/patches/protobuf-370.patch
 create mode 100644 srcpkgs/mozc/patches/unsigned-int.patch
 create mode 100644 srcpkgs/mozc/update

diff --git a/srcpkgs/fcitx5-mozc b/srcpkgs/fcitx5-mozc
new file mode 120000
index 000000000000..6874ca426b5f
--- /dev/null
+++ b/srcpkgs/fcitx5-mozc
@@ -0,0 +1 @@
+mozc
\ No newline at end of file
diff --git a/srcpkgs/mozc/patches/abseil.patch b/srcpkgs/mozc/patches/abseil.patch
new file mode 100644
index 000000000000..22510299dc9f
--- /dev/null
+++ b/srcpkgs/mozc/patches/abseil.patch
@@ -0,0 +1,73 @@
+
+Ported from grpc's patches
+
+An all-in-one patch that fixes several issues:
+
+1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
+2) powerpc stacktrace implementation only works on glibc (disabled on musl)
+3) powerpc stacktrace implementation has ppc64 assumptions (fixed)
+4) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
+
+--- mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
++++ mozc/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
+@@ -46,7 +46,7 @@
+ 
+ // The following platforms have an implementation of a hardware counter.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
+-  defined(__powerpc__) || defined(__ppc__) || \
++  ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
+   defined(_M_IX86) || defined(_M_X64)
+ #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
+ #else
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
+@@ -27,6 +27,10 @@
+ #include <csignal>
+ #include <cstdio>
+ 
++#if defined(__powerpc__)
++#include <asm/ptrace.h>
++#endif
++
+ #include "absl/base/attributes.h"
+ #include "absl/base/internal/raw_logging.h"
+ #include "absl/base/macros.h"
+@@ -55,8 +59,10 @@
+     return reinterpret_cast<void*>(context->uc_mcontext.pc);
+ #elif defined(__powerpc64__)
+     return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
+-#elif defined(__powerpc__)
++#elif defined(__powerpc__) && defined(__GLIBC__)
+     return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
++#elif defined(__powerpc__)
++    return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->nip);
+ #elif defined(__riscv)
+     return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
+ #elif defined(__s390__) && !defined(__s390x__)
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
+@@ -64,7 +64,7 @@
+ #elif defined(__i386__) || defined(__x86_64__)
+ #define ABSL_STACKTRACE_INL_HEADER \
+   "absl/debugging/internal/stacktrace_x86-inl.inc"
+-#elif defined(__ppc__) || defined(__PPC__)
++#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
+ #define ABSL_STACKTRACE_INL_HEADER \
+   "absl/debugging/internal/stacktrace_powerpc-inl.inc"
+ #elif defined(__aarch64__)
+--- mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc
++++ mozc/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc
+@@ -130,8 +130,13 @@
+         StacktracePowerPCGetLR(new_sp) == kernel_sigtramp_rt64_address) {
+       const ucontext_t* signal_context =
+           reinterpret_cast<const ucontext_t*>(uc);
++#if defined(__powerpc64__)
+       void **const sp_before_signal =
+           reinterpret_cast<void**>(signal_context->uc_mcontext.gp_regs[PT_R1]);
++#else
++      void **const sp_before_signal =
++          reinterpret_cast<void**>(signal_context->uc_mcontext.uc_regs->gregs[PT_R1]);
++#endif
+       // Check that alleged sp before signal is nonnull and is reasonably
+       // aligned.
+       if (sp_before_signal != nullptr &&
diff --git a/srcpkgs/mozc/patches/cross.patch b/srcpkgs/mozc/patches/cross.patch
index 17d47a900eb9..d73c5f82b430 100644
--- a/srcpkgs/mozc/patches/cross.patch
+++ b/srcpkgs/mozc/patches/cross.patch
@@ -1,7 +1,9 @@
---- mozc/src/gyp/common.gypi
+Index: mozc/src/gyp/common.gypi
+===================================================================
+--- mozc/src/gyp/common.gypi.orig
 +++ mozc/src/gyp/common.gypi
-@@ -444,12 +444,12 @@
-     }],
+@@ -409,12 +409,12 @@
+   'conditions': [
      ['target_platform=="Linux"', {
        'make_global_settings': [
 -        ['AR', '<!(which ar)'],
@@ -19,7 +21,7 @@
        ],
      }],
      ['target_platform=="Android"', {
-@@ -494,12 +494,12 @@
+@@ -459,12 +459,12 @@
          ['LD', '<(ndk_bin_dir)/<(toolchain_prefix)-ld'],
          ['NM', '<(ndk_bin_dir)/<(toolchain_prefix)-nm'],
          ['READELF', '<(ndk_bin_dir)/<(toolchain_prefix)-readelf'],
diff --git a/srcpkgs/mozc/patches/cxx-stdlib.patch b/srcpkgs/mozc/patches/cxx-stdlib.patch
new file mode 100644
index 000000000000..0bccaf8ddc4f
--- /dev/null
+++ b/srcpkgs/mozc/patches/cxx-stdlib.patch
@@ -0,0 +1,29 @@
+Index: mozc/src/gyp/common.gypi
+===================================================================
+--- mozc/src/gyp/common.gypi
++++ mozc/src/gyp/common.gypi
+@@ -105,7 +105,7 @@
+     ],
+     # Libraries for GNU/Linux environment.
+     'linux_ldflags': [
+-      '-lc++',
++      '-lstdc++',
+       '-pthread',
+     ],
+ 
+@@ -205,7 +205,6 @@
+               '-Wtype-limits',
+             ],
+             'cflags_cc': [
+-              '-stdlib=libc++',
+               '-Wno-covered-switch-default',
+               '-Wno-unnamed-type-template-args',
+               '-Wno-c++11-narrowing',
+@@ -225,7 +224,6 @@
+               '-Wtype-limits',
+             ],
+             'cflags_cc': [
+-              '-stdlib=libc++',
+               '-Wno-covered-switch-default',
+               '-Wno-unnamed-type-template-args',
+               '-Wno-c++11-narrowing',
diff --git a/srcpkgs/mozc/patches/default_hiragana_from_environment.patch b/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
deleted file mode 100644
index d733635ac5a1..000000000000
--- a/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- mozc/src/unix/ibus/property_handler.cc
-+++ mozc/src/unix/ibus/property_handler.cc
-@@ -40,6 +40,8 @@
- #include "unix/ibus/mozc_engine_property.h"
- #include "unix/ibus/path_util.h"
- 
-+#include <cstdlib>
-+
- // On Gnome Shell with IBus 1.5, new property named "symbol" is used to
- // represent the mode indicator on the system panel. Note that "symbol" does
- // not exist in IBus 1.4.x.
-@@ -80,7 +82,7 @@ bool GetDisabled(IBusEngine *engine) {
- // On IBus 1.4.x, IBus expects that an IME should always be turned on and
- // IME on/off keys are handled by IBus itself rather than each IME.
- #if IBUS_CHECK_VERSION(1, 5, 0)
--const bool kActivatedOnLaunch = false;
-+const bool kActivatedOnLaunch = !!::std::getenv("IBUS_MOZC_DEFAULT_HIRAGANA");
- #else
- const bool kActivatedOnLaunch = true;
- #endif  // IBus>=1.5.0
diff --git a/srcpkgs/mozc/patches/fcitx.patch b/srcpkgs/mozc/patches/fcitx.patch
new file mode 100644
index 000000000000..1ed6d01516f5
--- /dev/null
+++ b/srcpkgs/mozc/patches/fcitx.patch
@@ -0,0 +1,13 @@
+Index: mozc/src/unix/fcitx/fcitx.gyp
+===================================================================
+--- mozc/src/unix/fcitx/fcitx.gyp.orig
++++ mozc/src/unix/fcitx/fcitx.gyp
+@@ -96,7 +96,7 @@
+         '<@(fcitx_dep_include_dirs)',
+       ],
+       'defines': [
+-        'LOCALEDIR="<!@(fcitx4-config --prefix)/share/locale/"',
++        'LOCALEDIR="/usr/share/locale/"',
+       ],
+     },
+   ],
diff --git a/srcpkgs/mozc/patches/no-parallel.patch b/srcpkgs/mozc/patches/no-parallel.patch
index 14b23367f09e..5952cbc6a040 100644
--- a/srcpkgs/mozc/patches/no-parallel.patch
+++ b/srcpkgs/mozc/patches/no-parallel.patch
@@ -1,6 +1,8 @@
---- mozc/src/build_mozc.py
+Index: mozc/src/build_mozc.py
+===================================================================
+--- mozc/src/build_mozc.py.orig
 +++ mozc/src/build_mozc.py
-@@ -728,6 +728,7 @@ def GypMain(options, unused_args):
+@@ -496,6 +496,7 @@ def GypMain(options, unused_args):
    gyp_options.extend(['--generator-output=.'])
    short_basename = GetBuildShortBaseName(target_platform)
    gyp_options.extend(['-G', 'output_dir=%s' % short_basename])
diff --git a/srcpkgs/mozc/patches/protobuf-370.patch b/srcpkgs/mozc/patches/protobuf-370.patch
deleted file mode 100644
index 59d4e0bb995d..000000000000
--- a/srcpkgs/mozc/patches/protobuf-370.patch
+++ /dev/null
@@ -1,327 +0,0 @@
---- mozc/src/dictionary/user_dictionary.cc
-+++ mozc/src/dictionary/user_dictionary.cc
-@@ -289,7 +289,7 @@ class UserDictionary::UserDictionaryReloader : public Thread {
-     }
- 
-     auto_register_mode_ = false;
--    dic_->Load(*(storage.get()));
-+    dic_->Load(*(storage->storage()));
-   }
- 
-  private:
---- mozc/src/dictionary/user_dictionary_session.cc
-+++ mozc/src/dictionary/user_dictionary_session.cc
-@@ -144,7 +144,7 @@ class UndoRenameDictionaryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -169,7 +169,7 @@ class UndoAddEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL || dictionary->entries_size() == 0) {
-       return false;
-     }
-@@ -195,7 +195,7 @@ class UndoEditEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL ||
-         index_ < 0 || dictionary->entries_size() <= index_) {
-       return false;
-@@ -240,7 +240,7 @@ class UndoDeleteEntryCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -306,7 +306,7 @@ class UndoImportFromStringCommand : public UserDictionarySession::UndoCommand {
-   virtual bool RunUndo(mozc::UserDictionaryStorage *storage) {
-     UserDictionary *dictionary =
-         UserDictionaryUtil::GetMutableUserDictionaryById(
--            storage, dictionary_id_);
-+            storage->storage(), dictionary_id_);
-     if (dictionary == NULL) {
-       return false;
-     }
-@@ -345,7 +345,7 @@ UserDictionarySession::~UserDictionarySession() {
- 
- // TODO(hidehiko) move this to header.
- const UserDictionaryStorage &UserDictionarySession::storage() const {
--  return *storage_;
-+  return *storage_->storage();
- }
- mozc::UserDictionaryStorage *UserDictionarySession::mutable_storage() {
-   return storage_.get();
-@@ -464,7 +464,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::CreateDictionary(
-     const string &dictionary_name, uint64 *new_dictionary_id) {
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), dictionary_name, new_dictionary_id);
-+          storage_->storage(), dictionary_name, new_dictionary_id);
-   if (status == UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-     AddUndoCommand(new UndoCreateDictionaryCommand);
-   }
-@@ -488,7 +488,7 @@ UserDictionarySession::DeleteDictionaryInternal(
-   int original_index;
-   UserDictionary *deleted_dictionary;
-   if (!UserDictionaryUtil::DeleteDictionary(
--          storage_.get(), dictionary_id,
-+          storage_->storage(), dictionary_id,
-           &original_index, &deleted_dictionary)) {
-     // Failed to delete the dictionary.
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-@@ -510,7 +510,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::RenameDictionary(
-     uint64 dictionary_id, const string &dictionary_name) {
-   string original_name;
-   const UserDictionary *dictionary =
--      UserDictionaryUtil::GetUserDictionaryById(*storage_, dictionary_id);
-+      UserDictionaryUtil::GetUserDictionaryById(*storage_->storage(), dictionary_id);
-   if (dictionary != NULL) {
-     // Note that if dictionary is null, it means the dictionary_id is invalid
-     // so following RenameDictionary will fail, and error handling is done
-@@ -547,7 +547,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::AddEntry(
-     uint64 dictionary_id, const UserDictionary::Entry &entry) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -575,7 +575,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::EditEntry(
-     uint64 dictionary_id, int index, const UserDictionary::Entry &entry) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -604,7 +604,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::DeleteEntry(
-     uint64 dictionary_id, const std::vector<int> &index_list) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -644,7 +644,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::ImportFromString(
-     uint64 dictionary_id, const string &data) {
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), dictionary_id);
-+          storage_->storage(), dictionary_id);
-   if (dictionary == NULL) {
-     return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID;
-   }
-@@ -699,7 +699,7 @@ UserDictionarySession::ImportToNewDictionaryFromString(
-     uint64 *new_dictionary_id) {
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), dictionary_name, new_dictionary_id);
-+          storage_->storage(), dictionary_name, new_dictionary_id);
-   if (status != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-     return status;
-   }
-@@ -709,7 +709,7 @@ UserDictionarySession::ImportToNewDictionaryFromString(
- 
-   UserDictionary *dictionary =
-       UserDictionaryUtil::GetMutableUserDictionaryById(
--          storage_.get(), *new_dictionary_id);
-+          storage_->storage(), *new_dictionary_id);
-   if (dictionary == NULL) {
-     // The dictionary should be always found.
-     return UserDictionaryCommandStatus::UNKNOWN_ERROR;
-@@ -728,7 +728,7 @@ bool UserDictionarySession::EnsureNonEmptyStorage() {
-   uint64 new_dictionary_id;
-   UserDictionaryCommandStatus::Status status =
-       UserDictionaryUtil::CreateDictionary(
--          storage_.get(), default_dictionary_name_, &new_dictionary_id);
-+          storage_->storage(), default_dictionary_name_, &new_dictionary_id);
-   CHECK_EQ(
-       status, UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS);
-   return true;
---- mozc/src/dictionary/user_dictionary_storage.cc
-+++ mozc/src/dictionary/user_dictionary_storage.cc
-@@ -109,7 +109,7 @@ bool UserDictionaryStorage::LoadInternal() {
-   mozc::protobuf::io::IstreamInputStream zero_copy_input(&ifs);
-   mozc::protobuf::io::CodedInputStream decoder(&zero_copy_input);
-   decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1);
--  if (!ParseFromCodedStream(&decoder)) {
-+  if (!storage_.ParseFromCodedStream(&decoder)) {
-     LOG(ERROR) << "Failed to parse";
-     if (!decoder.ConsumedEntireMessage() || !ifs.eof()) {
-       LOG(ERROR) << "ParseFromStream failed: file seems broken";
-@@ -141,7 +141,7 @@ bool UserDictionaryStorage::Load() {
-     const UserDictionary &dict = dictionaries(i);
-     if (dict.id() == 0) {
-       mutable_dictionaries(i)->set_id(
--          UserDictionaryUtil::CreateNewDictionaryId(*this));
-+          UserDictionaryUtil::CreateNewDictionaryId(storage_));
-     }
-   }
- 
-@@ -171,7 +171,7 @@ bool UserDictionaryStorage::Save() {
-       return false;
-     }
- 
--    if (!SerializeToOstream(&ofs)) {
-+    if (!storage_.SerializeToOstream(&ofs)) {
-       LOG(ERROR) << "SerializeToString failed";
-       last_error_type_ = SYNC_FAILURE;
-       return false;
-@@ -241,7 +241,7 @@ bool UserDictionaryStorage::ExportDictionary(
- bool UserDictionaryStorage::CreateDictionary(
-     const string &dic_name, uint64 *new_dic_id) {
-   UserDictionaryCommandStatus::Status status =
--      UserDictionaryUtil::CreateDictionary(this, dic_name, new_dic_id);
-+      UserDictionaryUtil::CreateDictionary(&storage_, dic_name, new_dic_id);
-   // Update last_error_type_
-   switch (status) {
-     case UserDictionaryCommandStatus::DICTIONARY_NAME_EMPTY:
-@@ -273,7 +273,7 @@ bool UserDictionaryStorage::CreateDictionary(
- }
- 
- bool UserDictionaryStorage::DeleteDictionary(uint64 dic_id) {
--  if (!UserDictionaryUtil::DeleteDictionary(this, dic_id, NULL, NULL)) {
-+  if (!UserDictionaryUtil::DeleteDictionary(&storage_, dic_id, NULL, NULL)) {
-     // Failed to delete dictionary.
-     last_error_type_ = INVALID_DICTIONARY_ID;
-     return false;
-@@ -318,7 +318,7 @@ bool UserDictionaryStorage::RenameDictionary(uint64 dic_id,
- }
- 
- int UserDictionaryStorage::GetUserDictionaryIndex(uint64 dic_id) const {
--  return UserDictionaryUtil::GetUserDictionaryIndexById(*this, dic_id);
-+  return UserDictionaryUtil::GetUserDictionaryIndexById(storage_, dic_id);
- }
- 
- bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name,
-@@ -335,7 +335,7 @@ bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name,
- 
- user_dictionary::UserDictionary *UserDictionaryStorage::GetUserDictionary(
-     uint64 dic_id) {
--  return UserDictionaryUtil::GetMutableUserDictionaryById(this, dic_id);
-+  return UserDictionaryUtil::GetMutableUserDictionaryById(&storage_, dic_id);
- }
- 
- UserDictionaryStorage::UserDictionaryStorageErrorType
-@@ -361,14 +361,14 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary(
- 
-   UserDictionary *dic = NULL;
-   if (auto_index == -1) {
--    if (UserDictionaryUtil::IsStorageFull(*this)) {
-+    if (UserDictionaryUtil::IsStorageFull(storage_)) {
-       last_error_type_ = TOO_MANY_DICTIONARIES;
-       LOG(ERROR) << "too many dictionaries";
-       UnLock();
-       return false;
-     }
-     dic = add_dictionaries();
--    dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(*this));
-+    dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(storage_));
-     dic->set_name(kAutoRegisteredDictionaryName);
-   } else {
-     dic = mutable_dictionaries(auto_index);
-@@ -410,7 +410,7 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary(
- }
- 
- bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
--  if (CountSyncableDictionaries(*this) == 0) {
-+  if (CountSyncableDictionaries(storage_) == 0) {
-     return false;
-   }
- 
-@@ -445,7 +445,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
-           kDictionaryNameConvertedFromSyncableDictionary;
-       int index = 0;
-       while (UserDictionaryUtil::ValidateDictionaryName(
--                 *this, new_dictionary_name)
-+                 storage_, new_dictionary_name)
-              != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) {
-         ++index;
-         new_dictionary_name = Util::StringPrintf(
-@@ -456,7 +456,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() {
-     dic->set_syncable(false);
-   }
- 
--  DCHECK_EQ(0, CountSyncableDictionaries(*this));
-+  DCHECK_EQ(0, CountSyncableDictionaries(storage_));
- 
-   return true;
- }
---- mozc/src/dictionary/user_dictionary_storage.h
-+++ mozc/src/dictionary/user_dictionary_storage.h
-@@ -74,8 +74,20 @@ class ProcessMutex;
- 
- // Inherit from ProtocolBuffer
- // TODO(hidehiko): Get rid of this implementation.
--class UserDictionaryStorage : public user_dictionary::UserDictionaryStorage {
-+class UserDictionaryStorage {
-+ private:
-+  user_dictionary::UserDictionaryStorage storage_;
-  public:
-+  static const user_dictionary::UserDictionaryStorage& default_instance() { return user_dictionary::UserDictionaryStorage::default_instance(); }
-+  user_dictionary::UserDictionaryStorage *storage() { return &storage_; }
-+  int dictionaries_size() const { return storage_.dictionaries_size(); }
-+  void clear_dictionaries() { storage_.clear_dictionaries(); }
-+  user_dictionary::UserDictionary* mutable_dictionaries(int index) { return storage_.mutable_dictionaries(index); }
-+  ::google::protobuf::RepeatedPtrField<user_dictionary::UserDictionary >* mutable_dictionaries() { return storage_.mutable_dictionaries(); }
-+  const ::google::protobuf::RepeatedPtrField<user_dictionary::UserDictionary >& dictionaries() const { return storage_.dictionaries(); }
-+  const user_dictionary::UserDictionary& dictionaries(int index) const { return storage_.dictionaries(index); }
-+  user_dictionary::UserDictionary* add_dictionaries() { return storage_.add_dictionaries(); }
-+
-   typedef user_dictionary::UserDictionary UserDictionary;
-   typedef user_dictionary::UserDictionary::Entry UserDictionaryEntry;
- 
---- mozc/src/prediction/user_history_predictor.cc
-+++ mozc/src/prediction/user_history_predictor.cc
-@@ -291,7 +291,7 @@ bool UserHistoryStorage::Load() {
-     return false;
-   }
- 
--  if (!ParseFromString(input)) {
-+  if (!userHistory_.ParseFromString(input)) {
-     LOG(ERROR) << "ParseFromString failed. message looks broken";
-     return false;
-   }
-@@ -307,7 +307,7 @@ bool UserHistoryStorage::Save() const {
-   }
- 
-   string output;
--  if (!AppendToString(&output)) {
-+  if (!userHistory_.AppendToString(&output)) {
-     LOG(ERROR) << "AppendToString failed";
-     return false;
-   }
---- mozc/src/prediction/user_history_predictor.h
-+++ mozc/src/prediction/user_history_predictor.h
-@@ -61,8 +61,13 @@ class Segments;
- class UserHistoryPredictorSyncer;
- 
- // Added serialization method for UserHistory.
--class UserHistoryStorage : public mozc::user_history_predictor::UserHistory {
-+class UserHistoryStorage {
-+ private:
-+  user_history_predictor::UserHistory userHistory_;
-  public:
-+  int entries_size() const { return userHistory_.entries_size(); }
-+  const user_history_predictor::UserHistory_Entry& entries(int index) const { return userHistory_.entries(index); }
-+  user_history_predictor::UserHistory_Entry* add_entries() { return userHistory_.add_entries(); }
-   explicit UserHistoryStorage(const string &filename);
-   ~UserHistoryStorage();
- 
diff --git a/srcpkgs/mozc/patches/unsigned-int.patch b/srcpkgs/mozc/patches/unsigned-int.patch
new file mode 100644
index 000000000000..823db9f21993
--- /dev/null
+++ b/srcpkgs/mozc/patches/unsigned-int.patch
@@ -0,0 +1,210 @@
+Index: mozc/src/gui/word_register_dialog/word_register_dialog.cc
+===================================================================
+--- mozc/src/gui/word_register_dialog/word_register_dialog.cc
++++ mozc/src/gui/word_register_dialog/word_register_dialog.cc
+@@ -94,7 +94,7 @@ QString GetEnv(const char *envname) {
+       return QString::fromUtf16(reinterpret_cast<const ushort *>(buffer.get()));
+     } else {
+       // This is a fallback just in case.
+-      return QString::fromUcs4(reinterpret_cast<const uint *>(buffer.get()));
++      return QString::fromUcs4(reinterpret_cast<const unsigned *>(buffer.get()));
+     }
+   }
+   return QLatin1String("");
+Index: mozc/src/unix/fcitx/surrounding_text_util.cc
+===================================================================
+--- mozc/src/unix/fcitx/surrounding_text_util.cc
++++ mozc/src/unix/fcitx/surrounding_text_util.cc
+@@ -41,10 +41,10 @@
+ namespace mozc {
+ namespace fcitx {
+ 
+-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
++bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
+   DCHECK(delta);
+ 
+-  static_assert(sizeof(int64) >= sizeof(uint),
++  static_assert(sizeof(int64) >= sizeof(unsigned),
+                 "int64 must be sufficient to store a guint value.");
+   static_assert(sizeof(int64) == sizeof(llabs(0)),
+                 "|llabs(0)| must returns a 64-bit integer.");
+@@ -113,8 +113,8 @@ bool SearchAnchorPosForward(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+     size_t selected_chars_len,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Move |iter| to cursor pos.
+@@ -137,15 +137,15 @@ bool SearchAnchorPosBackward(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+     size_t selected_chars_len,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+   if (cursor_pos < selected_chars_len) {
+     return false;
+   }
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Skip |iter| to (potential) anchor pos.
+-  const uint skip_count = cursor_pos - selected_chars_len;
++  const unsigned skip_count = cursor_pos - selected_chars_len;
+   DCHECK_LE(skip_count, cursor_pos);
+   if (!Skip(&iter, skip_count)) {
+     return false;
+@@ -164,8 +164,8 @@ bool SearchAnchorPosBackward(
+ bool SurroundingTextUtil::GetAnchorPosFromSelection(
+     const std::string &surrounding_text,
+     const std::string &selected_text,
+-    uint cursor_pos,
+-    uint *anchor_pos) {
++    unsigned cursor_pos,
++    unsigned *anchor_pos) {
+   DCHECK(anchor_pos);
+ 
+   if (surrounding_text.empty()) {
+@@ -196,8 +196,8 @@ bool GetSurroundingText(FcitxInstance* i
+         return false;
+     }
+ 
+-    uint cursor_pos = 0;
+-    uint anchor_pos = 0;
++    unsigned cursor_pos = 0;
++    unsigned anchor_pos = 0;
+     char* str = NULL;
+ 
+     if (!FcitxInstanceGetSurroundingText(instance, ic, &str, &cursor_pos, &anchor_pos)) {
+@@ -211,7 +211,7 @@ bool GetSurroundingText(FcitxInstance* i
+         const char* primary = NULL;
+ 
+         if ((primary = FcitxClipboardGetPrimarySelection(instance, NULL)) != NULL) {
+-            uint new_anchor_pos = 0;
++            unsigned new_anchor_pos = 0;
+             const std::string primary_text(primary);
+             if (SurroundingTextUtil::GetAnchorPosFromSelection(
+                 surrounding_text, primary_text,
+Index: mozc/src/unix/fcitx/surrounding_text_util.h
+===================================================================
+--- mozc/src/unix/fcitx/surrounding_text_util.h
++++ mozc/src/unix/fcitx/surrounding_text_util.h
+@@ -55,7 +55,7 @@ class SurroundingTextUtil {
+   // Returns true when neither |abs(delta)| nor |-delta| does not cause
+   // integer overflow, that is, |delta| is in a safe range.
+   // Returns false otherwise.
+-  static bool GetSafeDelta(uint from, uint to, int32 *delta);
++  static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
+ 
+   // Returns true if
+   // 1. |surrounding_text| contains |selected_text|
+@@ -71,8 +71,8 @@ class SurroundingTextUtil {
+   static bool GetAnchorPosFromSelection(
+       const std::string &surrounding_text,
+       const std::string &selected_text,
+-      uint cursor_pos,
+-      uint *anchor_pos);
++      unsigned cursor_pos,
++      unsigned *anchor_pos);
+ 
+  private:
+   DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
+Index: mozc/src/unix/fcitx5/surrounding_text_util.cc
+===================================================================
+--- mozc/src/unix/fcitx5/surrounding_text_util.cc
++++ mozc/src/unix/fcitx5/surrounding_text_util.cc
+@@ -43,10 +43,10 @@ namespace fcitx {
+ 
+ using namespace mozc;
+ 
+-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
++bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
+   DCHECK(delta);
+ 
+-  static_assert(sizeof(int64) >= sizeof(uint),
++  static_assert(sizeof(int64) >= sizeof(unsigned),
+                 "int64 must be sufficient to store a guint value.");
+   static_assert(sizeof(int64) == sizeof(llabs(0)),
+                 "|llabs(0)| must returns a 64-bit integer.");
+@@ -110,8 +110,8 @@ bool StartsWith(ConstChar32Iterator *ite
+ // Otherwise returns false.
+ bool SearchAnchorPosForward(const std::string &surrounding_text,
+                             const std::string &selected_text,
+-                            size_t selected_chars_len, uint cursor_pos,
+-                            uint *anchor_pos) {
++                            size_t selected_chars_len, unsigned cursor_pos,
++                            unsigned *anchor_pos) {
+   ConstChar32Iterator iter(surrounding_text);
+   // Move |iter| to cursor pos.
+   if (!Skip(&iter, cursor_pos)) {
+@@ -131,15 +131,15 @@ bool SearchAnchorPosForward(const std::s
+ // Otherwise returns false.
+ bool SearchAnchorPosBackward(const std::string &surrounding_text,
+                              const std::string &selected_text,
+-                             size_t selected_chars_len, uint cursor_pos,
+-                             uint *anchor_pos) {
++                             size_t selected_chars_len, unsigned cursor_pos,
++                             unsigned *anchor_pos) {
+   if (cursor_pos < selected_chars_len) {
+     return false;
+   }
+ 
+   ConstChar32Iterator iter(surrounding_text);
+   // Skip |iter| to (potential) anchor pos.
+-  const uint skip_count = cursor_pos - selected_chars_len;
++  const unsigned skip_count = cursor_pos - selected_chars_len;
+   DCHECK_LE(skip_count, cursor_pos);
+   if (!Skip(&iter, skip_count)) {
+     return false;
+@@ -157,7 +157,7 @@ bool SearchAnchorPosBackward(const std::
+ 
+ bool SurroundingTextUtil::GetAnchorPosFromSelection(
+     const std::string &surrounding_text, const std::string &selected_text,
+-    uint cursor_pos, uint *anchor_pos) {
++    unsigned cursor_pos, unsigned *anchor_pos) {
+   DCHECK(anchor_pos);
+ 
+   if (surrounding_text.empty()) {
+@@ -187,13 +187,13 @@ bool GetSurroundingText(InputContext *ic
+   }
+ 
+   const auto surrounding_text = ic->surroundingText().text();
+-  uint cursor_pos = ic->surroundingText().cursor();
+-  uint anchor_pos = ic->surroundingText().anchor();
++  unsigned cursor_pos = ic->surroundingText().cursor();
++  unsigned anchor_pos = ic->surroundingText().anchor();
+ 
+   if (cursor_pos == anchor_pos && clipboard) {
+     std::string primary = clipboard->call<IClipboard::primary>(ic);
+     if (!primary.empty()) {
+-      uint new_anchor_pos = 0;
++      unsigned new_anchor_pos = 0;
+       if (SurroundingTextUtil::GetAnchorPosFromSelection(
+               surrounding_text, primary, cursor_pos, &new_anchor_pos)) {
+         anchor_pos = new_anchor_pos;
+Index: mozc/src/unix/fcitx5/surrounding_text_util.h
+===================================================================
+--- mozc/src/unix/fcitx5/surrounding_text_util.h
++++ mozc/src/unix/fcitx5/surrounding_text_util.h
+@@ -56,7 +56,7 @@ class SurroundingTextUtil {
+   // Returns true when neither |abs(delta)| nor |-delta| does not cause
+   // integer overflow, that is, |delta| is in a safe range.
+   // Returns false otherwise.
+-  static bool GetSafeDelta(uint from, uint to, int32 *delta);
++  static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
+ 
+   // Returns true if
+   // 1. |surrounding_text| contains |selected_text|
+@@ -71,7 +71,7 @@ class SurroundingTextUtil {
+   // Otherwise returns false.
+   static bool GetAnchorPosFromSelection(const std::string &surrounding_text,
+                                         const std::string &selected_text,
+-                                        uint cursor_pos, uint *anchor_pos);
++                                        unsigned cursor_pos, unsigned *anchor_pos);
+ 
+  private:
+   DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
diff --git a/srcpkgs/mozc/template b/srcpkgs/mozc/template
index 71d32eb5b9cd..1a78d407f471 100644
--- a/srcpkgs/mozc/template
+++ b/srcpkgs/mozc/template
@@ -1,33 +1,36 @@
 # Template file for 'mozc'
 pkgname=mozc
-version=2.23.2815.102
-revision=10
+# src/data/version/mozc_version_template.bzl
+version=2.26.4353.100
+revision=1
 create_wrksrc=yes
 build_wrksrc=mozc/src
-hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel python which"
+hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel
+ python3-six which qt5-qmake qt5-host-tools"
 makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel
- fcitx-devel"
+ fcitx-devel libfcitx5-devel"
 depends="tegaki-zinnia-japanese>=0.3"
 short_desc="Japanese IME (Open Source version of Google Japanese Input)"
 maintainer="Matthias von Faber <mvf@gmx.eu>"
 license="BSD-3-Clause"
 homepage="https://github.com/google/mozc"
 distfiles="
- https://gitlab.com/fcitx/mozc/repository/dad94584ea5012110ad1d204e433964243a1639d/archive.tar.bz2>${pkgname}-${version}.tar.bz2
- https://github.com/bnoordhuis/gyp/archive/c6f471687407bf28ddfc63f1a8f47aeb7bf54edc.tar.gz
+ https://github.com/fcitx/mozc/archive/d384c3b3e7eed1aa54a6af3363781604fe538d65.tar.gz
+ https://github.com/abseil/abseil-cpp/archive/0f3bb466b868b523cf1dc9b2aaaed65c77b28862.tar.gz
+ ${DEBIAN_SITE}/main/g/gyp/gyp_0.1+20200513gitcaa6002.orig.tar.gz
  https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
 "
-checksum="
- e38457e63a7fa8d62d87b4f8b3e89fe5f6939d92e3c4fd287a93358375693892
- 882f074cbb3a4f2bba550fb615e63949c0fbf39eeb1718a0330b4a545ab97616
- 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1
-"
+checksum="69cb26e1f9c03e20715356ef568b583f2baf996df5fd8536aca2ed8e7bd9444f
+ 3d74cdc98b42fd4257d91f652575206de195e2c824fcd8d6e6d227f85cb143ef
+ 8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
+ 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"
 
 CXXFLAGS="-D_GNU_SOURCE"
+patch_args=-Np0
+lib32disabled=yes
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-devel"
-	subpackages="ibus-mozc fcitx-mozc"
+	subpackages="ibus-mozc fcitx-mozc fcitx5-mozc"
 fi
 
 if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
@@ -35,45 +38,43 @@ if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
 fi
 
 post_extract() {
-	ln -s mozc-* mozc
-	rm -rf mozc/src/unix/fcitx5
+	mv mozc-* mozc
 
 	# symlink "submodules" into place
-	for _src_dest in gyp japanese-usage-dictionary:japanese_usage_dictionary; do
+	for _src_dest in gyp \
+		abseil-cpp \
+		japanese-usage-dictionary:japanese_usage_dictionary
+	do
 		_src=${_src_dest%:*}
 		_dst=mozc/src/third_party/${_src_dest#*:}
 		rmdir $_dst
 		ln -sr $_src-* $_dst
 	done
+}
 
-	if [ "$CROSS_BUILD" ]; then
-		# find fcitx4-config
-		sed -i -e "s;fcitx4-config;${XBPS_CROSS_BASE}/usr/bin/fcitx4-config;" mozc/src/unix/fcitx/fcitx.gyp
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc
 	fi
 }
 
 do_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) sed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc ;;
-	esac
 	GYP_DEFINES="
 	 document_dir=/usr/share/licenses/${pkgname}
 	 use_libprotobuf=1
 	 use_libzinnia=1
-	" python2 build_mozc.py gyp --target_platform=Linux
+	" python3 build_mozc.py gyp --target_platform=Linux
 }
 
 do_build() {
-	local targets
-	targets="
-	 server/server.gyp:mozc_server
-	 gui/gui.gyp:mozc_tool
-	 unix/emacs/emacs.gyp:mozc_emacs_helper
-	 unix/ibus/ibus.gyp:ibus_mozc
-	 renderer/renderer.gyp:mozc_renderer
-	 unix/fcitx/fcitx.gyp:fcitx-mozc
-	"
-	python2 build_mozc.py build -c Release $targets
+	python3 build_mozc.py build -c Release \
+		server/server.gyp:mozc_server \
+		gui/gui.gyp:mozc_tool \
+		unix/emacs/emacs.gyp:mozc_emacs_helper \
+		unix/ibus/ibus.gyp:ibus_mozc \
+		renderer/renderer.gyp:mozc_renderer \
+		unix/fcitx/fcitx.gyp:fcitx-mozc \
+		unix/fcitx5/fcitx5.gyp:fcitx5-mozc
 
 	sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' out_linux/Release/gen/unix/ibus/mozc.xml
 }
@@ -82,15 +83,16 @@ do_install() {
 	vinstall out_linux/Release/mozc_server 755 usr/lib/mozc
 	vinstall out_linux/Release/mozc_tool 755 usr/lib/mozc
 
-	head -n 29 server/mozc_server.cc > LICENSE
-	for i in LICENSE data/installer/*.html; do
-		vlicense "$i"
-	done
+	head -n 29 unix/fcitx5/fcitx_key_translator.cc >mozc.LICENSE
+	vlicense mozc.LICENSE
+	vlicense data/installer/credits_en.html
+	vlicense third_party/japanese_usage_dictionary/LICENSE dict.LICENSE
 }
 
 ibus-mozc_package() {
 	short_desc="Mozc engine for IBus - Client of the Mozc input method"
 	depends="${sourcepkg}-${version}_${revision} ibus>=1.5.14"
+	lib32disabled=yes
 	pkg_install() {
 		vinstall out_linux/Release/ibus_mozc 755 usr/lib/ibus-mozc ibus-engine-mozc
 		vinstall out_linux/Release/gen/unix/ibus/mozc.xml 644 usr/share/ibus/component
@@ -105,6 +107,7 @@ ibus-mozc_package() {
 emacs-mozc_package() {
 	pkgdesc="Mozc for Emacs"
 	depends="${sourcepkg}-${version}_${revision} emacs"
+	lib32disabled=yes
 	pkg_install() {
 		vbin out_linux/Release/mozc_emacs_helper
 		vinstall unix/emacs/mozc.el 644 usr/share/emacs/site-lisp/emacs-mozc
@@ -115,10 +118,40 @@ fcitx-mozc_package() {
 	short_desc="Mozc engine for fcitx - Client of the Mozc input method"
 	depends="${sourcepkg}-${version}_${revision} fcitx>=4.2.9"
 	homepage="https://fcitx-im.org/"
-	license="GPL-2.0-or-later"
+	lib32disabled=yes
 	pkg_install() {
+		local _file _lang
 		vinstall out_linux/Release/fcitx-mozc.so 644 usr/lib/fcitx
 		vinstall unix/fcitx/fcitx-mozc.conf 644 usr/share/fcitx/addon
 		vinstall unix/fcitx/mozc.conf 644 usr/share/fcitx/inputmethod
+		vinstall data/images/unix/ime_product_icon_opensource-32.png \
+			644 usr/share/fcitx/icon mozc.png
+		for _file in out_linux/Release/gen/unix/fcitx/po/*.mo
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.mo}
+			vinstall "$_file" 644 usr/share/locale/$_lang fcitx-mozc.mo
+		done
+	}
+}
+
+fcitx5-mozc_package() {
+	short_desc="Mozc engine for fcitx v5"
+	depends="${sourcepkg}-${version}_${revision} fcitx5"
+	homepage="https://fcitx-im.org/"
+	lib32disabled=yes
+	pkg_install() {
+		local _file _lang
+		vinstall out_linux/Release/fcitx5-mozc.so 644 usr/lib/fcitx5
+		vinstall unix/fcitx5/mozc-addon.conf 644 \
+			usr/share/fcitx5/addon mozc.conf
+		vinstall unix/fcitx5/mozc.conf 644 usr/share/fcitx5/inputmethod
+		for _file in unix/fcitx5/po/*.po
+		do
+			_lang=${_file##*/}
+			_lang=${_lang%.po}
+			vmkdir usr/share/locale/$_lang
+			msgfmt "$_file" -o $PKGDESTDIR/usr/share/locale/$_lang/fcitx5-mozc.mo
+		done
 	}
 }
diff --git a/srcpkgs/mozc/update b/srcpkgs/mozc/update
new file mode 100644
index 000000000000..5a7df464ba79
--- /dev/null
+++ b/srcpkgs/mozc/update
@@ -0,0 +1,2 @@
+# Google never tags any releases.
+ignore="*"

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (6 preceding siblings ...)
  2021-05-01  1:53 ` [PR PATCH] [Updated] " sgn
@ 2021-05-01  2:00 ` sgn
  2021-05-01  2:01 ` [PR PATCH] [Merged]: " sgn
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-05-01  2:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-830488315

Comment:
> For the patch, I noticed that the Reiwa era is already in `src/data/dictionary_manual/era.txt`, should we use that instead?

Yay, that should work. I started from an old version and the latest version has the era already.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Merged]: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (7 preceding siblings ...)
  2021-05-01  2:00 ` sgn
@ 2021-05-01  2:01 ` sgn
  2021-05-01 10:27 ` mvf
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sgn @ 2021-05-01  2:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

There's a merged pull request on the void-packages repository

mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
https://github.com/void-linux/void-packages/pull/30492

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (8 preceding siblings ...)
  2021-05-01  2:01 ` [PR PATCH] [Merged]: " sgn
@ 2021-05-01 10:27 ` mvf
  2021-05-01 12:18 ` ericonr
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mvf @ 2021-05-01 10:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

New comment by mvf on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-830608487

Comment:
Sorry, there just wasn't enough time for me to look into this. This change has issues, most notably it breaks `ibus-mozc` on Qt WebEngine apps like `anki` and `qutebrowser` (that's why I stopped updating). So it's either a revert or an `ibus-mozc` removal (or we figure out why it stopped working after 2.23.2815.102).

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (9 preceding siblings ...)
  2021-05-01 10:27 ` mvf
@ 2021-05-01 12:18 ` ericonr
  2021-05-01 12:33 ` mvf
  2021-05-01 13:30 ` mvf
  12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2021-05-01 12:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-830623662

Comment:
@mvf can you open an issue to track this, please?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (10 preceding siblings ...)
  2021-05-01 12:18 ` ericonr
@ 2021-05-01 12:33 ` mvf
  2021-05-01 13:30 ` mvf
  12 siblings, 0 replies; 14+ messages in thread
From: mvf @ 2021-05-01 12:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

New comment by mvf on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-830625588

Comment:
@ericonr Will do. Turns out the version update was unavoidable since `fcitx-mozc` was rebased and the old sources are simply no longer available. I will submit a followup change.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mozc: update to 2.26.4353.100. (new package for fcitx5-mozc)
  2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
                   ` (11 preceding siblings ...)
  2021-05-01 12:33 ` mvf
@ 2021-05-01 13:30 ` mvf
  12 siblings, 0 replies; 14+ messages in thread
From: mvf @ 2021-05-01 13:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

New comment by mvf on void-packages repository

https://github.com/void-linux/void-packages/pull/30492#issuecomment-830625588

Comment:
@ericonr Will do. ~Turns out the version update was unavoidable since `fcitx-mozc` was rebased and the old sources are simply no longer available.~ I will submit a followup change.

Edit: The old sources are available after all. Just missed it at first because both GitLab (old upstream) and GitHub (new upstream) changed their tarball URLs. But anyway, the update seems worth it. Arch doesn't ship `ibus-mozc` either and it's inferior to `fcitx`.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-01 13:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25 15:55 [PR PATCH] [WIP] mozc: update to 2.26.4346.100. (new package for fcitx5-mozc) sgn
2021-04-27  1:26 ` [PR PATCH] [Updated] " sgn
2021-04-30  7:56 ` sgn
2021-04-30  7:57 ` mozc: update to 2.26.4353.100. " sgn
2021-04-30  7:57 ` sgn
2021-04-30  8:04 ` sgn
2021-04-30 13:51 ` noarchwastaken
2021-05-01  1:53 ` [PR PATCH] [Updated] " sgn
2021-05-01  2:00 ` sgn
2021-05-01  2:01 ` [PR PATCH] [Merged]: " sgn
2021-05-01 10:27 ` mvf
2021-05-01 12:18 ` ericonr
2021-05-01 12:33 ` mvf
2021-05-01 13:30 ` mvf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).