diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2024-01-13 15:45:37 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-01-13 19:50:49 +0100 |
commit | 7c5ab1d666c5b0c0c23478bd3b25867cffec6563 (patch) | |
tree | 300a7554b6a9b1060d664e9b012d05a1df78798e | |
parent | app-i18n/fcitx-qt: remove unused patch(es) (diff) | |
download | gentoo-7c5ab1d666c5b0c0c23478bd3b25867cffec6563.tar.gz gentoo-7c5ab1d666c5b0c0c23478bd3b25867cffec6563.tar.bz2 gentoo-7c5ab1d666c5b0c0c23478bd3b25867cffec6563.zip |
app-i18n/libime: remove unused patch(es)
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | app-i18n/libime/files/libime-1.1.3-fix-the-nanf-value-issue-on-musl.patch | 79 | ||||
-rw-r--r-- | app-i18n/libime/files/libime-1.1.3-use-c++11-for-kenlm.patch | 17 |
2 files changed, 0 insertions, 96 deletions
diff --git a/app-i18n/libime/files/libime-1.1.3-fix-the-nanf-value-issue-on-musl.patch b/app-i18n/libime/files/libime-1.1.3-fix-the-nanf-value-issue-on-musl.patch deleted file mode 100644 index 73b94a07cff5..000000000000 --- a/app-i18n/libime/files/libime-1.1.3-fix-the-nanf-value-issue-on-musl.patch +++ /dev/null @@ -1,79 +0,0 @@ -Backport of https://github.com/fcitx/libime/commit/59ae4a3ab4becdab164f29af07c502096c745b94.diff - -Backport upstream commit 59ae4a3 to fix the nanf value issue on musl - ---- a/src/libime/core/datrie.cpp -+++ b/src/libime/core/datrie.cpp -@@ -47,12 +47,24 @@ struct NanValue { - static inline int32_t NO_PATH() { return -2; } - }; - -+// Musl doesn't have nanf implementation we need, just check if they are the -+// same value. If not, prefer old hardcoded value. -+bool isGoodNanf() { -+ int32_t noValue = decodeValue(std::nanf("1")); -+ int32_t noPath = decodeValue(std::nanf("2")); -+ return (noValue != noPath); -+} -+ - template <> - struct NanValue<float> { - static_assert(std::numeric_limits<float>::has_quiet_NaN, - "Require support for quiet NaN."); -- static inline int32_t NO_VALUE() { return decodeValue(std::nanf("1")); } -- static inline int32_t NO_PATH() { return decodeValue(std::nanf("2")); } -+ static inline int32_t NO_VALUE() { -+ return isGoodNanf() ? decodeValue(std::nanf("1")) : 0x7fc00001; -+ } -+ static inline int32_t NO_PATH() { -+ return isGoodNanf() ? decodeValue(std::nanf("2")) : 0x7fc00002; -+ } - }; - - } // namespace -@@ -1144,6 +1156,20 @@ bool DATrie<T>::isValid(value_type v) { - return !(isNoPath(v) || isNoValue(v)); - } - -+template <typename T> -+T DATrie<T>::noPath() { -+ typename DATriePrivate<T>::decorder_type d; -+ d.result = DATriePrivate<value_type>::CEDAR_NO_PATH; -+ return d.result_value; -+} -+ -+template <typename T> -+T DATrie<T>::noValue() { -+ typename DATriePrivate<T>::decorder_type d; -+ d.result = DATriePrivate<value_type>::CEDAR_NO_VALUE; -+ return d.result_value; -+} -+ - template <typename T> - size_t DATrie<T>::mem_size() const { - // std::cout << "tail" << d->m_tail.size() << std::endl ---- a/src/libime/core/datrie.h -+++ b/src/libime/core/datrie.h -@@ -136,6 +136,9 @@ class DATrie { - static bool isNoPath(value_type v); - static bool isNoValue(value_type v); - -+ static value_type noPath(); -+ static value_type noValue(); -+ - size_t mem_size() const; - - private: ---- a/test/testtrie.cpp -+++ b/test/testtrie.cpp -@@ -40,8 +40,8 @@ int main() { - FCITX_ASSERT(trie.size() == 4); - DATrie<float>::position_type pos = 0; - auto result = trie.traverse("aaa", pos); -- auto nan1 = std::nanf("1"); -- auto nan2 = std::nanf("2"); -+ auto nan1 = trie.noValue(); -+ auto nan2 = trie.noPath(); - // NaN != NaN, we must use memcmp to do this. - FCITX_ASSERT(memcmp(&nan1, &result, sizeof(float)) == 0); - FCITX_ASSERT(trie.isNoValue(result)); diff --git a/app-i18n/libime/files/libime-1.1.3-use-c++11-for-kenlm.patch b/app-i18n/libime/files/libime-1.1.3-use-c++11-for-kenlm.patch deleted file mode 100644 index 15b0024c4668..000000000000 --- a/app-i18n/libime/files/libime-1.1.3-use-c++11-for-kenlm.patch +++ /dev/null @@ -1,17 +0,0 @@ -Backport of https://github.com/fcitx/libime/commit/95c1433500b089b0c2edbdd17720f66e6eafd5e0 - -Backport upstream commit 95c1433 in order to fix building with libcxx - ---- a/src/libime/core/CMakeLists.txt -+++ b/src/libime/core/CMakeLists.txt -@@ -13,7 +13,9 @@ add_library(kenlm STATIC ${KENLM_SRCS}) - target_include_directories(kenlm PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/kenlm>) - target_compile_definitions(kenlm PUBLIC -DKENLM_MAX_ORDER=3 PRIVATE -DNDEBUG) - target_link_libraries(kenlm PUBLIC Boost::boost PkgConfig::ZSTD) --set_target_properties(kenlm PROPERTIES POSITION_INDEPENDENT_CODE ON) -+set_target_properties(kenlm PROPERTIES -+ CXX_STANDARD 11 -+ POSITION_INDEPENDENT_CODE ON) - - if(UNIX) - check_library_exists(rt clock_gettime "clock_gettime from librt" HAVE_CLOCKGETTIME_RT) |