Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 1999 00:28:05 +0200
From:      Christian Weisgerber <naddy@mips.rhein-neckar.de>
To:        freebsd-ports@freebsd.org
Subject:   Re: ports/10233, ports/10573
Message-ID:  <19990406002805.J172@mips.rhein-neckar.de>

next in thread | raw e-mail | index | archive | help
I have unified the misc/buffer ports previously suggested by Joao Carlos
Mendes Luis and myself. This should close PRs #10233 and #10573.

----------------
# 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:
#
#	buffer
#	buffer/files
#	buffer/files/md5
#	buffer/patches
#	buffer/patches/patch-aa
#	buffer/patches/patch-ab
#	buffer/patches/patch-ac
#	buffer/pkg
#	buffer/pkg/COMMENT
#	buffer/pkg/DESCR
#	buffer/pkg/PLIST
#	buffer/Makefile
#
echo c - buffer
mkdir -p buffer > /dev/null 2>&1
echo c - buffer/files
mkdir -p buffer/files > /dev/null 2>&1
echo x - buffer/files/md5
sed 's/^X//' >buffer/files/md5 << 'END-of-buffer/files/md5'
XMD5 (buffer-1.17.tar.gz) = 6c5236ed99f4df0832623f4c0498c681
END-of-buffer/files/md5
echo c - buffer/patches
mkdir -p buffer/patches > /dev/null 2>&1
echo x - buffer/patches/patch-aa
sed 's/^X//' >buffer/patches/patch-aa << 'END-of-buffer/patches/patch-aa'
X--- Makefile.orig	Wed Jul 14 17:59:17 1993
X+++ Makefile	Thu Mar 11 23:01:56 1999
X@@ -4,13 +4,13 @@
X #   You should also add -DSYS5 for Ultrix, AIX, and Solarix.
X # Add -DDEF_SHMEM=n if you can only have n bytes of shared memory
X #   (eg: -DDEF_SHMEM=524288 if you can only have half a meg.)
X-CFLAGS=
X+CFLAGS+=
X 
X # Where to install buffer and its manual pages
X-INSTBIN=/usr/local/bin
X-INSTMAN=/usr/man/manl
X+INSTBIN=${PREFIX}/bin
X+INSTMAN=${PREFIX}/man/man1
X # The manual page section (normally l or 1)
X-S=l
X+S=1
X 
X RM=/bin/rm
X ALL=README buffer.man Makefile buffer.c sem.c COPYING
X@@ -18,18 +18,14 @@
X all: buffer
X 
X buffer: buffer.o sem.o
X-	$(CC) -o buffer $(CFLAGS) buffer.o sem.o
X+	$(CC) -o buffer buffer.o sem.o
X 
X clean:
X 	$(RM) -f *.o core buffer .merrs
X 
X install: buffer
X-	rm -f $(INSTBIN)/buffer
X-	cp buffer $(INSTBIN)/buffer
X-	chmod 111 $(INSTBIN)/buffer
X-	rm -f $(INSTMAN)/buffer.$S
X-	cp buffer.man $(INSTMAN)/buffer.$S
X-	chmod 444 $(INSTMAN)/buffer.$S
X+	${BSD_INSTALL_PROGRAM} buffer $(INSTBIN)/buffer
X+	${BSD_INSTALL_MAN} buffer.man $(INSTMAN)/buffer.$S
X 
X buffer.tar: $(ALL)
X 	$(RM) -f buffer.tar
END-of-buffer/patches/patch-aa
echo x - buffer/patches/patch-ab
sed 's/^X//' >buffer/patches/patch-ab << 'END-of-buffer/patches/patch-ab'
X--- buffer.c.orig	Wed Jul 14 17:59:17 1993
X+++ buffer.c	Thu Mar 11 02:55:42 1999
X@@ -384,6 +384,7 @@
X }
X 
X /* The interrupt handler */
X+void
X shutdown()
X {
X 	static int shutting;
X@@ -400,6 +401,7 @@
X }
X 
X /* Shutdown because the child has ended */
X+void
X child_shutdown()
X {
X 	/* Find out which child has died.  (They may not be my
END-of-buffer/patches/patch-ab
echo x - buffer/patches/patch-ac
sed 's/^X//' >buffer/patches/patch-ac << 'END-of-buffer/patches/patch-ac'
X--- buffer.man.orig	Wed Jul 14 17:59:16 1993
X+++ buffer.man	Thu Mar 11 03:36:46 1999
X@@ -37,7 +37,7 @@
X Use the given file as the output file.  The default is stdout.
X .TP
X .B \-S size
X-After every chunk this size has been writen print out how much been writen so far.
X+After every chunk this size has been written, print out how much been written so far.
X By default this is not set.
X .TP
X .B \-s size
X@@ -71,9 +71,9 @@
X throughput on some drives.)
X .TP
X .B \-B
X-Force each block writen to be padded out to the blocksize.  This is needed by some tape
X+Force each block written to be padded out to the blocksize.  This is needed by some tape
X and cartridge drives.  Defaults to unpadded.  This only affects the
X-last block writen.
X+last block written.
X .TP
X .B \-t
X On exiting print to stderr a brief message showing the total number of
X@@ -82,7 +82,7 @@
X .B \-Z
X If reading/writing directly to a character device (like a tape drive)
X then after each gigabyte perform an lseek to the start of the file.
X-Use this flag with extreme care.  If can only be used on devices where
X+Use this flag with extreme care.  It can only be used on devices where
X an lseek does not rewind the tape but does reset the kernels position
X flags.  It is used to allow more than 2 gigabytes to be written.
X .PP
END-of-buffer/patches/patch-ac
echo c - buffer/pkg
mkdir -p buffer/pkg > /dev/null 2>&1
echo x - buffer/pkg/COMMENT
sed 's/^X//' >buffer/pkg/COMMENT << 'END-of-buffer/pkg/COMMENT'
XBuffer sporadic I/O for faster tape and pipe throughput.
END-of-buffer/pkg/COMMENT
echo x - buffer/pkg/DESCR
sed 's/^X//' >buffer/pkg/DESCR << 'END-of-buffer/pkg/DESCR'
XThis is a program designed initially to speed up writing tapes on remote
Xtape drives, but may be used as a general pipe buffering utility.
X
XNote: You *must* have a kernel with
X  options SYSVSHM
Xcompiled in.
X
XThe program splits itself into two processes.  The first process reads
X(and reblocks) from stdin into a shared memory buffer.  The second
Xwrites from the shared memory buffer to stdout.  Doing it this way
Xmeans that the writing side effectly sits in a tight write loop and
Xdoesn't have to wait for input.  Similarly for the input side.  It is
Xthis waiting that slows down other reblocking processes, like dd.
END-of-buffer/pkg/DESCR
echo x - buffer/pkg/PLIST
sed 's/^X//' >buffer/pkg/PLIST << 'END-of-buffer/pkg/PLIST'
Xbin/buffer
END-of-buffer/pkg/PLIST
echo x - buffer/Makefile
sed 's/^X//' >buffer/Makefile << 'END-of-buffer/Makefile'
X# New ports collection makefile for:	buffer
X# Version required:     1.17
X# Date created:         17 Nov 1995
X# Whom:                 markm
X#
X# $Id$
X#
X
XDISTNAME=       buffer-1.17
XCATEGORIES=	misc
XMASTER_SITES=	ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/ \
X		ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/
X
XMAINTAINER=	naddy@mips.rhein-neckar.de
X
XNO_WRKSUBDIR=	yes
XMAN1=		buffer.1
X
X.include <bsd.port.mk>
END-of-buffer/Makefile
exit

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
  See another pointless homepage at <URL:http://home.pages.de/~naddy/>.


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?19990406002805.J172>