Patch provided by Bruno Santos
This commit is contained in:
Henry Weller
2016-04-03 14:43:58 +01:00
parent 1379e08a39
commit 69dba76b31
3 changed files with 79 additions and 21 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -74,7 +74,10 @@ setDirs()
#
setVersion()
{
[ "$#" -ge 1 ] && ParaView_VERSION="${1##paraview-}"
if [ "$#" -ge 1 ]
then
ParaView_VERSION="${1##paraview-}"
fi
# the major version is "<digits>.<digits>"
ParaView_MAJOR=$(echo $ParaView_VERSION | \
@ -155,7 +158,10 @@ addCMakeVariable()
#
addVerbosity()
{
[ "$withVERBOSE" = true ] && addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
if [ "${withVERBOSE:=false}" = true ]
then
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
fi
}
@ -164,7 +170,11 @@ addVerbosity()
#
addMpiSupport()
{
[ "${withMPI:=false}" = true ] || return
if [ "${withMPI:=false}" != true ]
then
return
fi
OBJ_ADD="$OBJ_ADD-mpi"
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
@ -177,7 +187,11 @@ addMpiSupport()
#
addPythonSupport()
{
[ "${withPYTHON:=false}" = true ] || return
if [ "${withPYTHON:=false}" != true ]
then
return
fi
OBJ_ADD="$OBJ_ADD-py"
if pythonBin=$(which python 2>/dev/null)
@ -245,7 +259,10 @@ addPythonSupport()
#
addMesaSupport()
{
[ "${withMESA:=false}" = true ] || return
if [ "${withMESA:=false}" != true ]
then
return
fi
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
then
@ -269,7 +286,10 @@ addMesaSupport()
addQtSupport()
{
QtVersion=none
[ "${withQT:=false}" = true ] || return
if [ "${withQT:=false}" != true ]
then
return
fi
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
@ -328,10 +348,10 @@ addQtSupport()
QtMajor=$1
QtMinor=$2
if [[ ($QtMajor -lt 4) || ($QtMajor -eq 4 && $QtMinor -lt 5) ]]
if [ $QtMajor -ne 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ]
then
echo "*** Error: Qt version provided < 4.5"
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 "
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 and < 5.0"
echo "*** e.g."
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
@ -383,7 +403,10 @@ configParaView()
fi
# default to using cmake from the path
[ -n "$cmakeExe" ] || cmakeExe=cmake
if [ -z "$cmakeExe" ]
then
cmakeExe=cmake
fi
# remove any existing build folder and recreate
if [ -d $ParaView_BINARY_DIR ]
@ -436,7 +459,10 @@ makeParaView()
# remove lib if it is a link
# (how this was previously handled before 'make install' worked)
[ -L lib ] && rm lib 2>/dev/null
if [ -L lib ]
then
rm lib 2>/dev/null
fi
}

View File

@ -74,7 +74,10 @@ setDirs()
#
setVersion()
{
[ "$#" -ge 1 ] && ParaView_VERSION="${1##paraview-}"
if [ "$#" -ge 1 ]
then
ParaView_VERSION="${1##paraview-}"
fi
# The major version is "<digits>.<digits>"
ParaView_MAJOR=$(echo $ParaView_VERSION | \
@ -154,7 +157,10 @@ addCMakeVariable()
#
addVerbosity()
{
[ "$withVERBOSE" = true ] && addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
if [ "${withVERBOSE:=false}" = true ]
then
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
fi
}
@ -163,7 +169,11 @@ addVerbosity()
#
addMpiSupport()
{
[ "${withMPI:=false}" = true ] || return
if [ "${withMPI:=false}" != true ]
then
return
fi
OBJ_ADD="$OBJ_ADD-mpi"
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
@ -176,7 +186,11 @@ addMpiSupport()
#
addPythonSupport()
{
[ "${withPYTHON:=false}" = true ] || return
if [ "${withPYTHON:=false}" != true ]
then
return
fi
OBJ_ADD="$OBJ_ADD-py"
if pythonBin=$(which python 2>/dev/null)
@ -244,7 +258,10 @@ addPythonSupport()
#
addMesaSupport()
{
[ "${withMESA:=false}" = true ] || return
if [ "${withMESA:=false}" != true ]
then
return
fi
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
then
@ -268,7 +285,11 @@ addMesaSupport()
addQtSupport()
{
QtVersion=none
[ "${withQT:=false}" = true ] || return
if [ "${withQT:=false}" != true ]
then
return
fi
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
@ -327,10 +348,10 @@ addQtSupport()
QtMajor=$1
QtMinor=$2
if [ $QtMajor -lt 4 ] || [ $QtMajor -eq 4 -a $QtMinor -lt 5 ]
if [ $QtMajor -lt 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ]
then
echo "*** Error: Qt version provided < 4.5"
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 "
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5"
echo "*** e.g."
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
@ -382,7 +403,10 @@ configParaView()
fi
# Default to using cmake from the path
[ -n "$cmakeExe" ] || cmakeExe=cmake
if [ -z "$cmakeExe" ]
then
cmakeExe=cmake
fi
# Remove any existing build folder and recreate
if [ -d $ParaView_BINARY_DIR ]
@ -438,7 +462,10 @@ makeParaView()
# Remove lib if it is a link
# (how this was previously handled before 'make install' worked)
[ -L lib ] && rm lib 2>/dev/null
if [ -L lib ]
then
rm lib 2>/dev/null
fi
}

View File

@ -187,6 +187,11 @@ else
exit 1
fi
if [ "$cgal_version" = "cgal-system" ]
then
echo "Using system installation of CGAL"
exit 0
fi
#
# Build CGAL