diff options
Diffstat (limited to 'misc/shuffle')
-rw-r--r-- | misc/shuffle/Makefile | 68 | ||||
-rw-r--r-- | misc/shuffle/distinfo | 1 | ||||
-rw-r--r-- | misc/shuffle/files/patch-aa | 24 | ||||
-rw-r--r-- | misc/shuffle/files/patch-shuffle.c | 15 | ||||
-rw-r--r-- | misc/shuffle/pkg-comment | 1 | ||||
-rw-r--r-- | misc/shuffle/pkg-descr | 3 | ||||
-rw-r--r-- | misc/shuffle/pkg-plist | 1 |
7 files changed, 113 insertions, 0 deletions
diff --git a/misc/shuffle/Makefile b/misc/shuffle/Makefile new file mode 100644 index 000000000000..e8bb6e889eff --- /dev/null +++ b/misc/shuffle/Makefile @@ -0,0 +1,68 @@ +# New ports collection makefile for: shuffle +# Date created: 3 June 2001 +# Whom: Dima Dorfman <dima@unixfreak.org> +# +# $FreeBSD$ +# + +PORTNAME= shuffle +PORTVERSION= 20010603 +CATEGORIES= misc +MASTER_SITES= ${MASTER_SITE_LOCAL} \ + http://www.unixfreak.org/~dima/distfiles/ +MASTER_SITE_SUBDIR= dd + +MAINTAINER= dima@unixfreak.org + +MAN1= shuffle.1 +MANCOMPRESSED= maybe + +# This isn't very scalable, but I'm lazy.. +.if defined(NOMANCOMPRESS) +MANNAME= shuffle.1 +.else +MANNAME= shuffle.1.gz +.endif + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/shuffle ${PREFIX}/bin/shuffle + @${INSTALL_MAN} ${WRKSRC}/${MANNAME} ${PREFIX}/man/man1 + +# +# Ports build/install stuff stops here. Tarball creation stuff begins here. +# +.include <bsd.port.pre.mk> +CVS_CMD?= cvs -z3 +CVS_DATE= Sun Jun 3 15:58:14 PDT 2001 +CVS_SITES?= anoncvs@anoncvs.netbsd.org:/cvsroot +CVS_MODULE= basesrc/usr.bin/shuffle + +# +# CVS checkout stuff mostly stolen from security/openssh-askpass port by +# kris@freebsd.org +# +tarball: + @${MKDIR} ${DISTDIR}/${PKGNAME} && \ + cd ${DISTDIR}/${PKGNAME}; \ + for CVS_SITE in ${CVS_SITES}; do \ + ${ECHO_MSG} ">> Attempting to check out from $${CVS_SITE}."; \ + if ${CVS_CMD} -d $${CVS_SITE} co -D "${CVS_DATE}" \ + ${CVS_MODULE}; then \ + cd ${DISTDIR}; \ + ${ECHO_MSG} ">> Creating dist tarball in ${DISTDIR}"; \ + ${ECHO_MSG} ">> \"${PKGNAME}.tar.gz\"."; \ + ${MV} ${PKGNAME}/${CVS_MODULE} \ + ${PKGNAME}/${CVS_MODULE:H}/${PKGNAME}; \ + ${TAR} -cz \ + -X ${FILESDIR}/tarignore \ + -f ${PKGNAME}.tar.gz \ + -C ${PKGNAME}/${CVS_MODULE:H} \ + ${PKGNAME}; \ + exit; \ + fi \ + done; \ + ${RMDIR} ${DISTDIR}/${PKGNAME}; \ + ${ECHO_MSG} ">> CVS checkout failed."; \ + exit 1; + +.include <bsd.port.post.mk> diff --git a/misc/shuffle/distinfo b/misc/shuffle/distinfo new file mode 100644 index 000000000000..e8059986d793 --- /dev/null +++ b/misc/shuffle/distinfo @@ -0,0 +1 @@ +MD5 (shuffle-20010603.tar.gz) = efd0c6290d0369ce6ec404e95dc39911 diff --git a/misc/shuffle/files/patch-aa b/misc/shuffle/files/patch-aa new file mode 100644 index 000000000000..a28e43cd5b21 --- /dev/null +++ b/misc/shuffle/files/patch-aa @@ -0,0 +1,24 @@ +Index: shuffle.c +=================================================================== +RCS file: /stl/src/NetBSD/basesrc/usr.bin/shuffle/shuffle.c,v +retrieving revision 1.9 +diff -u -r1.9 shuffle.c +--- shuffle.c 2001/03/16 08:02:32 1.9 ++++ shuffle.c 2001/06/03 22:21:49 +@@ -37,6 +37,7 @@ + #endif /* not lint */ + + #include <err.h> ++#include <limits.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -255,7 +256,7 @@ + nlines = pick; + } + +- for (i = 0; i < nlines; i++) { ++ for (i = 0; (unsigned)i < nlines; i++) { + if (nflag) + printf("%ld\n", (long)shuffle[i]); + else diff --git a/misc/shuffle/files/patch-shuffle.c b/misc/shuffle/files/patch-shuffle.c new file mode 100644 index 000000000000..af3a9b5e7d26 --- /dev/null +++ b/misc/shuffle/files/patch-shuffle.c @@ -0,0 +1,15 @@ +--- shuffle.c.orig Wed Jun 13 22:07:36 2001 ++++ shuffle.c Wed Jun 13 22:07:36 2001 +@@ -133,10 +133,11 @@ + static void + usage() + { ++ extern const char *__progname; + + (void) fprintf(stderr, + "Usage: %s [-f <filename>] [-n <number>] [-p <number>] [<arg> ...]\n", +- getprogname()); ++ __progname); + exit(1); + } + diff --git a/misc/shuffle/pkg-comment b/misc/shuffle/pkg-comment new file mode 100644 index 000000000000..f70d9b392989 --- /dev/null +++ b/misc/shuffle/pkg-comment @@ -0,0 +1 @@ +Produce random permutations diff --git a/misc/shuffle/pkg-descr b/misc/shuffle/pkg-descr new file mode 100644 index 000000000000..fc8ce02dfba1 --- /dev/null +++ b/misc/shuffle/pkg-descr @@ -0,0 +1,3 @@ +The shuffle program prints a random permutation (or ``shuffle'') of +its input lines. This can be useful in shell scripts for selecting a +random order in which to do a set of tasks, view a set of files, etc. diff --git a/misc/shuffle/pkg-plist b/misc/shuffle/pkg-plist new file mode 100644 index 000000000000..bfb373262d7b --- /dev/null +++ b/misc/shuffle/pkg-plist @@ -0,0 +1 @@ +bin/shuffle |