summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch67
-rw-r--r--meta-gnome/recipes-support/onboard/onboard_1.4.1.bb4
2 files changed, 70 insertions, 1 deletions
diff --git a/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch b/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
new file mode 100644
index 000000000..fda37895c
--- /dev/null
+++ b/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
@@ -0,0 +1,67 @@
1From 1c95f64aa342147387ce4b1b7269a5c8b34bd898 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 13 Jul 2017 09:01:04 -0700
4Subject: [PATCH] pypredict/lm: Define error API if platform does not have it
5
6error() API is not implemented across all libcs on linux
7e.g. musl does not provide it.
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 Onboard/pypredict/lm/lm.cpp | 1 -
12 Onboard/pypredict/lm/lm.h | 13 +++++++++++++
13 Onboard/pypredict/lm/lm_dynamic.cpp | 2 --
14 3 files changed, 13 insertions(+), 3 deletions(-)
15
16diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp
17index 2e64296..37ae241 100644
18--- a/Onboard/pypredict/lm/lm.cpp
19+++ b/Onboard/pypredict/lm/lm.cpp
20@@ -19,7 +19,6 @@
21
22 #include <stdlib.h>
23 #include <stdio.h>
24-#include <error.h>
25 #include <algorithm>
26 #include <cmath>
27 #include <string>
28diff --git a/Onboard/pypredict/lm/lm.h b/Onboard/pypredict/lm/lm.h
29index ed4164a..b8b63ee 100644
30--- a/Onboard/pypredict/lm/lm.h
31+++ b/Onboard/pypredict/lm/lm.h
32@@ -32,6 +32,19 @@
33 #include <algorithm>
34 #include <string>
35
36+#if defined(HAVE_ERROR_H)
37+#include <error.h>
38+#else
39+#include <err.h>
40+#define _onboard_error(S, E, F, ...) do { \
41+ if (E) \
42+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
43+ else \
44+ err(S, F, ##__VA_ARGS__); \
45+} while(0)
46+
47+#define error _onboard_error
48+#endif
49
50 // break into debugger
51 // step twice to come back out of the raise() call into known code
52diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp
53index 7c62824..e7c7f40 100644
54--- a/Onboard/pypredict/lm/lm_dynamic.cpp
55+++ b/Onboard/pypredict/lm/lm_dynamic.cpp
56@@ -17,8 +17,6 @@
57 * along with this program. If not, see <http://www.gnu.org/licenses/>.
58 */
59
60-#include <error.h>
61-
62 #include "lm_dynamic.h"
63
64 using namespace std;
65--
662.13.2
67
diff --git a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
index 3a4f18971..10765ee0c 100644
--- a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
+++ b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
@@ -4,7 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL3;md5=8521fa4dd51909b407c5150498d34f4e"
4 4
5DEPENDS += "gtk+3 hunspell libcanberra libxkbfile dconf python3-distutils-extra-native intltool-native" 5DEPENDS += "gtk+3 hunspell libcanberra libxkbfile dconf python3-distutils-extra-native intltool-native"
6 6
7SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz" 7SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz \
8 file://0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch \
9 "
8SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8" 10SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
9SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865" 11SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"
10 12