blob: 275c3ba74e8a61d9af544159eb3c21292e8b3b82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# Maintainer: ponsfoot <cabezon dot hashimoto at gmail dot com>
## NOTE: This doens't support kill_line feature of uim.
## Mozc compile option
_bldtype=Release
#_bldtype=Debug
_uimmozcrev=318.0562676
_mozcrev=95de40fa884d693172605e7283ec82233a908b29
pkgname=uim-mozc
_pkgname=mozc
pkgver=2.17.2240.102
pkgrel=1
pkgdesc="uim plugin module for Mozc"
arch=('i686' 'x86_64')
url="http://code.google.com/p/macuim/"
license=('BSD')
groups=('mozc-im')
depends=('mozc' 'uim')
install=${pkgname}.install
makedepends=('pkg-config' 'python2' 'git' 'ninja' 'clang')
source=(
mozc::git+https://github.com/google/mozc.git#commit=${_mozcrev}
http://downloads.sourceforge.net/project/pnsft-aur/mozc/uim-mozc-${_uimmozcrev}.tar.xz
adapt_mozc2.17.2240.102.patch
)
sha1sums=('SKIP'
'5cd298aaac5afd7ff8882453e3e8fa698c2c5aa1'
'031654d8fb40225a6c193d89246b294256ae33f4')
pkgver() {
. "${srcdir}/${_pkgname}/src/mozc_version_template.txt"
printf "%s.%s.%s.%s" $MAJOR $MINOR $BUILD $REVISION
}
prepare() {
cd "$srcdir"
ln -sf `which python2` ./python
PATH="${srcdir}:${PATH}"
cd "${srcdir}/${_pkgname}/"
git submodule update --init --recursive
cd "${srcdir}/${_pkgname}/src"
# uim-mozc
cp -rf "${srcdir}/uim-mozc-${_uimmozcrev}/uim" unix/
# Extract license part of uim-mozc
head -n 32 unix/uim/mozc.cc > unix/uim/LICENSE
patch -p2 -i "${srcdir}/adapt_mozc2.17.2240.102.patch"
}
build() {
# 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"
cd "${srcdir}/${_pkgname}/src"
msg "Starting make..."
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 python2 build_mozc.py gyp
python2 build_mozc.py build -c $_bldtype unix/uim/uim.gyp:uim-mozc
}
package() {
cd "${srcdir}/${_pkgname}/src"
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/${_pkgname}/uim-mozc/LICENSE"
}
|