From a21f9c5ea58d64fe0647228b04ca34ae4a29d08c Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 15 Aug 2013 12:40:06 +0000 Subject: misc fix including solaris support --- sysutils/tree/Makefile | 7 ++++++- sysutils/tree/distinfo | 6 ++++-- sysutils/tree/patches/patch-Makefile | 11 ++++------- sysutils/tree/patches/patch-tree.c | 13 +++++++++++++ sysutils/tree/patches/patch-tree.h | 15 +++++++++++++++ 5 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 sysutils/tree/patches/patch-tree.c create mode 100644 sysutils/tree/patches/patch-tree.h (limited to 'sysutils') diff --git a/sysutils/tree/Makefile b/sysutils/tree/Makefile index 24cf9475022..65c29925ac2 100644 --- a/sysutils/tree/Makefile +++ b/sysutils/tree/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.9 2013/04/10 10:46:24 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2013/08/15 12:40:06 richard Exp $ # DISTNAME= tree-1.6.0 +PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ftp://mama.indstate.edu/linux/tree/ EXTRACT_SUFX= .tgz @@ -12,6 +13,10 @@ COMMENT= Print a text or HTML tree diagram of a directory structure LICENSE= gnu-gpl-v2 USE_TOOLS+= gmake +NO_CONFIGURE= yes + +CFLAGS+= -Wall -fomit-frame-pointer +CFLAGS.linux+= -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 MAKE_FLAGS+= prefix=${PREFIX:Q} MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} diff --git a/sysutils/tree/distinfo b/sysutils/tree/distinfo index 36007056722..007f2da180e 100644 --- a/sysutils/tree/distinfo +++ b/sysutils/tree/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.7 2013/04/10 10:46:24 wiz Exp $ +$NetBSD: distinfo,v 1.8 2013/08/15 12:40:06 richard Exp $ SHA1 (tree-1.6.0.tgz) = 350f851f68859a011668362dd0e7ee81fd1b713a RMD160 (tree-1.6.0.tgz) = d0e89f49fa902c7a72056d1a4ef826ddfee6be15 Size (tree-1.6.0.tgz) = 42706 bytes -SHA1 (patch-Makefile) = b2b29766bfa46ff7e061bcd7bcd0fc88f954d236 +SHA1 (patch-Makefile) = 068bd63827393400262ac345f2ee43f5ad417670 +SHA1 (patch-tree.c) = 0a110bc38fb1b0e498748d17c6327a0289321075 +SHA1 (patch-tree.h) = fbcf8a76dadfd5ea2d102c4e4863d5ce464786bd diff --git a/sysutils/tree/patches/patch-Makefile b/sysutils/tree/patches/patch-Makefile index 4c19d01acfd..9bc3ca21786 100644 --- a/sysutils/tree/patches/patch-Makefile +++ b/sysutils/tree/patches/patch-Makefile @@ -1,8 +1,4 @@ -$NetBSD: patch-Makefile,v 1.1 2013/04/10 10:46:26 wiz Exp $ - -Fix build on systems lacking strverscmp. -Remove -O4 (doesn't exist in most compilers). -Fix DESTDIR. +$NetBSD: patch-Makefile,v 1.2 2013/08/15 12:40:06 richard Exp $ --- Makefile.orig 2011-06-24 14:25:27.000000000 +0000 +++ Makefile @@ -11,8 +7,9 @@ Fix DESTDIR. # Linux defaults: #CFLAGS=-ggdb -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -CFLAGS=-O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -+CFLAGS=-DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - LDFLAGS=-s +-LDFLAGS=-s ++#CFLAGS=-DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ++#LDFLAGS=-s # Uncomment for FreeBSD: #CFLAGS=-O2 -Wall -fomit-frame-pointer diff --git a/sysutils/tree/patches/patch-tree.c b/sysutils/tree/patches/patch-tree.c new file mode 100644 index 00000000000..f972dc1032f --- /dev/null +++ b/sysutils/tree/patches/patch-tree.c @@ -0,0 +1,13 @@ +$NetBSD: patch-tree.c,v 1.1 2013/08/15 12:40:06 richard Exp $ + +--- tree.c.orig 2011-06-24 14:26:30.000000000 +0000 ++++ tree.c +@@ -45,7 +45,7 @@ int mb_cur_max; + #ifdef __EMX__ + const u_short ifmt[]={ FILE_ARCHIVED, FILE_DIRECTORY, FILE_SYSTEM, FILE_HIDDEN, FILE_READONLY, 0}; + #else +- #ifdef S_ISPORT ++ #if defined(S_ISPORT) && defined(S_ISDOOR) + const u_int ifmt[] = {S_IFREG, S_IFDIR, S_IFLNK, S_IFCHR, S_IFBLK, S_IFSOCK, S_IFIFO, S_ISDOOR, S_ISPORT, 0}; + const char fmt[] = "-dlcbspDP?"; + const char *ftype[] = {"file", "directory", "link", "char", "block", "socket", "fifo", "door", "port", "unknown", NULL}; diff --git a/sysutils/tree/patches/patch-tree.h b/sysutils/tree/patches/patch-tree.h new file mode 100644 index 00000000000..125c7e44cef --- /dev/null +++ b/sysutils/tree/patches/patch-tree.h @@ -0,0 +1,15 @@ +$NetBSD: patch-tree.h,v 1.1 2013/08/15 12:40:06 richard Exp $ + +--- tree.h.orig 2011-06-24 12:55:58.000000000 +0000 ++++ tree.h +@@ -59,6 +59,10 @@ + #define mbstowcs(w,m,x) mbsrtowcs(w,(const char**)(& #m),x,NULL) + #endif + ++#ifdef __sun ++# undef S_ISDOOR ++#endif ++ + /* Should probably use strdup(), but we like our xmalloc() */ + #define scopy(x) strcpy(xmalloc(strlen(x)+1),(x)) + #define MINIT 30 /* number of dir entries to initially allocate */ -- cgit v1.2.3