summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO55
-rw-r--r--PKGBUILD108
-rw-r--r--android-fix.patch16
-rw-r--r--config-arch-new.patch58
4 files changed, 155 insertions, 82 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 47bf6618770..419b9688065 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,33 +1,44 @@
pkgbase = mozc-ut-united
- pkgdesc = IBus engine module for Mozc with UT dictionary
- pkgver = 2.23.2815.102.20201229
+ pkgdesc = A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)
+ pkgver = 2.28.4715.102_20220423_2.26.4660.102.r106.g4c5d516f
pkgrel = 1
- url = https://code.google.com/p/mozc/
url = https://osdn.net/users/utuhiro/pf/utuhiro/files/
arch = i686
arch = x86_64
license = BSD
license = GPL
license = custom
- makedepends = python
makedepends = ruby
makedepends = git
makedepends = ninja
makedepends = clang
- makedepends = gyp
+ makedepends = zinnia
+ makedepends = bazel
+ makedepends = python-six
depends = qt5-base
- depends = ibus>=1.4.1
depends = zinnia
- source = mozc::git+https://github.com/google/mozc.git#commit=afb03ddfe72dde4cf2409863a3bfea160f7a66d8
- source = https://raw.githubusercontent.com/OrangeJuicelol/mozc-ut-united/master/mozc.patch
- source = https://raw.githubusercontent.com/OrangeJuicelol/mozc-ut-united/master/Add_support_new_Japanese_era.patch
- source = https://raw.githubusercontent.com/OrangeJuicelol/mozc-ut-united/master/Change-from-python2-code-to-python3.patch
- source = https://github.com/OrangeJuicelol/mozc-ut-united/raw/master/mozcdic-ut-20201229.1.tar.bz2
+ source = mozc::git+https://github.com/google/mozc.git
+ source = https://osdn.net/downloads/users/38/38352/mozcdic-ut-20220423.tar.bz2
+ source = config-arch-new.patch
+ source = git+https://chromium.googlesource.com/breakpad/breakpad
+ source = git+https://github.com/google/googletest.git
+ source = git+https://chromium.googlesource.com/external/gyp
+ source = git+https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git
+ source = git+https://github.com/open-source-parsers/jsoncpp.git
+ source = git+https://github.com/google/protobuf.git
+ source = git+https://github.com/abseil/abseil-cpp.git
+ source = android-fix.patch
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
sha1sums = SKIP
- sha1sums = a366077418ae6f235aecf374256354a40dc5b37a
- sha1sums = 3aa3077cb28352f9aafde71f8d864b333424338f
- sha1sums = f363373e892ac53b972cb092a3627b3a4fbc5b6a
- sha1sums = f248798642153122628b41c62a7329c9be4f8e52
pkgname = mozc-ut-united
pkgdesc = A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)
@@ -36,7 +47,7 @@ pkgname = mozc-ut-united
depends = qt5-base
depends = zinnia
optdepends = tegaki-models-zinnia-japanese: hand-writing recognition support
- provides = mozc=2.23.2815.102
+ provides = mozc=2.28.4715.102
conflicts = mozc
conflicts = mozc-ut-unified
conflicts = mozc-neologd-ut
@@ -53,15 +64,3 @@ pkgname = ibus-mozc-ut-united
provides = ibus-mozc
conflicts = ibus-mozc
conflicts = ibus-mozc-ut2
-
-pkgname = emacs-mozc-ut-united
- pkgdesc = Emacs engine module for Mozc with UT dictionary
- arch = i686
- arch = x86_64
- depends = emacs
- provides = emacs-mozc
- conflicts = emacs-mozc
- conflicts = emacs-mozc-ut2
- conflicts = emacs-mozc-bin
-
-
diff --git a/PKGBUILD b/PKGBUILD
index 4f7b20b74ef..806be6eff02 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: OrangeJuicelol <tep789 at gmail dot com>
+# Maintainer: silverhikari <kerrickethan at gmail dot com>
+# Contributor: OrangeJuicelol <tep789 at gmail dot com>
# Contributor: Rylie <chiefdoraemon at gmail dot com>
# Contributor: ponsfoot <cabezon dot hashimoto at gmail dot com>
@@ -22,34 +23,22 @@ _bldtype=Release
# https://osdn.net/users/utuhiro/pf/utuhiro/files/
#*************************************************************
-_mozcrev=afb03ddfe72dde4cf2409863a3bfea160f7a66d8
-_mozcver=2.23.2815.102
-_utdicdate=20201229
+_mozcver=2.28.4715.102
+_utdicdate=20220423
_utdicver=1
pkgbase=mozc-ut-united
pkgname=mozc-ut-united
true && pkgname=('mozc-ut-united')
-pkgver=${_mozcver}.${_utdicdate}
+pkgver=2.28.4715.102_20220423_2.26.4660.102.r106.g4c5d516f
pkgrel=1
arch=('i686' 'x86_64')
url="https://code.google.com/p/mozc/"
url="https://osdn.net/users/utuhiro/pf/utuhiro/files/"
license=('BSD' 'GPL' 'custom')
-makedepends=('python' 'ruby' 'git' 'ninja' 'clang' 'gyp')
-#source=("${_svndir}/${_svnmod}::svn+${_svntrunk}")
-source=(
- mozc::git+https://github.com/google/mozc.git#commit=${_mozcrev}
- https://raw.githubusercontent.com/OrangeJuicelol/mozc-ut-united/master/mozc.patch
- https://raw.githubusercontent.com/OrangeJuicelol/mozc-ut-united/master/Add_support_new_Japanese_era.patch
- https://raw.githubusercontent.com/OrangeJuicelol/mozc-ut-united/master/Change-from-python2-code-to-python3.patch
- https://github.com/OrangeJuicelol/mozc-ut-united/raw/master/mozcdic-ut-${_utdicdate}.${_utdicver}.tar.bz2
-)
-sha1sums=('SKIP'
- 'a366077418ae6f235aecf374256354a40dc5b37a'
- '3aa3077cb28352f9aafde71f8d864b333424338f'
- 'f363373e892ac53b972cb092a3627b3a4fbc5b6a'
- 'f248798642153122628b41c62a7329c9be4f8e52')
+makedepends=('ruby' 'git' 'ninja' 'clang' 'zinnia' 'bazel' 'python-six')
+source=("mozc::git+https://github.com/google/mozc.git" "https://osdn.net/downloads/users/38/38352/mozcdic-ut-${_utdicdate}.tar.bz2" "config-arch-new.patch" "git+https://chromium.googlesource.com/breakpad/breakpad" "git+https://github.com/google/googletest.git" "git+https://chromium.googlesource.com/external/gyp" "git+https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git" "git+https://github.com/open-source-parsers/jsoncpp.git" "git+https://github.com/google/protobuf.git" "git+https://github.com/abseil/abseil-cpp.git" "android-fix.patch")
+sha1sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
if [[ "$_emacs_mozc" == "yes" ]]; then
@@ -61,27 +50,37 @@ if [[ "$_ibus_mozc" == "yes" ]]; then
true && pkgname+=('ibus-mozc-ut-united')
fi
-
pkgver() {
- printf "%s.%s" $_mozcver $_utdicdate
-}
+ cd "${srcdir}/mozc/"
+ printf "%s_%s_%s" "${_mozcver}" "${_utdicdate}" "$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
+}
prepare() {
# Enabling all dictionaries
- sed -i '/^#.*="true"/ s/^#//' ${srcdir}/mozcdic-ut-${_utdicdate}.${_utdicver}/src/make-dictionaries.sh
+ sed -i '/^#.*="true"/ s/^#//' ${srcdir}/mozcdic-ut-${_utdicdate}/src/make-dictionaries.sh
mkdir -p mozc/src/third_party
cd "${srcdir}/mozc/"
- git submodule update --init --recursive
- patch -Np1 -i ${srcdir}/mozc.patch
- patch -Np1 -i ${srcdir}/Change-from-python2-code-to-python3.patch
- patch -Np1 -i ${srcdir}/Add_support_new_Japanese_era.patch
-
+
+ git submodule init
+ git config submodule.breakpad.url "$srcdir/breakpad"
+ git config submodule.gtest.url "$srcdir/googletest"
+ git config submodule.gyp.url "$srcdir/gyp"
+ git config submodule.japanese_usage_dictionary.url "$srcdir/japanese-usage-dictionary"
+ git config submodule.jsoncpp.url "$srcdir/jsoncpp"
+ git config submodule.protobuf.url "$srcdir/protobuf"
+ git config submodule.abseil-cpp.url "$srcdir/abseil-cpp"
+ git submodule update
+
# Add UT dictionary
- cat ${srcdir}/mozcdic-ut-${_utdicdate}.${_utdicver}/mozcdic*-ut-*.txt >> src/data/dictionary_oss/dictionary00.txt
-}
+ cat ${srcdir}/mozcdic-ut-${_utdicdate}/mozcdic*-ut-*.txt >> src/data/dictionary_oss/dictionary00.txt
+ #fixes file include locations for ibus, and gtk along with correcting qt location on arch
+ patch -d "${srcdir}/mozc/src" -i "${srcdir}/config-arch-new.patch"
+ patch -d "${srcdir}/mozc/src" -i "${srcdir}/android-fix.patch"
+
+}
build() {
echo '====================================================='
@@ -99,17 +98,11 @@ build() {
echo "Starting make..."
- _targets="server/server.gyp:mozc_server gui/gui.gyp:mozc_tool "
- [[ "$_emacs_mozc" == "yes" ]] && _targets+="unix/emacs/emacs.gyp:mozc_emacs_helper "
- [[ "$_ibus_mozc" == "yes" ]] && _targets+="unix/ibus/ibus.gyp:ibus_mozc renderer/renderer.gyp:mozc_renderer "
-
- GYP_DEFINES="use_libzinnia=1 document_dir=/usr/share/licenses/${pkgbase}" \
- python build_mozc.py gyp --gypdir=/usr/bin --target_platform=Linux
- python build_mozc.py build -c $_bldtype $_targets
+ bazel --output_user_root="$srcdir/bazel-cache" build package --config oss_linux -c opt
if [[ "$_ibus_mozc" == "yes" ]]; then
sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' \
- out_linux/${_bldtype}/gen/unix/ibus/mozc.xml
+ "${srcdir}/mozc/src/bazel-out/k8-opt/bin/unix/ibus/mozc.xml"
fi
}
@@ -121,22 +114,23 @@ package_mozc-ut-united() {
conflicts=('mozc' 'mozc-ut-unified' 'mozc-neologd-ut' 'mozc-ut2' 'mozc-neologd-ut+ut2' 'mozc-server' 'mozc-utils-gui')
optdepends=('tegaki-models-zinnia-japanese: hand-writing recognition support')
- cd "${srcdir}/mozc"
- install -D -m 755 src/out_linux/${_bldtype}/mozc_server "${pkgdir}/usr/lib/mozc/mozc_server"
- install -m 755 src/out_linux/${_bldtype}/mozc_tool "${pkgdir}/usr/lib/mozc/mozc_tool"
+ _output="${srcdir}/mozc/src/bazel-out/k8-opt/bin"
+
+ install -D -m 755 "${_output}/server/mozc_server" "${pkgdir}/usr/lib/mozc/mozc_server"
+ install -m 755 "${_output}/gui/tool/mozc_tool" "${pkgdir}/usr/lib/mozc/mozc_tool"
install -d "${pkgdir}/usr/lib/mozc/documents/"
- install -m 644 src/data/installer/*.html "${pkgdir}/usr/lib/mozc/documents/"
+ install -m 644 "${srcdir}/mozc/src/data/installer/credits_en.html" "${pkgdir}/usr/lib/mozc/documents/"
_licpath="${pkgdir}/usr/share/licenses/${pkgbase}"
- install -D -m 644 LICENSE "${_licpath}/LICENSE_MOZC"
- install -m 644 src/data/installer/*.html "${_licpath}"
+ install -D -m 644 "${srcdir}/mozc/LICENSE" "${_licpath}/LICENSE_MOZC"
+ install -m 644 "${srcdir}/mozc/src/data/installer/credits_en.html" "${_licpath}"
- cd "${srcdir}/mozcdic-ut-${_utdicdate}.${_utdicver}"
- install -m 644 README.md "${_licpath}/README_MOZC-UT.md"
+ cd "${srcdir}/mozcdic-ut-${_utdicdate}"
+ install -m 644 "README.md" "${_licpath}/README_MOZC-UT.md"
cd "${srcdir}/mozc"
- cp -rf docs/ "${_licpath}/"
+ cp -rf "docs/" "${_licpath}/"
chmod 644 -R "${_licpath}/docs/"
}
@@ -148,9 +142,12 @@ package_ibus-mozc-ut-united() {
conflicts=('ibus-mozc' 'ibus-mozc-ut2')
cd "${srcdir}/mozc/src"
- install -D -m 755 out_linux/${_bldtype}/ibus_mozc "${pkgdir}/usr/lib/ibus-mozc/ibus-engine-mozc"
- install -D -m 644 out_linux/${_bldtype}/gen/unix/ibus/mozc.xml "${pkgdir}/usr/share/ibus/component/mozc.xml"
- install -D -m 644 data/images/unix/ime_product_icon_opensource-32.png "${pkgdir}/usr/share/ibus-mozc/product_icon.png"
+
+ _output="${srcdir}/mozc/src/bazel-out/k8-opt/bin"
+
+ install -D -m 644 "${_output}/unix/ibus/mozc.xml" "${pkgdir}/usr/share/ibus/component/mozc.xml"
+ install -D -m 755 "${_output}/unix/ibus/ibus_mozc" "${pkgdir}/usr/lib/ibus-mozc/ibus-engine-mozc"
+ install -D -m 644 "data/images/unix/ime_product_icon_opensource-32.png" "${pkgdir}/usr/share/ibus-mozc/product_icon.png"
install -m 644 data/images/unix/ui-tool.png "${pkgdir}/usr/share/ibus-mozc/tool.png"
install -m 644 data/images/unix/ui-properties.png "${pkgdir}/usr/share/ibus-mozc/properties.png"
install -m 644 data/images/unix/ui-dictionary.png "${pkgdir}/usr/share/ibus-mozc/dictionary.png"
@@ -161,7 +158,7 @@ package_ibus-mozc-ut-united() {
install -m 644 data/images/unix/ui-alpha_half.png "${pkgdir}/usr/share/ibus-mozc/alpha_half.png"
install -m 644 data/images/unix/ui-alpha_full.png "${pkgdir}/usr/share/ibus-mozc/alpha_full.png"
- install -D -m 755 out_linux/${_bldtype}/mozc_renderer "${pkgdir}/usr/lib/mozc/mozc_renderer"
+ install -D -m 755 "${_output}/renderer/mozc_renderer" "${pkgdir}/usr/lib/mozc/mozc_renderer"
}
package_emacs-mozc-ut-united() {
@@ -170,12 +167,15 @@ package_emacs-mozc-ut-united() {
depends=('emacs')
provides=('emacs-mozc')
conflicts=('emacs-mozc' 'emacs-mozc-bin' 'emacs-mozc-ut2')
- install=emacs-mozc.install
+ install=
cd "${srcdir}/mozc/src"
- install -D -m 755 out_linux/${_bldtype}/mozc_emacs_helper "${pkgdir}/usr/bin/mozc_emacs_helper"
+
+ _output="${srcdir}/mozc/src/bazel-out/k8-opt/bin"
+
+ install -D -m 755 "${_output}/unix/emacs/mozc_emacs_helper" "${pkgdir}/usr/bin/mozc_emacs_helper"
install -d "${pkgdir}/usr/share/emacs/site-lisp/emacs-mozc/"
- install -m 644 unix/emacs/mozc.el "${pkgdir}/usr/share/emacs/site-lisp/emacs-mozc"
+ install -m 644 "${srcdir}/mozc/src/unix/emacs/mozc.el" "${pkgdir}/usr/share/emacs/site-lisp/emacs-mozc"
}
# Global pkgdesc and depends are here so that they will be picked up by AUR
diff --git a/android-fix.patch b/android-fix.patch
new file mode 100644
index 00000000000..6c742c98569
--- /dev/null
+++ b/android-fix.patch
@@ -0,0 +1,16 @@
+--- WORKSPACE.bazel 2022-03-06 00:39:40.491411251 -0500
++++ WORKSPACE.bazel-new 2022-03-06 00:42:45.792180833 -0500
+@@ -9,11 +9,11 @@
+ load("//:config.bzl", "QT_BASE_PATH")
+
+ # This rule refers to $ANDROID_SDK_HOME.
+-android_sdk_repository(name = "androidsdk")
++#android_sdk_repository(name = "androidsdk")
+
+ # Android NDK version should be r11c+ for Abseil.
+ # This rule refers to $ANDROID_NDK_HOME.
+-android_ndk_repository(name = "androidndk")
++#android_ndk_repository(name = "androidndk")
+
+ local_repository(
+ name = "com_google_absl",
diff --git a/config-arch-new.patch b/config-arch-new.patch
new file mode 100644
index 00000000000..474b68d38f2
--- /dev/null
+++ b/config-arch-new.patch
@@ -0,0 +1,58 @@
+diff -Naur mozc-old/src/BUILD.gtk2.bazel mozc-new-patch/src/BUILD.gtk2.bazel
+--- mozc-old/src/BUILD.gtk2.bazel 2022-01-15 15:41:14.496303209 -0500
++++ mozc-new-patch/src/BUILD.gtk2.bazel 2022-01-15 15:00:19.359619101 -0500
+@@ -27,8 +27,8 @@
+ "include/pango-1.0/**",
+ "include/pixman-1/**",
+ "include/uuid/**",
+- "lib/x86_64-linux-gnu/glib-2.0/include/**",
+- "lib/x86_64-linux-gnu/gtk-2.0/include/**",
++ "lib/glib-2.0/include/**",
++ "lib/gtk-2.0/include/**",
+ ]),
+ copts = ["-pthread"],
+ includes = [
+@@ -46,8 +46,8 @@
+ "include/pango-1.0",
+ "include/pixman-1",
+ "include/uuid",
+- "lib/x86_64-linux-gnu/glib-2.0/include",
+- "lib/x86_64-linux-gnu/gtk-2.0/include",
++ "lib/glib-2.0/include",
++ "lib/gtk-2.0/include",
+ ],
+ linkopts = [
+ "-latk-1.0",
+diff -Naur mozc-old/src/BUILD.ibus.bazel mozc-new-patch/src/BUILD.ibus.bazel
+--- mozc-old/src/BUILD.ibus.bazel 2022-01-15 15:41:14.496303209 -0500
++++ mozc-new-patch/src/BUILD.ibus.bazel 2022-01-15 14:54:50.964671878 -0500
+@@ -17,7 +17,7 @@
+ "include/libmount/**",
+ "include/blkid/**",
+ "include/glib-2.0/**",
+- "lib/x86_64-linux-gnu/glib-2.0/include/**",
++ "lib/glib-2.0/include/**",
+ ]),
+ copts = ["-pthread"],
+ includes = [
+@@ -25,7 +25,7 @@
+ "include/libmount",
+ "include/blkid",
+ "include/glib-2.0",
+- "lib/x86_64-linux-gnu/glib-2.0/include",
++ "lib/glib-2.0/include",
+ ],
+ linkopts = [
+ "-libus-1.0",
+diff -Naur mozc-old/src/config.bzl mozc-new-patch/src/config.bzl
+--- mozc-old/src/config.bzl 2022-01-15 15:41:14.849644550 -0500
++++ mozc-new-patch/src/config.bzl 2022-01-15 15:44:40.410965639 -0500
+@@ -37,7 +37,7 @@
+ MACOS_MIN_OS_VER = "10.12"
+
+ ## Qt paths
+-QT_BASE_PATH = "/usr/include/x86_64-linux-gnu/qt5" # For Debian
++QT_BASE_PATH = "/usr/include/qt" # For Debian
+ QT_BIN_PATH = "/usr/bin/"
+
+ ## For macOS