mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 02:12:55 +02:00
mozc: update to 2.32.5851.102.
This commit is contained in:
parent
0298d7ef2e
commit
bf8d98672c
12 changed files with 278 additions and 354 deletions
|
@ -1 +0,0 @@
|
|||
mozc
|
|
@ -7,22 +7,9 @@ An all-in-one patch that fixes several issues:
|
|||
2) powerpc stacktrace implementation only works on glibc (disabled on musl)
|
||||
4) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
|
||||
|
||||
--- a/abseil-cpp/absl/base/internal/unscaledcycleclock.h
|
||||
+++ b/abseil-cpp/absl/base/internal/unscaledcycleclock.h
|
||||
@@ -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(__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 @@
|
||||
@@ -36,6 +36,10 @@
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
|
||||
|
@ -33,21 +20,21 @@ An all-in-one patch that fixes several issues:
|
|||
#include "absl/base/attributes.h"
|
||||
#include "absl/base/internal/raw_logging.h"
|
||||
#include "absl/base/macros.h"
|
||||
@@ -63,8 +67,10 @@ void* GetProgramCounter(void* vuc) {
|
||||
@@ -177,8 +181,10 @@ void* GetProgramCounter(void* const vuc)
|
||||
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*>(context->uc_mcontext.uc_regs->gregs[32]);
|
||||
return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]);
|
||||
+#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__)
|
||||
--- a/abseil-cpp/absl/debugging/internal/stacktrace_config.h
|
||||
+++ b/abseil-cpp/absl/debugging/internal/stacktrace_config.h
|
||||
@@ -59,7 +59,7 @@
|
||||
@@ -67,7 +67,7 @@
|
||||
#elif defined(__i386__) || defined(__x86_64__)
|
||||
#define ABSL_STACKTRACE_INL_HEADER \
|
||||
"absl/debugging/internal/stacktrace_x86-inl.inc"
|
||||
|
@ -56,3 +43,16 @@ An all-in-one patch that fixes several issues:
|
|||
#define ABSL_STACKTRACE_INL_HEADER \
|
||||
"absl/debugging/internal/stacktrace_powerpc-inl.inc"
|
||||
#elif defined(__aarch64__)
|
||||
--- a/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
|
||||
+++ b/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
// The following platforms have an implementation of a hardware counter.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
|
||||
- defined(__powerpc__) || defined(__ppc__) || defined(_M_IX86) || \
|
||||
- (defined(_M_X64) && !defined(_M_ARM64EC))
|
||||
+ (defined(__powerpc__) || defined(__ppc__) && defined(__GLIBC__)) || \
|
||||
+ defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
|
||||
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
|
||||
#else
|
||||
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 0
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- a/mozc/src/config.bzl
|
||||
+++ b/mozc/src/config.bzl
|
||||
@@ -34,7 +34,7 @@ LINUX_MOZC_SERVER_DIR = "/usr/lib/mozc"
|
||||
LINUX_MOZC_DOCUMENT_DIR = LINUX_MOZC_SERVER_DIR + "/documents"
|
||||
@@ -44,7 +44,7 @@ LINUX_MOZC_DOCUMENT_DIR = LINUX_MOZC_SER
|
||||
IBUS_COMPONENT_DIR = "/usr/share/ibus/component"
|
||||
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/libexec/ibus-engine-mozc"
|
||||
EMACS_MOZC_CLIENT_DIR = "/usr/share/emacs/site-lisp/emacs-mozc"
|
||||
EMACS_MOZC_HELPER_DIR = "/usr/bin"
|
||||
|
||||
MACOS_BUNDLE_ID_PREFIX = "org.mozc.inputmethod.Japanese"
|
||||
MACOS_MIN_OS_VER = "10.12"
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
--- a/mozc/src/gyp/common.gypi
|
||||
+++ b/mozc/src/gyp/common.gypi
|
||||
@@ -409,12 +409,12 @@
|
||||
'conditions': [
|
||||
['target_platform=="Linux"', {
|
||||
'make_global_settings': [
|
||||
- ['AR', '<!(which ar)'],
|
||||
- ['CC', '<!(which clang)'],
|
||||
- ['CXX', '<!(which clang++)'],
|
||||
- ['LD', '<!(which ld)'],
|
||||
- ['NM', '<!(which nm)'],
|
||||
- ['READELF', '<!(which readelf)'],
|
||||
+ ['AR', '<!(which ${AR_target:-ar})'],
|
||||
+ ['CC', '<!(which ${CC_target:-cc})'],
|
||||
+ ['CXX', '<!(which ${CXX_target:-c++})'],
|
||||
+ ['LD', '<!(which ${LD_target:-ld})'],
|
||||
+ ['NM', '<!(which ${NM_target:-nm})'],
|
||||
+ ['READELF', '<!(which ${READELF_target:-readelf})'],
|
||||
],
|
||||
}],
|
||||
['target_platform=="Android"', {
|
||||
@@ -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'],
|
||||
- ['AR.host', '<!(which ar)'],
|
||||
- ['CC.host', '<!(which clang)'],
|
||||
- ['CXX.host', '<!(which clang++)'],
|
||||
- ['LD.host', '<!(which ld)'],
|
||||
- ['NM.host', '<!(which nm)'],
|
||||
- ['READELF.host', '<!(which readelf)'],
|
||||
+ ['AR.host', '<!(which ${AR:-ar})'],
|
||||
+ ['CC.host', '<!(which ${CC:-cc})'],
|
||||
+ ['CXX.host', '<!(which ${CXX:-c++})'],
|
||||
+ ['LD.host', '<!(which ${LD:-ld})'],
|
||||
+ ['NM.host', '<!(which ${NM:-nm})'],
|
||||
+ ['READELF.host', '<!(which ${READELF:-readelf})'],
|
||||
],
|
||||
}],
|
||||
],
|
|
@ -1,36 +0,0 @@
|
|||
--- a/mozc/src/gyp/common.gypi
|
||||
+++ b/mozc/src/gyp/common.gypi
|
||||
@@ -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': [
|
||||
- '-lc++',
|
||||
+ '-lstdc++',
|
||||
'-pthread',
|
||||
],
|
||||
|
||||
@@ -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
|
||||
}],
|
||||
],
|
||||
},
|
|
@ -1,11 +0,0 @@
|
|||
--- a/mozc/src/unix/fcitx/fcitx.gyp
|
||||
+++ b/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/"',
|
||||
],
|
||||
},
|
||||
],
|
|
@ -1,134 +0,0 @@
|
|||
--- a/mozc/src/gui/gui.gyp
|
||||
+++ b/mozc/src/gui/gui.gyp
|
||||
@@ -794,6 +794,13 @@
|
||||
'tool/mozc_tool_main_noqt.cc',
|
||||
],
|
||||
}],
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
# For Mac, ConfigDialog is the host app for necessary frameworks.
|
||||
['OS=="win"', {
|
||||
'product_name': '<(tool_product_name_win)',
|
||||
--- a/mozc/src/gyp/defines.gypi
|
||||
+++ b/mozc/src/gyp/defines.gypi
|
||||
@@ -68,6 +68,9 @@
|
||||
# use_libibus represents if ibus library is used or not.
|
||||
# This option is only for Linux.
|
||||
'use_libibus%': '0',
|
||||
+
|
||||
+ # use_libatomic represents if libatomic is required or not
|
||||
+ 'use_libatomic%': '0',
|
||||
},
|
||||
'target_defaults': {
|
||||
'defines': [
|
||||
--- a/mozc/src/renderer/renderer.gyp
|
||||
+++ b/mozc/src/renderer/renderer.gyp
|
||||
@@ -600,6 +600,15 @@
|
||||
'../base/base.gyp:crash_report_handler',
|
||||
'mozc_renderer_lib',
|
||||
],
|
||||
+ 'conditions': [
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
},
|
||||
{
|
||||
'target_name': 'gtk_renderer_test',
|
||||
--- a/mozc/src/server/server.gyp
|
||||
+++ b/mozc/src/server/server.gyp
|
||||
@@ -55,6 +55,13 @@
|
||||
'mozc_server_lib',
|
||||
],
|
||||
'conditions': [
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
['OS=="mac"', {
|
||||
'product_name': '<(branding)Converter',
|
||||
'sources': [
|
||||
--- a/mozc/src/unix/emacs/emacs.gyp
|
||||
+++ b/mozc/src/unix/emacs/emacs.gyp
|
||||
@@ -47,6 +47,15 @@
|
||||
'../../protocol/protocol.gyp:config_proto',
|
||||
'mozc_emacs_helper_lib',
|
||||
],
|
||||
+ 'conditions': [
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
},
|
||||
{
|
||||
'target_name': 'mozc_emacs_helper_lib',
|
||||
--- a/mozc/src/unix/fcitx/fcitx.gyp
|
||||
+++ b/mozc/src/unix/fcitx/fcitx.gyp
|
||||
@@ -98,6 +98,15 @@
|
||||
'defines': [
|
||||
'LOCALEDIR="/usr/share/locale/"',
|
||||
],
|
||||
+ 'conditions': [
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
--- a/mozc/src/unix/fcitx5/fcitx5.gyp
|
||||
+++ b/mozc/src/unix/fcitx5/fcitx5.gyp
|
||||
@@ -105,6 +105,15 @@
|
||||
'defines': [
|
||||
'FCITX_GETTEXT_DOMAIN="fcitx5-mozc"',
|
||||
],
|
||||
+ 'conditions': [
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
--- a/mozc/src/unix/ibus/ibus.gyp
|
||||
+++ b/mozc/src/unix/ibus/ibus.gyp
|
||||
@@ -241,6 +241,15 @@
|
||||
'ibus_mozc_lib',
|
||||
'ibus_mozc_metadata',
|
||||
],
|
||||
+ 'conditions': [
|
||||
+ ['use_libatomic==1', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-latomic',
|
||||
+ ],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
},
|
||||
{
|
||||
'target_name': 'ibus_mozc_test',
|
|
@ -1,10 +0,0 @@
|
|||
--- a/mozc/src/build_mozc.py
|
||||
+++ b/mozc/src/build_mozc.py
|
||||
@@ -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])
|
||||
+ gyp_options.extend(['--no-parallel']) # Parallel generation requires writable /dev/shm
|
||||
|
||||
# Enable cross-compile
|
||||
# TODO(yukawa): Enable GYP_CROSSCOMPILE for Windows.
|
154
srcpkgs/mozc/patches/oss-musl.patch
Normal file
154
srcpkgs/mozc/patches/oss-musl.patch
Normal file
|
@ -0,0 +1,154 @@
|
|||
--- a/mozc/src/.bazelrc
|
||||
+++ b/mozc/src/.bazelrc
|
||||
@@ -4,6 +4,7 @@ startup --windows_enable_symlinks # ig
|
||||
## Target platforms
|
||||
common:linux --config=linux_env --define TARGET=oss_linux
|
||||
common:oss_linux --config=linux_env --define TARGET=oss_linux
|
||||
+common:oss_musl --config=linux_env --define TARGET=oss_musl
|
||||
common:prod_linux --config=linux_env --define TARGET=prod_linux
|
||||
|
||||
common:macos --config=macos_env --define TARGET=oss_macos
|
||||
--- a/mozc/src/MODULE.bazel
|
||||
+++ b/mozc/src/MODULE.bazel
|
||||
@@ -229,6 +229,19 @@ pkg_config_repository(
|
||||
],
|
||||
)
|
||||
|
||||
+# pkg_config_repository(
|
||||
+# name = "fts",
|
||||
+# packages = [
|
||||
+# "musl-fts",
|
||||
+# ],
|
||||
+# )
|
||||
+
|
||||
+new_local_repository(
|
||||
+ name = "fts",
|
||||
+ build_file = "BUILD.fts.bazel",
|
||||
+ path = "/usr",
|
||||
+)
|
||||
+
|
||||
# Qt for Linux
|
||||
pkg_config_repository(
|
||||
name = "qt_linux",
|
||||
--- a/mozc/src/base/file/BUILD.bazel
|
||||
+++ b/mozc/src/base/file/BUILD.bazel
|
||||
@@ -97,6 +97,9 @@ mozc_cc_library(
|
||||
"//bazel/win32:pathcch",
|
||||
"@com_microsoft_wil//:wil",
|
||||
],
|
||||
+ oss_musl = [
|
||||
+ "@fts",
|
||||
+ ],
|
||||
),
|
||||
)
|
||||
|
||||
--- a/mozc/src/build_defs.bzl
|
||||
+++ b/mozc/src/build_defs.bzl
|
||||
@@ -777,6 +777,7 @@ def mozc_select(
|
||||
macos = None,
|
||||
oss_android = None,
|
||||
oss_linux = None,
|
||||
+ oss_musl = None,
|
||||
oss_macos = None,
|
||||
oss_windows = None,
|
||||
prod = None,
|
||||
@@ -791,6 +792,7 @@ def mozc_select(
|
||||
android: android > client > default
|
||||
ios,chromiumos,wasm,linux: same with android.
|
||||
oss_linux: oss_linux > oss > linux > client > default
|
||||
+ oss_musl: oss_musl > oss_linux > oss > linux > client > default
|
||||
|
||||
Args:
|
||||
default: default fallback value.
|
||||
@@ -805,6 +807,7 @@ def mozc_select(
|
||||
macos: value for macOS build.
|
||||
oss_android: value for OSS Android build.
|
||||
oss_linux: value for OSS Linux build.
|
||||
+ oss_musl: value for OSS Linux with musl libc build.
|
||||
oss_macos: value for OSS macOS build.
|
||||
oss_windows: value for OSS Windows build.
|
||||
prod: value for prod build.
|
||||
@@ -827,6 +830,7 @@ def mozc_select(
|
||||
"//bazel/cc_target_os:linux": _get_value([linux, client, default]),
|
||||
"//bazel/cc_target_os:oss_android": _get_value([oss_android, oss, android, client, default]),
|
||||
"//bazel/cc_target_os:oss_linux": _get_value([oss_linux, oss, linux, client, default]),
|
||||
+ "//bazel/cc_target_os:oss_musl": _get_value([oss_musl, oss_linux, oss, linux, client, default]),
|
||||
"//bazel/cc_target_os:oss_macos": _get_value([oss_macos, oss, macos, ios, client, default]),
|
||||
"//bazel/cc_target_os:oss_windows": _get_value([oss_windows, oss, windows, client, default]),
|
||||
"//bazel/cc_target_os:prod_linux": _get_value([prod_linux, prod, oss_linux, oss, linux, client, default]),
|
||||
--- a/mozc/src/rewriter/BUILD.bazel
|
||||
+++ b/mozc/src/rewriter/BUILD.bazel
|
||||
@@ -36,6 +36,7 @@ load(
|
||||
"mozc_cc_library",
|
||||
"mozc_cc_test",
|
||||
"mozc_py_binary",
|
||||
+ "mozc_select",
|
||||
"mozc_select_enable_usage_rewriter",
|
||||
)
|
||||
|
||||
@@ -913,7 +914,11 @@ mozc_cc_binary(
|
||||
"@com_google_absl//absl/status:statusor",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:span",
|
||||
- ],
|
||||
+ ] + mozc_select(
|
||||
+ oss_musl = [
|
||||
+ "@fts",
|
||||
+ ],
|
||||
+ ),
|
||||
)
|
||||
|
||||
mozc_cc_binary(
|
||||
--- a/mozc/src/BUILD.bazel
|
||||
+++ b/mozc/src/BUILD.bazel
|
||||
@@ -251,6 +251,7 @@ selects.config_setting_group(
|
||||
# TODO(yuryu): define platforms and use bazel_platforms.
|
||||
"//bazel/cc_target_os:linux",
|
||||
"//bazel/cc_target_os:oss_linux",
|
||||
+ "//bazel/cc_target_os:oss_musl",
|
||||
"//bazel/cc_target_os:prod_linux",
|
||||
"//bazel/cc_target_os:darwin",
|
||||
"//bazel/cc_target_os:oss_macos",
|
||||
@@ -274,6 +275,7 @@ selects.config_setting_group(
|
||||
# TODO(yuryu): define platforms and use bazel_platforms.
|
||||
"//bazel/cc_target_os:linux",
|
||||
"//bazel/cc_target_os:oss_linux",
|
||||
+ "//bazel/cc_target_os:oss_musl",
|
||||
"//bazel/cc_target_os:prod_linux",
|
||||
"//bazel/cc_target_os:darwin",
|
||||
"//bazel/cc_target_os:oss_macos",
|
||||
--- a/mozc/src/bazel/cc_target_os/BUILD.bazel
|
||||
+++ b/mozc/src/bazel/cc_target_os/BUILD.bazel
|
||||
@@ -95,6 +95,13 @@ config_setting(
|
||||
)
|
||||
|
||||
config_setting(
|
||||
+ name = "oss_musl",
|
||||
+ values = {
|
||||
+ "define": "TARGET=oss_musl",
|
||||
+ },
|
||||
+)
|
||||
+
|
||||
+config_setting(
|
||||
name = "prod_linux",
|
||||
values = {
|
||||
"define": "TARGET=prod_linux",
|
||||
--- /dev/null
|
||||
+++ b/mozc/src/BUILD.fts.bazel
|
||||
@@ -0,0 +1,16 @@
|
||||
+package(
|
||||
+ default_visibility = ["//visibility:public"],
|
||||
+)
|
||||
+
|
||||
+cc_library(
|
||||
+ name = "fts",
|
||||
+ hdrs = [
|
||||
+ "include/fts.h",
|
||||
+ ],
|
||||
+ includes = [
|
||||
+ "include",
|
||||
+ ],
|
||||
+ linkopts = [
|
||||
+ "-lfts",
|
||||
+ ],
|
||||
+)
|
|
@ -1,10 +0,0 @@
|
|||
--- a/mozc/src/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h
|
||||
+++ b/mozc/src/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <cstddef>
|
||||
+#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ostream>
|
||||
|
32
srcpkgs/mozc/patches/system-python.patch
Normal file
32
srcpkgs/mozc/patches/system-python.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
--- a/mozc/src/MODULE.bazel
|
||||
+++ b/mozc/src/MODULE.bazel
|
||||
@@ -63,6 +63,29 @@ bazel_dep(
|
||||
version = "1.4.1",
|
||||
)
|
||||
|
||||
+local_runtime_repo = use_repo_rule(
|
||||
+ "@rules_python//python/local_toolchains:repos.bzl",
|
||||
+ "local_runtime_repo",
|
||||
+)
|
||||
+
|
||||
+local_runtime_toolchains_repo = use_repo_rule(
|
||||
+ "@rules_python//python/local_toolchains:repos.bzl",
|
||||
+ "local_runtime_toolchains_repo",
|
||||
+)
|
||||
+
|
||||
+local_runtime_repo(
|
||||
+ name = "local_python3",
|
||||
+ interpreter_path = "python3",
|
||||
+ on_failure = "fail",
|
||||
+)
|
||||
+
|
||||
+local_runtime_toolchains_repo(
|
||||
+ name = "local_toolchains",
|
||||
+ runtimes = ["local_python3"],
|
||||
+)
|
||||
+
|
||||
+register_toolchains("@local_toolchains//:all", dev_dependency = True)
|
||||
+
|
||||
# Bazel macOS build (3.22.0 2025-05-20)
|
||||
# https://github.com/bazelbuild/rules_apple
|
||||
bazel_dep(
|
|
@ -2,19 +2,19 @@
|
|||
pkgname=mozc
|
||||
# src/data/version/mozc_version_template.bzl
|
||||
# revision is always 102, template always says 100 ;)
|
||||
version=2.28.4800.102
|
||||
revision=2
|
||||
_commit=056163a5fddbb261b258beb8444998e4882f0cc5
|
||||
_abseil=20211102.0
|
||||
version=2.32.5851.102
|
||||
revision=1
|
||||
_commit=963c63ff06ccfb40c6d3893d4209423c3d77d003
|
||||
_abseil=20250512.0
|
||||
_protobuf_commit=cc7b1b53234cd7a8f50d90ac3933b240dcf4cd97
|
||||
_gyp=0.1+20220404git9ecf45e
|
||||
_jpn_dict=e5b3425575734c323e1d947009dd74709437b684
|
||||
create_wrksrc=yes
|
||||
build_wrksrc=mozc/src
|
||||
hostmakedepends="gettext ninja pkg-config
|
||||
python3-six which qt5-qmake qt5-host-tools"
|
||||
makedepends="gtk+-devel ibus-devel libzinnia-devel qt5-devel
|
||||
fcitx-devel libfcitx5-devel"
|
||||
hostmakedepends="gettext ninja pkg-config bazel
|
||||
python3-six which qt6-base"
|
||||
makedepends="gtk+-devel ibus-devel libzinnia-devel qt6-base-devel
|
||||
libfcitx5-devel"
|
||||
depends="tegaki-zinnia-japanese>=0.3 mozc-base-${version}_${revision}"
|
||||
short_desc="Japanese IME (Open Source version of Google Japanese Input)"
|
||||
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
||||
|
@ -27,8 +27,8 @@ distfiles="
|
|||
${DEBIAN_SITE}/main/g/gyp/gyp_$_gyp.orig.tar.xz
|
||||
https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/$_jpn_dict.tar.gz
|
||||
"
|
||||
checksum="259d87bfd7535ad03bd554185677d7345a90166353a6db0b6a3606183ad2923d
|
||||
dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4
|
||||
checksum="762814b67aee49d378896fa5026ae8d2cad3f385f99846729429aee34b04a1c4
|
||||
7262daa7c1711406248c10f41026d685e88223bc92817d16fb93c19adb57f669
|
||||
863e27f6d24f40bce2bbfe5adcf365f2af5479ea917f254331ee60ce88f8c8a5
|
||||
0325006f012db66dfa27bf7bb048f3fe38f96e512ebe065930cbc70bcdc06bc9
|
||||
0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"
|
||||
|
@ -39,6 +39,15 @@ lib32disabled=yes
|
|||
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
||||
broken="Does not build"
|
||||
fi
|
||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||
makedepends+=" musl-fts-devel"
|
||||
LDFLAGS=-lfts
|
||||
fi
|
||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||
broken="I don't want to do it"
|
||||
fi
|
||||
# Well, it's bazel
|
||||
nocross="The include path '/usr/aarch64-linux-gnu/usr/include' references a path outside of the execution root."
|
||||
|
||||
post_extract() {
|
||||
mv mozc-* mozc
|
||||
|
@ -57,82 +66,73 @@ post_extract() {
|
|||
done
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
GYP_DEFINES="
|
||||
document_dir=/usr/share/licenses/${pkgname}
|
||||
ibus_mozc_path=/usr/libexec/ibus-engine-mozc
|
||||
use_libzinnia=1
|
||||
${XBPS_TARGET_NO_ATOMIC8:+use_libatomic=1}
|
||||
" python3 build_mozc.py gyp --target_platform=Linux
|
||||
}
|
||||
|
||||
do_build() {
|
||||
local config=oss_linux
|
||||
local _file _lang
|
||||
local _modir=out_linux/Release/gen/unix/fcitx5/po
|
||||
|
||||
python3 build_mozc.py build \
|
||||
--use_gyp_for_ibus_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
|
||||
|
||||
mkdir -p $_modir
|
||||
for _file in unix/fcitx5/po/*.po
|
||||
do
|
||||
_lang=${_file##*/}
|
||||
_lang=${_lang%.po}
|
||||
msgfmt "$_file" -o $_modir/$_lang.mo
|
||||
local flag
|
||||
local _bazel_opts="-s --verbose_failures"
|
||||
for flag in $CFLAGS; do
|
||||
_bazel_opts+=" --conlyopt=$flag"
|
||||
# For -fstack-protector ...
|
||||
_bazel_opts+=" --linkopt=$flag"
|
||||
done
|
||||
msgfmt --xml -d unix/fcitx5/po \
|
||||
--template unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml.in \
|
||||
-o $_modir/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml
|
||||
for flag in $CXXFLAGS; do
|
||||
_bazel_opts+=" --cxxopt=$flag"
|
||||
_bazel_opts+=" --linkopt=$flag"
|
||||
done
|
||||
for flag in $LDFLAGS; do
|
||||
_bazel_opts+=" --linkopt=$flag"
|
||||
done
|
||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||
config=oss_musl
|
||||
fi
|
||||
bazel build -c opt --config "$config" --define server=1 \
|
||||
--worker_quit_after_build \
|
||||
${_bazel_opts} \
|
||||
server:mozc_server \
|
||||
gui/tool:mozc_tool \
|
||||
unix/emacs:mozc_emacs_helper \
|
||||
unix/ibus:ibus_mozc \
|
||||
renderer/qt:mozc_renderer \
|
||||
unix/fcitx5:fcitx5-mozc.so
|
||||
chmod -R u+rwX /tmp
|
||||
|
||||
cd unix/fcitx5
|
||||
msgfmt --xml -d po \
|
||||
--template org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml.in \
|
||||
-o org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml
|
||||
|
||||
cd po
|
||||
for _file in *.po
|
||||
do
|
||||
_lang=${_file%.po}
|
||||
msgfmt "$_file" -o $_lang.mo
|
||||
done
|
||||
}
|
||||
|
||||
do_install() {
|
||||
local f
|
||||
# Base package
|
||||
vinstall out_linux/Release/mozc_server 755 usr/lib/mozc
|
||||
vinstall bazel-bin/server/mozc_server 755 usr/lib/mozc
|
||||
vlicense data/installer/credits_en.html license.html
|
||||
head -n 29 unix/fcitx5/fcitx_key_translator.cc >fcitx.LICENSE
|
||||
vlicense fcitx.LICENSE
|
||||
# emacs
|
||||
vbin out_linux/Release/mozc_emacs_helper
|
||||
vbin bazel-bin/unix/emacs/mozc_emacs_helper
|
||||
vinstall unix/emacs/mozc.el 644 usr/share/emacs/site-lisp
|
||||
# Qt5 tools
|
||||
vinstall out_linux/Release/mozc_tool 755 usr/lib/mozc
|
||||
vinstall bazel-bin/gui/tool/mozc_tool 755 usr/lib/mozc
|
||||
# ibus
|
||||
vinstall out_linux/Release/ibus_mozc 755 usr/libexec ibus-engine-mozc
|
||||
vinstall out_linux/Release/gen/unix/ibus/mozc.xml 644 \
|
||||
usr/share/ibus/component
|
||||
vinstall bazel-bin/unix/ibus/ibus_mozc 755 usr/libexec ibus-engine-mozc
|
||||
vinstall bazel-bin/unix/ibus/mozc.xml 644 usr/share/ibus/component
|
||||
vinstall data/images/product_icon_32bpp-128.png 644 \
|
||||
usr/share/ibus-mozc product_icon.png
|
||||
for f in data/images/unix/48x48/*.png; do
|
||||
vinstall "$f" 644 usr/share/ibus-mozc
|
||||
done
|
||||
vinstall out_linux/Release/mozc_renderer 755 usr/lib/mozc
|
||||
# fcitx
|
||||
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/product_icon_32bpp-128.png 644 \
|
||||
usr/share/fcitx/mozc/icon mozc.png
|
||||
for f in dictionary properties tool; do
|
||||
vinstall ../scripts/icons/ui-$f.png 644 \
|
||||
usr/share/fcitx/mozc/icon mozc-$f.png
|
||||
done
|
||||
for f in alpha_full alpha_half direct \
|
||||
hiragana katakana_full katakana_half; do
|
||||
vinstall data/images/unix/48x48/$f.png 644 \
|
||||
usr/share/fcitx/mozc/icon mozc-$f.png
|
||||
done
|
||||
vinstall bazel-bin/renderer/qt/mozc_renderer 755 usr/lib/mozc
|
||||
# fcitx5
|
||||
vinstall out_linux/Release/fcitx5-mozc.so 644 usr/lib/fcitx5
|
||||
vinstall bazel-bin/unix/fcitx5/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
|
||||
|
@ -149,8 +149,6 @@ do_install() {
|
|||
vinstall data/images/unix/48x48/$f.png 644 \
|
||||
usr/share/icons/hicolor/48x48/apps fcitx-mozc-${f/_/-}.png
|
||||
done
|
||||
vinstall out_linux/Release/gen/unix/fcitx5/po/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml \
|
||||
644 usr/share/metainfo/
|
||||
}
|
||||
|
||||
mozc-base_package() {
|
||||
|
@ -177,29 +175,11 @@ ibus-mozc_package() {
|
|||
}
|
||||
}
|
||||
|
||||
fcitx-mozc_package() {
|
||||
short_desc="Mozc engine for fcitx - Client of the Mozc input method"
|
||||
depends="mozc-base-${version}_${revision} fcitx>=4.2.9"
|
||||
homepage="https://fcitx-im.org/"
|
||||
lib32disabled=yes
|
||||
pkg_install() {
|
||||
local _file _lang
|
||||
vmove usr/lib/fcitx
|
||||
vmove usr/share/fcitx
|
||||
# vmove "usr/share/locale/*/LC_MESSAGES/fcitx-mozc.mo"
|
||||
for _file in out_linux/Release/gen/unix/fcitx/po/*.mo
|
||||
do
|
||||
_lang=${_file##*/}
|
||||
_lang=${_lang%.mo}
|
||||
vinstall "$_file" 644 \
|
||||
usr/share/locale/$_lang/LC_MESSAGES fcitx-mozc.mo
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
fcitx5-mozc_package() {
|
||||
short_desc="Mozc engine for fcitx v5"
|
||||
depends="mozc-base-${version}_${revision} fcitx5"
|
||||
provides="fcitx-mozc-5_1"
|
||||
replaces="fcitx-mozc>=0"
|
||||
homepage="https://fcitx-im.org/"
|
||||
lib32disabled=yes
|
||||
pkg_install() {
|
||||
|
@ -207,14 +187,14 @@ fcitx5-mozc_package() {
|
|||
vmove usr/lib/fcitx5
|
||||
vmove usr/share/fcitx5
|
||||
vmove usr/share/icons
|
||||
# vmove "usr/share/locale/*/LC_MESSAGES/fcitx5-mozc.mo"
|
||||
for _file in out_linux/Release/gen/unix/fcitx5/po/*.mo
|
||||
vinstall unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml \
|
||||
644 usr/share/metainfo/
|
||||
for _file in unix/fcitx5/po/*.mo
|
||||
do
|
||||
_lang=${_file##*/}
|
||||
_lang=${_lang%.mo}
|
||||
vinstall "$_file" 644 \
|
||||
usr/share/locale/$_lang/LC_MESSAGES fcitx5-mozc.mo
|
||||
done
|
||||
vmove usr/share/metainfo
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue