# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-i18n/mozc/mozc-2.16.2037.102.ebuild,v 1.6 2015/04/08 07:30:31 mgorny Exp $ EAPI="5" PYTHON_COMPAT=( python2_7 ) PLOCALES="de ja zh_CN zh_TW" inherit elisp-common eutils l10n multilib multiprocessing python-single-r1 toolchain-funcs DESCRIPTION="The Mozc engine for IBus Framework" HOMEPAGE="http://code.google.com/p/mozc/" PROTOBUF_VER="2.5.0" GMOCK_VER="1.6.0" GTEST_VER="1.6.0" JSONCPP_VER="0.6.0-rc2" GYP_DATE="20140602" JAPANESE_USAGE_DICT_VER="10" FCITX_PATCH_VER="2" FCITX_PATCH="fcitx-mozc-${PV}.${FCITX_PATCH_VER}.patch" MOZC_URL="http://dev.gentoo.org/~naota/files/${P}.tar.bz2" PROTOBUF_URL="http://protobuf.googlecode.com/files/protobuf-${PROTOBUF_VER}.tar.bz2" GMOCK_URL="https://googlemock.googlecode.com/files/gmock-${GMOCK_VER}.zip" GTEST_URL="https://googletest.googlecode.com/files/gtest-${GTEST_VER}.zip" JSONCPP_URL="mirror://sourceforge/jsoncpp/jsoncpp-src-${JSONCPP_VER}.tar.gz" GYP_URL="http://dev.gentoo.org/~naota/files/gyp-${GYP_DATE}.tar.bz2" JAPANESE_USAGE_DICT_URL="http://dev.gentoo.org/~naota/files/japanese-usage-dictionary-${JAPANESE_USAGE_DICT_VER}.tar.bz2" FCITX_PATCH_URL="http://download.fcitx-im.org/fcitx-mozc/${FCITX_PATCH}" SRC_URI="${MOZC_URL} ${PROTOBUF_URL} ${GYP_URL} ${JAPANESE_USAGE_DICT_URL} fcitx? ( ${FCITX_PATCH_URL} ) test? ( ${GMOCK_URL} ${GTEST_URL} ${JSONCPP_URL} )" LICENSE="BSD ipadic public-domain unicode" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="emacs fcitx +ibus +qt4 renderer test" RDEPEND="app-i18n/tegaki-zinnia-japanese dev-libs/glib:2 >=dev-libs/protobuf-2.5.0 x11-libs/libxcb emacs? ( virtual/emacs ) fcitx? ( app-i18n/fcitx ) ibus? ( >=app-i18n/ibus-1.4.1 qt4? ( app-i18n/ibus-qt ) ) renderer? ( x11-libs/gtk+:2 ) qt4? ( dev-qt/qtgui:4 app-i18n/zinnia ) ${PYTHON_DEPS}" DEPEND="${RDEPEND} dev-util/ninja virtual/pkgconfig" BUILDTYPE="${BUILDTYPE:-Release}" RESTRICT="test" SITEFILE=50${PN}-gentoo.el src_unpack() { unpack $(basename ${MOZC_URL}) unpack $(basename ${GYP_URL}) unpack $(basename ${JAPANESE_USAGE_DICT_URL}) mv gyp-${GYP_DATE} "${S}"/third_party/gyp || die mv japanese-usage-dictionary-${JAPANESE_USAGE_DICT_VER} "${S}"/third_party/japanese_usage_dictionary || die cd "${S}"/protobuf unpack $(basename ${PROTOBUF_URL}) mv protobuf-${PROTOBUF_VER} files || die if use test; then cd "${S}"/third_party unpack $(basename ${GMOCK_URL}) $(basename ${GTEST_URL}) \ $(basename ${JSONCPP_URL}) mv gmock-${GMOCK_VER} gmock || die mv gtest-${GTEST_VER} gtest || die mv jsoncpp-src-${JSONCPP_VER} jsoncpp || die fi } src_prepare() { # verbose build sed -i -e "/RunOrDie(\[make_command\]/s/build_args/build_args + [\"-v\"]/" \ build_mozc.py || die sed -i -e "s/