diff options
author | 2010-05-18 20:26:40 +0900 | |
---|---|---|
committer | 2010-05-18 20:26:40 +0900 | |
commit | 945ace4d95a6d7099204980022d6c11817a88c4a (patch) | |
tree | 939418efd1411224e0e0da8a9aa67138cfc526df | |
parent | sys-block/compcache: Version bumped. (diff) | |
download | matsuu-945ace4d95a6d7099204980022d6c11817a88c4a.tar.gz matsuu-945ace4d95a6d7099204980022d6c11817a88c4a.tar.bz2 matsuu-945ace4d95a6d7099204980022d6c11817a88c4a.zip |
app-i18n/ibus-mozc: Initial import.
-rw-r--r-- | app-i18n/ibus-mozc/Manifest | 1 | ||||
-rw-r--r-- | app-i18n/ibus-mozc/ibus-mozc-9999.ebuild | 99 |
2 files changed, 100 insertions, 0 deletions
diff --git a/app-i18n/ibus-mozc/Manifest b/app-i18n/ibus-mozc/Manifest new file mode 100644 index 0000000..f42569c --- /dev/null +++ b/app-i18n/ibus-mozc/Manifest @@ -0,0 +1 @@ +EBUILD ibus-mozc-9999.ebuild 2590 RMD160 bf06c59df4e0f913cf4d8e4ddac1bc493e5c3aa4 SHA1 ce428de5737ba418a276119cad5b5742763baac1 SHA256 7e9090d88b4ce4d8a0cd1937c6b836bf0fe45f34e6bf5acf03744dbf9f9b1096 diff --git a/app-i18n/ibus-mozc/ibus-mozc-9999.ebuild b/app-i18n/ibus-mozc/ibus-mozc-9999.ebuild new file mode 100644 index 0000000..43a5786 --- /dev/null +++ b/app-i18n/ibus-mozc/ibus-mozc-9999.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +PYTHON_DEPEND="2" +inherit multilib python subversion toolchain-funcs + +DESCRIPTION="The Mozc engine for IBus Framework" +HOMEPAGE="http://code.google.com/p/mozc/" +# subversion eclass fetches gclient, which will then fetch mozc itself +ESVN_REPO_URI="http://src.chromium.org/svn/trunk/tools/depot_tools" +EGCLIENT_REPO_URI="http://mozc.googlecode.com/svn/trunk/src" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=app-i18n/ibus-1.2 + dev-libs/glib:2 + dev-libs/protobuf + sys-libs/zlib + net-misc/curl" +DEPEND="${RDEPEND} + dev-util/gtest" + +BUILDTYPE="${BUILDTYPE:-Release}" + +pkg_setup() { + python_set_active_version 2 +} + +src_unpack() { + subversion_src_unpack + mv "${S}" "${WORKDIR}"/depot_tools + + # Most subversion checks and configurations were already run + EGCLIENT="${WORKDIR}"/depot_tools/gclient + cd "${ESVN_STORE_DIR}" || die "gclient: can't chdir to ${ESVN_STORE_DIR}" + + if [[ ! -d ${PN} ]]; then + mkdir -p "${PN}" || die "gclient: can't mkdir ${PN}." + fi + + cd "${PN}" || die "gclient: can't chdir to ${PN}" + + if [[ ! -f .gclient ]]; then + einfo "gclient config -->" + ${EGCLIENT} config ${EGCLIENT_REPO_URI} || die "gclient: error creating config" + fi + + einfo "gclient sync start -->" + einfo " repository: ${EGCLIENT_REPO_URI}" + ${EGCLIENT} sync || die "gclient: can't fetch to ${PN} from ${EGCLIENT_REPO_URI}." + einfo " working copy: ${ESVN_STORE_DIR}/${PN}" + + mkdir -p "${S}" + rsync -rlpgo --exclude=".svn/" src/ "${S}" || die "gclient: can't export to ${S}." +} + +src_prepare() { + sed -i -e "s:/lib:/$(get_libdir):g" unix/ibus/ibus.gyp || die +} + +src_configure() { + # CFLAGS/LDFLAGS + mkdir -p "${S}"/.gyp || die "cflags mkdir failed" + cat << EOF > "${S}"/.gyp/include.gypi || die "cflags cat failed" +{ + 'target_defaults': { + 'cflags': [ '${CFLAGS// /','}' ], + 'ldflags': [ '${LDFLAGS// /','}' ], + }, +} +EOF + export HOME="${S}" + export BUILD_COMMAND="emake" + "$(PYTHON)" build_mozc.py gyp || die "gyp failed" +} + +src_compile() { + CFLAGS="" CXXFLAGS="" "$(PYTHON)" build_mozc.py build_tools -c "${BUILDTYPE}" || die + + export CXX="$(tc-getCXX)" + export CC="$(tc-getCC)" + export AR="$(tc-getAR)" + export AS="$(tc-getAS)" + export RANLIB="$(tc-getRANLIB)" + export LD="$(tc-getLD)" + "$(PYTHON)" build_mozc.py build -c "${BUILDTYPE}" unix:ibus_mozc || die +} + +src_install() { + exeinto /usr/libexec || die + newexe "out/${BUILDTYPE}/ibus_mozc" ibus-engine-mozc || die + insinto /usr/share/ibus/component || die + doins unix/ibus/mozc.xml || die +} |