Patched and rebuilt for Boost 1.76

This commit is contained in:
Jonathan Wakely 2021-08-09 16:16:51 +01:00
parent 390c50b701
commit 2e6013cb4b
2 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,38 @@
From 4bed1934d4f1c46af3f2e10199238bc5ab2a7649 Mon Sep 17 00:00:00 2001
From: HanatoK <summersnow9403@gmail.com>
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 4a45f05e..25061659 100644
--- a/src/rime/gear/script_translator.cc
+++ b/src/rime/gear/script_translator.cc
@@ -8,6 +8,7 @@
//
#include <algorithm>
#include <stack>
+#include <cmath>
#include <boost/algorithm/string/join.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <rime/composition.h>
diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc
index 162ac024..c95e5e24 100644
--- a/src/rime/gear/table_translator.cc
+++ b/src/rime/gear/table_translator.cc
@@ -6,6 +6,7 @@
//
#include <boost/algorithm/string.hpp>
#include <boost/range/adaptor/reversed.hpp>
+#include <cmath>
#include <utf8.h>
#include <rime/candidate.h>
#include <rime/common.h>

View File

@ -6,6 +6,8 @@ Summary: Rime Input Method Engine Library
License: GPLv3
URL: https://rime.im/
Source0: https://github.com/rime/librime/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# https://github.com/rime/librime/issues/462
Patch0: librime-boost176-exp.patch
BuildRequires: gcc-c++
BuildRequires: cmake, opencc-devel
@ -80,8 +82,8 @@ The %{name}-tools package contains tools for %{name}.
%changelog
* Fri Aug 06 2021 Jonathan Wakely <jwakely@redhat.com> - 1.7.2-3
- Rebuilt for Boost 1.76
* Mon Aug 09 2021 Jonathan Wakely <jwakely@redhat.com> - 1.7.2-3
- Patched and rebuilt for Boost 1.76
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild