Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2001 13:43:56 +0000 (GMT)
From:      George Reid <greid@dogma.freebsd-uk.eu.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/24047: New port: pg: An implementation of System V's pg pager.
Message-ID:  <Pine.BSF.4.21.0101031343250.46765-100000@sobek.openirc.co.uk>
Resent-Message-ID: <200101031340.f03De1V66807@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         24047
>Category:       ports
>Synopsis:       New port: pg: An implementation of System V's pg pager.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 03 05:40:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     George Reid
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
FreeBSD UKUG
>Environment:
n/a
>Description:
The pg command originates from System V and is a text file browser,
like more. It lets the user scroll forward and backward even if input
comes from a pipe. This free clone is intended to comply to the SVID 4
and SUSv2 specifications of this utility; it can handle large files as
well as files that contain multibyte characters.

- George Reid
greid@ukug.uk.freebsd.org
>How-To-Repeat:
n/a
>Fix:
# 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:
#
#	pg
#	pg/Makefile
#	pg/distinfo
#	pg/pkg-descr
#	pg/pkg-comment
#	pg/files
#	pg/files/patch-aa
#	pg/files/patch-ab
#	pg/pkg-plist
#
echo c - pg
mkdir -p pg > /dev/null 2>&1
echo x - pg/Makefile
sed 's/^X//' >pg/Makefile << 'END-of-pg/Makefile'
X# New ports collection makefile for:   pg
X# Date created:        3 January 2001
X# Whom:                George Reid <greid@ukug.uk.freebsd.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=       	pg
XPORTVERSION=		010103
XCATEGORIES=     	misc
XMASTER_SITES=   	http://omnibus.ruf.uni-freiburg.de/~gritter/archive/
X
XMAINTAINER=		greid@ukug.uk.freebsd.org
X
XMAKEFILE=		makefile
X
XMAN1=			pg.1
X
X.include <bsd.port.mk>
END-of-pg/Makefile
echo x - pg/distinfo
sed 's/^X//' >pg/distinfo << 'END-of-pg/distinfo'
XMD5 (pg-010103.tar.gz) = 36f495569fd8987f5a85684b7bbe5637
END-of-pg/distinfo
echo x - pg/pkg-descr
sed 's/^X//' >pg/pkg-descr << 'END-of-pg/pkg-descr'
XThe pg command originates from System V and is a text file browser,
Xlike more. It lets the user scroll forward and backward even if input
Xcomes from a pipe. This free clone is intended to comply to the SVID 4
Xand SUSv2 specifications of this utility; it can handle large files as
Xwell as files that contain multibyte characters.
X
X- George Reid
Xgreid@ukug.uk.freebsd.org
END-of-pg/pkg-descr
echo x - pg/pkg-comment
sed 's/^X//' >pg/pkg-comment << 'END-of-pg/pkg-comment'
XAn implementation of System V's pg pager.
END-of-pg/pkg-comment
echo c - pg/files
mkdir -p pg/files > /dev/null 2>&1
echo x - pg/files/patch-aa
sed 's/^X//' >pg/files/patch-aa << 'END-of-pg/files/patch-aa'
X--- makefile.orig	Wed Jan  3 05:06:51 2001
X+++ makefile	Wed Jan  3 13:37:36 2001
X@@ -3,11 +3,10 @@
X # CONFIGURATION
X 
X #WARN	= -Wall -Wno-parentheses -Wno-implicit-int -Wshadow
X-PREFIX	= /usr/local
X BINDIR	= $(PREFIX)/bin
X MANDIR	= $(PREFIX)/man
X MANSECT	= $(MANDIR)/man1
X-INSTALL	= /usr/ucb/install
X+INSTALL	= /usr/bin/install
X # For Linux, enable both of the following flags.
X # For Solaris 8, disable SUSF (other versions untested).
X SUSF	= -D_XOPEN_SOURCE=500L
END-of-pg/files/patch-aa
echo x - pg/files/patch-ab
sed 's/^X//' >pg/files/patch-ab << 'END-of-pg/files/patch-ab'
X--- pg.c.orig	Wed Jan  3 13:29:40 2001
X+++ pg.c	Wed Jan  3 13:34:48 2001
X@@ -59,8 +59,6 @@
X #include <signal.h>
X #include <setjmp.h>
X #include <locale.h>
X-#include <wctype.h>
X-#include <wchar.h>
X #ifndef	sun
X #include <curses.h>
X #include <term.h>
X@@ -786,7 +784,7 @@
X 		if ((wl = xmbstowcs(wbuf, t, sizeof wbuf)) == -1)
X 			return;
X 		while (wl--) {
X-			if (!iswprint(*wp) && *wp != L'\n' && *wp != L'\r'
X+			if (!isprint(*wp) && *wp != L'\n' && *wp != L'\r'
X 					&& *wp != L'\b' && *wp != L'\t')
X 				*wp = L'?';
X 			wp++;
X@@ -988,7 +986,6 @@
X 					 * We got a signal.
X 					 */
X 					canjump = 0;
X-					sigrelse(sig);
X 					fseeko(fbuf, pos, SEEK_SET);
X 					*b = '\0';
X 					dline = pagelen;
X@@ -1086,7 +1083,6 @@
X 				 * We got a signal.
X 				 */
X 				canjump = 0;
X-				sigrelse(sig);
X 				dline = pagelen;
X 			} else {
X 				p = endline(ttycols, b);
X@@ -1386,8 +1382,8 @@
X 					write(STDOUT_FILENO, cmd.cmdline,
X 							strlen(cmd.cmdline));
X 					write(STDOUT_FILENO, "\n", 1);
X-					sigset(SIGINT, SIG_IGN);
X-					sigset(SIGQUIT, SIG_IGN);
X+					signal(SIGINT, SIG_IGN);
X+					signal(SIGQUIT, SIG_IGN);
X 					switch (cpid = fork()) {
X 					case 0:
X 						p = getenv("SHELL");
X@@ -1402,9 +1398,9 @@
X 						} else {
X 							fclose(f);
X 						}
X-						sigset(SIGINT, oldint);
X-						sigset(SIGQUIT, oldquit);
X-						sigset(SIGTERM, oldterm);
X+						signal(SIGINT, oldint);
X+						signal(SIGQUIT, oldquit);
X+						signal(SIGTERM, oldterm);
X 						execl(p, p, "-c",
X 							cmd.cmdline + 1, NULL);
X 						eof = errno;
X@@ -1420,8 +1416,8 @@
X 					default:
X 						while (wait(NULL) != cpid);
X 					}
X-					sigset(SIGINT, sighandler);
X-					sigset(SIGQUIT, sighandler);
X+					signal(SIGINT, sighandler);
X+					signal(SIGQUIT, sighandler);
X 					mesg("!\n");
X 				}
X 				goto newcmd;
X@@ -1504,9 +1500,9 @@
X 	progname = argv[0];
X 	if (tcgetattr(STDOUT_FILENO, &otio) == 0) {
X 		ontty = 1;
X-		oldint = sigset(SIGINT, sighandler);
X-		oldquit = sigset(SIGQUIT, sighandler);
X-		oldterm = sigset(SIGTERM, sighandler);
X+		oldint = signal(SIGINT, sighandler);
X+		oldquit = signal(SIGQUIT, sighandler);
X+		oldterm = signal(SIGTERM, sighandler);
X 		setlocale(LC_CTYPE, "");
X 		setlocale(LC_COLLATE, "");
X 		tty = ttyname(STDOUT_FILENO);
END-of-pg/files/patch-ab
echo x - pg/pkg-plist
sed 's/^X//' >pg/pkg-plist << 'END-of-pg/pkg-plist'
Xbin/pg
END-of-pg/pkg-plist
exit



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101031343250.46765-100000>