summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-05-17 14:50:25 +0200
committerJeroen Roovers <jer@gentoo.org>2020-05-17 14:51:12 +0200
commitf66a971e7e947fa9a26ad67182126bdaf0c796f7 (patch)
treef6c8693fdba64f754134a61dfce0db99fbae8229 /app-editors/curses-hexedit
parentapp-text/tabler: Fix building with CFLAGS=-fno-common (diff)
downloadgentoo-f66a971e7e947fa9a26ad67182126bdaf0c796f7.tar.gz
gentoo-f66a971e7e947fa9a26ad67182126bdaf0c796f7.tar.bz2
gentoo-f66a971e7e947fa9a26ad67182126bdaf0c796f7.zip
app-editors/curses-hexedit: Fix building with CFLAGS=-fno-common
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Closes: https://bugs.gentoo.org/706996 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'app-editors/curses-hexedit')
-rw-r--r--app-editors/curses-hexedit/curses-hexedit-0.9.7-r1.ebuild37
-rw-r--r--app-editors/curses-hexedit/files/curses-hexedit-0.9.7-fno-common.patch53
2 files changed, 90 insertions, 0 deletions
diff --git a/app-editors/curses-hexedit/curses-hexedit-0.9.7-r1.ebuild b/app-editors/curses-hexedit/curses-hexedit-0.9.7-r1.ebuild
new file mode 100644
index 000000000000..f274d12b8a5b
--- /dev/null
+++ b/app-editors/curses-hexedit/curses-hexedit-0.9.7-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# There's already a "hexedit" package in the tree, so name this one differently
+
+EAPI=7
+inherit autotools toolchain-funcs
+
+MY_P=${P/curses-}
+DESCRIPTION="full screen curses hex editor (with insert/delete support)"
+HOMEPAGE="http://www.rogoyski.com/adam/programs/hexedit/"
+SRC_URI="http://www.rogoyski.com/adam/programs/hexedit/${MY_P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ sys-libs/ncurses:=
+"
+DEPEND="
+ ${RDEPEND}
+"
+PATCHES=(
+ "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-ncurses-pkg-config.patch
+)
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --program-prefix=curses-
+}
diff --git a/app-editors/curses-hexedit/files/curses-hexedit-0.9.7-fno-common.patch b/app-editors/curses-hexedit/files/curses-hexedit-0.9.7-fno-common.patch
new file mode 100644
index 000000000000..c4fe48bf0224
--- /dev/null
+++ b/app-editors/curses-hexedit/files/curses-hexedit-0.9.7-fno-common.patch
@@ -0,0 +1,53 @@
+--- a/src/hexedit.h
++++ b/src/hexedit.h
+@@ -340,7 +340,7 @@
+
+
+ /* Global structure, keep most global variables here. */
+-struct
++struct Globals_t
+ {
+ WINDOW *wmain, *wstatus, *whelp; /* three windows used throughout. */
+ unsigned long filesize; /* size of the file buffer. */
+@@ -362,7 +362,9 @@
+ /* buf end. */
+ int beeping; /* Allow beeping or not. */
+ int help_msg_count; /* Number of messages in help menu. */
+-} Globals;
++};
++
++extern struct Globals_t Globals;
+
+
+ struct foundit
+@@ -397,7 +399,9 @@
+ int s;
+ struct Change *base;
+ struct Change *top;
+-} UndoStack;
++};
++
++extern struct ChangeLog UndoStack;
+
+
+ struct FileNames
+--- a/src/main.c
++++ b/src/main.c
+@@ -16,6 +16,7 @@
+ #include "hexedit.h"
+ #include <assert.h>
+
++struct Globals_t Globals;
+
+ int
+ main (int argc, char **argv)
+--- a/src/undo.c
++++ b/src/undo.c
+@@ -15,6 +15,7 @@
+ #include <assert.h>
+ #include "hexedit.h"
+
++struct ChangeLog UndoStack;
+
+ void
+ pushUndo (int type, unsigned long offset,