summaryrefslogtreecommitdiff
path: root/sysutils/tree
diff options
context:
space:
mode:
authorwiz <wiz>2013-04-10 10:46:24 +0000
committerwiz <wiz>2013-04-10 10:46:24 +0000
commit7ed680cbd6592ee13b02eb5c6b3f1948953e306c (patch)
treec41bf6faeef4d7aa6e4a7c3e9864a0c0d4ac7b31 /sysutils/tree
parent680818d5d37fad40cd84406bce06a59359b1915d (diff)
downloadpkgsrc-7ed680cbd6592ee13b02eb5c6b3f1948953e306c.tar.gz
Updat to 1.6.0:
Version 1.6.0 - Re-org of code into multiple files, split HTML and Unix listdir() into separate functions, various code cleanups and optimizations. - Fixed a memory leak in listdir() when memory was allocated early and not freed before function exit. - Fixed possible buffer overflow where symbolic links are followed. - Fixed links printing "argetm" before the name of the link when the LINK setting for DIR_COLORS is set to target (Markus Schnalke <meillo@marmaro.de>) - More fully support dir colors -- added support for su, sg, tw, ow, & st options (and "do" in theory). - Use the environment variable "TREE_COLORS" instead of "LS_COLORS" for color information if it exists. - Added --si flag to print filesizes in SI (powers of 1000) units (Ulrich Eckhardt) - Added -Q to quote filenames in double quotes. Does not override -N or -q. - Control characters are no longer printed in carrot notation, but as backslashed octal, ala ls, except for codes 7-13 which are printed as \a, \b, \t, \n, \v, \f and \r respectively. Spaces and backslashes are also now backslashed as per ls, for better input to scripts unless -Q is in use (where "'s are backslashed.) (Ujjwal Kumar) - Added -U for unsorted listings (directory order). - Added -c for sorting by last status change (ala ls -c). - --dirsfirst is now a meta-sort and does not override -c, -v, -r or -t, but is disabled by -U. - After many requests, added the ability to process the entire tree before emitting output. Used for the new options --du, which works like the du command: sums the amount of space under each directory and prints a total amount used in the report and the --prune option which will prune all empty directories from the output (makes the -P option output much more readable.) It should be noted that this will be slow to output when processing large directory trees and can consume copious amounts of memory, use at your own peril. - Added -X option to emit the directory tree in XML format (turns colorization off always.) - Added --timefmt option to specify the format of time display (implies -D). Uses the strftime format. Version 1.5.3 - Properly quote directories for the system command when tree is relaunched using the -R option. - Fixed possible indentation problem if dirs[*] is not properly zeroed (Martin Nagy). - Use strcoll() instead of strcmp() to sort files based on locale if set. - Change "const static" to "static const" to remove some compiler warnings for Solaris (Kamaraju Kusumanchi). - Actually use TREE_CHARSET if it's defined. - Automatically select UTF-8 charset if TREE_CHARSET is not set, and the locale is set to *UTF-8 (overridden with --charset option.) Version 1.5.2.2 - Set locale before checking MB_CUR_MAX. - Added HP-NonStop platform support (Craig McDaniel <craigmcd@gmail.com>) - Fixed to support 32 bit UID/GIDs. - Added Solaris build options to Makefile (edit and uncomment to use). Provided by Wang Quanhong Version 1.5.2.1 - Added strverscmp.c file for os's without strverscmp. Source file is attributed to: Jean-Franois Bignolles <bignolle@ecoledoc.ibp.fr> - Try different approach to MB_CUR_MAX problem. - Changed the argument to printit() to be signed char to avoid warnings. Version 1.5.2 - Added --filelimit X option to not descend directories that have more than X number of files in them. - Added -v option for version sorting (also called natural sorting) ala ls. Version 1.5.1.2 - Fixed compile issues related to MB_CUR_MAX on non-linux machines. - Removed unecessary features.h
Diffstat (limited to 'sysutils/tree')
-rw-r--r--sysutils/tree/Makefile9
-rw-r--r--sysutils/tree/distinfo11
-rw-r--r--sysutils/tree/patches/patch-Makefile41
-rw-r--r--sysutils/tree/patches/patch-aa38
-rw-r--r--sysutils/tree/patches/patch-ab61
5 files changed, 51 insertions, 109 deletions
diff --git a/sysutils/tree/Makefile b/sysutils/tree/Makefile
index 5fbc48d6535..24cf9475022 100644
--- a/sysutils/tree/Makefile
+++ b/sysutils/tree/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2012/10/23 19:51:27 asau Exp $
+# $NetBSD: Makefile,v 1.9 2013/04/10 10:46:24 wiz Exp $
#
-DISTNAME= tree-1.5.1.1
-PKGREVISION= 2
+DISTNAME= tree-1.6.0
CATEGORIES= sysutils
MASTER_SITES= ftp://mama.indstate.edu/linux/tree/
EXTRACT_SUFX= .tgz
@@ -12,7 +11,9 @@ HOMEPAGE= http://mama.indstate.edu/users/ice/tree/
COMMENT= Print a text or HTML tree diagram of a directory structure
LICENSE= gnu-gpl-v2
-MAKE_FLAGS+= PREFIX=${PREFIX:Q}
+USE_TOOLS+= gmake
+
+MAKE_FLAGS+= prefix=${PREFIX:Q}
MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
MAKE_FLAGS+= MANSUBDIR=${PKGMANDIR:Q}
diff --git a/sysutils/tree/distinfo b/sysutils/tree/distinfo
index f2d034889a7..36007056722 100644
--- a/sysutils/tree/distinfo
+++ b/sysutils/tree/distinfo
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.6 2009/08/08 05:20:02 tnn Exp $
+$NetBSD: distinfo,v 1.7 2013/04/10 10:46:24 wiz Exp $
-SHA1 (tree-1.5.1.1.tgz) = ca4145bf1d2957ff3f4e6af0f64ce92d102fd356
-RMD160 (tree-1.5.1.1.tgz) = 7cc78b7a0103a7f81ec40c2c5e1ff2399fd7bb20
-Size (tree-1.5.1.1.tgz) = 30792 bytes
-SHA1 (patch-aa) = 813d77169d72bf52dccfa455bd5832d4f095afab
-SHA1 (patch-ab) = aec0fe0c3911eb16c35e770dd3bea3d946c34650
+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
diff --git a/sysutils/tree/patches/patch-Makefile b/sysutils/tree/patches/patch-Makefile
new file mode 100644
index 00000000000..4c19d01acfd
--- /dev/null
+++ b/sysutils/tree/patches/patch-Makefile
@@ -0,0 +1,41 @@
+$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.
+
+--- Makefile.orig 2011-06-24 14:25:27.000000000 +0000
++++ Makefile
+@@ -31,13 +31,13 @@ OBJS=tree.o unix.o html.o xml.o hash.o c
+
+ # 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
+
+ # Uncomment for FreeBSD:
+ #CFLAGS=-O2 -Wall -fomit-frame-pointer
+ #LDFLAGS=-s
+-#OBJS+=strverscmp.o
++OBJS+=strverscmp.o
+
+ # Uncomment for Solaris:
+ #CC=cc
+@@ -94,12 +94,12 @@ clean:
+ rm -f *~
+
+ install: tree
+- install -d $(BINDIR)
+- install -d $(MANDIR)
++ install -d $(DESTDIR)$(BINDIR)
++ install -d $(DESTDIR)$(MANDIR)
+ if [ -e $(TREE_DEST) ]; then \
+- install -s $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
++ install -s $(TREE_DEST) $(DESTDIR)$(BINDIR)/$(TREE_DEST); \
+ fi
+- install doc/$(MAN) $(MANDIR)/$(MAN)
++ install doc/$(MAN) $(DESTDIR)$(MANDIR)/$(MAN)
+
+ distclean:
+ if [ -f tree.o ]; then rm *.o; fi
diff --git a/sysutils/tree/patches/patch-aa b/sysutils/tree/patches/patch-aa
deleted file mode 100644
index e732be4ceb7..00000000000
--- a/sysutils/tree/patches/patch-aa
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2009/08/08 05:20:02 tnn Exp $
-
---- tree.c.orig 2007-06-11 22:22:06.000000000 +0900
-+++ tree.c
-@@ -17,7 +17,9 @@
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-+#if defined(__linux__)
- #include <features.h>
-+#endif
- #include <stdlib.h>
- #include <stdio.h>
- #include <time.h>
-@@ -179,10 +181,12 @@ char *sLevel, *curdir, *outfilename = NU
- FILE *outfile;
- int *dirs, maxdirs;
-
--#ifdef CYGWIN
-+#ifndef MB_CUR_MAX
-+# ifdef CYGWIN
- extern int MB_CUR_MAX;
--#else
-+# else
- extern size_t MB_CUR_MAX;
-+# endif
- #endif
-
- int main(int argc, char **argv)
-@@ -619,7 +623,7 @@ void listdir(char *d, int *dt, int *ft,
- if (!noindent) indent();
-
- path[0] = 0;
--#ifdef __USE_FILE_OFFSET64
-+#if defined(__linux__) && defined(__USE_FILE_OFFSET64)
- if (inodeflag) sprintf(path," %7lld",(*dir)->inode);
- #else
- if (inodeflag) sprintf(path," %7ld",(*dir)->inode);
diff --git a/sysutils/tree/patches/patch-ab b/sysutils/tree/patches/patch-ab
deleted file mode 100644
index 61d90fba8b1..00000000000
--- a/sysutils/tree/patches/patch-ab
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD: patch-ab,v 1.4 2009/08/08 05:20:02 tnn Exp $
-
---- Makefile.orig 2007-06-11 22:22:47.000000000 +0900
-+++ Makefile
-@@ -8,7 +8,8 @@
-
- CC=gcc
- #CFLAGS=-ggdb -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
--CFLAGS=-O2 -Wall -fomit-frame-pointer -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-+CDEFS=-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-+CFLAGS=-O2 -Wall -fomit-frame-pointer
- LDFLAGS=-s
-
- # Uncomment for FreeBSD:
-@@ -38,13 +39,18 @@ LDFLAGS=-s
- #CFLAGS=-02 -Wall -fomit-frame-pointer -Zomf -Zsmall-conv
- #LDFLAGS=-s -Zomf -Zsmall-conv
-
--prefix = /usr
-+PREFIX = /NONEXISTENT
-
- VERSION=1.5.1.1
- TREE_DEST=tree
--BINDIR=${prefix}/bin
-+BINDIR=${PREFIX}/bin
- MAN=tree.1
--MANDIR=${prefix}/man/man1
-+MANSUBDIR=man
-+MANDIR=${PREFIX}/${MANSUBDIR}/man1
-+INSTALL_PROGRAM_DIR=install -d
-+INSTALL_PROGRAM=install -s
-+INSTALL_MAN_DIR=install -d
-+INSTALL_MAN=install
-
- all: tree
-
-@@ -52,6 +58,7 @@ tree: tree.o
- $(CC) $(LDFLAGS) -o $(TREE_DEST) tree.o
-
- tree.o: tree.c
-+ $(CC) -c $(CFLAGS) $(CDEFS) -o $@ $<
-
- clean:
- if [ -x $(TREE_DEST) ]; then rm $(TREE_DEST); fi
-@@ -59,12 +66,12 @@ clean:
- rm -f *~
-
- install:
-- install -d $(BINDIR)
-- install -d $(MANDIR)
-+ $(INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
-+ $(INSTALL_MAN_DIR) $(DESTDIR)$(MANDIR)
- if [ -e $(TREE_DEST) ]; then \
-- install -s $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
-+ $(INSTALL_PROGRAM) $(TREE_DEST) $(DESTDIR)$(BINDIR)/$(TREE_DEST); \
- fi
-- install man/$(MAN) $(MANDIR)/$(MAN)
-+ $(INSTALL_MAN) man/$(MAN) $(DESTDIR)$(MANDIR)/$(MAN)
-
- distclean:
- if [ -f tree.o ]; then rm *.o; fi