pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xapply Import xapply-3.4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2d075e2d529c
branches:  trunk
changeset: 483263:2d075e2d529c
user:      epg <epg%pkgsrc.org@localhost>
date:      Wed Nov 10 00:47:44 2004 +0000

description:
Import xapply-3.4.

xapply (Extended Apply) is an clever derivative of xargs and apply.
Using list or tabular input from one or more descriptors, xapply executes
a template command modified for each input.  It supports simple split
on token expression, and has support (a la make -j) for running many
jobs in parallel.

diffstat:

 sysutils/xapply/DESCR        |   5 +++
 sysutils/xapply/Makefile     |  30 +++++++++++++++++++
 sysutils/xapply/PLIST        |   3 +
 sysutils/xapply/distinfo     |   4 ++
 sysutils/xapply/files/makeme |  69 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 111 insertions(+), 0 deletions(-)

diffs (131 lines):

diff -r eda879f96e46 -r 2d075e2d529c sysutils/xapply/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xapply/DESCR     Wed Nov 10 00:47:44 2004 +0000
@@ -0,0 +1,5 @@
+xapply (Extended Apply) is an clever derivative of xargs and apply.
+Using list or tabular input from one or more descriptors, xapply executes
+a template command modified for each input.  It supports simple split
+on token expression, and has support (a la make -j) for running many
+jobs in parallel.
diff -r eda879f96e46 -r 2d075e2d529c sysutils/xapply/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xapply/Makefile  Wed Nov 10 00:47:44 2004 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/11/10 00:47:44 epg Exp $
+#
+
+DISTNAME=              xapply-3.4
+CATEGORIES=            mine
+MASTER_SITES=          http://archive.progeny.com/pundits/
+EXTRACT_SUFX=          .tgz
+
+MAINTAINER=            epg%NetBSD.org@localhost
+COMMENT=               Parallel Execution tool a la xargs/apply
+
+BUILD_DEPENDS+=                mkcmd>=8.14:../../devel/mkcmd
+
+USE_BUILDLINK3=                yes
+
+INSTALLATION_DIRS=     bin man/man1
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+
+do-build:
+       cd ${WRKSRC}/bin/xapply && \
+               MKCMD='-I${LOCALBASE}/lib/mkcmd -I${LOCALBASE}/lib/mkcmd/type' \
+               HOSTTYPE= ${SH} ${FILESDIR}/makeme \
+               ROOT=${PREFIX} BIN=${PREFIX}/bin
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/bin/xapply/xapply ${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKSRC}/bin/xapply/xapply.man \
+               ${PREFIX}/man/man1/xapply.1
+
+.include "../../mk/bsd.pkg.mk"
diff -r eda879f96e46 -r 2d075e2d529c sysutils/xapply/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xapply/PLIST     Wed Nov 10 00:47:44 2004 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/11/10 00:47:44 epg Exp $
+bin/xapply
+man/man1/xapply.1
diff -r eda879f96e46 -r 2d075e2d529c sysutils/xapply/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xapply/distinfo  Wed Nov 10 00:47:44 2004 +0000
@@ -0,0 +1,4 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/11/10 00:47:44 epg Exp $
+
+SHA1 (xapply-3.4.tgz) = 3e5a6a01c7fc1c27b1ec68fd607563ba0400f3cb
+Size (xapply-3.4.tgz) = 31354 bytes
diff -r eda879f96e46 -r 2d075e2d529c sysutils/xapply/files/makeme
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xapply/files/makeme      Wed Nov 10 00:47:44 2004 +0000
@@ -0,0 +1,69 @@
+#!/bin/sh
+# $Id: makeme,v 1.1.1.1 2004/11/10 00:47:45 epg Exp $
+# This hack won't work for every trick you can play with /usr/msrc.
+# If the Distfile sends different files to the various platforms, or
+# builds a file on the meta source machine with a special tool or
+# database you are toast.  {N.B. mk's lib, rdist, mkcmd have issues.}
+
+# if we have a local.defs read it for umask, PATH, and such.
+[ -f /usr/local/lib/distrib/local.defs ] && . /usr/local/lib/distrib/local.defs
+
+# It does work for the tools that build the meta source system itself,
+# of course (mkcmd, distrib, rcsvg, and the like).  You can use it to
+# process the Make.host file through m4 for localhost.
+#
+# Check for the mandatory Make.host file...
+if [ ! -f Make.host ] ; then
+       echo 1>&2 "$0: not in a meta source directory, no Make.host"
+       exit 126
+fi
+
+# distrib: default column headers: %HOST SHORTHOST HOSTTYPE HOSTOS HASSRC
+if [ -z "$HOST" ] ; then
+       HOST=`uname -n || hostname`
+fi
+if [ -z "$SHORTHOST" ] ; then
+       SHORTHOST=`expr $HOST : '\([^.]*\)\..*' \| $HOST`
+fi
+if [ -z "$HOSTTYPE" ] ; then
+       case `uname -sr || uname -a` in
+       HP-UX*7.*)
+               HOSTTYPE="HPUX9" ;;
+       HP-UX*8.*)
+               HOSTTYPE="HPUX9" ;;
+       HP-UX*9.*)
+               HOSTTYPE="HPUX9" ;;
+       HP-UX*10.*)
+               HOSTTYPE="HPUX10" ;;
+       *NEXT*)
+               HOSTTYPE="NEXT2" ;;
+       *Solaris*|*[Ss]un[Oo][Ss]*)
+               HOSTTYPE="SUN5" ;;
+       *BSD*)
+               HOSTTYPE="FREEBSD" ;;
+       BSDI*)
+               HOSTTYPE="BSDI" ;;
+       Linux*|LINUX*)
+               HOSTTYPE="LINUX" ;;
+       *)
+               echo 1>&2 "$0: set HOSTTYPE and export it by hand."
+               exit 2 ;;
+       esac
+fi
+if [ -z "$HOSTOS" ] ; then
+       HOSTOS=`uname -r | sed -e 's/^[A-Za-z .]*//' -e 's/-[A-Za-z]*//' -e 's/\.\([0-9][0-9]\)/\1/g' -e 'y/./0/' -e 's/^0*//'`
+fi
+
+# Now fake the Distrib @file@ expansion and hope the rest works out.
+# Some make's mistakenly think you must call fork() to get a SIG-child...
+# so they barf out errors for this -- they should learn UNIX.
+m4 - Make.host <<! |make -f - ${1:+"$@"}
+define(\`HOST',\`$HOST')dnl
+define(\`SHORTHOST',\`$SHORTHOST')dnl
+define(\`HOSTTYPE',\`$HOSTTYPE')dnl
+define(\`MYTYPE',\`$HOSTTYPE')dnl
+define(\`HOSTOS',\`$HOSTOS')dnl
+define(\`MYOS',\`$HOSTOS')dnl
+define(\`HASSRC',\`yes')dnl
+define(\`MSRC_BOOT',\`${MSRC_BOOT-yes}')dnl
+!



Home | Main Index | Thread Index | Old Index