diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2023-09-26 18:45:03 -0400 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2023-09-26 18:45:03 -0400 |
commit | 494dc91fdb70986d73ece89c1ee94c8a70b8dd85 (patch) | |
tree | 302f0722a62c5c950e9e2a98080f6875ceb4c74e /app-i18n | |
parent | sys-apps/portage: Stabilize 3.0.51 ppc64, #914771 (diff) | |
download | gentoo-494dc91fdb70986d73ece89c1ee94c8a70b8dd85.tar.gz gentoo-494dc91fdb70986d73ece89c1ee94c8a70b8dd85.tar.bz2 gentoo-494dc91fdb70986d73ece89c1ee94c8a70b8dd85.zip |
app-i18n/mozc: Fix build with -fcitx4
Closes: https://bugs.gentoo.org/914770
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'app-i18n')
3 files changed, 30 insertions, 29 deletions
diff --git a/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch b/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch new file mode 100644 index 000000000000..b7ebce42348e --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch @@ -0,0 +1,29 @@ +diff --git a/src/unix/fcitx/surrounding_text_util.cc b/src/unix/fcitx/surrounding_text_util.cc +index b2d533c..76357cd 100644 +--- a/src/unix/fcitx/surrounding_text_util.cc ++++ b/src/unix/fcitx/surrounding_text_util.cc +@@ -233,9 +233,9 @@ bool GetSurroundingText(FcitxInstance* instance, + + const size_t selection_start = std::min(cursor_pos, anchor_pos); + const size_t selection_length = std::abs(info->relative_selected_length); +- info->preceding_text = Util::Utf8SubString(surrounding_text, 0, selection_start); +- info->selection_text = Util::Utf8SubString(surrounding_text, selection_start, selection_length); +- info->following_text = Util::Utf8SubString(surrounding_text, selection_start + selection_length); ++ info->preceding_text = std::string(Util::Utf8SubString(surrounding_text, 0, selection_start)); ++ info->selection_text = std::string(Util::Utf8SubString(surrounding_text, selection_start, selection_length)); ++ info->following_text = std::string(Util::Utf8SubString(surrounding_text, selection_start + selection_length)); + return true; + } + +diff --git a/src/unix/fcitx/eim.cc b/src/unix/fcitx/eim.cc +index 4da2e80..fc7a9ff 100644 +--- a/src/unix/fcitx/eim.cc ++++ b/src/unix/fcitx/eim.cc +@@ -33,6 +33,7 @@ + #include <fcitx/module.h> + #include <fcitx/keys.h> + #include <fcitx-config/xdg.h> ++#undef InvokeFunction + #include "fcitx_mozc.h" + #include "mozc_connection.h" + #include "mozc_response_parser.h diff --git a/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0.patch b/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0.patch index fcc1be4d4b8d..5e134bd1f003 100644 --- a/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0.patch +++ b/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0.patch @@ -11,32 +11,3 @@ index 932f6ac..35e5a22 100644 ], }, }, -diff --git a/src/unix/fcitx/surrounding_text_util.cc b/src/unix/fcitx/surrounding_text_util.cc -index b2d533c..76357cd 100644 ---- a/src/unix/fcitx/surrounding_text_util.cc -+++ b/src/unix/fcitx/surrounding_text_util.cc -@@ -233,9 +233,9 @@ bool GetSurroundingText(FcitxInstance* instance, - - const size_t selection_start = std::min(cursor_pos, anchor_pos); - const size_t selection_length = std::abs(info->relative_selected_length); -- info->preceding_text = Util::Utf8SubString(surrounding_text, 0, selection_start); -- info->selection_text = Util::Utf8SubString(surrounding_text, selection_start, selection_length); -- info->following_text = Util::Utf8SubString(surrounding_text, selection_start + selection_length); -+ info->preceding_text = std::string(Util::Utf8SubString(surrounding_text, 0, selection_start)); -+ info->selection_text = std::string(Util::Utf8SubString(surrounding_text, selection_start, selection_length)); -+ info->following_text = std::string(Util::Utf8SubString(surrounding_text, selection_start + selection_length)); - return true; - } - -diff --git a/src/unix/fcitx/eim.cc b/src/unix/fcitx/eim.cc -index 4da2e80..fc7a9ff 100644 ---- a/src/unix/fcitx/eim.cc -+++ b/src/unix/fcitx/eim.cc -@@ -33,6 +33,7 @@ - #include <fcitx/module.h> - #include <fcitx/keys.h> - #include <fcitx-config/xdg.h> -+#undef InvokeFunction - #include "fcitx_mozc.h" - #include "mozc_connection.h" - #include "mozc_response_parser.h diff --git a/app-i18n/mozc/mozc-2.28.5029.102-r1.ebuild b/app-i18n/mozc/mozc-2.28.5029.102-r1.ebuild index f9b3f38102d8..df14388aa428 100644 --- a/app-i18n/mozc/mozc-2.28.5029.102-r1.ebuild +++ b/app-i18n/mozc/mozc-2.28.5029.102-r1.ebuild @@ -154,6 +154,7 @@ src_unpack() { src_prepare() { if use fcitx4; then cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die + PATCHES+=( "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch ) fi pushd "${WORKDIR}/${P}" > /dev/null || die |