Import gnuwatch 3.2.6

GNU watch runs a command repeatedly, displaying its output (the first
screenfull). This allows one to watch the program output change over time.

From Jasper Lievisse Adriaanse <jasper@nedbsd.nl>
This commit is contained in:
alek 2006-01-28 11:04:08 +00:00
parent 0517dbdb50
commit 25761ce767
6 changed files with 136 additions and 0 deletions

32
misc/gnuwatch/Makefile Normal file
View File

@ -0,0 +1,32 @@
# $OpenBSD: Makefile,v 1.1.1.1 2006/01/28 11:04:08 alek Exp $
COMMENT= "GNU watch command"
DISTNAME= procps-3.2.6
PKGNAME= ${DISTNAME:S/procps/gnuwatch/}
CATEGORIES= misc
MAINTAINER= Jasper Lievisse Adriaanse <jasper@nedbsd.nl>
HOMEPAGE= http://procps.sourceforge.net/
# GPL/LGPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= ncurses c
MASTER_SITES= ${HOMEPAGE}
NO_REGRESS= Yes
do-build:
${CC} ${CFLAGS} -c ${WRKSRC}/watch.c -o ${WRKSRC}/watch.o
${CC} ${CFLAGS} ${LDFLAGS} -lncurses ${WRKSRC}/watch.o -o ${WRKSRC}/gnuwatch
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gnuwatch ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/watch.1 ${PREFIX}/man/man1/gnuwatch.1
.include <bsd.port.mk>

4
misc/gnuwatch/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (procps-3.2.6.tar.gz) = 7ce39ea27d7b3da0e8ad74dd41d06783
RMD160 (procps-3.2.6.tar.gz) = f0b09701ce48d9f6db1cbb209b02ba026ee58d09
SHA1 (procps-3.2.6.tar.gz) = 91f44180eb50a94eb945c2598c0e849879e65893
SIZE (procps-3.2.6.tar.gz) = 279084

View File

@ -0,0 +1,78 @@
$OpenBSD: patch-watch_1,v 1.1.1.1 2006/01/28 11:04:08 alek Exp $
--- watch.1.orig Sun Feb 9 08:05:25 2003
+++ watch.1 Sun Jan 1 13:28:37 2006
@@ -1,11 +1,11 @@
-.TH WATCH 1 "1999 Apr 3" " " "Linux User's Manual"
+.TH GNUWATCH 1 "1999 Apr 3" " " "Linux User's Manual"
.SH NAME
-watch \- execute a program periodically, showing output fullscreen
+gnuwatch \- execute a program periodically, showing output fullscreen
.SH SYNOPSIS
-.B watch
+.B gnuwatch
.I [\-dhvt] [\-n <seconds>] [\-\-differences[=cumulative]] [\-\-help] [\-\-interval=<seconds>] [\-\-no\-title] [\-\-version] <command>
.SH DESCRIPTION
-.BR watch
+.BR gnuwatch
runs
.I command
repeatedly, displaying its output (the first screenfull). This allows you to
@@ -30,7 +30,7 @@ or
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 gnuwatch
will run until interrupted.
.SH NOTE
Note that
@@ -42,33 +42,33 @@ Note that POSIX option processing is use
the first non-option argument). This means that flags after
.I command
don't get interpreted by
-.BR watch
+.BR gnuwatch
itself.
.SH EXAMPLES
.PP
To watch for mail, you might do
.IP
-watch \-n 60 from
+gnuwatch \-n 60 from
.PP
To watch the contents of a directory change, you could use
.IP
-watch \-d ls \-l
+gnuwatch \-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'
+gnuwatch \-d 'ls \-l | fgrep joe'
.PP
To see the effects of quoting, try these out
.IP
-watch echo $$
+gnuwatch echo $$
.IP
-watch echo '$$'
+gnuwatch echo '$$'
.IP
-watch echo "'"'$$'"'"
+gnuwatch echo "'"'$$'"'"
.PP
You can watch for your administrator to install the latest kernel with
.IP
-watch uname -r
+gnuwatch uname -r
.PP
(Just kidding.)
.SH BUGS
@@ -84,4 +84,6 @@ The original
.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> and renamed gnuwatch by
+Jasper Lievisse Adriaanse <jasper@nedbsd.nl> for OpenBSD.

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-watch_c,v 1.1.1.1 2006/01/28 11:04:08 alek Exp $
--- watch.c.orig Sun Oct 30 01:44:53 2005
+++ watch.c Sun Jan 1 13:28:37 2006
@@ -148,6 +148,13 @@ main(int argc, char *argv[])
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) {

2
misc/gnuwatch/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
GNU watch runs a command repeatedly, displaying its output (the first
screenfull). This allows one to watch the program output change over time.

3
misc/gnuwatch/pkg/PLIST Normal file
View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/01/28 11:04:08 alek Exp $
bin/gnuwatch
@man man/man1/gnuwatch.1