From d2aac520e7581ca8288b95f6f7ec60696dddc72e Mon Sep 17 00:00:00 2001 From: Zhuowei Zhang Date: Sun, 3 May 2015 20:05:45 +0000 Subject: [PATCH] hexedit: add recipe for version 1.2.13 --- app-editors/hexedit/hexedit-1.2.13.recipe | 55 +++++++++++++++++++ .../hexedit/patches/hexedit-1.2.13.patchset | 36 ++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 app-editors/hexedit/hexedit-1.2.13.recipe create mode 100644 app-editors/hexedit/patches/hexedit-1.2.13.patchset diff --git a/app-editors/hexedit/hexedit-1.2.13.recipe b/app-editors/hexedit/hexedit-1.2.13.recipe new file mode 100644 index 000000000..7e28802d5 --- /dev/null +++ b/app-editors/hexedit/hexedit-1.2.13.recipe @@ -0,0 +1,55 @@ +SUMMARY="view and edit files in hexadecimal or in ASCII" +DESCRIPTION=" +hexedit shows a file both in ASCII and in hexadecimal. \ +The file can be a device as the file is read a piece at a time. \ +You can modify the file and search through it. \ +You have also copy&paste and save to file functions. \ +Truncating or appending to the file is allowed. \ +Modifications are shown in bold. +" +HOMEPAGE="http://rigaux.org/hexedit.html" +SRC_URI="http://rigaux.org/hexedit-$portVersion.src.tgz" +CHECKSUM_SHA256="6a126da30a77f5c0b08038aa7a881d910e3b65d13767fb54c58c983963b88dd7" +SOURCE_DIR="hexedit" +LICENSE="GNU GPL v2" +COPYRIGHT="1998-2013 Pixel (Pascal Rigaux)" +REVISION="1" +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PATCHES="hexedit-$portVersion.patchset" + +PROVIDES=" + hexedit = $portVersion + cmd:hexedit = $portVersion + " +REQUIRES=" + haiku + cmd:groff + lib:libncurses + " +BUILD_REQUIRES=" + devel:libncurses + " +BUILD_PREREQUIRES=" + haiku_devel + cmd:autoreconf + cmd:gcc + cmd:groff + cmd:ld + cmd:libtoolize + cmd:make + cmd:pkg_config + " + + +BUILD() +{ + autoreconf + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install +} diff --git a/app-editors/hexedit/patches/hexedit-1.2.13.patchset b/app-editors/hexedit/patches/hexedit-1.2.13.patchset new file mode 100644 index 000000000..b3cf5bb1d --- /dev/null +++ b/app-editors/hexedit/patches/hexedit-1.2.13.patchset @@ -0,0 +1,36 @@ +From dca7a5080bd510b0a40e612fdd2054b7253c0be7 Mon Sep 17 00:00:00 2001 +From: Zhuowei Zhang +Date: Sun, 3 May 2015 19:35:17 +0000 +Subject: [PATCH] Fix build with gcc2 + +--- + display.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/display.c b/display.c +index 168f2ce..2f249da 100644 +--- a/display.c ++++ b/display.c +@@ -187,14 +187,17 @@ void displayLine(int offset, int max) + for (i = offset; i < offset + lineLength; i++) { + if (i > offset) MAXATTRPRINTW(bufferAttr[i] & MARKED, (((i - offset) % blocSize) ? " " : " ")); + if (i < max) { +- ATTRPRINTW( + #ifdef HAVE_COLORS ++ ATTRPRINTW( + (!colored ? 0 : + buffer[i] == 0 ? COLOR_PAIR(1) : + buffer[i] < ' ' ? COLOR_PAIR(2) : + buffer[i] >= 127 ? COLOR_PAIR(3) : 0) | +-#endif + bufferAttr[i], ("%02X", buffer[i])); ++#else ++ ATTRPRINTW( ++ bufferAttr[i], ("%02X", buffer[i])); ++#endif + } + else PRINTW((" ")); + } +-- +2.2.2 +