aboutsummaryrefslogtreecommitdiff
path: root/academic/OpenFOAM/OpenFOAM.SlackBuild
diff options
context:
space:
mode:
authorDavid Spencer <idlemoor@slackbuilds.org>2017-09-30 00:03:01 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-09-30 00:42:08 +0100
commitceb24dc9b7e31b47a14a8d66d0f5f83a57dae614 (patch)
treee05b153b106cedc17e8a9f5e3c2fe16cea93f97d /academic/OpenFOAM/OpenFOAM.SlackBuild
parentfda1946e2dbae805b4ffc9810cf983bcb001d899 (diff)
academic/OpenFOAM: Fix build.
Thanks to Lorenzo Trevisan :) Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'academic/OpenFOAM/OpenFOAM.SlackBuild')
-rw-r--r--academic/OpenFOAM/OpenFOAM.SlackBuild9
1 files changed, 5 insertions, 4 deletions
diff --git a/academic/OpenFOAM/OpenFOAM.SlackBuild b/academic/OpenFOAM/OpenFOAM.SlackBuild
index 40f65f4173faa..d4b76a6237a99 100644
--- a/academic/OpenFOAM/OpenFOAM.SlackBuild
+++ b/academic/OpenFOAM/OpenFOAM.SlackBuild
@@ -64,17 +64,18 @@ cd $PRGNAM-$VERSION
sed -i -e '16s=-lreadline=-lreadline -lncurses=' ./applications/utilities/mesh/manipulation/setSet/Allwmake
sed -i -e '47s=$HOME=/opt=' ./etc/bashrc
+# Fix bash_completion for posixly-incorrect identifier
+sed -i -e 's/rm~all/rmAll/g' etc/config.sh/bash_completion
# "Allwmake" below doesn't accept MAKEFLAGS. If MAKEFLAGS contains a -j option,
-# extract it and pass it to "Allwmake". (Thanks to Chris Willing)
+# extract the number of jobs and export it for "Allwmake". (Thanks to Chris Willing)
jval="$(echo $MAKEFLAGS |grep -o "\-j *[0-9]*" | grep -o "[0-9]*")" || true
-jobs=''
-[ -n "$jval" ] && jobs="-j${jval}"
+[ -n "$jval" ] && export WM_NCOMPPROCS="$jval"
(
. ./etc/bashrc || true
cd $WM_PROJECT_DIR
- ./Allwmake $jobs
+ ./Allwmake
# check for graphviz
if [ -x /usr/bin/dot ]; then
wmake all doc