Skip to content

Commit

Permalink
mozc: use new vsrcextract
Browse files Browse the repository at this point in the history
  • Loading branch information
sgn committed Jul 11, 2023
1 parent fdeb37c commit 7b60d06
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 47 deletions.
12 changes: 6 additions & 6 deletions srcpkgs/mozc/patches/abseil.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ 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
--- a/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
+++ b/src/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
@@ -46,8 +46,8 @@

// The following platforms have an implementation of a hardware counter.
Expand All @@ -20,8 +20,8 @@ An all-in-one patch that fixes several issues:
#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
--- a/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
+++ b/src/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
@@ -27,6 +27,10 @@
#include <csignal>
#include <cstdio>
Expand All @@ -45,8 +45,8 @@ An all-in-one patch that fixes several issues:
#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
--- a/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
+++ b/src/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
@@ -59,7 +59,7 @@
#elif defined(__i386__) || defined(__x86_64__)
#define ABSL_STACKTRACE_INL_HEADER \
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/mozc/patches/common.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/mozc/src/config.bzl
+++ b/mozc/src/config.bzl
--- a/src/config.bzl
+++ b/src/config.bzl
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/mozc/patches/cross.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/mozc/src/gyp/common.gypi
+++ b/mozc/src/gyp/common.gypi
--- a/src/gyp/common.gypi
+++ b/src/gyp/common.gypi
@@ -409,12 +409,12 @@
'conditions': [
['target_platform=="Linux"', {
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/mozc/patches/cxx-stdlib.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/mozc/src/gyp/common.gypi
+++ b/mozc/src/gyp/common.gypi
--- a/src/gyp/common.gypi
+++ b/src/gyp/common.gypi
@@ -73,9 +73,6 @@
'-Wno-deprecated-declarations',
'-Wwrite-strings',
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/mozc/patches/fcitx.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/mozc/src/unix/fcitx/fcitx.gyp
+++ b/mozc/src/unix/fcitx/fcitx.gyp
--- a/src/unix/fcitx/fcitx.gyp
+++ b/src/unix/fcitx/fcitx.gyp
@@ -96,7 +96,7 @@
'<@(fcitx_dep_include_dirs)',
],
Expand Down
32 changes: 16 additions & 16 deletions srcpkgs/mozc/patches/latomic.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/mozc/src/gui/gui.gyp
+++ b/mozc/src/gui/gui.gyp
--- a/src/gui/gui.gyp
+++ b/src/gui/gui.gyp
@@ -794,6 +794,13 @@
'tool/mozc_tool_main_noqt.cc',
],
Expand All @@ -14,8 +14,8 @@
# 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
--- a/src/gyp/defines.gypi
+++ b/src/gyp/defines.gypi
@@ -68,6 +68,9 @@
# use_libibus represents if ibus library is used or not.
# This option is only for Linux.
Expand All @@ -26,8 +26,8 @@
},
'target_defaults': {
'defines': [
--- a/mozc/src/renderer/renderer.gyp
+++ b/mozc/src/renderer/renderer.gyp
--- a/src/renderer/renderer.gyp
+++ b/src/renderer/renderer.gyp
@@ -600,6 +600,15 @@
'../base/base.gyp:crash_report_handler',
'mozc_renderer_lib',
Expand All @@ -44,8 +44,8 @@
},
{
'target_name': 'gtk_renderer_test',
--- a/mozc/src/server/server.gyp
+++ b/mozc/src/server/server.gyp
--- a/src/server/server.gyp
+++ b/src/server/server.gyp
@@ -55,6 +55,13 @@
'mozc_server_lib',
],
Expand All @@ -60,8 +60,8 @@
['OS=="mac"', {
'product_name': '<(branding)Converter',
'sources': [
--- a/mozc/src/unix/emacs/emacs.gyp
+++ b/mozc/src/unix/emacs/emacs.gyp
--- a/src/unix/emacs/emacs.gyp
+++ b/src/unix/emacs/emacs.gyp
@@ -47,6 +47,15 @@
'../../protocol/protocol.gyp:config_proto',
'mozc_emacs_helper_lib',
Expand All @@ -78,8 +78,8 @@
},
{
'target_name': 'mozc_emacs_helper_lib',
--- a/mozc/src/unix/fcitx/fcitx.gyp
+++ b/mozc/src/unix/fcitx/fcitx.gyp
--- a/src/unix/fcitx/fcitx.gyp
+++ b/src/unix/fcitx/fcitx.gyp
@@ -98,6 +98,15 @@
'defines': [
'LOCALEDIR="/usr/share/locale/"',
Expand All @@ -96,8 +96,8 @@
},
],
}, {
--- a/mozc/src/unix/fcitx5/fcitx5.gyp
+++ b/mozc/src/unix/fcitx5/fcitx5.gyp
--- a/src/unix/fcitx5/fcitx5.gyp
+++ b/src/unix/fcitx5/fcitx5.gyp
@@ -105,6 +105,15 @@
'defines': [
'FCITX_GETTEXT_DOMAIN="fcitx5-mozc"',
Expand All @@ -114,8 +114,8 @@
},
],
}, {
--- a/mozc/src/unix/ibus/ibus.gyp
+++ b/mozc/src/unix/ibus/ibus.gyp
--- a/src/unix/ibus/ibus.gyp
+++ b/src/unix/ibus/ibus.gyp
@@ -241,6 +241,15 @@
'ibus_mozc_lib',
'ibus_mozc_metadata',
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/mozc/patches/no-parallel.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/mozc/src/build_mozc.py
+++ b/mozc/src/build_mozc.py
--- a/src/build_mozc.py
+++ b/src/build_mozc.py
@@ -494,6 +494,7 @@ def GypMain(options, unused_args):
gyp_options.extend(['--generator-output=.'])
short_basename = GetBuildShortBaseName(target_platform)
Expand Down
25 changes: 10 additions & 15 deletions srcpkgs/mozc/template
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ _commit=056163a5fddbb261b258beb8444998e4882f0cc5
_abseil=20211102.0
_gyp=0.1+20220404git9ecf45e
_jpn_dict=e5b3425575734c323e1d947009dd74709437b684
create_wrksrc=yes
build_wrksrc=mozc/src
build_wrksrc=src
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
Expand All @@ -32,6 +31,11 @@ checksum="259d87bfd7535ad03bd554185677d7345a90166353a6db0b6a3606183ad2923d

CXXFLAGS="-D_GNU_SOURCE"
lib32disabled=yes
skip_extraction="
$_abseil.tar.gz
gyp_$_gyp.orig.tar.xz
$_jpn_dict.tar.gz
"

if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
broken="Does not build"
Expand All @@ -42,19 +46,10 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
fi

post_extract() {
mv mozc-* mozc

# symlink "submodules" into place
for _src_dest in gyp \
abseil-cpp \
japanese-usage-dictionary:japanese_usage_dictionary
do
_src=${_src_dest%:*}
_dst=${_src_dest#*:}
mv $_src-* $_dst
rmdir mozc/src/third_party/$_dst
ln -sr $_dst mozc/src/third_party
done
vsrcextract -C src/third_party/abseil-cpp "$_abseil.tar.gz"
vsrcextract -C src/third_party/gyp "gyp_$_gyp.orig.tar.xz"
vsrcextract -C src/third_party/japanese_usage_dictionary \
"$_jpn_dict.tar.gz"
}

do_configure() {
Expand Down

0 comments on commit 7b60d06

Please sign in to comment.