commit:     95200636f12d2b1a8b5ef65c7719b02822060f39
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Nov 30 21:04:39 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Nov 30 21:04:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95200636

app-editors/hexcurse: fix compilation with GCC 10

* Fixed compilation with GCC10
* Update to EAPI 7

Closes: https://github.com/gentoo/gentoo/pull/16129
Closes: https://bugs.gentoo.org/706762
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../hexcurse/files/hexcurse-1.60.0-gcc10.patch     | 41 ++++++++++++++++++++++
 app-editors/hexcurse/hexcurse-1.60.0.ebuild        | 23 +++++-------
 2 files changed, 50 insertions(+), 14 deletions(-)

diff --git a/app-editors/hexcurse/files/hexcurse-1.60.0-gcc10.patch 
b/app-editors/hexcurse/files/hexcurse-1.60.0-gcc10.patch
new file mode 100644
index 00000000000..dfd8f4c2c55
--- /dev/null
+++ b/app-editors/hexcurse/files/hexcurse-1.60.0-gcc10.patch
@@ -0,0 +1,41 @@
+From 9cf7c9dcd012656df949d06f2986b57db3a72bdc Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <[email protected]>
+Date: Tue, 9 Jun 2020 01:25:04 +0300
+Subject: [PATCH] Fix compilation with GCC 10
+
+Fixed compilation with -fno-common, which enabled in GCC 10 by default.
+See https://bugs.gentoo.org/706762.
+---
+ include/hex.h  | 2 +-
+ src/hexcurse.c | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/hex.h b/include/hex.h
+index 57845c0..845bac0 100644
+--- a/include/hex.h
++++ b/include/hex.h
+@@ -126,7 +126,7 @@ extern bool color_enabled;
+ #define max(a,b) ((a) >(b) ? (a) : (b))
+ #endif
+ 
+-FILE *fpIN;                                   /* global file ptr           */
++extern FILE *fpIN;                            /* global file ptr           */
+ 
+ /* function prototypes */
+ 
+diff --git a/src/hexcurse.c b/src/hexcurse.c
+index e723ddc..3c167b6 100644
+--- a/src/hexcurse.c
++++ b/src/hexcurse.c
+@@ -27,6 +27,8 @@
+ /*#define DEBUG_LLIST*/
+ /*#define DEBUG_GOTO*/
+ 
++FILE *fpIN;
++
+ int     BASE, MAXY, resize = 0;
+ int     MIN_ADDR_LENGTH;
+ hexList *head;                                                /* linked list 
struct */
+-- 
+2.26.2
+

diff --git a/app-editors/hexcurse/hexcurse-1.60.0.ebuild 
b/app-editors/hexcurse/hexcurse-1.60.0.ebuild
index 95d89712514..3512038ef7e 100644
--- a/app-editors/hexcurse/hexcurse-1.60.0.ebuild
+++ b/app-editors/hexcurse/hexcurse-1.60.0.ebuild
@@ -1,7 +1,8 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
+
 inherit autotools
 
 DESCRIPTION="ncurses based hex editor"
@@ -12,23 +13,17 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos"
 
-RDEPEND="
-       >=sys-libs/ncurses-5.2:0=
-"
-DEPEND="
-       ${RDEPEND}
-"
+RDEPEND=">=sys-libs/ncurses-5.2:0="
+DEPEND="${RDEPEND}"
+
 PATCHES=(
-       "${FILESDIR}"/${PN}-1.60.0-Werror.patch
-       "${FILESDIR}"/${PN}-1.60.0-tinfo.patch
+       "${FILESDIR}"/${P}-Werror.patch
+       "${FILESDIR}"/${P}-tinfo.patch
+       "${FILESDIR}"/${P}-gcc10.patch
 )
 
 src_prepare() {
        default
+       rm README.Irix || die
        eautoreconf
 }
-
-src_install() {
-       emake install DESTDIR="${D}"
-       dodoc AUTHORS ChangeLog NEWS README
-}

Reply via email to