1 |
commit: 0003702b3c82e0b9bfc4233c6e081885043db1f0 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 7 09:44:31 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 7 09:44:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0003702b |
7 |
|
8 |
app-editors/hteditor: fix build failure against gcc-7, bug #620732 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/620732 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
|
13 |
.../hteditor/files/hteditor-2.1.0-gcc-7.patch | 32 ++++++++++++++++++++++ |
14 |
app-editors/hteditor/hteditor-2.1.0.ebuild | 2 ++ |
15 |
2 files changed, 34 insertions(+) |
16 |
|
17 |
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch b/app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..ebcc3c0aa43 |
20 |
--- /dev/null |
21 |
+++ b/app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch |
22 |
@@ -0,0 +1,32 @@ |
23 |
+https://bugs.gentoo.org/show_bug.cgi?id=620732 |
24 |
+ |
25 |
+Fixes build failure on gcc-7: |
26 |
+ |
27 |
+ htapp.cc: In function 'uint isqr(uint)': |
28 |
+ htapp.cc:3026:18: error: call of overloaded 'abs(uint)' is ambiguous |
29 |
+ while (abs(a - b) > 1) { |
30 |
+ ^ |
31 |
+ |
32 |
+Picked upstream patch that fixes it: |
33 |
+ |
34 |
+commit 3b62f2f7e49e024ec9d3c5ffc8ff9cd87a107af6 |
35 |
+Author: Sebastian Biallas <sb@×××××××.net> |
36 |
+Date: Sun Nov 13 15:25:26 2016 +0100 |
37 |
+ |
38 |
+ use unsigned variables |
39 |
+ |
40 |
+diff --git a/htapp.cc b/htapp.cc |
41 |
+index 53d8725..03236e2 100644 |
42 |
+--- a/htapp.cc |
43 |
++++ b/htapp.cc |
44 |
+@@ -3021,8 +3021,8 @@ void do_modal_resize() |
45 |
+ |
46 |
+ static uint isqr(uint u) |
47 |
+ { |
48 |
+- uint a = 2; |
49 |
+- uint b = u/a; |
50 |
++ int a = 2; |
51 |
++ int b = u/a; |
52 |
+ while (abs(a - b) > 1) { |
53 |
+ a = (a+b)/2; |
54 |
+ b = u/a; |
55 |
|
56 |
diff --git a/app-editors/hteditor/hteditor-2.1.0.ebuild b/app-editors/hteditor/hteditor-2.1.0.ebuild |
57 |
index 169d1bfcbc3..a38ef31072d 100644 |
58 |
--- a/app-editors/hteditor/hteditor-2.1.0.ebuild |
59 |
+++ b/app-editors/hteditor/hteditor-2.1.0.ebuild |
60 |
@@ -27,6 +27,8 @@ DOCS=( AUTHORS ChangeLog KNOWNBUGS README TODO ) |
61 |
|
62 |
S=${WORKDIR}/${MY_P} |
63 |
|
64 |
+PATCHES=("${FILESDIR}"/${P}-gcc-7.patch) |
65 |
+ |
66 |
src_configure() { |
67 |
econf \ |
68 |
$(use_enable X x11-textmode) \ |