Addition of swak4Foam as a ThirdParty package

This commit is contained in:
Martin Beaudoin 2012-04-12 16:56:44 -04:00
parent d33b9255e9
commit 8b621679f4
4 changed files with 131 additions and 0 deletions

3
ThirdParty/AllMake vendored
View file

@ -71,6 +71,9 @@ echo
# Running stage 4 # Running stage 4
./AllMake.stage4 ./AllMake.stage4
# Running stage 5
./AllMake.stage5
echo ======================================== echo ========================================
echo Done ThirdParty Allwmake echo Done ThirdParty Allwmake
echo ======================================== echo ========================================

108
ThirdParty/AllMake.stage5 vendored Executable file
View file

@ -0,0 +1,108 @@
#!/bin/bash
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright held by original author
# \\/ 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 <http://www.gnu.org/licenses/>.
#
# Script
# AllMake.stage5
#
# Description
# Build script for ThirdParty packages not requiring rpm packaging
#
#
# Requirements:
# 1: Your OpenFOAM environment must be properly initialized
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2012)
#
#------------------------------------------------------------------------------
# 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
}
#------------------------------------------------------------------------------
echo "========================================"
echo "Starting ThirdParty AllMake: Stage5 "
echo "========================================"
echo
# swak4Foam - Version 1.6
if [ -z "$SWAK4FOAM_SYSTEM" ]
then
# Do we need to download the source code?
# We choose to put the source code under ./rpmBuild/BUILD prior to compiling.
# We will not generate a rpm package, but all ThirdParty source code will be
# centralized under the same scratch area
if [ ! -e ./rpmBuild/BUILD/swak4Foam-1.6 ];
then
echo "Checking for a Mercurial client: hg"
command -v hg >/dev/null
if [ $? -eq 0 ];
then
echo "Using Mercurial/hg to download the source code"
(cd ./rpmBuild/BUILD; hg clone http://openfoam-extend.hg.sourceforge.net:8000/hgroot/openfoam-extend/swak4Foam swak4Foam-1.6)
else
echo "Warning: Mercurial/hg is not installed. Switching to an alternate Subversion repository"
command -v svn >/dev/null
if [ $? -eq 0 ];
then
echo "Using Subversion/svn to download the source code"
(cd ./rpmBuild/BUILD; svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.7/libraries/swak4Foam swak4Foam-1.6)
else
echo "Error: Please install either a Mercurial or Subversion client in order to download the source code for swak4Foam"
exit -1
fi
fi
# We move the compilation results directly to $FOAM_SITE_APPBIN and $FOAM_SITE_LIBBIN
# If you prefer to keep the libraries and tools under $FOAM_USER_LIBBIN and $FOAM_USER_APPBIN, simply
# comment out the next two lines
(cd ./rpmBuild/BUILD/swak4Foam-1.6; find . -name files | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g")
(cd ./rpmBuild/BUILD/swak4Foam-1.6; find . -name options | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g")
# We recompile everything
(cd ./rpmBuild/BUILD/swak4Foam-1.6; ./Allwclean; ./Allwmake)
else
echo "The source code for swak4Foam is already present under ./rpmBuild/BUILD/swak4Foam-1.6"
echo "Please remove this directory if you want to refresh your installation of swak4Foam"
fi
echo ""
else
echo "Using system installed swak4Foam"
echo ""
fi
echo "========================================"
echo "Done ThirdParty AllMake: Stage5 "
echo "========================================"
echo
# ----------------------------------------------------------------- end-of-file

View file

@ -140,6 +140,20 @@
#setenv PARAVIEW_DIR path_to_system_installed_paraview #setenv PARAVIEW_DIR path_to_system_installed_paraview
#setenv PARAVIEW_BIN_DIR $PARAVIEW_DIR/bin #setenv PARAVIEW_BIN_DIR $PARAVIEW_DIR/bin
# System installed bison
#setenv BISON_SYSTEM 1
# System installed flex
#setenv FLEX_SYSTEM 1
# System installed m4
#setenv M4_SYSTEM 1
# System installed PyFoam
#setenv PYFOAM_SYSTEM 1
# System installed swak4Foam
#setenv SWAK4FOAM_SYSTEM 1
# Specify ParaView version # Specify ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -151,6 +151,12 @@ compilerInstall=System
# System installed m4 # System installed m4
#export M4_SYSTEM=1 #export M4_SYSTEM=1
# System installed PyFoam
#export PYFOAM_SYSTEM=1
# System installed swak4Foam
#export SWAK4FOAM_SYSTEM=1
# Specify ParaView version # Specify ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~
#export ParaView_VERSION=git # eg, cvs/git version #export ParaView_VERSION=git # eg, cvs/git version