From 923d362da9154ba14084fe74a4b9e113f573cd53 Mon Sep 17 00:00:00 2001 From: Vinfall Date: Mon, 15 Jul 2024 19:19:56 +0800 Subject: [PATCH] librime: update to 1.11.2. --- srcpkgs/librime/patches/boost-1.76.patch | 111 ----------------------- srcpkgs/librime/template | 11 +-- 2 files changed, 5 insertions(+), 117 deletions(-) delete mode 100644 srcpkgs/librime/patches/boost-1.76.patch diff --git a/srcpkgs/librime/patches/boost-1.76.patch b/srcpkgs/librime/patches/boost-1.76.patch deleted file mode 100644 index 9c8d75aa516..00000000000 --- a/srcpkgs/librime/patches/boost-1.76.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 57cffcd02ac70148e21ce982be834876b3df87db Mon Sep 17 00:00:00 2001 -From: HanatoK -Date: Sat, 1 May 2021 01:04:38 -0500 -Subject: [PATCH] Fix FTBFS. - -Previous boost library (1.75) may implicitly include cmath, but the -latest version (1.76) does not, so the calls to exp are undefined. This -commit include cmath in script_translator.cc and table_translator.cc to -fix the issue (#462). ---- - src/rime/gear/script_translator.cc | 1 + - src/rime/gear/table_translator.cc | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc -index 4a45f05e6..250616593 100644 ---- a/src/rime/gear/script_translator.cc -+++ b/src/rime/gear/script_translator.cc -@@ -8,6 +8,7 @@ - // - #include - #include -+#include - #include - #include - #include -diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc -index 162ac0244..c95e5e24b 100644 ---- a/src/rime/gear/table_translator.cc -+++ b/src/rime/gear/table_translator.cc -@@ -6,6 +6,7 @@ - // - #include - #include -+#include - #include - #include - #include -From bc589fd45eca349b7ca408f9b85a85474745abb0 Mon Sep 17 00:00:00 2001 -From: Chen Gong -Date: Sun, 16 Jan 2022 01:06:29 +0800 -Subject: [PATCH] fix: qualify std::exp after including - -As noted in #462, including only guarantees that std::exp is -declared, so calling exp(double) unqualified is not portable. - -Squashed commit with a style change to the original PR: - -commit 8b9d48c0340f3fb82de59a6f7ec71ddfd86a602f -Author: Chen Gong -Date: Sun Jan 16 00:49:47 2022 +0800 - -commit df4fe3ea11e0222426b98e489db36d32856b3361 -Author: Jonathan Wakely -Date: Tue Aug 10 10:18:38 2021 +0100 - -Closes #476 ---- - src/rime/gear/script_translator.cc | 12 ++++++------ - src/rime/gear/table_translator.cc | 8 ++++---- - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc -index 250616593..e220aed9c 100644 ---- a/src/rime/gear/script_translator.cc -+++ b/src/rime/gear/script_translator.cc -@@ -488,9 +488,9 @@ void ScriptTranslation::PrepareCandidate() { - start_, - start_ + user_phrase_code_length, - entry); -- cand->set_quality(exp(entry->weight) + -- translator_->initial_quality() + -- (IsNormalSpelling() ? 0.5 : -0.5)); -+ cand->set_quality(std::exp(entry->weight) + -+ translator_->initial_quality() + -+ (IsNormalSpelling() ? 0.5 : -0.5)); - } - else if (phrase_code_length > 0) { - DictEntryIterator& iter = phrase_iter_->second; -@@ -502,9 +502,9 @@ void ScriptTranslation::PrepareCandidate() { - start_, - start_ + phrase_code_length, - entry); -- cand->set_quality(exp(entry->weight) + -- translator_->initial_quality() + -- (IsNormalSpelling() ? 0 : -1)); -+ cand->set_quality(std::exp(entry->weight) + -+ translator_->initial_quality() + -+ (IsNormalSpelling() ? 0 : -1)); - } - candidate_ = cand; - } -diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc -index c95e5e24b..97cfc96e5 100644 ---- a/src/rime/gear/table_translator.cc -+++ b/src/rime/gear/table_translator.cc -@@ -81,10 +81,10 @@ an TableTranslation::Peek() { - if (phrase) { - phrase->set_comment(comment); - phrase->set_preedit(preedit_); -- phrase->set_quality(exp(e->weight) + -- options_->initial_quality() + -- (incomplete ? -1 : 0) + -- (is_user_phrase ? 0.5 : 0)); -+ phrase->set_quality(std::exp(e->weight) + -+ options_->initial_quality() + -+ (incomplete ? -1 : 0) + -+ (is_user_phrase ? 0.5 : 0)); - } - return phrase; - } diff --git a/srcpkgs/librime/template b/srcpkgs/librime/template index b44cb170cf7..f2433b8576c 100644 --- a/srcpkgs/librime/template +++ b/srcpkgs/librime/template @@ -1,19 +1,18 @@ # Template file for 'librime' pkgname=librime -version=1.7.3 -revision=8 +version=1.11.2 +revision=1 build_style=cmake -configure_args="-DCMAKE_BUILD_TYPE=None -DENABLE_LOGGING=OFF -DBUILD_TEST=ON - -DCAPNP_EXECUTABLE=/usr/bin/capnp -DCAPNPC_CXX_EXECUTABLE=/usr/bin/capnpc-c++" +configure_args="-DCMAKE_BUILD_TYPE=None -DENABLE_LOGGING=OFF -DBUILD_TEST=ON" hostmakedepends="pkg-config capnproto" makedepends="boost-devel leveldb-devel marisa-devel opencc-devel - yaml-cpp-devel gtest-devel capnproto-devel xorgproto" + yaml-cpp-devel gtest-devel capnproto-devel xorgproto lua54-devel" short_desc="Rime Input Method Engine" maintainer="Yuxuan Shui " license="BSD-3-Clause" homepage="https://github.com/rime/librime" distfiles="https://github.com/rime/librime/archive/${version}.tar.gz" -checksum=c76b937a27d7b9352c3eea9eb3adaebf70c93457104c7d47d40c006009092c20 +checksum=0a3f507d11aeb137de08e90fd319714533caf210b97223d8a12994db215684b5 post_install() { vlicense LICENSE