From 6824617e6462e216becf79d8e0d389baa75b8de5 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 23 Aug 2015 08:54:05 -0400 Subject: [PATCH] Add hexcurse package --- packages/hexcurse/build.sh | 6 +++++ packages/hexcurse/src-getopt.c.patch | 37 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 packages/hexcurse/build.sh create mode 100644 packages/hexcurse/src-getopt.c.patch diff --git a/packages/hexcurse/build.sh b/packages/hexcurse/build.sh new file mode 100644 index 000000000..c56a57cb2 --- /dev/null +++ b/packages/hexcurse/build.sh @@ -0,0 +1,6 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/LonnyGomes/hexcurse +TERMUX_PKG_DESCRIPTION="Console hexeditor" +TERMUX_PKG_VERSION=1.58 +TERMUX_PKG_SRCURL=https://github.com/LonnyGomes/hexcurse/archive/hexcurse-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_FOLDERNAME=hexcurse-hexcurse-${TERMUX_PKG_VERSION} +TERMUX_PKG_DEPENDS="ncurses" diff --git a/packages/hexcurse/src-getopt.c.patch b/packages/hexcurse/src-getopt.c.patch new file mode 100644 index 000000000..0daa77be8 --- /dev/null +++ b/packages/hexcurse/src-getopt.c.patch @@ -0,0 +1,37 @@ +diff -u -r ../hexcurse-hexcurse-1.58/src/getopt.c ./src/getopt.c +--- ../hexcurse-hexcurse-1.58/src/getopt.c 2014-02-26 19:26:34.000000000 -0500 ++++ ./src/getopt.c 2015-08-23 07:53:55.917711262 -0400 +@@ -32,16 +32,6 @@ + #undef optind + #undef alloca + +-/* The following modification was submited by Claudio Fanin. This change * +- * enables hexcurse to be compiled with SGI's proprietary compiler */ +-#ifdef _SGIAPI +-#include +-#endif +-#ifndef __alloca +-#define __alloca alloca +-#endif +-/* end of modification */ +- + #ifdef HAVE_OPTIND + extern char* optarg; + #else +@@ -85,7 +75,7 @@ + char **argv; + { + int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *); +- char **temp = (char **) __alloca (nonopts_size); ++ char **temp = (char **) malloc(nonopts_size); + + /* Interchange the two blocks of data in ARGV. */ + +@@ -95,6 +85,7 @@ + my_bcopy ((char *) temp, + (char *) &argv[first_nonopt + optind - last_nonopt], + nonopts_size); ++ free(temp); + + /* Update records for the slots the non-options now occupy. */ +