From 129160ec854dca4c3fedb5bcfbcb56930371da0f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 1 Jan 2021 21:06:00 +0000 Subject: gentoo new year resync : 01.01.2021 --- ....26.4220_p20201212102434_p20201219202429.ebuild | 380 +++++++++++++++++++++ 1 file changed, 380 insertions(+) create mode 100644 app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild (limited to 'app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild') diff --git a/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild b/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild new file mode 100644 index 000000000000..d6d44a3758f6 --- /dev/null +++ b/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild @@ -0,0 +1,380 @@ +# Copyright 2010-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=(python{3_7,3_8,3_9}) + +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="9ba59b64d53365c1fe93c1c245b4ec3e35bdadf0" + MOZC_DATE="${PV#*_p}" + MOZC_DATE="${MOZC_DATE%%_p*}" + + FCITX_MOZC_GIT_REVISION="1ea089debc31ff216473369ad71c08318384ee06" + FCITX_MOZC_DATE="${PV#*_p}" + FCITX_MOZC_DATE="${FCITX_MOZC_DATE#*_p}" + FCITX_MOZC_DATE="${FCITX_MOZC_DATE%%_p*}" + + JAPANESE_USAGE_DICTIONARY_GIT_REVISION="a4a66772e33746b91e99caceecced9a28507e925" + JAPANESE_USAGE_DICTIONARY_DATE="20180701040110" +fi + +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 -> ${PN}-${PV%%_p*}-${MOZC_DATE}.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 + fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz )" +fi + +# 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="~amd64 ~ppc64 ~x86" +IUSE="debug emacs fcitx4 +gui ibus renderer test" +REQUIRED_USE="|| ( emacs fcitx4 ibus )" +RESTRICT="!test? ( test )" + +BDEPEND="$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]') + >=dev-libs/protobuf-3.0.0 + dev-util/gyp + dev-util/ninja + virtual/pkgconfig + emacs? ( app-editors/emacs:* ) + fcitx4? ( sys-devel/gettext )" +DEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + 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 + ) + test? ( + >=dev-cpp/gtest-1.8.0 + dev-libs/jsoncpp + )" +RDEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= + emacs? ( app-editors/emacs:* ) + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + 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 + )" + +S="${WORKDIR}/${P}/src" + +SITEFILE="50${PN}-gentoo.el" + +execute() { + einfo "$@" + "$@" +} + +python_check_deps() { + has_version -b "dev-python/six[${PYTHON_USEDEP}]" +} + +src_unpack() { + if [[ "${PV}" == "9999" ]]; then + git-r3_src_unpack + + if use fcitx4; then + local EGIT_SUBMODULES=() + git-r3_fetch https://github.com/fcitx/mozc refs/heads/fcitx + git-r3_checkout https://github.com/fcitx/mozc "${WORKDIR}/fcitx-mozc" + fi + else + unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.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 + + if use fcitx4; then + unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz + mv mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN} + fi + fi +} + +src_prepare() { + if use fcitx4; then + cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die + fi + + pushd "${WORKDIR}/${P}" > /dev/null || die + + eapply "${FILESDIR}/${PN}-2.26.4220-system_abseil-cpp.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-system_gtest.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-system_jsoncpp.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-environmental_variables.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-server_path_check.patch" + + eapply_user + + popd > /dev/null || die + + 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 + + local ar=($(tc-getAR)) + local cc=($(tc-getCC)) + local cxx=($(tc-getCXX)) + local ld=($(tc-getLD)) + local nm=($(tc-getNM)) + local readelf=($(tc-getREADELF)) + + # 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: