initial commit

This commit is contained in:
Daniel Ölschlegel 2011-03-05 22:13:33 +00:00 committed by Thomas Klausner
parent ec5539bfd1
commit d42055aa88
7 changed files with 98 additions and 0 deletions

4
dhex/DESCR Normal file
View file

@ -0,0 +1,4 @@
Dhex is a ncurses-based hex-editor with a diff mode. It makes heavy
use of colors, but is also themeable to work on monochrome monitors.
It includes the good old Action Cartridge Search Algorithm to find
specific changes.

28
dhex/Makefile Normal file
View file

@ -0,0 +1,28 @@
# $NetBSD: Makefile,v 1.1.1.1 2011/03/05 22:13:33 amoibos Exp $
DISTNAME= dhex_0.65
PKGNAME= dhex-0.65
CATEGORIES= editors
MASTER_SITES= http://dettus.net/dhex/
MAINTAINER= amoibos@gmail.com
HOMEPAGE= http://www.dettus.net/dhex/
COMMENT= The ncurses-based hex-editor with diff mode
LICENSE= gnu-gpl-v2
USE_LANGUAGES= c
PKG_DESTDIR_SUPPORT= user-destdir
MAN1= dhex.1
MAN5= dhexrc.5 dhex_markers.5 dhex_searchlog.5
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dhex ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/${PKGMANDIR}/man1
.for f in ${MAN5}
${INSTALL_MAN} ${WRKSRC}/${f} ${PREFIX}/${PKGMANDIR}/man5
.endfor
.include "../../devel/ncurses/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

6
dhex/PLIST Normal file
View file

@ -0,0 +1,6 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2011/03/05 22:13:33 amoibos Exp $
bin/dhex
man/man1/dhex.1
man/man5/dhex_markers.5
man/man5/dhex_searchlog.5
man/man5/dhexrc.5

8
dhex/distinfo Normal file
View file

@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.1.1.1 2011/03/05 22:13:33 amoibos Exp $
SHA1 (dhex_0.65.tar.gz) = fd24488760fa3fbc6088173560893782526e9046
RMD160 (dhex_0.65.tar.gz) = 0da32f6e6a6f61043f4fed9057c446502cb2ee65
Size (dhex_0.65.tar.gz) = 55686 bytes
SHA1 (patch-aa) = 23b61ff3abf12831a0f7bfb2f12d9f5be962098a
SHA1 (patch-ab) = 42e0d68c0848929e2ee695a7c6285a6152f80abe
SHA1 (patch-ac) = 6cff750da487a36a1f9c52f8eaddd789fe005cb3

13
dhex/patches/patch-aa Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.1.1.1 2011/03/05 22:13:33 amoibos Exp $
require NetBSD
--- main.c.orig 2011-02-25 14:54:07.000000000 +0100
+++ main.c 2011-02-25 14:54:27.000000000 +0100
@@ -469,6 +469,7 @@
output->win=initscr();
pairsinit(output);
noecho();
+ raw();
nodelay(output->win,1);
if (keyboardsetupreq) keyboardsetup(output,configfile);
readbuf(buf1,0);

25
dhex/patches/patch-ab Normal file
View file

@ -0,0 +1,25 @@
$NetBSD: patch-ab,v 1.1.1.1 2011/03/05 22:13:33 amoibos Exp $
prevent segmentation fault
--- buffers.c.orig 2011-02-25 14:51:15.000000000 +0100
+++ buffers.c 2011-02-25 14:53:58.000000000 +0100
@@ -11,14 +11,17 @@
// retval: OK
//
+#define MAX 512
tUInt32 openbuf(tBuffer* hBuf,tUInt8 bufnum,char* filename)
{
+ char buf[MAX];
hBuf->changesnum=0;
hBuf->valid=0;
hBuf->fresh=1;
hBuf->file=fopen(filename,"rb");
- memcpy(hBuf->filename,filename,512);
- hBuf->filename[511]=0;
+ snprintf(buf, MAX, "%s", filename);
+ memcpy(hBuf->filename,buf,MAX);
+ hBuf->filename[MAX-1]=0;
if (hBuf->file)
{
hBuf->valid=1;

14
dhex/patches/patch-ac Normal file
View file

@ -0,0 +1,14 @@
$NetBSD: patch-ac,v 1.1.1.1 2011/03/05 22:13:33 amoibos Exp $
disable one compiler flag
--- Makefile.orig 2011-02-25 16:20:02.000000000 +0100
+++ Makefile 2011-02-25 16:21:03.000000000 +0100
@@ -1,7 +1,7 @@
CC= gcc
LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/lib/ncurses -L/usr/local/lib/ncurses
CPPFLAGS= -I/usr/include -I/usr/local/include -I/usr/include/ncurses -I/usr/local/include/ncurses
-CFLAGS= -O3 -Wall -std=c99
+CFLAGS= #-O3 -Wall -std=c99
#CFLAGS+= -ffunction-sections -fdata-sections
#LDFLAGS+= --gc-sections
LIBS= -lncurses