mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-30 17:33:03 +02:00
librime: update to 1.7.3
This commit is contained in:
parent
b0a0873b9a
commit
7e65f3a07e
2 changed files with 7 additions and 91 deletions
|
@ -1,86 +0,0 @@
|
||||||
From beae5b1d4e990aeb05eb86db5eefec50fa03750b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chen Gong <chen.sst@gmail.com>
|
|
||||||
Date: Fri, 15 May 2020 01:42:52 +0800
|
|
||||||
Subject: [PATCH] fix(simplifier): opencc::DictEntry::Values() type change in
|
|
||||||
opencc 1.1.0
|
|
||||||
|
|
||||||
Closes #367
|
|
||||||
---
|
|
||||||
src/rime/gear/simplifier.cc | 14 ++++++--------
|
|
||||||
src/rime/gear/simplifier.h | 5 +++--
|
|
||||||
2 files changed, 9 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git src/rime/gear/simplifier.cc src/rime/gear/simplifier.cc
|
|
||||||
index 98a1c5a9..feb7f50b 100644
|
|
||||||
--- src/rime/gear/simplifier.cc
|
|
||||||
+++ src/rime/gear/simplifier.cc
|
|
||||||
@@ -8,6 +8,7 @@
|
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <utf8.h>
|
|
||||||
+#include <utility>
|
|
||||||
#include <rime/candidate.h>
|
|
||||||
#include <rime/common.h>
|
|
||||||
#include <rime/config.h>
|
|
||||||
@@ -45,8 +46,7 @@ class Opencc {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- bool ConvertWord(const string& text,
|
|
||||||
- vector<string>* forms) {
|
|
||||||
+ bool ConvertWord(const string& text, vector<string>* forms) {
|
|
||||||
if (dict_ == nullptr) return false;
|
|
||||||
opencc::Optional<const opencc::DictEntry*> item = dict_->Match(text);
|
|
||||||
if (item.IsNull()) {
|
|
||||||
@@ -54,15 +54,14 @@ class Opencc {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
const opencc::DictEntry* entry = item.Get();
|
|
||||||
- for (const char* value : entry->Values()) {
|
|
||||||
- forms->push_back(value);
|
|
||||||
+ for (auto&& value : entry->Values()) {
|
|
||||||
+ forms->push_back(std::move(value));
|
|
||||||
}
|
|
||||||
return forms->size() > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- bool RandomConvertText(const string& text,
|
|
||||||
- string* simplified) {
|
|
||||||
+ bool RandomConvertText(const string& text, string* simplified) {
|
|
||||||
if (dict_ == nullptr) return false;
|
|
||||||
const char *phrase = text.c_str();
|
|
||||||
std::ostringstream buffer;
|
|
||||||
@@ -83,8 +82,7 @@ class Opencc {
|
|
||||||
return *simplified != text;
|
|
||||||
}
|
|
||||||
|
|
||||||
- bool ConvertText(const string& text,
|
|
||||||
- string* simplified) {
|
|
||||||
+ bool ConvertText(const string& text, string* simplified) {
|
|
||||||
if (converter_ == nullptr) return false;
|
|
||||||
*simplified = converter_->Convert(text);
|
|
||||||
return *simplified != text;
|
|
||||||
diff --git src/rime/gear/simplifier.h src/rime/gear/simplifier.h
|
|
||||||
index c68e4c7d..f70344e7 100644
|
|
||||||
--- src/rime/gear/simplifier.h
|
|
||||||
+++ src/rime/gear/simplifier.h
|
|
||||||
@@ -20,7 +20,7 @@ class Simplifier : public Filter, TagMatching {
|
|
||||||
explicit Simplifier(const Ticket& ticket);
|
|
||||||
|
|
||||||
virtual an<Translation> Apply(an<Translation> translation,
|
|
||||||
- CandidateList* candidates);
|
|
||||||
+ CandidateList* candidates);
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool AppliesToSegment(Segment* segment) {
|
|
||||||
@@ -35,7 +35,8 @@ class Simplifier : public Filter, TagMatching {
|
|
||||||
|
|
||||||
void Initialize();
|
|
||||||
void PushBack(const an<Candidate>& original,
|
|
||||||
- CandidateQueue* result, const string& simplified);
|
|
||||||
+ CandidateQueue* result,
|
|
||||||
+ const string& simplified);
|
|
||||||
|
|
||||||
bool initialized_ = false;
|
|
||||||
the<Opencc> opencc_;
|
|
|
@ -1,17 +1,19 @@
|
||||||
# Template file for 'librime'
|
# Template file for 'librime'
|
||||||
pkgname=librime
|
pkgname=librime
|
||||||
version=1.5.3
|
version=1.7.3
|
||||||
revision=4
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DCMAKE_BUILD_TYPE=None -DENABLE_LOGGING=OFF -DBUILD_TEST=ON"
|
configure_args="-DCMAKE_BUILD_TYPE=None -DENABLE_LOGGING=OFF -DBUILD_TEST=ON
|
||||||
|
-DCAPNP_EXECUTABLE=/usr/bin/capnp -DCAPNPC_CXX_EXECUTABLE=/usr/bin/capnpc-c++"
|
||||||
|
hostmakedepends="pkg-config capnproto"
|
||||||
makedepends="boost-devel leveldb-devel marisa-devel opencc-devel
|
makedepends="boost-devel leveldb-devel marisa-devel opencc-devel
|
||||||
yaml-cpp-devel gtest-devel"
|
yaml-cpp-devel gtest-devel capnproto-devel xorgproto"
|
||||||
short_desc="Rime Input Method Engine"
|
short_desc="Rime Input Method Engine"
|
||||||
maintainer="Yuxuan Shui <yshuiv7@gmail.com>"
|
maintainer="Yuxuan Shui <yshuiv7@gmail.com>"
|
||||||
license="BSD-3-Clause"
|
license="BSD-3-Clause"
|
||||||
homepage="https://github.com/rime/librime"
|
homepage="https://github.com/rime/librime"
|
||||||
distfiles="https://github.com/rime/librime/archive/${version}.tar.gz"
|
distfiles="https://github.com/rime/librime/archive/${version}.tar.gz"
|
||||||
checksum=df4279df6bc0419c18d9325e7d76dfdab8f91f0ee00a954f19a27f66dd99f503
|
checksum=c76b937a27d7b9352c3eea9eb3adaebf70c93457104c7d47d40c006009092c20
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
|
|
Loading…
Add table
Reference in a new issue