From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 096471396D0 for ; Thu, 28 Sep 2017 17:18:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4796D2BC015; Thu, 28 Sep 2017 17:18:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 190B62BC015 for ; Thu, 28 Sep 2017 17:18:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CF72834171A for ; Thu, 28 Sep 2017 17:18:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9BCE59095 for ; Thu, 28 Sep 2017 17:18:50 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1506618660.8effb27cc81b23cd05c9c2dfc63983a64d65437d.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/mozc/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-i18n/mozc/mozc-9999.ebuild X-VCS-Directories: app-i18n/mozc/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 8effb27cc81b23cd05c9c2dfc63983a64d65437d X-VCS-Branch: master Date: Thu, 28 Sep 2017 17:18:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 77c29b76-1dfb-4be4-867d-7f01393e704f X-Archives-Hash: 088b63173fd0ff4cb323bf01051d6b99 commit: 8effb27cc81b23cd05c9c2dfc63983a64d65437d Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Thu Sep 28 16:31:10 2017 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Thu Sep 28 17:11:00 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8effb27c app-i18n/mozc: Add live ebuild. app-i18n/mozc/mozc-9999.ebuild | 309 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) diff --git a/app-i18n/mozc/mozc-9999.ebuild b/app-i18n/mozc/mozc-9999.ebuild new file mode 100644 index 00000000000..686839da1c0 --- /dev/null +++ b/app-i18n/mozc/mozc-9999.ebuild @@ -0,0 +1,309 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=(python2_7) + +inherit elisp-common multiprocessing python-any-r1 toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/google/mozc" + EGIT_SUBMODULES=(src/third_party/japanese_usage_dictionary) +else + MOZC_GIT_REVISION="" + JAPANESE_USAGE_DICTIONARY_GIT_REVISION="" + JAPANESE_USAGE_DICTIONARY_DATE="" +fi + +FCITX_PATCH_VERSION="2.18.2612.102.1" + +DESCRIPTION="Mozc - Japanese input method editor" +HOMEPAGE="https://github.com/google/mozc" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${P}.tar.gz + https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}.tar.gz -> japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz" +fi +SRC_URI+=" fcitx4? ( https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${FCITX_PATCH_VERSION}.patch )" + +# Mozc: BSD +# src/data/dictionary_oss: ipadic, public-domain +# src/data/unicode: unicode +# japanese-usage-dictionary: BSD-2 +LICENSE="BSD BSD-2 ipadic public-domain unicode" +SLOT="0" +KEYWORDS="" +IUSE="debug emacs fcitx4 +gui +handwriting-tegaki handwriting-tomoe ibus renderer test" +REQUIRED_USE="|| ( emacs fcitx4 ibus ) gui? ( ^^ ( handwriting-tegaki handwriting-tomoe ) ) !gui? ( !handwriting-tegaki !handwriting-tomoe )" + +RDEPEND="dev-libs/protobuf:= + emacs? ( virtual/emacs ) + fcitx4? ( app-i18n/fcitx:4 ) + gui? ( + app-i18n/zinnia + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + handwriting-tegaki? ( app-i18n/tegaki-zinnia-japanese ) + handwriting-tomoe? ( app-i18n/zinnia-tomoe ) + ) + ibus? ( + >=app-i18n/ibus-1.4.1 + dev-libs/glib:2 + x11-libs/libxcb + ) + renderer? ( + dev-libs/glib:2 + x11-libs/cairo + x11-libs/gtk+:2 + x11-libs/pango + )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + dev-util/gyp + dev-util/ninja + virtual/pkgconfig + test? ( + >=dev-cpp/gtest-1.8.0 + dev-libs/jsoncpp + )" + +S="${WORKDIR}/${P}/src" + +SITEFILE="50${PN}-gentoo.el" + +execute() { + einfo "$@" + "$@" +} + +src_unpack() { + if [[ "${PV}" == "9999" ]]; then + git-r3_src_unpack + else + unpack ${P}.tar.gz + mv mozc-${MOZC_GIT_REVISION} ${P} || die + + unpack japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz + cp -p japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}/usage_dict.txt ${P}/src/third_party/japanese_usage_dictionary || die + fi +} + +src_prepare() { + eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-system_libraries.patch" + eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_build.patch" + eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_skipping.patch" + + if use fcitx4; then + eapply -p2 "${DISTDIR}/fcitx-mozc-${FCITX_PATCH_VERSION}.patch" + fi + + eapply_user + + sed \ + -e "s/def GypMain(options, unused_args):/def GypMain(options, gyp_args):/" \ + -e "s/RunOrDie(gyp_command + gyp_options)/RunOrDie(gyp_command + gyp_options + gyp_args)/" \ + -e "s/RunOrDie(\[ninja/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \ + -i build_mozc.py || die + + sed \ + -e "s/'release_extra_cflags%': \['-O2'\]/'release_extra_cflags%': []/" \ + -e "s/'debug_extra_cflags%': \['-O0', '-g'\]/'debug_extra_cflags%': []/" \ + -i gyp/common.gypi || die + + local ar=($(tc-getAR)) + local cc=($(tc-getCC)) + local cxx=($(tc-getCXX)) + local ld=($(tc-getLD)) + local nm=($(tc-getNM)) + local readelf=($(tc-getPROG READELF readelf)) + + # Use absolute paths. Non-absolute paths are mishandled by GYP. + ar[0]=$(type -P ${ar[0]}) + cc[0]=$(type -P ${cc[0]}) + cxx[0]=$(type -P ${cxx[0]}) + ld[0]=$(type -P ${ld[0]}) + nm[0]=$(type -P ${nm[0]}) + readelf[0]=$(type -P ${readelf[0]}) + + sed \ + -e "s: