aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--misc/Makefile1
-rw-r--r--misc/gnu-watch/Makefile42
-rw-r--r--misc/gnu-watch/distinfo2
-rw-r--r--misc/gnu-watch/files/patch-gnu-watch.175
-rw-r--r--misc/gnu-watch/files/watch.c.patch16
-rw-r--r--misc/gnu-watch/pkg-descr8
6 files changed, 144 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index fdcf7f263f7..00f7ea40c54 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -125,6 +125,7 @@
SUBDIR += gnomemimedata
SUBDIR += gnomesword
SUBDIR += gnomeuserdocs2
+ SUBDIR += gnu-watch
SUBDIR += gnuls
SUBDIR += gnustep-examples
SUBDIR += goblin
diff --git a/misc/gnu-watch/Makefile b/misc/gnu-watch/Makefile
new file mode 100644
index 00000000000..c84c2513746
--- /dev/null
+++ b/misc/gnu-watch/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: gnu-watch
+# Date created: 3 June 2005
+# Whom: Emanuel Haupt <ehaupt@critical.ch>
+#
+# $FreeBSD$
+#
+
+PORTNAME= watch
+DISTVERSION= 3.2.5
+CATEGORIES= misc
+MASTER_SITES= http://procps.sourceforge.net/
+PKGNAMEPREFIX= gnu-
+DISTNAME= procps-${DISTVERSION}
+
+MAINTAINER= ehaupt@critical.ch
+COMMENT= GNU watch command
+
+USE_GETOPT_LONG=yes
+USE_GCC= 3.4+
+
+MAN1= gnu-watch.1
+
+PLIST_FILES= bin/${UNIQUENAME}
+
+CFLAGS+= -fno-common -ffast-math -D_GNU_SOURCE -O2
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+post-patch:
+ @${PATCH} -s ${WRKSRC}/watch.c ${FILESDIR}/watch.c.patch
+.endif
+
+do-build:
+ ${CC} ${CFLAGS} ${LDFLAGS} -s -c ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${UNIQUENAME}.o
+ ${CC} ${CFLAGS} ${LDFLAGS} -s -lncurses ${WRKSRC}/${UNIQUENAME}.o -o ${WRKSRC}/${UNIQUENAME}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${UNIQUENAME} ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/watch.1 ${MANPREFIX}/man/man1/gnu-watch.1
+
+.include <bsd.port.post.mk>
diff --git a/misc/gnu-watch/distinfo b/misc/gnu-watch/distinfo
new file mode 100644
index 00000000000..1edc2fc41f3
--- /dev/null
+++ b/misc/gnu-watch/distinfo
@@ -0,0 +1,2 @@
+MD5 (procps-3.2.5.tar.gz) = cde0e3612d1d7c68f404d46f01c44fb4
+SIZE (procps-3.2.5.tar.gz) = 277365
diff --git a/misc/gnu-watch/files/patch-gnu-watch.1 b/misc/gnu-watch/files/patch-gnu-watch.1
new file mode 100644
index 00000000000..3e0f58ee788
--- /dev/null
+++ b/misc/gnu-watch/files/patch-gnu-watch.1
@@ -0,0 +1,75 @@
+--- watch.1.orig Sun Feb 9 08:05:25 2003
++++ watch.1 Fri Jun 3 23:44:46 2005
+@@ -1,11 +1,11 @@
+ .TH WATCH 1 "1999 Apr 3" " " "Linux User's Manual"
+ .SH NAME
+-watch \- execute a program periodically, showing output fullscreen
++gnu-watch \- execute a program periodically, showing output fullscreen
+ .SH SYNOPSIS
+-.B watch
++.B gnu-watch
+ .I [\-dhvt] [\-n <seconds>] [\-\-differences[=cumulative]] [\-\-help] [\-\-interval=<seconds>] [\-\-no\-title] [\-\-version] <command>
+ .SH DESCRIPTION
+-.BR watch
++.BR gnu-watch
+ runs
+ .I command
+ repeatedly, displaying its output (the first screenfull). This allows you to
+@@ -30,7 +30,7 @@
+ option turns off the header showing the interval, command, and current
+ time at the top of the display, as well as the following blank line.
+ .PP
+-.BR watch
++.BR gnu-watch
+ will run until interrupted.
+ .SH NOTE
+ Note that
+@@ -42,33 +42,33 @@
+ the first non-option argument). This means that flags after
+ .I command
+ don't get interpreted by
+-.BR watch
++.BR gnu-watch
+ itself.
+ .SH EXAMPLES
+ .PP
+ To watch for mail, you might do
+ .IP
+-watch \-n 60 from
++gnu-watch \-n 60 from
+ .PP
+ To watch the contents of a directory change, you could use
+ .IP
+-watch \-d ls \-l
++gnu-watch \-d ls \-l
+ .PP
+ If you're only interested in files owned by user joe, you might use
+ .IP
+-watch \-d 'ls \-l | fgrep joe'
++gnu-watch \-d 'ls \-l | fgrep joe'
+ .PP
+ To see the effects of quoting, try these out
+ .IP
+-watch echo $$
++gnu-watch echo $$
+ .IP
+-watch echo '$$'
++gnu-watch echo '$$'
+ .IP
+-watch echo "'"'$$'"'"
++gnu-watch echo "'"'$$'"'"
+ .PP
+ You can watch for your administrator to install the latest kernel with
+ .IP
+-watch uname -r
++gnu-watch uname -r
+ .PP
+ (Just kidding.)
+ .SH BUGS
+@@ -84,4 +84,5 @@
+ .B watch
+ was written by Tony Rems <rembo@unisoft.com> in 1991, with mods and
+ corrections by Francois Pinard. It was reworked and new features added by
+-Mike Coleman <mkc@acm.org> in 1999.
++Mike Coleman <mkc@acm.org> in 1999. In 2005 it was modified for FreeBSD by
++Emanuel Haupt <ehaupt@critical.ch>.
diff --git a/misc/gnu-watch/files/watch.c.patch b/misc/gnu-watch/files/watch.c.patch
new file mode 100644
index 00000000000..de8c97abfa4
--- /dev/null
+++ b/misc/gnu-watch/files/watch.c.patch
@@ -0,0 +1,16 @@
+--- watch.c.orig Sat Jun 4 02:34:34 2005
++++ watch.c Sat Jun 4 02:34:38 2005
+@@ -147,6 +147,13 @@
+ setlocale(LC_ALL, "");
+ progname = argv[0];
+
++ float
++ strtof(const char * restrict nptr, char ** restrict endptr)
++ {
++
++ return ((float)strtod(nptr, endptr));
++ }
++
+ while ((optc = getopt_long(argc, argv, "+d::hn:vt", longopts, (int *) 0))
+ != EOF) {
+ switch (optc) {
diff --git a/misc/gnu-watch/pkg-descr b/misc/gnu-watch/pkg-descr
new file mode 100644
index 00000000000..42fa63444e1
--- /dev/null
+++ b/misc/gnu-watch/pkg-descr
@@ -0,0 +1,8 @@
+GNU watch runs a command repeatedly, displaying its output (the first
+screenfull). This allows you to watch the program output change over
+time.
+
+WWW: http://procps.sourceforge.net/
+
+- ehaupt
+ehaupt@critical.ch