diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-i18n/mozc | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-i18n/mozc')
-rw-r--r-- | app-i18n/mozc/Manifest | 10 | ||||
-rw-r--r-- | app-i18n/mozc/files/50mozc-gentoo.el | 4 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch | 12 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch | 13 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-1.2.809.102-gentoo.patch | 14 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-1.3.975.102-ibus-1.4.patch | 54 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-ibus-1.5.4.patch | 299 | ||||
-rw-r--r-- | app-i18n/mozc/metadata.xml | 16 | ||||
-rw-r--r-- | app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild | 176 | ||||
-rw-r--r-- | app-i18n/mozc/mozc-1.13.1651.102.ebuild | 181 | ||||
-rw-r--r-- | app-i18n/mozc/mozc-2.16.2037.102.ebuild | 230 |
11 files changed, 1009 insertions, 0 deletions
diff --git a/app-i18n/mozc/Manifest b/app-i18n/mozc/Manifest new file mode 100644 index 000000000000..c88789227fd9 --- /dev/null +++ b/app-i18n/mozc/Manifest @@ -0,0 +1,10 @@ +DIST fcitx-mozc-2.16.2037.102.2.patch 140421 SHA256 ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e SHA512 22b885859588bb8e0efd354d153da461a654203729c723156a419bf33fae473e3f7165964aa3cb3b5c969f97c2727f9d87b0d587330e4eeab67f07d4458542a3 WHIRLPOOL cd9534c8904a7c9f866a8ddd41ab4c57b3ad8b5650fda4cf9ccc1e544c8e0da25c749870606687ee66e4252f224babdbe10415e035038ced654812bad8d299dc +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 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 protobuf-2.5.0.tar.bz2 1866763 SHA256 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 SHA512 5994b3669808b82fef5c860ecad36358c0767f84acac877e7bfcf722e59d972835a955714149bdd4158fbd1328a51d01397a563991d26475351ee72be48142ee WHIRLPOOL 7e6786e1f20bf253d0e386a95c2bbfe1b443f484d492f97552cadcea62c24461436aa88130e3ff20b4dc9f352c101458cb8c03686f1cc4e6e2133b6e78f5b70d 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-1.2.809.102-gentoo.patch b/app-i18n/mozc/files/mozc-1.2.809.102-gentoo.patch new file mode 100644 index 000000000000..3e3ef1392932 --- /dev/null +++ b/app-i18n/mozc/files/mozc-1.2.809.102-gentoo.patch @@ -0,0 +1,14 @@ +diff -Naur mozc-1.2.809.102.orig/build_mozc.py mozc-1.2.809.102/build_mozc.py +--- mozc-1.2.809.102.orig/build_mozc.py 2011-08-17 10:02:41.000000000 +0900 ++++ mozc-1.2.809.102/build_mozc.py 2011-08-18 01:01:25.109704261 +0900 +@@ -654,9 +654,7 @@ + if envvar in os.environ: + os.environ[envvar] = os.getenv(envvar) + +- build_args = ['-j%s' % options.jobs, +- 'MAKE_JOBS=%s' % options.jobs, +- 'BUILDTYPE=%s' % options.configuration] ++ build_args = ['BUILDTYPE=%s' % options.configuration] + build_args.append('builddir_name=%s' % GetBuildBaseName(options)) + + RunOrDie([make_command] + build_args + target_names) diff --git a/app-i18n/mozc/files/mozc-1.3.975.102-ibus-1.4.patch b/app-i18n/mozc/files/mozc-1.3.975.102-ibus-1.4.patch new file mode 100644 index 000000000000..ed697b6c8bd8 --- /dev/null +++ b/app-i18n/mozc/files/mozc-1.3.975.102-ibus-1.4.patch @@ -0,0 +1,54 @@ +http://bugs.gentoo.org/402397 + +--- unix/ibus/mozc_engine.cc ++++ unix/ibus/mozc_engine.cc +@@ -620,8 +620,15 @@ + + #ifndef OS_CHROMEOS + if (prop_mozc_tool_) { ++#if IBUS_CHECK_VERSION(1, 4, 0) ++ while ((prop = ibus_prop_list_get( ++ const_cast<IBusPropList*>( ++ ibus_property_get_sub_props(prop_mozc_tool_)), i++))) { ++ if (!g_strcmp0(property_name, ibus_property_get_key(prop))) { ++#else + while ((prop = ibus_prop_list_get(prop_mozc_tool_->sub_props, i++))) { +- if (!g_strcmp0(property_name, prop->key)) { ++ if (!g_strcmp0(property_name, prop->key)) { ++#endif + const MozcEngineToolProperty *entry = + reinterpret_cast<const MozcEngineToolProperty*>( + g_object_get_data(G_OBJECT(prop), kGObjectDataKey)); +@@ -640,8 +647,15 @@ + } + + i = 0; ++#if IBUS_CHECK_VERSION(1, 4, 0) ++ while ((prop = ibus_prop_list_get( ++ const_cast<IBusPropList*>( ++ ibus_property_get_sub_props(prop_composition_mode_)), i++))) { ++ if (!g_strcmp0(property_name, ibus_property_get_key(prop))) { ++#else + while ((prop = ibus_prop_list_get(prop_composition_mode_->sub_props, i++))) { +- if (!g_strcmp0(property_name, prop->key)) { ++ if (!g_strcmp0(property_name, prop->key)) { ++#endif + const MozcEngineProperty *entry = + reinterpret_cast<const MozcEngineProperty*>( + g_object_get_data(G_OBJECT(prop), kGObjectDataKey)); +@@ -1096,8 +1110,15 @@ + + size_t i = 0; + IBusProperty *prop = NULL; ++#if IBUS_CHECK_VERSION(1, 4, 0) ++ while ((prop = ibus_prop_list_get( ++ const_cast<IBusPropList*>( ++ ibus_property_get_sub_props(prop_composition_mode_)), i++))) { ++ if (!g_strcmp0(entry->key, ibus_property_get_key(prop))) { ++#else + while ((prop = ibus_prop_list_get(prop_composition_mode_->sub_props, i++))) { + if (!g_strcmp0(entry->key, prop->key)) { ++#endif + // Update the language panel. + ibus_property_set_icon(prop_composition_mode_, + GetIconPath(entry->icon).c_str()); 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<MessageTranslatorInterface> 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..61a84a9b2f9c --- /dev/null +++ b/app-i18n/mozc/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cjk</herd> + <longdescription lang="en"> +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. +</longdescription> + <use> + <flag name="fcitx">Enable support for <pkg>app-i18n/fcitx</pkg></flag> + <flag name="ibus">Enable support for <pkg>app-i18n/ibus</pkg></flag> + <flag name="renderer">Enable native candidate window.</flag> + </use> + <upstream> + <remote-id type="sourceforge">jsoncpp</remote-id> + </upstream> +</pkgmetadata> 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..f65dd5df035d --- /dev/null +++ b/app-i18n/mozc/mozc-1.10.1390.102-r1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="http://code.google.com/p/mozc/" + +PROTOBUF_VER="2.5.0" +GMOCK_VER="1.6.0" +GTEST_VER="1.6.0" +JSONCPP_VER="0.6.0-rc2" +MOZC_URL="http://mozc.googlecode.com/files/${P}.tar.bz2" +PROTOBUF_URL="http://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" + +RDEPEND="dev-libs/glib:2 + dev-libs/openssl + 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..2711a97a6c6a --- /dev/null +++ b/app-i18n/mozc/mozc-1.13.1651.102.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="http://code.google.com/p/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="http://mozc.googlecode.com/files/${P}.tar.bz2" +PROTOBUF_URL="http://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="http://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" + +RDEPEND="dev-libs/glib:2 + dev-libs/openssl + >=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..e09dcc54468a --- /dev/null +++ b/app-i18n/mozc/mozc-2.16.2037.102.ebuild @@ -0,0 +1,230 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="http://code.google.com/p/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="http://dev.gentoo.org/~naota/files/${P}.tar.bz2" +PROTOBUF_URL="http://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="http://dev.gentoo.org/~naota/files/gyp-${GYP_DATE}.tar.bz2" +JAPANESE_USAGE_DICT_URL="http://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" + +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/<!(which clang)/$(tc-getCC)/" \ + -e "s/<!(which clang++)/$(tc-getCXX)/" \ + gyp/common.gypi || die + if use fcitx; then + EPATCH_OPTS="-p2" epatch "${DISTDIR}/${FCITX_PATCH}" + fi + 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 compiler_target=gcc compiler_host=gcc" + + tc-export CC CXX AR AS RANLIB LD NM + + "${PYTHON}" build_mozc.py gyp -v ${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 fcitx && mytarget="${mytarget} unix/fcitx/fcitx.gyp:fcitx-mozc" + 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 + "${PYTHON}" build_mozc.py build -v -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() { + install_fcitx_locale() { + lang=$1 + insinto "/usr/share/locale/${lang}/LC_MESSAGES/" + newins out_linux/${BUILDTYPE}/gen/unix/fcitx/po/${lang}.mo fcitx-mozc.mo + } + + 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 fcitx; then + exeinto /usr/$(get_libdir)/fcitx + doexe "out_linux/${BUILDTYPE}/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 + ( + cd data/images + newins product_icon_32bpp-128.png mozc.png + cd unix + for f in ui-* ; do + newins ${f} mozc-${f/ui-} + done + ) + l10n_for_each_locale_do install_fcitx_locale + 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}/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 +} |