Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Nov 2000 18:07:34 +0000
From:      lebel@frodo.lebel.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/22583: New port: qsubst-1.0
Message-ID:  <20001103180734.77237.qmail@frodo.lebel.org>

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

>Number:         22583
>Category:       ports
>Synopsis:       New port: qsubst-1.0
>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:   Fri Nov 03 10:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     David Lebel
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
None whatsoever.
>Environment:

>Description:

Qsubst  is  designed  for  substituting strings in (large)
files.  It accepts a list of file names and  two  strings.
For  each  of  the  files,  qsubst modifies it in-place to
replace string1 with string2 wherever  the  user  approves
the change.

>How-To-Repeat:

>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:
#
#	qsubst
#	qsubst/Makefile
#	qsubst/files
#	qsubst/files/patch-aa
#	qsubst/pkg-plist
#	qsubst/pkg-comment
#	qsubst/distinfo
#	qsubst/pkg-descr
#
echo c - qsubst
mkdir -p qsubst > /dev/null 2>&1
echo x - qsubst/Makefile
sed 's/^X//' >qsubst/Makefile << 'END-of-qsubst/Makefile'
X# ports collection makefile for:   qsubst
X# Date created:        3 November 2000
X# Whom:                David Lebel <lebel@lebel.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		qsubst
XPORTVERSION=		1.0
XCATEGORIES=		textproc
XMASTER_SITES=		${MASTER_SITE_COMP_SOURCES}
XMASTER_SITE_SUBDIR=	unix/volume11
XDISTNAME=		qsubst
XEXTRACT_SUFX=		.Z
X
XMAINTAINER=		ports@FreeBSD.org
X
XBUILD_DEPENDS=		gunshar:${PORTSDIR}/archivers/gshar+gunshar
X
XNO_WRKSUBDIR=		yes
X
XEXTRACT_CMD=		zcat
XEXTRACT_BEFORE_ARGS=
XEXTRACT_AFTER_ARGS=	| gunshar -d ${WRKDIR}
X
XMAN1=			qsubst.1
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/qsubst ${PREFIX}/bin/qsubst
X	@${INSTALL_MAN} ${WRKSRC}/qsubst.1 ${PREFIX}/man/man1/qsubst.1
X
X.include <bsd.port.mk>
END-of-qsubst/Makefile
echo c - qsubst/files
mkdir -p qsubst/files > /dev/null 2>&1
echo x - qsubst/files/patch-aa
sed 's/^X//' >qsubst/files/patch-aa << 'END-of-qsubst/files/patch-aa'
Xdiff -ruN /tmp/qsubst/Makefile ./Makefile
X--- /tmp/qsubst/Makefile	Fri Nov  3 12:35:23 2000
X+++ ./Makefile	Fri Nov  3 12:46:36 2000
X@@ -2,4 +2,4 @@
X install:	qsubst qsubst.1
X 	@echo copy qsubst and qsubst.1 to appropriate directories.
X qsubst:		qsubst.c
X-	$(CC) $(CFLAGS) -o qsubst qsubst.c
X+	$(CC) $(CFLAGS) -lcurses -o qsubst qsubst.c
Xdiff -ruN /tmp/qsubst/qsubst.c ./qsubst.c
X--- /tmp/qsubst/qsubst.c	Fri Nov  3 12:35:23 2000
X+++ ./qsubst.c	Fri Nov  3 12:50:20 2000
X@@ -95,7 +95,7 @@
X char *tgetstr();
X char *malloc();
X char *sindex();
X-char *mktemp();
X+char *mkstemp();
X 
X FILE *tempf;
X long int tbeg;
X@@ -128,10 +128,10 @@
X  int mask;
X 
X  mask = sigblock(0);
X- old_tstp = signal(SIGTSTP,SIG_DFL);
X+ old_tstp = (void *)signal(SIGTSTP,(void *)SIG_DFL);
X  sigsetmask(mask&~sigmask(SIGTSTP));
X  kill(getpid(),SIGTSTP);
X- signal(SIGTSTP,old_tstp);
X+ signal(SIGTSTP,(void *)old_tstp);
X }
X 
X sigtstp()
X@@ -194,7 +194,7 @@
X 	}
X      }
X   }
X- cp = mktemp("/tmp/qsubst.XXXXXX");
X+ cp = mkstemp("/tmp/qsubst.XXXXXX");
X  tempf = fopen(cp,"w+");
X  if (tempf == NULL)
X   { fprintf(stderr,"%s: cannot create temp file %s\n",argvec[0],cp);
X@@ -219,7 +219,7 @@
X     exit(1);
X   }
X  ioctl(fileno(stdin),TIOCGETP,&orig_sg);
X- signal(SIGTSTP,sigtstp);
X+ signal(SIGTSTP,(void *)sigtstp);
X  allfly = 0;
X  cabove = 2;
X  cbelow = 2;
END-of-qsubst/files/patch-aa
echo x - qsubst/pkg-plist
sed 's/^X//' >qsubst/pkg-plist << 'END-of-qsubst/pkg-plist'
Xbin/qsubst
END-of-qsubst/pkg-plist
echo x - qsubst/pkg-comment
sed 's/^X//' >qsubst/pkg-comment << 'END-of-qsubst/pkg-comment'
Xquery/substitute strings in files
END-of-qsubst/pkg-comment
echo x - qsubst/distinfo
sed 's/^X//' >qsubst/distinfo << 'END-of-qsubst/distinfo'
XMD5 (qsubst.Z) = df0512d1c2d4430cbe92e351cc9dafc1
END-of-qsubst/distinfo
echo x - qsubst/pkg-descr
sed 's/^X//' >qsubst/pkg-descr << 'END-of-qsubst/pkg-descr'
XQsubst  is  designed  for  substituting strings in (large)
Xfiles.  It accepts a list of file names and  two  strings.
XFor  each  of  the  files,  qsubst modifies it in-place to
Xreplace string1 with string2 wherever  the  user  approves
Xthe change.
END-of-qsubst/pkg-descr
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?20001103180734.77237.qmail>