Last active
January 27, 2016 13:39
-
-
Save nosada/6fe16237efbfd72c0865 to your computer and use it in GitHub Desktop.
Modified PKGBUILD and patch for original (https://aur.archlinux.org/packages/mozc-ut/) to use latest mozc at http://sourceforge.net/projects/pnsft-aur/files/mozc/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: ponsfoot <cabezon dot hashimoto at gmail dot com> | |
## | |
## Build configuration | |
## | |
## You can choose the input method framework to use either ibus and/or uim. | |
## If you will not be using ibus, comment out below. | |
#_ibus_mozc="yes" | |
## If you will be using uim, uncomment below. | |
#_uim_mozc="yes" | |
## If applying patch for uim-mozc fails, try to uncomment below. | |
_kill_kill_line="yes" | |
## This will disable the 'kill-line' feature of uim-mozc. | |
## If you will be using fcitx, uncomment below. | |
_fcitx_mozc="yes" | |
## If you will be using mozc.el on Emacs, uncomment below. | |
#_emacs_mozc="yes" | |
## ニコニコ大百科IME辞書 (NICONICOPEDIA IME dictionary, see below) | |
#_NICODIC="true" | |
#*********************************************************************** | |
# License information: | |
# | |
# Mozc: 3-clause BSD | |
# uim-mozc: 3-clause BSD | |
# | |
# Mozc-UT dictionary | |
# altcanna, jinmei, skk: GPL | |
# hatena: unknown | |
# edict: Creative Commons Attribution-ShareAlike License (V3.0) | |
# ekimei: redistributable | |
# zip code: public domain | |
# niconico: unknown | |
# ruby/shell scripts: GPL | |
# | |
# ** CAUTION ** | |
# CC-BY-SA (EDICT) is incompatible with GPL (some of the other dic data). | |
# You should not redistribute the binary of mozc-ut including edict | |
# (and niconico which unknown license) at least. | |
# | |
#*********************************************************************** | |
# Upstreams: | |
# | |
# mozc | |
# http://code.google.com/p/mozc/ | |
# | |
# Japanese zip code data by Japan Post | |
# http://www.post.japanpost.jp/zipcode/download.html | |
# | |
# Modified zip code data by Ibs | |
# http://zipcloud.ibsnet.co.jp/ | |
# | |
# Mozc UT dictionary | |
# http://www.geocities.jp/ep3797/mozc_01.html | |
# | |
# uim-mozc by macuim | |
# http://code.google.com/p/macuim/ | |
# | |
# fcitx-mozc | |
# http://download.fcitx-im.org/fcitx-mozc/ | |
# | |
#*********************************************************************** | |
# Changes to original mozc: | |
# | |
# 1. Add Mozc UT Dictionary | |
# 2. Add uim-mozc (optional) | |
# 3. Add fcitx-mozc (optional AND VERY VERY EXPERIMENTAL) | |
# | |
#**************************** CAUTION! ********************************* | |
# Mozc support for fcitx generated by this PKGBUILD will overwrite | |
# existing "fcitx-mozc-ut" (which would be provided on | |
# https://aur.archlinux.org/packages/fcitx-mozc-ut/). | |
# For safety and certainty, you might want to uninstall existing | |
# "fcitx-mozc-ut" on your system and install new one. | |
#*********************************************************************** | |
## Mozc compile option | |
_bldtype=Release | |
#_bldtype=Debug | |
_mozcrev=2628af6995dbbbb9ccdb52d1160db1dbd5ed3bae | |
_utdicver=20160125 | |
_zipcoderel=201512 | |
_uimmozcrev=321.3ea28b1 | |
pkgbase=mozc-ut | |
pkgname=mozc-ut | |
true && pkgname=('mozc-ut') | |
pkgver=2.17.2313.102.20160125 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
url="http://www.geocities.jp/ep3797/mozc_01.html" | |
license=('BSD' 'GPL' 'CC-BY-SA' 'custom') | |
makedepends=('python2' 'ruby' 'git' 'ninja' 'clang' 'gtk2') | |
source=( | |
mozc::git+https://github.com/google/mozc.git#commit=${_mozcrev} | |
http://downloads.sourceforge.net/project/pnsft-aur/mozc/mozcdic-ut-${_utdicver}.tar.bz2 | |
http://downloads.sourceforge.net/project/pnsft-aur/mozc/edict-${_utdicver}.gz | |
EDICT_license.html | |
http://downloads.sourceforge.net/project/pnsft-aur/mozc/x-ken-all-${_zipcoderel}.zip | |
http://downloads.sourceforge.net/project/pnsft-aur/mozc/jigyosyo-${_zipcoderel}.zip | |
mod-generate-mozc-ut.sh | |
) | |
sha1sums=('SKIP' | |
'c0e7d8e9d2a3dcc41effda4901f5142820565bf5' | |
'701737f457cd0a1832ff5e6ed961cf1d6317d5b7' | |
'e0ba18e67c1be8e3cfb8ecb30760597b215da255' | |
'b07c667a82fd31c752a973c8bee06dab8178c3f0' | |
'11636b6256f3382d11ac4df41db243acd33a44b3' | |
'3b525b6802251c07d8cb3f67815c59a4d896c6fe') | |
if [[ "$_ibus_mozc" == "yes" ]]; then | |
true && pkgname+=('ibus-mozc-ut') | |
makedepends+=('ibus>=1.4.1') | |
fi | |
if [[ "$_uim_mozc" == "yes" ]]; then | |
true && pkgname+=('uim-mozc-ut') | |
makedepends+=('uim') | |
source+=(http://downloads.sourceforge.net/project/pnsft-aur/mozc/uim-mozc-${_uimmozcrev}.tar.xz) | |
sha1sums+=('22b7c2a5b0a7fef778ee72ebe5873a75e879d26b') | |
fi | |
if [[ "$_fcitx_mozc" == "yes" ]]; then | |
true && pkgname+=('fcitx-mozc-ut') | |
makedepends+=('fcitx') | |
_patchver=2.17.2313.102.1 | |
source+=(http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${_patchver}.patch | |
http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz) | |
sha1sums+=('31de8917e9369bfd638e5725d57469bfde6aeb84' | |
'883f4fc489a9ed1c07d2d2ec37ca72509f04ea5d') | |
fi | |
if [[ "$_emacs_mozc" == "yes" ]]; then | |
true && pkgname+=('emacs-mozc-ut') | |
fi | |
mozcver() { | |
. "${srcdir}/mozc/src/mozc_version_template.txt" | |
printf "%s.%s.%s.%s" $MAJOR $MINOR $BUILD $REVISION | |
} | |
pkgver() { | |
printf "%s.%s" `mozcver` "${_utdicver}" | |
} | |
prepare() { | |
cd "$srcdir" | |
ln -sf `which python2` ./python | |
PATH="${srcdir}:${PATH}" | |
cd "${srcdir}/mozc/" | |
git submodule update --init --recursive | |
cd "${srcdir}/mozcdic-ut-${_utdicver}" | |
_mozcver=`mozcver` | |
"${srcdir}/mod-generate-mozc-ut.sh" | |
msg "Generating UT dictionary seed..." | |
MOZCVER="$_mozcver" DICVER="$_utdicver" NICODIC="$_NICODIC" \ | |
./generate-mozc-ut.sh | |
msg "Done." | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
# uim-mozc | |
if [[ "$_uim_mozc" == "yes" ]]; then | |
cp -rf "${srcdir}/uim-mozc-${_uimmozcrev}/uim" unix/ | |
# kill-line patch | |
if [[ "$_kill_kill_line" != "yes" ]]; then | |
patch -p0 -i "${srcdir}/uim-mozc-${_uimmozcrev}/mozc-kill-line.diff" | |
fi | |
# Extract license part of uim-mozc | |
head -n 32 unix/uim/mozc.cc > unix/uim/LICENSE | |
fi | |
# fcitx-mozc | |
if [[ "$_fcitx_mozc" == "yes" ]]; then | |
# Apply fcitx patch | |
rm unix/fcitx -rf | |
patch -Np2 -i "$srcdir/fcitx-mozc-${_patchver}.patch" | |
# Fix qt4 binary path$ | |
sed -i 's|(qt_dir)/bin|(qt_dir)/lib/qt4/bin|' gui/*.gyp{,i} | |
sed -i 's|(qt_dir_env)/bin|(qt_dir_env)/lib/qt4/bin|' gui/*.gyp{,i} | |
fi | |
# Generate zip code seed | |
msg "Generating zip code seed..." | |
python2 dictionary/gen_zip_code_seed.py \ | |
--zip_code="${srcdir}/x-ken-all.csv" --jigyosyo="${srcdir}/JIGYOSYO.CSV" \ | |
>> data/dictionary_oss/dictionary09.txt | |
msg "Done." | |
# Extract liccense part of mozc | |
head -n 29 server/mozc_server.cc > LICENSE | |
} | |
build() { | |
msg2 '=====================================================' | |
msg2 ' *** Build Info ***' | |
msg2 ' The following package files will be generated:' | |
for _p in ${pkgname[@]} | |
do | |
msg2 " * ${_p}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" | |
done | |
msg2 '=====================================================' | |
# Use Qt4 | |
_rcc_loc=`pkg-config QtCore --variable=rcc_location` | |
_qt4dir=${_rcc_loc%%/bin/rcc} | |
_qt4i=`pkg-config --cflags-only-I QtGui` | |
CFLAGS+=" $_qt4i" | |
CXXFLAGS+=" $_qt4i" | |
msg "Starting make..." | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
_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 " | |
[[ "$_uim_mozc" == "yes" ]] && _targets+="unix/uim/uim.gyp:uim-mozc " | |
[[ "$_fcitx_mozc" == "yes" ]] && _targets+="unix/fcitx/fcitx.gyp:fcitx-mozc" | |
unset CC CC_host CC_target CXX CXX_host CXX_target LINK AR AR_host AR_target \ | |
NM NM_host NM_target READELF READELF_host READELF_target | |
if [[ "$_fcitx_mozc" == "yes" ]]; then | |
QTDIR=/usr | |
else | |
QTDIR=$_qt4dir | |
fi | |
GYP_DEFINES="document_dir=/usr/share/licenses/${pkgbase}" | |
python2 build_mozc.py gyp | |
python2 build_mozc.py build -c $_bldtype $_targets | |
if [[ "$_ibus_mozc" == "yes" ]]; then | |
sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' \ | |
out_linux/${_bldtype}/gen/unix/ibus/mozc.xml | |
fi | |
} | |
package_mozc-ut() { | |
pkgdesc="Mozc the Japanese Input Method with Mozc UT Dictionary" | |
arch=('i686' 'x86_64') | |
groups=('mozc-im') | |
depends=('qt4' 'zinnia') | |
install=mozc-ut.install | |
provides=("mozc=${_mozcver}") | |
replaces=('mozc-server-ut' 'mozc-utils-gui-ut') | |
conflicts=('mozc' 'mozc-server' 'mozc-utils-gui') | |
optdepends=('tegaki-models-zinnia-japanese: hand-writing recognition support') | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
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/lib/mozc/documents/" | |
install -m 644 data/installer/*.html "${pkgdir}/usr/lib/mozc/documents/" | |
_licpath="${pkgdir}/usr/share/licenses/${pkgbase}" | |
install -D -m 644 LICENSE "${_licpath}/LICENSE_MOZC" | |
install -m 644 doc-ut/README "${_licpath}/README_MOZC-UT" | |
install -m 644 data/installer/*.html "$_licpath" | |
cd doc-ut/dictionary | |
for d in * | |
do | |
install -d "${_licpath}/dictionary/${d}" | |
install -m 644 "${d}"/* "${_licpath}/dictionary/${d}" | |
done | |
install -m 644 "${srcdir}/EDICT_license.html" "${_licpath}/dictionary/edict/license.html" | |
} | |
package_emacs-mozc-ut() { | |
pkgdesc="Mozc for Emacs" | |
arch=('i686' 'x86_64') | |
groups=('mozc-im') | |
depends=("mozc=${_mozcver}" 'emacs') | |
install=emacs-mozc.install | |
replaces=('emacs-mozc-bin') | |
provides=('emacs-mozc') | |
conflicts=('emacs-mozc' 'emacs-mozc-bin') | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
install -D -m 755 out_linux/${_bldtype}/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" | |
} | |
package_ibus-mozc-ut() { | |
pkgdesc="IBus engine module for Mozc" | |
arch=('i686' 'x86_64') | |
groups=('mozc-im') | |
depends=("mozc=${_mozcver}" 'ibus>=1.4.1') | |
provides=('ibus-mozc') | |
conflicts=('ibus-mozc') | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
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" | |
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" | |
install -m 644 data/images/unix/ui-direct.png "${pkgdir}/usr/share/ibus-mozc/direct.png" | |
install -m 644 data/images/unix/ui-hiragana.png "${pkgdir}/usr/share/ibus-mozc/hiragana.png" | |
install -m 644 data/images/unix/ui-katakana_half.png "${pkgdir}/usr/share/ibus-mozc/katakana_half.png" | |
install -m 644 data/images/unix/ui-katakana_full.png "${pkgdir}/usr/share/ibus-mozc/katakana_full.png" | |
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" | |
} | |
package_uim-mozc-ut() { | |
pkgdesc="uim plugin module for Mozc" | |
arch=('i686' 'x86_64') | |
groups=('mozc-im') | |
depends=("mozc=${_mozcver}" 'uim') | |
install=uim-mozc.install | |
provides=('uim-mozc') | |
conflicts=('uim-mozc') | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
install -D -m 755 out_linux/${_bldtype}/libuim-mozc.so "${pkgdir}/usr/lib/uim/plugin/libuim-mozc.so" | |
install -d "${pkgdir}/usr/share/uim" | |
install -m 644 ${srcdir}/uim-mozc-${_uimmozcrev}/scm/*.scm "${pkgdir}/usr/share/uim/" | |
install -D -m 644 data/images/unix/ime_product_icon_opensource-32.png "${pkgdir}/usr/share/uim/pixmaps/mozc.png" | |
install -m 644 data/images/unix/ui-tool.png "${pkgdir}/usr/share/uim/pixmaps/mozc_tool_selector.png" | |
install -m 644 data/images/unix/ui-properties.png "${pkgdir}/usr/share/uim/pixmaps/mozc_tool_config_dialog.png" | |
install -m 644 data/images/unix/ui-dictionary.png "${pkgdir}/usr/share/uim/pixmaps/mozc_tool_dictionary_tool.png" | |
install -D -m 644 unix/uim/LICENSE "${pkgdir}/usr/share/licenses/${pkgbase}/uim-mozc/LICENSE" | |
} | |
package_fcitx-mozc-ut() { | |
pkgdesc="fcitx plugin module for Mozc" | |
arch=('i686' 'x86_64') | |
groups=('mozc-im') | |
depends=("mozc=${_mozcver}" 'fcitx') | |
provides=('fcitx-mozc') | |
conflicts=('fcitx-mozc') | |
cd "${srcdir}/${pkgbase}-${pkgver}" | |
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/mozc.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-alpha_full.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-alpha_full.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-alpha_half.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-alpha_half.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-direct.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-direct.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-hiragana.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-hiragana.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-katakana_full.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-katakana_full.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-katakana_half.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-katakana_half.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-dictionary.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-dictionary.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-properties.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-properties.png" | |
install -m 644 "$srcdir/fcitx-mozc-icons/mozc-tool.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-tool.png" | |
} | |
# Global pkgdesc and depends are here so that they will be picked up by AUR | |
pkgdesc="Mozc the Japanese Input Method with Mozc UT Dictionary (additional dictionary) and uim-mozc (optional)" | |
depends=('qt4' 'zinnia') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- PKGBUILD.orig 2016-01-27 22:20:10.344786214 +0900 | |
+++ PKGBUILD 2016-01-27 22:25:13.185047450 +0900 | |
@@ -5,12 +5,14 @@ | |
## | |
## You can choose the input method framework to use either ibus and/or uim. | |
## If you will not be using ibus, comment out below. | |
-_ibus_mozc="yes" | |
+#_ibus_mozc="yes" | |
## If you will be using uim, uncomment below. | |
#_uim_mozc="yes" | |
## If applying patch for uim-mozc fails, try to uncomment below. | |
_kill_kill_line="yes" | |
## This will disable the 'kill-line' feature of uim-mozc. | |
+## If you will be using fcitx, uncomment below. | |
+_fcitx_mozc="yes" | |
## If you will be using mozc.el on Emacs, uncomment below. | |
#_emacs_mozc="yes" | |
@@ -57,12 +59,22 @@ | |
# uim-mozc by macuim | |
# http://code.google.com/p/macuim/ | |
# | |
+# fcitx-mozc | |
+# http://download.fcitx-im.org/fcitx-mozc/ | |
+# | |
#*********************************************************************** | |
# Changes to original mozc: | |
# | |
# 1. Add Mozc UT Dictionary | |
# 2. Add uim-mozc (optional) | |
+# 3. Add fcitx-mozc (optional AND VERY VERY EXPERIMENTAL) | |
# | |
+#**************************** CAUTION! ********************************* | |
+# Mozc support for fcitx generated by this PKGBUILD will overwrite | |
+# existing "fcitx-mozc-ut" (which would be provided on | |
+# https://aur.archlinux.org/packages/fcitx-mozc-ut/). | |
+# For safety and certainty, you might want to uninstall existing | |
+# "fcitx-mozc-ut" on your system and install new one. | |
#*********************************************************************** | |
## Mozc compile option | |
@@ -82,7 +94,7 @@ | |
arch=('i686' 'x86_64') | |
url="http://www.geocities.jp/ep3797/mozc_01.html" | |
license=('BSD' 'GPL' 'CC-BY-SA' 'custom') | |
-makedepends=('python2' 'ruby' 'git' 'ninja' 'clang') | |
+makedepends=('python2' 'ruby' 'git' 'ninja' 'clang' 'gtk2') | |
source=( | |
mozc::git+https://github.com/google/mozc.git#commit=${_mozcrev} | |
http://downloads.sourceforge.net/project/pnsft-aur/mozc/mozcdic-ut-${_utdicver}.tar.bz2 | |
@@ -112,6 +124,15 @@ | |
sha1sums+=('22b7c2a5b0a7fef778ee72ebe5873a75e879d26b') | |
fi | |
+if [[ "$_fcitx_mozc" == "yes" ]]; then | |
+ true && pkgname+=('fcitx-mozc-ut') | |
+ makedepends+=('fcitx') | |
+ _patchver=2.17.2313.102.1 | |
+ source+=(http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${_patchver}.patch | |
+ http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz) | |
+ sha1sums+=('31de8917e9369bfd638e5725d57469bfde6aeb84' | |
+ '883f4fc489a9ed1c07d2d2ec37ca72509f04ea5d') | |
+fi | |
if [[ "$_emacs_mozc" == "yes" ]]; then | |
true && pkgname+=('emacs-mozc-ut') | |
@@ -161,6 +182,17 @@ | |
fi | |
+ # fcitx-mozc | |
+ if [[ "$_fcitx_mozc" == "yes" ]]; then | |
+ # Apply fcitx patch | |
+ rm unix/fcitx -rf | |
+ patch -Np2 -i "$srcdir/fcitx-mozc-${_patchver}.patch" | |
+ | |
+ # Fix qt4 binary path$ | |
+ sed -i 's|(qt_dir)/bin|(qt_dir)/lib/qt4/bin|' gui/*.gyp{,i} | |
+ sed -i 's|(qt_dir_env)/bin|(qt_dir_env)/lib/qt4/bin|' gui/*.gyp{,i} | |
+ fi | |
+ | |
# Generate zip code seed | |
msg "Generating zip code seed..." | |
python2 dictionary/gen_zip_code_seed.py \ | |
@@ -198,10 +230,16 @@ | |
[[ "$_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 " | |
[[ "$_uim_mozc" == "yes" ]] && _targets+="unix/uim/uim.gyp:uim-mozc " | |
+ [[ "$_fcitx_mozc" == "yes" ]] && _targets+="unix/fcitx/fcitx.gyp:fcitx-mozc" | |
unset CC CC_host CC_target CXX CXX_host CXX_target LINK AR AR_host AR_target \ | |
NM NM_host NM_target READELF READELF_host READELF_target | |
- QTDIR=$_qt4dir GYP_DEFINES="document_dir=/usr/share/licenses/${pkgbase}" \ | |
+ if [[ "$_fcitx_mozc" == "yes" ]]; then | |
+ QTDIR=/usr | |
+ else | |
+ QTDIR=$_qt4dir | |
+ fi | |
+ GYP_DEFINES="document_dir=/usr/share/licenses/${pkgbase}" | |
python2 build_mozc.py gyp | |
python2 build_mozc.py build -c $_bldtype $_targets | |
@@ -306,6 +344,40 @@ | |
install -D -m 644 unix/uim/LICENSE "${pkgdir}/usr/share/licenses/${pkgbase}/uim-mozc/LICENSE" | |
} | |
+package_fcitx-mozc-ut() { | |
+ pkgdesc="fcitx plugin module for Mozc" | |
+ arch=('i686' 'x86_64') | |
+ groups=('mozc-im') | |
+ depends=("mozc=${_mozcver}" 'fcitx') | |
+ provides=('fcitx-mozc') | |
+ conflicts=('fcitx-mozc') | |
+ | |
+ cd "${srcdir}/${pkgbase}-${pkgver}" | |
+ | |
+ 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/mozc.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-alpha_full.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-alpha_full.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-alpha_half.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-alpha_half.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-direct.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-direct.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-hiragana.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-hiragana.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-katakana_full.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-katakana_full.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-katakana_half.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-katakana_half.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-dictionary.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-dictionary.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-properties.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-properties.png" | |
+ install -m 644 "$srcdir/fcitx-mozc-icons/mozc-tool.png" "${pkgdir}/usr/share/fcitx/mozc/icon/mozc-tool.png" | |
+} | |
+ | |
# Global pkgdesc and depends are here so that they will be picked up by AUR | |
pkgdesc="Mozc the Japanese Input Method with Mozc UT Dictionary (additional dictionary) and uim-mozc (optional)" | |
depends=('qt4' 'zinnia') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment