ports/81892: [new port] misc/gnu-watch
Emanuel Haupt
ehaupt at critical.ch
Sat Jun 4 11:30:02 UTC 2005
>Number: 81892
>Category: ports
>Synopsis: [new port] misc/gnu-watch
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 04 11:30:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Emanuel Haupt
>Release: FreeBSD 5.4-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD beaver.critical.ch 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #1: Fri May 13 17:48:58 CEST 2005 root at beaver.critical.ch:/usr/obj/usr/src-release/src/sys/BEAVER i386
>Description:
[new port] misc/gnu-watch
GNU watch runs command repeatedly, displaying its output (the first
screenfull). This allows you to watch the program output change over
time.
>How-To-Repeat:
>Fix:
--- gnu-watch.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# gnu-watch
# gnu-watch/Makefile
# gnu-watch/pkg-descr
# gnu-watch/distinfo
# gnu-watch/files
# gnu-watch/files/patch-gnu-watch.1
# gnu-watch/files/watch.c.patch
#
echo c - gnu-watch
mkdir -p gnu-watch > /dev/null 2>&1
echo x - gnu-watch/Makefile
sed 's/^X//' >gnu-watch/Makefile << 'END-of-gnu-watch/Makefile'
X# New ports collection makefile for: gnu-watch
X# Date created: 3 June 2005
X# Whom: Emanuel Haupt <ehaupt at critical.ch>
X#
X# $FreeBSD$
X#
X
XPORTNAME= watch
XDISTVERSION= 3.2.5
XCATEGORIES= misc
XMASTER_SITES= http://procps.sourceforge.net/
XPKGNAMEPREFIX= gnu-
XDISTNAME= procps-${DISTVERSION}
X
XMAINTAINER= ehaupt at critical.ch
XCOMMENT= GNU watch command
X
XUSE_GETOPT_LONG=yes
XUSE_GCC= 3.4+
X
XMAN1= gnu-watch.1
X
XPLIST_FILES= bin/${UNIQUENAME}
X
XCFLAGS+= -fno-common -ffast-math -D_GNU_SOURCE -O2
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500000
Xpost-patch:
X @${PATCH} -s ${WRKSRC}/watch.c ${FILESDIR}/watch.c.patch
X.endif
X
Xdo-build:
X ${CC} ${CFLAGS} ${LDFLAGS} -s -c ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${UNIQUENAME}.o
X ${CC} ${CFLAGS} ${LDFLAGS} -s -lncurses ${WRKSRC}/${UNIQUENAME}.o -o ${WRKSRC}/${UNIQUENAME}
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/${UNIQUENAME} ${PREFIX}/bin
X ${INSTALL_MAN} ${WRKSRC}/watch.1 ${MANPREFIX}/man/man1/gnu-watch.1
X
X.include <bsd.port.post.mk>
END-of-gnu-watch/Makefile
echo x - gnu-watch/pkg-descr
sed 's/^X//' >gnu-watch/pkg-descr << 'END-of-gnu-watch/pkg-descr'
XGNU watch runs command repeatedly, displaying its output (the first
Xscreenfull). This allows you to watch the program output change over
Xtime.
X
XWWW: http://procps.sourceforge.net/
X
X- ehaupt
Xehaupt at critical.ch
END-of-gnu-watch/pkg-descr
echo x - gnu-watch/distinfo
sed 's/^X//' >gnu-watch/distinfo << 'END-of-gnu-watch/distinfo'
XMD5 (procps-3.2.5.tar.gz) = cde0e3612d1d7c68f404d46f01c44fb4
XSIZE (procps-3.2.5.tar.gz) = 277365
END-of-gnu-watch/distinfo
echo c - gnu-watch/files
mkdir -p gnu-watch/files > /dev/null 2>&1
echo x - gnu-watch/files/patch-gnu-watch.1
sed 's/^X//' >gnu-watch/files/patch-gnu-watch.1 << 'END-of-gnu-watch/files/patch-gnu-watch.1'
X--- watch.1.orig Sun Feb 9 08:05:25 2003
X+++ watch.1 Fri Jun 3 23:44:46 2005
X@@ -1,11 +1,11 @@
X .TH WATCH 1 "1999 Apr 3" " " "Linux User's Manual"
X .SH NAME
X-watch \- execute a program periodically, showing output fullscreen
X+gnu-watch \- execute a program periodically, showing output fullscreen
X .SH SYNOPSIS
X-.B watch
X+.B gnu-watch
X .I [\-dhvt] [\-n <seconds>] [\-\-differences[=cumulative]] [\-\-help] [\-\-interval=<seconds>] [\-\-no\-title] [\-\-version] <command>
X .SH DESCRIPTION
X-.BR watch
X+.BR gnu-watch
X runs
X .I command
X repeatedly, displaying its output (the first screenfull). This allows you to
X@@ -30,7 +30,7 @@
X option turns off the header showing the interval, command, and current
X time at the top of the display, as well as the following blank line.
X .PP
X-.BR watch
X+.BR gnu-watch
X will run until interrupted.
X .SH NOTE
X Note that
X@@ -42,33 +42,33 @@
X the first non-option argument). This means that flags after
X .I command
X don't get interpreted by
X-.BR watch
X+.BR gnu-watch
X itself.
X .SH EXAMPLES
X .PP
X To watch for mail, you might do
X .IP
X-watch \-n 60 from
X+gnu-watch \-n 60 from
X .PP
X To watch the contents of a directory change, you could use
X .IP
X-watch \-d ls \-l
X+gnu-watch \-d ls \-l
X .PP
X If you're only interested in files owned by user joe, you might use
X .IP
X-watch \-d 'ls \-l | fgrep joe'
X+gnu-watch \-d 'ls \-l | fgrep joe'
X .PP
X To see the effects of quoting, try these out
X .IP
X-watch echo $$
X+gnu-watch echo $$
X .IP
X-watch echo '$$'
X+gnu-watch echo '$$'
X .IP
X-watch echo "'"'$$'"'"
X+gnu-watch echo "'"'$$'"'"
X .PP
X You can watch for your administrator to install the latest kernel with
X .IP
X-watch uname -r
X+gnu-watch uname -r
X .PP
X (Just kidding.)
X .SH BUGS
X@@ -84,4 +84,5 @@
X .B watch
X was written by Tony Rems <rembo at unisoft.com> in 1991, with mods and
X corrections by Francois Pinard. It was reworked and new features added by
X-Mike Coleman <mkc at acm.org> in 1999.
X+Mike Coleman <mkc at acm.org> in 1999. In 2005 it was modified for FreeBSD by
X+Emanuel Haupt <ehaupt at critical.ch>.
END-of-gnu-watch/files/patch-gnu-watch.1
echo x - gnu-watch/files/watch.c.patch
sed 's/^X//' >gnu-watch/files/watch.c.patch << 'END-of-gnu-watch/files/watch.c.patch'
X--- watch.c.orig Sat Jun 4 02:34:34 2005
X+++ watch.c Sat Jun 4 02:34:38 2005
X@@ -147,6 +147,13 @@
X setlocale(LC_ALL, "");
X progname = argv[0];
X
X+ float
X+ strtof(const char * restrict nptr, char ** restrict endptr)
X+ {
X+
X+ return ((float)strtod(nptr, endptr));
X+ }
X+
X while ((optc = getopt_long(argc, argv, "+d::hn:vt", longopts, (int *) 0))
X != EOF) {
X switch (optc) {
END-of-gnu-watch/files/watch.c.patch
exit
--- gnu-watch.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list