diff --git a/packages/parallel/build.sh b/packages/parallel/build.sh index 20cb1a6fa..40e8015f3 100644 --- a/packages/parallel/build.sh +++ b/packages/parallel/build.sh @@ -1,9 +1,8 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/parallel/ TERMUX_PKG_DESCRIPTION="GNU Parallel is a shell tool for executing jobs in parallel using one or more machines" TERMUX_PKG_LICENSE="GPL-3.0" -TERMUX_PKG_VERSION=20180222 -TERMUX_PKG_REVISION=1 -TERMUX_PKG_SHA256=e81997dbabef18708de30635bd5d05af63395d869452a91c6a047c9c590e9daf +TERMUX_PKG_VERSION=20190422 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/parallel/parallel-${TERMUX_PKG_VERSION}.tar.bz2 +TERMUX_PKG_SHA256=b44bedadff56936f05995ca54628a45ff528df5a59e37affb8f2ee00ad2bb475 TERMUX_PKG_DEPENDS="perl" TERMUX_PKG_PLATFORM_INDEPENDENT=yes diff --git a/packages/parallel/parallel.patch b/packages/parallel/parallel.patch index d1c66dd92..2d0e257e6 100644 --- a/packages/parallel/parallel.patch +++ b/packages/parallel/parallel.patch @@ -1,31 +1,32 @@ -diff -uNr parallel-20180222/src/parallel parallel-20180222.mod/src/parallel ---- parallel-20180222/src/parallel 2018-02-22 21:42:51.000000000 +0200 -+++ parallel-20180222.mod/src/parallel 2018-06-21 12:36:46.066728715 +0300 -@@ -1137,7 +1137,7 @@ +diff -uNr parallel-20190422/src/parallel parallel-20190422.mod/src/parallel +--- parallel-20190422/src/parallel 2019-04-21 15:45:35.000000000 +0300 ++++ parallel-20190422.mod/src/parallel 2019-05-21 15:17:56.595625178 +0300 +@@ -1325,7 +1325,7 @@ if($opt::bug) { ::die_bug("test-bug"); } $Global::debug = $opt::D; $Global::shell = $ENV{'PARALLEL_SHELL'} || parent_shell($$) - || $ENV{'SHELL'} || "/bin/sh"; + || $ENV{'SHELL'} || "@TERMUX_PREFIX@/bin/sh"; - if(not which($Global::shell)) { + if(not -x $Global::shell and not which($Global::shell)) { ::error("Shell '$Global::shell' not found."); wait_and_exit(255); -@@ -1488,11 +1488,11 @@ +@@ -1780,12 +1780,12 @@ $Global::trim = 'n'; $Global::max_jobs_running = 0; $Global::job_already_run = ''; - $ENV{'TMPDIR'} ||= "/tmp"; + $ENV{'TMPDIR'} ||= "@TERMUX_PREFIX@/tmp"; + $ENV{'OLDPWD'} = $ENV{'PWD'}; if(not $ENV{HOME}) { # $ENV{HOME} is sometimes not set if called from PHP - ::warning("\$HOME not set. Using /tmp."); - $ENV{HOME} = "/tmp"; -+ ::warning("\$HOME not set. Using @TERMUX_HOME@."); -+ $ENV{HOME} = "@TERMUX_HOME@"; ++ ::warning("\$HOME not set. Using @TERMUX_PREFIX@/tmp."); ++ $ENV{HOME} = "@TERMUX_PREFIX@/tmp"; } # no warnings to allow for undefined $XDG_* no warnings 'uninitialized'; -@@ -3411,7 +3411,7 @@ +@@ -3712,7 +3712,7 @@ unlink $stderrname; my $pid = ::open3($stdin_fh,$stdout_fh,$stderr_fh, @@ -34,7 +35,7 @@ diff -uNr parallel-20180222/src/parallel parallel-20180222.mod/src/parallel if(my $writerpid = fork()) { close $stdin_fh; @stdout = <$stdout_fh>; -@@ -4758,6 +4758,7 @@ +@@ -5216,6 +5216,7 @@ my $bsd = q(ps -o pid,ppid,command -ax); %pid_parentpid_cmd = ( diff --git a/packages/parallel/sem.patch b/packages/parallel/sem.patch index 465f79056..1b9d62a6a 100644 --- a/packages/parallel/sem.patch +++ b/packages/parallel/sem.patch @@ -1,31 +1,32 @@ -diff -uNr parallel-20180222/src/sem parallel-20180222.mod/src/sem ---- parallel-20180222/src/sem 2018-02-22 21:42:51.000000000 +0200 -+++ parallel-20180222.mod/src/sem 2018-06-21 12:37:26.333395678 +0300 -@@ -1137,7 +1137,7 @@ +diff -uNr parallel-20190422/src/sem parallel-20190422.mod/src/sem +--- parallel-20190422/src/sem 2019-04-21 15:45:35.000000000 +0300 ++++ parallel-20190422.mod/src/sem 2019-05-21 15:19:40.243140514 +0300 +@@ -1325,7 +1325,7 @@ if($opt::bug) { ::die_bug("test-bug"); } $Global::debug = $opt::D; $Global::shell = $ENV{'PARALLEL_SHELL'} || parent_shell($$) - || $ENV{'SHELL'} || "/bin/sh"; + || $ENV{'SHELL'} || "@TERMUX_PREFIX@/bin/sh"; - if(not which($Global::shell)) { + if(not -x $Global::shell and not which($Global::shell)) { ::error("Shell '$Global::shell' not found."); wait_and_exit(255); -@@ -1488,11 +1488,11 @@ +@@ -1780,12 +1780,12 @@ $Global::trim = 'n'; $Global::max_jobs_running = 0; $Global::job_already_run = ''; - $ENV{'TMPDIR'} ||= "/tmp"; + $ENV{'TMPDIR'} ||= "@TERMUX_PREFIX@/tmp"; + $ENV{'OLDPWD'} = $ENV{'PWD'}; if(not $ENV{HOME}) { # $ENV{HOME} is sometimes not set if called from PHP - ::warning("\$HOME not set. Using /tmp."); - $ENV{HOME} = "/tmp"; -+ ::warning("\$HOME not set. Using @TERMUX_HOME@."); -+ $ENV{HOME} = "@TERMUX_HOME@"; ++ ::warning("\$HOME not set. Using @TERMUX_PREFIX@/tmp."); ++ $ENV{HOME} = "@TERMUX_PREFIX@/tmp"; } # no warnings to allow for undefined $XDG_* no warnings 'uninitialized'; -@@ -3411,7 +3411,7 @@ +@@ -3712,7 +3712,7 @@ unlink $stderrname; my $pid = ::open3($stdin_fh,$stdout_fh,$stderr_fh,