- Update to 20131022

- While I'm here, convert to new options helper and support STAGEDIR

Changes:	https://savannah.gnu.org/forum/forum.php?forum_id=7761
PR:		ports/183249
Submitted by:	Chris Howey <howeyc@gmail.com> (maintainer)
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2013-10-25 13:35:57 +00:00
parent cf50f6e5a7
commit 86e43a6f64
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=331576
3 changed files with 38 additions and 32 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= parallel
PORTVERSION= 20130922
PORTVERSION= 20131022
CATEGORIES= sysutils
MASTER_SITES= GNU
@ -17,23 +17,22 @@ CONFLICTS= moreutils-parallel-[0-9]*
CONFIGURE_ARGS= --docdir="${DOCSDIR}"
GNU_CONFIGURE= yes
NO_STAGE= yes
#NO_STAGE= yes
USE_BZIP2= yes
USES= perl5
MAN1= niceload.1 parallel.1 parallel_tutorial.1 sem.1 sql.1
PLIST_FILES= bin/niceload bin/parallel bin/sem bin/sql
PLIST_FILES= bin/niceload bin/parallel bin/sem bin/sql \
man/man1/niceload.1.gz man/man1/parallel.1.gz \
man/man1/parallel_tutorial.1.gz man/man1/sem.1.gz man/man1/sql.1.gz
PORTDOCS= niceload.html niceload.pdf niceload.texi \
parallel.html parallel.pdf parallel.texi \
parallel_tutorial.html parallel_tutorial.pdf parallel_tutorial.texi \
sem.html sem.pdf sem.texi \
sql.html sql.pdf sql.texi
.include <bsd.port.options.mk>
DOCS_BUILD_DEPENDS= ${LOCALBASE}/bin/pod2texi:${PORTSDIR}/print/texinfo
.if ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+= ${LOCALBASE}/bin/pod2texi:${PORTSDIR}/print/texinfo
.endif
.include <bsd.port.options.mk>
post-patch:
.if empty(PORT_OPTIONS:MDOCS)

View File

@ -1,2 +1,2 @@
SHA256 (parallel-20130922.tar.bz2) = e8fa0e4dd06781aa90f4567493ae61233b8db6a1b35257f8d229f9efd737b909
SIZE (parallel-20130922.tar.bz2) = 769344
SHA256 (parallel-20131022.tar.bz2) = 93280c7a03c18b07685157af36f2dfc82bbc59828acbdfe86ed27171a442b6f9
SIZE (parallel-20131022.tar.bz2) = 772831

View File

@ -1,28 +1,35 @@
--- ./src/parallel.orig 2013-04-21 21:50:21.000000000 -0500
+++ ./src/parallel 2013-04-21 21:56:46.000000000 -0500
@@ -5072,21 +5072,14 @@
--- ./src/parallel.orig 2013-10-21 15:31:40.000000000 -0500
+++ ./src/parallel 2013-10-23 15:11:54.000000000 -0500
@@ -5538,29 +5538,13 @@
# Returns:
# number of chars on the longest command line allowed
if(not $Limits::Command::line_max_len) {
+ $Limits::Command::line_max_len = `getconf ARG_MAX` - 1024;
if($opt::max_chars) {
- if(is_acceptable_command_line_length($opt::max_chars)) {
- $Limits::Command::line_max_len = $opt::max_chars;
- } else {
- # -s is too long: Find the correct
- $Limits::Command::line_max_len = binary_find_max_length(0,$opt::max_chars);
- }
- if($opt::max_chars <= $Limits::Command::line_max_len) {
- $Limits::Command::line_max_len = $opt::max_chars;
- } else {
+ if($opt::max_chars > $Limits::Command::line_max_len) {
::warning("Value for -s option ",
"should be < $Limits::Command::line_max_len.\n");
+ } else {
+ $Limits::Command::line_max_len = $opt::max_chars;
}
- # Disk cache of max command line length
- my $len_cache = $ENV{'HOME'} . "/.parallel/tmp/linelen-" . ::hostname();
- my $cached_limit;
- if(-e $len_cache) {
- open(my $fh, "<", $len_cache) || ::die_bug("Cannot read $len_cache");
- $cached_limit = <$fh>;
- close $fh;
- } else {
- $Limits::Command::line_max_len = real_max_length();
- $cached_limit = real_max_length();
- # If $HOME is write protected: Do not fail
- mkdir($ENV{'HOME'} . "/.parallel");
- mkdir($ENV{'HOME'} . "/.parallel/tmp");
- open(my $fh, ">", $len_cache);
- print $fh $cached_limit;
- close $fh;
- }
- $Limits::Command::line_max_len = $cached_limit;
+ $Limits::Command::line_max_len = `getconf ARG_MAX` - 1024;
if($opt::max_chars) {
- if($opt::max_chars <= $cached_limit) {
+ if($opt::max_chars <= $Limits::Command::line_max_len) {
$Limits::Command::line_max_len = $opt::max_chars;
} else {
::warning("Value for -s option ",
- "should be < $cached_limit.\n");
+ "should be < $Limits::Command::line_max_len.\n");
}
}
}
return $Limits::Command::line_max_len;