From 7166f3a0a0b7886d340010458d0b130013cb9989 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Aug 2024 12:00:19 +0100 Subject: gentoo auto-resync : 28:08:2024 - 12:00:19 --- app-i18n/Manifest.gz | Bin 17511 -> 17503 bytes app-i18n/mozc/Manifest | 3 +- .../files/mozc-2.28.5029.102-abseil-20240116.patch | 50 +++ app-i18n/mozc/mozc-2.28.5029.102-r2.ebuild | 466 -------------------- app-i18n/mozc/mozc-2.28.5029.102-r3.ebuild | 467 +++++++++++++++++++++ app-i18n/opencc/Manifest | 1 + app-i18n/opencc/opencc-1.1.7-r1.ebuild | 121 ++++++ 7 files changed, 641 insertions(+), 467 deletions(-) create mode 100644 app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20240116.patch delete mode 100644 app-i18n/mozc/mozc-2.28.5029.102-r2.ebuild create mode 100644 app-i18n/mozc/mozc-2.28.5029.102-r3.ebuild create mode 100644 app-i18n/opencc/opencc-1.1.7-r1.ebuild (limited to 'app-i18n') diff --git a/app-i18n/Manifest.gz b/app-i18n/Manifest.gz index f4d87240f517..98bf15854223 100644 Binary files a/app-i18n/Manifest.gz and b/app-i18n/Manifest.gz differ diff --git a/app-i18n/mozc/Manifest b/app-i18n/mozc/Manifest index 7588c0c515aa..aec944774636 100644 --- a/app-i18n/mozc/Manifest +++ b/app-i18n/mozc/Manifest @@ -2,12 +2,13 @@ AUX 50mozc-gentoo.el 121 BLAKE2B 0cad49e4a5a04d1cbdcd063cfd5a06c14bf4bab47890bbc AUX mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch 1440 BLAKE2B 6ad295704b5091cb63cd9fc6e0043d88dae4db15dceb4b6161f272f80a803e23e8103ba2336ab756326e7af051ac20bccfd0c5aaf2b917783381c61e8b2879c9 SHA512 41f3b983521a1c9055a7a640c76aacb37ca19473d2a99409c23bc82f04685e671e7be9f8cf1eb6fc146426408a5ff9d56ad48bb6742835d9f2b5e89700b3d251 AUX mozc-2.28.5029.102-abseil-20230802.0-fcitx5.patch 961 BLAKE2B cae8e7ed24ffd624e75885ccd2dba675e8d7956a2978a8255a1a52fb556928db6cc50c3b6ffff8e33e506abcdc3a6ed7fd7ed3b78bafdd0688ba6f0438a56024 SHA512 9e5d0f1b6d1fefe7c9e06f8c43eac57271a5da40365754c4b48ee10e11391c25dcf76a0aff31eb0e81f76cc3c8e258361796ce32507e9b38f93f18746ce7172c AUX mozc-2.28.5029.102-abseil-20230802.0.patch 485 BLAKE2B e7ea30b1dc1f4441fa4415cadb98e51f9e08e3eeab75a74363d7848049e686b0b1787b4468ae5b96dba78cbef7ce94a821eaae3dac24dcd94af191f3142d04b2 SHA512 54eef6ca15e6fd4b3909c62075c589033c6e99175e1775ca776c06140180b4ec349201429bd2980c0acbf347660d1900d543e86e9b8c10e90f3e9a8809913b48 +AUX mozc-2.28.5029.102-abseil-20240116.patch 2191 BLAKE2B a49146b1bf1c8fad486d9408ba1f392b37df0413023f277132b4956683545320b3964925dba2dc3880a159d6ba37a611d52c8f1588a6309f02b6b6731edea60c SHA512 dc3b394a2477800162aa2e34721b455569289936d8aa05b09a3de68b731855e9814c80df458faed1149e231a12a605f24838c2b56559604a0a1b74f5fc261c76 AUX mozc-2.28.5029.102-abseil.patch 831 BLAKE2B 1d76f9d3a077a448966b96311a76caa1a0468e0a47a51db2971764a1408ec0c72db2ea1fd8fba64b6d8f7ea3730b4f0038449701a86b1457387b5b3813ff6c74 SHA512 0c1809d9066faa4a960bd94204e31e3942feeee36db9ffc58b2686ea7d14d043831d7820ef1fb0d7f747744855f02a67639af1431402728b558eb944c0b4e9d0 DIST fcitx-mozc-2.28.5029.102-2.28.5029.102.tar.gz 37246575 BLAKE2B 54381968e33870f2d9f769184cf49428548d04de66e767140c8f053fad7873f1b2e3b02be81ce54e51b824d2c9cd971da37bff8b60efe60c9e2c748ff298afbd SHA512 4962e9505b79d4680a260c257719ba2486a6fe127018298758728faa9535504bc2dd6b1bfb430ac2982cb377cda52c145430531afd0968f49f91d366fdd43d92 DIST japanese-usage-dictionary-20180701040110.tar.gz 71285 BLAKE2B dfad056a1d5061b6764f583da15b9ad60a3c4421cee0430c4665d1c2779a64f9b31473c1746a3e2b9bda5167349432e51dcf7d4d48f75fde9543e9c16ff74c0d SHA512 68b4d3f52dd6cd4f00a8012a870b4f5929519cd69815b1729f3881d1f964802308f4aa101e236824b4c0f832183a9e8097437ed620403f2a652f126e7cdc1eb3 DIST mozc-2.28.5029.102-2.28.5029.102.tar.gz 37247099 BLAKE2B 4bb528991102d34a26321e6fa00a73cc83cb103e0b765f1ebb837dd6894387288b13ed75cc255003d07d6f0c4a82f963684fa4f2bd9b5043cfaddb57a5f5cef0 SHA512 b20aa45757db92f66d1c135eacf907b4cec937226a8d09e5f9f6768ae22a6b8464e3b75276773ce55413f2002ffcc3d8cae136e7fd3acfc0733e48bccf848d5b DIST mozc-2.28.5029.102-patches.tar.xz 224380 BLAKE2B 377d2cac6ec8a9c90661f10c0b105d8347ca8080ec43cee3dfd4660feadfe2d9b204d6e4b9e22bd11a5fdbbf26e7f6f298b703b88fb1621ea1847741408c1953 SHA512 5836a19ea68de271475b3ca1efce928b0ad012c96ff7ecdc4474b05daf8b8df022203eb46ec839b76e7d50be7a75b8f278d534d762fac0e612a8f09ae13c7c16 EBUILD mozc-2.28.5029.102-r1.ebuild 10859 BLAKE2B 31baf08e330182b12946f54eb5fd0982971eda22085de565ab16f4f5a5135eac367843699bc77cf1c7ea97c138a21a25f169888a26039aebc378c546795ed443 SHA512 2a9bca391b312fb79c0601e832ab382833c82113e8d3ba369a39f280cea4efebf375e6c5d87f445766347f66d60bf820aeeb7f59482d7c77044e6c826c61becf -EBUILD mozc-2.28.5029.102-r2.ebuild 13118 BLAKE2B 4a833ea35e4ace7bfe48d508a3b012e6e4fce7f5637171e89798fde90c5719c07077ac3227f2c426426dd587ccae11e06729de5c4754f320d9ba6a0078e0203b SHA512 9b18c96869b545e9c3c4e09886bf8b1f6f3f1b8ead224924f1e7770c8fcb53e0ae1f8bbe45b0eb42ec917f5f2095312f09ebf1251165aa3d07aa01d87ec6ae63 +EBUILD mozc-2.28.5029.102-r3.ebuild 13164 BLAKE2B f8106b7c4c2cc1c6d67adf3e2faf0221998691e5619e0469fc0f5bec84b65773a0a2622105e795859edaf98d0e7ad307fd121f29ee04179ec8a56a2c3ccdb86a SHA512 e5b221d91c9ac1ad507ef755c858f3a4c84d6820ae1d51c2e1f068b48c662f7ef19e42e3c80ea2d67465444b08cf949f62200f969b59346a06358f7ddc459e3e EBUILD mozc-2.28.5029.102.ebuild 10725 BLAKE2B c2486d67e9986e1f7f21d42bddbc3527dc92270818f1bd982fd99836c9a1fb0c95556331e5f5af57c5731b4be9221ebaff88c72844612e5e14e905e11f8c56fd SHA512 3885d73b7afdaa42883b8ae8944b3e7e3eb2f73a7c3da51c5ad26bbd816d4b13b2da0f21ae5ed3a7c0bf1c87bcadf0e1a81d82b4530b2e1280e6d163935a5738 MISC metadata.xml 687 BLAKE2B c7f99282b685a2a6f8d1cf53668225ca50587a8a6023637d1c9a74f1078e38cf512a10edc92eb6aa7190414c040dc27d136f8da5ca7fd73e18f3a41746bfb416 SHA512 3979cb05ef5bf5941568b25896e46918aa0783ebbbe298fb90420c790bcd0bc4270c2c65577b90400fbd05e38ea0ae74d2f5b5cb3dd71cc9ebf15e82f9c6e761 diff --git a/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20240116.patch b/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20240116.patch new file mode 100644 index 000000000000..804b4d9ff3d4 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20240116.patch @@ -0,0 +1,50 @@ +Exported from my fork: https://github.com/xen0n/mozc, branch +gentoo-2.28.5029.102. + +From: WANG Xuerui +Date: Tue, 27 Aug 2024 16:44:13 +0800 +Subject: [PATCH] fix build with abseil-cpp 20240116 + +Signed-off-by: WANG Xuerui +--- a/src/base/absl.gyp ++++ b/src/base/absl.gyp +@@ -128,7 +128,7 @@ + 'all_dependent_settings': { + 'link_settings': { + 'libraries': [ +- '-labsl_flags -labsl_flags_internal -labsl_synchronization -labsl_flags_reflection -labsl_flags_marshalling', ++ '-labsl_flags_internal -labsl_raw_hash_set -labsl_city -labsl_hash -labsl_low_level_hash -labsl_synchronization -labsl_flags_reflection -labsl_flags_marshalling', + ], + }, + }, +@@ -178,7 +178,7 @@ + 'all_dependent_settings': { + 'link_settings': { + 'libraries': [ +- '-labsl_flags_commandlineflag_internal -labsl_flags_usage -labsl_flags_usage_internal -labsl_flags_internal -labsl_flags -labsl_flags_private_handle_accessor -labsl_flags_program_name -labsl_flags_parse', ++ '-labsl_flags_commandlineflag_internal -labsl_flags_usage -labsl_flags_usage_internal -labsl_flags_internal -labsl_flags_private_handle_accessor -labsl_flags_program_name -labsl_flags_parse', + ], + }, + }, +@@ -398,7 +398,7 @@ + 'all_dependent_settings': { + 'link_settings': { + 'libraries': [ +- '-labsl_synchronization -labsl_flags -labsl_graphcycles_internal -labsl_string_view', ++ '-labsl_synchronization -labsl_graphcycles_internal -labsl_string_view', + ], + }, + }, +--- a/src/dictionary/file/codec.cc ++++ b/src/dictionary/file/codec.cc +@@ -42,6 +42,10 @@ + #include "dictionary/file/codec_interface.h" + #include "dictionary/file/codec_util.h" + #include "dictionary/file/section.h" ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION >= 20240116 ++// Abseil 20240116.0 needs explicit inclusion for StrCat ++#include "absl/strings/str_cat.h" ++#endif + #include "absl/status/status.h" + + namespace mozc { diff --git a/app-i18n/mozc/mozc-2.28.5029.102-r2.ebuild b/app-i18n/mozc/mozc-2.28.5029.102-r2.ebuild deleted file mode 100644 index c86eb2dc6fcb..000000000000 --- a/app-i18n/mozc/mozc-2.28.5029.102-r2.ebuild +++ /dev/null @@ -1,466 +0,0 @@ -# Copyright 2010-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit desktop edo elisp-common multiprocessing python-any-r1 savedconfig toolchain-funcs xdg - -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="305e9a7374254148474d067c46d55a4ee6081837" - MOZC_DATE="${PV#*_p}" - MOZC_DATE="${MOZC_DATE%%_p*}" - - FCITX_MOZC_GIT_REVISION="242b4f703cba27d4ff4dc123c713a478f964e001" - 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 - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-2.28.5029.102-patches.tar.xz - fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz ) - fcitx5? ( 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 ~x86" -IUSE="debug emacs fcitx4 fcitx5 +gui ibus renderer test" -REQUIRED_USE="|| ( emacs fcitx4 fcitx5 ibus )" -RESTRICT="!test? ( test )" - -BDEPEND=" - dev-build/gyp - $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]') - >=dev-libs/protobuf-3.0.0 - app-alternatives/ninja - virtual/pkgconfig - emacs? ( app-editors/emacs:* ) - fcitx4? ( sys-devel/gettext ) - fcitx5? ( sys-devel/gettext ) -" -DEPEND=" - >=dev-cpp/abseil-cpp-20230802.0:=[cxx17(+)] - >=dev-libs/protobuf-3.0.0:= - fcitx4? ( - app-i18n/fcitx:4 - virtual/libintl - ) - fcitx5? ( - app-i18n/fcitx:5 - app-i18n/libime - sys-devel/gettext - 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-20230802.0:=[cxx17(+)] - >=dev-libs/protobuf-3.0.0:= - emacs? ( app-editors/emacs:* ) - fcitx4? ( - app-i18n/fcitx:4 - virtual/libintl - ) - fcitx5? ( - app-i18n/fcitx:5 - app-i18n/libime - sys-devel/gettext - 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" - -PATCHES=( - "${WORKDIR}"/mozc-2.28.5029.102-patches - "${FILESDIR}"/mozc-2.28.5029.102-abseil.patch - "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0.patch -) - -python_check_deps() { - python_has_version "dev-python/six[${PYTHON_USEDEP}]" -} - -src_unpack() { - if [[ "${PV}" == "9999" ]]; then - git-r3_src_unpack - - if use fcitx4 || use fcitx5; 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 - if use fcitx5; then - cp -pr "${WORKDIR}"/fcitx{,5}-mozc || die - fi - else - unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.tar.gz - mv mozc-${MOZC_GIT_REVISION} ${P} || die - - unpack ${PN}-2.28.5029.102-patches.tar.xz - - 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 || use fcitx5; then - unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz - if use fcitx4; then - cp -pr mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN} || die - fi - if use fcitx5; then - cp -pr mozc-${FCITX_MOZC_GIT_REVISION} fcitx5-${PN} || die - fi - rm -r mozc-${FCITX_MOZC_GIT_REVISION} || die - fi - fi -} - -src_prepare() { - if use fcitx4; then - cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die - PATCHES+=( "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch ) - fi - if use fcitx5; then - cp -pr "${WORKDIR}/fcitx5-mozc/src/unix/fcitx5" unix || die - PATCHES+=( "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0-fcitx5.patch ) - fi - - pushd "${WORKDIR}/${P}" > /dev/null || die - default - 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 "${MAKEOPTS}" 999)', '-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:> "${WORKDIR}/${P}/src/data/dictionary_oss/dictionary00.txt" || die - fi -} - -src_configure() { - if use debug; then - BUILD_TYPE="Debug" - else - BUILD_TYPE="Release" - fi - - local gyp_arguments=() - - if tc-is-gcc; then - gyp_arguments+=(-D compiler_host=gcc -D compiler_target=gcc) - elif tc-is-clang; then - gyp_arguments+=(-D compiler_host=clang -D compiler_target=clang) - else - gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown) - fi - - gyp_arguments+=(-D debug_extra_cflags=) - gyp_arguments+=(-D release_extra_cflags=) - - gyp_arguments+=(-D use_fcitx=$(usex fcitx4 YES NO)) - gyp_arguments+=(-D use_fcitx5=$(usex fcitx5 YES NO)) - gyp_arguments+=(-D use_libibus=$(usex ibus 1 0)) - gyp_arguments+=(-D use_libprotobuf=1) - gyp_arguments+=(-D use_system_abseil_cpp=1) - gyp_arguments+=(-D use_system_gtest=$(usex test 1 0)) - gyp_arguments+=(-D use_system_jsoncpp=$(usex test 1 0)) - gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0)) - - gyp_arguments+=(-D server_dir="${EPREFIX}/usr/libexec/mozc") - gyp_arguments+=(-D document_dir="${EPREFIX}/usr/libexec/mozc/documents") - - if use ibus; then - gyp_arguments+=(-D ibus_mozc_path="${EPREFIX}/usr/libexec/ibus-engine-mozc") - gyp_arguments+=(-D ibus_mozc_icon_path="${EPREFIX}/usr/share/ibus-mozc/product_icon.png") - fi - - unset AR CC CXX LD NM READELF - - edo "${PYTHON}" build_mozc.py gyp \ - --gypdir="${EPREFIX}/usr/bin" \ - --server_dir="${EPREFIX}/usr/libexec/mozc" \ - --verbose \ - $(usex gui "" --noqt) \ - -- "${gyp_arguments[@]}" -} - -src_compile() { - local targets=(server/server.gyp:mozc_server) - if use emacs; then - targets+=(unix/emacs/emacs.gyp:mozc_emacs_helper) - fi - if use fcitx4; then - targets+=(unix/fcitx/fcitx.gyp:fcitx-mozc) - fi - if use fcitx5; then - targets+=(unix/fcitx5/fcitx5.gyp:fcitx5-mozc) - fi - if use gui; then - targets+=(gui/gui.gyp:mozc_tool) - fi - if use ibus; then - targets+=(unix/ibus/ibus.gyp:ibus_mozc) - fi - if use renderer; then - targets+=(renderer/renderer.gyp:mozc_renderer) - fi - if use test; then - targets+=(gyp/tests.gyp:unittests) - fi - - if use ibus; then - GYP_IBUS_FLAG="--use_gyp_for_ibus_build" - fi - - edo "${PYTHON}" build_mozc.py build -c ${BUILD_TYPE} ${GYP_IBUS_FLAG} -v "${targets[@]}" - - if use emacs; then - elisp-compile unix/emacs/*.el - fi -} - -src_test() { - edo "${PYTHON}" build_mozc.py runtests -c ${BUILD_TYPE} --test_jobs 1 -} - -src_install() { - exeinto /usr/libexec/mozc - doexe out_linux/${BUILD_TYPE}/mozc_server - - [[ -s mozcdic-ut.txt ]] && save_config mozcdic-ut.txt - - if use gui; then - doexe out_linux/${BUILD_TYPE}/mozc_tool - fi - - if use renderer; then - doexe out_linux/${BUILD_TYPE}/mozc_renderer - fi - - insinto /usr/libexec/mozc/documents - doins data/installer/credits_en.html - - if use emacs; then - dobin out_linux/${BUILD_TYPE}/mozc_emacs_helper - elisp-install ${PN} unix/emacs/*.{el,elc} - elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN} - fi - - if use fcitx4; then - exeinto /usr/$(get_libdir)/fcitx - doexe out_linux/${BUILD_TYPE}/fcitx-mozc.so - - insinto /usr/share/fcitx/addon - doins unix/fcitx/fcitx-mozc.conf - - insinto /usr/share/fcitx/inputmethod - doins unix/fcitx/mozc.conf - - insinto /usr/share/fcitx/mozc/icon - newins data/images/product_icon_32bpp-128.png mozc.png - local image - for image in ../../fcitx-${PN}/src/data/images/unix/ui-*.png; do - newins "${image}" "mozc-${image#../../fcitx-${PN}/src/data/images/unix/ui-}" - done - - local locale mo_file - for mo_file in out_linux/${BUILD_TYPE}/gen/unix/fcitx/po/*.mo; do - locale="${mo_file##*/}" - locale="${locale%.mo}" - insinto /usr/share/locale/${locale}/LC_MESSAGES - newins "${mo_file}" fcitx-mozc.mo - done - fi - - if use fcitx5; then - exeinto /usr/$(get_libdir)/fcitx5 - doexe out_linux/${BUILD_TYPE}/fcitx5-mozc.so - - insinto /usr/share/fcitx5/addon - newins unix/fcitx5/mozc-addon.conf mozc.conf - - insinto /usr/share/fcitx5/inputmethod - doins unix/fcitx5/mozc.conf - - local orgfcitx5="org.fcitx.Fcitx5.fcitx-mozc" - newicon -s 128 data/images/product_icon_32bpp-128.png ${orgfcitx5}.png - newicon -s 128 data/images/product_icon_32bpp-128.png fcitx-mozc.png - newicon -s 32 data/images/unix/ime_product_icon_opensource-32.png ${orgfcitx5}.png - newicon -s 32 data/images/unix/ime_product_icon_opensource-32.png fcitx-mozc.png - for uiimg in ../../fcitx5-mozc/scripts/icons/ui-*.png; do - dimg=${uiimg#*ui-} - newicon -s 48 ${uiimg} ${orgfcitx5}-${dimg/_/-} - newicon -s 48 ${uiimg} fcitx-mozc-${dimg/_/-} - done - - local locale mo_file - for mo_file in unix/fcitx5/po/*.po; do - locale="${mo_file##*/}" - locale="${locale%.po}" - msgfmt ${mo_file} -o ${mo_file/.po/.mo} || die - insinto /usr/share/locale/${locale}/LC_MESSAGES - newins "${mo_file/.po/.mo}" fcitx5-mozc.mo - done - msgfmt --xml -d unix/fcitx5/po/ --template unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml.in -o \ - unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml || die - insinto /usr/share/metainfo - doins unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml - fi - - if use ibus; then - exeinto /usr/libexec - newexe out_linux/${BUILD_TYPE}/ibus_mozc ibus-engine-mozc - - insinto /usr/share/ibus/component - doins out_linux/${BUILD_TYPE}/gen/unix/ibus/mozc.xml - - insinto /usr/share/ibus-mozc - newins data/images/unix/ime_product_icon_opensource-32.png product_icon.png - local image - for image in data/images/unix/ui-*.png; do - newins "${image}" "${image#data/images/unix/ui-}" - done - fi -} - -pkg_postinst() { - elog - elog "ENVIRONMENTAL VARIABLES" - elog - elog "MOZC_SERVER_DIRECTORY" - elog " Mozc server directory" - elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc\"" - elog "MOZC_DOCUMENTS_DIRECTORY" - elog " Mozc documents directory" - elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc/documents\"" - elog "MOZC_CONFIGURATION_DIRECTORY" - elog " Mozc configuration directory" - elog " Value used by default: \"~/.mozc\"" - elog - if use emacs; then - elog - elog "USAGE IN EMACS" - elog - elog "mozc-mode is minor mode to input Japanese text using Mozc server." - elog "mozc-mode can be used via LEIM (Library of Emacs Input Method)." - elog - elog "In order to use mozc-mode by default, the following settings should be added to" - elog "Emacs init file (~/.emacs.d/init.el or ~/.emacs):" - elog - elog " (require 'mozc)" - elog " (set-language-environment \"Japanese\")" - elog " (setq default-input-method \"japanese-mozc\")" - elog - elog "With the above settings, typing C-\\ (which is bound to \"toggle-input-method\"" - elog "by default) will enable mozc-mode." - elog - elog "Alternatively, at run time, after loading mozc.el, mozc-mode can be activated by" - elog "calling \"set-input-method\" and entering \"japanese-mozc\"." - elog - - elisp-site-regen - fi - xdg_pkg_postinst -} - -pkg_postrm() { - if use emacs; then - elisp-site-regen - fi - xdg_pkg_postrm -} diff --git a/app-i18n/mozc/mozc-2.28.5029.102-r3.ebuild b/app-i18n/mozc/mozc-2.28.5029.102-r3.ebuild new file mode 100644 index 000000000000..880a0b720655 --- /dev/null +++ b/app-i18n/mozc/mozc-2.28.5029.102-r3.ebuild @@ -0,0 +1,467 @@ +# Copyright 2010-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit desktop edo elisp-common multiprocessing python-any-r1 savedconfig toolchain-funcs xdg + +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="305e9a7374254148474d067c46d55a4ee6081837" + MOZC_DATE="${PV#*_p}" + MOZC_DATE="${MOZC_DATE%%_p*}" + + FCITX_MOZC_GIT_REVISION="242b4f703cba27d4ff4dc123c713a478f964e001" + 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 + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-2.28.5029.102-patches.tar.xz + fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz ) + fcitx5? ( 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 ~x86" +IUSE="debug emacs fcitx4 fcitx5 +gui ibus renderer test" +REQUIRED_USE="|| ( emacs fcitx4 fcitx5 ibus )" +RESTRICT="!test? ( test )" + +BDEPEND=" + dev-build/gyp + $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]') + >=dev-libs/protobuf-3.0.0 + app-alternatives/ninja + virtual/pkgconfig + emacs? ( app-editors/emacs:* ) + fcitx4? ( sys-devel/gettext ) + fcitx5? ( sys-devel/gettext ) +" +DEPEND=" + >=dev-cpp/abseil-cpp-20240116.0:= + >=dev-libs/protobuf-3.0.0:= + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + fcitx5? ( + app-i18n/fcitx:5 + app-i18n/libime + sys-devel/gettext + 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-20230802.0:=[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= + emacs? ( app-editors/emacs:* ) + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + fcitx5? ( + app-i18n/fcitx:5 + app-i18n/libime + sys-devel/gettext + 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" + +PATCHES=( + "${WORKDIR}"/mozc-2.28.5029.102-patches + "${FILESDIR}"/mozc-2.28.5029.102-abseil.patch + "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0.patch + "${FILESDIR}"/mozc-2.28.5029.102-abseil-20240116.patch +) + +python_check_deps() { + python_has_version "dev-python/six[${PYTHON_USEDEP}]" +} + +src_unpack() { + if [[ "${PV}" == "9999" ]]; then + git-r3_src_unpack + + if use fcitx4 || use fcitx5; 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 + if use fcitx5; then + cp -pr "${WORKDIR}"/fcitx{,5}-mozc || die + fi + else + unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.tar.gz + mv mozc-${MOZC_GIT_REVISION} ${P} || die + + unpack ${PN}-2.28.5029.102-patches.tar.xz + + 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 || use fcitx5; then + unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz + if use fcitx4; then + cp -pr mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN} || die + fi + if use fcitx5; then + cp -pr mozc-${FCITX_MOZC_GIT_REVISION} fcitx5-${PN} || die + fi + rm -r mozc-${FCITX_MOZC_GIT_REVISION} || die + fi + fi +} + +src_prepare() { + if use fcitx4; then + cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die + PATCHES+=( "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0-fcitx4.patch ) + fi + if use fcitx5; then + cp -pr "${WORKDIR}/fcitx5-mozc/src/unix/fcitx5" unix || die + PATCHES+=( "${FILESDIR}"/mozc-2.28.5029.102-abseil-20230802.0-fcitx5.patch ) + fi + + pushd "${WORKDIR}/${P}" > /dev/null || die + default + 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 "${MAKEOPTS}" 999)', '-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:> "${WORKDIR}/${P}/src/data/dictionary_oss/dictionary00.txt" || die + fi +} + +src_configure() { + if use debug; then + BUILD_TYPE="Debug" + else + BUILD_TYPE="Release" + fi + + local gyp_arguments=() + + if tc-is-gcc; then + gyp_arguments+=(-D compiler_host=gcc -D compiler_target=gcc) + elif tc-is-clang; then + gyp_arguments+=(-D compiler_host=clang -D compiler_target=clang) + else + gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown) + fi + + gyp_arguments+=(-D debug_extra_cflags=) + gyp_arguments+=(-D release_extra_cflags=) + + gyp_arguments+=(-D use_fcitx=$(usex fcitx4 YES NO)) + gyp_arguments+=(-D use_fcitx5=$(usex fcitx5 YES NO)) + gyp_arguments+=(-D use_libibus=$(usex ibus 1 0)) + gyp_arguments+=(-D use_libprotobuf=1) + gyp_arguments+=(-D use_system_abseil_cpp=1) + gyp_arguments+=(-D use_system_gtest=$(usex test 1 0)) + gyp_arguments+=(-D use_system_jsoncpp=$(usex test 1 0)) + gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0)) + + gyp_arguments+=(-D server_dir="${EPREFIX}/usr/libexec/mozc") + gyp_arguments+=(-D document_dir="${EPREFIX}/usr/libexec/mozc/documents") + + if use ibus; then + gyp_arguments+=(-D ibus_mozc_path="${EPREFIX}/usr/libexec/ibus-engine-mozc") + gyp_arguments+=(-D ibus_mozc_icon_path="${EPREFIX}/usr/share/ibus-mozc/product_icon.png") + fi + + unset AR CC CXX LD NM READELF + + edo "${PYTHON}" build_mozc.py gyp \ + --gypdir="${EPREFIX}/usr/bin" \ + --server_dir="${EPREFIX}/usr/libexec/mozc" \ + --verbose \ + $(usex gui "" --noqt) \ + -- "${gyp_arguments[@]}" +} + +src_compile() { + local targets=(server/server.gyp:mozc_server) + if use emacs; then + targets+=(unix/emacs/emacs.gyp:mozc_emacs_helper) + fi + if use fcitx4; then + targets+=(unix/fcitx/fcitx.gyp:fcitx-mozc) + fi + if use fcitx5; then + targets+=(unix/fcitx5/fcitx5.gyp:fcitx5-mozc) + fi + if use gui; then + targets+=(gui/gui.gyp:mozc_tool) + fi + if use ibus; then + targets+=(unix/ibus/ibus.gyp:ibus_mozc) + fi + if use renderer; then + targets+=(renderer/renderer.gyp:mozc_renderer) + fi + if use test; then + targets+=(gyp/tests.gyp:unittests) + fi + + if use ibus; then + GYP_IBUS_FLAG="--use_gyp_for_ibus_build" + fi + + edo "${PYTHON}" build_mozc.py build -c ${BUILD_TYPE} ${GYP_IBUS_FLAG} -v "${targets[@]}" + + if use emacs; then + elisp-compile unix/emacs/*.el + fi +} + +src_test() { + edo "${PYTHON}" build_mozc.py runtests -c ${BUILD_TYPE} --test_jobs 1 +} + +src_install() { + exeinto /usr/libexec/mozc + doexe out_linux/${BUILD_TYPE}/mozc_server + + [[ -s mozcdic-ut.txt ]] && save_config mozcdic-ut.txt + + if use gui; then + doexe out_linux/${BUILD_TYPE}/mozc_tool + fi + + if use renderer; then + doexe out_linux/${BUILD_TYPE}/mozc_renderer + fi + + insinto /usr/libexec/mozc/documents + doins data/installer/credits_en.html + + if use emacs; then + dobin out_linux/${BUILD_TYPE}/mozc_emacs_helper + elisp-install ${PN} unix/emacs/*.{el,elc} + elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN} + fi + + if use fcitx4; then + exeinto /usr/$(get_libdir)/fcitx + doexe out_linux/${BUILD_TYPE}/fcitx-mozc.so + + insinto /usr/share/fcitx/addon + doins unix/fcitx/fcitx-mozc.conf + + insinto /usr/share/fcitx/inputmethod + doins unix/fcitx/mozc.conf + + insinto /usr/share/fcitx/mozc/icon + newins data/images/product_icon_32bpp-128.png mozc.png + local image + for image in ../../fcitx-${PN}/src/data/images/unix/ui-*.png; do + newins "${image}" "mozc-${image#../../fcitx-${PN}/src/data/images/unix/ui-}" + done + + local locale mo_file + for mo_file in out_linux/${BUILD_TYPE}/gen/unix/fcitx/po/*.mo; do + locale="${mo_file##*/}" + locale="${locale%.mo}" + insinto /usr/share/locale/${locale}/LC_MESSAGES + newins "${mo_file}" fcitx-mozc.mo + done + fi + + if use fcitx5; then + exeinto /usr/$(get_libdir)/fcitx5 + doexe out_linux/${BUILD_TYPE}/fcitx5-mozc.so + + insinto /usr/share/fcitx5/addon + newins unix/fcitx5/mozc-addon.conf mozc.conf + + insinto /usr/share/fcitx5/inputmethod + doins unix/fcitx5/mozc.conf + + local orgfcitx5="org.fcitx.Fcitx5.fcitx-mozc" + newicon -s 128 data/images/product_icon_32bpp-128.png ${orgfcitx5}.png + newicon -s 128 data/images/product_icon_32bpp-128.png fcitx-mozc.png + newicon -s 32 data/images/unix/ime_product_icon_opensource-32.png ${orgfcitx5}.png + newicon -s 32 data/images/unix/ime_product_icon_opensource-32.png fcitx-mozc.png + for uiimg in ../../fcitx5-mozc/scripts/icons/ui-*.png; do + dimg=${uiimg#*ui-} + newicon -s 48 ${uiimg} ${orgfcitx5}-${dimg/_/-} + newicon -s 48 ${uiimg} fcitx-mozc-${dimg/_/-} + done + + local locale mo_file + for mo_file in unix/fcitx5/po/*.po; do + locale="${mo_file##*/}" + locale="${locale%.po}" + msgfmt ${mo_file} -o ${mo_file/.po/.mo} || die + insinto /usr/share/locale/${locale}/LC_MESSAGES + newins "${mo_file/.po/.mo}" fcitx5-mozc.mo + done + msgfmt --xml -d unix/fcitx5/po/ --template unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml.in -o \ + unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml || die + insinto /usr/share/metainfo + doins unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml + fi + + if use ibus; then + exeinto /usr/libexec + newexe out_linux/${BUILD_TYPE}/ibus_mozc ibus-engine-mozc + + insinto /usr/share/ibus/component + doins out_linux/${BUILD_TYPE}/gen/unix/ibus/mozc.xml + + insinto /usr/share/ibus-mozc + newins data/images/unix/ime_product_icon_opensource-32.png product_icon.png + local image + for image in data/images/unix/ui-*.png; do + newins "${image}" "${image#data/images/unix/ui-}" + done + fi +} + +pkg_postinst() { + elog + elog "ENVIRONMENTAL VARIABLES" + elog + elog "MOZC_SERVER_DIRECTORY" + elog " Mozc server directory" + elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc\"" + elog "MOZC_DOCUMENTS_DIRECTORY" + elog " Mozc documents directory" + elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc/documents\"" + elog "MOZC_CONFIGURATION_DIRECTORY" + elog " Mozc configuration directory" + elog " Value used by default: \"~/.mozc\"" + elog + if use emacs; then + elog + elog "USAGE IN EMACS" + elog + elog "mozc-mode is minor mode to input Japanese text using Mozc server." + elog "mozc-mode can be used via LEIM (Library of Emacs Input Method)." + elog + elog "In order to use mozc-mode by default, the following settings should be added to" + elog "Emacs init file (~/.emacs.d/init.el or ~/.emacs):" + elog + elog " (require 'mozc)" + elog " (set-language-environment \"Japanese\")" + elog " (setq default-input-method \"japanese-mozc\")" + elog + elog "With the above settings, typing C-\\ (which is bound to \"toggle-input-method\"" + elog "by default) will enable mozc-mode." + elog + elog "Alternatively, at run time, after loading mozc.el, mozc-mode can be activated by" + elog "calling \"set-input-method\" and entering \"japanese-mozc\"." + elog + + elisp-site-regen + fi + xdg_pkg_postinst +} + +pkg_postrm() { + if use emacs; then + elisp-site-regen + fi + xdg_pkg_postrm +} diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest index 767714904f1a..bd7a16df35b1 100644 --- a/app-i18n/opencc/Manifest +++ b/app-i18n/opencc/Manifest @@ -1,5 +1,6 @@ DIST opencc-1.1.4.tar.gz 2806887 BLAKE2B 150fd83818616de42e535f349b2574ff3319e41618e522583a57a00ab08b7f28db6e8f4fa4a0d4dbe027753b5be87065b2015542251986c6301ad441c4bf4c98 SHA512 ab8e7e6a0cc71106cf09eb32899fa8620b946a406f042d75a2444096e0b383cb1993d6c2d12cd7862e71854da4cd5893442bce51df84c32ed09fdfb4a2846f46 DIST opencc-1.1.7.tar.gz 3311712 BLAKE2B 158a4ea5707ade583d326b0e4441640cbaae2ccb1c89c4ccfaeb8b8dd6f1d427a7f5fcaae7ac0bd6fca3208c65fe24577f6b6ba9c7fec1a499936ef83887d181 SHA512 26e4b12238f853b0fa91f9f0d9af7985bf04a0763185cc3b50b69ba99a2d80091b8c3160176d0d4cd348fbf1a680bfd80dc740dc60c938a256dc2dac8ef49f15 EBUILD opencc-1.1.4.ebuild 1585 BLAKE2B d8d1d3f49e839eafa6ace24e9d65742922ccf61ee7659c2e8a9acfdf8de1fb1d4f10ad1d72784538421243db765684ed9d9b3193250f4b82f4c41d128fc2e62b SHA512 70b260dd9da2569fb0bd40a863082bf9cb55e87e6520ff5309c5fc0cb39b7acaec34297a0eeee23fdb1cd9c59856c1beb498dc338224c4421cbd75aa51fb91d8 +EBUILD opencc-1.1.7-r1.ebuild 2840 BLAKE2B a6bb93ce61b7b2d0f9e628673bba0c7c6ac99804eb3e726b020bc7b634910163a1c8598560a8871c1e0ace42af3b33df70162da12bcb87446524e81de2cd76fc SHA512 d6b6cc0e6e67e9e1f3491cc5d6ddf861ed37f12c013ff60d97e29defc4f215e87bf30ad9a9773b9a068f3f6c35af1c3f68a6660bf84725b2389dfa23366c1a6d EBUILD opencc-1.1.7.ebuild 1374 BLAKE2B 0f99b303c360c7475c0bb50a4222f982e16e395ecdedd270a63a0d3106dc3ce407d21a2852686103a1695679146009a9766a2df2d36492e97d8de5daeec3dafa SHA512 946d901b2a3bf380256edda03b5f43e3168e11773b3f60de19586b90a6ae90bae173a05749c1fed47c64cc6bd6b49a0686a61b57b1bb52db39da3d1ad5063cd1 MISC metadata.xml 476 BLAKE2B 4f02f06aa7aca103fff825675453e36a256f130b086992df550aab3dee3c155a48667d00df171053b417b20873a6ed8f1142c9efcfdd8e0994fafa7c1aec5e0b SHA512 c1a73732105a87bf3bca8af82d027b5a0dc0b379e7f8b1fbd301ee6a1f0e986ce8db9542394fc87f885a8736d82836b574a956601bb244172912f58455f39bfb diff --git a/app-i18n/opencc/opencc-1.1.7-r1.ebuild b/app-i18n/opencc/opencc-1.1.7-r1.ebuild new file mode 100644 index 000000000000..89372cdb262c --- /dev/null +++ b/app-i18n/opencc/opencc-1.1.7-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 2010-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +DISTUTILS_EXT=1 +DISTUTILS_OPTIONAL=1 +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools + +inherit cmake distutils-r1 + +DESCRIPTION="Library for conversion between Traditional and Simplified Chinese characters" +HOMEPAGE="https://github.com/BYVoid/OpenCC" +SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/OpenCC-ver.${PV}" + +LICENSE="Apache-2.0" +SLOT="0/1.1" +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="doc python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +RDEPEND="dev-libs/marisa + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND} + dev-cpp/tclap + dev-libs/darts + dev-libs/rapidjson +" +BDEPEND="${PYTHON_DEPS} + doc? ( app-text/doxygen ) + python? ( + ${DISTUTILS_DEPS} + app-admin/chrpath + $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]') + test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') ) + ) + test? ( + dev-cpp/gtest + !hppa? ( !sparc? ( dev-cpp/benchmark ) ) + ) +" + +DOCS=( AUTHORS NEWS.md README.md ) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + rm -r deps || die + + sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die + + cmake_src_prepare + use python && distutils-r1_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DBUILD_PYTHON=$(usex python) + -DENABLE_BENCHMARK=$(if use test && has_version -d dev-cpp/benchmark; then echo ON; else echo OFF; fi) + -DENABLE_GTEST=$(usex test) + -DUSE_SYSTEM_DARTS=ON + -DUSE_SYSTEM_GOOGLE_BENCHMARK=ON + -DUSE_SYSTEM_GTEST=ON + -DUSE_SYSTEM_MARISA=ON + -DUSE_SYSTEM_PYBIND11=ON + -DUSE_SYSTEM_RAPIDJSON=ON + -DUSE_SYSTEM_TCLAP=ON + ) + + cmake_src_configure + use python && distutils-r1_src_configure +} + +src_compile() { + cmake_src_compile + if use python; then + cp "${BUILD_DIR}"/opencc_clib.*.so python/opencc/clib/ + distutils-r1_src_compile + fi +} + +python_test() { + epytest +} + +src_test() { + cmake_src_test + if use python; then + cd "${BUILD_DIR}_${EPYTHON}/install/usr/lib/${EPYTHON}/site-packages/opencc/clib" || die + mkdir -p share/opencc || die + cp "${S}/data/config"/*.json share/opencc/ || die + pushd "${S}" || die + + distutils-r1_src_test + + popd || die + rm -r share/ || die + fi +} + +src_install() { + cmake_src_install + if use python; then + distutils-r1_src_install + + # Hack to make opencc's python binding to use system opencc's configs + dodir "/usr/lib/${EPYTHON}/site-packages/opencc/clib/share" + dosym -r /usr/share/opencc "/usr/lib/${EPYTHON}/site-packages/opencc/clib/share/opencc" + + # Remove insecure RPATH + chrpath --delete "${ED}/usr/lib/${EPYTHON}/site-packages/opencc/clib"/*.so || die + fi +} -- cgit v1.2.3