svn commit: r365295 - in head/sysutils/moreutils: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Mon Aug 18 12:45:48 UTC 2014
Author: sunpoet
Date: Mon Aug 18 12:45:46 2014
New Revision: 365295
URL: http://svnweb.freebsd.org/changeset/ports/365295
QAT: https://qat.redports.org/buildarchive/r365295/
Log:
- Install parallel as moreutils-parallel
- Bump PORTREVISION for package change
Added:
head/sysutils/moreutils/files/moreutils-parallel.1
- copied unchanged from r365160, head/sysutils/moreutils-parallel/files/parallel.1
head/sysutils/moreutils/files/patch-moreutils-parallel.c
- copied unchanged from r365160, head/sysutils/moreutils-parallel/files/patch-parallel.c
Modified:
head/sysutils/moreutils/Makefile
head/sysutils/moreutils/pkg-descr
head/sysutils/moreutils/pkg-plist
Modified: head/sysutils/moreutils/Makefile
==============================================================================
--- head/sysutils/moreutils/Makefile Mon Aug 18 12:45:39 2014 (r365294)
+++ head/sysutils/moreutils/Makefile Mon Aug 18 12:45:46 2014 (r365295)
@@ -3,7 +3,7 @@
PORTNAME= moreutils
PORTVERSION= 0.51
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= DEBIAN_POOL
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -29,6 +29,7 @@ CANNED_MANPAGES=errno.1 \
isutf8.1 \
lckdo.1 \
mispipe.1 \
+ moreutils-parallel.1 \
pee.1 \
sponge.1
PERL_MANPAGES= chronic.1 \
@@ -41,8 +42,11 @@ PERL_MANPAGES= chronic.1 \
SHEBANG_FILES= ${PERL_MANPAGES:R}
post-patch:
+ @${REINPLACE_CMD} -e 's|parallel|moreutils-&|g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|__APPLE__|__${OPSYS}__|' ${WRKSRC}/ifdata.c
@cd ${FILESDIR}/ && ${CP} ${CANNED_MANPAGES} ${WRKSRC}/
+ @${MV} ${WRKSRC}/parallel.c ${WRKSRC}/moreutils-parallel.c
+ @${MV} ${WRKSRC}/parallel.docbook ${WRKSRC}/moreutils-parallel.docbook
post-build:
.for man in ${PERL_MANPAGES:R}
Copied: head/sysutils/moreutils/files/moreutils-parallel.1 (from r365160, head/sysutils/moreutils-parallel/files/parallel.1)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/moreutils/files/moreutils-parallel.1 Mon Aug 18 12:45:46 2014 (r365295, copy of r365160, head/sysutils/moreutils-parallel/files/parallel.1)
@@ -0,0 +1,84 @@
+'\" t
+.\" Title: parallel
+.\" Author: Joey Hess
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 2009-07-02
+.\" Manual: moreutils
+.\" Source: moreutils
+.\" Language: English
+.\"
+.TH "PARALLEL" "1" "2009\-07\-02" "moreutils" "moreutils"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+parallel \- run programs in parallel
+.SH "SYNOPSIS"
+.HP \w'\fBparallel\fR\fB\-\-\fR\ 'u
+\fBparallel\fR [options] [command]\fB\-\-\fR [argument\ \&.\&.\&.]
+.HP \w'\fBparallel\fR\fB\-\-\fR\ 'u
+\fBparallel\fR [options]\fB\-\-\fR [command\ \&.\&.\&.]
+.SH "DESCRIPTION"
+.PP
+\fBparallel\fR
+runs the specified command, passing it a single one of the specified arguments\&. This is repeated for each argument\&. Jobs may be run in parallel\&. The default is to run one job per CPU\&.
+.PP
+If no command is specified before the \-\-, the commands after it are instead run in parallel\&.
+.SH "OPTIONS"
+.PP
+\fB\-j maxjobs\fR
+.RS 4
+Use to limit the number of jobs that are run at the same time\&.
+.RE
+.PP
+\fB\-l maxload\fR
+.RS 4
+Wait as needed to avoid starting new jobs when the system\*(Aqs load average is not below the specified limit\&.
+.RE
+.PP
+\fB\-i\fR
+.RS 4
+Normally the command is passed the argument at the end of its command line\&. With this option, any instances of "{}" in the command are replaced with the argument\&.
+.RE
+.PP
+\fB\-n\fR
+.RS 4
+Number of arguments to pass to a command at a time\&. Default is 1\&. Incompatible with \-i
+.RE
+.SH "EXAMPLE"
+.PP
+.HP \w'\fBparallel\ sh\ \-c\ "echo\ hi;\ sleep\ 2;\ echo\ bye"\ \-\-\ 1\ 2\ 3\fR\ 'u \fBparallel sh \-c "echo hi; sleep 2; echo bye" \-\- 1 2 3\fR
+.PP
+This runs three subshells that each print a message, delay, and print another message\&. If your system has multiple CPUs, parallel will run some of the jobs in parallel, which should be clear from the order the messages are output\&.
+.PP
+.HP \w'\fBparallel\ \-j\ 3\ ufraw\ \-o\ processed\ \-\-\ *\&.NEF\fR\ 'u \fBparallel \-j 3 ufraw \-o processed \-\- *\&.NEF\fR
+.PP
+This runs three ufraw processes at the same time until all of the NEF files have been processed\&.
+.PP
+.HP \w'\fBparallel\ \-j\ 3\ \-\-\ ls\ df\ "echo\ hi"\fR\ 'u \fBparallel \-j 3 \-\- ls df "echo hi"\fR
+.PP
+This runs three independent commands in parallel\&.
+.SH "EXIT STATUS"
+.PP
+Its exit status is the combination of the exit statuses of each command ran, ORed together\&. (Thus, if any one command exits nonzero,
+\fBparallel\fR
+as a whole will exit nonzero\&.)
+.SH "AUTHOR"
+.PP
+Tollef Fog Heen
Copied: head/sysutils/moreutils/files/patch-moreutils-parallel.c (from r365160, head/sysutils/moreutils-parallel/files/patch-parallel.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/moreutils/files/patch-moreutils-parallel.c Mon Aug 18 12:45:46 2014 (r365295, copy of r365160, head/sysutils/moreutils-parallel/files/patch-parallel.c)
@@ -0,0 +1,29 @@
+--- ./parallel.c.orig 2010-07-06 12:06:47.000000000 -0700
++++ ./parallel.c 2010-11-17 15:49:57.000000000 -0800
+@@ -87,6 +87,7 @@
+ return;
+ }
+
++#ifdef HAVE_WAITID
+ int wait_for_child(int options) {
+ id_t id_ignored = 0;
+ siginfo_t infop;
+@@ -101,6 +102,18 @@
+ }
+ return 1;
+ }
++#else
++int wait_for_child(int options) {
++ int status;
++
++ if(waitpid(-1, &status, options) == -1)
++ return -1; /* nothing to wait for */
++ if(WIFEXITED(status))
++ return WEXITSTATUS(status);
++ return 1;
++}
++#endif
++
+
+ int main(int argc, char **argv) {
+ int maxjobs = -1;
Modified: head/sysutils/moreutils/pkg-descr
==============================================================================
--- head/sysutils/moreutils/pkg-descr Mon Aug 18 12:45:39 2014 (r365294)
+++ head/sysutils/moreutils/pkg-descr Mon Aug 18 12:45:46 2014 (r365295)
@@ -10,6 +10,7 @@ Currently it consists of these tools:
- isutf8: check if a file or standard input is utf-8
- lckdo: execute a program with a lock held (deprecated)
- mispipe: pipe two commands, returning the exit status of the first
+- parallel: run multiple jobs at once
- pee: tee standard input to pipes
- sponge: soak up standard input and write to a file
- ts: timestamp standard input
@@ -17,6 +18,6 @@ Currently it consists of these tools:
- vipe: insert a text editor into a pipe
- zrun: automatically uncompress arguments to command
-The 'parallel' utility is split into sysutils/moreutils-parallel.
+Note that the parallel utility is installed as moreutils-parallel.
WWW: http://joeyh.name/code/moreutils/
Modified: head/sysutils/moreutils/pkg-plist
==============================================================================
--- head/sysutils/moreutils/pkg-plist Mon Aug 18 12:45:39 2014 (r365294)
+++ head/sysutils/moreutils/pkg-plist Mon Aug 18 12:45:46 2014 (r365295)
@@ -6,6 +6,7 @@ bin/ifne
bin/isutf8
bin/lckdo
bin/mispipe
+bin/moreutils-parallel
bin/pee
bin/sponge
bin/ts
@@ -20,6 +21,7 @@ bin/zrun
%%MANPAGES%%man/man1/isutf8.1.gz
%%MANPAGES%%man/man1/lckdo.1.gz
%%MANPAGES%%man/man1/mispipe.1.gz
+%%MANPAGES%%man/man1/moreutils-parallel.1.gz
%%MANPAGES%%man/man1/pee.1.gz
%%MANPAGES%%man/man1/sponge.1.gz
%%MANPAGES%%man/man1/ts.1.gz
More information about the svn-ports-head
mailing list