[arch-commits] Commit in librime/trunk (PKGBUILD cmath-include.patch)

Evangelos Foutras foutrelis at archlinux.org
Tue Jun 8 18:41:17 UTC 2021


    Date: Tuesday, June 8, 2021 @ 18:41:17
  Author: foutrelis
Revision: 959853

Fix build with boost 1.76

Added:
  librime/trunk/cmath-include.patch
Modified:
  librime/trunk/PKGBUILD

---------------------+
 PKGBUILD            |    8 ++++++--
 cmath-include.patch |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-08 18:40:41 UTC (rev 959852)
+++ PKGBUILD	2021-06-08 18:41:17 UTC (rev 959853)
@@ -18,11 +18,13 @@
 source=("https://github.com/rime/librime/archive/$pkgver/$pkgname-$pkgver.tar.gz"
         "https://github.com/lotem/librime-octagram/archive/$_octagramcommit/librime-octagram-$_octagramcommit.tar.gz"
         "https://github.com/hchunhui/librime-lua/archive/$_luacommit/librime-lua-$_luacommit.tar.gz"
-        "https://github.com/rime/librime-charcode/archive/$_charcodecommit/librime-lua-$_charcodecommit.tar.gz")
+        "https://github.com/rime/librime-charcode/archive/$_charcodecommit/librime-lua-$_charcodecommit.tar.gz"
+        cmath-include.patch)
 sha512sums=('8767d17c3d14a5a1bbb8269fab1627b907de72c288b362fdbc6191223937da21e8b18471b4ae8f83ce5afc0ec5c3ab12fbcb49930eb9969c1764c7390d9ee4b0'
             '737d1c58982d2f79a6e8b2548eefa1dddc036dd6e6d5436e7d6b4f3adfa2e9d8e45b29a13c1b8207a93cb77f3b5dbd9d18436f44d4e8040eb95b962de582b386'
             '2a3d3b49d53066fe96dd008e8064718082225e6bf185574a25b8e98175d9936abcfa1fdc56e48f9c72a2deb46f8157d6132fd119ff8e0a3d52fbe9e2ea21386c'
-            '6670a2b089479cf4fb23012e61675065d483ab6123f6dcad136b226dbe361a16bc8f33caece2e139c8d89161a73a2126afe2bed3759996153de6e4888a95a430')
+            '6670a2b089479cf4fb23012e61675065d483ab6123f6dcad136b226dbe361a16bc8f33caece2e139c8d89161a73a2126afe2bed3759996153de6e4888a95a430'
+            '531b4143a7636e6f2cdb67ed2d9b6aa5d43c50dfbbad626757b435debf863f9d466a5923611d9213b0c897af919870d367e88889ea2bbc1037e11fa88a0c7602')
 
 prepare() {
   cd $pkgname-$pkgver/plugins
@@ -29,6 +31,8 @@
   ln -sf "$srcdir"/librime-octagram-$_octagramcommit librime-octagram
   ln -sf "$srcdir"/librime-lua-$_luacommit librime-lua
   ln -sf "$srcdir"/librime-charcode-$_charcodecommit librime-charcode
+
+  patch -Np1 -d .. -i ../cmath-include.patch
 }
 
 build() {

Added: cmath-include.patch
===================================================================
--- cmath-include.patch	                        (rev 0)
+++ cmath-include.patch	2021-06-08 18:41:17 UTC (rev 959853)
@@ -0,0 +1,38 @@
+From 57cffcd02ac70148e21ce982be834876b3df87db Mon Sep 17 00:00:00 2001
+From: HanatoK <summersnow9403 at 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>



More information about the arch-commits mailing list