Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/tvision/, dev-libs/tvision/files/
Date: Fri, 05 Jul 2019 14:29:05
Message-Id: 1562336637.f524f5217331b84965e484eded8b5271b907fb6b.mgorny@gentoo
1 commit: f524f5217331b84965e484eded8b5271b907fb6b
2 Author: Bernd Waibel <waebbl <AT> gmail <DOT> com>
3 AuthorDate: Wed Jun 12 12:04:40 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 5 14:23:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f524f521
7
8 dev-libs/tvision: fix gcc-7 incompatibilities
9
10 With gcc-7, they way overloaded functions are handled has changed,
11 which led to build failures. This has been addressed by upstream,
12 see https://sourceforge.net/p/tvision/bugs/17/
13
14 Closes: https://bugs.gentoo.org/639492
15 Package-Manager: Portage-2.3.67, Repoman-2.3.14
16 Signed-off-by: Bernd Waibel <waebbl <AT> gmail.com>
17 Closes: https://github.com/gentoo/gentoo/pull/12245
18 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
19
20 .../files/tvision-2.2.1.4-fix-overloaded-abs.patch | 100 +++++++++++++++++++++
21 dev-libs/tvision/tvision-2.2.1.4.ebuild | 17 ++--
22 2 files changed, 108 insertions(+), 9 deletions(-)
23
24 diff --git a/dev-libs/tvision/files/tvision-2.2.1.4-fix-overloaded-abs.patch b/dev-libs/tvision/files/tvision-2.2.1.4-fix-overloaded-abs.patch
25 new file mode 100644
26 index 00000000000..aab66f3a8cb
27 --- /dev/null
28 +++ b/dev-libs/tvision/files/tvision-2.2.1.4-fix-overloaded-abs.patch
29 @@ -0,0 +1,100 @@
30 +From 85185e7787b34545faf095b64935d80982b5cf81 Mon Sep 17 00:00:00 2001
31 +From: Bernd Waibel <waebbl@×××××.com>
32 +Date: Wed, 12 Jun 2019 11:52:16 +0200
33 +Subject: [PATCH] Patches from upstream to address abs issue with >gcc-6 See
34 + https://sourceforge.net/p/tvision/bugs/17/
35 +
36 +The patches declare inline static abs functions where they are
37 +needed to make gcc happy.
38 +
39 +Signed-off-by: Bernd Waibel <waebbl@×××××.com>
40 +---
41 + classes/dos/sescreen.cc | 6 ++++++
42 + classes/tdesktop.cc | 6 ++++++
43 + classes/x11/x11src.cc | 6 ++++++
44 + 3 files changed, 18 insertions(+)
45 +
46 +diff --git a/classes/dos/sescreen.cc b/classes/dos/sescreen.cc
47 +index 4dd3195..8a500d5 100644
48 +--- a/classes/dos/sescreen.cc
49 ++++ b/classes/dos/sescreen.cc
50 +@@ -248,6 +248,12 @@ static int is_plane_mode = 0;
51 + static int TextModeXres;
52 + static int TextModeYres;
53 +
54 ++inline
55 ++static unsigned abs(unsigned v)
56 ++{
57 ++ return unsigned(abs(int(v)));
58 ++}
59 ++
60 + /*****************************************************************************
61 +
62 + *************************** VESA BIOS ROUTINES ******************************
63 +diff --git a/classes/tdesktop.cc b/classes/tdesktop.cc
64 +index 38f1be4..26447eb 100644
65 +--- a/classes/tdesktop.cc
66 ++++ b/classes/tdesktop.cc
67 +@@ -26,6 +26,12 @@ Modified cursor behavior while desktop locked by Salvador E. Tropea (SET)
68 + #define Uses_TVCodePage
69 + #include <tv.h>
70 +
71 ++inline
72 ++static unsigned abs(unsigned v)
73 ++{
74 ++ return unsigned(abs(int(v)));
75 ++}
76 ++
77 + TDeskInit::TDeskInit( TBackground *(*cBackground)( TRect ) ) :
78 + createBackground( cBackground )
79 + {
80 +diff --git a/classes/x11/x11src.cc b/classes/x11/x11src.cc
81 +index 538457e..dc350df 100644
82 +--- a/classes/x11/x11src.cc
83 ++++ b/classes/x11/x11src.cc
84 +@@ -141,6 +141,12 @@ void (*TScreenX11::writeLine)(int x, int y, int w, void *str, unsigned color)
85 + void (*TScreenX11::redrawBuf)(int x, int y, unsigned w, unsigned off)=
86 + TScreenX11::redrawBufCP;
87 +
88 ++inline
89 ++static unsigned abs(unsigned v)
90 ++{
91 ++ return unsigned(abs(int(v)));
92 ++}
93 ++
94 + TScreenX11::~TScreenX11()
95 + {
96 + STOP_UPDATE_THREAD;
97 +--
98 +2.21.0
99 +
100 +From 9b9f1aea8c9972ab9c1e633835ed4359d7fe000c Mon Sep 17 00:00:00 2001
101 +From: Bernd Waibel <waebbl@×××××.com>
102 +Date: Wed, 12 Jun 2019 12:05:58 +0200
103 +Subject: [PATCH] classes/tdisplay.c: Also add abs patch to tdisplay.cc
104 +
105 +Signed-off-by: Bernd Waibel <waebbl@×××××.com>
106 +---
107 + classes/tdisplay.cc | 6 ++++++
108 + 1 file changed, 6 insertions(+)
109 +
110 +diff --git a/classes/tdisplay.cc b/classes/tdisplay.cc
111 +index 9225d48..569bc1d 100644
112 +--- a/classes/tdisplay.cc
113 ++++ b/classes/tdisplay.cc
114 +@@ -22,6 +22,12 @@ same used in original Turbo Vision for compatibility purposes.
115 + #define Uses_TVCodePage
116 + #include <tv.h>
117 +
118 ++inline
119 ++static unsigned abs(unsigned v)
120 ++{
121 ++ return unsigned(abs(int(v)));
122 ++}
123 ++
124 + // Remove me please!
125 + int TDisplay::dual_display=0;
126 +
127 +--
128 +2.21.0
129 +
130
131 diff --git a/dev-libs/tvision/tvision-2.2.1.4.ebuild b/dev-libs/tvision/tvision-2.2.1.4.ebuild
132 index 0e8e0a50a55..4cbbeea9403 100644
133 --- a/dev-libs/tvision/tvision-2.2.1.4.ebuild
134 +++ b/dev-libs/tvision/tvision-2.2.1.4.ebuild
135 @@ -1,12 +1,13 @@
136 -# Copyright 1999-2017 Gentoo Foundation
137 +# Copyright 1999-2019 Gentoo Authors
138 # Distributed under the terms of the GNU General Public License v2
139
140 -EAPI=6
141 +EAPI=7
142 +
143 +MY_PV=$(ver_rs 3 -)
144
145 DESCRIPTION="Text User Interface that implements the well known CUA widgets"
146 HOMEPAGE="http://tvision.sourceforge.net/"
147 -MY_PVR=${PVR:0:5}-${PVR:6}
148 -SRC_URI="mirror://sourceforge/tvision/rhtvision_${MY_PVR}.tar.gz"
149 +SRC_URI="mirror://sourceforge/tvision/rhtvision_${MY_PV}.tar.gz"
150
151 LICENSE="GPL-2"
152 SLOT="0"
153 @@ -33,7 +34,7 @@ RDEPEND="
154 x11-libs/libXext
155 x11-libs/libXmu
156 x11-libs/libXt
157 - x11-libs/libxcb
158 + x11-libs/libxcb:=
159 )"
160 DEPEND="${RDEPEND}"
161
162 @@ -43,6 +44,7 @@ PATCHES=(
163 "${FILESDIR}/${P}-build-system.patch"
164 "${FILESDIR}/${P}-gcc6.patch"
165 "${FILESDIR}/${P}-flags.patch"
166 + "${FILESDIR}/${P}-fix-overloaded-abs.patch"
167 )
168
169 src_configure() {
170 @@ -63,8 +65,5 @@ src_install() {
171 dosym rhtvision /usr/include/tvision
172
173 # remove CVS directory which gets copied over
174 - rm -rf "${ED%/}/usr/share/doc/${P}/html/CVS" || die
175 -
176 - # TODO: remove locales which are not needed, depending on current user
177 - # locale settings. How?
178 + rm -r "${ED}/usr/share/doc/${P}/html/CVS" || die
179 }