aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/du2ps/Makefile31
-rw-r--r--sysutils/du2ps/distinfo1
-rw-r--r--sysutils/du2ps/files/du2ps.1108
-rw-r--r--sysutils/du2ps/files/patch-aa11
-rw-r--r--sysutils/du2ps/files/patch-ab21
-rw-r--r--sysutils/du2ps/files/patch-ac12
-rw-r--r--sysutils/du2ps/pkg-comment1
-rw-r--r--sysutils/du2ps/pkg-descr16
-rw-r--r--sysutils/du2ps/pkg-plist1
10 files changed, 203 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 3f1ebf3ff099..251242b10375 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -38,6 +38,7 @@
SUBDIR += dirdiff
SUBDIR += diskusage
SUBDIR += doconfig
+ SUBDIR += du2ps
SUBDIR += dvdtape
SUBDIR += eject
SUBDIR += extipl
diff --git a/sysutils/du2ps/Makefile b/sysutils/du2ps/Makefile
new file mode 100644
index 000000000000..bff369baa828
--- /dev/null
+++ b/sysutils/du2ps/Makefile
@@ -0,0 +1,31 @@
+# New ports collection makefile for: du2ps
+# Date created: 31 May 2001
+# Whom: Yoshihiko Sarumaru <mistral@imasy.or.jp>
+#
+# $FreeBSD$
+#
+
+PORTNAME= du2ps
+PORTVERSION= 2.1
+CATEGORIES= sysutils
+MASTER_SITES= http://www.shobi-u.ac.jp/~tnagae/src/ps-c/du2ps/du2ps-2.1/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= mistral@imasy.or.jp
+
+# Nkf is required for just converting character code of japanese manual
+BUILD_DEPENDS= nkf:${PORTSDIR}/japanese/nkf
+
+MAKEFILE= makefile
+ALL_TARGET=
+
+MAN1= du2ps.1
+MANLANG= "" ja
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/du2ps ${PREFIX}/bin/du2ps
+ ${INSTALL_MAN} ${FILESDIR}/du2ps.1 ${PREFIX}/man/man1/du2ps.1
+ nkf -e ${WRKSRC}/du2ps.man > ${WRKDIR}/du2ps.1.ja
+ ${INSTALL_MAN} ${WRKDIR}/du2ps.1.ja ${PREFIX}/man/ja/man1/du2ps.1
+
+.include <bsd.port.mk>
diff --git a/sysutils/du2ps/distinfo b/sysutils/du2ps/distinfo
new file mode 100644
index 000000000000..00eab78daa03
--- /dev/null
+++ b/sysutils/du2ps/distinfo
@@ -0,0 +1 @@
+MD5 (du2ps-2.1.tgz) = f39e4724cb1a8831f0355fbeb8d819a6
diff --git a/sysutils/du2ps/files/du2ps.1 b/sysutils/du2ps/files/du2ps.1
new file mode 100644
index 000000000000..35832ac751e4
--- /dev/null
+++ b/sysutils/du2ps/files/du2ps.1
@@ -0,0 +1,108 @@
+.\"
+.\" Copyleft by nagae@an.ip.titech.ac.jp and mac@research.co.jp
+.\" du2ps.man
+.TH du2ps 1 "Mar 2, 1994"
+.SH NAME
+du2ps \- filter for converting output of du to PostScript file
+.SH SYNOPSIS
+.B du2ps
+[
+.I options
+]
+<
+.I du_out_file
+>
+.I ps_file
+.SH DESCRIPTION
+The
+.B du2ps
+reads output of
+.BR du (1),
+then generate a figure of hierarchical structure and utilization of
+directory as one page PostScript file.
+.PP
+Each directory is illustrated as rectangle in utilization order with
+height corresponding to its utilization, and sub directories are placed
+branched from left to right recursively.
+.SH OPTIONS
+.TP
+.B \-land
+Layout in landscape.
+Default is in portrait.
+.TP
+.B \-sa
+Place directories in alphabetical order.
+Default is in utilization order.
+.TP
+.B \-b4
+.TP
+.B \-b5
+.TP
+.B \-us
+Switch page size to B4, B5, or US letter. Default is A4.
+.TP
+.BI \-ff " name"
+Specify font name for text. Default is Times-Roman.
+.TP
+.BI \-fs " size"
+Specify font size. Default is 8.0 [pt].
+.TP
+.BI \-ms " size"
+Specify margin around page. Default is 50.0 [pt].
+.TP
+.BI \-lw " size"
+Line width for drawing rectangle area. Default is 0.5 [pt].
+.TP
+.BI \-ncols " num"
+Specify number of rectangle columns (maximum directory depth).
+Default is 7 for portrait and 10 for landscape.
+.TP
+.BI \-eps " width height"
+Output in EPS format.
+.I Width
+and
+.I height
+are the width and height of BoundingBox.
+.SH EXAMPLES
+.B " du | du2ps | lpr
+.IP
+The most left directory name becomes ``.'', and ``The number of disk
+blocks used at .'' will be displayed at the upper left corner.
+.
+.B " du /home/taro/work | du2ps | lpr
+.PP
+.B " du ~taro/work | du2ps | lpr
+.IP
+The most left directory name becomes ``work'', and
+``The number of disk blocks used at /home/taro/work''
+will be displayed at the upper left corner.
+.PP
+.B " du ../../ps | du2ps -us -fs 16 > tmp.ps; gs tmp.ps
+.IP
+The most left directory name becomes ``ps'', and
+``The number of disk blocks used at ../../ps''
+will be displayed at the upper left corner.
+The ``-us'' option makes entire page to fit paper, because default size of
+GhostScript is US letter.
+.PP
+.B " du ~taro/work ~taro/bin | du2ps -eps 200 300 > fig1.eps
+.IP
+The most left directory name becomes ``taro'', and
+``The number of disk blocks used at /home/taro''
+will be display at the upper left corner.
+Output will be commented with ``%%BoundingBox: 0 0 200 300''.
+.PP
+.B " du work bin | du2ps -eps 100 100 -fs 4 > fig2.eps
+.IP
+The most left directory name becomes ``..'', and
+``The number of disk blocks used at''
+will be display at the upper left corner.
+.SH SEE ALSO
+.BR du (1),
+.BR xdu (1)
+.SH AUTHORS
+Takanori Nagae <nagae@an.ip.titech.ac.jp> and
+Shigeru Makino <mac@research.co.jp>
+.PP
+The du2ps is based on xdu.
+The author of xdu is Phillip C. Dykstra <phil@BRL.MIL>.
diff --git a/sysutils/du2ps/files/patch-aa b/sysutils/du2ps/files/patch-aa
new file mode 100644
index 000000000000..d74af3d7e2e4
--- /dev/null
+++ b/sysutils/du2ps/files/patch-aa
@@ -0,0 +1,11 @@
+--- du2ps.h.orig Tue Mar 15 18:17:00 1994
++++ du2ps.h Fri Jun 1 15:39:04 2001
+@@ -51,6 +51,8 @@
+ #define FONT_FAMILY "Times-Roman"
+ #define LINE_WIDTH 0.5
+ #define HEAD_SEP 5.0
++#define A3_WIDTH 841.889764
++#define A3_HEIGHT 1190.55118
+ #define A4_WIDTH 595.275591
+ #define A4_HEIGHT 841.889764
+ #define B4_WIDTH 728.503937
diff --git a/sysutils/du2ps/files/patch-ab b/sysutils/du2ps/files/patch-ab
new file mode 100644
index 000000000000..7e8944605476
--- /dev/null
+++ b/sysutils/du2ps/files/patch-ab
@@ -0,0 +1,21 @@
+--- getopt.c.orig Wed Mar 16 11:41:27 1994
++++ getopt.c Fri Jun 1 15:40:02 2001
+@@ -22,6 +22,7 @@
+ "du2ps [options] < infile > outfile",
+ "OPTIONS:",
+ " -land ... landscape",
++ " -a3 ... A3",
+ " -b4 ... B4",
+ " -b5 ... B5",
+ " -us ... US letter",
+@@ -62,6 +63,10 @@
+ i++;
+ } else if(!strcmp("-sa", argv[i])){
+ cmp = cmp_alph;
++ i++;
++ } else if(!strcmp("-a3", argv[i])){
++ paper_width = A3_WIDTH;
++ paper_height = A3_HEIGHT;
+ i++;
+ } else if(!strcmp("-b4", argv[i])){
+ paper_width = B4_WIDTH;
diff --git a/sysutils/du2ps/files/patch-ac b/sysutils/du2ps/files/patch-ac
new file mode 100644
index 000000000000..7b7471ab2312
--- /dev/null
+++ b/sysutils/du2ps/files/patch-ac
@@ -0,0 +1,12 @@
+--- nodeop.c.orig Tue Mar 15 18:15:58 1994
++++ nodeop.c Wed Jun 6 15:03:28 2001
+@@ -142,7 +142,8 @@
+
+ /* for each child */
+ for(np = nodep->child; NODE_NULL != np; np = np->peer){
+- double height = h * np->size / nodep->size;
++ /* When nodep->size is 0, 'divided by zero' will be raised */
++ double height = (nodep->size != 0 ? h * np->size / nodep->size : 0);
+
+ drawrect(np, y, height, depth);
+
diff --git a/sysutils/du2ps/pkg-comment b/sysutils/du2ps/pkg-comment
new file mode 100644
index 000000000000..8ee48457ff35
--- /dev/null
+++ b/sysutils/du2ps/pkg-comment
@@ -0,0 +1 @@
+Filter for converting output of du to PostScript file
diff --git a/sysutils/du2ps/pkg-descr b/sysutils/du2ps/pkg-descr
new file mode 100644
index 000000000000..b1e540e7c214
--- /dev/null
+++ b/sysutils/du2ps/pkg-descr
@@ -0,0 +1,16 @@
+The du2ps reads output of du(1), then generates a figure of
+hierarchical structure and utilization of each directory.
+
+The du2ps is a similar program to xdu, but it produces result as
+a PostScript file.
+
+The default paper is ISO A4, but you can select Letter or ISO A3/B4/B5.
+You can also specify font name, font size, number of columns and other
+options.
+
+Author: Takanori Nagae <nagae@an.ip.titech.ac.jp> and
+ Shigeru Makino <mac@research.co.jp>
+WWW: http://www.shobi-u.ac.jp/~tnagae/
+
+-
+Yoshihiko Sarumaru <mistral@imasy.or.jp>
diff --git a/sysutils/du2ps/pkg-plist b/sysutils/du2ps/pkg-plist
new file mode 100644
index 000000000000..fcc1731f7ab1
--- /dev/null
+++ b/sysutils/du2ps/pkg-plist
@@ -0,0 +1 @@
+bin/du2ps