pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/nbsed Initial import of an autoconf-ed versio...
details: https://anonhg.NetBSD.org/pkgsrc/rev/958e5a4bbe7f
branches: trunk
changeset: 460093:958e5a4bbe7f
user: agc <agc%pkgsrc.org@localhost>
date: Mon Aug 18 17:34:54 2003 +0000
description:
Initial import of an autoconf-ed version of NetBSD's sed(1).
diffstat:
textproc/nbsed/DESCR | 6 +
textproc/nbsed/Makefile | 19 +
textproc/nbsed/PLIST | 3 +
textproc/nbsed/files/Makefile.in | 145 +
textproc/nbsed/files/POSIX | 199 +
textproc/nbsed/files/TEST/hanoi.sed | 103 +
textproc/nbsed/files/TEST/math.sed | 164 +
textproc/nbsed/files/TEST/sed.test | 554 +++
textproc/nbsed/files/compile.c | 822 ++++
textproc/nbsed/files/config.guess | 1327 +++++++
textproc/nbsed/files/config.h.in | 208 +
textproc/nbsed/files/config.sub | 1450 ++++++++
textproc/nbsed/files/configure | 5506 +++++++++++++++++++++++++++++++++
textproc/nbsed/files/configure.ac | 128 +
textproc/nbsed/files/configure.lineno | 5506 +++++++++++++++++++++++++++++++++
textproc/nbsed/files/defs.h | 152 +
textproc/nbsed/files/extern.h | 64 +
textproc/nbsed/files/fgetln.c | 88 +
textproc/nbsed/files/install-sh | 201 +
textproc/nbsed/files/main.c | 379 ++
textproc/nbsed/files/misc.c | 143 +
textproc/nbsed/files/mkinstalldirs | 40 +
textproc/nbsed/files/nbsed.1 | 518 +++
textproc/nbsed/files/process.c | 677 ++++
textproc/nbsed/files/setprogname.c | 68 +
25 files changed, 18470 insertions(+), 0 deletions(-)
diffs (truncated from 18570 to 300 lines):
diff -r 4e4e861918ba -r 958e5a4bbe7f textproc/nbsed/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/nbsed/DESCR Mon Aug 18 17:34:54 2003 +0000
@@ -0,0 +1,6 @@
+This is a copy of the NetBSD sed(1) program, for use on operating
+systems where the native sed(1) is limited in the number of
+expressions it will accept.
+
+sed is a stream editor, used for transforming its input stream into
+a modified output stream.
diff -r 4e4e861918ba -r 958e5a4bbe7f textproc/nbsed/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/nbsed/Makefile Mon Aug 18 17:34:54 2003 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/08/18 17:34:54 agc Exp $
+
+DISTNAME= nbsed-20030818
+CATEGORIES= textproc pkgtools
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= tech-pkg%NetBSD.org@localhost
+HOMEPAGE= http://www.NetBSD.org/
+COMMENT= NetBSD-current's sed(1)
+
+NO_CHECKSUM= # defined
+
+GNU_CONFIGURE= # defined
+
+post-extract:
+ cd ${FILESDIR} && ${PAX} -rwpe . ${WRKSRC}
+
+.include "../../mk/bsd.pkg.mk"
diff -r 4e4e861918ba -r 958e5a4bbe7f textproc/nbsed/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/nbsed/PLIST Mon Aug 18 17:34:54 2003 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/08/18 17:34:54 agc Exp $
+bin/nbsed
+man/man1/nbsed.1
diff -r 4e4e861918ba -r 958e5a4bbe7f textproc/nbsed/files/Makefile.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/nbsed/files/Makefile.in Mon Aug 18 17:34:54 2003 +0000
@@ -0,0 +1,145 @@
+# $Id: Makefile.in,v 1.1.1.1 2003/08/18 17:34:55 agc Exp $
+
+@SET_MAKE@
+SHELL = @SHELL@
+VPATH=@srcdir@
+
+PACKAGE_NAME= @PACKAGE_NAME@
+PACKAGE_VERSION= @PACKAGE_VERSION@
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+mandir = @mandir@
+top_builddir = .
+
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+mkinstalldirs = $(SHELL) $(srcdir)/mkinstalldirs
+install_sh = $(SHELL) $(srcdir)/install-sh
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+host_alias = @host_alias@
+host_triplet = @host@
+CANONICAL_HOST = @CANONICAL_HOST@
+
+CC = @CC@
+CCLD= $(CC)
+LIBS= @LIBS@
+CPPFLAGS= @CPPFLAGS@
+DEFS= @DEFS@ -I. -I@srcdir@ -DHOST=\"$(CANONICAL_HOST)\" -DVERSION=\"$(PACKAGE_VERSION)\"
+CFLAGS= @CFLAGS@
+LDFLAGS= @LDFLAGS@
+
+LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+COMPILE= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
+
+SRCS= compile.c main.c misc.c process.c fgetln.c setprogname.c defs.h extern.h
+OBJS = compile.o main.o misc.o process.o fgetln.o setprogname.o
+
+DISTFILES= $(SRCS) AUTHORS COPYING INSTALL Makefile.in NEWS README aclocal.m4 \
+config.guess config.h.in config.sub configure configure.ac install-sh \
+missing mkinstalldirs regress.sh
+
+.c.o:
+ $(COMPILE) -c $< -o $@
+
+all: nbsed
+
+nbsed: $(OBJS)
+ $(LINK) $(OBJS) $(LIBS)
+
+check: nbsed
+ @SHELL@ $(srcdir)/regress.sh
+
+clean:
+ rm -f *.o nbsed
+
+distclean: clean
+ rm -f Makefile config.h
+ rm -f config.status config.cache config.log
+
+maintainer-clean: distclean
+ rm -f configure config.h.in
+
+install: nbsed
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @f=`echo nbsed|sed '$(transform)'`; \
+ echo "$(INSTALL_PROGRAM) nbsed $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM) nbsed $(DESTDIR)$(bindir)/$$f
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
+ @f=`echo nbsed.1|sed '$(transform)'`; \
+ echo "$(INSTALL_DATA) nbsed.1 $(DESTDIR)$(mandir)/man1/$$f"; \
+ $(INSTALL_DATA) nbsed.1 $(DESTDIR)$(mandir)/man1/$$f
+
+uninstall:
+ @f=`echo nbsed|sed '$(transform)'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f
+
+GZIP_ENV= --best
+TAR= tar
+distdir= $(PACKAGE_NAME)-$(PACKAGE_VERSION)
+
+distdir: $(DISTFILES)
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ mkdir $(distdir)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+
+dist: distdir
+ $(TAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+distcheck: dist
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(TAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ chmod a-w $(distdir)
+ dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+ && cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) \
+ && $(MAKE) check \
+ && $(MAKE) install \
+ && $(MAKE) uninstall \
+ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+ || (echo "Error: files left after uninstall" 1>&2; \
+ exit 1) ) \
+ && $(MAKE) dist \
+ && $(MAKE) distclean \
+ && rm -f $(distdir).tar.gz \
+ && (test `find . -type f -print | wc -l` -eq 0 \
+ || (echo "Error: files left after distclean" 1>&2; \
+ exit 1) )
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
diff -r 4e4e861918ba -r 958e5a4bbe7f textproc/nbsed/files/POSIX
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/nbsed/files/POSIX Mon Aug 18 17:34:54 2003 +0000
@@ -0,0 +1,199 @@
+# $NetBSD: POSIX,v 1.1.1.1 2003/08/18 17:34:55 agc Exp $
+# from: @(#)POSIX 8.1 (Berkeley) 6/6/93
+
+Comments on the IEEE P1003.2 Draft 12
+ Part 2: Shell and Utilities
+ Section 4.55: sed - Stream editor
+
+Diomidis Spinellis <dds%doc.ic.ac.uk@localhost>
+Keith Bostic <bostic%cs.berkeley.edu@localhost>
+
+In the following paragraphs, "wrong" usually means "inconsistent with
+historic practice", as most of the following comments refer to
+undocumented inconsistencies between the historical versions of sed and
+the POSIX 1003.2 standard. All the comments are notes taken while
+implementing a POSIX-compatible version of sed, and should not be
+interpreted as official opinions or criticism towards the POSIX committee.
+All uses of "POSIX" refer to section 4.55, Draft 12 of POSIX 1003.2.
+
+ 1. 32V and BSD derived implementations of sed strip the text
+ arguments of the a, c and i commands of their initial blanks,
+ i.e.
+
+ #!/bin/sed -f
+ a\
+ foo\
+ \ indent\
+ bar
+
+ produces:
+
+ foo
+ indent
+ bar
+
+ POSIX does not specify this behavior as the System V versions of
+ sed do not do this stripping. The argument against stripping is
+ that it is difficult to write sed scripts that have leading blanks
+ if they are stripped. The argument for stripping is that it is
+ difficult to write readable sed scripts unless indentation is allowed
+ and ignored, and leading whitespace is obtainable by entering a
+ backslash in front of it. This implementation follows the BSD
+ historic practice.
+
+ 2. Historical versions of sed required that the w flag be the last
+ flag to an s command as it takes an additional argument. This
+ is obvious, but not specified in POSIX.
+
+ 3. Historical versions of sed required that whitespace follow a w
+ flag to an s command. This is not specified in POSIX. This
+ implementation permits whitespace but does not require it.
+
+ 4. Historical versions of sed permitted any number of whitespace
+ characters to follow the w command. This is not specified in
+ POSIX. This implementation permits whitespace but does not
+ require it.
+
+ 5. The rule for the l command differs from historic practice. Table
+ 2-15 includes the various ANSI C escape sequences, including \\
+ for backslash. Some historical versions of sed displayed two
+ digit octal numbers, too, not three as specified by POSIX. POSIX
+ is a cleanup, and is followed by this implementation.
+
+ 6. The POSIX specification for ! does not specify that for a single
+ command the command must not contain an address specification
+ whereas the command list can contain address specifications. The
+ specification for ! implies that "3!/hello/p" works, and it never
+ has, historically. Note,
+
+ 3!{
+ /hello/p
+ }
+
+ does work.
+
+ 7. POSIX does not specify what happens with consecutive ! commands
+ (e.g. /foo/!!!p). Historic implementations allow any number of
+ !'s without changing the behaviour. (It seems logical that each
+ one might reverse the behaviour.) This implementation follows
+ historic practice.
+
+ 8. Historic versions of sed permitted commands to be separated
+ by semi-colons, e.g. 'sed -ne '1p;2p;3q' printed the first
+ three lines of a file. This is not specified by POSIX.
+ Note, the ; command separator is not allowed for the commands
+ a, c, i, w, r, :, b, t, # and at the end of a w flag in the s
+ command. This implementation follows historic practice and
+ implements the ; separator.
+
+ 9. Historic versions of sed terminated the script if EOF was reached
+ during the execution of the 'n' command, i.e.:
+
+ sed -e '
+ n
+ i\
+ hello
+ ' </dev/null
+
+ did not produce any output. POSIX does not specify this behavior.
+ This implementation follows historic practice.
+
+10. Deleted.
+
+11. Historical implementations do not output the change text of a c
+ command in the case of an address range whose first line number
+ is greater than the second (e.g. 3,1). POSIX requires that the
+ text be output. Since the historic behavior doesn't seem to have
+ any particular purpose, this implementation follows the POSIX
Home |
Main Index |
Thread Index |
Old Index