diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-09-18 09:12:20 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-09-18 09:12:20 +0000 |
commit | 1994c7ca22496cd82a411ef41296dcbb0c770e71 (patch) | |
tree | 99f222dbd89c2c81b977f5a37f66fec4cb0ae993 /sci-libs | |
parent | Version bump. Migrate to eapi2. (diff) | |
download | historical-1994c7ca22496cd82a411ef41296dcbb0c770e71.tar.gz historical-1994c7ca22496cd82a411ef41296dcbb0c770e71.tar.bz2 historical-1994c7ca22496cd82a411ef41296dcbb0c770e71.zip |
Bump to 1.6, thanks to Oliver Borm for ebuilds and patches. Fixes #280586
Package-Manager: portage-2.2_rc40/cvs/Linux x86_64
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/openfoam-bin/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/openfoam-bin/files/OpenFOAM-1.6-compile.patch | 605 | ||||
-rw-r--r-- | sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild | 106 | ||||
-rw-r--r-- | sci-libs/openfoam-src/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/openfoam-src/files/OpenFOAM-1.6-compile.patch | 605 | ||||
-rw-r--r-- | sci-libs/openfoam-src/openfoam-src-1.6.ebuild | 38 | ||||
-rw-r--r-- | sci-libs/openfoam/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/openfoam/files/OpenFOAM-1.6-compile.patch | 605 | ||||
-rw-r--r-- | sci-libs/openfoam/files/OpenFOAM-1.6_gcc4.4.patch | 59 | ||||
-rw-r--r-- | sci-libs/openfoam/openfoam-1.6.ebuild | 111 |
10 files changed, 2150 insertions, 3 deletions
diff --git a/sci-libs/openfoam-bin/ChangeLog b/sci-libs/openfoam-bin/ChangeLog index 97d0b92ea44f..f0c765bdb250 100644 --- a/sci-libs/openfoam-bin/ChangeLog +++ b/sci-libs/openfoam-bin/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/openfoam-bin # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-bin/ChangeLog,v 1.2 2009/04/26 13:41:39 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-bin/ChangeLog,v 1.3 2009/09/18 09:11:58 patrick Exp $ + +*openfoam-bin-1.6 (18 Sep 2009) + + 18 Sep 2009; Patrick Lauer <patrick@gentoo.org> +openfoam-bin-1.6.ebuild, + +files/OpenFOAM-1.6-compile.patch: + Bump to 1.6, thanks to Oliver Borm for ebuilds and patches. Fixes #280586 26 Apr 2009; Patrick Lauer <patrick@gentoo.org> metadata.xml: Adding Oliver Borm to metadata diff --git a/sci-libs/openfoam-bin/files/OpenFOAM-1.6-compile.patch b/sci-libs/openfoam-bin/files/OpenFOAM-1.6-compile.patch new file mode 100644 index 000000000000..79c1b7e66b52 --- /dev/null +++ b/sci-libs/openfoam-bin/files/OpenFOAM-1.6-compile.patch @@ -0,0 +1,605 @@ +diff -urN OpenFOAM-1.6-src/bin/paraFoam OpenFOAM-1.6/bin/paraFoam +--- OpenFOAM-1.6-src/bin/paraFoam 2009-01-08 21:19:14.000000000 +0100 ++++ OpenFOAM-1.6/bin/paraFoam 2009-08-06 10:54:38.000000000 +0200 +@@ -1,133 +1,148 @@ + #!/bin/sh +-#------------------------------------------------------------------------------ +-# ========= | +-# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +-# \\ / O peration | +-# \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, +-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Copyright (c) 2008-2009 Takuya OSHIMA <oshima@eng.niigata-u.ac.jp>. ++# All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# * Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the ++# distribution. ++# ++# * Neither the name of the author nor the names of any contributors ++# may be used to endorse or promote products derived from this ++# software without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR ++# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Script +-# paraFoam ++# pvFoam + # + # Description +-# start paraview with the OpenFOAM libraries +-# +-#------------------------------------------------------------------------------ +-usage() { +- while [ "$#" -ge 1 ]; do echo "$1"; shift; done +- cat<<USAGE +- +-usage: ${0##*/} [OPTION] +-options: +- -case dir specify alternative case directory +- -region name specify mesh region name +- -touch only create the .OpenFOAM file +- +-* start paraview $ParaView_VERSION with the OpenFOAM libraries ++# ParaView interface script for use with vtkPOpenFOAMReader. + +-USAGE ++# Adjust as necessary. ++# You might also want to set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH. ++paraviewPath="`which paraview`" ++# or in full path like paraviewPath=/opt/ParaView3/bin/paraview ++ ++if [ ! -x "${paraviewPath}" -o -d "${paraviewPath}" ]; then ++ # not using LINENO which is not supported by dash (yet) ++ echo "ParaView not found; set paraviewPath at line" `awk '/paraviewPath/{print FNR;exit 0}' $0` "of $0." + exit 1 +-} ++fi + +-unset regionName touchOnly ++ext=foam ++casePath=. ++script=${0##*/} ++background=yes ++trapCommand=trap + +-# parse options +-while [ "$#" -gt 0 ] ++while [ $# -gt 0 ] + do + case "$1" in +- -h | -help) +- usage +- ;; +- -case) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" +- shift 2 +- ;; +- -region) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- regionName=$2 +- shift 2 +- ;; +- -touch) +- touchOnly=true +- shift +- ;; +- *) +- usage "unknown option/argument: '$*'" +- ;; ++ -case) ++ if [ $# -lt 2 ]; then ++ echo "-case requires path specification" ++ exit 1 ++ fi ++ shift ++ casePath="$1" ++ ;; ++ -clientServer|-cs) ++ if [ $# -lt 2 ]; then ++ echo "-clientServer or -cs requires specification of the server resource name" ++ exit 1 ++ fi ++ shift ++ csResourceName="$1" ++ ;; ++ -foreground|-fg) ++ background=no ++ ;; ++ -keepStub|-ks) ++ trapCommand=: ++ ;; ++ -help) ++ echo "Usage: ${script} [-case <dir>] [-clientServer|-cs <server resource name>] [-foreground|-fg] [-keepStub|-ks] [-help]" ++ exit 0 ++ ;; + esac ++ shift + done + +-# get a sensible caseName +-caseName=${PWD##*/} +-caseFile="$caseName.OpenFOAM" +-fvControls="system" +- +-if [ -n "$regionName" ] +-then +- caseFile="$caseName{$regionName}.OpenFOAM" +- fvControls="$fvControls/$regionName" +-fi +- +-if [ -n "$touchOnly" ] +-then +- touch "$caseFile" +- echo "created '$caseFile'" +- exit 0 ++# cd to the case directory ++if ! cd "${casePath}" > /dev/null 2>&1; then ++ echo "Cannot change directory to \"${casePath}\"; exiting" ++ exit 1 + fi + +-# parent directory for normal or parallel results +-case "$caseName" in +- processor*) parentDir=".." ;; +- *) parentDir="." ;; +-esac +- +-# check existence of essential files +-for check in system/controlDict $fvControls/fvSchemes $fvControls/fvSolution +-do +- [ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'" +-done ++caseName="${PWD##*/}" + ++# see if caseName starts with controlDict or the case is in the root directory. ++if [ "${caseName#controlDict}" != "${caseName}" -o ! "${caseName}" ]; then ++ # Use case.foam as file name given to ParaView ++ caseName="case" ++fi + +-case "$ParaView_VERSION" in +-2*) +- trap "rm -f paraFoam.pvs $caseFile 2>/dev/null; exit 0" EXIT TERM INT +- touch "$caseFile" +- +- # since we are now in the cwd, %CASE% is '$PWD/$caseFile' +- sed -e s@%CASE%@$PWD/$caseFile@g \ +- $WM_PROJECT_DIR/bin/tools/paraFoam.pvs > paraFoam.pvs +- +- paraview paraFoam.pvs +- ;; +- +-*) +- # only create/remove caseFile if it didn't already exist +- [ -e $caseFile ] || { +- trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT +- touch "$caseFile" +- echo "created temporary '$caseFile'" +- } ++fileName="${caseName}.${ext}" ++if [ -e "${fileName}" ]; then ++ if [ ! -r "${fileName}" ]; then ++ echo "Stub ${fileName} exists but not readable; exiting" ++ exit 1 ++ fi ++ trapCommand=: ++else ++ if ! touch "${fileName}" > /dev/null 2>&1; then ++ echo "Cannot create stub ${fileName}; exiting" ++ exit 1 ++ fi ++fi + +- paraview --data="$caseFile" +- ;; ++# set the locale where ParaView is run under to "C" so that the ++# interpretation of decimal points by the system routines are not ++# affected ++export LANG=C ++export LC_ALL=C ++ ++# specify fileName with full path so that it can easily be accessed ++# later with File->Recent Files ++if [ "${background}" = "yes" ]; then ++ ( ++ ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \ ++ EXIT HUP INT PIPE ALRM TERM USR1 USR2 ; ++ if [ "${csResourceName}" ]; then ++ "${paraviewPath}" --data="${PWD}/${fileName}" \ ++ --server="${csResourceName}" ++ else ++ "${paraviewPath}" --data="${PWD}/${fileName}" ++ fi ++ ) & ++else ++ ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \ ++ EXIT HUP INT PIPE ALRM TERM USR1 USR2 ++ if [ "${csResourceName}" ]; then ++ "${paraviewPath}" --data="${PWD}/${fileName}" \ ++ --server="${csResourceName}" ++ else ++ "${paraviewPath}" --data="${PWD}/${fileName}" ++ fi ++fi + +-esac + #------------------------------------------------------------------------------ +diff -urN OpenFOAM-1.6-src/etc/bashrc OpenFOAM-1.6/etc/bashrc +--- OpenFOAM-1.6-src/etc/bashrc 2009-07-15 13:48:16.000000000 +0200 ++++ OpenFOAM-1.6/etc/bashrc 2009-08-06 10:32:47.000000000 +0200 +@@ -43,9 +43,9 @@ + # + # Location of FOAM installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-foamInstall=$HOME/$WM_PROJECT ++# foamInstall=$HOME/$WM_PROJECT + # foamInstall=~$WM_PROJECT +-# foamInstall=/usr/local/$WM_PROJECT ++foamInstall=/usr/lib/$WM_PROJECT + # foamInstall=/opt/$WM_PROJECT + # + # END OF (NORMAL) USER EDITABLE PART +@@ -73,7 +73,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++# export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION + + + # Operating System/Platform +@@ -232,14 +232,14 @@ + + + _foamSource $WM_PROJECT_DIR/etc/settings.sh +-_foamSource $WM_PROJECT_DIR/etc/aliases.sh ++# _foamSource $WM_PROJECT_DIR/etc/aliases.sh + + + # Source user setup files for optional packages + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc +-_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc +-_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc + + + # Clean environment paths again. Only remove duplicates +diff -urN OpenFOAM-1.6-src/etc/cshrc OpenFOAM-1.6/etc/cshrc +--- OpenFOAM-1.6-src/etc/cshrc 2009-07-15 13:48:16.000000000 +0200 ++++ OpenFOAM-1.6/etc/cshrc 2009-08-06 10:42:58.000000000 +0200 +@@ -42,9 +42,9 @@ + # + # Location of FOAM installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-set foamInstall = $HOME/$WM_PROJECT ++# set foamInstall = $HOME/$WM_PROJECT + # set foamInstall = ~$WM_PROJECT +-# set foamInstall = /usr/local/$WM_PROJECT ++set foamInstall = /usr/lib/$WM_PROJECT + # set foamInstall = /opt/$WM_PROJECT + # + # END OF (NORMAL) USER EDITABLE PART +@@ -67,7 +67,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++# setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION + + + # Operating System/Platform +@@ -230,12 +230,12 @@ + alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*' + + _foamSource $WM_PROJECT_DIR/etc/settings.csh +-_foamSource $WM_PROJECT_DIR/etc/aliases.csh ++# _foamSource $WM_PROJECT_DIR/etc/aliases.csh + + # Source user setup files for optional packages + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc +-_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc + # _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc + + +diff -urN OpenFOAM-1.6-src/etc/settings.csh OpenFOAM-1.6/etc/settings.csh +--- OpenFOAM-1.6-src/etc/settings.csh 2009-07-23 18:31:28.000000000 +0200 ++++ OpenFOAM-1.6/etc/settings.csh 2009-08-06 10:46:06.000000000 +0200 +@@ -37,27 +37,27 @@ + alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}' + + # location of the jobControl directory +-setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl ++setenv FOAM_JOB_DIR $HOME/$WM_PROJECT/jobControl + + # wmake configuration + setenv WM_DIR $WM_PROJECT_DIR/wmake + setenv WM_LINK_LANGUAGE c++ +-setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION ++setenv WM_OPTIONS $WM_ARCH$WM_COMPILER + + # base configuration + setenv FOAM_APP $WM_PROJECT_DIR/applications +-setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS ++setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin + setenv FOAM_LIB $WM_PROJECT_DIR/lib +-setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS ++setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib + setenv FOAM_SRC $WM_PROJECT_DIR/src + + # shared site configuration - similar naming convention as ~OpenFOAM expansion +-setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS +-setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS ++setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin ++setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib + + # user configuration +-setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS +-setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS ++setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin ++setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib + + # convenience + setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials +@@ -79,7 +79,7 @@ + # Select compiler installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # compilerInstall = OpenFOAM | System +-set compilerInstall=OpenFOAM ++set compilerInstall=System + + switch ("$compilerInstall") + case OpenFOAM: +@@ -124,30 +124,30 @@ + + switch ("$WM_MPLIB") + case OPENMPI: +- set mpi_version=openmpi-1.3.3 +- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version +- setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS ++ set mpi_version=openmpi ++# setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version ++ setenv MPI_ARCH_PATH /usr + + # Tell OpenMPI where to find its install directory + setenv OPAL_PREFIX $MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version ++ setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version + unset mpi_version + breaksw + + case MPICH: +- set mpi_version=mpich-1.2.4 +- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version +- setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS ++ set mpi_version=mpich ++# setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version ++ setenv MPI_ARCH_PATH /usr + setenv MPICH_ROOT $MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version ++ setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version + unset mpi_version + breaksw + +diff -urN OpenFOAM-1.6-src/etc/settings.sh OpenFOAM-1.6/etc/settings.sh +--- OpenFOAM-1.6-src/etc/settings.sh 2009-07-23 18:31:28.000000000 +0200 ++++ OpenFOAM-1.6/etc/settings.sh 2009-08-06 10:38:07.000000000 +0200 +@@ -53,27 +53,27 @@ + + + # location of the jobControl directory +-export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl ++export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl + + # wmake configuration + export WM_DIR=$WM_PROJECT_DIR/wmake + export WM_LINK_LANGUAGE=c++ +-export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION ++export WM_OPTIONS=$WM_ARCH$WM_COMPILER + + # base configuration + export FOAM_APP=$WM_PROJECT_DIR/applications +-export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS ++export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin + export FOAM_LIB=$WM_PROJECT_DIR/lib +-export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS ++export FOAM_LIBBIN=$WM_PROJECT_DIR/lib + export FOAM_SRC=$WM_PROJECT_DIR/src + + # shared site configuration - similar naming convention as ~OpenFOAM expansion +-export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS +-export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS ++export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin ++export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib + + # user configuration +-export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS +-export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS ++export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin ++export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib + + # convenience + export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials +@@ -95,7 +95,7 @@ + # Select compiler installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # compilerInstall = OpenFOAM | System +-compilerInstall=OpenFOAM ++compilerInstall=System + + case "${compilerInstall:-OpenFOAM}" in + OpenFOAM) +@@ -146,30 +146,30 @@ + + case "$WM_MPLIB" in + OPENMPI) +- mpi_version=openmpi-1.3.3 +- export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version +- export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS ++ mpi_version=openmpi ++# export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version ++ export MPI_ARCH_PATH=/usr + + # Tell OpenMPI where to find its install directory + export OPAL_PREFIX=$MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version ++ export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version + unset mpi_version + ;; + + MPICH) +- mpi_version=mpich-1.2.4 +- export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version +- export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS ++ mpi_version=mpich ++# export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version ++ export MPI_ARCH_PATH=/usr + export MPICH_ROOT=$MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version ++ export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version + unset mpi_version + ;; + +diff -urN OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options OpenFOAM-1.6/src/decompositionMethods/decompositionMethods/Make/options +--- OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options 2009-04-24 08:56:28.000000000 +0200 ++++ OpenFOAM-1.6/src/decompositionMethods/decompositionMethods/Make/options 2009-08-06 13:50:29.000000000 +0200 +@@ -1,8 +1,7 @@ + EXE_INC = \ +- -I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch/lnInclude \ +- -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include ++ -I/usr/include/scotch \ ++ -I/usr/include/metis + + LIB_LIBS = \ + -lscotch \ +- -lmetis \ +- -lGKlib ++ -lmetis +diff -urN OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options OpenFOAM-1.6/src/decompositionMethods/parMetisDecomp/Make/options +--- OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options 2009-04-02 15:00:31.000000000 +0200 ++++ OpenFOAM-1.6/src/decompositionMethods/parMetisDecomp/Make/options 2009-08-06 11:00:53.000000000 +0200 +@@ -2,11 +2,11 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \ +- -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \ ++ -I/usr/include/parmetis \ ++ -I/usr/include/metis \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ + -L$(FOAM_MPI_LIBBIN) \ +- -lmetis-parmetis \ ++ -lmetis \ + -lparmetis +diff -urN OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options OpenFOAM-1.6/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options +--- OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options 2009-07-03 11:54:30.000000000 +0200 ++++ OpenFOAM-1.6/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options 2009-08-06 11:02:21.000000000 +0200 +@@ -1,5 +1,3 @@ +-ParMGridGen = $(WM_THIRD_PARTY_DIR)/ParMGridGen-1.0 +- + TYPE_REAL= + #if defined(WM_SP) + TYPE_REAL=-DTYPE_REAL +@@ -7,9 +5,9 @@ + + EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ +- -I$(ParMGridGen)/MGridGen/Lib/lnInclude \ +- -I$(ParMGridGen)/MGridGen/IMlib/lnInclude \ ++ -I/usr/include/mgridgen \ + $(TYPE_REAL) + + LIB_LIBS = \ ++ -lIMlib \ + -lMGridGen +diff -urN OpenFOAM-1.6-src/wmake/Makefile OpenFOAM-1.6/wmake/Makefile +--- OpenFOAM-1.6-src/wmake/Makefile 2009-07-21 20:06:59.000000000 +0200 ++++ OpenFOAM-1.6/wmake/Makefile 2009-08-06 10:47:17.000000000 +0200 +@@ -58,7 +58,7 @@ + + LIB_SRC = $(WM_PROJECT_DIR)/src + LIB_DIR = $(WM_PROJECT_DIR)/lib +-LIB_WM_OPTIONS_DIR = $(LIB_DIR)/$(WM_OPTIONS) ++LIB_WM_OPTIONS_DIR = $(LIB_DIR) + OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) + CLASSES_DIR = $(MAKE_DIR)/classes + +diff -urN OpenFOAM-1.6-src/bin/foamInstallationTest OpenFOAM-1.6/bin/foamInstallationTest +--- OpenFOAM-1.6-src/bin/foamInstallationTest 2009-07-27 13:31:34.000000000 +0200 ++++ OpenFOAM-1.6/bin/foamInstallationTest 2009-08-06 18:19:44.000000000 +0200 +@@ -383,7 +383,7 @@ + + + checkOpenFOAMEnvironment() { +- [ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || { ++ [ -d "$WM_PROJECT_INST_DIR" ] || { + echo "" + echo "FATAL ERROR: OpenFOAM environment not configured." + echo "" diff --git a/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild b/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild new file mode 100644 index 000000000000..b0e8ff818e86 --- /dev/null +++ b/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild,v 1.1 2009/09/18 09:11:58 patrick Exp $ + +EAPI="2" + +inherit eutils versionator multilib toolchain-funcs + +MY_PN="OpenFOAM" +MY_PV=$(get_version_component_range 1-2) +MY_P="${MY_PN}-${MY_PV}" + +use x86 && WM_OPTIONS="linuxGccDPOpt" +use amd64 && WM_OPTIONS="linux64GccDPOpt" + +DESCRIPTION="Open Field Operation and Manipulation - CFD Simulation Toolbox" +HOMEPAGE="http://www.opencfd.co.uk/openfoam/" +SRC_URI="mirror://sourceforge/foam/${MY_P}.General.gtgz -> ${MY_P}.General.tgz + x86? ( mirror://sourceforge/foam/${MY_P}.linuxGccDPOpt.gtgz -> ${MY_P}.linuxGccDPOpt.tgz ) + amd64? ( mirror://sourceforge/foam/${MY_P}.linux64GccDPOpt.gtgz -> ${MY_P}.linux64GccDPOpt.tgz )" + +LICENSE="GPL-2" +SLOT="1.6" +KEYWORDS="-* ~amd64 ~x86" +IUSE="examples doc" + +DEPEND="!=sci-libs/openfoam-${MY_PV}* + !=sci-libs/openfoam-kernel-${MY_PV}* + !=sci-libs/openfoam-meta-${MY_PV}* + !=sci-libs/openfoam-solvers-${MY_PV}* + !=sci-libs/openfoam-utilities-${MY_PV}* + !=sci-libs/openfoam-wmake-${MY_PV}* + || ( >sci-visualization/paraview-3.0 sci-visualization/opendx ) + virtual/mpi" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} +INSDIR="/usr/$(get_libdir)/${MY_PN}/${MY_P}" + +pkg_setup() { + ## binaries are compiled with gcc-4.3.3 + if ! version_is_at_least 4.3 $(gcc-version) ; then + die "${PN} requires >=sys-devel/gcc-4.3 in order to run." + fi + + elog + elog "In order to use ${MY_PN} you should add the following line to ~/.bashrc :" + elog + elog "alias startOF$(delete_all_version_separators ${MY_PV})='source ${INSDIR}/etc/bashrc'" + elog + elog "And everytime you want to use OpenFOAM you have to execute startOF$(delete_all_version_separators ${MY_PV})" + ewarn + ewarn "FoamX is deprecated since ${MY_PN}-1.5! " + ewarn +} + +src_prepare() { + epatch "${FILESDIR}"/${MY_P}-compile.patch +} + +src_configure() { + if has_version sys-cluster/mpich2 ; then + export WM_MPLIB=MPICH + export MPI_VERSION=mpich + elif has_version sys-cluster/openmpi ; then + export WM_MPLIB=OPENMPI + export MPI_VERSION=openmpi + else + die "You need one of the following mpi implementations: openmpi, lam-mpi or mpich2" + fi + + sed -i -e "s|WM_MPLIB:=OPENMPI|WM_MPLIB:="${WM_MPLIB}"|" etc/bashrc + sed -i -e "s|setenv WM_MPLIB OPENMPI|setenv WM_MPLIB "${WM_MPLIB}"|" etc/cshrc + + mv lib/${WM_OPTIONS}/$MPI_VERSION* lib/${WM_OPTIONS}/$MPI_VERSION +} + +src_test() { + cd bin + ./foamInstallationTest +} + +src_install() { + insinto ${INSDIR} + doins -r etc + + use examples && doins -r tutorials + + insopts -m0755 + doins -r bin + + insinto ${INSDIR}/applications/bin + doins -r applications/bin/${WM_OPTIONS}/* + + insinto ${INSDIR}/lib + doins -r lib/${WM_OPTIONS}/* + + insinto ${INSDIR}/wmake + doins -r wmake/* + + dodoc {doc/Guides-a4/*.pdf,README} + + if use doc ; then + dohtml -r doc/Doxygen + fi +} diff --git a/sci-libs/openfoam-src/ChangeLog b/sci-libs/openfoam-src/ChangeLog index 0461ea2bdd64..3e7415c400ad 100644 --- a/sci-libs/openfoam-src/ChangeLog +++ b/sci-libs/openfoam-src/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/openfoam-src # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-src/ChangeLog,v 1.2 2009/04/26 13:43:16 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-src/ChangeLog,v 1.3 2009/09/18 09:12:19 patrick Exp $ + +*openfoam-src-1.6 (18 Sep 2009) + + 18 Sep 2009; Patrick Lauer <patrick@gentoo.org> +openfoam-src-1.6.ebuild, + +files/OpenFOAM-1.6-compile.patch: + Bump to 1.6, thanks to Oliver Borm for ebuilds and patches. Fixes #280586 26 Apr 2009; Patrick Lauer <patrick@gentoo.org> metadata.xml: Adding Oliver Borm to metadata diff --git a/sci-libs/openfoam-src/files/OpenFOAM-1.6-compile.patch b/sci-libs/openfoam-src/files/OpenFOAM-1.6-compile.patch new file mode 100644 index 000000000000..79c1b7e66b52 --- /dev/null +++ b/sci-libs/openfoam-src/files/OpenFOAM-1.6-compile.patch @@ -0,0 +1,605 @@ +diff -urN OpenFOAM-1.6-src/bin/paraFoam OpenFOAM-1.6/bin/paraFoam +--- OpenFOAM-1.6-src/bin/paraFoam 2009-01-08 21:19:14.000000000 +0100 ++++ OpenFOAM-1.6/bin/paraFoam 2009-08-06 10:54:38.000000000 +0200 +@@ -1,133 +1,148 @@ + #!/bin/sh +-#------------------------------------------------------------------------------ +-# ========= | +-# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +-# \\ / O peration | +-# \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, +-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Copyright (c) 2008-2009 Takuya OSHIMA <oshima@eng.niigata-u.ac.jp>. ++# All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# * Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the ++# distribution. ++# ++# * Neither the name of the author nor the names of any contributors ++# may be used to endorse or promote products derived from this ++# software without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR ++# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Script +-# paraFoam ++# pvFoam + # + # Description +-# start paraview with the OpenFOAM libraries +-# +-#------------------------------------------------------------------------------ +-usage() { +- while [ "$#" -ge 1 ]; do echo "$1"; shift; done +- cat<<USAGE +- +-usage: ${0##*/} [OPTION] +-options: +- -case dir specify alternative case directory +- -region name specify mesh region name +- -touch only create the .OpenFOAM file +- +-* start paraview $ParaView_VERSION with the OpenFOAM libraries ++# ParaView interface script for use with vtkPOpenFOAMReader. + +-USAGE ++# Adjust as necessary. ++# You might also want to set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH. ++paraviewPath="`which paraview`" ++# or in full path like paraviewPath=/opt/ParaView3/bin/paraview ++ ++if [ ! -x "${paraviewPath}" -o -d "${paraviewPath}" ]; then ++ # not using LINENO which is not supported by dash (yet) ++ echo "ParaView not found; set paraviewPath at line" `awk '/paraviewPath/{print FNR;exit 0}' $0` "of $0." + exit 1 +-} ++fi + +-unset regionName touchOnly ++ext=foam ++casePath=. ++script=${0##*/} ++background=yes ++trapCommand=trap + +-# parse options +-while [ "$#" -gt 0 ] ++while [ $# -gt 0 ] + do + case "$1" in +- -h | -help) +- usage +- ;; +- -case) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" +- shift 2 +- ;; +- -region) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- regionName=$2 +- shift 2 +- ;; +- -touch) +- touchOnly=true +- shift +- ;; +- *) +- usage "unknown option/argument: '$*'" +- ;; ++ -case) ++ if [ $# -lt 2 ]; then ++ echo "-case requires path specification" ++ exit 1 ++ fi ++ shift ++ casePath="$1" ++ ;; ++ -clientServer|-cs) ++ if [ $# -lt 2 ]; then ++ echo "-clientServer or -cs requires specification of the server resource name" ++ exit 1 ++ fi ++ shift ++ csResourceName="$1" ++ ;; ++ -foreground|-fg) ++ background=no ++ ;; ++ -keepStub|-ks) ++ trapCommand=: ++ ;; ++ -help) ++ echo "Usage: ${script} [-case <dir>] [-clientServer|-cs <server resource name>] [-foreground|-fg] [-keepStub|-ks] [-help]" ++ exit 0 ++ ;; + esac ++ shift + done + +-# get a sensible caseName +-caseName=${PWD##*/} +-caseFile="$caseName.OpenFOAM" +-fvControls="system" +- +-if [ -n "$regionName" ] +-then +- caseFile="$caseName{$regionName}.OpenFOAM" +- fvControls="$fvControls/$regionName" +-fi +- +-if [ -n "$touchOnly" ] +-then +- touch "$caseFile" +- echo "created '$caseFile'" +- exit 0 ++# cd to the case directory ++if ! cd "${casePath}" > /dev/null 2>&1; then ++ echo "Cannot change directory to \"${casePath}\"; exiting" ++ exit 1 + fi + +-# parent directory for normal or parallel results +-case "$caseName" in +- processor*) parentDir=".." ;; +- *) parentDir="." ;; +-esac +- +-# check existence of essential files +-for check in system/controlDict $fvControls/fvSchemes $fvControls/fvSolution +-do +- [ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'" +-done ++caseName="${PWD##*/}" + ++# see if caseName starts with controlDict or the case is in the root directory. ++if [ "${caseName#controlDict}" != "${caseName}" -o ! "${caseName}" ]; then ++ # Use case.foam as file name given to ParaView ++ caseName="case" ++fi + +-case "$ParaView_VERSION" in +-2*) +- trap "rm -f paraFoam.pvs $caseFile 2>/dev/null; exit 0" EXIT TERM INT +- touch "$caseFile" +- +- # since we are now in the cwd, %CASE% is '$PWD/$caseFile' +- sed -e s@%CASE%@$PWD/$caseFile@g \ +- $WM_PROJECT_DIR/bin/tools/paraFoam.pvs > paraFoam.pvs +- +- paraview paraFoam.pvs +- ;; +- +-*) +- # only create/remove caseFile if it didn't already exist +- [ -e $caseFile ] || { +- trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT +- touch "$caseFile" +- echo "created temporary '$caseFile'" +- } ++fileName="${caseName}.${ext}" ++if [ -e "${fileName}" ]; then ++ if [ ! -r "${fileName}" ]; then ++ echo "Stub ${fileName} exists but not readable; exiting" ++ exit 1 ++ fi ++ trapCommand=: ++else ++ if ! touch "${fileName}" > /dev/null 2>&1; then ++ echo "Cannot create stub ${fileName}; exiting" ++ exit 1 ++ fi ++fi + +- paraview --data="$caseFile" +- ;; ++# set the locale where ParaView is run under to "C" so that the ++# interpretation of decimal points by the system routines are not ++# affected ++export LANG=C ++export LC_ALL=C ++ ++# specify fileName with full path so that it can easily be accessed ++# later with File->Recent Files ++if [ "${background}" = "yes" ]; then ++ ( ++ ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \ ++ EXIT HUP INT PIPE ALRM TERM USR1 USR2 ; ++ if [ "${csResourceName}" ]; then ++ "${paraviewPath}" --data="${PWD}/${fileName}" \ ++ --server="${csResourceName}" ++ else ++ "${paraviewPath}" --data="${PWD}/${fileName}" ++ fi ++ ) & ++else ++ ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \ ++ EXIT HUP INT PIPE ALRM TERM USR1 USR2 ++ if [ "${csResourceName}" ]; then ++ "${paraviewPath}" --data="${PWD}/${fileName}" \ ++ --server="${csResourceName}" ++ else ++ "${paraviewPath}" --data="${PWD}/${fileName}" ++ fi ++fi + +-esac + #------------------------------------------------------------------------------ +diff -urN OpenFOAM-1.6-src/etc/bashrc OpenFOAM-1.6/etc/bashrc +--- OpenFOAM-1.6-src/etc/bashrc 2009-07-15 13:48:16.000000000 +0200 ++++ OpenFOAM-1.6/etc/bashrc 2009-08-06 10:32:47.000000000 +0200 +@@ -43,9 +43,9 @@ + # + # Location of FOAM installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-foamInstall=$HOME/$WM_PROJECT ++# foamInstall=$HOME/$WM_PROJECT + # foamInstall=~$WM_PROJECT +-# foamInstall=/usr/local/$WM_PROJECT ++foamInstall=/usr/lib/$WM_PROJECT + # foamInstall=/opt/$WM_PROJECT + # + # END OF (NORMAL) USER EDITABLE PART +@@ -73,7 +73,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++# export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION + + + # Operating System/Platform +@@ -232,14 +232,14 @@ + + + _foamSource $WM_PROJECT_DIR/etc/settings.sh +-_foamSource $WM_PROJECT_DIR/etc/aliases.sh ++# _foamSource $WM_PROJECT_DIR/etc/aliases.sh + + + # Source user setup files for optional packages + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc +-_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc +-_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc + + + # Clean environment paths again. Only remove duplicates +diff -urN OpenFOAM-1.6-src/etc/cshrc OpenFOAM-1.6/etc/cshrc +--- OpenFOAM-1.6-src/etc/cshrc 2009-07-15 13:48:16.000000000 +0200 ++++ OpenFOAM-1.6/etc/cshrc 2009-08-06 10:42:58.000000000 +0200 +@@ -42,9 +42,9 @@ + # + # Location of FOAM installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-set foamInstall = $HOME/$WM_PROJECT ++# set foamInstall = $HOME/$WM_PROJECT + # set foamInstall = ~$WM_PROJECT +-# set foamInstall = /usr/local/$WM_PROJECT ++set foamInstall = /usr/lib/$WM_PROJECT + # set foamInstall = /opt/$WM_PROJECT + # + # END OF (NORMAL) USER EDITABLE PART +@@ -67,7 +67,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++# setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION + + + # Operating System/Platform +@@ -230,12 +230,12 @@ + alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*' + + _foamSource $WM_PROJECT_DIR/etc/settings.csh +-_foamSource $WM_PROJECT_DIR/etc/aliases.csh ++# _foamSource $WM_PROJECT_DIR/etc/aliases.csh + + # Source user setup files for optional packages + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc +-_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc + # _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc + + +diff -urN OpenFOAM-1.6-src/etc/settings.csh OpenFOAM-1.6/etc/settings.csh +--- OpenFOAM-1.6-src/etc/settings.csh 2009-07-23 18:31:28.000000000 +0200 ++++ OpenFOAM-1.6/etc/settings.csh 2009-08-06 10:46:06.000000000 +0200 +@@ -37,27 +37,27 @@ + alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}' + + # location of the jobControl directory +-setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl ++setenv FOAM_JOB_DIR $HOME/$WM_PROJECT/jobControl + + # wmake configuration + setenv WM_DIR $WM_PROJECT_DIR/wmake + setenv WM_LINK_LANGUAGE c++ +-setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION ++setenv WM_OPTIONS $WM_ARCH$WM_COMPILER + + # base configuration + setenv FOAM_APP $WM_PROJECT_DIR/applications +-setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS ++setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin + setenv FOAM_LIB $WM_PROJECT_DIR/lib +-setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS ++setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib + setenv FOAM_SRC $WM_PROJECT_DIR/src + + # shared site configuration - similar naming convention as ~OpenFOAM expansion +-setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS +-setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS ++setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin ++setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib + + # user configuration +-setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS +-setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS ++setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin ++setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib + + # convenience + setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials +@@ -79,7 +79,7 @@ + # Select compiler installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # compilerInstall = OpenFOAM | System +-set compilerInstall=OpenFOAM ++set compilerInstall=System + + switch ("$compilerInstall") + case OpenFOAM: +@@ -124,30 +124,30 @@ + + switch ("$WM_MPLIB") + case OPENMPI: +- set mpi_version=openmpi-1.3.3 +- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version +- setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS ++ set mpi_version=openmpi ++# setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version ++ setenv MPI_ARCH_PATH /usr + + # Tell OpenMPI where to find its install directory + setenv OPAL_PREFIX $MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version ++ setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version + unset mpi_version + breaksw + + case MPICH: +- set mpi_version=mpich-1.2.4 +- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version +- setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS ++ set mpi_version=mpich ++# setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version ++ setenv MPI_ARCH_PATH /usr + setenv MPICH_ROOT $MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version ++ setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version + unset mpi_version + breaksw + +diff -urN OpenFOAM-1.6-src/etc/settings.sh OpenFOAM-1.6/etc/settings.sh +--- OpenFOAM-1.6-src/etc/settings.sh 2009-07-23 18:31:28.000000000 +0200 ++++ OpenFOAM-1.6/etc/settings.sh 2009-08-06 10:38:07.000000000 +0200 +@@ -53,27 +53,27 @@ + + + # location of the jobControl directory +-export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl ++export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl + + # wmake configuration + export WM_DIR=$WM_PROJECT_DIR/wmake + export WM_LINK_LANGUAGE=c++ +-export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION ++export WM_OPTIONS=$WM_ARCH$WM_COMPILER + + # base configuration + export FOAM_APP=$WM_PROJECT_DIR/applications +-export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS ++export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin + export FOAM_LIB=$WM_PROJECT_DIR/lib +-export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS ++export FOAM_LIBBIN=$WM_PROJECT_DIR/lib + export FOAM_SRC=$WM_PROJECT_DIR/src + + # shared site configuration - similar naming convention as ~OpenFOAM expansion +-export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS +-export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS ++export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin ++export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib + + # user configuration +-export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS +-export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS ++export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin ++export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib + + # convenience + export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials +@@ -95,7 +95,7 @@ + # Select compiler installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # compilerInstall = OpenFOAM | System +-compilerInstall=OpenFOAM ++compilerInstall=System + + case "${compilerInstall:-OpenFOAM}" in + OpenFOAM) +@@ -146,30 +146,30 @@ + + case "$WM_MPLIB" in + OPENMPI) +- mpi_version=openmpi-1.3.3 +- export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version +- export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS ++ mpi_version=openmpi ++# export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version ++ export MPI_ARCH_PATH=/usr + + # Tell OpenMPI where to find its install directory + export OPAL_PREFIX=$MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version ++ export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version + unset mpi_version + ;; + + MPICH) +- mpi_version=mpich-1.2.4 +- export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version +- export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS ++ mpi_version=mpich ++# export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version ++ export MPI_ARCH_PATH=/usr + export MPICH_ROOT=$MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version ++ export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version + unset mpi_version + ;; + +diff -urN OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options OpenFOAM-1.6/src/decompositionMethods/decompositionMethods/Make/options +--- OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options 2009-04-24 08:56:28.000000000 +0200 ++++ OpenFOAM-1.6/src/decompositionMethods/decompositionMethods/Make/options 2009-08-06 13:50:29.000000000 +0200 +@@ -1,8 +1,7 @@ + EXE_INC = \ +- -I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch/lnInclude \ +- -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include ++ -I/usr/include/scotch \ ++ -I/usr/include/metis + + LIB_LIBS = \ + -lscotch \ +- -lmetis \ +- -lGKlib ++ -lmetis +diff -urN OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options OpenFOAM-1.6/src/decompositionMethods/parMetisDecomp/Make/options +--- OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options 2009-04-02 15:00:31.000000000 +0200 ++++ OpenFOAM-1.6/src/decompositionMethods/parMetisDecomp/Make/options 2009-08-06 11:00:53.000000000 +0200 +@@ -2,11 +2,11 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \ +- -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \ ++ -I/usr/include/parmetis \ ++ -I/usr/include/metis \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ + -L$(FOAM_MPI_LIBBIN) \ +- -lmetis-parmetis \ ++ -lmetis \ + -lparmetis +diff -urN OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options OpenFOAM-1.6/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options +--- OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options 2009-07-03 11:54:30.000000000 +0200 ++++ OpenFOAM-1.6/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options 2009-08-06 11:02:21.000000000 +0200 +@@ -1,5 +1,3 @@ +-ParMGridGen = $(WM_THIRD_PARTY_DIR)/ParMGridGen-1.0 +- + TYPE_REAL= + #if defined(WM_SP) + TYPE_REAL=-DTYPE_REAL +@@ -7,9 +5,9 @@ + + EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ +- -I$(ParMGridGen)/MGridGen/Lib/lnInclude \ +- -I$(ParMGridGen)/MGridGen/IMlib/lnInclude \ ++ -I/usr/include/mgridgen \ + $(TYPE_REAL) + + LIB_LIBS = \ ++ -lIMlib \ + -lMGridGen +diff -urN OpenFOAM-1.6-src/wmake/Makefile OpenFOAM-1.6/wmake/Makefile +--- OpenFOAM-1.6-src/wmake/Makefile 2009-07-21 20:06:59.000000000 +0200 ++++ OpenFOAM-1.6/wmake/Makefile 2009-08-06 10:47:17.000000000 +0200 +@@ -58,7 +58,7 @@ + + LIB_SRC = $(WM_PROJECT_DIR)/src + LIB_DIR = $(WM_PROJECT_DIR)/lib +-LIB_WM_OPTIONS_DIR = $(LIB_DIR)/$(WM_OPTIONS) ++LIB_WM_OPTIONS_DIR = $(LIB_DIR) + OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) + CLASSES_DIR = $(MAKE_DIR)/classes + +diff -urN OpenFOAM-1.6-src/bin/foamInstallationTest OpenFOAM-1.6/bin/foamInstallationTest +--- OpenFOAM-1.6-src/bin/foamInstallationTest 2009-07-27 13:31:34.000000000 +0200 ++++ OpenFOAM-1.6/bin/foamInstallationTest 2009-08-06 18:19:44.000000000 +0200 +@@ -383,7 +383,7 @@ + + + checkOpenFOAMEnvironment() { +- [ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || { ++ [ -d "$WM_PROJECT_INST_DIR" ] || { + echo "" + echo "FATAL ERROR: OpenFOAM environment not configured." + echo "" diff --git a/sci-libs/openfoam-src/openfoam-src-1.6.ebuild b/sci-libs/openfoam-src/openfoam-src-1.6.ebuild new file mode 100644 index 000000000000..9dc854bdd1bb --- /dev/null +++ b/sci-libs/openfoam-src/openfoam-src-1.6.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-src/openfoam-src-1.6.ebuild,v 1.1 2009/09/18 09:12:19 patrick Exp $ + +EAPI="2" + +inherit eutils versionator multilib + +MY_PN="OpenFOAM" +MY_PV=$(get_version_component_range 1-2) +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="OpenFOAM - sources" +HOMEPAGE="http://www.opencfd.co.uk/openfoam/" +SRC_URI="mirror://sourceforge/foam/${MY_P}.General.gtgz -> ${MY_P}.General.tgz" + +LICENSE="GPL-2" +SLOT="1.6" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="|| ( =sci-libs/openfoam-meta-${MY_PV}* =sci-libs/openfoam-${MY_PV}* =sci-libs/openfoam-bin-${MY_PV}* )" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} +INSDIR="/usr/$(get_libdir)/${MY_PN}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/${MY_P}-compile.patch +} + +src_install() { + insinto ${INSDIR}/src + doins -r src/* + + insinto ${INSDIR}/applications + doins -r applications/* +} diff --git a/sci-libs/openfoam/ChangeLog b/sci-libs/openfoam/ChangeLog index 43407b244db4..0d8d35d56853 100644 --- a/sci-libs/openfoam/ChangeLog +++ b/sci-libs/openfoam/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/openfoam # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam/ChangeLog,v 1.2 2009/04/26 13:41:10 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam/ChangeLog,v 1.3 2009/09/18 09:11:35 patrick Exp $ + +*openfoam-1.6 (18 Sep 2009) + + 18 Sep 2009; Patrick Lauer <patrick@gentoo.org> +openfoam-1.6.ebuild, + +files/OpenFOAM-1.6-compile.patch, +files/OpenFOAM-1.6_gcc4.4.patch: + Bump to 1.6, thanks to Oliver Borm for ebuilds and patches. Fixes #280586 26 Apr 2009; Patrick Lauer <patrick@gentoo.org> metadata.xml: Adding Oliver Borm to metadata diff --git a/sci-libs/openfoam/files/OpenFOAM-1.6-compile.patch b/sci-libs/openfoam/files/OpenFOAM-1.6-compile.patch new file mode 100644 index 000000000000..79c1b7e66b52 --- /dev/null +++ b/sci-libs/openfoam/files/OpenFOAM-1.6-compile.patch @@ -0,0 +1,605 @@ +diff -urN OpenFOAM-1.6-src/bin/paraFoam OpenFOAM-1.6/bin/paraFoam +--- OpenFOAM-1.6-src/bin/paraFoam 2009-01-08 21:19:14.000000000 +0100 ++++ OpenFOAM-1.6/bin/paraFoam 2009-08-06 10:54:38.000000000 +0200 +@@ -1,133 +1,148 @@ + #!/bin/sh +-#------------------------------------------------------------------------------ +-# ========= | +-# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +-# \\ / O peration | +-# \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, +-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Copyright (c) 2008-2009 Takuya OSHIMA <oshima@eng.niigata-u.ac.jp>. ++# All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# * Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the ++# distribution. ++# ++# * Neither the name of the author nor the names of any contributors ++# may be used to endorse or promote products derived from this ++# software without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR ++# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Script +-# paraFoam ++# pvFoam + # + # Description +-# start paraview with the OpenFOAM libraries +-# +-#------------------------------------------------------------------------------ +-usage() { +- while [ "$#" -ge 1 ]; do echo "$1"; shift; done +- cat<<USAGE +- +-usage: ${0##*/} [OPTION] +-options: +- -case dir specify alternative case directory +- -region name specify mesh region name +- -touch only create the .OpenFOAM file +- +-* start paraview $ParaView_VERSION with the OpenFOAM libraries ++# ParaView interface script for use with vtkPOpenFOAMReader. + +-USAGE ++# Adjust as necessary. ++# You might also want to set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH. ++paraviewPath="`which paraview`" ++# or in full path like paraviewPath=/opt/ParaView3/bin/paraview ++ ++if [ ! -x "${paraviewPath}" -o -d "${paraviewPath}" ]; then ++ # not using LINENO which is not supported by dash (yet) ++ echo "ParaView not found; set paraviewPath at line" `awk '/paraviewPath/{print FNR;exit 0}' $0` "of $0." + exit 1 +-} ++fi + +-unset regionName touchOnly ++ext=foam ++casePath=. ++script=${0##*/} ++background=yes ++trapCommand=trap + +-# parse options +-while [ "$#" -gt 0 ] ++while [ $# -gt 0 ] + do + case "$1" in +- -h | -help) +- usage +- ;; +- -case) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" +- shift 2 +- ;; +- -region) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- regionName=$2 +- shift 2 +- ;; +- -touch) +- touchOnly=true +- shift +- ;; +- *) +- usage "unknown option/argument: '$*'" +- ;; ++ -case) ++ if [ $# -lt 2 ]; then ++ echo "-case requires path specification" ++ exit 1 ++ fi ++ shift ++ casePath="$1" ++ ;; ++ -clientServer|-cs) ++ if [ $# -lt 2 ]; then ++ echo "-clientServer or -cs requires specification of the server resource name" ++ exit 1 ++ fi ++ shift ++ csResourceName="$1" ++ ;; ++ -foreground|-fg) ++ background=no ++ ;; ++ -keepStub|-ks) ++ trapCommand=: ++ ;; ++ -help) ++ echo "Usage: ${script} [-case <dir>] [-clientServer|-cs <server resource name>] [-foreground|-fg] [-keepStub|-ks] [-help]" ++ exit 0 ++ ;; + esac ++ shift + done + +-# get a sensible caseName +-caseName=${PWD##*/} +-caseFile="$caseName.OpenFOAM" +-fvControls="system" +- +-if [ -n "$regionName" ] +-then +- caseFile="$caseName{$regionName}.OpenFOAM" +- fvControls="$fvControls/$regionName" +-fi +- +-if [ -n "$touchOnly" ] +-then +- touch "$caseFile" +- echo "created '$caseFile'" +- exit 0 ++# cd to the case directory ++if ! cd "${casePath}" > /dev/null 2>&1; then ++ echo "Cannot change directory to \"${casePath}\"; exiting" ++ exit 1 + fi + +-# parent directory for normal or parallel results +-case "$caseName" in +- processor*) parentDir=".." ;; +- *) parentDir="." ;; +-esac +- +-# check existence of essential files +-for check in system/controlDict $fvControls/fvSchemes $fvControls/fvSolution +-do +- [ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'" +-done ++caseName="${PWD##*/}" + ++# see if caseName starts with controlDict or the case is in the root directory. ++if [ "${caseName#controlDict}" != "${caseName}" -o ! "${caseName}" ]; then ++ # Use case.foam as file name given to ParaView ++ caseName="case" ++fi + +-case "$ParaView_VERSION" in +-2*) +- trap "rm -f paraFoam.pvs $caseFile 2>/dev/null; exit 0" EXIT TERM INT +- touch "$caseFile" +- +- # since we are now in the cwd, %CASE% is '$PWD/$caseFile' +- sed -e s@%CASE%@$PWD/$caseFile@g \ +- $WM_PROJECT_DIR/bin/tools/paraFoam.pvs > paraFoam.pvs +- +- paraview paraFoam.pvs +- ;; +- +-*) +- # only create/remove caseFile if it didn't already exist +- [ -e $caseFile ] || { +- trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT +- touch "$caseFile" +- echo "created temporary '$caseFile'" +- } ++fileName="${caseName}.${ext}" ++if [ -e "${fileName}" ]; then ++ if [ ! -r "${fileName}" ]; then ++ echo "Stub ${fileName} exists but not readable; exiting" ++ exit 1 ++ fi ++ trapCommand=: ++else ++ if ! touch "${fileName}" > /dev/null 2>&1; then ++ echo "Cannot create stub ${fileName}; exiting" ++ exit 1 ++ fi ++fi + +- paraview --data="$caseFile" +- ;; ++# set the locale where ParaView is run under to "C" so that the ++# interpretation of decimal points by the system routines are not ++# affected ++export LANG=C ++export LC_ALL=C ++ ++# specify fileName with full path so that it can easily be accessed ++# later with File->Recent Files ++if [ "${background}" = "yes" ]; then ++ ( ++ ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \ ++ EXIT HUP INT PIPE ALRM TERM USR1 USR2 ; ++ if [ "${csResourceName}" ]; then ++ "${paraviewPath}" --data="${PWD}/${fileName}" \ ++ --server="${csResourceName}" ++ else ++ "${paraviewPath}" --data="${PWD}/${fileName}" ++ fi ++ ) & ++else ++ ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \ ++ EXIT HUP INT PIPE ALRM TERM USR1 USR2 ++ if [ "${csResourceName}" ]; then ++ "${paraviewPath}" --data="${PWD}/${fileName}" \ ++ --server="${csResourceName}" ++ else ++ "${paraviewPath}" --data="${PWD}/${fileName}" ++ fi ++fi + +-esac + #------------------------------------------------------------------------------ +diff -urN OpenFOAM-1.6-src/etc/bashrc OpenFOAM-1.6/etc/bashrc +--- OpenFOAM-1.6-src/etc/bashrc 2009-07-15 13:48:16.000000000 +0200 ++++ OpenFOAM-1.6/etc/bashrc 2009-08-06 10:32:47.000000000 +0200 +@@ -43,9 +43,9 @@ + # + # Location of FOAM installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-foamInstall=$HOME/$WM_PROJECT ++# foamInstall=$HOME/$WM_PROJECT + # foamInstall=~$WM_PROJECT +-# foamInstall=/usr/local/$WM_PROJECT ++foamInstall=/usr/lib/$WM_PROJECT + # foamInstall=/opt/$WM_PROJECT + # + # END OF (NORMAL) USER EDITABLE PART +@@ -73,7 +73,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++# export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION + + + # Operating System/Platform +@@ -232,14 +232,14 @@ + + + _foamSource $WM_PROJECT_DIR/etc/settings.sh +-_foamSource $WM_PROJECT_DIR/etc/aliases.sh ++# _foamSource $WM_PROJECT_DIR/etc/aliases.sh + + + # Source user setup files for optional packages + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc +-_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc +-_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc + + + # Clean environment paths again. Only remove duplicates +diff -urN OpenFOAM-1.6-src/etc/cshrc OpenFOAM-1.6/etc/cshrc +--- OpenFOAM-1.6-src/etc/cshrc 2009-07-15 13:48:16.000000000 +0200 ++++ OpenFOAM-1.6/etc/cshrc 2009-08-06 10:42:58.000000000 +0200 +@@ -42,9 +42,9 @@ + # + # Location of FOAM installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-set foamInstall = $HOME/$WM_PROJECT ++# set foamInstall = $HOME/$WM_PROJECT + # set foamInstall = ~$WM_PROJECT +-# set foamInstall = /usr/local/$WM_PROJECT ++set foamInstall = /usr/lib/$WM_PROJECT + # set foamInstall = /opt/$WM_PROJECT + # + # END OF (NORMAL) USER EDITABLE PART +@@ -67,7 +67,7 @@ + + # Location of third-party software + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION ++# setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION + + + # Operating System/Platform +@@ -230,12 +230,12 @@ + alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*' + + _foamSource $WM_PROJECT_DIR/etc/settings.csh +-_foamSource $WM_PROJECT_DIR/etc/aliases.csh ++# _foamSource $WM_PROJECT_DIR/etc/aliases.csh + + # Source user setup files for optional packages + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc +-_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc ++# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc + # _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc + + +diff -urN OpenFOAM-1.6-src/etc/settings.csh OpenFOAM-1.6/etc/settings.csh +--- OpenFOAM-1.6-src/etc/settings.csh 2009-07-23 18:31:28.000000000 +0200 ++++ OpenFOAM-1.6/etc/settings.csh 2009-08-06 10:46:06.000000000 +0200 +@@ -37,27 +37,27 @@ + alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}' + + # location of the jobControl directory +-setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl ++setenv FOAM_JOB_DIR $HOME/$WM_PROJECT/jobControl + + # wmake configuration + setenv WM_DIR $WM_PROJECT_DIR/wmake + setenv WM_LINK_LANGUAGE c++ +-setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION ++setenv WM_OPTIONS $WM_ARCH$WM_COMPILER + + # base configuration + setenv FOAM_APP $WM_PROJECT_DIR/applications +-setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS ++setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin + setenv FOAM_LIB $WM_PROJECT_DIR/lib +-setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS ++setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib + setenv FOAM_SRC $WM_PROJECT_DIR/src + + # shared site configuration - similar naming convention as ~OpenFOAM expansion +-setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS +-setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS ++setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin ++setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib + + # user configuration +-setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS +-setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS ++setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin ++setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib + + # convenience + setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials +@@ -79,7 +79,7 @@ + # Select compiler installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # compilerInstall = OpenFOAM | System +-set compilerInstall=OpenFOAM ++set compilerInstall=System + + switch ("$compilerInstall") + case OpenFOAM: +@@ -124,30 +124,30 @@ + + switch ("$WM_MPLIB") + case OPENMPI: +- set mpi_version=openmpi-1.3.3 +- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version +- setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS ++ set mpi_version=openmpi ++# setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version ++ setenv MPI_ARCH_PATH /usr + + # Tell OpenMPI where to find its install directory + setenv OPAL_PREFIX $MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version ++ setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version + unset mpi_version + breaksw + + case MPICH: +- set mpi_version=mpich-1.2.4 +- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version +- setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS ++ set mpi_version=mpich ++# setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version ++ setenv MPI_ARCH_PATH /usr + setenv MPICH_ROOT $MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version ++ setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version + unset mpi_version + breaksw + +diff -urN OpenFOAM-1.6-src/etc/settings.sh OpenFOAM-1.6/etc/settings.sh +--- OpenFOAM-1.6-src/etc/settings.sh 2009-07-23 18:31:28.000000000 +0200 ++++ OpenFOAM-1.6/etc/settings.sh 2009-08-06 10:38:07.000000000 +0200 +@@ -53,27 +53,27 @@ + + + # location of the jobControl directory +-export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl ++export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl + + # wmake configuration + export WM_DIR=$WM_PROJECT_DIR/wmake + export WM_LINK_LANGUAGE=c++ +-export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION ++export WM_OPTIONS=$WM_ARCH$WM_COMPILER + + # base configuration + export FOAM_APP=$WM_PROJECT_DIR/applications +-export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS ++export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin + export FOAM_LIB=$WM_PROJECT_DIR/lib +-export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS ++export FOAM_LIBBIN=$WM_PROJECT_DIR/lib + export FOAM_SRC=$WM_PROJECT_DIR/src + + # shared site configuration - similar naming convention as ~OpenFOAM expansion +-export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS +-export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS ++export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin ++export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib + + # user configuration +-export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS +-export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS ++export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin ++export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib + + # convenience + export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials +@@ -95,7 +95,7 @@ + # Select compiler installation + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # compilerInstall = OpenFOAM | System +-compilerInstall=OpenFOAM ++compilerInstall=System + + case "${compilerInstall:-OpenFOAM}" in + OpenFOAM) +@@ -146,30 +146,30 @@ + + case "$WM_MPLIB" in + OPENMPI) +- mpi_version=openmpi-1.3.3 +- export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version +- export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS ++ mpi_version=openmpi ++# export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version ++ export MPI_ARCH_PATH=/usr + + # Tell OpenMPI where to find its install directory + export OPAL_PREFIX=$MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version ++ export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version + unset mpi_version + ;; + + MPICH) +- mpi_version=mpich-1.2.4 +- export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version +- export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS ++ mpi_version=mpich ++# export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version ++ export MPI_ARCH_PATH=/usr + export MPICH_ROOT=$MPI_ARCH_PATH + +- _foamAddPath $MPI_ARCH_PATH/bin +- _foamAddLib $MPI_ARCH_PATH/lib ++# _foamAddPath $MPI_ARCH_PATH/bin ++# _foamAddLib $MPI_ARCH_PATH/lib + +- export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version ++ export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version + unset mpi_version + ;; + +diff -urN OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options OpenFOAM-1.6/src/decompositionMethods/decompositionMethods/Make/options +--- OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options 2009-04-24 08:56:28.000000000 +0200 ++++ OpenFOAM-1.6/src/decompositionMethods/decompositionMethods/Make/options 2009-08-06 13:50:29.000000000 +0200 +@@ -1,8 +1,7 @@ + EXE_INC = \ +- -I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch/lnInclude \ +- -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include ++ -I/usr/include/scotch \ ++ -I/usr/include/metis + + LIB_LIBS = \ + -lscotch \ +- -lmetis \ +- -lGKlib ++ -lmetis +diff -urN OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options OpenFOAM-1.6/src/decompositionMethods/parMetisDecomp/Make/options +--- OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options 2009-04-02 15:00:31.000000000 +0200 ++++ OpenFOAM-1.6/src/decompositionMethods/parMetisDecomp/Make/options 2009-08-06 11:00:53.000000000 +0200 +@@ -2,11 +2,11 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \ +- -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \ ++ -I/usr/include/parmetis \ ++ -I/usr/include/metis \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ + -L$(FOAM_MPI_LIBBIN) \ +- -lmetis-parmetis \ ++ -lmetis \ + -lparmetis +diff -urN OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options OpenFOAM-1.6/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options +--- OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options 2009-07-03 11:54:30.000000000 +0200 ++++ OpenFOAM-1.6/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options 2009-08-06 11:02:21.000000000 +0200 +@@ -1,5 +1,3 @@ +-ParMGridGen = $(WM_THIRD_PARTY_DIR)/ParMGridGen-1.0 +- + TYPE_REAL= + #if defined(WM_SP) + TYPE_REAL=-DTYPE_REAL +@@ -7,9 +5,9 @@ + + EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ +- -I$(ParMGridGen)/MGridGen/Lib/lnInclude \ +- -I$(ParMGridGen)/MGridGen/IMlib/lnInclude \ ++ -I/usr/include/mgridgen \ + $(TYPE_REAL) + + LIB_LIBS = \ ++ -lIMlib \ + -lMGridGen +diff -urN OpenFOAM-1.6-src/wmake/Makefile OpenFOAM-1.6/wmake/Makefile +--- OpenFOAM-1.6-src/wmake/Makefile 2009-07-21 20:06:59.000000000 +0200 ++++ OpenFOAM-1.6/wmake/Makefile 2009-08-06 10:47:17.000000000 +0200 +@@ -58,7 +58,7 @@ + + LIB_SRC = $(WM_PROJECT_DIR)/src + LIB_DIR = $(WM_PROJECT_DIR)/lib +-LIB_WM_OPTIONS_DIR = $(LIB_DIR)/$(WM_OPTIONS) ++LIB_WM_OPTIONS_DIR = $(LIB_DIR) + OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) + CLASSES_DIR = $(MAKE_DIR)/classes + +diff -urN OpenFOAM-1.6-src/bin/foamInstallationTest OpenFOAM-1.6/bin/foamInstallationTest +--- OpenFOAM-1.6-src/bin/foamInstallationTest 2009-07-27 13:31:34.000000000 +0200 ++++ OpenFOAM-1.6/bin/foamInstallationTest 2009-08-06 18:19:44.000000000 +0200 +@@ -383,7 +383,7 @@ + + + checkOpenFOAMEnvironment() { +- [ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || { ++ [ -d "$WM_PROJECT_INST_DIR" ] || { + echo "" + echo "FATAL ERROR: OpenFOAM environment not configured." + echo "" diff --git a/sci-libs/openfoam/files/OpenFOAM-1.6_gcc4.4.patch b/sci-libs/openfoam/files/OpenFOAM-1.6_gcc4.4.patch new file mode 100644 index 000000000000..4473191c0975 --- /dev/null +++ b/sci-libs/openfoam/files/OpenFOAM-1.6_gcc4.4.patch @@ -0,0 +1,59 @@ +diff -u a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C +--- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C 2009-09-04 12:51:54.000000000 +0200 ++++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C 2009-09-04 12:54:25.000000000 +0200 +@@ -762,10 +762,11 @@ + const scalarField& maxDist + ) const + { ++ treeBoundBox tbb(samples); + // Build tree out of all samples. + octree<octreeDataPoint> ppTree + ( +- treeBoundBox(samples), // overall search domain ++ tbb, // overall search domain + octreeDataPoint(samples), // all information needed to do checks + 1, // min levels + 20.0, // maximum ratio of cubes v.s. cells +@@ -863,10 +864,11 @@ + scalar maxSearch = max(maxDist); + vector span(maxSearch, maxSearch, maxSearch); + ++ treeBoundBox tbb(samples); + // octree.shapes holds reference! + octree<octreeDataPoint> ppTree + ( +- treeBoundBox(samples), // overall search domain ++ tbb, // overall search domain + octreeDataPoint(samples), // all information needed to do checks + 1, // min levels + 20.0, // maximum ratio of cubes v.s. cells +--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L 2009-09-04 17:07:43.000000000 +0200 ++++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L 2009-09-04 17:07:50.000000000 +0200 +@@ -32,6 +32,7 @@ + + #include "error.H" + #include "IStringStream.H" ++#include <stdio.h> + + // flex input buffer size + int Foam::chemkinReader::yyBufSize = YY_BUF_SIZE; +--- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L 2009-09-04 17:24:18.000000000 +0200 ++++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L 2009-09-04 17:24:38.000000000 +0200 +@@ -39,6 +39,7 @@ + \* ------------------------------------------------------------------------- */ + + #include <sstream> ++#include <stdio.h> + + #include "scalar.H" + #include "IStringStream.H" +--- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L 2009-09-04 17:25:43.000000000 +0200 ++++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L 2009-09-04 17:26:10.000000000 +0200 +@@ -40,6 +40,7 @@ + + #include "scalarList.H" + #include "IStringStream.H" ++#include <stdio.h> + + using namespace Foam; + diff --git a/sci-libs/openfoam/openfoam-1.6.ebuild b/sci-libs/openfoam/openfoam-1.6.ebuild new file mode 100644 index 000000000000..5e5115a19826 --- /dev/null +++ b/sci-libs/openfoam/openfoam-1.6.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam/openfoam-1.6.ebuild,v 1.1 2009/09/18 09:11:35 patrick Exp $ + +EAPI="2" + +inherit eutils versionator multilib toolchain-funcs + +MY_PN="OpenFOAM" +MY_PV=$(get_version_component_range 1-2) +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Open Field Operation and Manipulation - CFD Simulation Toolbox" +HOMEPAGE="http://www.opencfd.co.uk/openfoam/" +SRC_URI="mirror://sourceforge/foam/${MY_P}.General.gtgz -> ${MY_P}.General.tgz" + +LICENSE="GPL-2" +SLOT="1.6" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples" + +DEPEND="!=sci-libs/openfoam-bin-${MY_PV}* + !=sci-libs/openfoam-kernel-${MY_PV}* + !=sci-libs/openfoam-meta-${MY_PV}* + !=sci-libs/openfoam-solvers-${MY_PV}* + !=sci-libs/openfoam-utilities-${MY_PV}* + !=sci-libs/openfoam-wmake-${MY_PV}* + sci-libs/parmetis + sci-libs/parmgridgen + sci-libs/scotch + || ( >sci-visualization/paraview-3.0 sci-visualization/opendx ) + virtual/mpi" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} +INSDIR="/usr/$(get_libdir)/${MY_PN}/${MY_P}" + +pkg_setup() { + # just to be sure the right profile is selected (gcc-config) + if ! version_is_at_least 4.1 $(gcc-version) ; then + die "${PN} requires >=sys-devel/gcc-4.1 to compile." + fi + + elog + elog "In order to use ${MY_PN} you should add the following line to ~/.bashrc :" + elog + elog "alias startOF$(delete_all_version_separators ${MY_PV})='source ${INSDIR}/etc/bashrc'" + elog + elog "And everytime you want to use OpenFOAM you have to execute startOF$(delete_all_version_separators ${MY_PV})" + ewarn + ewarn "FoamX is deprecated since ${MY_PN}-1.5! " + ewarn +} + +src_prepare() { + epatch "${FILESDIR}"/${MY_P}-compile.patch + epatch "${FILESDIR}"/${MY_P}_gcc4.4.patch +} + +src_configure() { + if has_version sys-cluster/mpich2 ; then + export WM_MPLIB=MPICH + elif has_version sys-cluster/openmpi ; then + export WM_MPLIB=OPENMPI + else + die "You need one of the following mpi implementations: openmpi or mpich2" + fi + + sed -i -e "s|WM_MPLIB:=OPENMPI|WM_MPLIB:="${WM_MPLIB}"|" etc/bashrc + sed -i -e "s|setenv WM_MPLIB OPENMPI|setenv WM_MPLIB "${WM_MPLIB}"|" etc/cshrc +} + +src_compile() { + export FOAM_INST_DIR=${WORKDIR} + source etc/bashrc + + find wmake -name dirToString | xargs rm -rf + find wmake -name wmkdep | xargs rm -rf + + ./Allwmake || die "could not build" +} + +src_test() { + cd bin + ./foamInstallationTest +} + +src_install() { + insinto ${INSDIR} + doins -r etc + + use examples && doins -r tutorials + + insopts -m0755 + doins -r bin + + insinto ${INSDIR}/applications/bin + doins -r applications/bin/* + + insinto ${INSDIR}/lib + doins -r lib/* + + insinto ${INSDIR}/wmake + doins -r wmake/* + + dodoc {doc/Guides-a4/*.pdf,README} + + if use doc ; then + dohtml -r doc/Doxygen + fi +} |