diff options
-rw-r--r-- | .SRCINFO | 57 | ||||
-rw-r--r-- | PKGBUILD | 95 | ||||
-rw-r--r-- | add-new-japanese-era.patch | 36 | ||||
-rw-r--r-- | fix-for-gcc81.patch | 22 |
4 files changed, 210 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4499e72d4716 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,57 @@ +pkgbase = mozc-neologd-ut+ut2 + pkgver = 2.23.2815.102.20190911.1 + pkgrel = 1 + url = https://osdn.net/users/utuhiro/pf/utuhiro/files/ + arch = i686 + arch = x86_64 + license = custom + makedepends = clang + makedepends = ninja + makedepends = pkg-config + makedepends = python2 + makedepends = curl + makedepends = gtk2 + makedepends = qt5-base + makedepends = zinnia + makedepends = fcitx + makedepends = libxcb + makedepends = glib2 + makedepends = bzip2 + makedepends = unzip + source = https://osdn.net/frs/chamber_redir.php?m=iij&f=%2Fusers%2F24%2F24469%2Fmozc-neologd-ut-2.23.2815.102.20190911.1.tar.xz + source = https://ja.osdn.net/downloads/users/24/24326/mozc-2.23.2815.102%2Bdfsg~ut2-20171008d%2B20190718.tar.xz + source = add-new-japanese-era.patch + source = fix-for-gcc81.patch + source = http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz + sha1sums = SKIP + sha1sums = 08817779c4562cfeefb63b12185efbf9198982b1 + sha1sums = 94502348e60659765d3e6ae2780d07e5104a06a2 + sha1sums = 2bad0705a0a09d8d5a79c874b59c485052da2b38 + sha1sums = 883f4fc489a9ed1c07d2d2ec37ca72509f04ea5d + +pkgname = mozc-neologd-ut+ut2 + pkgdesc = A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input) + arch = i686 + arch = x86_64 + depends = qt5-base + depends = zinnia + conflicts = fcitx-mozc + conflicts = mozc + conflicts = fcitx-mozc-ut2 + conflicts = mozc-ut2 + conflicts = fcitx-mozc-ut + conflicts = mozc-ut + conflicts = fcitx-mozc-neologd-ut + conflicts = mozc-neologd-ut + +pkgname = fcitx-mozc-neologd-ut+ut2 + pkgdesc = Fcitx engine module for Mozc + arch = i686 + arch = x86_64 + depends = mozc-neologd-ut+ut2 + depends = fcitx + replaces = fcitx-mozc + replaces = fcitx-mozc-ut2 + replaces = fcitx-mozc-ut + replaces = fcitx-mozc-neologd-ut + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1fc91e34d399 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,95 @@ +# Maintainer: Yang Niao <ksmt4699 at gmail dot com> +# Contributor: MASAKI Haruka <yek at reasonset dot net> +# Contributor: UTUMI Hirosi <utuhiro78 att yahoo dott co dott jp> +# Contributor: Felix Yan <felixonmars@gmail.com> +# Contributor: ponsfoot <cabezon dot hashimoto at gmail dot com> + +## Mozc compile option +_bldtype=Release + +_mozcver=2.23.2815.102 +_dicver=20190911 +_revision=1 + +_pkgbase=mozc +pkgbase=fcitx-mozc-neologd-ut+ut2 +pkgname=mozc-neologd-ut+ut2 +true && pkgname=('mozc-neologd-ut+ut2' 'fcitx-mozc-neologd-ut+ut2') +pkgver=${_mozcver}.${_dicver}.${_revision} +pkgrel=1 +arch=('i686' 'x86_64') +url="https://osdn.net/users/utuhiro/pf/utuhiro/files/" +license=('custom') +makedepends=('clang' 'ninja' 'pkg-config' 'python2' 'curl' 'gtk2' 'qt5-base' 'zinnia' 'fcitx' 'libxcb' 'glib2' 'bzip2' 'unzip') + +source=("https://osdn.net/frs/chamber_redir.php?m=iij&f=%2Fusers%2F24%2F24469%2Fmozc-neologd-ut-2.23.2815.102.20190911.1.tar.xz" + "https://ja.osdn.net/downloads/users/24/24326/mozc-2.23.2815.102%2Bdfsg~ut2-20171008d%2B20190718.tar.xz" + add-new-japanese-era.patch + # https://github.com/google/mozc/issues/441#issue-321728877 + fix-for-gcc81.patch + http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz) + +sha1sums=('SKIP' + '08817779c4562cfeefb63b12185efbf9198982b1' + '94502348e60659765d3e6ae2780d07e5104a06a2' + '2bad0705a0a09d8d5a79c874b59c485052da2b38' + '883f4fc489a9ed1c07d2d2ec37ca72509f04ea5d') + +prepare() { + cp -f $srcdir/mozc-2.23.2815.102+dfsg\~ut2-20171008d+20190718/mut/src/data/dictionary_oss/dictionary*.txt $srcdir/mozc-neologd-ut-${pkgver}/src/data/dictionary_oss/ + cd mozc-neologd-ut-${pkgver}/src + + # add a new Japanese era + patch -Np2 -i "${srcdir}/add-new-japanese-era.patch" + + # fix for gcc-8.1 + patch -Np2 -i "${srcdir}/fix-for-gcc81.patch" + + # Adjust to use python2 + find . -name \*.py -type f -exec sed -i -e "1s|python.*$|python2|" {} + + find . -regex '.*\.gypi?$' -type f -exec sed -i -e "s|'python'|'python2'|g" {} + +} + +build() { + cd mozc-neologd-ut-${pkgver}/src + + _targets="server/server.gyp:mozc_server gui/gui.gyp:mozc_tool renderer/renderer.gyp:mozc_renderer unix/fcitx/fcitx.gyp:fcitx-mozc unix/fcitx/fcitx.gyp:gen_fcitx_mozc_i18n" + + GYP_DEFINES="document_dir=/usr/share/licenses/${pkgbase}" python2 build_mozc.py gyp --target_platform=Linux + python2 build_mozc.py build -c $_bldtype $_targets +} + +package_mozc-neologd-ut+ut2() { + pkgdesc="A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)" + arch=('i686' 'x86_64') + depends=('qt5-base' 'zinnia') + conflicts=('fcitx-mozc' 'mozc' 'fcitx-mozc-ut2' 'mozc-ut2' 'fcitx-mozc-ut' 'mozc-ut' 'fcitx-mozc-neologd-ut' 'mozc-neologd-ut') + cd mozc-neologd-ut-${pkgver}/src + install -D -m 755 out_linux/${_bldtype}/mozc_server "${pkgdir}/usr/lib/mozc/mozc_server" + install -m 755 out_linux/${_bldtype}/mozc_tool "${pkgdir}/usr/lib/mozc/mozc_tool" + + install -d "${pkgdir}/usr/share/licenses/$pkgname/" + install -m 644 ../LICENSE data/installer/*.html "${pkgdir}/usr/share/licenses/${pkgname}/" +} + +package_fcitx-mozc-neologd-ut+ut2() { + pkgdesc="Fcitx engine module for Mozc" + arch=('i686' 'x86_64') + depends=("mozc-neologd-ut+ut2" 'fcitx') + replaces=('fcitx-mozc' 'fcitx-mozc-ut2' 'fcitx-mozc-ut' 'fcitx-mozc-neologd-ut') + + cd mozc-neologd-ut-${pkgver}/src + for mofile in out_linux/${_bldtype}/gen/unix/fcitx/po/*.mo + do + filename=`basename $mofile` + lang=${filename/.mo/} + install -D -m 644 "$mofile" "${pkgdir}/usr/share/locale/$lang/LC_MESSAGES/fcitx-mozc.mo" + done + + install -D -m 755 out_linux/${_bldtype}/fcitx-mozc.so "${pkgdir}/usr/lib/fcitx/fcitx-mozc.so" + install -D -m 644 unix/fcitx/fcitx-mozc.conf "${pkgdir}/usr/share/fcitx/addon/fcitx-mozc.conf" + install -D -m 644 unix/fcitx/mozc.conf "${pkgdir}/usr/share/fcitx/inputmethod/mozc.conf" + + install -d ${pkgdir}/usr/share/fcitx/mozc/icon + install -m 644 $srcdir/fcitx-mozc-icons/*.png ${pkgdir}/usr/share/fcitx/mozc/icon/ +} diff --git a/add-new-japanese-era.patch b/add-new-japanese-era.patch new file mode 100644 index 000000000000..713e1a72b328 --- /dev/null +++ b/add-new-japanese-era.patch @@ -0,0 +1,36 @@ +diff -urP a/src/data/symbol/categorized.tsv b/src/data/symbol/categorized.tsv +--- a/src/data/symbol/categorized.tsv 2018-05-18 05:57:08.000000000 +0900 ++++ b/src/data/symbol/categorized.tsv 2019-04-23 04:30:33.341273428 +0900 +@@ -405,6 +405,7 @@ + ㍽ MATH たいしょう ねんごう + ㍼ MATH しょうわ ねんごう + ㍻ MATH へいせい ねんごう ++㋿ MATH れいわ ねんごう + + ㌣ MATH せんと たんい + ㌦ MATH どる たんい +diff -urP a/src/data/symbol/symbol.tsv b/src/data/symbol/symbol.tsv +--- a/src/data/symbol/symbol.tsv 2018-05-18 05:57:08.000000000 +0900 ++++ b/src/data/symbol/symbol.tsv 2019-04-23 04:32:52.235628292 +0900 +@@ -528,6 +528,7 @@ + 記号 ㊦ した げ 丸下 + 記号 ㊧ ひだり 丸左 + 記号 ㊨ みぎ 丸右 ++記号 ㋿ れいわ ねんごう 年号 OTHER + 記号 ㍻ へいせい ねんごう 年号 OTHER + 記号 ㍼ しょうわ ねんごう 年号 OTHER + 記号 ㍽ たいしょう ねんごう 年号 OTHER +diff -urP a/src/rewriter/date_rewriter.cc b/src/rewriter/date_rewriter.cc +--- a/src/rewriter/date_rewriter.cc 2018-05-18 05:57:09.000000000 +0900 ++++ b/src/rewriter/date_rewriter.cc 2019-04-23 04:45:53.795911871 +0900 +@@ -1239,6 +1239,10 @@ + 1989, + "平成", + "へいせい", ++ }, { ++ 2019, ++ "令和", ++ "れいわ", + } + }; + diff --git a/fix-for-gcc81.patch b/fix-for-gcc81.patch new file mode 100644 index 000000000000..e47336dc21ca --- /dev/null +++ b/fix-for-gcc81.patch @@ -0,0 +1,22 @@ +diff --git a/src/prediction/zero_query_dict.h b/src/prediction/zero_query_dict.h +index c11aa24d..4eece4eb 100644 +--- a/src/prediction/zero_query_dict.h ++++ b/src/prediction/zero_query_dict.h +@@ -132,6 +132,17 @@ class ZeroQueryDict { + return tmp; + } + ++ iterator &operator--() { ++ ptr_ -= kTokenByteSize; ++ return *this; ++ } ++ ++ iterator operator--(int) { ++ const iterator tmp(ptr_, string_array_); ++ ptr_ -= kTokenByteSize; ++ return tmp; ++ } ++ + iterator &operator+=(ptrdiff_t n) { + ptr_ += n * kTokenByteSize; + return *this; |