diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2017-09-28 17:52:59 +0200 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2017-09-28 13:11:00 -0400 |
commit | ab7a7c7c7ca7b03d914d8106a5462f726e8d0a0b (patch) | |
tree | 2de09bb249d911404994b55ac8ccb08ee58dd9da /app-i18n/mozc/files | |
parent | dev-util/gyp: Initial addition. (diff) | |
download | gentoo-ab7a7c7c7ca7b03d914d8106a5462f726e8d0a0b.tar.gz gentoo-ab7a7c7c7ca7b03d914d8106a5462f726e8d0a0b.tar.bz2 gentoo-ab7a7c7c7ca7b03d914d8106a5462f726e8d0a0b.zip |
app-i18n/mozc: Version bump (2.20.2673.102).
Upstream migrated from Qt 4 to Qt 5.
"qt4" / "qt5" USE flag renamed to "gui".
"fcitx" USE flag renamed to "fcitx4".
("fcitx5" USE flag will be used to control support for Fcitx 5.)
"handwriting-tegaki" and "handwriting-tomoe" USE flags introduced to select usage
of handwriting recognition model from app-i18n/tegaki-zinnia-japanese or
app-i18n/zinnia-tomoe. "handwriting-tegaki" is enabled by default in accordance
with upstream default for Mozc.
Test suite unrestricted and fixed to build.
Diffstat (limited to 'app-i18n/mozc/files')
3 files changed, 230 insertions, 0 deletions
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..dd6e57717d15 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch @@ -0,0 +1,133 @@ +--- /src/net/jsoncpp.gyp ++++ /src/net/jsoncpp.gyp +@@ -31,31 +31,25 @@ + 'targets': [ + { + 'target_name': 'jsoncpp', +- 'type': 'static_library', ++ 'type': 'none', + '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)', +- ], +- 'sources': [ +- '<@(jsoncpp_srcs)', +- 'jsoncpp.h', +- ], +- 'include_dirs': [ +- '<@(jsoncpp_include_dirs)', +- ], + 'all_dependent_settings': { + 'defines': [ + '<@(jsoncpp_additional_macros)', + ], ++ 'cflags': [ ++ '<!@(pkg-config --cflags jsoncpp)', ++ ], ++ 'link_settings': { ++ 'libraries': [ ++ '<!@(pkg-config --libs-only-l jsoncpp)', ++ ], ++ 'ldflags': [ ++ '<!@(pkg-config --libs-only-L jsoncpp)', ++ ], ++ } + }, + }, + ], +--- /src/net/jsoncpp.h ++++ /src/net/jsoncpp.h +@@ -35,7 +35,7 @@ + // Mozc basically disables C++ exception. + #define JSON_USE_EXCEPTION 0 + #endif // !JSON_USE_EXCEPTION +-#include "third_party/jsoncpp/include/json/json.h" ++#include <json/json.h> + #define MOZC_JSONCPP_JSON_H_INCLUDED + #endif // !MOZC_JSONCPP_JSON_H_INCLUDED + +--- /src/testing/testing.gyp ++++ /src/testing/testing.gyp +@@ -53,14 +53,12 @@ + 'targets': [ + { + 'target_name': 'testing', +- 'type': 'static_library', ++ 'type': 'none', + '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': [ +@@ -75,53 +73,15 @@ + }], + ], + }, +- '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', ++ 'link_settings': { ++ 'libraries': [ ++ '-lgmock -lgtest', + ], +- }], +- ], +- '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', +- ], ++ }, + }, + }, + { 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<Json::Value::Int64>(-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<Json::Value::UInt64>(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<Json::Value::UInt64>(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<MozcEngine> 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 |