From cd07d9f6bcbec816dfc52bbc92868ba6289fef10 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 1 Aug 2016 10:28:56 +0200 Subject: [PATCH] ENH: provide makeMesa and makeVTK scripts --- makeMesa | 200 ++++++++++++++++++++++++++++++++ makeVTK | 303 ++++++++++++++++++++++++++++++++++++++++++++++++ makeVTK.example | 11 ++ 3 files changed, 514 insertions(+) create mode 100755 makeMesa create mode 100755 makeVTK create mode 100755 makeVTK.example diff --git a/makeMesa b/makeMesa new file mode 100755 index 0000000..f48ecb9 --- /dev/null +++ b/makeMesa @@ -0,0 +1,200 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. +# \\/ 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 +# makeMesa +# +# Description +# Build script for Mesa +# +# Note +# Building with mesa-12.0.1 failed to install an "osmesa.h" file, +# which renders it useless for off-screen VTK. +# +#------------------------------------------------------------------------------ +mesaPACKAGE=mesa-11.2.2 + +#------------------------------------------------------------------------------ +# 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 +#------------------------------------------------------------------------------ +Script=${0##*/} + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<. +# +# Script +# makeVTK +# +# Description +# Make and install VTK +# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION +# +# To use the VTK source from the ParaView source tree, simply make an +# appropriate link first. For example, +# +# ln -s ParaView-5.1.0/VTK VTK-7.1.0 +# +#------------------------------------------------------------------------------ +# 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 +. etc/tools/vtkFunctions +#------------------------------------------------------------------------------ +# +# USER OPTIONS: +# ~~~~~~~~~~~~~ + +# MESA graphics support: +withMESA=false +MESA_INCLUDE="/usr/include/GL" +MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so" + +# Set the path to cmake +CMAKE_PATH="" + +# New rendering backend (starting with vtk 7?). +# Default to auto-config based on VTK version +withGL2=auto + + +# +# NO FURTHER EDITING BELOW THIS LINE +# +#----------------------------------------------------------------------------- +Script=${0##*/} + +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<