Commit 6e03e1ec authored by Mark Olesen's avatar Mark Olesen

CONFIG: simplify version range

- accept [0-9]* instead of attempting more restrictive specifications

CONFIG: makePETSC without fortran
parent 7958c7e4
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# etc/pkgconfigAdjust
......@@ -36,7 +35,6 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
......@@ -67,7 +65,7 @@ while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-h | -help*) usage ;;
*)
pkgconfigAdjust "$1"
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# etc/pkgconfigPrefix
......@@ -28,13 +27,12 @@
#
# This allows this type of shell command
#
# etc/pkgconfigPrefix $(find platforms -type d -name pkgconfig)
# etc/pkgconfigPrefix $(find platforms -name pkgconfig -type d)
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
......@@ -64,7 +62,7 @@ while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-h | -help*) usage ;;
*)
pkgconfigNewPrefix "$1"
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2016-2017 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# etc/relocateQt
......@@ -23,7 +22,6 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
......@@ -58,12 +56,12 @@ while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-h | -help*) usage ;;
-f | -force)
optForce=true
;;
-qt-[1-9]* | [1-9]* | qt-*)
-qt-[0-9]* | [0-9]* | qt-*)
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
qtVERSION="${1%%/}";
qtVERSION="${qtVERSION##*-}"
......@@ -86,6 +84,6 @@ then
# Create qt.conf and adjust locations to use '${prefix}' internally
finalizeQt
fi
pkgconfigNewPrefix $QT_ARCH_PATH
pkgconfigNewPrefix "$QT_ARCH_PATH"
# -----------------------------------------------------------------------------
......@@ -6,11 +6,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# etc/tools/ParaViewFunctions
......
......@@ -5,11 +5,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2016-2018 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# etc/tools/vtkFunctions
......
......@@ -85,10 +85,8 @@ do
CMAKE_PATH="${2%%/}"
shift
;;
ADIOS2-[1-9]* | ADIOS2-git* | adios-[1-9]* | ADIOS-git*)
adiosPACKAGE="${1%%/}"
;;
adios2-[1-9]* | adios2-git* | adios-[1-9]* | adios-git*)
ADIOS2-[0-9]* | ADIOS2-git* | ADIOS-[0-9]* | ADIOS-git* | \
adios2-[0-9]* | adios2-git* | adios-[0-9]* | adios-git*)
adiosPACKAGE="${1%%/}"
;;
*)
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeCCMIO
......@@ -86,7 +85,7 @@ do
lib|libso)
targetType="$1"
;;
libccmio-[1-9]*)
libccmio-[0-9]*)
ccmioPACKAGE="${1%%/}"
;;
*)
......
......@@ -88,7 +88,7 @@ usage: ${0##*/} [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERS
options:
-gcc Force use of gcc/g++
-cmake PATH Use cmake from the given path
-no-lib Configure CGAL for headers-only mode (since CGAL 4.9)
-no-lib Configure CGAL for headers-only mode (default OpenFOAM >= 2006)
-with-lib Configure CGAL with library
-toolset=NAME Use named toolset in bootstrap
-system Use system versions for boost/gmp/mpfr
......@@ -143,11 +143,11 @@ do
-with-lib)
optHeadersOnly=false
;;
gmp-[4-9]* | gmp-system | gmp-none)
gmp-[0-9]* | gmp-system | gmp-none)
gmpPACKAGE="${1%%/}"
unset GMP_ARCH_PATH
;;
mpfr-[2-9]* | mpfr-system | mpfr-none)
mpfr-[0-9]* | mpfr-system | mpfr-none)
mpfrPACKAGE="${1%%/}"
unset MPFR_ARCH_PATH
;;
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeCmake
......@@ -71,7 +70,7 @@ do
-link)
optLink=true
;;
cmake-[1-9]*)
cmake-[0-9]*)
cmakePACKAGE="${1%%/}"
;;
*)
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeFFTW
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeGcc
......@@ -117,20 +116,23 @@ do
mpcPACKAGE="mpc-system"
unset GMP_ARCH_PATH MPFR_ARCH_PATH
;;
gmp-[4-9]* | gmp-system)
gmp-[0-9]* | gmp-system)
gmpPACKAGE="${1%%/}"
unset GMP_ARCH_PATH
;;
mpfr-[2-9]* | mpfr-system)
mpfr-[0-9]* | mpfr-system)
mpfrPACKAGE="${1%%/}"
unset MPFR_ARCH_PATH
;;
mpc-[0-9]* | mpc-system)
mpcPACKAGE="${1%%/}"
;;
gcc-[4-9]* | gcc-system)
gcc-[0-9]* | gcc-system)
gccPACKAGE="${1%%/}"
;;
[0-9]*)
gccPACKAGE="gcc-${1%%/}"
;;
*)
die "unknown option/argument: '$1'"
;;
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2012 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeGperftools
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2018-2019 OpenCFD Ltd.
# Copyright (C) 2018-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeHYPRE
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeKAHIP
......@@ -109,7 +108,7 @@ do
targetType="$1"
;;
kahip-[1-9]* | kahip-git | KaHIP_* | KaHIP-[1-9]*)
kahip-[0-9]* | kahip-git | KaHIP_* | KaHIP-[0-9]*)
kahipPACKAGE="${1%%/}"
unset KAHIP_ARCH_PATH # Avoid inconsistency
;;
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeLLVM
......@@ -95,7 +94,7 @@ do
llvm-[0-9]* | llvm-svn*)
llvmPACKAGE="${1%%/}"
;;
[1-9]*)
[0-9]*)
llvmPACKAGE="llvm-${1%%/}"
;;
*)
......@@ -148,7 +147,7 @@ then
set -x
$LLVM_SOURCE_DIR/configure \
--prefix=$LLVM_ARCH_PATH \
--with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \
--with-gcc-toolchain="$(command -v gcc | sed 's%/bin/gcc%%')" \
--enable-optimized \
--enable-shared \
&& set +x \
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2018 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMETIS
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMGridGen
......@@ -66,7 +65,7 @@ do
-h | -help) usage ;;
-gcc) useGcc ;;
mgridgen-[1-9]* | MGridGen-[1-9]* | parmgridgen-[1-9]* | ParMGridGen-[1-9]*)
mgridgen-[0-9]* | MGridGen-[0-9]* | parmgridgen-[0-9]* | ParMGridGen-[0-9]*)
mgridgenPACKAGE="${1%%/}"
;;
*)
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeOPENMPI
......
......@@ -152,7 +152,7 @@ echo
if [ "$targetType" = libso ]
then
configOpt="--with-shared-libraries"
configOpt="$configOpt --with-shared-libraries"
fi
if [ "$WM_LABEL_SIZE" = 64 ]
......@@ -169,25 +169,36 @@ echo
configOpt="$configOpt --with-precision=double"
fi
# We export compiler settings (above) but actually use the
# --with-cc and --with-cxx. So ignore them and flags
unset CC CXX
unset CFLAGS CXXFLAGS
cd "$PETSC_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf "$PETSC_ARCH_PATH"
## without tests? --testdir=..
set -x
./configure \
--prefix="$PETSC_ARCH_PATH" \
--with-petsc-arch="$archOpt" \
--with-clanguage=C \
--with-fc=0 \
--with-scalapack=0 \
--with-superlu_dist=0 \
--with-suitesparse=0 \
--download-f2cblaslapack=1 \
$configOpt \
&& set +x \
&& echo "Configured: petsc" \
&& make PETSC_DIR="$PETSC_SOURCE_DIR" PETSC_ARCH="$archOpt" all \
&& echo "Built: petsc" \
&& make PETSC_DIR="$PETSC_SOURCE_DIR" PETSC_ARCH="$archOpt" install \
&& echo "Installed: petsc"
&& echo "Installed: petsc - may require etc/pkgconfigPrefix to relocate"
) || {
echo "Error building: petsc"
exit 1
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeParaView
......@@ -274,7 +273,7 @@ do
-no-qt)
withQT=false
;;
-qt-[1-9]*)
-qt-[0-9]*)
withQT=true
QMAKE_PATH="$installBASE/${1##-}"
;;
......
......@@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeQt
......@@ -59,7 +58,7 @@ do
-h | -help) usage ;;
-gcc) useGcc ;;
-qt-[1-9]* | [1-9]* | qt-*)
-qt-[0-9]* | [0-9]* | qt-*)
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
qtVERSION="${1%%/}";
qtVERSION="${qtVERSION##*-}"
......
......@@ -81,7 +81,7 @@ do
-no-bin) unset optBinaries ;;
-no-mpi) unset withMPI ;;
scotch-[1-9]* | scotch-git | scotch_* | scotch-[1-9]*)
scotch-[0-9]* | scotch-git | scotch_* )
scotchPACKAGE="${1%%/}"
unset SCOTCH_ARCH_PATH # Avoid inconsistency
;;
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeVTK
......
......@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# minCmake
......@@ -84,6 +83,6 @@ do
done \
| sort -n -k 1 \
| xargs printf " %-10s %s\n"
# Use 4 leading spaces for easier pasting as Markdown
# 4 leading spaces for easy pasting as Markdown
#------------------------------------------------------------------------------
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment