From 01cba8d310b551aeb51b07b0cd105ad4f433f080 Mon Sep 17 00:00:00 2001 From: ryoon Date: Sat, 20 Feb 2021 20:53:01 +0000 Subject: [PATCH] librime: Update to 1.7.2 Changelog: ## [1.7.2](https://github.com/rime/librime/compare/1.7.1...1.7.2) (2021-02-07) ### Bug Fixes * **chord_composer:** should clear raw input after committing text ([79b34ab](https://github.com/rime/librime/commit/79b34ab)) ## [1.7.1](https://github.com/rime/librime/compare/1.7.0...1.7.1) (2021-02-06) ### Bug Fixes * **chord_composer:** press Return key to commit raw key sequence ([2b25861](https://github.com/rime/librime/commit/2b25861)) # [1.7.0](https://github.com/rime/librime/compare/1.6.1...1.7.0) (2021-01-17) ### Bug Fixes * **chord_composer:** more safely handle the placeholder ZWSP ([025d9fb](https://github.com/rime/librime/commit/025d9fb)) * **cmake:** use full paths defined by GNUInstallDirs ([bb8c263](https://github.com/rime/librime/commit/bb8c263)), closes [#424](https://github.com/rime/librime/issues/424) * **opencc:** update submodule to fix [#425](https://github.com/rime/librime/issues/425) ([3fa1571](https://github.com/rime/librime/commit/3fa1571)) * **script_translator:** always_show_comments also applies to phrases ([440a97c](https://github.com/rime/librime/commit/440a97c)), closes [#272](https://github.com/rime/librime/issues/272) [#419](https://github.com/rime/librime/issues/419) * **table_translator:** index out of bound access in string ([ff7acdc](https://github.com/rime/librime/commit/ff7acdc)) ### Features * **chareset_filter:** add CJK Compatibility Ideographs in is_extended_cjk() ([3cb1128](https://github.com/rime/librime/commit/3cb1128)), closes [#305](https://github.com/rime/librime/issues/305) * **setup:** find and load external RIME plugins as shared libs [#431](https://github.com/rime/librime/issues/431) ([b2abd09](https://github.com/rime/librime/commit/b2abd09)) ## [1.6.1](https://github.com/rime/librime/compare/1.6.0...1.6.1) (2020-09-21) ### Bug Fixes * **rime_api.cc:** dangling pointer returned from RimeGetSharedDataDir ([78abaa8](https://github.com/rime/librime/commit/78abaa8)) # [1.6.0](https://github.com/rime/librime/compare/1.5.3...1.6.0) (2020-09-20) ### Bug Fixes * **ascii_composer:** do not comsume Shift key release ([debc2c0](https://github.com/rime/librime/commit/debc2c0)) * **ascii_composer:** first read ascii_composer/good_old_caps_lock from schema config ([3fc56c4](https://github.com/rime/librime/commit/3fc56c4)) * **chord_composer:** commit raw input with uppercase letters ([cc983d5](https://github.com/rime/librime/commit/cc983d5)) * **CMakeLists.txt:** ensure paths in pkgconfig file are absolute ([0e96e51](https://github.com/rime/librime/commit/0e96e51)) * **CMakeLists.txt:** would not use signals v1 due to a typo ([6662a28](https://github.com/rime/librime/commit/6662a28)), closes [#225](https://github.com/rime/librime/issues/225) * **custom_settings:** accept "*.schema" as config id ([604da0b](https://github.com/rime/librime/commit/604da0b)) * **dict:** issues with user db recovery ([0f3d0df](https://github.com/rime/librime/commit/0f3d0df)) * **dict_compiler:** build prism with loaded syllabary when not rebuilding primary table ([93fe827](https://github.com/rime/librime/commit/93fe827)) * **plugins/CMakeLists.txt:** avoid rime_library linking to itself via rime_plugins_deps ([fe744db](https://github.com/rime/librime/commit/fe744db)) * **rime_api.cc:** check struct has member of non-pointer type ([090dfa4](https://github.com/rime/librime/commit/090dfa4)) * **rime_api.cc:** using unchecked fields introduced an ABI breakage ([62bbead](https://github.com/rime/librime/commit/62bbead)), closes [/github.com/rime/librime/pull/328#pullrequestreview-335125464](https://github.com//github.com/rime/librime/pull/328/issues/pullrequestreview-335125464) * **rime_test:** set data directories to working directory using rime::SetupDeployer API ([7c08a90](https://github.com/rime/librime/commit/7c08a90)) * **simplifier:** opencc::DictEntry::Values() type change in opencc 1.1.0 ([beae5b1](https://github.com/rime/librime/commit/beae5b1)), closes [#367](https://github.com/rime/librime/issues/367) * **user_db:** pointer cast error caused by multiple inheritance ([2ed780b](https://github.com/rime/librime/commit/2ed780b)) * use official emoji 12.0 data ([#304](https://github.com/rime/librime/issues/304)) ([75a60dc](https://github.com/rime/librime/commit/75a60dc)) ### Features * **api:** implement capnproto api ([873f648](https://github.com/rime/librime/commit/873f648)) * **api:** include candidate labels in proto message ([aae7a0c](https://github.com/rime/librime/commit/aae7a0c)) * **charset_filter:** support charset options with emoji ([#293](https://github.com/rime/librime/issues/293)) ([943c95b](https://github.com/rime/librime/commit/943c95b)) * **charset_filter:** support CJK Unified Ideographs Extension G ([#393](https://github.com/rime/librime/issues/393)) ([0a1573d](https://github.com/rime/librime/commit/0a1573d)) * **chord_composer:** support chording with Shift keys ([94cf479](https://github.com/rime/librime/commit/94cf479)) * **chord_composer:** use Control, Alt, Shift to input chord ([f3a2ad0](https://github.com/rime/librime/commit/f3a2ad0)) * **dictionary:** packs extends the dictionary with extra binary table files ([930074c](https://github.com/rime/librime/commit/930074c)) * **key_binder:** bind key to a key sequence ([3b5dbf6](https://github.com/rime/librime/commit/3b5dbf6)), closes [#301](https://github.com/rime/librime/issues/301) * **logging:** setup min log level, log dir and set file mode to log files ([90839b0](https://github.com/rime/librime/commit/90839b0)) * **selector:** support 4 combinations of horizontal/vertical text orientation and stacked/linear candidate list layout ([c498f71](https://github.com/rime/librime/commit/c498f71)) * **selector:** support vertical UI ([dbb35c6](https://github.com/rime/librime/commit/dbb35c6)) * **switcher:** enable schema in cases where conditions are met ([217c72b](https://github.com/rime/librime/commit/217c72b)) * **tools/rime_proto_console:** demo for proto api ([d88ef9f](https://github.com/rime/librime/commit/d88ef9f)) ### Performance Improvements * **poet:** optimize for performance in making sentences (~40% faster) ([0853465](https://github.com/rime/librime/commit/0853465)) ## [1.5.3](https://github.com/rime/librime/compare/1.5.2...1.5.3) (2019-06-22) ### Bug Fixes * **cmake, xcode.mk:** find optional dependency icu, while building xcode/release-with-icu target [skip appveyor] ([17a80f8](https://github.com/rime/librime/commit/17a80f8)) * **single_char_filter:** broken in librime 1.5.2 ([6948a62](https://github.com/rime/librime/commit/6948a62)) ### Features * **appveyor:** build variant "rime-with-plugins" for tagged commits [skip travis] ([eef8c30](https://github.com/rime/librime/commit/eef8c30)) * **travis-ci:** build variant "rime-with-plugins" for tagged commits [skip appveyor] ([cf11c27](https://github.com/rime/librime/commit/cf11c27)) * **travis-ci:** deploy artifacts for macOS to GitHub releases [skip appveyor] ([3f03784](https://github.com/rime/librime/commit/3f03784)) ## [1.5.2](https://github.com/rime/librime/compare/1.5.1...1.5.2) (2019-06-17) ### Bug Fixes * **user_dictionary, contextual_translation:** fix user phrase quality; order contextual suggestions by type ([69d5c32](https://github.com/rime/librime/commit/69d5c32)) ## [1.5.1](https://github.com/rime/librime/compare/1.5.0...1.5.1) (2019-06-16) ### Bug Fixes * **user_dictionary:** make user phrases comparable in weight to system words ([982f69d](https://github.com/rime/librime/commit/982f69d)) # [1.5.0](https://github.com/rime/librime/compare/1.4.0...1.5.0) (2019-06-06) ### Bug Fixes * **ci:** update build script ([84a1a1b](https://github.com/rime/librime/commit/84a1a1b)) * **ci:** use submodules in AppVeyor CI build script ([7b515b4](https://github.com/rime/librime/commit/7b515b4)) * **cmake:** libboost Windows XP compatibility fix ([#270](https://github.com/rime/librime/issues/270)) ([fecfe39](https://github.com/rime/librime/commit/fecfe39)), closes [rime/weasel#337](https://github.com/rime/weasel/issues/337) * **CMakeLists.txt:** install header files in all platforms ([821d563](https://github.com/rime/librime/commit/821d563)) * **CMakeLists.txt:** set "-std=c++11" in CMAKE_CXX_FLAGS ([5d8a836](https://github.com/rime/librime/commit/5d8a836)) * **config/plugins.h:** memory leak caused by non-virtual destructor ([316a659](https://github.com/rime/librime/commit/316a659)), closes [#259](https://github.com/rime/librime/issues/259) * **deploy:** treat schema dependencies as optional; do not report errors if missing ([ff3d5e9](https://github.com/rime/librime/commit/ff3d5e9)) * **engine:** schema doesn't match the one used by switcher ([e41bb63](https://github.com/rime/librime/commit/e41bb63)), closes [#269](https://github.com/rime/librime/issues/269) * **rime_levers_api.h:** customize_bool() misused `bool` type ([42bacc5](https://github.com/rime/librime/commit/42bacc5)) * **syllabifier:** enable_completion not working ([2714131](https://github.com/rime/librime/commit/2714131)), closes [#343](https://github.com/rime/librime/issues/343) * **table_translator:** null pointer exception when dict entries are filtered ([77438a9](https://github.com/rime/librime/commit/77438a9)) * **test:** compile error in unit test ([7076d9e](https://github.com/rime/librime/commit/7076d9e)) * **travis-install.sh:** working directory ([97220ce](https://github.com/rime/librime/commit/97220ce)) ### Features * **appveyor:** install RIME_PLUGINS [skip travis] ([c7ce66f](https://github.com/rime/librime/commit/c7ce66f)) * **CMakeList.txt:** add plugin build support ([#257](https://github.com/rime/librime/issues/257)) ([dfa341b](https://github.com/rime/librime/commit/dfa341b)) * **contextual_translation:** weight and re-order phrases by context ([2390da3](https://github.com/rime/librime/commit/2390da3)) * **dict:** specify vocabulary db name in dict settings ([dcdc301](https://github.com/rime/librime/commit/dcdc301)) * **grammar:** compare homophones/homographs in sentence ([9248a6b](https://github.com/rime/librime/commit/9248a6b)) * **install-plugins.sh:** git-clone or update plugins ([70483b4](https://github.com/rime/librime/commit/70483b4)) * **poet:** find best sentence candidates ([b3f4005](https://github.com/rime/librime/commit/b3f4005)) * **rime_api:** get candidate list from index ([c587900](https://github.com/rime/librime/commit/c587900)) * **translator:** contextual suggestions in partially selected sentence ([12a7501](https://github.com/rime/librime/commit/12a7501)) * **translator:** look at preceding text when making sentence ([6ae34de](https://github.com/rime/librime/commit/6ae34de)) * **travis-ci:** install plugins specified in envvar RIME_PLUGINS ([c857639](https://github.com/rime/librime/commit/c857639)) ### Performance Improvements * **dictionary:** refactor DictEntryIterator and do partial sort ([0258c7f](https://github.com/rime/librime/commit/0258c7f)) ### BREAKING CHANGES * **rime_levers_api.h:** in signature of C API function `customize_bool()`, change type `bool` to `Bool` (alias of `int`). Impact: the changed function is not in use by any first party code, known to be in use by osfans/trime. # [1.4.0](https://github.com/rime/librime/compare/1.3.2...1.4.0) (2019-01-16) ### Bug Fixes * **config:** user_config should not fall back to shared data ([68c8a34](https://github.com/rime/librime/commit/68c8a34)), closes [#271](https://github.com/rime/librime/issues/271) * **SymlinkingPrebuiltDictionaries:** remove dangling symlinks ([5ad333d](https://github.com/rime/librime/commit/5ad333d)), closes [#241](https://github.com/rime/librime/issues/241) * **SymlinkingPrebuiltDictionaries:** remove dangling symlinks ([f8e4ebf](https://github.com/rime/librime/commit/f8e4ebf)), closes [#241](https://github.com/rime/librime/issues/241) ### Features * spelling correction ([#228](https://github.com/rime/librime/issues/228)) ([ad3638a](https://github.com/rime/librime/commit/ad3638a)) * **Dockerfile:** for build ([#246](https://github.com/rime/librime/issues/246)) ([cafd0d5](https://github.com/rime/librime/commit/cafd0d5)) ## [1.3.2](https://github.com/rime/librime/compare/1.3.1...1.3.2) (2018-11-12) ### Bug Fixes * **CMakeLists.txt:** do not link binaries when building static library ([99573e3](https://github.com/rime/librime/commit/99573e3)) * **CMakeLists.txt:** do not require boost::signals, which will be deprecated in Boost 1.69 ([8a9ef3b](https://github.com/rime/librime/commit/8a9ef3b)), closes [#225](https://github.com/rime/librime/issues/225) * **config_compiler:** ambiguous operator overload with cmake option ENABLE_LOGGING=OFF ([b86b647](https://github.com/rime/librime/commit/b86b647)), closes [#211](https://github.com/rime/librime/issues/211) * **config_compiler:** support creating list in-place by __patch and __merge ([0784eb0](https://github.com/rime/librime/commit/0784eb0)) * **table_translator:** enable encoding uniquified commit history ([74e31bc](https://github.com/rime/librime/commit/74e31bc)) ### Features * **language:** shared user dictionary per language (Closes [#184](https://github.com/rime/librime/issues/184)) ([#214](https://github.com/rime/librime/issues/214)) ([9f774e7](https://github.com/rime/librime/commit/9f774e7)) * always_show_comments option ([#220](https://github.com/rime/librime/issues/220)) ([19cea07](https://github.com/rime/librime/commit/19cea07)) ## [1.3.1](https://github.com/rime/librime/compare/1.3.0...1.3.1) (2018-04-01) ### Bug Fixes * **config_file_update:** clean up deprecated user copy ([#193](https://github.com/rime/librime/issues/193)) ([8d8d2e6](https://github.com/rime/librime/commit/8d8d2e6)) * **thirdparty/src/leveldb:** do not link to snappy library ([6f6056a](https://github.com/rime/librime/commit/6f6056a)) # 1.3.0 (2018-03-09) ### Bug Fixes * **CMakeLists.txt, build.bat:** install header files (public API) ([06c9e86](https://github.com/rime/librime/commit/06c9e86)) * **config_compiler:** "/" mistaken as path separator in merged map key ([#192](https://github.com/rime/librime/issues/192)) ([831ffba](https://github.com/rime/librime/commit/831ffba)), closes [#190](https://github.com/rime/librime/issues/190) * **ConfigFileUpdate:** no need to create user build if shared build is up-to-date ([cafd5c4](https://github.com/rime/librime/commit/cafd5c4)) * **SchemaUpdate:** read compiled schema from shared build if there is no user build ([45a04dd](https://github.com/rime/librime/commit/45a04dd)) * **simplifier:** fix typo ([9e1114e](https://github.com/rime/librime/commit/9e1114e)), closes [#183](https://github.com/rime/librime/issues/183) * **user_db:** unwanted implicit instantiation of UserDbFormat template ([3cbc9cb](https://github.com/rime/librime/commit/3cbc9cb)), closes [#188](https://github.com/rime/librime/issues/188) ### Chores * **release tag:** deprecating tag name prefix 'rime-' in favor of semver 'X.Y.Z' ### BREAKING CHANGES * **release tag:** After 1.3.0 release, we'll no longer be creating tags in the format 'rime-X.Y.Z'. Downstream packagers please change automated scripts accordingly. ## 1.2.10 (2018-02-21) ### Bug Fixes * **config_compiler:** linking failure on blocking root node of a dependency resource ([ecf3397](https://github.com/rime/librime/commit/ecf3397)) * table_translator not making sentence if table entry is hidden by charset filter. ([77eb12e](https://github.com/rime/librime/commit/77eb12e)) * **appveyor.install.bat:** switch to a more stable download server for libboost ([bcc4d10](https://github.com/rime/librime/commit/bcc4d10)) * **appveyor.yml:** archive header files ([c8b1e67](https://github.com/rime/librime/commit/c8b1e67)) * **ascii_composer:** support key binding Shift+space in ascii mode ([7077389](https://github.com/rime/librime/commit/7077389)) * **build.bat:** fix build errors with VS2015 build tools ([ec940c6](https://github.com/rime/librime/commit/ec940c6)) * **calculus, recognizer:** memory leak due to unchecked regex error ([19ddc1e](https://github.com/rime/librime/commit/19ddc1e)), closes [#171](https://github.com/rime/librime/issues/171) * **chord_composer:** allow editor to define BackSpace key behavior ([7f41f65](https://github.com/rime/librime/commit/7f41f65)) * **chord_composer:** letters with modifier keys should not be committed by a following enter key ([aab5eb8](https://github.com/rime/librime/commit/aab5eb8)) * **ci:** call cmake under /usr/local with sudo by passing $PATH environment variable ([a0e6d2f](https://github.com/rime/librime/commit/a0e6d2f)) * **cmake:** fix build break for mingw ([939893c](https://github.com/rime/librime/commit/939893c)) * **config:** auto save modified config data; fixes [#144](https://github.com/rime/librime/issues/144) ([2736f4b](https://github.com/rime/librime/commit/2736f4b)) * **config:** treat "@" as map key rather than list index ([a1df9c5](https://github.com/rime/librime/commit/a1df9c5)) * **config_compiler:** duplicate PendingChild dependencies happen from multiple commands on the same node ([25c28f8](https://github.com/rime/librime/commit/25c28f8)) * **config_compiler:** enforce dependency priorities ([69a6f3e](https://github.com/rime/librime/commit/69a6f3e)) * **config_compiler:** null value should not overwrite a normal key in a merged tree ([4ecae44](https://github.com/rime/librime/commit/4ecae44)) * **config_compiler:** template operator overload had compile error with NDK ([71817a0](https://github.com/rime/librime/commit/71817a0)) * **config/build_info_plugin:** referenced but unavailable resources should also be recorded ([cd46f7a](https://github.com/rime/librime/commit/cd46f7a)) * **ConfigFileUpdate:** should succeed if shared copy does not exist ([8a3e25c](https://github.com/rime/librime/commit/8a3e25c)) * **custom_settings:** fall back to $shared_data_dir/build when loading config ([caf8ebb](https://github.com/rime/librime/commit/caf8ebb)) * **custom_settings:** load built settings from $user_data_dir/build directory ([463dc09](https://github.com/rime/librime/commit/463dc09)) * **deployment_tasks:** symbols.yaml is no longer a build target ([f920e4f](https://github.com/rime/librime/commit/f920e4f)) * **dict_compiler:** prism should load compiled schema ([c2fd0cf](https://github.com/rime/librime/commit/c2fd0cf)), closes [#176](https://github.com/rime/librime/issues/176) * **key_event:** KeySequence::repr() prefer unescaped punctuation characters ([aa43e5e](https://github.com/rime/librime/commit/aa43e5e)) * **levers:** update deployment tasks for copy-free resource resolution ([1f86413](https://github.com/rime/librime/commit/1f86413)) * **Makefile:** make install-debug; do return error code on mac ([1177142](https://github.com/rime/librime/commit/1177142)) * **rime_api:** use user_config_open() to access user.yaml ([4e4a491](https://github.com/rime/librime/commit/4e4a491)) * **rime_console:** not showing switcher's context ([632cf4b](https://github.com/rime/librime/commit/632cf4b)) * **schema:** create a "schema" component that opens Config by schema_id ([555f990](https://github.com/rime/librime/commit/555f990)) * **simplifier:** fix crash if no opencc file ([091cb9d](https://github.com/rime/librime/commit/091cb9d)) * **simplifier:** tips option for show_in_comment simplifier ([e7bb757](https://github.com/rime/librime/commit/e7bb757)) * **uniquifier:** half of the duplicate candidates remain after dedup [Closes [#114](https://github.com/rime/librime/issues/114)] ([2ab76bc](https://github.com/rime/librime/commit/2ab76bc)) ### Features * **build.bat:** customize build settings via environment variables ([#178](https://github.com/rime/librime/issues/178)) ([1678b75](https://github.com/rime/librime/commit/1678b75)) * **chord_composer:** accept escaped chording keys ([79a32b2](https://github.com/rime/librime/commit/79a32b2)) * **chord_composer:** support chording with function keys ([48424d3](https://github.com/rime/librime/commit/48424d3)) * **config:** add config compiler plugin that includes default:/menu into schema ([b51dda8](https://github.com/rime/librime/commit/b51dda8)) * **config:** best effort resolution for circurlar dependencies ([2e52d54](https://github.com/rime/librime/commit/2e52d54)) * **config:** build config files if source files changed ([0d79712](https://github.com/rime/librime/commit/0d79712)) * **config:** config compiler plugins that port legacy features to the new YAML syntax ([a7d253e](https://github.com/rime/librime/commit/a7d253e)) * **config:** config_builder saves output to $rime_user_dir/build/ ([e596155](https://github.com/rime/librime/commit/e596155)) * **config:** references to optional config resources, ending with "?" ([14ec858](https://github.com/rime/librime/commit/14ec858)) * **config:** save __build_info in compiled config ([45a7337](https://github.com/rime/librime/commit/45a7337)) * **config:** separate out config_builder and user_config components ([9e9493b](https://github.com/rime/librime/commit/9e9493b)) * **config:** support append and merge syntax ([04dcf42](https://github.com/rime/librime/commit/04dcf42)) * **customizer:** disable saving patched config files ([88f5a0c](https://github.com/rime/librime/commit/88f5a0c)) * **detect_modifications:** quick test based on last write time of files ([285fbcc](https://github.com/rime/librime/commit/285fbcc)) * **dict:** no conditional compilation on arm ([85b945f](https://github.com/rime/librime/commit/85b945f)) * **dict:** relocate binary files to $user_data_dir/build ([bc66a47](https://github.com/rime/librime/commit/bc66a47)) * **dict:** use resource resolver to find dictionary files ([8ea08b3](https://github.com/rime/librime/commit/8ea08b3)) * add property notifier ([fa7b5a5](https://github.com/rime/librime/commit/fa7b5a5)) * **resource_resolver:** add class and unit test ([03ee8b4](https://github.com/rime/librime/commit/03ee8b4)) * **resource_resolver:** fallback root path ([02151da](https://github.com/rime/librime/commit/02151da)) * **translator:** add history_translator ([#115](https://github.com/rime/librime/issues/115)) ([ae13354](https://github.com/rime/librime/commit/ae13354)) ## 1.2.9 (2014-12-14) * **rime_api.h:** add `RIME_MODULE_LIST`, `RIME_REGISTER_MODULE_GROUP`. * **Makefile:** add make targets `thirdparty/*` to build individual libraries. * **legacy/src/legacy_module.cc:** plugin module `rime-legacy` for GPL code, providing component `legacy_userdb` for user dictionary upgrade. * **src/setup.cc:** define module groups `"default"` and `"deployer"`, to avoid naming a list of built-bin modules in `RimeTraits::modules`. * **test/table_test.cc:** fix random segment faults when run shuffled. * **thirdparty/src/leveldb:** new dependency LevelDB, replacing Kyoto Cabinet. * **dict/level_db:** userdb implementation based on LevelDB, replacing treeDb. * **dict/tree_db:** moved to `legacy/src/`. * **dict/user_db:** refactored and modularized to ease adding implementations. * **gear/cjk_minifier:** support CJK Extension E. * **gear/memory:** save cached phrases as soon as the next composition begins. * **gear/recognizer:** match space iff set `recognizer/use_space: true`. * **gear/simplifier:** catch and log OpenCC exceptions when loading. * **gear/single_char_filter:** bring single character candidates to the front. * **gear/simplifier:** adapt to OpenCC 1.0 API. * **thirdparty/src/opencc:** update OpenCC to v1.0.2 (incompatible with v0.4). * **lever/deployment_tasks:** update and rename task `user_dict_upgrade`. ## 1.2 (2014-07-15) * **rime_api:** add API functions to access complex structures in config; add API to get the raw input and cursor position, or to select a candidate. * **config:** support references to list elements in key paths. eg. `schema_list/@0/schema` is the id of the first schema in schema list. * **switcher:** enable folding IME options in the switcher menu. * **dict_compiler:** also detect changes in essay when updating a dictionary; support updating prism without the source file of the dictionary. * **preset_vocabulary:** load `essay.txt` instead of `essay.kct`. * **reverse_lookup_dictionary:** adopt a new file format with 50% space saving. * **table:** add support for a new binary format with 20% space saving; fix alignment on ARM. * **ascii_composer:** do not toggle IME states when long pressing `Shift` key; support discarding unfinished input when switching to ASCII mode. * **affix_segmentor:** fix issues with selecting a partial-match candidate. * **chord_composer:** commit raw input composed with original key strokes. * **cjk_minifier:** a filter to hide characters in CJK extension set, works with `script_translator`. * **navigator:** do not use `BackSpace` to revert selecting a candidate but to edit the input after moving the cursor left or right. * **punctuator:** support `ascii_punct` option for switching between Chinese and Western (ASCII) punctuations. * **speller:** auto-select candidates by pattern matching against the code; fix issues to cooperate with punctuator. * **CMakeLists.txt:** add options `ENABLE_LOGGING` and `BOOST_USE_CXX11`; introduce a new dependency: `libmarisa`. * **cmake/FindYamlCpp.cmake:** check the availability of the new (v0.5) API. * **sample:** the directory containing a sample plug-in module. * **tools/rime_patch.cc:** a command line tool to create patches. * **thirdparty:** include source code of third-party libraries to ease building librime on Windows and Mac. ## 1.1 (2013-12-26) * **new build dependency:** compiler with C++11 support. tested with GCC 4.8.2, Apple LLVM version 5.0, MSVC 12 (2013). * **encoder:** disable warnings for phrase encode failures in log output; limit the number of results in encoding a phrase with multiple solutions. * **punctuator:** fixed a bug in matching nested "pairs of 'symbols'". * **speller:** better support for auto-committing, allowing users of table based input schema to omit explicitly selecting candidates in many cases. * **schema_list_translator:** option for static schema list order. * **table_translator:** fixed the range of CJK-D in charset filter. --- inputmethod/librime/Makefile | 22 +++++----- inputmethod/librime/PLIST | 6 ++- inputmethod/librime/buildlink3.mk | 12 +----- inputmethod/librime/distinfo | 17 ++++---- inputmethod/librime/options.mk | 4 +- .../librime/patches/patch-CMakeLists.txt | 42 +++++-------------- .../patches/patch-plugins_CMakeLists.txt | 16 +++++++ .../patches/patch-src_dict_mapped__file.cc | 42 ------------------- .../librime/patches/patch-src_dict_table.cc | 26 ------------ .../patch-src_lever_deployment__tasks.cc | 15 ------- .../patches/patch-src_rime_gear_memory.cc | 22 ++++++++++ 11 files changed, 78 insertions(+), 146 deletions(-) create mode 100644 inputmethod/librime/patches/patch-plugins_CMakeLists.txt delete mode 100644 inputmethod/librime/patches/patch-src_dict_mapped__file.cc delete mode 100644 inputmethod/librime/patches/patch-src_dict_table.cc delete mode 100644 inputmethod/librime/patches/patch-src_lever_deployment__tasks.cc create mode 100644 inputmethod/librime/patches/patch-src_rime_gear_memory.cc diff --git a/inputmethod/librime/Makefile b/inputmethod/librime/Makefile index 19f115f1a687..f6f951fb533e 100644 --- a/inputmethod/librime/Makefile +++ b/inputmethod/librime/Makefile @@ -1,30 +1,32 @@ -# $NetBSD: Makefile,v 1.23 2021/01/01 08:24:49 ryoon Exp $ +# $NetBSD: Makefile,v 1.24 2021/02/20 20:53:01 ryoon Exp $ -DISTNAME= librime-1.0 -PKGREVISION= 17 +GITHUB_PROJECT= librime +GITHUB_TAG= ${PKGVERSION_NOREV} +DISTNAME= librime-1.7.2 CATEGORIES= inputmethod chinese -MASTER_SITES= http://rimeime.googlecode.com/files/ -#MASTER_SITES= http://dl.bintray.com/lotem/rime/ +MASTER_SITES= ${MASTER_SITE_GITHUB:=rime/} MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= https://rime.im/ COMMENT= Rime input method engine -LICENSE= gnu-gpl-v3 +LICENSE= modified-bsd -WRKSRC= ${WRKDIR}/librime USE_CMAKE= yes USE_TOOLS+= pkg-config USE_LANGUAGES= c c++ +LDFLAGS+= -lsnappy + PKGCONFIG_OVERRIDE+= rime.pc.in .include "options.mk" .include "../../converters/opencc/buildlink3.mk" -.include "../../databases/kyotocabinet/buildlink3.mk" +.include "../../databases/leveldb/buildlink3.mk" .include "../../devel/boost-libs/buildlink3.mk" +.include "../../devel/capnproto/buildlink3.mk" .include "../../devel/google-glog/buildlink3.mk" -.include "../../devel/zlib/buildlink3.mk" +.include "../../devel/snappy/buildlink3.mk" +.include "../../textproc/marisa/buildlink3.mk" .include "../../textproc/yaml-cpp/buildlink3.mk" -.include "../../x11/xorgproto/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/inputmethod/librime/PLIST b/inputmethod/librime/PLIST index 616d172ff465..87f7848f590d 100644 --- a/inputmethod/librime/PLIST +++ b/inputmethod/librime/PLIST @@ -1,9 +1,11 @@ -@comment $NetBSD: PLIST,v 1.1 2014/11/29 09:31:49 obache Exp $ +@comment $NetBSD: PLIST,v 1.2 2021/02/20 20:53:01 ryoon Exp $ bin/rime_deployer bin/rime_dict_manager +bin/rime_patch include/rime_api.h +include/rime_levers_api.h lib/librime.so lib/librime.so.1 -lib/librime.so.${PKGVERSION}.0 +lib/librime.so.${PKGVERSION} lib/pkgconfig/rime.pc share/cmake/rime/RimeConfig.cmake diff --git a/inputmethod/librime/buildlink3.mk b/inputmethod/librime/buildlink3.mk index 21043305119a..3e278df1db75 100644 --- a/inputmethod/librime/buildlink3.mk +++ b/inputmethod/librime/buildlink3.mk @@ -1,21 +1,13 @@ -# $NetBSD: buildlink3.mk,v 1.15 2021/01/01 08:24:49 ryoon Exp $ -# +# $NetBSD: buildlink3.mk,v 1.16 2021/02/20 20:53:01 ryoon Exp $ BUILDLINK_TREE+= librime .if !defined(LIBRIME_BUILDLINK3_MK) LIBRIME_BUILDLINK3_MK:= -BUILDLINK_API_DEPENDS.librime+= librime>=1.0 -BUILDLINK_ABI_DEPENDS.librime?= librime>=1.0nb17 +BUILDLINK_API_DEPENDS.librime+= librime>=1.7.2 BUILDLINK_PKGSRCDIR.librime?= ../../inputmethod/librime -.include "../../converters/opencc/buildlink3.mk" -.include "../../databases/kyotocabinet/buildlink3.mk" -.include "../../devel/boost-libs/buildlink3.mk" -.include "../../devel/google-glog/buildlink3.mk" -.include "../../devel/zlib/buildlink3.mk" -.include "../../textproc/yaml-cpp/buildlink3.mk" .endif # LIBRIME_BUILDLINK3_MK BUILDLINK_TREE+= -librime diff --git a/inputmethod/librime/distinfo b/inputmethod/librime/distinfo index 4c2803562465..76e3cd35c30a 100644 --- a/inputmethod/librime/distinfo +++ b/inputmethod/librime/distinfo @@ -1,10 +1,9 @@ -$NetBSD: distinfo,v 1.6 2020/05/22 13:45:28 joerg Exp $ +$NetBSD: distinfo,v 1.7 2021/02/20 20:53:01 ryoon Exp $ -SHA1 (librime-1.0.tar.gz) = 5fd6db95b039e08dadfe547e3e63962aeaa97d8c -RMD160 (librime-1.0.tar.gz) = 0e5972bfcf179d464a8e58f9ddce3bf55708865b -SHA512 (librime-1.0.tar.gz) = 79f51174043e0ff524f8af090fd1d0a21301b4e5e530c772648ff59894d39135d15c53c0f4d197895c301defca2e084635eb222464dd20859ab3bdbc6ae8fb2c -Size (librime-1.0.tar.gz) = 2576401 bytes -SHA1 (patch-CMakeLists.txt) = dd02c2b1945657ad0374dec539aa62babe3abbac -SHA1 (patch-src_dict_mapped__file.cc) = b5b181ef102b47aad837d52703bba4c807bf6483 -SHA1 (patch-src_dict_table.cc) = d8c952bd5b897d8d05b86b6c515daa3d19b2ba6d -SHA1 (patch-src_lever_deployment__tasks.cc) = c65375a6473649e747962882fb77e008368d0962 +SHA1 (librime-1.7.2.tar.gz) = 1b252ca0367310b560fd189c359b194cf23a6007 +RMD160 (librime-1.7.2.tar.gz) = 1350ac1b2fc8d93740e3b1402dce2952d0fdd8d6 +SHA512 (librime-1.7.2.tar.gz) = 213f14b2f3e09fd93dffe2b6ce0d4a2651f1759c3df2929885ec6a3e036f343f1d07127a82a22378bd95677a5a45395d6bb7d884e12d40a3a160d0e9ef24a6ba +Size (librime-1.7.2.tar.gz) = 2859403 bytes +SHA1 (patch-CMakeLists.txt) = 7f2b03ae0451a14fa587cf8089a5021b1149ea14 +SHA1 (patch-plugins_CMakeLists.txt) = ab0b528c0a9219c52d0a8ca596209799db9de14a +SHA1 (patch-src_rime_gear_memory.cc) = aba74cf976cb934362d5fcb8eea53751878f2d9f diff --git a/inputmethod/librime/options.mk b/inputmethod/librime/options.mk index e6a23e0da8ce..af8a915ffc25 100644 --- a/inputmethod/librime/options.mk +++ b/inputmethod/librime/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.1 2014/11/29 09:31:49 obache Exp $ +# $NetBSD: options.mk,v 1.2 2021/02/20 20:53:01 ryoon Exp $ # PKG_OPTIONS_VAR= PKG_OPTIONS.librime @@ -11,4 +11,6 @@ PKG_SUPPORTED_OPTIONS= tests CMAKE_ARGS+= -DBUILD_TEST=ON TEST_TARGET= test TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/lib +.else +CMAKE_ARGS+= -DBUILD_TEST=OFF .endif diff --git a/inputmethod/librime/patches/patch-CMakeLists.txt b/inputmethod/librime/patches/patch-CMakeLists.txt index d75c511f8abc..435cef9face9 100644 --- a/inputmethod/librime/patches/patch-CMakeLists.txt +++ b/inputmethod/librime/patches/patch-CMakeLists.txt @@ -1,35 +1,15 @@ -$NetBSD: patch-CMakeLists.txt,v 1.2 2020/05/22 13:45:28 joerg Exp $ +$NetBSD: patch-CMakeLists.txt,v 1.3 2021/02/20 20:53:01 ryoon Exp $ -* No reason to restrict only for Linux. -* Do not search for signals, it no longer exist. cmake doesn't support - signals2 as component, so just skip for now. +* Install pkg-config pc file for more platforms. ---- CMakeLists.txt.orig 2013-11-10 10:20:21.000000000 +0000 +--- CMakeLists.txt.orig 2021-02-07 12:37:26.000000000 +0000 +++ CMakeLists.txt -@@ -32,7 +32,7 @@ set(Boost_USE_MULTITHREADED ON) - if(MSVC) - set(Boost_USE_STATIC_RUNTIME ON) - endif(MSVC) --find_package(Boost 1.46.0 REQUIRED COMPONENTS filesystem regex signals system thread) -+find_package(Boost 1.46.0 REQUIRED COMPONENTS filesystem regex system thread) - if(Boost_FOUND) - include_directories(${Boost_INCLUDE_DIRS}) - link_directories(${Boost_LIBRARY_DIRS}) -@@ -98,7 +98,7 @@ if(NOT DEFINED BIN_INSTALL_DIR) - set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) - endif() +@@ -180,7 +180,7 @@ configure_file( + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) --if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -+#if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - # uninstall target - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" -@@ -125,7 +125,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - file(GLOB supplement_schema ${PROJECT_SOURCE_DIR}/data/supplement/*.yaml) - install(FILES ${supplement_schema} DESTINATION ${pkgdatadir}) - endif(BUILD_DATA) --endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -+#endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - - if(BUILD_SHARED_LIBS) - set(RIME_LIBRARY rime) +-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|DragonFly|GNU") ++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|DragonFly|GNU|NetBSD|OpenBSD") + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(exec_prefix "${CMAKE_INSTALL_PREFIX}") + set(bindir "${CMAKE_INSTALL_FULL_BINDIR}") diff --git a/inputmethod/librime/patches/patch-plugins_CMakeLists.txt b/inputmethod/librime/patches/patch-plugins_CMakeLists.txt new file mode 100644 index 000000000000..b2200a85d6ba --- /dev/null +++ b/inputmethod/librime/patches/patch-plugins_CMakeLists.txt @@ -0,0 +1,16 @@ +$NetBSD: patch-plugins_CMakeLists.txt,v 1.1 2021/02/20 20:53:01 ryoon Exp $ + +* plugins directory has no children at this moment. + Fix cmake error. + +--- plugins/CMakeLists.txt.orig 2021-02-07 12:37:26.000000000 +0000 ++++ plugins/CMakeLists.txt +@@ -44,7 +44,7 @@ foreach(plugin ${plugins}) + unset(plugin_objs) + unset(plugin_deps) + unset(plugin_modules) +- add_subdirectory(${plugin}) ++ #add_subdirectory(${plugin}) + if(BUILD_MERGED_PLUGINS) + set(plugins_objs ${plugins_objs} ${plugin_objs}) + list(REMOVE_ITEM plugin_deps ${rime_library}) diff --git a/inputmethod/librime/patches/patch-src_dict_mapped__file.cc b/inputmethod/librime/patches/patch-src_dict_mapped__file.cc deleted file mode 100644 index ef71a5babe2d..000000000000 --- a/inputmethod/librime/patches/patch-src_dict_mapped__file.cc +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-src_dict_mapped__file.cc,v 1.1 2018/03/07 09:34:09 wiz Exp $ - -Return bool where the return value type needs it. - ---- src/dict/mapped_file.cc.orig 2013-11-10 10:20:21.000000000 +0000 -+++ src/dict/mapped_file.cc -@@ -106,7 +106,7 @@ bool MappedFile::Create(size_t capacity) - LOG(INFO) << "opening file for read/write access."; - file_.reset(new MappedFileImpl(file_name_, MappedFileImpl::kOpenReadWrite)); - size_ = 0; -- return file_; -+ return file_ != NULL; - } - - bool MappedFile::OpenReadOnly() { -@@ -116,7 +116,7 @@ bool MappedFile::OpenReadOnly() { - } - file_.reset(new MappedFileImpl(file_name_, MappedFileImpl::kOpenReadOnly)); - size_ = file_->get_size(); -- return file_; -+ return file_ != NULL; - } - - bool MappedFile::OpenReadWrite() { -@@ -126,7 +126,7 @@ bool MappedFile::OpenReadWrite() { - } - file_.reset(new MappedFileImpl(file_name_, MappedFileImpl::kOpenReadWrite)); - size_ = 0; -- return file_; -+ return file_ != NULL; - } - - void MappedFile::Close() { -@@ -137,7 +137,7 @@ void MappedFile::Close() { - } - - bool MappedFile::IsOpen() const { -- return file_; -+ return file_ != NULL; - } - - bool MappedFile::Flush() { diff --git a/inputmethod/librime/patches/patch-src_dict_table.cc b/inputmethod/librime/patches/patch-src_dict_table.cc deleted file mode 100644 index f740ce6e02ec..000000000000 --- a/inputmethod/librime/patches/patch-src_dict_table.cc +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_dict_table.cc,v 1.2 2015/04/21 13:59:31 hiramatsu Exp $ - -Entries in the output file are generally not correctly aligned, -so tell the compiler explicitly about this fact and use memcpy -for writing the data. - ---- src/dict/table.cc.orig 2013-11-10 19:20:21.000000000 +0900 -+++ src/dict/table.cc 2015-04-18 12:14:33.000000000 +0900 -@@ -403,14 +403,15 @@ - return true; - } - --bool Table::BuildEntry(const DictEntry &dict_entry, table::Entry *entry) { -+bool Table::BuildEntry(const DictEntry &dict_entry, table::Entry * __attribute__((aligned(1))) entry) { - if (!entry) - return false; - if (!CopyString(dict_entry.text, &entry->text)) { - LOG(ERROR) << "Error creating table entry '" << dict_entry.text << "'; file size: " << file_size(); - return false; - } -- entry->weight = static_cast(dict_entry.weight); -+ float weight = static_cast(dict_entry.weight); -+ memcpy(&entry->weight, &weight, sizeof(weight)); - return true; - } - diff --git a/inputmethod/librime/patches/patch-src_lever_deployment__tasks.cc b/inputmethod/librime/patches/patch-src_lever_deployment__tasks.cc deleted file mode 100644 index 72bc21ccb6fc..000000000000 --- a/inputmethod/librime/patches/patch-src_lever_deployment__tasks.cc +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_lever_deployment__tasks.cc,v 1.1 2020/05/22 13:45:29 joerg Exp $ - -boost no longer uses boost::placeholders by default. - ---- src/lever/deployment_tasks.cc.orig 2020-05-22 12:32:26.730921261 +0000 -+++ src/lever/deployment_tasks.cc -@@ -291,7 +291,7 @@ bool SchemaUpdate::Run(Deployer* deploye - } - LOG(INFO) << "preparing dictionary '" << dict_name << "'."; - DictFileFinder finder = -- boost::bind(&find_dict_file, _1, shared_data_path, user_data_path); -+ boost::bind(&find_dict_file, boost::placeholders::_1, shared_data_path, user_data_path); - DictCompiler dict_compiler(dict.get(), finder); - if (verbose_) { - dict_compiler.set_options(DictCompiler::kRebuild | DictCompiler::kDump); diff --git a/inputmethod/librime/patches/patch-src_rime_gear_memory.cc b/inputmethod/librime/patches/patch-src_rime_gear_memory.cc new file mode 100644 index 000000000000..1ca1fe9a3c9e --- /dev/null +++ b/inputmethod/librime/patches/patch-src_rime_gear_memory.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-src_rime_gear_memory.cc,v 1.1 2021/02/20 20:53:01 ryoon Exp $ + +fix(memory): possibly dereferencing null pointer +From: https://github.com/rime/librime/commit/1c2644de2b026972dd80a3770b92d7194d523303 + +--- src/rime/gear/memory.cc ++++ src/rime/gear/memory.cc +@@ -68,10 +68,10 @@ Memory::Memory(const Ticket& ticket) { + + // user dictionary is named after language; dictionary name may have an + // optional suffix separated from the language component by dot. +- language_.reset(new Language{ +- user_dict_ ? user_dict_->name() : +- Language::get_language_component(dict_->name()) +- }); ++ language_.reset( ++ user_dict_ ? new Language{user_dict_->name()} : ++ dict_ ? new Language{Language::get_language_component(dict_->name())} : ++ nullptr); + + Context* ctx = ticket.engine->context(); + commit_connection_ = ctx->commit_notifier().connect(