Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] mozc: update to 2.26.4472.100.
@ 2021-08-23 15:31 ashpooljh
  2021-08-23 16:19 ` [PR PATCH] [Closed]: " sgn
  0 siblings, 1 reply; 2+ messages in thread
From: ashpooljh @ 2021-08-23 15:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ashpooljh/void-packages master
https://github.com/void-linux/void-packages/pull/32646

mozc: update to 2.26.4472.100.
<!-- 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?
- [x] 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.)
- [x] 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
-->

---

This update contains, among other things, a fix for the bug [mozc#510](https://github.com/google/mozc/issues/510), which was disrupting the use of Anki.
`patches/unsigned-int.patch` is removed as the equivalent changes have now been incorporated into the upstream.

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

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

From 233c6d982a78b861eea20548755592cd32866d95 Mon Sep 17 00:00:00 2001
From: Artem Zhurikhin <ashpool@xecut.net>
Date: Mon, 23 Aug 2021 18:21:23 +0300
Subject: [PATCH] mozc: update to 2.26.4472.100.

---
 srcpkgs/mozc/patches/unsigned-int.patch | 200 ------------------------
 srcpkgs/mozc/template                   |   6 +-
 2 files changed, 3 insertions(+), 203 deletions(-)
 delete mode 100644 srcpkgs/mozc/patches/unsigned-int.patch

diff --git a/srcpkgs/mozc/patches/unsigned-int.patch b/srcpkgs/mozc/patches/unsigned-int.patch
deleted file mode 100644
index 55ff9f83c81b..000000000000
--- a/srcpkgs/mozc/patches/unsigned-int.patch
+++ /dev/null
@@ -1,200 +0,0 @@
---- a/mozc/src/gui/word_register_dialog/word_register_dialog.cc
-+++ b/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("");
---- a/mozc/src/unix/fcitx/surrounding_text_util.cc
-+++ b/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,
---- a/mozc/src/unix/fcitx/surrounding_text_util.h
-+++ b/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);
---- a/mozc/src/unix/fcitx5/surrounding_text_util.cc
-+++ b/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;
---- a/mozc/src/unix/fcitx5/surrounding_text_util.h
-+++ b/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 c352959b9f58..97add001f896 100644
--- a/srcpkgs/mozc/template
+++ b/srcpkgs/mozc/template
@@ -1,9 +1,9 @@
 # Template file for 'mozc'
 pkgname=mozc
 # src/data/version/mozc_version_template.bzl
-version=2.26.4416.102
+version=2.26.4472.100
 revision=1
-_commit=86b2623896042dd6e123371fb582314c6988888b
+_commit=439a610ac6b6a92375b4a8188d6c9ef45ea591dd
 _abseil=20210324.1
 create_wrksrc=yes
 build_wrksrc=mozc/src
@@ -22,7 +22,7 @@ distfiles="
  ${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="68614d1283e52b3d7035f76e587ed057a3292d6dc25d61100122dc0fd8942c15
+checksum="1c04e8548a15d88710c9e4469d21b13ea05d62ffda6be7859837503895b5a39b
  441db7c09a0565376ecacf0085b2d4c2bbedde6115d7773551bc116212c2a8d6
  8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
  0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"

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

* Re: [PR PATCH] [Closed]: mozc: update to 2.26.4472.100.
  2021-08-23 15:31 [PR PATCH] mozc: update to 2.26.4472.100 ashpooljh
@ 2021-08-23 16:19 ` sgn
  0 siblings, 0 replies; 2+ messages in thread
From: sgn @ 2021-08-23 16:19 UTC (permalink / raw)
  To: ml

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

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

mozc: update to 2.26.4472.100.
https://github.com/void-linux/void-packages/pull/32646

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?
- [x] 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.)
- [x] 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
-->

---

This update contains, among other things, a fix for the bug [mozc#510](https://github.com/google/mozc/issues/510), which was disrupting the use of Anki.
`patches/unsigned-int.patch` is removed as the equivalent changes have now been incorporated into the upstream.

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

end of thread, other threads:[~2021-08-23 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 15:31 [PR PATCH] mozc: update to 2.26.4472.100 ashpooljh
2021-08-23 16:19 ` [PR PATCH] [Closed]: " sgn

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).