From f78687289269c83f0a3348f3647822eed345c3cf Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 31 Dec 2014 18:49:45 +0000 Subject: [PATCH] Initial commit of the scripts --- Allclean | 62 +++ Allwmake | 364 +++++++++++++ AllwmakeLibccmio | 85 +++ etc/tools/ParaView4Functions | 497 +++++++++++++++++ etc/tools/ParaViewFunctions | 508 ++++++++++++++++++ etc/tools/ThirdPartyFunctions | 122 +++++ ....inc.i686_pc_linux2.shlib-OpenFOAM-32Int32 | 21 + ....inc.i686_pc_linux2.shlib-OpenFOAM-64Int32 | 21 + ....inc.i686_pc_linux2.shlib-OpenFOAM-64Int64 | 21 + makeCGAL | 290 ++++++++++ makeCmake | 123 +++++ makeGcc | 291 ++++++++++ makeGcc46 | 291 ++++++++++ makeGcc47 | 291 ++++++++++ makeGcc48 | 288 ++++++++++ makeGcc49 | 288 ++++++++++ makeGperftools | 118 ++++ makeLLVM | 134 +++++ makeParaView | 331 ++++++++++++ makeParaView4 | 337 ++++++++++++ 20 files changed, 4483 insertions(+) create mode 100755 Allclean create mode 100755 Allwmake create mode 100755 AllwmakeLibccmio create mode 100644 etc/tools/ParaView4Functions create mode 100644 etc/tools/ParaViewFunctions create mode 100644 etc/tools/ThirdPartyFunctions create mode 100644 etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-32Int32 create mode 100644 etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int32 create mode 100644 etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int64 create mode 100755 makeCGAL create mode 100755 makeCmake create mode 100755 makeGcc create mode 100755 makeGcc46 create mode 100755 makeGcc47 create mode 100755 makeGcc48 create mode 100755 makeGcc49 create mode 100755 makeGperftools create mode 100755 makeLLVM create mode 100755 makeParaView create mode 100755 makeParaView4 diff --git a/Allclean b/Allclean new file mode 100755 index 0000000..524fde9 --- /dev/null +++ b/Allclean @@ -0,0 +1,62 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# AllClean +# +# Description +# Clean script for third-party applications and libraries +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +# . etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + + +# clean various packages via 'distclean' +for i in openmpi-* +do + [ -d "$i" ] && ( set -x; cd $i && make distclean ) +done + + +# clean various packages via 'realclean' +for i in scotch*/src +do + [ -d "$i" ] && ( set -x; cd $i && make realclean ) +done + + +# clean out-of-source build directories +[ -d platforms ] && ( set -x; rm -rf platforms/* ) + + +# ----------------------------------------------------------------- end-of-file diff --git a/Allwmake b/Allwmake new file mode 100755 index 0000000..44152c7 --- /dev/null +++ b/Allwmake @@ -0,0 +1,364 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# Allwmake +# +# Description +# Build script for ThirdParty +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +[ -n "$FOAM_EXT_LIBBIN" ] || { + echo "Error: FOAM_EXT_LIBBIN not set" + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +# export WM settings in a form that GNU configure recognizes +[ -n "$WM_CC" ] && export CC="$WM_CC" +[ -n "$WM_CXX" ] && export CXX="$WM_CXX" +[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" +[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" +[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + +echo +echo ======================================== +echo Start ThirdParty Allwmake +echo ======================================== +echo + + +echo ======================================== +echo Build MPI libraries if required +echo +case "$WM_MPLIB" in +OPENMPI) + if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ] + then + echo " have $WM_MPLIB shared library ($FOAM_MPI)" + echo + elif [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.a ] + then + echo " have $WM_MPLIB static library ($FOAM_MPI)" + echo + else + ( + set -x + cd "${MPI_ARCH_PATH##*/}" || exit 1 # change to openmpi-VERSION + + make distclean 2>/dev/null + rm -rf $MPI_ARCH_PATH + + # start with GridEngine support, + # it can be built without external libraries + configOpt="--with-sge" + + # Infiniband support + # if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ] + # then + # configOpt="$configOpt --with-openib=/usr/local/ofed" + # configOpt="$configOpt --with-openib-libdir=/usr/local/ofed/lib64" + # fi + + ./configure \ + --prefix=$MPI_ARCH_PATH \ + --disable-orterun-prefix-by-default \ + --enable-shared --disable-static \ + --libdir=$MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH} \ + --disable-mpi-f77 \ + --disable-mpi-f90 \ + --disable-mpi-cxx \ + --disable-mpi-profile \ + $configOpt \ + ; + + make -j $WM_NCOMPPROCS && make install + make distclean + ) + fi + ;; + +MPICH) + if [ -r $MPI_ARCH_PATH/lib/libmpich.so ] + then + echo " have $WM_MPLIB shared library ($FOAM_MPI)" + echo + echo + elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ] + then + echo " have $WM_MPLIB static library ($FOAM_MPI)" + echo + else + ( + set -x + cd $MPI_HOME || exit 1 # change to mpich-VERSION + + make distclean 2>/dev/null + rm -rf $MPI_ARCH_PATH + rm util/machines/machines.* + + ./configure \ + --prefix=$MPI_ARCH_PATH \ + --without-mpe \ + --disable-f77 \ + --disable-f90 \ + --disable-f90modules \ + --disable-c++ \ + --disable-mpedbg \ + --disable-devdebug \ + --disable-debug \ + --enable-sharedlib=$MPI_ARCH_PATH/lib \ + --with-device=ch_p4 \ + ; + + make -j $WM_NCOMPPROCS && make install + make distclean + + if [ -r $MPI_ARCH_PATH ] + then + cd $MPI_ARCH_PATH/bin + for file in * + do + sed s%$MPI_ARCH_PATH%'$MPI_ARCH_PATH'%g $file > temp.$$ + mv temp.$$ $file + chmod 0755 $file + done + + cd $MPI_ARCH_PATH/lib + + if [ -r libmpich.so.1.0 ] + then + rm *.so + ln -s libmpich.so.1.0 libmpich.so + fi + fi + ) + fi + ;; + +esac + + +# get SCOTCH_VERSION, SCOTCH_ARCH_PATH +if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh` +then + . $settings +else + echo + echo "Error: no config/scotch.sh settings" + echo +fi + +# building scotch is still a bit of a pain +echo ======================================== +echo "Build Scotch decomposition library $SCOTCH_VERSION" +echo " $SCOTCH_ARCH_PATH" + +# this needs generalizing +scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-$WM_ARCH_OPTION$WM_LABEL_OPTION + +if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \ + -a -r $FOAM_EXT_LIBBIN/libscotch.so \ + -a -r $FOAM_EXT_LIBBIN/libscotcherrexit.so ] +then + echo " scotch header in $SCOTCH_ARCH_PATH/include" + echo " scotch libs in $FOAM_EXT_LIBBIN" + echo +else +( + set -x + cd $SCOTCH_VERSION/src || exit 1 + + prefixDIR=$SCOTCH_ARCH_PATH + libDIR=$FOAM_EXT_LIBBIN + + mkdir -p $prefixDIR 2>/dev/null + mkdir -p $libDIR 2>/dev/null + + configOpt="prefix=$prefixDIR libdir=$libDIR" + + if [ -f $scotchMakefile ] + then + rm -f Makefile.inc + ln -s $scotchMakefile Makefile.inc + fi + + [ -f Makefile.inc ] || { + echo " Error: scotch needs an appropriate Makefile.inc" + exit 1 + } + + # handle non-gcc compilers + unset configEnv + [ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC" + + make realclean 2>/dev/null # for safety + + make -j $WM_NCOMPPROCS $configEnv scotch \ + && make $configOpt install + + # cleanup, could also remove Makefile.inc + make realclean 2>/dev/null +) +fi + +# verify existence of scotch include +[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || { + echo + echo " WARNING: required include file 'scotch.h' not found!" + echo +} + + +# build ptscotch if MPI (ThirdParty or system) is available +if [ "${FOAM_MPI:-dummy}" != dummy ] +then + echo ======================================== + echo "Build PTScotch decomposition library $SCOTCH_VERSION (uses MPI)" + echo " $SCOTCH_ARCH_PATH" + echo + + if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \ + -a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \ + -a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotcherrexit.so ] + then + echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI" + echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI" + echo + else + ( + set -x + cd $SCOTCH_VERSION/src || exit 1 + + prefixDIR=$SCOTCH_ARCH_PATH + libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI + incDIR=$SCOTCH_ARCH_PATH/include/$FOAM_MPI + + mkdir -p $prefixDIR 2>/dev/null + mkdir -p $libDIR 2>/dev/null + + configOpt="prefix=$prefixDIR libdir=$libDIR includedir=$incDIR" + + if [ -f $scotchMakefile ] + then + rm -f Makefile.inc + ln -s $scotchMakefile Makefile.inc + fi + + [ -f Makefile.inc ] || { + echo " Error: scotch needs an appropriate Makefile.inc" + exit 1 + } + + # handle non-gcc compilers + unset configEnv + [ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC" + + make realclean 2>/dev/null # for safety + + make -j $WM_NCOMPPROCS $configEnv ptscotch \ + && make $configOpt install + + # cleanup, could also remove Makefile.inc + make realclean 2>/dev/null + ) + fi + + # verify existence of scotch include + [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || { + echo + echo " WARNING: required include file 'ptscotch.h' not found!" + echo + } +fi + + +# ----------------------------------------------------------------------------- + +# Metis is optional +echo ======================================== +echo Build Metis decomposition + +# get METIS_VERSION, METIS_ARCH_PATH +if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh` +then + . $settings +fi +if [ -d "$METIS_VERSION" ] +then + + if [ -f $METIS_ARCH_PATH/include/metis.h \ + -a -r $FOAM_EXT_LIBBIN/libmetis.so ] + then + echo " metis header in $METIS_ARCH_PATH/include" + echo " metis libs in $FOAM_EXT_LIBBIN" + echo + else + set -x + cd $METIS_VERSION || exit 1 + make config shared=1 prefix=$METIS_ARCH_PATH + make -j $WM_NCOMPPROCS install + cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN + fi +else + echo " optional component Metis was not found" +fi + + +# CGAL is optional +echo ======================================== +echo Build CGAL +if [ -n "$CGAL_ARCH_PATH" ] +then +( + if [ -r $CGAL_ARCH_PATH/lib/libCGAL.so ] + then + echo " CGAL headers in $CGAL_ARCH_PATH/include" + echo " CGAL libs in $CGAL_ARCH_PATH/lib" + else + ./makeCGAL + fi +) +else + echo " optional component was not found" +fi + +echo +echo ======================================== +echo Done ThirdParty Allwmake +echo ======================================== +echo + + +# ----------------------------------------------------------------- end-of-file diff --git a/AllwmakeLibccmio b/AllwmakeLibccmio new file mode 100755 index 0000000..a3473a5 --- /dev/null +++ b/AllwmakeLibccmio @@ -0,0 +1,85 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# AllwmakeLibccmio +# +# Description +# Get and build CD-adapco's ccmio library +# +#------------------------------------------------------------------------------ +packageDir=libccmio-2.6.1 + +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() +{ + cat<. +# +# File +# etc/tools/ParaViewFunctions +# +# Description +# ParaView make/install helper functions +# +#------------------------------------------------------------------------------ + +# buildBASE, installBASE defined from tools/ThirdPartyFunctions + +# +# where things are or should be put +# ParaView_VERSION and ParaView_MAJOR should already have been set +# +# ParaView_SOURCE_DIR : location of the original sources +# ParaView_BINARY_DIR : location of the build +# ParaView_DIR : location of the installed program +# +setDirs() +{ + ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION + + [ -d "$ParaView_SOURCE_DIR" ] || { + echo "did not find ParaView-$ParaView_VERSION in these directories:" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo + echo "abort build" + exit 1 + } + + # ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD + ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION + + # ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD + ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION + + export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR + + echo + echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR" + echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR" + echo "ParaView_DIR=$ParaView_DIR" +} + + +# +# set ParaView_VERSION and adjust ParaView_MAJOR accordingly +# +setVersion() +{ + [ "$#" -ge 1 ] && ParaView_VERSION="${1##paraview-}" + + # the major version is "." + ParaView_MAJOR=$(echo $ParaView_VERSION | \ + sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/') + + export ParaView_VERSION ParaView_MAJOR +} + + +#------------------------------------------------------------------------------ + +# +# extract and echo date stamp information from +# VTK/Utilities/kwsys/kwsysDateStamp.cmake +# since the order of the entries is already correct, can use simple sed script +# +echoDateStamp() +{ + ( + set -- $( + sed -ne 's/^SET(KWSYS_DATE_STAMP_[A-Z]*\([ 0-9]*\)).*$/\1/p' \ + $ParaView_SOURCE_DIR/VTK/Utilities/kwsys/kwsysDateStamp.cmake + ) + + IFS='-' + echo "date-stamp: $*" + ) +} + + +# +# extract version information from +# CMakeLists.txt +# since the order of the entries is already correct, can use simple sed script +# +getVersion() +{ + ( + set -- $( + sed -ne 's/^SET(PARAVIEW_VERSION_[A-Z]*\([ 0-9]*\)).*$/\1/p' \ + $ParaView_SOURCE_DIR/CMakeLists.txt + ) + + IFS='.' + echo "$*" + ) +} + +# +# compare version information +# +checkVersion() +{ + local ver=$(getVersion) + if [ "$ParaView_VERSION" != "$ver" ] + then + echo "MISMATCH!" + echo " specified $ParaView_VERSION" + echo " found $ver" + fi +} + +# +# set CMake cache variables +# +addCMakeVariable() +{ + while [ -n "$1" ] + do + CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1" + shift + done +} + + +# +# verbose makefiles +# +addVerbosity() +{ + [ "$withVERBOSE" = true ] && addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE" +} + + +# +# define options for mpi support +# +addMpiSupport() +{ + [ "${withMPI:=false}" = true ] || return + OBJ_ADD="$OBJ_ADD-mpi" + + addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON" + addCMakeVariable "MPI_INCLUDE_PATH=$MPI_ARCH_PATH/include" + addCMakeVariable "MPI_LIBRARY=$MPI_ARCH_PATH/lib/libmpi.so" + if [ -e $MPI_ARCH_PATH/lib/libmpi_cxx.so ] + then + addCMakeVariable "MPI_EXTRA_LIBRARY=$MPI_ARCH_PATH/lib/libmpi_cxx.so" + fi + addCMakeVariable "VTK_MPIRUN_EXE=$MPI_ARCH_PATH/bin/mpirun" + addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS" +} + + +# +# define options for python support +# +addPythonSupport() +{ + [ "${withPYTHON:=false}" = true ] || return + OBJ_ADD="$OBJ_ADD-py" + + if pythonBin=$(which python 2>/dev/null) + then + if [ -n "$PYTHON_LIBRARY" ] + then + # check $PYTHON_LIBRARY if it has been set + if [ ! -e "$PYTHON_LIBRARY" ] + then + echo "*** Error: libpython not found at location specified " \ + "by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY" + fi + else + # Try to get $PYTHON_LIBRARY from dynamically linked binary + PYTHON_LIBRARY=$(ldd $pythonBin | \ + sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p') + + [ -e "$PYTHON_LIBRARY" ] || { + echo "*** Error: Unable to determine path to python library." + } + fi + + [ -e "$PYTHON_LIBRARY" ] || { + echo " Please set the full path to the python library " + echo " (including libpython) using the -python-lib option, " + echo " or deactivate python support by not using the -python " + echo " option" + exit 1 + } + + pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/') + pythonInclude=/usr/include/python$pythonMajor + + # note - we could also allow for a PYTHON_INCLUDE variable ... + [ -d "$pythonInclude" ] || { + echo " No python headers found in $pythonInclude/" + echo " Please install python headers or deactivate " + echo " python support by not using the -python option" + exit 1 + } + + addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON" + addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude" + addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY" + + echo "----" + echo "Python information:" + echo " executable : $pythonBin" + echo " version : $pythonMajor" + echo " include path : $pythonInclude" + echo " library : $PYTHON_LIBRARY" + + unset pythonBin pythonInclude pythonMajor + else + echo "*** Error: python not found" + echo "*** Deactivate python support by not using the -python " + echo "*** option" + exit 1 + fi +} + + +# +# define options for mesa support +# +addMesaSupport() +{ + [ "${withMESA:=false}" = true ] || return + + if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ] + then + OBJ_ADD="$OBJ_ADD-mesa" + + addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON" + addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE" + addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY" + + else + echo "*** Error: no MESA information found" + echo "*** Deactivate MESA support by not using the -mesa option, " + echo "*** or set the correct paths for:" + echo "*** -mesa-include ($MESA_INCLUDE)" + echo "*** -mesa-lib ($MESA_LIBRARY)" + exit 1 + fi +} + + +addQtSupport() +{ + QtVersion=none + [ "${withQT:=false}" = true ] || return + + addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" + + unset qmakeExe + if [ -n "$QMAKE_PATH" ] + then + if [ -d "$QMAKE_PATH" ] + then + if [ -x "$QMAKE_PATH/qmake" ] + then + qmakeExe=$QMAKE_PATH/qmake + elif [ -x "$QMAKE_PATH/bin/qmake" ] + then + qmakeExe=$QMAKE_PATH/bin/qmake + fi + elif [ -x "$QMAKE_PATH" ] + then + qmakeExe=$QMAKE_PATH + fi + + if [ -n "$qmakeExe" ] + then + # use absolute path + if [ "${qmakeExe#/}" = "$qmakeExe" ] + then + qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake" + fi + else + echo + echo "qmake not found under specified QMAKE_PATH" + echo " QMAKE_PATH=$QMAKE_PATH" + echo "leaving unspecified" + echo + fi + fi + + # default to using qmake from the path + if [ -n "$qmakeExe" ] + then + addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe" + else + qmakeExe=qmake + fi + + + # Check qmake can be found + if type $qmakeExe >/dev/null 2>&1 + then + # Check the Qt version selected + # parse -> "Using Qt version X.Y.Z in ..." + QtVersion=$($qmakeExe -query QT_VERSION) + + # split Major.Minor.Revision - could also use IFS hacking + set -- $(echo "$QtVersion" | sed -e 's/\./ /g') + + QtMajor=$1 + QtMinor=$2 + + if [ $QtMajor -lt 4 -o $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.3 " + echo "*** e.g." + echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake" + echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake" + exit 1 + fi + else + echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + exit 1 + fi +} + + +# +# configure via cmake, but don't actually build anything +# +configParaView() +{ + unset cmakeExe + if [ -n "$CMAKE_PATH" ] + then + if [ -d "$CMAKE_PATH" ] + then + if [ -x "$CMAKE_PATH/cmake" ] + then + cmakeExe=$CMAKE_PATH/cmake + elif [ -x "$CMAKE_PATH/bin/cmake" ] + then + cmakeExe=$CMAKE_PATH/bin/cmake + fi + elif [ -x "$CMAKE_PATH" ] + then + cmakeExe=$CMAKE_PATH + fi + + if [ -n "$cmakeExe" ] + then + # use absolute path + if [ "${cmakeExe#/}" = "$cmakeExe" ] + then + cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake" + fi + else + echo + echo "cmake not found under specified CMAKE_PATH" + echo " CMAKE_PATH=$CMAKE_PATH" + echo "leaving unspecified" + echo + fi + fi + + # default to using cmake from the path + [ -n "$cmakeExe" ] || cmakeExe=cmake + + # remove any existing build folder and recreate + if [ -d $ParaView_BINARY_DIR ] + then + echo "removing old build directory" + echo " $ParaView_BINARY_DIR" + rm -rf $ParaView_BINARY_DIR + fi + mkdir -p $ParaView_BINARY_DIR + + addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType" + + cd $ParaView_BINARY_DIR || exit 1 # change to build folder + + echo "----" + echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)" + echo " MPI support : ${withMPI:-false}" + echo " Python support : ${withPYTHON:-false}" + echo " MESA support : ${withMESA:-false}" + echo " Qt dev support : ${withQT:-false}" + echo " Source : $ParaView_SOURCE_DIR" + echo " Build : $ParaView_BINARY_DIR" + echo " Target : $ParaView_DIR" + echo " Build type : $buildType" + echo "----" + echo + echo "$cmakeExe" \ + -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ + $CMAKE_VARIABLES \ + $ParaView_SOURCE_DIR + echo + echo "----" + echo + + # run cmake to create Makefiles + $cmakeExe \ + -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ + $CMAKE_VARIABLES \ + $ParaView_SOURCE_DIR +} + + +# +# invoke make +# also link bin/ to lib/paraview-* for development without installation +# +makeParaView() +{ + cd $ParaView_BINARY_DIR || exit 1 # change to build folder + echo " Starting make" + time make -j $WM_NCOMPPROCS + echo " Done make" + + # remove lib if it is a link + # (how this was previously handled before 'make install' worked) + [ -L lib ] && rm lib 2>/dev/null +} + + +# +# install the program +# +installParaView() +{ + cd $ParaView_BINARY_DIR || exit 1 # change to build folder + echo " Installing ParaView to $ParaView_DIR" + + make install + +cat<< INFO + --- + Installation complete for paraview-$ParaView_VERSION + Set environment variables: + + export ParaView_DIR=$ParaView_DIR + export PATH=\$ParaView_DIR/bin:\$PATH + export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview-$ParaView_MAJOR + --- +INFO +} + + +#------------------------------------------------------------------------------ + +# clear the referenced variables before using any of the functions +unset withMPI withVERBOSE +unset withQT QMAKE_PATH +unset withMESA MESA_INCLUDE MESA_LIBRARY +unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY +unset CMAKE_VARIABLES +unset OBJ_ADD +unset buildType + +# start with these general settings +addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF" + +# include development files in "make install" +addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON" + +# don't build test tree +addCMakeVariable "BUILD_TESTING:BOOL=OFF" + +# remove dependency on WebKit +# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF + + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions new file mode 100644 index 0000000..c899556 --- /dev/null +++ b/etc/tools/ParaViewFunctions @@ -0,0 +1,508 @@ +#---------------------------------*- sh -*------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# File +# etc/tools/ParaViewFunctions +# +# Description +# ParaView make/install helper functions +# +#------------------------------------------------------------------------------ + +# buildBASE, installBASE defined from tools/ThirdPartyFunctions + +# +# where things are or should be put +# ParaView_VERSION and ParaView_MAJOR should already have been set +# +# ParaView_SOURCE_DIR : location of the original sources +# ParaView_BINARY_DIR : location of the build +# ParaView_DIR : location of the installed program +# +setDirs() +{ + ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION + + [ -d "$ParaView_SOURCE_DIR" ] || { + echo "did not find ParaView-$ParaView_VERSION in these directories:" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo + echo "abort build" + exit 1 + } + + # ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD + ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION + + # ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD + ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION + + export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR + + echo + echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR" + echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR" + echo "ParaView_DIR=$ParaView_DIR" +} + + +# +# set ParaView_VERSION and adjust ParaView_MAJOR accordingly +# +setVersion() +{ + [ "$#" -ge 1 ] && ParaView_VERSION="${1##paraview-}" + + # the major version is "." + ParaView_MAJOR=$(echo $ParaView_VERSION | \ + sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/') + + export ParaView_VERSION ParaView_MAJOR +} + + +#------------------------------------------------------------------------------ + +# +# extract and echo date stamp information from +# VTK/Utilities/kwsys/kwsysDateStamp.cmake +# since the order of the entries is already correct, can use simple sed script +# +echoDateStamp() +{ + ( + set -- $( + sed -ne 's/^SET(KWSYS_DATE_STAMP_[A-Z]*\([ 0-9]*\)).*$/\1/p' \ + $ParaView_SOURCE_DIR/VTK/Utilities/kwsys/kwsysDateStamp.cmake + ) + + IFS='-' + echo "date-stamp: $*" + ) +} + + +# +# extract version information from +# CMakeLists.txt +# since the order of the entries is already correct, can use simple sed script +# +getVersion() +{ + ( + set -- $( + sed -ne 's/^SET(PARAVIEW_VERSION_[A-Z]*\([ 0-9]*\)).*$/\1/p' \ + $ParaView_SOURCE_DIR/CMakeLists.txt + ) + + IFS='.' + echo "$*" + ) +} + +# +# compare version information +# +checkVersion() +{ + local ver=$(getVersion) + if [ "$ParaView_VERSION" != "$ver" ] + then + echo "MISMATCH!" + echo " specified $ParaView_VERSION" + echo " found $ver" + fi +} + +# +# set CMake cache variables +# +addCMakeVariable() +{ + while [ -n "$1" ] + do + CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1" + shift + done +} + + +# +# verbose makefiles +# +addVerbosity() +{ + [ "$withVERBOSE" = true ] && addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE" +} + + +# +# define options for mpi support +# +addMpiSupport() +{ + [ "${withMPI:=false}" = true ] || return + OBJ_ADD="$OBJ_ADD-mpi" + + addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON" + addCMakeVariable "MPI_INCLUDE_PATH=$MPI_ARCH_PATH/include" + addCMakeVariable "MPI_LIBRARY=$MPI_ARCH_PATH/lib/libmpi.so" + if [ -e $MPI_ARCH_PATH/lib/libmpi_cxx.so ] + then + addCMakeVariable "MPI_EXTRA_LIBRARY=$MPI_ARCH_PATH/lib/libmpi_cxx.so" + fi + addCMakeVariable "VTK_MPIRUN_EXE=$MPI_ARCH_PATH/bin/mpirun" + addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS" +} + + +# +# define options for python support +# +addPythonSupport() +{ + [ "${withPYTHON:=false}" = true ] || return + OBJ_ADD="$OBJ_ADD-py" + + if pythonBin=$(which python 2>/dev/null) + then + if [ -n "$PYTHON_LIBRARY" ] + then + # check $PYTHON_LIBRARY if it has been set + if [ ! -e "$PYTHON_LIBRARY" ] + then + echo "*** Error: libpython not found at location specified " \ + "by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY" + fi + else + # Try to get $PYTHON_LIBRARY from dynamically linked binary + PYTHON_LIBRARY=$(ldd $pythonBin | \ + sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p') + + [ -e "$PYTHON_LIBRARY" ] || { + echo "*** Error: Unable to determine path to python library." + } + fi + + [ -e "$PYTHON_LIBRARY" ] || { + echo " Please set the full path to the python library " + echo " (including libpython) using the -python-lib option, " + echo " or deactivate python support by not using the -python " + echo " option" + exit 1 + } + + pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/') + pythonInclude=/usr/include/python$pythonMajor + + # note - we could also allow for a PYTHON_INCLUDE variable ... + [ -d "$pythonInclude" ] || { + echo " No python headers found in $pythonInclude/" + echo " Please install python headers or deactivate " + echo " python support by not using the -python option" + exit 1 + } + + addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON" + addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude" + addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY" + + echo "----" + echo "Python information:" + echo " executable : $pythonBin" + echo " version : $pythonMajor" + echo " include path : $pythonInclude" + echo " library : $PYTHON_LIBRARY" + + unset pythonBin pythonInclude pythonMajor + else + echo "*** Error: python not found" + echo "*** Deactivate python support by not using the -python " + echo "*** option" + exit 1 + fi +} + + +# +# define options for mesa support +# +addMesaSupport() +{ + [ "${withMESA:=false}" = true ] || return + + if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ] + then + OBJ_ADD="$OBJ_ADD-mesa" + + addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON" + addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE" + addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY" + + else + echo "*** Error: no MESA information found" + echo "*** Deactivate MESA support by not using the -mesa option, " + echo "*** or set the correct paths for:" + echo "*** -mesa-include ($MESA_INCLUDE)" + echo "*** -mesa-lib ($MESA_LIBRARY)" + exit 1 + fi +} + + +addQtSupport() +{ + QtVersion=none + [ "${withQT:=false}" = true ] || return + + addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" + + unset qmakeExe + if [ -n "$QMAKE_PATH" ] + then + if [ -d "$QMAKE_PATH" ] + then + if [ -x "$QMAKE_PATH/qmake" ] + then + qmakeExe=$QMAKE_PATH/qmake + elif [ -x "$QMAKE_PATH/bin/qmake" ] + then + qmakeExe=$QMAKE_PATH/bin/qmake + fi + elif [ -x "$QMAKE_PATH" ] + then + qmakeExe=$QMAKE_PATH + fi + + if [ -n "$qmakeExe" ] + then + # use absolute path + if [ "${qmakeExe#/}" = "$qmakeExe" ] + then + qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake" + fi + else + echo + echo "qmake not found under specified QMAKE_PATH" + echo " QMAKE_PATH=$QMAKE_PATH" + echo "leaving unspecified" + echo + fi + fi + + # default to using qmake from the path + if [ -n "$qmakeExe" ] + then + addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe" + else + qmakeExe=qmake + fi + + + # Check qmake can be found + if type $qmakeExe >/dev/null 2>&1 + then + # Check the Qt version selected + # parse -> "Using Qt version X.Y.Z in ..." + QtVersion=$($qmakeExe -query QT_VERSION) + + # split Major.Minor.Revision - could also use IFS hacking + set -- $(echo "$QtVersion" | sed -e 's/\./ /g') + + QtMajor=$1 + QtMinor=$2 + + if [ $QtMajor -lt 4 -o $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.3 " + echo "*** e.g." + echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake" + echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake" + exit 1 + fi + else + echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + exit 1 + fi +} + + +# +# configure via cmake, but don't actually build anything +# +configParaView() +{ + unset cmakeExe + if [ -n "$CMAKE_PATH" ] + then + if [ -d "$CMAKE_PATH" ] + then + if [ -x "$CMAKE_PATH/cmake" ] + then + cmakeExe=$CMAKE_PATH/cmake + elif [ -x "$CMAKE_PATH/bin/cmake" ] + then + cmakeExe=$CMAKE_PATH/bin/cmake + fi + elif [ -x "$CMAKE_PATH" ] + then + cmakeExe=$CMAKE_PATH + fi + + if [ -n "$cmakeExe" ] + then + # use absolute path + if [ "${cmakeExe#/}" = "$cmakeExe" ] + then + cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake" + fi + else + echo + echo "cmake not found under specified CMAKE_PATH" + echo " CMAKE_PATH=$CMAKE_PATH" + echo "leaving unspecified" + echo + fi + fi + + # default to using cmake from the path + [ -n "$cmakeExe" ] || cmakeExe=cmake + + # remove any existing build folder and recreate + if [ -d $ParaView_BINARY_DIR ] + then + echo "removing old build directory" + echo " $ParaView_BINARY_DIR" + rm -rf $ParaView_BINARY_DIR + fi + mkdir -p $ParaView_BINARY_DIR + + cd $ParaView_BINARY_DIR || exit 1 # change to build folder + + echo "----" + echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)" + echo " MPI support : ${withMPI:-false}" + echo " Python support : ${withPYTHON:-false}" + echo " MESA support : ${withMESA:-false}" + echo " Qt dev support : ${withQT:-false}" + echo " Source : $ParaView_SOURCE_DIR" + echo " Build : $ParaView_BINARY_DIR" + echo " Target : $ParaView_DIR" + echo "----" + echo + echo "$cmakeExe" \ + -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ + $CMAKE_VARIABLES \ + $ParaView_SOURCE_DIR + echo + echo "----" + echo + + # run cmake to create Makefiles + $cmakeExe \ + -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ + $CMAKE_VARIABLES \ + $ParaView_SOURCE_DIR +} + + +# +# invoke make +# also link bin/ to lib/paraview-* for development without installation +# +makeParaView() +{ + cd $ParaView_BINARY_DIR || exit 1 # change to build folder + echo " Starting make" + time make -j $WM_NCOMPPROCS + echo " Done make" + + # remove lib if it is a link + # (how this was previously handled before 'make install' worked) + [ -L lib ] && rm lib 2>/dev/null +} + + +# +# install the program +# +installParaView() +{ + cd $ParaView_BINARY_DIR || exit 1 # change to build folder + echo " Installing ParaView to $ParaView_DIR" + + make install + +# hack for missing files after install of version 3.14.1 + echo "Copying missing files to install folder" + CMAKE_SRC_DIR=$ParaView_SOURCE_DIR/CMake + CMAKE_INSTALL_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR/CMake + cp -f $ParaView_SOURCE_DIR/ParaViewUse.cmake $CMAKE_INSTALL_DIR + cp -f $CMAKE_SRC_DIR/generate_proxydocumentation.cmake $CMAKE_INSTALL_DIR + cp -f $CMAKE_SRC_DIR/smxml_to_xml.xsl $CMAKE_INSTALL_DIR + cp -f $CMAKE_SRC_DIR/xml_to_html.xsl $CMAKE_INSTALL_DIR + cp -f $CMAKE_SRC_DIR/xml_to_wiki.xsl.in $CMAKE_INSTALL_DIR + cp -f $CMAKE_SRC_DIR/generate_qhp.cmake $CMAKE_INSTALL_DIR + unset CMAKE_SRC_DIR CMAKE_INSTALL_DIR +# --- end hack + +cat<< INFO + --- + Installation complete for paraview-$ParaView_VERSION + Set environment variables: + + export ParaView_DIR=$ParaView_DIR + export PATH=\$ParaView_DIR/bin:\$PATH + export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview-$ParaView_MAJOR + --- +INFO +} + + +#------------------------------------------------------------------------------ + +# clear the referenced variables before using any of the functions +unset withMPI withVERBOSE +unset withQT QMAKE_PATH +unset withMESA MESA_INCLUDE MESA_LIBRARY +unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY +unset CMAKE_VARIABLES +unset OBJ_ADD + + +# start with these general settings +addCMakeVariable "VTK_USE_TK:BOOL=OFF" +addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF" +addCMakeVariable "CMAKE_BUILD_TYPE:STRING=Release" + +# include development files in "make install" +addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON" + +# don't build test tree +addCMakeVariable "BUILD_TESTING:BOOL=OFF" + +# remove dependency on WebKit +# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions new file mode 100644 index 0000000..a82a569 --- /dev/null +++ b/etc/tools/ThirdPartyFunctions @@ -0,0 +1,122 @@ +#---------------------------------*- sh -*------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# File +# etc/tools/ThirdPartyFunctions +# +# Description +# Functions for managing the third-party packages +# +# Define the standard buildBASE and installBASE for the platform +# Define WM_NCOMPPROCS always. +#------------------------------------------------------------------------------ + +# define the normal build and prefix directories +buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER +installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER + +# +# mostly building without wmake +# - disable wmakeScheduler variables +# - restrict WM_NCOMPPROCS to local number of cores +# +unset WM_HOSTS WM_SCHEDULER +export WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo 2>/dev/null | wc -l) +if [ $WM_NCOMPPROCS -le 1 ] +then + WM_NCOMPPROCS=1 +elif [ $WM_NCOMPPROCS -ge 8 ] +then + WM_NCOMPPROCS=8 +fi +# echo "Building on $WM_NCOMPPROCS cores" + + +# +# download file $1 from url $2 into download/ directory +# +downloadFile() +{ + [ "$#" -eq 2 ] || { + echo "downloadFile called with incorrect number of arguments $@" + return 1 + } + + file="$1" + url="$2" + + if [ ! -e download/$file ] + then + mkdir -p download + echo "downloading $tarFile from $url" + ( cd download && wget --no-check-certificate $url -O $file ) + fi +} + + +# +# copy Make/{files,options} from wmakeFiles/PACKAGE +# +# $1 = PACKAGE +# $2 (optional) TARGET DIRECTORY +cpMakeFiles() +{ + set +x + + [ "$#" -eq 1 -o "$#" -eq 2 ] || { + echo "cpMakeFiles called with incorrect number of arguments $@" + return 1 + } + + pkg=$1 + dst=${2:-.} + echo "cpMakeFiles" $pkg $dst + + wmakeFiles=$WM_THIRD_PARTY_DIR/etc/wmakeFiles/$pkg + + for i in $(cd $wmakeFiles && find . -type f) + do + d=${i%/*} # dirname + b=${i##*/} # basename + + mkdir -p $dst/$d/Make 2>/dev/null + + # NOTE the behaviour of '-nt' can cause problems + # + # - bash, ksh, /usr/bin/test + # True, if file1 exists and file2 does not + # + # - dash, zsh (and maybe others) + # False, if file1 or file2 does not exist + # + if [ ! -e $dst/$d/Make/$b -o $wmakeFiles/$i -nt $dst/$d/Make/$b ] + then + cp $wmakeFiles/$i $dst/$d/Make/$b + fi + done + + set -x +} + + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-32Int32 b/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-32Int32 new file mode 100644 index 0000000..62fec4c --- /dev/null +++ b/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-32Int32 @@ -0,0 +1,21 @@ +EXE = +LIB = .so +OBJ = .o + +MAKE = make +AR = gcc +ARFLAGS = -m32 -shared -o +CAT = cat +CCS = gcc +CCP = mpicc +CCD = mpicc +CFLAGS = -m32 -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict +CLIBFLAGS = -shared -fPIC +LDFLAGS = -Xlinker --no-as-needed -L$MPI_ARCH_PATH/lib -m32 -lz -lm -lrt +CP = cp +LEX = flex -Pscotchyy -olex.yy.c +LN = ln +MKDIR = mkdir +MV = mv +RANLIB = echo +YACC = bison -pscotchyy -y -b y diff --git a/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int32 b/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int32 new file mode 100644 index 0000000..0598d56 --- /dev/null +++ b/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int32 @@ -0,0 +1,21 @@ +EXE = +LIB = .so +OBJ = .o + +MAKE = make +AR = gcc +ARFLAGS = -shared -o +CAT = cat +CCS = gcc +CCP = mpicc +CCD = mpicc +CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict +CLIBFLAGS = -shared -fPIC +LDFLAGS = -Xlinker --no-as-needed -lz -lm -lrt +CP = cp +LEX = flex -Pscotchyy -olex.yy.c +LN = ln +MKDIR = mkdir +MV = mv +RANLIB = echo +YACC = bison -pscotchyy -y -b y diff --git a/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int64 b/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int64 new file mode 100644 index 0000000..fe285a2 --- /dev/null +++ b/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int64 @@ -0,0 +1,21 @@ +EXE = +LIB = .so +OBJ = .o + +MAKE = make +AR = gcc +ARFLAGS = -shared -o +CAT = cat +CCS = gcc +CCP = mpicc +CCD = mpicc +CFLAGS = -O3 -DINTSIZE64 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict +CLIBFLAGS = -shared -fPIC +LDFLAGS = -Xlinker --no-as-needed -lz -lm -lrt +CP = cp +LEX = flex -Pscotchyy -olex.yy.c +LN = ln +MKDIR = mkdir +MV = mv +RANLIB = echo +YACC = bison -pscotchyy -y -b y diff --git a/makeCGAL b/makeCGAL new file mode 100755 index 0000000..94660e4 --- /dev/null +++ b/makeCGAL @@ -0,0 +1,290 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeCGAL +# +# Description +# Build script for CGAL +# +# Note +# Normally builds against ThirdParty boost and gmp/mpfr when possible. +# To override this behaviour (and use the system boost and/or gmp/mpfr), +# simply specify a 'system' version. For example, +# makeCGAL boost-system gmp-system +# +# Mixing system and ThirdParty for gmp/mpfr is not supported. +# +#------------------------------------------------------------------------------ +set -x + +cgalPACKAGE=CGAL-4.5.1 +boostPACKAGE=boost-system +gmpPACKAGE=gmp-system +mpfrPACKAGE=mpfr-system + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<> $CGAL_ARCH_PATH/share/files + fi + done + + echo "Done CGAL" +) + +# ----------------------------------------------------------------- end-of-file diff --git a/makeCmake b/makeCmake new file mode 100755 index 0000000..8d270f7 --- /dev/null +++ b/makeCmake @@ -0,0 +1,123 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeCmake +# +# Description +# Build script for cmake +# +#------------------------------------------------------------------------------ +cmakePACKAGE=cmake-2.8.12.1 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + $sourceDIR/bootstrap --prefix=$prefixDIR \ + && time make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $cmakePACKAGE" +) || { + echo "Error building: $cmakePACKAGE" + exit 1 +} +fi + +# ----------------------------------------------------------------- end-of-file diff --git a/makeGcc b/makeGcc new file mode 100755 index 0000000..8a8b720 --- /dev/null +++ b/makeGcc @@ -0,0 +1,291 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeGcc +# +# Description +# Build script for gmp, mpfr and gcc +# +# Note +# gcc 4.3.2 is known to miscompile GMP 4.3.x on 64-bit machines +# +#------------------------------------------------------------------------------ +gmpPACKAGE=gmp-5.0.4 +mpfrPACKAGE=mpfr-3.1.0 +mpcPACKAGE=mpc-0.9 +gccPACKAGE=gcc-4.6.2 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$GMP_ARCH_PATH \ + --enable-cxx \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gmpPACKAGE" +) || { + echo "Error building: $gmpPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build MPFR +# +echo "---------------" +if [ -d $MPFR_ARCH_PATH ] +then + echo "Already built: $mpfrPACKAGE" +else + echo "Starting build: $mpfrPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE + buildDIR=$buildBASE/$mpfrPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPFR_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpfrPACKAGE" +) || { + echo "Error building: $mpfrPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build mpc +# +echo "---------------" +if [ -d $MPC_ARCH_PATH ] +then + echo "Already built: $mpcPACKAGE" +elif [ "$mpcPACKAGE" = false ] +then + echo "Skip building mpc - not needed for older gcc versions" +else + echo "Starting build: $mpcPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE + buildDIR=$buildBASE/$mpcPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpcPACKAGE" +) || { + echo "Error building: $mpcPACKAGE" + exit 1 +} +fi + + +if [ -d "$MPC_ARCH_PATH" ] +then + export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH" +fi + + +# +# Build GCC +# might need 32-bit glibc-devel headers to compile +# E.g. on ubuntu install g++-multilib +# +echo "---------------" +if [ -d $GCC_ARCH_PATH ] +then + echo "Already built: $gccPACKAGE" +else + echo "Starting build: $gccPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE + buildDIR=$buildBASE/$gccPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + unset withMpc + [ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH" + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure \ + --prefix=$GCC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + $withMpc \ + --with-pkgversion=OpenFOAM \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-libstdcxx-allocator=new \ + --with-system-zlib \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gccPACKAGE" +) || { + echo "Error building: $gccPACKAGE" + exit 1 +} +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/makeGcc46 b/makeGcc46 new file mode 100755 index 0000000..12f4166 --- /dev/null +++ b/makeGcc46 @@ -0,0 +1,291 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeGcc +# +# Description +# Build script for gmp, mpfr and gcc +# +# Note +# gcc 4.3.2 is known to miscompile GMP 4.3.x on 64-bit machines +# +#------------------------------------------------------------------------------ +gmpPACKAGE=gmp-5.0.2 +mpfrPACKAGE=mpfr-3.0.1 +mpcPACKAGE=mpc-0.9 +gccPACKAGE=gcc-4.6.1 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$GMP_ARCH_PATH \ + --enable-cxx \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gmpPACKAGE" +) || { + echo "Error building: $gmpPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build MPFR +# +echo "---------------" +if [ -d $MPFR_ARCH_PATH ] +then + echo "Already built: $mpfrPACKAGE" +else + echo "Starting build: $mpfrPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE + buildDIR=$buildBASE/$mpfrPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPFR_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpfrPACKAGE" +) || { + echo "Error building: $mpfrPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build mpc +# +echo "---------------" +if [ -d $MPC_ARCH_PATH ] +then + echo "Already built: $mpcPACKAGE" +elif [ "$mpcPACKAGE" = false ] +then + echo "Skip building mpc - not needed for older gcc versions" +else + echo "Starting build: $mpcPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE + buildDIR=$buildBASE/$mpcPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpcPACKAGE" +) || { + echo "Error building: $mpcPACKAGE" + exit 1 +} +fi + + +if [ -d "$MPC_ARCH_PATH" ] +then + export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH" +fi + + +# +# Build GCC +# might need 32-bit glibc-devel headers to compile +# E.g. on ubuntu install g++-multilib +# +echo "---------------" +if [ -d $GCC_ARCH_PATH ] +then + echo "Already built: $gccPACKAGE" +else + echo "Starting build: $gccPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE + buildDIR=$buildBASE/$gccPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + unset withMpc + [ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH" + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure \ + --prefix=$GCC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + $withMpc \ + --with-pkgversion=OpenFOAM \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-libstdcxx-allocator=new \ + --with-system-zlib \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gccPACKAGE" +) || { + echo "Error building: $gccPACKAGE" + exit 1 +} +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/makeGcc47 b/makeGcc47 new file mode 100755 index 0000000..2dd0915 --- /dev/null +++ b/makeGcc47 @@ -0,0 +1,291 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeGcc +# +# Description +# Build script for gmp, mpfr and gcc +# +# Note +# gcc 4.3.2 is known to miscompile GMP 4.3.x on 64-bit machines +# +#------------------------------------------------------------------------------ +gmpPACKAGE=gmp-5.0.2 +mpfrPACKAGE=mpfr-3.0.1 +mpcPACKAGE=mpc-0.9 +gccPACKAGE=gcc-4.7.2 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$GMP_ARCH_PATH \ + --enable-cxx \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gmpPACKAGE" +) || { + echo "Error building: $gmpPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build MPFR +# +echo "---------------" +if [ -d $MPFR_ARCH_PATH ] +then + echo "Already built: $mpfrPACKAGE" +else + echo "Starting build: $mpfrPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE + buildDIR=$buildBASE/$mpfrPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPFR_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpfrPACKAGE" +) || { + echo "Error building: $mpfrPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build mpc +# +echo "---------------" +if [ -d $MPC_ARCH_PATH ] +then + echo "Already built: $mpcPACKAGE" +elif [ "$mpcPACKAGE" = false ] +then + echo "Skip building mpc - not needed for older gcc versions" +else + echo "Starting build: $mpcPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE + buildDIR=$buildBASE/$mpcPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpcPACKAGE" +) || { + echo "Error building: $mpcPACKAGE" + exit 1 +} +fi + + +if [ -d "$MPC_ARCH_PATH" ] +then + export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH" +fi + + +# +# Build GCC +# might need 32-bit glibc-devel headers to compile +# E.g. on ubuntu install g++-multilib +# +echo "---------------" +if [ -d $GCC_ARCH_PATH ] +then + echo "Already built: $gccPACKAGE" +else + echo "Starting build: $gccPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE + buildDIR=$buildBASE/$gccPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + unset withMpc + [ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH" + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure \ + --prefix=$GCC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + $withMpc \ + --with-pkgversion=OpenFOAM \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-libstdcxx-allocator=new \ + --with-system-zlib \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gccPACKAGE" +) || { + echo "Error building: $gccPACKAGE" + exit 1 +} +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/makeGcc48 b/makeGcc48 new file mode 100755 index 0000000..694184c --- /dev/null +++ b/makeGcc48 @@ -0,0 +1,288 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeGcc +# +# Description +# Build script for gmp, mpfr and gcc +# +#------------------------------------------------------------------------------ +gmpPACKAGE=gmp-5.1.2 +mpfrPACKAGE=mpfr-3.1.2 +mpcPACKAGE=mpc-1.0.1 +gccPACKAGE=gcc-4.8.3 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$GMP_ARCH_PATH \ + --enable-cxx \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gmpPACKAGE" +) || { + echo "Error building: $gmpPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build MPFR +# +echo "---------------" +if [ -d $MPFR_ARCH_PATH ] +then + echo "Already built: $mpfrPACKAGE" +else + echo "Starting build: $mpfrPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE + buildDIR=$buildBASE/$mpfrPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPFR_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpfrPACKAGE" +) || { + echo "Error building: $mpfrPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build mpc +# +echo "---------------" +if [ -d $MPC_ARCH_PATH ] +then + echo "Already built: $mpcPACKAGE" +elif [ "$mpcPACKAGE" = false ] +then + echo "Skip building mpc - not needed for older gcc versions" +else + echo "Starting build: $mpcPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE + buildDIR=$buildBASE/$mpcPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpcPACKAGE" +) || { + echo "Error building: $mpcPACKAGE" + exit 1 +} +fi + + +if [ -d "$MPC_ARCH_PATH" ] +then + export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH" +fi + + +# +# Build GCC +# might need 32-bit glibc-devel headers to compile +# E.g. on ubuntu install g++-multilib +# +echo "---------------" +if [ -d $GCC_ARCH_PATH ] +then + echo "Already built: $gccPACKAGE" +else + echo "Starting build: $gccPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE + buildDIR=$buildBASE/$gccPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + unset withMpc + [ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH" + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure \ + --prefix=$GCC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + $withMpc \ + --with-pkgversion=OpenFOAM \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-libstdcxx-allocator=new \ + --with-system-zlib \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gccPACKAGE" +) || { + echo "Error building: $gccPACKAGE" + exit 1 +} +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/makeGcc49 b/makeGcc49 new file mode 100755 index 0000000..684b1a4 --- /dev/null +++ b/makeGcc49 @@ -0,0 +1,288 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeGcc +# +# Description +# Build script for gmp, mpfr and gcc +# +#------------------------------------------------------------------------------ +gmpPACKAGE=gmp-5.1.2 +mpfrPACKAGE=mpfr-3.1.2 +mpcPACKAGE=mpc-1.0.1 +gccPACKAGE=gcc-4.9.2 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$GMP_ARCH_PATH \ + --enable-cxx \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gmpPACKAGE" +) || { + echo "Error building: $gmpPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build MPFR +# +echo "---------------" +if [ -d $MPFR_ARCH_PATH ] +then + echo "Already built: $mpfrPACKAGE" +else + echo "Starting build: $mpfrPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE + buildDIR=$buildBASE/$mpfrPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPFR_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpfrPACKAGE" +) || { + echo "Error building: $mpfrPACKAGE" + exit 1 +} +fi + +export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH" + +# +# Build mpc +# +echo "---------------" +if [ -d $MPC_ARCH_PATH ] +then + echo "Already built: $mpcPACKAGE" +elif [ "$mpcPACKAGE" = false ] +then + echo "Skip building mpc - not needed for older gcc versions" +else + echo "Starting build: $mpcPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE + buildDIR=$buildBASE/$mpcPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure ABI=$ABI \ + --prefix=$MPC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $mpcPACKAGE" +) || { + echo "Error building: $mpcPACKAGE" + exit 1 +} +fi + + +if [ -d "$MPC_ARCH_PATH" ] +then + export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH" +fi + + +# +# Build GCC +# might need 32-bit glibc-devel headers to compile +# E.g. on ubuntu install g++-multilib +# +echo "---------------" +if [ -d $GCC_ARCH_PATH ] +then + echo "Already built: $gccPACKAGE" +else + echo "Starting build: $gccPACKAGE" + echo +( + sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE + buildDIR=$buildBASE/$gccPACKAGE + + cd $sourceDIR || exit 1 + make distclean 2>/dev/null + + unset withMpc + [ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH" + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure \ + --prefix=$GCC_ARCH_PATH \ + --with-gmp=$GMP_ARCH_PATH \ + --with-mpfr=$MPFR_ARCH_PATH \ + $withMpc \ + --with-pkgversion=OpenFOAM \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-libstdcxx-allocator=new \ + --with-system-zlib \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gccPACKAGE" +) || { + echo "Error building: $gccPACKAGE" + exit 1 +} +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/makeGperftools b/makeGperftools new file mode 100755 index 0000000..3bf9bd2 --- /dev/null +++ b/makeGperftools @@ -0,0 +1,118 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeGperftools +# +# Description +# Build script for gperftools +# +# Note +# +#------------------------------------------------------------------------------ + +gperftoolsPACKAGE=gperftools-svn + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + # remove old junk + rm -rf $prefixDIR + + $sourceDIR/configure \ + --prefix=$prefixDIR \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gperftoolsPACKAGE" \ +) || { + echo "Error building: $gperftoolsPACKAGE" + exit 1 +} +fi + +# ----------------------------------------------------------------- end-of-file diff --git a/makeLLVM b/makeLLVM new file mode 100755 index 0000000..8435603 --- /dev/null +++ b/makeLLVM @@ -0,0 +1,134 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeLLVM +# +# Description +# Build script for llvm/clang etc. +# +# - Checkout LLVM: +# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn +# +# - Checkout Clang: +# cd llvm-svn/tools +# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang +# cd - +# +#------------------------------------------------------------------------------ +llvmPACKAGE=llvm-3.5.0 + +#------------------------------------------------------------------------------ +# run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null + + buildDIR=$buildBASE/$llvmPACKAGE + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR + + set -x + $sourceDIR/configure \ + --prefix=$LLVM_ARCH_PATH \ + --with-gcc-toolchain=`which gcc | sed s%/bin/gcc%%` \ + --enable-optimized \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $llvmPACKAGE" +) || { + echo "Error building: $llvmPACKAGE" + exit 1 +} +fi + +# ----------------------------------------------------------------- end-of-file diff --git a/makeParaView b/makeParaView new file mode 100755 index 0000000..6de1398 --- /dev/null +++ b/makeParaView @@ -0,0 +1,331 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeParaView +# +# Description +# Make and install paraview for version 3.14.1 and higher +# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION +# (note capitalisation) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +. etc/tools/ParaViewFunctions +#------------------------------------------------------------------------------ +# +# USER OPTIONS: +# ~~~~~~~~~~~~~ + +# MPI support: +withMPI=false +MPI_MAX_PROCS=32 + +# Python support: +# note: script will try to determine the appropriate python library. +# If it fails, specify the path using the PYTHON_LIBRARY variable +withPYTHON=false +PYTHON_LIBRARY="" +# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0" + +# MESA graphics support: +withMESA=false +MESA_INCLUDE="/usr/include/GL" +MESA_LIBRARY="/usr/lib64/libOSMesa.so" + +# extra QT gui support (useful for some third party apps) +withQT=true + +# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older +QMAKE_PATH="" + +# Set the path to cmake +CMAKE_PATH="" + +# +# NO FURTHER EDITING BELOW THIS LINE +# +#----------------------------------------------------------------------------- +Script=${0##*/} + +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<. +# +# Script +# makeParaView +# +# Description +# Make and install paraview +# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION +# (note capitalisation) +# +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +. etc/tools/ParaView4Functions +#------------------------------------------------------------------------------ +# +# USER OPTIONS: +# ~~~~~~~~~~~~~ + +# MPI support: +withMPI=false +MPI_MAX_PROCS=32 + +# Python support: +# note: script will try to determine the appropriate python library. +# If it fails, specify the path using the PYTHON_LIBRARY variable +withPYTHON=false +PYTHON_LIBRARY="" +# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0" + +# MESA graphics support: +withMESA=false +MESA_INCLUDE="/usr/include/GL" +MESA_LIBRARY="/usr/lib64/libOSMesa.so" + +# extra QT gui support (useful for some third party apps) +withQT=true + +# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older +QMAKE_PATH="" + +# Set the path to cmake +CMAKE_PATH="" + +# +# NO FURTHER EDITING BELOW THIS LINE +# +#----------------------------------------------------------------------------- +Script=${0##*/} + +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<