From 51b58fc754349cf254292863323a7b41a300923c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 10 Feb 2022 08:57:30 +0700 Subject: [PATCH] mozc: update to 2.26.4632.102. --- srcpkgs/mozc/patches/abseil.patch | 12 ++++--- srcpkgs/mozc/patches/absl-20211102.patch | 11 ++++++ srcpkgs/mozc/patches/common.patch | 10 +++--- srcpkgs/mozc/patches/conflict-macro.patch | 13 +++++++ srcpkgs/mozc/patches/cxx-stdlib.patch | 43 ++++++++++++++--------- srcpkgs/mozc/patches/latomic.patch | 8 ++--- srcpkgs/mozc/patches/no-parallel.patch | 2 +- srcpkgs/mozc/template | 18 ++++------ 8 files changed, 72 insertions(+), 45 deletions(-) create mode 100644 srcpkgs/mozc/patches/absl-20211102.patch create mode 100644 srcpkgs/mozc/patches/conflict-macro.patch diff --git a/srcpkgs/mozc/patches/abseil.patch b/srcpkgs/mozc/patches/abseil.patch index adfefada9b4..a41507550f9 100644 --- a/srcpkgs/mozc/patches/abseil.patch +++ b/srcpkgs/mozc/patches/abseil.patch @@ -9,15 +9,17 @@ An all-in-one patch that fixes several issues: --- a/abseil-cpp/absl/base/internal/unscaledcycleclock.h +++ b/abseil-cpp/absl/base/internal/unscaledcycleclock.h -@@ -46,7 +46,7 @@ +@@ -46,8 +46,8 @@ // 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) +- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \ +- defined(_M_IX86) || defined(_M_X64) ++ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ ++ defined(__riscv) || defined(_M_IX86) || defined(_M_X64) #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 #else + #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 0 --- a/abseil-cpp/absl/debugging/internal/examine_stack.cc +++ b/abseil-cpp/absl/debugging/internal/examine_stack.cc @@ -27,6 +27,10 @@ @@ -45,7 +47,7 @@ An all-in-one patch that fixes several issues: #elif defined(__s390__) && !defined(__s390x__) --- a/abseil-cpp/absl/debugging/internal/stacktrace_config.h +++ b/abseil-cpp/absl/debugging/internal/stacktrace_config.h -@@ -55,7 +55,7 @@ +@@ -59,7 +59,7 @@ #elif defined(__i386__) || defined(__x86_64__) #define ABSL_STACKTRACE_INL_HEADER \ "absl/debugging/internal/stacktrace_x86-inl.inc" diff --git a/srcpkgs/mozc/patches/absl-20211102.patch b/srcpkgs/mozc/patches/absl-20211102.patch new file mode 100644 index 00000000000..9cdaf56273d --- /dev/null +++ b/srcpkgs/mozc/patches/absl-20211102.patch @@ -0,0 +1,11 @@ +--- a/mozc/src/unix/fcitx/fcitx_mozc.cc ++++ b/mozc/src/unix/fcitx/fcitx_mozc.cc +@@ -413,7 +413,7 @@ void FcitxMozc::InitializeBar() + ); + + if ( mozc::FileUtil::FileExists ( mozc::FileUtil::JoinPath ( +- mozc::SystemUtil::GetServerDirectory(), mozc::kMozcTool ) ) ) ++ mozc::SystemUtil::GetServerDirectory(), mozc::kMozcTool ) ).ok() ) + { + FcitxUIRegisterComplexStatus(instance, this, + "mozc-tool", diff --git a/srcpkgs/mozc/patches/common.patch b/srcpkgs/mozc/patches/common.patch index 61fb58b136c..dfe16cd30ae 100644 --- a/srcpkgs/mozc/patches/common.patch +++ b/srcpkgs/mozc/patches/common.patch @@ -1,11 +1,9 @@ --- a/mozc/src/config.bzl +++ b/mozc/src/config.bzl -@@ -30,9 +30,9 @@ - - BRANDING = "Mozc" - - LINUX_MOZC_SERVER_DIRECTORY = "/usr/lib/mozc" - IBUS_MOZC_ICON_PATH = "/usr/share/ibus-mozc/product_icon.png" +@@ -34,7 +34,7 @@ LINUX_MOZC_SERVER_DIR = "/usr/lib/mozc" + LINUX_MOZC_DOCUMENT_DIR = LINUX_MOZC_SERVER_DIR + "/documents" + IBUS_MOZC_INSTALL_DIR = "/usr/share/ibus-mozc" + IBUS_MOZC_ICON_PATH = IBUS_MOZC_INSTALL_DIR + "/product_icon.png" -IBUS_MOZC_PATH = "/usr/lib/ibus-mozc/ibus-engine-mozc" +IBUS_MOZC_PATH = "/usr/lib/ibus/ibus-engine-mozc" diff --git a/srcpkgs/mozc/patches/conflict-macro.patch b/srcpkgs/mozc/patches/conflict-macro.patch new file mode 100644 index 00000000000..3046feacd03 --- /dev/null +++ b/srcpkgs/mozc/patches/conflict-macro.patch @@ -0,0 +1,13 @@ +--- a/mozc/src/unix/fcitx/surrounding_text_util.cc ++++ b/mozc/src/unix/fcitx/surrounding_text_util.cc +@@ -34,6 +34,10 @@ + #include + #include + ++#ifdef InvokeFunction ++#undef InvokeFunction ++#endif ++ + #include "base/port.h" + #include "base/logging.h" + #include "base/util.h" diff --git a/srcpkgs/mozc/patches/cxx-stdlib.patch b/srcpkgs/mozc/patches/cxx-stdlib.patch index e2262b4c248..0b77ea1f052 100644 --- a/srcpkgs/mozc/patches/cxx-stdlib.patch +++ b/srcpkgs/mozc/patches/cxx-stdlib.patch @@ -1,6 +1,16 @@ --- a/mozc/src/gyp/common.gypi +++ b/mozc/src/gyp/common.gypi -@@ -105,7 +105,7 @@ +@@ -73,9 +73,6 @@ + '-Wno-deprecated-declarations', + '-Wwrite-strings', + '<@(extra_warning_cflags)', +- +- '-Wno-unknown-warning-option', +- '-Wno-inconsistent-missing-override', + ], + + # gcc_cflags will be shared with Mac and Linux +@@ -105,7 +102,7 @@ ], # Libraries for GNU/Linux environment. 'linux_ldflags': [ @@ -9,19 +19,18 @@ '-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', +@@ -123,10 +120,10 @@ + 'compiler_host_version_int': 304, # Clang 3.4 or higher + }], + ['target_platform=="Linux"', { +- 'compiler_target': 'clang', +- 'compiler_target_version_int': 304, # Clang 3.4 or higher +- 'compiler_host': 'clang', +- 'compiler_host_version_int': 304, # Clang 3.4 or higher ++ 'compiler_target': 'gcc', ++ 'compiler_target_version_int': 1000, # Clang 3.4 or higher ++ 'compiler_host': 'gcc', ++ 'compiler_host_version_int': 1000, # Clang 3.4 or higher + }], + ], + }, diff --git a/srcpkgs/mozc/patches/latomic.patch b/srcpkgs/mozc/patches/latomic.patch index ba9f048cf4d..1d3aab9ab90 100644 --- a/srcpkgs/mozc/patches/latomic.patch +++ b/srcpkgs/mozc/patches/latomic.patch @@ -1,6 +1,6 @@ --- a/mozc/src/gui/gui.gyp +++ b/mozc/src/gui/gui.gyp -@@ -791,6 +791,13 @@ +@@ -794,6 +794,13 @@ 'tool/mozc_tool_main_noqt.cc', ], }], @@ -28,7 +28,7 @@ 'defines': [ --- a/mozc/src/renderer/renderer.gyp +++ b/mozc/src/renderer/renderer.gyp -@@ -592,6 +592,15 @@ +@@ -600,6 +600,15 @@ '../base/base.gyp:crash_report_handler', 'mozc_renderer_lib', ], @@ -62,7 +62,7 @@ 'sources': [ --- a/mozc/src/unix/emacs/emacs.gyp +++ b/mozc/src/unix/emacs/emacs.gyp -@@ -46,6 +46,15 @@ +@@ -47,6 +47,15 @@ '../../protocol/protocol.gyp:config_proto', 'mozc_emacs_helper_lib', ], @@ -116,7 +116,7 @@ }, { --- a/mozc/src/unix/ibus/ibus.gyp +++ b/mozc/src/unix/ibus/ibus.gyp -@@ -239,6 +239,15 @@ +@@ -241,6 +241,15 @@ 'ibus_mozc_lib', 'ibus_mozc_metadata', ], diff --git a/srcpkgs/mozc/patches/no-parallel.patch b/srcpkgs/mozc/patches/no-parallel.patch index a14e28045a4..9220808c9b3 100644 --- a/srcpkgs/mozc/patches/no-parallel.patch +++ b/srcpkgs/mozc/patches/no-parallel.patch @@ -1,6 +1,6 @@ --- a/mozc/src/build_mozc.py +++ b/mozc/src/build_mozc.py -@@ -496,6 +496,7 @@ def GypMain(options, unused_args): +@@ -494,6 +494,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/template b/srcpkgs/mozc/template index f10095f057f..fc66b74bed0 100644 --- a/srcpkgs/mozc/template +++ b/srcpkgs/mozc/template @@ -2,10 +2,10 @@ pkgname=mozc # src/data/version/mozc_version_template.bzl # revision is always 102, template always says 100 ;) -version=2.26.4472.102 -revision=2 -_commit=439a610ac6b6a92375b4a8188d6c9ef45ea591dd -_abseil=20210324.1 +version=2.26.4632.102 +revision=1 +_commit=06024d8567dd96eea7a1745e82a5d699a56f4ba5 +_abseil=20211102.0 create_wrksrc=yes build_wrksrc=mozc/src hostmakedepends="gettext ninja pkg-config protobuf protobuf-devel @@ -23,8 +23,8 @@ 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="1c04e8548a15d88710c9e4469d21b13ea05d62ffda6be7859837503895b5a39b - 441db7c09a0565376ecacf0085b2d4c2bbedde6115d7773551bc116212c2a8d6 +checksum="9a143d83fcd26921c20b00759b0b3d4994b78a0b7570cf818742acb5c45c1527 + dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4 8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1" @@ -55,12 +55,6 @@ post_extract() { done } -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() { GYP_DEFINES=" document_dir=/usr/share/licenses/${pkgname}