summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/groff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/groff')
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch61
-rw-r--r--meta/recipes-extended/groff/groff_1.18.1.4.bb1
2 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch b/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch
new file mode 100644
index 0000000000..4b0176fcdd
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch
@@ -0,0 +1,61 @@
1From fc289ab69c6d7e4ad489172509a85f68afec43ea Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 29 Jul 2016 03:19:39 -0400
4Subject: [PATCH] fix narrowing conversion error
5
6While gcc6 used, build old groff (for anti-GPLv3 reasons) failed:
7.....
8|groff-1.18.1.4/src/devices/grolbp/charset.h:69:1: error: narrowing
9conversion of '130' from 'int' to 'char' inside { } [-Wnarrowing]
10......
11
12In upstream git://git.savannah.gnu.org/groff.git,
13the following commit fix the issue, but the license is GPLV3,
14we could not backport it to the old groff which license is GPLV2.
15...
16commit d180038ae0da19655bc2760ae2043efa0550a76c
17Author: Werner LEMBERG <wl@gnu.org>
18Date: Wed Apr 16 21:11:07 2003 +0000
19 * src/devices/grolbp/charset.h (symset): Use `unsigned char'.
20...
21
22We use another different way to fix the issue.
23
24Upstream-Status: Pending
25
26Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
27---
28 src/devices/grolbp/charset.h | 2 +-
29 src/devices/grolbp/lbp.cc | 4 ++--
30 2 files changed, 3 insertions(+), 3 deletions(-)
31
32diff --git a/src/devices/grolbp/charset.h b/src/devices/grolbp/charset.h
33index adc76f4..e9c6c5b 100644
34--- a/src/devices/grolbp/charset.h
35+++ b/src/devices/grolbp/charset.h
36@@ -1,6 +1,6 @@
37 // Definition of the WP54 character set
38
39-char symset[] = {
40+int symset[] = {
41 0x57,0x50,0x35,0x34,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61,
42 0x72,0x64,0x65,0x2d,0x42,0x6f,0x6f,0x6b,0x00,0x41,0x76,
43 0x61,0x6e,0x74,0x47,0x61,0x72,0x64,0x65,0x2d,0x44,0x65,
44diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc
45index 76db32a..00d4ca7 100644
46--- a/src/devices/grolbp/lbp.cc
47+++ b/src/devices/grolbp/lbp.cc
48@@ -152,8 +152,8 @@ static void wp54charset()
49 {
50 unsigned int i;
51 lbpputs("\033[714;100;29;0;32;120.}");
52- for (i = 0; i < sizeof(symset); i++)
53- lbpputc(symset[i]);
54+ for (i = 0; i < sizeof(symset)/sizeof(symset[0]); i++)
55+ lbpputc((char)symset[i]&0xFF);
56 lbpputs("\033[100;0 D");
57 return;
58 }
59--
602.8.1
61
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb
index bd786a30aa..fc7eb44781 100644
--- a/meta/recipes-extended/groff/groff_1.18.1.4.bb
+++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb
@@ -13,6 +13,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/old/${BP}.tar.gz \
13 file://man-local.patch \ 13 file://man-local.patch \
14 file://mdoc-local.patch \ 14 file://mdoc-local.patch \
15 file://groff-1.18.1.4-fix-bindir.patch \ 15 file://groff-1.18.1.4-fix-bindir.patch \
16 file://fix-narrowing-conversion-error.patch \
16" 17"
17 18
18inherit autotools texinfo 19inherit autotools texinfo