From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-i18n/mozc/Manifest | 28 ++ app-i18n/mozc/files/50mozc-gentoo.el | 4 + .../files/mozc-1.10.1390.102-drop-Werror.patch | 12 + .../files/mozc-1.13.1651.102-gtk-renderer.patch | 13 + .../mozc-2.20.2673.102-system_libraries.patch | 291 +++++++++++++++++++ .../files/mozc-2.20.2673.102-tests_build.patch | 27 ++ .../files/mozc-2.20.2673.102-tests_skipping.patch | 70 +++++ app-i18n/mozc/files/mozc-ibus-1.5.4.patch | 299 ++++++++++++++++++++ app-i18n/mozc/metadata.xml | 28 ++ app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild | 176 ++++++++++++ app-i18n/mozc/mozc-1.13.1651.102.ebuild | 181 ++++++++++++ app-i18n/mozc/mozc-2.16.2037.102.ebuild | 230 +++++++++++++++ app-i18n/mozc/mozc-2.20.2673.102.ebuild | 311 +++++++++++++++++++++ app-i18n/mozc/mozc-9999.ebuild | 311 +++++++++++++++++++++ 14 files changed, 1981 insertions(+) create mode 100644 app-i18n/mozc/Manifest create mode 100644 app-i18n/mozc/files/50mozc-gentoo.el create mode 100644 app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch create mode 100644 app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch create mode 100644 app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch create mode 100644 app-i18n/mozc/files/mozc-2.20.2673.102-tests_build.patch create mode 100644 app-i18n/mozc/files/mozc-2.20.2673.102-tests_skipping.patch create mode 100644 app-i18n/mozc/files/mozc-ibus-1.5.4.patch create mode 100644 app-i18n/mozc/metadata.xml create mode 100644 app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild create mode 100644 app-i18n/mozc/mozc-1.13.1651.102.ebuild create mode 100644 app-i18n/mozc/mozc-2.16.2037.102.ebuild create mode 100644 app-i18n/mozc/mozc-2.20.2673.102.ebuild create mode 100644 app-i18n/mozc/mozc-9999.ebuild (limited to 'app-i18n/mozc') diff --git a/app-i18n/mozc/Manifest b/app-i18n/mozc/Manifest new file mode 100644 index 000000000000..f55bfab04b9a --- /dev/null +++ b/app-i18n/mozc/Manifest @@ -0,0 +1,28 @@ +AUX 50mozc-gentoo.el 121 SHA256 833039439dea484a430e832df869b3af0b8d42bae63c4d6999e72c97d55d897b SHA512 2d67a6723374872717ab7132f02f4030f00ddecabb8a1fc20c9d69d64406dc2ba2a1109734378fae7b4718a8ae9601beff4b6f27cb43a280fa2e0f946da70685 WHIRLPOOL b9e5235177ee432509c9428b632a1148e8788c1bf9b6fe57bbc4f3f747a038008ef4752a1dfacb86a5be9a018504405e6a68053dd54d381af1fd9170ba9c6ed7 +AUX mozc-1.10.1390.102-drop-Werror.patch 353 SHA256 894411a2dc704157661cc7386abf32b62abea9dc5621bc30474ce3161c54adf7 SHA512 203066f08a5094306d09c3c58f81bfb7a4069bb1eacd31f0d257701a4560adee5452a516351cd9bc5ea7227e40d31bbc6eb177422d3c37514f7573398b389bc2 WHIRLPOOL 0a3cdabbc653c42403fa60d9486927a8b4d9c2003262b973a4f4264424331a02a8fb3c413a736e797525e57f25b12a7ba2fb328ff7a7684b4bb2533f35b2ba96 +AUX mozc-1.13.1651.102-gtk-renderer.patch 547 SHA256 6daa6d077dffbcc133f49745bce5b2503b6097d8280c52a602a99b24eaac7b40 SHA512 7b4a4910a8a0a821fd8130e77ecd0b4f846f7fc2b573607e2ce0280889d625f4e374c60e35995dd5cbc2e8ccaf3443652b60764f538584e0a9d351ca67a28af4 WHIRLPOOL f4dabc1a7a4d29f5830bc641019b939405abc6c36d6acc384ed74a06995dfc31d5993653965acf60f8208969e9643ba97c1d4aca3bb7eac19ee73b4bccbd22e3 +AUX mozc-2.20.2673.102-system_libraries.patch 9659 SHA256 658ccac9192258e4838b4f25a7aed107fc2121ae16e4e92cf61570a53251f9ad SHA512 c0f858a9536fc449e0d9fb3191df2419f0273a478c31d0404713fc4feae5ffb72afec7b47b57ae2111ed0bf40ead4a75e31a68286440113968e2f4e4d6c2d856 WHIRLPOOL 068e3a5f2d41314cc5f6b3d42787b99ac3f92039061fa83fe4d9728e0d5ff22afad23762b0a75126a273d985a8e3869855bd5eaf381b7e62df9c286b13646763 +AUX mozc-2.20.2673.102-tests_build.patch 1037 SHA256 1f8e35f257e7952fc7818da1748b1be4af578066150304a7f62bdabbc1b95233 SHA512 d99ee7edbb406e123b26ec186933608b42d36193b7bfe67232810c0fbd7a92bd8cfff26dc45eae4f020e82e9a8370cf2033c750250455585b6b3d88cc8c973ef WHIRLPOOL e9384d30f4f8add826dc53fdda1e816563c51c4f7444170667fb041b18782a20f7a3f79c51d7cef19b9a27a078b375d33fdc67d6f5f6bc4321a8a3e03b208329 +AUX mozc-2.20.2673.102-tests_skipping.patch 2086 SHA256 dc86b4d5124e5c3bbce38cf12a0eaf04f7ebad932330fb3a86e7391d14e5843d SHA512 4a2e5a35c5e65ebeb737f656d6efb313c660c2c7cf62abd5d9295fd16e2dffde21d069cd74fd0cfd2454cd7f7c9d136dfbadbf79832db8441c619ff37c7e4b0e WHIRLPOOL f7576123d2e9c096d9301bb3085e3875cb8c72f53621a8adad162b826b8c5784885f4cca6cbfd28a7f7b6d589ffec4e509adcfa1d0c2d2b7e8dfdb4def89fede +AUX mozc-ibus-1.5.4.patch 10078 SHA256 8164b72ef41800f4327bf4571fa788ce927511c42c6026936a48823a76466511 SHA512 4b2c8027409acac0c70dc1b665ba2cb103bf37ac4e808c9f102e7f860d17fa5bb376d7d9bbe52b255bba87918118002eb85094b74ab70c879410ed32b5f3557e WHIRLPOOL 3850def4d1602ed594369ca8963a776a1d72d0cb008bc374779fb6fdb012c921edc0ea67388df96773c2004addcc238f0b9edb80357b4b0a115800a011eddb7f +DIST fcitx-mozc-2.16.2037.102.2.patch 140421 SHA256 ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e SHA512 22b885859588bb8e0efd354d153da461a654203729c723156a419bf33fae473e3f7165964aa3cb3b5c969f97c2727f9d87b0d587330e4eeab67f07d4458542a3 WHIRLPOOL cd9534c8904a7c9f866a8ddd41ab4c57b3ad8b5650fda4cf9ccc1e544c8e0da25c749870606687ee66e4252f224babdbe10415e035038ced654812bad8d299dc +DIST fcitx-mozc-2.18.2612.102.1.patch 140722 SHA256 0ec5dc2e9798ce7a6dbcbe847cf016b0b49be1851008143d167c13333a15ed27 SHA512 725c464727f230707b90975705ef1565f1178f9144e66c5a688696a4ef520a6fec1d11f7aa68ee05f82aa9417060b1cccf49a155e30734871a525eaa4c76addb WHIRLPOOL 25d0efd313175f6648504b989302c73ab6d82a0cf4eecf332b68347331e1feff2df6251edd49c3d4e9251a2c7e01df56eb8de54ebbbc31582f7c2b89d1da53c1 +DIST gmock-1.6.0.zip 2053682 SHA256 341ad07c31c619ba32c88c2265bc23693da1df062f47f146a7ed340f646d82b7 SHA512 7adff00bb6ff81a6ffb704be71d0747636d69e24b4a8b709e1fb8c177a9a47f6dea8d14fde73034ebfb1529c291c7212a944ad92a34f88abdfe23c2d0b11b6f7 WHIRLPOOL 1a03ff8f2d96287f5deb24f970688f20f3480e77a4a71089ef1399a87f28f616bf0feaedc217e7ac1ca8ca1246e53f5d882f350704be111ae547961949939530 +DIST gtest-1.6.0.zip 1121697 SHA256 5ec97df8e75b4ee796604e74716d1b50582beba22c5502edd055a7e67a3965d8 SHA512 f4718dfbfa3339bb9449c3f14e5b44ae405ea7df64c10a0957a6300985b71c4642981d069a1382e27ae041a4e2873527a9e442aff978447e795a190f99fac115 WHIRLPOOL 745a49020d4353ed2fa38adfc80bbd777358c831719bbe3b7c90d243f84256615222ba5f04d48d98b9e1a803bb40766799b3aedd575024c19d853d9239a12f8a +DIST gyp-20140602.tar.bz2 432422 SHA256 f67be748f4dc36aa1619f43d4624c746728cf268af7f4ebf78dab3fa6d43d973 SHA512 e3a59daac57ddafc5804384c01cf51d4b90cd119d263afd83ec6eef9239c38bc7715736f70e20e44fae04fd8be1b86aa5323908a92d574372aa298f3355ce15f WHIRLPOOL 17e4630dcd7592e8ee197b4130d6147d9fd63404938f62e08ad10a204bd4bddcfc7d394abf3572a337e3dea46d4a7361dbc0cccc02e07ab99ed8f90e80830451 +DIST japanese-usage-dictionary-10.tar.bz2 56142 SHA256 8c22284c97fdfad854790517f9200c439453c033db8f6a9d25aa5d95266b2384 SHA512 f299cf9183b9ec219d80c1fa745f351765d246d601f3c4091d1705e3c8b5ef66a32288d4c162e7bbc456b6d49ee90f1e5bf33721e1229165f3ee069daddd3198 WHIRLPOOL d2f690335cf271b0780c969f56616ece9d28f3dbe990548053a252c855db18a4a31d21e6bd8c34160c0893c21fab4543e5ff3cecb48c7f6ecfd5c84465d314a6 +DIST japanese-usage-dictionary-20120416091336.tar.gz 71051 SHA256 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1 SHA512 b7e997a979b6d50e49b9af5dc830ea4df0532f6ab1321b9ef14983f65bb54f1b2967375c82e07957ae7693ebbf43c9b56ecea6bfea8dd1fdaee444bd549d83a7 WHIRLPOOL 1c4324a6408cfc0b2e1df33a32583384ccf10374bc1a8f49f574e681a72174f7bee7e8500c93d714ee6459c087f7cd408e57cb52b8506ec50292249e50045cd2 +DIST jsoncpp-src-0.6.0-rc2.tar.gz 117661 SHA256 d4d193d163f520b08b9155cba978615892ca1359d77e3fb261fce2f86d09b283 SHA512 5d44e766aa2d7657bc68cf16173130febaa6744d5fca0c6df5465617a3f306023a17cbeb07a62ad1a34c2d183d916401b4be48f37c2416c895db4ad5d9481b3d WHIRLPOOL bfa7e70e14f3ed0911c5127da0d2099ca8b9159a900a5bc5147d1e50b5a9f9d5be69a8d46a761d277ca1edabaab8d0d3b9f81417572e4664ed8239fd83c953e6 +DIST mozc-1.10.1390.102.tar.bz2 57879881 SHA256 72a8ed6657daa1c03b1efe50c262a69be2ab66d45747a47df6e54996b6d5ee39 SHA512 4482e822f8a14bffd02cb1eaa5d14ba0a213266b2f0dd6402c42b9b357bf0d8c4dd572cef79f1d400bd68b7bd6cb4367933574f8f5967f68738249a300e3cfb9 WHIRLPOOL 90518e621ef784b438fcf677e211fdb6753719f3d78d14ce866ccea22d6d87f8d64e334bc568eebe93cb2850d3d545eb0b73d6f6de820eaf1d43f16bfdef4100 +DIST mozc-1.13.1651.102.tar.bz2 31635636 SHA256 a275accc726d55d696adf235fa40822ae099f0a02d3dc9f8d0257ba191a1bc49 SHA512 caa75e60704e904a72fd06e315a219ff304a54adaeee70a8ab75d413f7801960add103b9aae1c19ee92f6d10c4c408fd840cf78c5dde0cc21c605feac59deaf4 WHIRLPOOL 72a870cc1bc5bc63227bba61c73183f69160aa5c58c9b89e75fa65bf16bbdc2c2b873b7407d0543b3847bc046866392d9bbe6d771d7b4b7eb3f6be759f1a63b4 +DIST mozc-2.16.2037.102.tar.bz2 41172838 SHA256 4b78769b36366f056282267935a859e587f77e9aaf17132687d0e4d0c4da5cd0 SHA512 ff114a93054b43109407c44bc7c75de79fa2b028f9dba5c2ecc1776c5cbb032f184a91155b6b31bc17f0183dd70b0150ce13e80f59e26810daf4b65ba7e52be1 WHIRLPOOL 625c5a28da164ee96cdf523af32a7101357254cea1d57cd7f272bdf86ba8344d3e39bf2b2bfb0a79640d7961fd46c183eabc4002c8d86215ecffe183e4e0d193 +DIST mozc-2.20.2673.102.tar.gz 48624369 SHA256 004cb773d335e7e1075cf20fd9e713f6dcf6d158d75077bcb95358a116ad3cca SHA512 ad7a78b03b29847057625fd5422c03ac8fc5755c5e85c66fd6e80f81be719dd56bf1349a1d745797118deed239641512789687b4f9ffe49bab1bc966385229ae WHIRLPOOL f78140126a950eb28548c6ef8b20ec5599e04ac1de7d22d2b0ba00cc2471d43ec9823996e399f9025cfcbc7b50a3ecdbd3283463acb423b65089f56c96cc88db +DIST protobuf-2.5.0.tar.bz2 1866763 SHA256 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 SHA512 5994b3669808b82fef5c860ecad36358c0767f84acac877e7bfcf722e59d972835a955714149bdd4158fbd1328a51d01397a563991d26475351ee72be48142ee WHIRLPOOL 7e6786e1f20bf253d0e386a95c2bbfe1b443f484d492f97552cadcea62c24461436aa88130e3ff20b4dc9f352c101458cb8c03686f1cc4e6e2133b6e78f5b70d +EBUILD mozc-1.10.1390.102-r1.ebuild 4854 SHA256 f0c67e771fbe8f2dd8d324f0525e6cf90f14e84d9b1d7919da075f2262818efd SHA512 f84435093d31d49b8b7dd5b71c4f753ed8d0da7fb5666ff4381578dff7d9ab8cbbc02b728923f3f75c00dfe4591f7709f85df9ac7e586a1c3653b79ec0d3c60d WHIRLPOOL a97880e4d4c14843052465f1e981737e5e379d21febd2115a515cc9b20659c0f38f7af6f772f0e00e7b7b5d2bca1adf5887b7358f6d5d319db661befb7d004ae +EBUILD mozc-1.13.1651.102.ebuild 5036 SHA256 968aa5ea57c352fe27832db8242637d57f2f809b45362144d7556760e17dc405 SHA512 ee8f4d4feffc39dd01dc70ae03a5f4f307d0fff5319c38c25d7dabc35ea66855e58d84e71220ab812e31dcdb47c32097ff6685be945299213dbba24a8836fecb WHIRLPOOL a7fab3c787335db1b8f32bb693b566edb747074df9f278d55abbc22af2443fdc0e8623f1f2b4dd582ba1a854eb8dc64d5bcf38288648fa34c12bc9084ff9c598 +EBUILD mozc-2.16.2037.102.ebuild 6726 SHA256 9dc66731dcb8a792b0a309fc21b262625e1f8c22016ce2bb580b872856730e25 SHA512 eb4d744a8fb5902c66296b96987f8b50e0a3e5d8792951fe44bb84f12c3308d2512341ac89781b62e9db4d1c19b40646a3948449ea744e2e7470e28c048ecaf6 WHIRLPOOL 991dc805f479a90f2ad540ea1d1ed1fd6147f628081e9048554cb85e47583c53b7e1cec19cada1200475a8d8d42d30ea8e5acbf57869a32f1565dac3cde25b75 +EBUILD mozc-2.20.2673.102.ebuild 8922 SHA256 fe3d0ea5bccb5e22934c621e8a30f7b181920e7037b047dfa08473f3bb6a805b SHA512 7167848180259f4730aec41ca8f56a2611894d6670ae0e806109e8b8aa12989637d09c9aa3c106cf4b99f88a7a4a5c230ce07b69af50a6c6a4a2a9b948d14985 WHIRLPOOL 60404395f9c37b6f0be34462167279716615ddfcfef7392616a6da23379e98dcaf1c295ec12cb276e3eac30662edccfe6a9f6dd5dcf191d793a6bf0ac5b3158e +EBUILD mozc-9999.ebuild 8817 SHA256 38c8908784b01fb85be41365b8b668d57c8dee7a9ea140f4f978fac9f253a709 SHA512 509e26b5bac136458e8da631b8ef2cba9b0489be96dfb08f3ece836dab8e4f3e46db2b77c9bba8094db234d1ef5fcc864ef8b3e5f6200c1dc6cb52d09cebe51b WHIRLPOOL 75da7473481383e6664ed8d95f336163352862a3f77617b14edc79a3bb4aee9cef7a4a89dd3a8c8fb9df37030eccecf817a89a92a252840f3f02deaa5673ed5e +MISC ChangeLog 3991 SHA256 40dc9da4e7d6d62958c610f045da2e78bdca028852617be136838e3cdb707fdb SHA512 ad3b884e40c14154afe299f353dde7cd3fc08555e281911a1b97b2da60e6e5a34c4de396b974b59bfd9cda4ca6068b74e0ce3cef24c3828d55b708c16fffbcbe WHIRLPOOL 99d04bfcd81c2cce998a72f71a3b6577650d413c02fb05b36ac2e82a8ab3fc625076ff51a5093b5f682fd1c2224b8d6af3813bb7684ed8891e74d2f9425dda9e +MISC ChangeLog-2015 8901 SHA256 096cea82e38f33a34acfac0b7622c959de656cfe4f1cb3afd3f148e12f3e013d SHA512 2f9acbcf3e7eafd3a1b7052e9b0e7f9a41c565d876cb4eb78360964b3fb7acd9dee3b45ee6a3ed76fe04c00b175e56c63b0b83698c0dbfc6554ab4b474566e87 WHIRLPOOL eed311405f838d6daa955f118d9429db8508a1b08120bed39debe3af397c8bdd5100a6cda0c0b77ae48550407a6b2d49bb63f2c40f6faac62aa183c1479479d6 +MISC metadata.xml 1334 SHA256 a4f99e39449d176f6d38e09097c5df85be755c5747430bfdc41f0a7e1aedf276 SHA512 07979f2fb42667e6281f7617f88d86eae9117e7fb33203acb456379db9468992e2105e520c1ecb7e77c9ad79900daa8c11d57c53b03b5ea89f644dcca020f9de WHIRLPOOL 5c3c78f349c84e394d98d7468145b7ab6e73786b59621987f135ab8fdb6182418d26e0c9bcd18d458062a28d89d81f1bf7b7691fa40b46eb3594109356499207 diff --git a/app-i18n/mozc/files/50mozc-gentoo.el b/app-i18n/mozc/files/50mozc-gentoo.el new file mode 100644 index 000000000000..121c62249eb7 --- /dev/null +++ b/app-i18n/mozc/files/50mozc-gentoo.el @@ -0,0 +1,4 @@ +;;; app-i18n/ibus-mozc site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") +(autoload 'mozc-mode "mozc" nil t) diff --git a/app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch b/app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch new file mode 100644 index 000000000000..e254f38b8745 --- /dev/null +++ b/app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch @@ -0,0 +1,12 @@ +diff --git a/gyp/common.gypi b/gyp/common.gypi +index 6c176ff..3613b1b 100755 +--- a/gyp/common.gypi ++++ b/gyp/common.gypi +@@ -58,7 +58,6 @@ + # warning_cflags will be shared with Mac and Linux. + 'warning_cflags': [ + '-Wall', +- '-Werror', + '-Wno-char-subscripts', + '-Wno-sign-compare', + '-Wno-deprecated-declarations', diff --git a/app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch b/app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch new file mode 100644 index 000000000000..bff0822a602d --- /dev/null +++ b/app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch @@ -0,0 +1,13 @@ +diff --git a/unix/ibus/mozc_engine.cc b/unix/ibus/mozc_engine.cc +index e256ea4..534262e 100755 +--- a/unix/ibus/mozc_engine.cc ++++ b/unix/ibus/mozc_engine.cc +@@ -250,8 +250,6 @@ MozcEngine::MozcEngine() + #ifdef ENABLE_GTK_RENDERER + gtk_candidate_window_handler_(new GtkCandidateWindowHandler( + new renderer::RendererClient())), +-#else +- gtk_candidate_window_handler_(NULL), + #endif // ENABLE_GTK_RENDERER + ibus_candidate_window_handler_(new IBusCandidateWindowHandler()), + preedit_method_(config::Config::ROMAN) { diff --git a/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch b/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch new file mode 100644 index 000000000000..2b2828b79997 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch @@ -0,0 +1,291 @@ +--- /src/gyp/defines.gypi ++++ /src/gyp/defines.gypi +@@ -71,6 +71,12 @@ + # use_libibus represents if ibus library is used or not. + # This option is only for Linux. + 'use_libibus%': '0', ++ ++ # use_libgtest represents if gtest library is used or not. ++ 'use_libgtest%': '0', ++ ++ # use_libjsoncpp represents if jsoncpp library is used or not. ++ 'use_libjsoncpp%': '0', + }, + 'target_defaults': { + 'defines': [ +--- /src/net/jsoncpp.gyp ++++ /src/net/jsoncpp.gyp +@@ -31,32 +31,57 @@ + 'targets': [ + { + 'target_name': 'jsoncpp', +- 'type': 'static_library', +- 'variables': { +- 'jsoncpp_root': '<(third_party_dir)/jsoncpp', +- 'jsoncpp_srcs': [ +- '<(jsoncpp_root)/src/lib_json/json_reader.cpp', +- '<(jsoncpp_root)/src/lib_json/json_value.cpp', +- '<(jsoncpp_root)/src/lib_json/json_writer.cpp', +- ], +- 'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'], +- 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'], +- }, +- 'defines': [ +- '<@(jsoncpp_additional_macros)', ++ 'conditions': [ ++ ['use_libjsoncpp==1', { ++ 'type': 'none', ++ 'variables': { ++ 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'], ++ }, ++ 'all_dependent_settings': { ++ 'defines': [ ++ '<@(jsoncpp_additional_macros)', ++ ], ++ 'cflags': [ ++ ' + #define MOZC_JSONCPP_JSON_H_INCLUDED + #endif // !MOZC_JSONCPP_JSON_H_INCLUDED + +--- /src/testing/testing.gyp ++++ /src/testing/testing.gyp +@@ -53,76 +53,111 @@ + 'targets': [ + { + 'target_name': 'testing', +- 'type': 'static_library', +- 'variables': { +- 'gtest_defines': [ +- 'GTEST_LANG_CXX11=1', +- 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple. +- ], +- 'gtest_dir': '<(third_party_dir)/gtest/googletest', +- 'gmock_dir': '<(third_party_dir)/gtest/googlemock', +- 'conditions': [ +- ['_toolset=="target" and target_platform=="Android"', { +- 'gtest_defines': [ +- 'GTEST_HAS_RTTI=0', # Android NDKr7 requires this. +- 'GTEST_HAS_CLONE=0', +- 'GTEST_HAS_GLOBAL_WSTRING=0', +- 'GTEST_HAS_POSIX_RE=0', +- 'GTEST_HAS_STD_WSTRING=0', +- 'GTEST_OS_LINUX=1', +- 'GTEST_OS_LINUX_ANDROID=1', +- ], +- }], +- ], +- }, +- 'sources': [ +- '<(gmock_dir)/src/gmock-cardinalities.cc', +- '<(gmock_dir)/src/gmock-internal-utils.cc', +- '<(gmock_dir)/src/gmock-matchers.cc', +- '<(gmock_dir)/src/gmock-spec-builders.cc', +- '<(gmock_dir)/src/gmock.cc', +- '<(gtest_dir)/src/gtest-death-test.cc', +- '<(gtest_dir)/src/gtest-filepath.cc', +- '<(gtest_dir)/src/gtest-port.cc', +- '<(gtest_dir)/src/gtest-printers.cc', +- '<(gtest_dir)/src/gtest-test-part.cc', +- '<(gtest_dir)/src/gtest-typed-test.cc', +- '<(gtest_dir)/src/gtest.cc', +- ], +- 'include_dirs': [ +- '<(gmock_dir)', +- '<(gmock_dir)/include', +- '<(gtest_dir)', +- '<(gtest_dir)/include', +- ], +- 'defines': [ +- '<@(gtest_defines)', +- ], +- 'all_dependent_settings': { +- 'defines': [ +- '<@(gtest_defines)', +- ], +- 'include_dirs': [ +- '<(gmock_dir)/include', +- '<(gtest_dir)/include', +- ], +- }, + 'conditions': [ +- ['(_toolset=="target" and compiler_target=="clang") or ' +- '(_toolset=="host" and compiler_host=="clang")', { +- 'cflags': [ +- '-Wno-missing-field-initializers', +- '-Wno-unused-private-field', ++ ['use_libgtest==1', { ++ 'type': 'none', ++ 'variables': { ++ 'gtest_defines': [ ++ 'GTEST_LANG_CXX11=1', ++ 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple. ++ ], ++ 'conditions': [ ++ ['_toolset=="target" and target_platform=="Android"', { ++ 'gtest_defines': [ ++ 'GTEST_HAS_RTTI=0', # Android NDKr7 requires this. ++ 'GTEST_HAS_CLONE=0', ++ 'GTEST_HAS_GLOBAL_WSTRING=0', ++ 'GTEST_HAS_POSIX_RE=0', ++ 'GTEST_HAS_STD_WSTRING=0', ++ 'GTEST_OS_LINUX=1', ++ 'GTEST_OS_LINUX_ANDROID=1', ++ ], ++ }], ++ ], ++ }, ++ 'all_dependent_settings': { ++ 'defines': [ ++ '<@(gtest_defines)', ++ ], ++ 'link_settings': { ++ 'libraries': [ ++ '-lgmock -lgtest', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'variables': { ++ 'gtest_defines': [ ++ 'GTEST_LANG_CXX11=1', ++ 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple. ++ ], ++ 'gtest_dir': '<(third_party_dir)/gtest/googletest', ++ 'gmock_dir': '<(third_party_dir)/gtest/googlemock', ++ 'conditions': [ ++ ['_toolset=="target" and target_platform=="Android"', { ++ 'gtest_defines': [ ++ 'GTEST_HAS_RTTI=0', # Android NDKr7 requires this. ++ 'GTEST_HAS_CLONE=0', ++ 'GTEST_HAS_GLOBAL_WSTRING=0', ++ 'GTEST_HAS_POSIX_RE=0', ++ 'GTEST_HAS_STD_WSTRING=0', ++ 'GTEST_OS_LINUX=1', ++ 'GTEST_OS_LINUX_ANDROID=1', ++ ], ++ }], ++ ], ++ }, ++ 'sources': [ ++ '<(gmock_dir)/src/gmock-cardinalities.cc', ++ '<(gmock_dir)/src/gmock-internal-utils.cc', ++ '<(gmock_dir)/src/gmock-matchers.cc', ++ '<(gmock_dir)/src/gmock-spec-builders.cc', ++ '<(gmock_dir)/src/gmock.cc', ++ '<(gtest_dir)/src/gtest-death-test.cc', ++ '<(gtest_dir)/src/gtest-filepath.cc', ++ '<(gtest_dir)/src/gtest-port.cc', ++ '<(gtest_dir)/src/gtest-printers.cc', ++ '<(gtest_dir)/src/gtest-test-part.cc', ++ '<(gtest_dir)/src/gtest-typed-test.cc', ++ '<(gtest_dir)/src/gtest.cc', ++ ], ++ 'include_dirs': [ ++ '<(gmock_dir)', ++ '<(gmock_dir)/include', ++ '<(gtest_dir)', ++ '<(gtest_dir)/include', ++ ], ++ 'defines': [ ++ '<@(gtest_defines)', + ], ++ 'all_dependent_settings': { ++ 'defines': [ ++ '<@(gtest_defines)', ++ ], ++ 'include_dirs': [ ++ '<(gmock_dir)/include', ++ '<(gtest_dir)/include', ++ ], ++ }, ++ 'conditions': [ ++ ['(_toolset=="target" and compiler_target=="clang") or ' ++ '(_toolset=="host" and compiler_host=="clang")', { ++ 'cflags': [ ++ '-Wno-missing-field-initializers', ++ '-Wno-unused-private-field', ++ ], ++ }], ++ ], ++ 'xcode_settings': { ++ # Remove the force included file. This is not necessary for third ++ # party libraries, and it causes a build error. ++ 'OTHER_CFLAGS!' : [ ++ '-include base/namespace.h', ++ ], ++ }, + }], + ], +- 'xcode_settings': { +- # Remove the force included file. This is not necessary for third +- # party libraries, and it causes a build error. +- 'OTHER_CFLAGS!' : [ +- '-include base/namespace.h', +- ], +- }, + }, + { + 'target_name': 'gen_mozc_data_dir_header', diff --git a/app-i18n/mozc/files/mozc-2.20.2673.102-tests_build.patch b/app-i18n/mozc/files/mozc-2.20.2673.102-tests_build.patch new file mode 100644 index 000000000000..b8b4477437f8 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.20.2673.102-tests_build.patch @@ -0,0 +1,27 @@ +--- /src/net/json_util_test.cc ++++ /src/net/json_util_test.cc +@@ -784,13 +784,13 @@ + for (size_t i = 0; i < arraysize(kNumS32ValueKeys); ++i) { + { + Json::Value json_value; +- json_value[kNumS32ValueKeys[i]] = -2147483649ll; ++ json_value[kNumS32ValueKeys[i]] = static_cast(-2147483649ll); + TestMsg msg; + EXPECT_FALSE(JsonUtil::JsonValueToProtobufMessage(json_value, &msg)); + } + { + Json::Value json_value; +- json_value[kNumS32ValueKeys[i]] = 2147483648ull; ++ json_value[kNumS32ValueKeys[i]] = static_cast(2147483648ull); + TestMsg msg; + EXPECT_FALSE(JsonUtil::JsonValueToProtobufMessage(json_value, &msg)); + } +@@ -805,7 +805,7 @@ + } + { + Json::Value json_value; +- json_value[kNumU32ValueKeys[i]] = 4294967296ull; ++ json_value[kNumU32ValueKeys[i]] = static_cast(4294967296ull); + TestMsg msg; + EXPECT_FALSE(JsonUtil::JsonValueToProtobufMessage(json_value, &msg)); + } diff --git a/app-i18n/mozc/files/mozc-2.20.2673.102-tests_skipping.patch b/app-i18n/mozc/files/mozc-2.20.2673.102-tests_skipping.patch new file mode 100644 index 000000000000..28c5486de50d --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.20.2673.102-tests_skipping.patch @@ -0,0 +1,70 @@ +Disable test leaving mozc_server orphan process. + +--- /src/unix/ibus/mozc_engine_test.cc ++++ /src/unix/ibus/mozc_engine_test.cc +@@ -41,65 +41,5 @@ + namespace mozc { + namespace ibus { + +-class LaunchToolTest : public testing::Test { +- public: +- LaunchToolTest() { +- g_type_init(); +- } +- +- protected: +- virtual void SetUp() { +- mozc_engine_.reset(new MozcEngine()); +- +- mock_ = new client::ClientMock(); +- mock_->ClearFunctionCounter(); +- mozc_engine_->client_.reset(mock_); +- } +- +- virtual void TearDown() { +- mozc_engine_.reset(); +- } +- +- client::ClientMock* mock_; +- unique_ptr mozc_engine_; +- +- private: +- DISALLOW_COPY_AND_ASSIGN(LaunchToolTest); +-}; +- +-TEST_F(LaunchToolTest, LaunchToolTest) { +- commands::Output output; +- +- // Launch config dialog +- mock_->ClearFunctionCounter(); +- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", true); +- output.set_launch_tool_mode(commands::Output::CONFIG_DIALOG); +- EXPECT_TRUE(mozc_engine_->LaunchTool(output)); +- +- // Launch dictionary tool +- mock_->ClearFunctionCounter(); +- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", true); +- output.set_launch_tool_mode(commands::Output::DICTIONARY_TOOL); +- EXPECT_TRUE(mozc_engine_->LaunchTool(output)); +- +- // Launch word register dialog +- mock_->ClearFunctionCounter(); +- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", true); +- output.set_launch_tool_mode(commands::Output::WORD_REGISTER_DIALOG); +- EXPECT_TRUE(mozc_engine_->LaunchTool(output)); +- +- // Launch no tool(means do nothing) +- mock_->ClearFunctionCounter(); +- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", false); +- output.set_launch_tool_mode(commands::Output::NO_TOOL); +- EXPECT_FALSE(mozc_engine_->LaunchTool(output)); +- +- // Something occurring in client::Client::LaunchTool +- mock_->ClearFunctionCounter(); +- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", false); +- output.set_launch_tool_mode(commands::Output::CONFIG_DIALOG); +- EXPECT_FALSE(mozc_engine_->LaunchTool(output)); +-} +- + } // namespace ibus + } // namespace mozc diff --git a/app-i18n/mozc/files/mozc-ibus-1.5.4.patch b/app-i18n/mozc/files/mozc-ibus-1.5.4.patch new file mode 100644 index 000000000000..619b1d251507 --- /dev/null +++ b/app-i18n/mozc/files/mozc-ibus-1.5.4.patch @@ -0,0 +1,299 @@ +Index: engine_interface.h +=================================================================== +--- unix/ibus/engine_interface.h (revision 177) ++++ unix/ibus/engine_interface.h (working copy) +@@ -106,6 +106,11 @@ + gint y, + gint w, + gint h) = 0; ++ ++ // The interface function for the "set-content-type" signal ++ virtual void SetContentType(IBusEngine *engine, ++ guint purpose, ++ guint hints) = 0; + }; + + } // namespace ibus +Index: engine_registrar.cc +=================================================================== +--- unix/ibus/engine_registrar.cc (revision 177) ++++ unix/ibus/engine_registrar.cc (working copy) +@@ -63,7 +63,9 @@ + engine_class->reset = Reset; + engine_class->set_capabilities = SetCapabilities; + engine_class->set_cursor_location = SetCursorLocation; +- ++#if defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) ++ engine_class->set_content_type = SetContentType; ++#endif // MOZC_ENABLE_IBUS_INPUT_PURPOSE + return true; + } + +@@ -87,6 +89,9 @@ + engine_class->reset = NULL; + engine_class->set_capabilities = NULL; + engine_class->set_cursor_location = NULL; ++#if defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) ++ engine_class->set_content_type = NULL; ++#endif // MOZC_ENABLE_IBUS_INPUT_PURPOSE + + mozc::ibus::EngineInterface *previous = g_engine; + g_engine = NULL; +@@ -179,5 +184,12 @@ + g_engine->SetCursorLocation(engine, x, y, w, h); + } + ++void EngineRegistrar::SetContentType( ++ IBusEngine *engine, ++ guint purpose, ++ guint hints) { ++ g_engine->SetContentType(engine, purpose, hints); ++} ++ + } // namespace ibus + } // namespace mozc +Index: engine_registrar.h +=================================================================== +--- unix/ibus/engine_registrar.h (revision 177) ++++ unix/ibus/engine_registrar.h (working copy) +@@ -84,6 +84,9 @@ + gint y, + gint w, + gint h); ++ static void SetContentType(IBusEngine *engine, ++ guint purpose, ++ guint hints); + }; + + } // namespace ibus +Index: ibus_header.h +=================================================================== +--- unix/ibus/ibus_header.h (revision 177) ++++ unix/ibus/ibus_header.h (working copy) +@@ -36,5 +36,10 @@ + #error "ibus-mozc now requires IBus>=1.4.1" + #endif // libibus (<1.4.1) + ++#if IBUS_CHECK_VERSION(1, 5, 4) ++#if !defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) ++#define MOZC_ENABLE_IBUS_INPUT_PURPOSE ++#endif // !MOZC_ENABLE_IBUS_INPUT_PURPOSE ++#endif // libibus(>=1.5.4) + + #endif // MOZC_UNIX_IBUS_IBUS_HEADER_H_ +Index: mozc_engine.cc +=================================================================== +--- unix/ibus/mozc_engine.cc (revision 177) ++++ unix/ibus/mozc_engine.cc (working copy) +@@ -372,6 +372,7 @@ + + void MozcEngine::FocusOut(IBusEngine *engine) { + GetCandidateWindowHandler(engine)->Hide(engine); ++ property_handler_->ResetContentType(engine); + + // Do not call SubmitSession or RevertSession. Preedit string will commit on + // Focus Out event automatically by ibus_engine_update_preedit_text_with_mode +@@ -397,6 +398,11 @@ + VLOG(2) << "keyval: " << keyval + << ", keycode: " << keycode + << ", modifiers: " << modifiers; ++ if (property_handler_->IsDisabled()) { ++ // It is each enginze's responsibility for ignoreing keyevents on ++ // the password field on the locked screen since IBus 1.5.4. ++ return FALSE; ++ } + + // Send current caret location to mozc_server to manage suggest window + // position. +@@ -501,6 +507,18 @@ + // Do nothing + } + ++void MozcEngine::SetContentType(IBusEngine *engine, ++ guint purpose, ++ guint hints) { ++ const bool prev_disabled = ++ property_handler_->IsDisabled(); ++ property_handler_->UpdateContentType(engine); ++ if (!prev_disabled && property_handler_->IsDisabled()) { ++ // Make sure on-going composition is reverted. ++ RevertSession(engine); ++ } ++} ++ + GType MozcEngine::GetType() { + static GType type = 0; + +Index: mozc_engine.h +=================================================================== +--- unix/ibus/mozc_engine.h (revision 177) ++++ unix/ibus/mozc_engine.h (working copy) +@@ -99,6 +99,9 @@ + gint y, + gint w, + gint h); ++ void SetContentType(IBusEngine *engine, ++ guint purpose, ++ guint hints); + + // Returns the GType which this class represents. + static GType GetType(); +Index: property_handler.cc +=================================================================== +--- unix/ibus/property_handler.cc (revision 177) ++++ unix/ibus/property_handler.cc (working copy) +@@ -61,6 +61,19 @@ + bool IsMozcToolAvailable() { + return FileUtil::FileExists(SystemUtil::GetToolPath()); + } ++ ++bool GetDisabled(IBusEngine *engine) { ++ bool disabled = false; ++#if defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) ++ guint purpose = IBUS_INPUT_PURPOSE_FREE_FORM; ++ guint hints = IBUS_INPUT_HINT_NONE; ++ ibus_engine_get_content_type(engine, &purpose, &hints); ++ disabled = (purpose == IBUS_INPUT_PURPOSE_PASSWORD || ++ purpose == IBUS_INPUT_PURPOSE_PIN); ++#endif // MOZC_ENABLE_IBUS_INPUT_PURPOSE ++ return disabled; ++} ++ + } // namespace + + PropertyHandler::PropertyHandler(MessageTranslatorInterface *translator, +@@ -71,7 +84,8 @@ + client_(client), + translator_(translator), + original_composition_mode_(kMozcEngineInitialCompositionMode), +- is_activated_(true) { ++ is_activated_(true), ++ is_disabled_(false) { + + AppendCompositionPropertyToPanel(); + #ifndef OS_CHROMEOS +@@ -105,6 +119,7 @@ + + void PropertyHandler::Register(IBusEngine *engine) { + ibus_engine_register_properties(engine, prop_root_); ++ UpdateContentType(engine); + } + + // TODO(nona): do not use kMozcEngine*** directory. +@@ -228,8 +243,34 @@ + ibus_prop_list_append(prop_root_, prop_mozc_tool_); + } + ++void PropertyHandler::UpdateContentTypeImpl(IBusEngine *engine, ++ bool disabled) { ++ const bool prev_is_disabled = is_disabled_; ++ is_disabled_ = disabled; ++ if (prev_is_disabled == is_disabled_) { ++ return; ++ } ++ const commands::CompositionMode visible_mode = ++ (prev_is_disabled && !is_disabled_ && IsActivated()) ++ ? original_composition_mode_ : ++ kMozcEnginePropertyIMEOffState->composition_mode; ++ UpdateCompositionModeIcon(engine, visible_mode); ++} ++ ++void PropertyHandler::ResetContentType(IBusEngine *engine) { ++ UpdateContentTypeImpl(engine, false); ++} ++ ++void PropertyHandler::UpdateContentType(IBusEngine *engine) { ++ UpdateContentTypeImpl(engine, GetDisabled(engine)); ++} ++ + void PropertyHandler::Update(IBusEngine *engine, + const commands::Output &output) { ++ if (IsDisabled()) { ++ return; ++ } ++ + if (output.has_status() && + (output.status().activated() != is_activated_ || + output.status().mode() != original_composition_mode_)) { +@@ -325,6 +366,10 @@ + const gchar *property_name, + guint property_state) { + #ifndef OS_CHROMEOS ++ if (IsDisabled()) { ++ return; ++ } ++ + if (prop_mozc_tool_) { + for (guint prop_index = 0; ; ++prop_index) { + IBusProperty *prop = ibus_prop_list_get( +@@ -371,9 +416,13 @@ + } + + bool PropertyHandler::IsActivated() const { +- return is_activated_; ++ return is_activated_ && !IsDisabled(); + } + ++bool PropertyHandler::IsDisabled() const { ++ return is_disabled_; ++} ++ + commands::CompositionMode PropertyHandler::GetOriginalCompositionMode() const { + return original_composition_mode_; + } +Index: property_handler.h +=================================================================== +--- unix/ibus/property_handler.h (revision 177) ++++ unix/ibus/property_handler.h (working copy) +@@ -54,14 +54,19 @@ + virtual ~PropertyHandler(); + + virtual void Register(IBusEngine *engine); ++ virtual void ResetContentType(IBusEngine *engine); ++ virtual void UpdateContentType(IBusEngine *engine); + virtual void Update(IBusEngine *engine, const commands::Output &output); + virtual void ProcessPropertyActivate(IBusEngine *engine, + const gchar *property_name, + guint property_state); + virtual bool IsActivated() const; ++ virtual bool IsDisabled() const; + virtual commands::CompositionMode GetOriginalCompositionMode() const; + + private: ++ void UpdateContentTypeImpl(IBusEngine *engine, bool disabled); ++ + // Appends composition properties into panel + void AppendCompositionPropertyToPanel(); + // Appends tool properties into panel +@@ -79,6 +84,7 @@ + scoped_ptr translator_; + commands::CompositionMode original_composition_mode_; + bool is_activated_; ++ bool is_disabled_; + }; + + } // namespace ibus +Index: property_handler_interface.h +=================================================================== +--- unix/ibus/property_handler_interface.h (revision 177) ++++ unix/ibus/property_handler_interface.h (working copy) +@@ -45,6 +45,9 @@ + // Registers current properties into engine. + virtual void Register(IBusEngine *engine) ABSTRACT; + ++ virtual void ResetContentType(IBusEngine *engine) ABSTRACT; ++ virtual void UpdateContentType(IBusEngine *engine) ABSTRACT; ++ + // Update properties. + virtual void Update(IBusEngine *engine, + const commands::Output &output) ABSTRACT; +@@ -55,6 +58,9 @@ + // Returns if IME is activated or not. + virtual bool IsActivated() const ABSTRACT; + ++ // Returns if IME is forcesully disabled, e.g. on a password field. ++ virtual bool IsDisabled() const ABSTRACT; ++ + // Returns original composition mode before. + virtual commands::CompositionMode GetOriginalCompositionMode() const ABSTRACT; + }; diff --git a/app-i18n/mozc/metadata.xml b/app-i18n/mozc/metadata.xml new file mode 100644 index 000000000000..f5031cbbd25c --- /dev/null +++ b/app-i18n/mozc/metadata.xml @@ -0,0 +1,28 @@ + + + + + arfrever.fta@gmail.com + Arfrever Frehtes Taifersar Arahesis + + + cjk@gentoo.org + Cjk + + +Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux. This open-source project originates from Google Japanese Input. + + + Enable support for app-i18n/fcitx + Enable support for app-i18n/fcitx 4 + Install graphical user interface tool (mozc_tool) + Use handwriting recognition model from app-i18n/tegaki-zinnia-japanese + Use handwriting recognition model from app-i18n/zinnia-tomoe + Enable support for app-i18n/ibus + Enable native candidate window + + + jsoncpp + google/mozc + + diff --git a/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild b/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild new file mode 100644 index 000000000000..7aa21965a5f9 --- /dev/null +++ b/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) +inherit elisp-common eutils multilib multiprocessing python-single-r1 toolchain-funcs + +DESCRIPTION="The Mozc engine for IBus Framework" +HOMEPAGE="https://github.com/google/mozc" + +PROTOBUF_VER="2.5.0" +GMOCK_VER="1.6.0" +GTEST_VER="1.6.0" +JSONCPP_VER="0.6.0-rc2" +MOZC_URL="https://mozc.googlecode.com/files/${P}.tar.bz2" +PROTOBUF_URL="https://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" +SRC_URI="${MOZC_URL} ${PROTOBUF_URL} + test? ( ${GMOCK_URL} ${GTEST_URL} ${JSONCPP_URL} )" + +LICENSE="BSD ipadic public-domain unicode" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="emacs +ibus +qt4 renderer test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="dev-libs/glib:2 + dev-libs/openssl:0= + x11-libs/libxcb + emacs? ( virtual/emacs ) + ibus? ( >=app-i18n/ibus-1.4.1 ) + renderer? ( x11-libs/gtk+:2 ) + qt4? ( + dev-qt/qtgui:4 + app-i18n/zinnia + ) + ${PYTHON_DEPS}" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +BUILDTYPE="${BUILDTYPE:-Release}" + +RESTRICT="test" + +SITEFILE=50${PN}-gentoo.el + +src_unpack() { + unpack $(basename ${MOZC_URL}) + + 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() { + epatch "${FILESDIR}"/${P}-drop-Werror.patch + epatch "${FILESDIR}"/${PN}-ibus-1.5.4.patch + epatch_user +} + +src_configure() { + local myconf="--server_dir=/usr/$(get_libdir)/mozc" + + if ! use qt4 ; then + myconf+=" --noqt" + export GYP_DEFINES="use_libzinnia=0" + fi + + if ! use renderer ; then + export GYP_DEFINES="${GYP_DEFINES} enable_gtk_renderer=0" + fi + + # export GYP_DEFINES="${GYP_DEFINES} use_libprotobuf=1" + + "${PYTHON}" build_mozc.py gyp ${myconf} || die "gyp failed" +} + +src_compile() { + tc-export CC CXX AR AS RANLIB LD + + local my_makeopts=$(makeopts_jobs) + # This is for a safety. -j without a number, makeopts_jobs returns 999. + local myjobs=-j${my_makeopts/999/1} + + local mytarget="server/server.gyp:mozc_server" + use emacs && mytarget="${mytarget} unix/emacs/emacs.gyp:mozc_emacs_helper" + use ibus && mytarget="${mytarget} unix/ibus/ibus.gyp:ibus_mozc" + use renderer && mytarget="${mytarget} renderer/renderer.gyp:mozc_renderer" + if use qt4 ; then + export QTDIR="${EPREFIX}/usr" + mytarget="${mytarget} gui/gui.gyp:mozc_tool" + fi + + V=1 "${PYTHON}" build_mozc.py build_tools -c "${BUILDTYPE}" ${myjobs} || die + V=1 "${PYTHON}" build_mozc.py build -c "${BUILDTYPE}" ${mytarget} ${myjobs} || die + + if use emacs ; then + elisp-compile unix/emacs/*.el || die + fi +} + +src_test() { + tc-export CC CXX AR AS RANLIB LD + V=1 "${PYTHON}" build_mozc.py runtests -c "${BUILDTYPE}" || die +} + +src_install() { + if use emacs ; then + dobin "out_linux/${BUILDTYPE}/mozc_emacs_helper" || die + elisp-install ${PN} unix/emacs/*.{el,elc} || die + elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN} || die + fi + + if use ibus ; then + exeinto /usr/libexec || die + newexe "out_linux/${BUILDTYPE}/ibus_mozc" ibus-engine-mozc || die + insinto /usr/share/ibus/component || die + doins "out_linux/${BUILDTYPE}/obj/gen/unix/ibus/mozc.xml" || die + insinto /usr/share/ibus-mozc || die + ( + cd data/images/unix + newins ime_product_icon_opensource-32.png product_icon.png || die + for f in ui-* + do + newins ${f} ${f/ui-} || die + done + ) + + fi + + exeinto "/usr/$(get_libdir)/mozc" || die + doexe "out_linux/${BUILDTYPE}/mozc_server" || die + + if use qt4 ; then + exeinto "/usr/$(get_libdir)/mozc" || die + doexe "out_linux/${BUILDTYPE}/mozc_tool" || die + fi + + if use renderer ; then + exeinto "/usr/$(get_libdir)/mozc" || die + doexe "out_linux/${BUILDTYPE}/mozc_renderer" || die + fi +} + +pkg_postinst() { + if use emacs ; then + elisp-site-regen + elog "You can use mozc-mode via LEIM (Library of Emacs Input Method)." + elog "Write the following settings into your init file (~/.emacs.d/init.el" + elog "or ~/.emacs) in order to use mozc-mode by default, or you can call" + elog "\`set-input-method' and set \"japanese-mozc\" anytime you have loaded" + elog "mozc.el" + elog + elog " (require 'mozc)" + elog " (set-language-environment \"Japanese\")" + elog " (setq default-input-method \"japanese-mozc\")" + elog + elog "Having the above settings, just type C-\\ which is bound to" + elog "\`toggle-input-method' by default." + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/app-i18n/mozc/mozc-1.13.1651.102.ebuild b/app-i18n/mozc/mozc-1.13.1651.102.ebuild new file mode 100644 index 000000000000..6fa63db9ed91 --- /dev/null +++ b/app-i18n/mozc/mozc-1.13.1651.102.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) +inherit elisp-common eutils multilib multiprocessing python-single-r1 toolchain-funcs + +DESCRIPTION="The Mozc engine for IBus Framework" +HOMEPAGE="https://github.com/google/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" +MOZC_URL="https://mozc.googlecode.com/files/${P}.tar.bz2" +PROTOBUF_URL="https://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="https://dev.gentoo.org/~naota/files/gyp-${GYP_DATE}.tar.bz2" +SRC_URI="${MOZC_URL} ${PROTOBUF_URL} ${GYP_URL} + test? ( ${GMOCK_URL} ${GTEST_URL} ${JSONCPP_URL} )" + +LICENSE="BSD ipadic public-domain unicode" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="emacs +ibus +qt4 renderer test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="dev-libs/glib:2 + dev-libs/openssl:0= + >=dev-libs/protobuf-2.5.0 + x11-libs/libxcb + emacs? ( virtual/emacs ) + ibus? ( >=app-i18n/ibus-1.4.1 ) + renderer? ( x11-libs/gtk+:2 ) + qt4? ( + dev-qt/qtgui:4 + app-i18n/zinnia + ) + ${PYTHON_DEPS}" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +BUILDTYPE="${BUILDTYPE:-Release}" + +RESTRICT="test" + +SITEFILE=50${PN}-gentoo.el + +src_unpack() { + unpack $(basename ${MOZC_URL}) + + unpack $(basename ${GYP_URL}) + mv gyp-${GYP_DATE}/* "${S}"/third_party/gyp || 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() { + epatch "${FILESDIR}"/${P}-gtk-renderer.patch + epatch_user +} + +src_configure() { + local myconf="--server_dir=/usr/$(get_libdir)/mozc" + + if ! use qt4 ; then + myconf+=" --noqt" + export GYP_DEFINES="use_libzinnia=0" + fi + + if ! use renderer ; then + export GYP_DEFINES="${GYP_DEFINES} enable_gtk_renderer=0" + fi + + export GYP_DEFINES="${GYP_DEFINES} use_libprotobuf=1" + + "${PYTHON}" build_mozc.py gyp ${myconf} || die "gyp failed" +} + +src_compile() { + tc-export CC CXX AR AS RANLIB LD + + local my_makeopts=$(makeopts_jobs) + # This is for a safety. -j without a number, makeopts_jobs returns 999. + local myjobs=-j${my_makeopts/999/1} + + local mytarget="server/server.gyp:mozc_server" + use emacs && mytarget="${mytarget} unix/emacs/emacs.gyp:mozc_emacs_helper" + use ibus && mytarget="${mytarget} unix/ibus/ibus.gyp:ibus_mozc" + use renderer && mytarget="${mytarget} renderer/renderer.gyp:mozc_renderer" + if use qt4 ; then + export QTDIR="${EPREFIX}/usr" + mytarget="${mytarget} gui/gui.gyp:mozc_tool" + fi + + V=1 "${PYTHON}" build_mozc.py build_tools -c "${BUILDTYPE}" ${myjobs} || die + V=1 "${PYTHON}" build_mozc.py build -c "${BUILDTYPE}" ${mytarget} ${myjobs} || die + + if use emacs ; then + elisp-compile unix/emacs/*.el || die + fi +} + +src_test() { + tc-export CC CXX AR AS RANLIB LD + V=1 "${PYTHON}" build_mozc.py runtests -c "${BUILDTYPE}" || die +} + +src_install() { + if use emacs ; then + dobin "out_linux/${BUILDTYPE}/mozc_emacs_helper" || die + elisp-install ${PN} unix/emacs/*.{el,elc} || die + elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN} || die + fi + + if use ibus ; then + exeinto /usr/$(get_libdir)/ibus-mozc || die + newexe "out_linux/${BUILDTYPE}/ibus_mozc" ibus-engine-mozc || die + insinto /usr/share/ibus/component || die + doins "out_linux/${BUILDTYPE}/obj/gen/unix/ibus/mozc.xml" || die + insinto /usr/share/ibus-mozc || die + ( + cd data/images/unix + newins ime_product_icon_opensource-32.png product_icon.png || die + for f in ui-* + do + newins ${f} ${f/ui-} || die + done + ) + + fi + + exeinto "/usr/$(get_libdir)/mozc" || die + doexe "out_linux/${BUILDTYPE}/mozc_server" || die + + if use qt4 ; then + exeinto "/usr/$(get_libdir)/mozc" || die + doexe "out_linux/${BUILDTYPE}/mozc_tool" || die + fi + + if use renderer ; then + exeinto "/usr/$(get_libdir)/mozc" || die + doexe "out_linux/${BUILDTYPE}/mozc_renderer" || die + fi +} + +pkg_postinst() { + if use emacs ; then + elisp-site-regen + elog "You can use mozc-mode via LEIM (Library of Emacs Input Method)." + elog "Write the following settings into your init file (~/.emacs.d/init.el" + elog "or ~/.emacs) in order to use mozc-mode by default, or you can call" + elog "\`set-input-method' and set \"japanese-mozc\" anytime you have loaded" + elog "mozc.el" + elog + elog " (require 'mozc)" + elog " (set-language-environment \"Japanese\")" + elog " (setq default-input-method \"japanese-mozc\")" + elog + elog "Having the above settings, just type C-\\ which is bound to" + elog "\`toggle-input-method' by default." + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/app-i18n/mozc/mozc-2.16.2037.102.ebuild b/app-i18n/mozc/mozc-2.16.2037.102.ebuild new file mode 100644 index 000000000000..cb43400250d9 --- /dev/null +++ b/app-i18n/mozc/mozc-2.16.2037.102.ebuild @@ -0,0 +1,230 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="https://github.com/google/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="https://dev.gentoo.org/~naota/files/${P}.tar.bz2" +PROTOBUF_URL="https://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="https://dev.gentoo.org/~naota/files/gyp-${GYP_DATE}.tar.bz2" +JAPANESE_USAGE_DICT_URL="https://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" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +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/ ${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="~amd64 ~x86" +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-3.0.0:= + 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: ${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-3.0.0:= + 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: