Gentoo Archives: gentoo-commits

From: "Naohiro Aota (naota)" <naota@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-i18n/mozc: mozc-1.10.1390.102-r1.ebuild ChangeLog mozc-1.10.1390.102.ebuild
Date: Wed, 25 Dec 2013 03:45:31
Message-Id: 20131225034526.CAD592004B@flycatcher.gentoo.org
1 naota 13/12/25 03:45:26
2
3 Modified: ChangeLog
4 Added: mozc-1.10.1390.102-r1.ebuild
5 Removed: mozc-1.10.1390.102.ebuild
6 Log:
7 Apply ibus-1.5.4 patch
8
9 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key F8551514)
10
11 Revision Changes Path
12 1.9 app-i18n/mozc/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/mozc/ChangeLog?rev=1.9&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/mozc/ChangeLog?rev=1.9&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/mozc/ChangeLog?r1=1.8&r2=1.9
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-i18n/mozc/ChangeLog,v
21 retrieving revision 1.8
22 retrieving revision 1.9
23 diff -u -r1.8 -r1.9
24 --- ChangeLog 28 Jul 2013 09:42:56 -0000 1.8
25 +++ ChangeLog 25 Dec 2013 03:45:26 -0000 1.9
26 @@ -1,6 +1,12 @@
27 # ChangeLog for app-i18n/mozc
28 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-i18n/mozc/ChangeLog,v 1.8 2013/07/28 09:42:56 naota Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-i18n/mozc/ChangeLog,v 1.9 2013/12/25 03:45:26 naota Exp $
31 +
32 +*mozc-1.10.1390.102-r1 (25 Dec 2013)
33 +
34 + 25 Dec 2013; Naohiro Aota <naota@g.o> +files/mozc-ibus-1.5.4.patch,
35 + +mozc-1.10.1390.102-r1.ebuild, -mozc-1.10.1390.102.ebuild:
36 + Apply ibus-1.5.4 patch
37
38 28 Jul 2013; Naohiro Aota <naota@g.o> mozc-1.10.1390.102.ebuild:
39 Drop miss-added dep to dev-libs/protobuf. #478094
40
41
42
43 1.1 app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: mozc-1.10.1390.102-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2013 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild,v 1.1 2013/12/25 03:45:26 naota Exp $
53
54 EAPI="5"
55 PYTHON_COMPAT=( python{2_6,2_7} )
56 inherit elisp-common eutils multilib multiprocessing python-single-r1 toolchain-funcs
57
58 DESCRIPTION="The Mozc engine for IBus Framework"
59 HOMEPAGE="http://code.google.com/p/mozc/"
60
61 PROTOBUF_VER="2.5.0"
62 GMOCK_VER="1.6.0"
63 GTEST_VER="1.6.0"
64 JSONCPP_VER="0.6.0-rc2"
65 MOZC_URL="http://mozc.googlecode.com/files/${P}.tar.bz2"
66 PROTOBUF_URL="http://protobuf.googlecode.com/files/protobuf-${PROTOBUF_VER}.tar.bz2"
67 GMOCK_URL="https://googlemock.googlecode.com/files/gmock-${GMOCK_VER}.zip"
68 GTEST_URL="https://googletest.googlecode.com/files/gtest-${GTEST_VER}.zip"
69 JSONCPP_URL="mirror://sourceforge/jsoncpp/jsoncpp-src-${JSONCPP_VER}.tar.gz"
70 SRC_URI="${MOZC_URL} ${PROTOBUF_URL}
71 test? ( ${GMOCK_URL} ${GTEST_URL} ${JSONCPP_URL} )"
72
73 LICENSE="BSD ipadic public-domain unicode"
74 SLOT="0"
75 KEYWORDS="~amd64 ~x86"
76 IUSE="emacs +ibus +qt4 renderer test"
77
78 RDEPEND="dev-libs/glib:2
79 dev-libs/openssl
80 x11-libs/libxcb
81 emacs? ( virtual/emacs )
82 ibus? ( >=app-i18n/ibus-1.4.1 )
83 renderer? ( x11-libs/gtk+:2 )
84 qt4? (
85 dev-qt/qtgui:4
86 app-i18n/zinnia
87 )
88 ${PYTHON_DEPS}"
89 DEPEND="${RDEPEND}
90 virtual/pkgconfig"
91
92 BUILDTYPE="${BUILDTYPE:-Release}"
93
94 RESTRICT="test"
95
96 SITEFILE=50${PN}-gentoo.el
97
98 src_unpack() {
99 unpack $(basename ${MOZC_URL})
100
101 cd "${S}"/protobuf
102 unpack $(basename ${PROTOBUF_URL})
103 mv protobuf-${PROTOBUF_VER} files || die
104
105 if use test; then
106 cd "${S}"/third_party
107 unpack $(basename ${GMOCK_URL}) $(basename ${GTEST_URL}) \
108 $(basename ${JSONCPP_URL})
109 mv gmock-${GMOCK_VER} gmock || die
110 mv gtest-${GTEST_VER} gtest || die
111 mv jsoncpp-src-${JSONCPP_VER} jsoncpp || die
112 fi
113 }
114
115 src_prepare() {
116 epatch "${FILESDIR}"/${P}-drop-Werror.patch
117 epatch "${FILESDIR}"/${PN}-ibus-1.5.4.patch
118 epatch_user
119 }
120
121 src_configure() {
122 local myconf="--server_dir=/usr/$(get_libdir)/mozc"
123
124 if ! use qt4 ; then
125 myconf+=" --noqt"
126 export GYP_DEFINES="use_libzinnia=0"
127 fi
128
129 if ! use renderer ; then
130 export GYP_DEFINES="${GYP_DEFINES} enable_gtk_renderer=0"
131 fi
132
133 # export GYP_DEFINES="${GYP_DEFINES} use_libprotobuf=1"
134
135 "${PYTHON}" build_mozc.py gyp ${myconf} || die "gyp failed"
136 }
137
138 src_compile() {
139 tc-export CC CXX AR AS RANLIB LD
140
141 local my_makeopts=$(makeopts_jobs)
142 # This is for a safety. -j without a number, makeopts_jobs returns 999.
143 local myjobs=-j${my_makeopts/999/1}
144
145 local mytarget="server/server.gyp:mozc_server"
146 use emacs && mytarget="${mytarget} unix/emacs/emacs.gyp:mozc_emacs_helper"
147 use ibus && mytarget="${mytarget} unix/ibus/ibus.gyp:ibus_mozc"
148 use renderer && mytarget="${mytarget} renderer/renderer.gyp:mozc_renderer"
149 if use qt4 ; then
150 export QTDIR="${EPREFIX}/usr"
151 mytarget="${mytarget} gui/gui.gyp:mozc_tool"
152 fi
153
154 V=1 "${PYTHON}" build_mozc.py build_tools -c "${BUILDTYPE}" ${myjobs} || die
155 V=1 "${PYTHON}" build_mozc.py build -c "${BUILDTYPE}" ${mytarget} ${myjobs} || die
156
157 if use emacs ; then
158 elisp-compile unix/emacs/*.el || die
159 fi
160 }
161
162 src_test() {
163 tc-export CC CXX AR AS RANLIB LD
164 V=1 "${PYTHON}" build_mozc.py runtests -c "${BUILDTYPE}" || die
165 }
166
167 src_install() {
168 if use emacs ; then
169 dobin "out_linux/${BUILDTYPE}/mozc_emacs_helper" || die
170 elisp-install ${PN} unix/emacs/*.{el,elc} || die
171 elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN} || die
172 fi
173
174 if use ibus ; then
175 exeinto /usr/libexec || die
176 newexe "out_linux/${BUILDTYPE}/ibus_mozc" ibus-engine-mozc || die
177 insinto /usr/share/ibus/component || die
178 doins "out_linux/${BUILDTYPE}/obj/gen/unix/ibus/mozc.xml" || die
179 insinto /usr/share/ibus-mozc || die
180 (
181 cd data/images/unix
182 newins ime_product_icon_opensource-32.png product_icon.png || die
183 for f in ui-*
184 do
185 newins ${f} ${f/ui-} || die
186 done
187 )
188
189 fi
190
191 exeinto "/usr/$(get_libdir)/mozc" || die
192 doexe "out_linux/${BUILDTYPE}/mozc_server" || die
193
194 if use qt4 ; then
195 exeinto "/usr/$(get_libdir)/mozc" || die
196 doexe "out_linux/${BUILDTYPE}/mozc_tool" || die
197 fi
198
199 if use renderer ; then
200 exeinto "/usr/$(get_libdir)/mozc" || die
201 doexe "out_linux/${BUILDTYPE}/mozc_renderer" || die
202 fi
203 }
204
205 pkg_postinst() {
206 if use emacs ; then
207 elisp-site-regen
208 elog "You can use mozc-mode via LEIM (Library of Emacs Input Method)."
209 elog "Write the following settings into your init file (~/.emacs.d/init.el"
210 elog "or ~/.emacs) in order to use mozc-mode by default, or you can call"
211 elog "\`set-input-method' and set \"japanese-mozc\" anytime you have loaded"
212 elog "mozc.el"
213 elog
214 elog " (require 'mozc)"
215 elog " (set-language-environment \"Japanese\")"
216 elog " (setq default-input-method \"japanese-mozc\")"
217 elog
218 elog "Having the above settings, just type C-\\ which is bound to"
219 elog "\`toggle-input-method' by default."
220 fi
221 }
222
223 pkg_postrm() {
224 use emacs && elisp-site-regen
225 }