summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/librime-fix-build-with-gcc10.patch
diff options
context:
space:
mode:
authorFelix Gruber <felgru@posteo.net>2021-09-06 17:42:44 +0000
committerLeo Famulari <leo@famulari.name>2021-09-07 14:12:36 -0400
commitd5a1206beb06678a2cb3ffcc25b687bb9fbfec74 (patch)
tree23acb90a04147df63d5eeb06fc53b90f973b27c8 /gnu/packages/patches/librime-fix-build-with-gcc10.patch
parent445eec918332c1b8d4a6ba4baf1322e13076029b (diff)
downloadguix-patches-d5a1206beb06678a2cb3ffcc25b687bb9fbfec74.tar
guix-patches-d5a1206beb06678a2cb3ffcc25b687bb9fbfec74.tar.gz
gnu: librime: Fix build with GCC 10.
* gnu/packages/ibus.scm (librime)[source]: Add a patch that adds missing includes. * gnu/packages/patches/librime-fix-build-with-gcc10.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/patches/librime-fix-build-with-gcc10.patch')
-rw-r--r--gnu/packages/patches/librime-fix-build-with-gcc10.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/patches/librime-fix-build-with-gcc10.patch b/gnu/packages/patches/librime-fix-build-with-gcc10.patch
new file mode 100644
index 0000000000..49ad011b57
--- /dev/null
+++ b/gnu/packages/patches/librime-fix-build-with-gcc10.patch
@@ -0,0 +1,41 @@
+From: Felix Gruber <felgru@posteo.net>
+Date: Mon, 6 Sep 2021 19:38:17 +0200
+Subject: [PATCH] Add missing <cmath> includes
+
+Fix a build failure with GCC 10 that manifests like this:
+
+------
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc: In member function ‘void rime::ScriptTranslation::PrepareCandidate()’:
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:490:23: error: ‘exp’ was not declared in this scope
+ 490 | cand->set_quality(exp(entry->weight) +
+ | ^~~
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:504:23: error: ‘exp’ was not declared in this scope
+ 504 | cand->set_quality(exp(entry->weight) +
+ | ^~~
+make[2]: *** [src/CMakeFiles/rime.dir/build.make:1241: src/CMakeFiles/rime.dir/rime/gear/script_translator.cc.o] Error 1
+------
+
+diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc
+index 4a45f05..515c8db 100644
+--- a/src/rime/gear/script_translator.cc
++++ b/src/rime/gear/script_translator.cc
+@@ -7,6 +7,7 @@
+ // 2011-07-10 GONG Chen <chen.sst@gmail.com>
+ //
+ #include <algorithm>
++#include <cmath>
+ #include <stack>
+ #include <boost/algorithm/string/join.hpp>
+ #include <boost/range/adaptor/reversed.hpp>
+diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc
+index 162ac02..dbea76a 100644
+--- a/src/rime/gear/table_translator.cc
++++ b/src/rime/gear/table_translator.cc
+@@ -4,6 +4,7 @@
+ //
+ // 2011-07-10 GONG Chen <chen.sst@gmail.com>
+ //
++#include <cmath>
+ #include <boost/algorithm/string.hpp>
+ #include <boost/range/adaptor/reversed.hpp>
+ #include <utf8.h>