New ThirdParty packs suite: compilation from original source tarballs

This commit is contained in:
Martin Beaudoin 2010-11-24 00:49:05 -05:00
parent d708959777
commit 63a1e2fac3
51 changed files with 4434 additions and 50 deletions

View file

@ -13,7 +13,8 @@ fi
( cd wmake/src && make )
# build ThirdParty sources
( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
#( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
( cd $WM_THIRD_PARTY_DIR && ./AllMake )
# build OpenFOAM libraries and applications
src/Allwmake

4
README
View file

@ -92,6 +92,10 @@
The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts
of the OpenFOAM installation.
* Building the ThirdParty packages from Sources
A new way of compiling and installing the ThirdParty suite of packages is proposed with OpenFOAM-1.6-ext.
Please consult the file ThirdParty/README.ThirdParty a for more information.
* Building from Sources (Optional)
If you cannot find an appropriate binary pack for your platform, you can
build the complete OpenFOAM from the source-pack. You will first need to

81
ThirdParty/AllMake vendored Executable file
View file

@ -0,0 +1,81 @@
#!/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
#
# Description
# Build script for ThirdParty packages.
# You can pass along a list of package RPMs to this script in order
# to populate the local RPM vault before proceeding to the various
# packages installation
#
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# 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
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty Allwmake
echo ========================================
echo
# Running stage 0 (only if RPM filenames are supplied on the command line)
[ "$#" -gt 0 ] && {
./AllMake.stage0 "$@"
shift "$#"
}
# Running stage 1
./AllMake.stage1
# Running stage 2
./AllMake.stage2
# Running stage 3
./AllMake.stage3
# Running stage 4
./AllMake.stage4
echo ========================================
echo Done ThirdParty Allwmake
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

73
ThirdParty/AllMake.stage0 vendored Executable file
View file

@ -0,0 +1,73 @@
#!/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.stage0
#
# Description
# Build script for ThirdParty packages: Stage0
#
# Populate the local RPM vault
#
# NOTE: This stage is optional. Use it only if you want to move some RPMs
# to the appropriate location for your architcture so the other stage scripts
# will be able to pick them up
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# 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
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty AllMake: Stage0
echo ========================================
echo
(
[ "$#" -gt 0 ] && {
rpm_populateRPMvault "$@"
}
)
echo ========================================
echo Done ThirdParty AllMake: Stage0
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

84
ThirdParty/AllMake.stage1 vendored Executable file
View file

@ -0,0 +1,84 @@
#!/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.stage1
#
# Description
# Build script for ThirdParty packages: Stage1
#
# Compilers and basic tools.
#
# Once this stage is built, you would normally re-initialize your
# OpenFOAM environment in order to use the new compilers and tools
#
# NOTE: This stage is optional. Use it only if you want to override
# your system pre-installed compilers and tools
#
# Requirements:
# 1: Your OpenFOAM environment must be properly initialized
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# 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
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty AllMake: Stage1
echo ========================================
echo
# Gcc and companion libraries
#( rpm_make gmp-5.0.1 ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
#( rpm_make mpfr-3.0.0 http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz )
#( rpm_make gcc-4.4.5 ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz )
#
#( rpm_make mpc-0.8.2 http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz )
#( rpm_make gcc-4.5.1 ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz )
# Python
#( rpm_make Python-2.7 http://www.python.org/ftp/python/2.7/Python-2.7.tgz )
# cmake
( rpm_make cmake-2.8.3 http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz )
echo ========================================
echo Done ThirdParty AllMake: Stage1
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

77
ThirdParty/AllMake.stage2 vendored Executable file
View file

@ -0,0 +1,77 @@
#!/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.stage2
#
# Description
# Build script for ThirdParty packages: Stage2
#
# Communication libraries
#
# Once this stage is built, you would normally re-initialize your
# OpenFOAM environment in order redirect OpenFOAM toward the appropriate
# communication library
#
# NOTE: This stage is optional. Use it only if you want to override
# your system communication libraries
#
# Requirements:
# 1: Your OpenFOAM environment must be properly initialized
# 2: AllMake.stage1 if you are overriding your system compiler
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# 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
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty AllMake: Stage2
echo ========================================
echo
# MPI
#( rpm_make openmpi-1.4.1 http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz )
( rpm_make openmpi-1.4.3 http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.gz )
#( rpm_make openmpi-1.5 http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.tar.gz )
echo ========================================
echo Done ThirdParty AllMake: Stage2
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

99
ThirdParty/AllMake.stage3 vendored Executable file
View file

@ -0,0 +1,99 @@
#!/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.stage3
#
# Description
# Build script for ThirdParty packages: Stage3
#
# The ThirdParty libraries
#
# Requirements:
# 1: Your OpenFOAM environment must be properly initialized
# 2: AllMake.stage1 if you are overriding your system compiler
# 3: AllMake.stage2 if you are overriding your system comm. libraries
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# 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
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty AllMake: Stage3
echo ========================================
echo
# Metis
( rpm_make metis-5.0pre2 http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz )
# ParMGridGen
( rpm_make ParMGridGen-1.0 http://www.mgnet.org/mgnet/Codes/parmgridgen/ParMGridGen-1.0.tar.gz )
# Libccmio
#( rpm_make libccmio-2.6.1 )
# Mesquite
( rpm_make mesquite-2.1.2 http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz )
# Scotch
if [ -d "$OPENMPI_DIR" ]; then
( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
else
echo "WARNING: The OPENMPI_DIR environment variable is not set."
echo "WARNING: Please make sure your environment is properly set up for openmpi. This is necessary for compiling scotch-5.1.10b"
echo "WARNING: Skipping the compilation of scotch-5.1.10b"
echo ""
fi
# ParMetis
if [ -d "$OPENMPI_DIR" ]; then
( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
else
echo "WARNING: The OPENMPI_DIR environment variable is not set."
echo "WARNING: Please make sure your environment is properly set up for openmpi. This is necessary for compiling ParMetis-3.1.1"
echo "WARNING: Skipping the compilation of ParMetis-3.1.1"
echo ""
fi
echo ========================================
echo Done ThirdParty AllMake: Stage3
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

82
ThirdParty/AllMake.stage4 vendored Executable file
View file

@ -0,0 +1,82 @@
#!/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.stage4
#
# Description
# Build script for ThirdParty packages: Stage3
#
# The OpenFOAM viewers
#
# Requirements:
# 1: Your OpenFOAM environment must be properly initialized
# 2: AllMake.stage1 if you are overriding your system compiler
# 3: AllMake.stage2 if you are overriding your system comm. libraries
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# 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
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty AllMake: Stage4
echo ========================================
echo
# qt-everywhere-opensource-src-4.7.0
( rpm_make qt-everywhere-opensource-src-4.7.0 http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz )
# paraview
if [ -d "$QT_DIR" -a -r "$QT_DIR"/bin/qmake ]
then
( rpm_make ParaView-3.8.1 http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \
-D '_qmakePath $QT_DIR/bin/qmake'
)
else
echo "WARNING: Skipping the installation of ParaView-3.8.1."
echo "WARNING: Please initialize the QT_DIR environment variable to your QT installation directory."
echo "WARNING: The command $QT_DIR/bin/qmake needs to be valid"
echo "WARNING: "
fi
echo ========================================
echo Done ThirdParty AllMake: Stage4
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

103
ThirdParty/README.ThirdParty vendored Normal file
View file

@ -0,0 +1,103 @@
A new design for the ThirdParty packages:
=========================================
The main purpose of this new development is to build a complete ThirParty packages set for OpenFOAM 1.6-ext using only the original package source
tarball and some patch files ( when necessary).
A useful by-product of this development is also to provide some kind of binary packaging of the ThirdParty packages.
The RPM suite of tools was selected to develop a first prototype.
The whole process needs to run and install in user-space, without the need to be root for installing the packages.
Here is what's available:
a: A set of rpm spec files for specific ThirdParty packages.
b: A suite of bash scripts to automate the complete sequence of downloading, compiling, installing and generating RPMs.
c: An empty directory structure pre-configured and ready to proceed with the download, compilation and installation of
chosen ThirdParty packages for OF-1.6-ext.
Quick description of the main scripts:
--------------------------------------
a: AllMake:
Main wrapper script that will call AllMake.stage0 to AllMake.stage4 scripts in sequence.
b: AllMake.stage0:
This script is useful only for populating what I am calling the local "RPM vault" with pre-generated RPMs.
This is the script written to address the use-case: "I have some pre-generated RPM files, now what"
Basically, you call this script with a list of RPMs generated by the AllMake.stage(1-4) in order to populate the local RPMS vault.
Once in place, these are the RPMs will be installed instead of proceeding with the standard compilation process.
c: AllMake.stage1:
This script is taking care of the basic ThirdParty tools like compilers, cmake , python, etc.
If we ever need to override the local version of flex or bison, this is where we will add those additional packages.
This stage will also generate a .sh and .csh file one needs to source in order to initialize the PATH and LD_LIBRARY_PATH env. variable.
If you need to compile the rest of the ThirdParty packages with a new gcc compiler, you will need to source those .sh or .csh file in before activating the other
AllMake.stage(2-4) scripts.
d: AllMake.stage2:
This script is taking care of the MPI communication libraries. Right now, only OpenMPI is supported.
This stage will also generate a .sh and .csh file one needs to source in order to initialize the PATH and LD_LIBRARY_PATH env. variable.
You will need to source those .sh or .csh file in before activating the other AllMake.stage(3-4) scripts because some packages depends on the communication library.
e: AllMake.stage3:
This script is taking care of the "standard" ThirdParty libraries like metis, scotch, mesquite, etc.
This stage will also generate a .sh and .csh file one needs to source in order to initialize the PATH and LD_LIBRARY_PATH env. variable.
You will need to source those .sh or .csh file in before compiling OpenFOAM because some "Make/options" files will refer to environment variable that are
specific to those packages
f: AllMake.stage4:
This script is taking care of Paraview and QT (and takes an awfull long time to compile, honest...).
This stage will also generate a .sh and .csh file one needs to source in order to initialize the PATH and LD_LIBRARY_PATH env. variable.
You will need to source those .sh or .csh file in before compiling OpenFOAM because some "Make/options" files will refer to environment variable that are specific to those packages
g: tools/makeThirdPartyFunctionsForRPM:
A suite of bash functions useful for wrapping the rpmbuild and rpm commands
For every packages, this is the basic process we will be going through when starting building the ThirdParty packages from scratch::
a: Verify in the local "RPM vault" if a RPM is available for a given package
b: If it is, simply install this RPM and move on to the next package
c: if the RPM is absent:
i: verify if the source tarbal is available from the SOURCES "vault"
ii: if it is not, download the tarball using the specified URL.
iii: proceed with the extraction, patching, configuration, compilation, RPM generation and installation of the package. The generated RPM is always used for installation.
d: The default installation root directory is "$WM_THIRD_PARTY_DIR". This can be overriden though when installing the RPM.
Relocating the RPM root installation directory:
a: All the generated RPMs can be relocated, meaning that you can override the hard-coded root installation directory when using those RPMs for installation.
b: You can check that the RPM is relocatable by using the command rpm -qip thePackage.rpm. For example, from the cmake-2.8.3 package generated on one of my machine:
> rpm -qip cmake-2.8.3-darwinIntelGccDPOpt.i386.rpm| grep Relocations
Name : cmake Relocations: /Users/beaudoin/Projets/SAMH/OpenFOAM/ThirdParty-1.6-ext-RPM-based
The Relocations path is the actual location pointed by the $WM_THIRD_PARTY_DIR on my laptop when I generated the RPM.
It is the indication that the RPM is relocatable
This path will turn to be hardcoded in the RPM because the environment variable was expanded before generating the RPM..
This is the default root directory where the RPM will install its "payload"
This can be overridden using the 'rpm' command-line parameter --relocate OLDPATH=NEWPATH .
For example, let's say you want to install the RPM under the root directory /tmp/someDir instead, you will call the 'rpm' command like this:
rpm -ivh ./cmake-2.8.3-darwinIntelGccDPOpt.i386.rpm --relocate /Users/beaudoin/Projets/SAMH/OpenFOAM/ThirdParty-1.6-ext-RPM-based=/tmp/someDir
Even better, you can dig down the hard-coded path even deeper in order to relocate the whole installation directory, down to the last hard-coded subdirectory.
Just specify the whole path when using the --relocate parameter
So basically, you can install the RPM right under /usr if you want, hence bypassing the default sequence of package subdirectories I have chosen in order to stay
close to the "traditional" ThirdParty layout.
9: Things to do:
a: Testing testing testing. This prototype was tested on the following platforms:
Mac OS X 10.6 (Snow Leopard) (non RPM based)
Ubuntu 10.04 32bit (non RPM based)
Centos 5.5 64bit (RPM based)
OpenSUSE 11.3 64bit (RPM based)
b: Maybe adding some RPM dependencies might be useful. I have not explored this yet.
To be continued...
Martin Beaudoin
Novembre 2010

View file

View file

View file

View file

@ -0,0 +1,98 @@
diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
--- ParMGridGen-1.0_orig/Makefile.in 2001-12-04 19:30:33.000000000 -0500
+++ ParMGridGen-1.0/Makefile.in 2010-10-31 16:18:41.000000000 -0400
@@ -12,7 +12,7 @@
OPTFLAGS = -O3
# What options to be used by the compiler
-COPTIONS =
+COPTIONS = -fPIC
# Which loader to use
LD = cc
@@ -33,22 +33,25 @@
# In which directories to look for any additional libraries
LIBDIR = -L../.. \
+ -L../Lib \
-L/usr/lib32/
# Set some flags
DEBUGFLAGS =
# What additional libraries to link the programs with (eg., -lmpi)
-LIBS = -lmgrid -lm
-PARLIBS = -lparmgrid -lmgrid -lmpi -lm
+LIBEXT = so
+
+LIBS = -lMGridGen -lm
+PARLIBS = -lparmgrid -lMGridGen -lmpi -lm
# What archiving to use
-AR = ar rv
+AR = gcc -shared -o
# What to use for indexing the archive
#RANLIB = ranlib
-RANLIB = ar -ts
+RANLIB = true
#--------------------------------------------------------------------------
#
diff -ruN ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile ParMGridGen-1.0/MGridGen/IMlib/Makefile
--- ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile 2001-12-04 17:46:56.000000000 -0500
+++ ParMGridGen-1.0/MGridGen/IMlib/Makefile 2010-10-31 16:16:54.000000000 -0400
@@ -33,7 +33,7 @@
.c.o:
$(CC) $(CFLAGS) -c $*.c
-./libIMlib.a: $(OBJS)
+libIMlib.$(LIBEXT): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
@@ -41,4 +41,4 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ./libIMlib.a
+ rm -f *.o ; rm -f ./libIMlib.$(LIBEXT)
diff -ruN ParMGridGen-1.0_orig/MGridGen/Lib/Makefile ParMGridGen-1.0/MGridGen/Lib/Makefile
--- ParMGridGen-1.0_orig/MGridGen/Lib/Makefile 2001-12-04 18:01:00.000000000 -0500
+++ ParMGridGen-1.0/MGridGen/Lib/Makefile 2010-10-31 16:16:54.000000000 -0400
@@ -22,7 +22,7 @@
INCLUDES = -I./ -I$(IMLIBDIR) $(INCDIR)
CFLAGS = $(COPTIONS) $(OPTFLAGS) $(DEBUGFLAGS) $(INCLUDES)
-OBJS = coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o
+OBJS = aratio.o coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o
IOBJS = blas.o dfkeysort.o dkeysort.o file.o ifkeysort.o ifloatsort.o \
iintsort.o ikeysort.o memory.o sort.o util.o
IMOBJS = $(addprefix ../IMlib/, $(IOBJS))
@@ -31,7 +31,7 @@
.c.o:
$(CC) $(CFLAGS) -c $*.c
-../../libmgrid.a: $(OBJS) $(IMOBJS)
+libMGridGen.$(LIBEXT): $(OBJS) $(IMOBJS)
$(AR) $@ $(OBJS) $(IMOBJS)
$(RANLIB) $@
@@ -39,4 +39,4 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ../../libmgrid.a
+ rm -f *.o ; rm -f ./libMGridGen.$(LIBEXT)
diff -ruN ParMGridGen-1.0_orig/MGridGen/Programs/Makefile ParMGridGen-1.0/MGridGen/Programs/Makefile
--- ParMGridGen-1.0_orig/MGridGen/Programs/Makefile 2001-12-04 18:02:26.000000000 -0500
+++ ParMGridGen-1.0/MGridGen/Programs/Makefile 2010-10-31 16:16:54.000000000 -0400
@@ -1,6 +1,6 @@
include ../../Makefile.in
-MGRIDLIB = ../../libmgrid.a
+MGRIDLIB = ../Lib/libMGridGen.$(LIBEXT)
ifeq ($(ddmalloc),yes)
DEBUGFLAGS := $(DEBUGFLAGS) -DDMALLOC -DDEBUG

View file

@ -0,0 +1,101 @@
diff -ruN ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile ParMGridGen-1.0/MGridGen/IMlib/Makefile
--- ParMGridGen-1.0_orig/MGridGen/IMlib/Makefile 2001-12-04 17:46:56.000000000 -0500
+++ ParMGridGen-1.0/MGridGen/IMlib/Makefile 2010-10-31 17:29:25.000000000 -0400
@@ -33,7 +33,7 @@
.c.o:
$(CC) $(CFLAGS) -c $*.c
-./libIMlib.a: $(OBJS)
+libIMlib.$(LIBEXT): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
@@ -41,4 +41,4 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ./libIMlib.a
+ rm -f *.o ; rm -f ./libIMlib.$(LIBEXT)
Binary files ParMGridGen-1.0_orig/MGridGen/IMlib/libIMlib.dylib and ParMGridGen-1.0/MGridGen/IMlib/libIMlib.dylib differ
diff -ruN ParMGridGen-1.0_orig/MGridGen/Lib/Makefile ParMGridGen-1.0/MGridGen/Lib/Makefile
--- ParMGridGen-1.0_orig/MGridGen/Lib/Makefile 2001-12-04 18:01:00.000000000 -0500
+++ ParMGridGen-1.0/MGridGen/Lib/Makefile 2010-10-31 17:29:25.000000000 -0400
@@ -22,7 +22,7 @@
INCLUDES = -I./ -I$(IMLIBDIR) $(INCDIR)
CFLAGS = $(COPTIONS) $(OPTFLAGS) $(DEBUGFLAGS) $(INCLUDES)
-OBJS = coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o
+OBJS = aratio.o coarsen.o kwayfm.o match.o merge.o mgridgen.o refine.o setup.o
IOBJS = blas.o dfkeysort.o dkeysort.o file.o ifkeysort.o ifloatsort.o \
iintsort.o ikeysort.o memory.o sort.o util.o
IMOBJS = $(addprefix ../IMlib/, $(IOBJS))
@@ -31,7 +31,7 @@
.c.o:
$(CC) $(CFLAGS) -c $*.c
-../../libmgrid.a: $(OBJS) $(IMOBJS)
+libMGridGen.$(LIBEXT): $(OBJS) $(IMOBJS)
$(AR) $@ $(OBJS) $(IMOBJS)
$(RANLIB) $@
@@ -39,4 +39,4 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ../../libmgrid.a
+ rm -f *.o ; rm -f ./libMGridGen.$(LIBEXT)
Binary files ParMGridGen-1.0_orig/MGridGen/Lib/libMGridGen.dylib and ParMGridGen-1.0/MGridGen/Lib/libMGridGen.dylib differ
diff -ruN ParMGridGen-1.0_orig/MGridGen/Programs/Makefile ParMGridGen-1.0/MGridGen/Programs/Makefile
--- ParMGridGen-1.0_orig/MGridGen/Programs/Makefile 2001-12-04 18:02:26.000000000 -0500
+++ ParMGridGen-1.0/MGridGen/Programs/Makefile 2010-10-31 17:29:25.000000000 -0400
@@ -1,6 +1,6 @@
include ../../Makefile.in
-MGRIDLIB = ../../libmgrid.a
+MGRIDLIB = ../Lib/libMGridGen.$(LIBEXT)
ifeq ($(ddmalloc),yes)
DEBUGFLAGS := $(DEBUGFLAGS) -DDMALLOC -DDEBUG
diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
--- ParMGridGen-1.0_orig/Makefile.in 2001-12-04 19:30:33.000000000 -0500
+++ ParMGridGen-1.0/Makefile.in 2010-10-31 17:30:58.000000000 -0400
@@ -12,7 +12,7 @@
OPTFLAGS = -O3
# What options to be used by the compiler
-COPTIONS =
+COPTIONS = -fPIC
# Which loader to use
LD = cc
@@ -33,22 +33,25 @@
# In which directories to look for any additional libraries
LIBDIR = -L../.. \
+ -L../Lib \
-L/usr/lib32/
# Set some flags
DEBUGFLAGS =
# What additional libraries to link the programs with (eg., -lmpi)
-LIBS = -lmgrid -lm
-PARLIBS = -lparmgrid -lmgrid -lmpi -lm
+LIBEXT = dylib
+
+LIBS = -lMGridGen -lm
+PARLIBS = -lparmgrid -lMGridGen -lmpi -lm
# What archiving to use
-AR = ar rv
+AR = gcc -dynamiclib -undefined dynamic_lookup -shared -o
# What to use for indexing the archive
#RANLIB = ranlib
-RANLIB = ar -ts
+RANLIB = true
#--------------------------------------------------------------------------
#
Binary files ParMGridGen-1.0_orig/mgridgen and ParMGridGen-1.0/mgridgen differ

View file

@ -0,0 +1,97 @@
diff -ruN ParMetis-3.1.1-orig/METISLib/Makefile ParMetis-3.1.1/METISLib/Makefile
--- ParMetis-3.1.1-orig/METISLib/Makefile 2007-03-19 13:46:34.000000000 -0400
+++ ParMetis-3.1.1/METISLib/Makefile 2010-10-29 12:21:47.000000000 -0400
@@ -19,7 +19,7 @@
.c.o:
$(CC) $(CFLAGS) -c $*.c
-../libmetis.a: $(OBJS)
+libmetis-parmetis.$(LIB_EXT): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
@@ -27,7 +27,7 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ../libmetis.a
+ rm -f *.o ; rm -f libmetis-parmetis.$(LIB_EXT)
checkin:
diff -ruN ParMetis-3.1.1-orig/Makefile.in ParMetis-3.1.1/Makefile.in
--- ParMetis-3.1.1-orig/Makefile.in 2008-11-17 18:47:06.000000000 -0500
+++ ParMetis-3.1.1/Makefile.in 2010-10-29 12:06:46.000000000 -0400
@@ -4,7 +4,7 @@
# What optimization level to use
-OPTFLAGS = -O3
+OPTFLAGS = -O3 -fPIC
# Include directories for the compiler
INCDIR =
@@ -22,11 +22,14 @@
#XTRALIBS = -lefence
#XTRALIBS = -ldmalloc
+# Dynamic lib extension
+LIB_EXT = so
+
# What archiving to use
-AR = ar rv
+AR = gcc -shared -o
# What to use for indexing the archive
#RANLIB = ranlib
-RANLIB = ar -ts
+RANLIB = true
VERNUM =
diff -ruN ParMetis-3.1.1-orig/ParMETISLib/Makefile ParMetis-3.1.1/ParMETISLib/Makefile
--- ParMetis-3.1.1-orig/ParMETISLib/Makefile 2008-11-17 17:43:23.000000000 -0500
+++ ParMetis-3.1.1/ParMETISLib/Makefile 2010-10-29 12:07:44.000000000 -0400
@@ -22,7 +22,7 @@
$(CC) $(CFLAGS) -c $*.c
-../libparmetis.a: $(OBJS)
+libparmetis.$(LIB_EXT): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
@@ -30,7 +30,7 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ../libparmetis.a
+ rm -f *.o ; rm -f ./libparmetis.$(LIB_EXT)
checkin:
diff -ruN ParMetis-3.1.1-orig/Programs/Makefile ParMetis-3.1.1/Programs/Makefile
--- ParMetis-3.1.1-orig/Programs/Makefile 2008-11-17 18:47:06.000000000 -0500
+++ ParMetis-3.1.1/Programs/Makefile 2010-10-29 12:27:24.000000000 -0400
@@ -6,9 +6,9 @@
CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES)
-LIBSDIR = -L.. $(LIBDIR)
-LIBS = -lparmetis -lmetis $(XTRALIBS) -lm
-PARMETISLIB = ../libparmetis.a ../libmetis.a
+LIBSDIR = -L../METISLib -L../ParMETISLib $(LIBDIR)
+LIBS = -lparmetis -lmetis-parmetis $(XTRALIBS) -lm
+PARMETISLIB = ../ParMETISLib/libparmetis.$(LIB_EXT) ../METISLib/libmetis-parmetis.$(LIB_EXT)
PTESTOBJS = ptest.o io.o adaptgraph.o
@@ -16,7 +16,6 @@
PARMETISOBJS = parmetis.o io.o adaptgraph.o
POMETISOBJS = pometis.o io.o
-
.c.o:
$(CC) $(CFLAGS) -c $*.c

View file

@ -0,0 +1,97 @@
diff -ruN ParMetis-3.1.1_orig/METISLib/Makefile ParMetis-3.1.1/METISLib/Makefile
--- ParMetis-3.1.1_orig/METISLib/Makefile 2007-03-19 13:46:34.000000000 -0400
+++ ParMetis-3.1.1/METISLib/Makefile 2010-10-31 17:13:46.000000000 -0400
@@ -19,7 +19,7 @@
.c.o:
$(CC) $(CFLAGS) -c $*.c
-../libmetis.a: $(OBJS)
+libmetis-parmetis.$(LIB_EXT): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
@@ -27,7 +27,7 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ../libmetis.a
+ rm -f *.o ; rm -f libmetis-parmetis.$(LIB_EXT)
checkin:
Binary files ParMetis-3.1.1_orig/METISLib/libmetis-parmetis.dylib and ParMetis-3.1.1/METISLib/libmetis-parmetis.dylib differ
diff -ruN ParMetis-3.1.1_orig/Makefile.in ParMetis-3.1.1/Makefile.in
--- ParMetis-3.1.1_orig/Makefile.in 2008-11-17 18:47:06.000000000 -0500
+++ ParMetis-3.1.1/Makefile.in 2010-10-31 17:20:54.000000000 -0400
@@ -10,7 +10,7 @@
INCDIR =
# What options to be used by the compiler
-COPTIONS = -DNDEBUG
+COPTIONS = -DNDEBUG -fPIC
# Which loader to use
LD = $(CC)
@@ -22,11 +22,14 @@
#XTRALIBS = -lefence
#XTRALIBS = -ldmalloc
+# Dynamic lib extension
+LIB_EXT = dylib
+
# What archiving to use
-AR = ar rv
+AR = gcc -dynamiclib -undefined dynamic_lookup -shared -o
# What to use for indexing the archive
#RANLIB = ranlib
-RANLIB = ar -ts
+RANLIB = true
VERNUM =
diff -ruN ParMetis-3.1.1_orig/ParMETISLib/Makefile ParMetis-3.1.1/ParMETISLib/Makefile
--- ParMetis-3.1.1_orig/ParMETISLib/Makefile 2008-11-17 17:43:23.000000000 -0500
+++ ParMetis-3.1.1/ParMETISLib/Makefile 2010-10-31 17:13:46.000000000 -0400
@@ -22,7 +22,7 @@
$(CC) $(CFLAGS) -c $*.c
-../libparmetis.a: $(OBJS)
+libparmetis.$(LIB_EXT): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
@@ -30,7 +30,7 @@
rm -f *.o
realclean:
- rm -f *.o ; rm -f ../libparmetis.a
+ rm -f *.o ; rm -f ./libparmetis.$(LIB_EXT)
checkin:
Binary files ParMetis-3.1.1_orig/ParMETISLib/libparmetis.dylib and ParMetis-3.1.1/ParMETISLib/libparmetis.dylib differ
diff -ruN ParMetis-3.1.1_orig/Programs/Makefile ParMetis-3.1.1/Programs/Makefile
--- ParMetis-3.1.1_orig/Programs/Makefile 2008-11-17 18:47:06.000000000 -0500
+++ ParMetis-3.1.1/Programs/Makefile 2010-10-31 17:13:46.000000000 -0400
@@ -6,9 +6,9 @@
CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES)
-LIBSDIR = -L.. $(LIBDIR)
-LIBS = -lparmetis -lmetis $(XTRALIBS) -lm
-PARMETISLIB = ../libparmetis.a ../libmetis.a
+LIBSDIR = -L../METISLib -L../ParMETISLib $(LIBDIR)
+LIBS = -lparmetis -lmetis-parmetis $(XTRALIBS) -lm
+PARMETISLIB = ../ParMETISLib/libparmetis.$(LIB_EXT) ../METISLib/libmetis-parmetis.$(LIB_EXT)
PTESTOBJS = ptest.o io.o adaptgraph.o
@@ -16,7 +16,6 @@
PARMETISOBJS = parmetis.o io.o adaptgraph.o
POMETISOBJS = pometis.o io.o
-
.c.o:
$(CC) $(CFLAGS) -c $*.c

View file

@ -0,0 +1,12 @@
diff -ruN ParaView-3.8.1_orig/Applications/ParaView-3.8.1_extra_install_Darwin.cmake ParaView-3.8.1/Applications/ParaView-3.8.1_extra_install_Darwin.cmake
--- ParaView-3.8.1_orig/Applications/ParaView-3.8.1_extra_install_Darwin.cmake 1969-12-31 19:00:00.000000000 -0500
+++ ParaView-3.8.1/Applications/ParaView-3.8.1_extra_install_Darwin.cmake 2010-11-06 19:34:12.000000000 -0400
@@ -0,0 +1,8 @@
+#
+# Additional install rules for Mac OS X platforms
+#
+INSTALL (DIRECTORY ../../buildObj/bin/paraview.app
+ DESTINATION ${PV_INSTALL_BIN_DIR}
+ USE_SOURCE_PERMISSIONS
+ COMPONENT Runtime)
+

View file

@ -0,0 +1,90 @@
diff -uNr metis-5.0pre2/GKlib/trunk/Makefile metis-5.0pre2_patch/GKlib/trunk/Makefile
--- metis-5.0pre2/GKlib/trunk/Makefile 2007-03-27 17:34:29.000000000 -0400
+++ metis-5.0pre2_patch/GKlib/trunk/Makefile 2010-10-26 01:02:24.000000000 -0400
@@ -55,6 +55,23 @@
LIBEXT = .lib
EXEEXT = .exe
else
+
+ #-------------------------------------------------------------------
+ # These defs are common among the GNU/GCC based systems
+ #-------------------------------------------------------------------
+ #Library creation information
+ AR = ar crv $@
+ RANLIB = ar -ts $@
+
+ #Compile input/output file specification
+ SOURCEFILE = -c $<
+ OUTPUTFILE = -o $@
+
+ # Standard file extensions
+ OBJEXT = .o
+ LIBEXT = .a
+ EXEEXT =
+
ifeq ($(systype),Linux)
ifeq ($(x86compiler),gcc)
#Compiler information
@@ -86,7 +103,7 @@
ifeq ($(systype),Darwin)
#Compiler information
CC = gcc
- OPTFLAGS = -O6
+ OPTFLAGS = -O3 -shared
COPTIONS = -DDARWIN -D_FILE_OFFSET_BITS=64 -Wall -std=c99 -pedantic
#Linker information
@@ -95,7 +112,11 @@
#Linker information
LDOPTIONS =
- LD = gcc
+ #LD = gcc
+ AR = gcc -shared -dynamiclib -undefined dynamic_lookup -o $@
+ LD = $(CC) -dynamiclib -undefined dynamic_lookup
+ RANLIB =
+ LIBEXT = .dylib
endif
@@ -121,22 +142,6 @@
LD = gcc
endif
-
- #-------------------------------------------------------------------
- # These defs are common among the GNU/GCC based systems
- #-------------------------------------------------------------------
- #Library creation information
- AR = ar crv $@
- RANLIB = ar -ts $@
-
- #Compile input/output file specification
- SOURCEFILE = -c $<
- OUTPUTFILE = -o $@
-
- # Standard file extensions
- OBJEXT = .o
- LIBEXT = .a
- EXEEXT =
endif
diff -uNr metis-5.0pre2/Makefile.in metis-5.0pre2_patch/Makefile.in
--- metis-5.0pre2/Makefile.in 2007-04-08 00:01:04.000000000 -0400
+++ metis-5.0pre2_patch/Makefile.in 2010-10-26 01:01:50.000000000 -0400
@@ -105,8 +105,12 @@
ifeq ($(systype),Darwin)
#Compiler information
CC = gcc
- OPTFLAGS = -O6
- COPTIONS += -DDARWINPPC
+ OPTFLAGS = -O3 -shared
+ COPTIONS += -DDARWIN
+ AR = gcc -shared -dynamiclib -undefined dynamic_lookup -o $@
+ LD = $(CC) -dynamiclib -undefined dynamic_lookup
+ RANLIB =
+ LIBEXT = .dylib
endif
ifeq ($(systype),CYGWIN)

View file

@ -0,0 +1,47 @@
diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib
--- scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1969-12-31 19:00:00.000000000 -0500
+++ scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2010-10-31 15:44:58.000000000 -0400
@@ -0,0 +1,22 @@
+EXE =
+LIB = .dylib
+OBJ = .o
+
+MAKE = make
+AR = gcc
+ARFLAGS = -shared -dynamiclib -undefined dynamic_lookup -o
+
+CAT = cat
+CCS = gcc
+CCP = mpicc
+CCD = mpicc
+CFLAGS = -O3 -fPIC -DCOMMON_TIMING_OLD -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME
+LDFLAGS = -lz -lm
+LIBLDFLAGS = -dynamiclib -undefined dynamic_lookup
+CP = cp
+LEX = flex
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = ranlib
+YACC = bison -y
diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib
--- scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2010-08-07 03:02:42.000000000 -0400
+++ scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2010-10-31 15:50:53.000000000 -0400
@@ -4,13 +4,13 @@
MAKE = make
AR = gcc
-ARFLAGS = -shared -o
+ARFLAGS = $(LDFLAGS) -shared -o
CAT = cat
CCS = gcc
CCP = mpicc
-CCD = gcc
-CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -DSCOTCH_PTHREAD -Drestrict=__restrict
-CLIBFLAGS = -shared -fPIC
+CCD = gcc -I$(MPI_HOME)/include
+CFLAGS = -O3 -fPIC -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -DSCOTCH_PTHREAD -Drestrict=__restrict
+CLIBFLAGS = -shared
LDFLAGS = -lz -lm -lrt
CP = cp
LEX = flex -Pscotchyy -olex.yy.c

View file

@ -0,0 +1,173 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for ParMGridGen-1.0
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name ParMGridGen
%define release %{_WM_OPTIONS}
%define version 1.0
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: ParMGridGen
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.mgnet.org/mgnet/Codes/parmgridgen
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: ParMGridGen-1.0.patch_darwin
Patch1: ParMGridGen-1.0.patch
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%ifos darwin
%patch0 -p1
%else
%patch1 -p1
%endif
%build
# if [ "$WM_ARCH" == "darwinIntel" ]
# then
# ARFLAGS="-dynamiclib -undefined dynamic_lookup"
# LIBEXT="dylib"
# else
# ARFLAGS=""
# LIBEXT="so"
# fi
# make \
# AR="gcc $ARFLAGS -shared -o" \
# OPTFLAGS="-O3 -shared" \
# RANLIB="true"
# mv ./MGridGen/IMlib/libIMlib.a ./MGridGen/IMlib/libIMlib.$LIBEXT
# mv ./MGridGen/Lib/libMGridGen.a ./MGridGen/Lib/libMGridGen.$LIBEXT
make
%install
# Manual installation
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include/Lib
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include/IMlib
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp ./MGridGen/Lib/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include/Lib
cp ./MGridGen/IMlib/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include/IMlib
cp ./MGridGen/IMlib/libIMlib.* $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp ./MGridGen/Lib/libMGridGen.* $RPM_BUILD_ROOT/%{_installPrefix}/lib
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PARMGRIDGEN_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$PARMGRIDGEN_DIR/lib ] && _foamAddLib \$PARMGRIDGEN_DIR/lib
# Enable access to the package applications if present
[ -d \$PARMGRIDGEN_DIR/bin ] && _foamAddPath \$PARMGRIDGEN_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv PARMGRIDGEN_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$PARMGRIDGEN_DIR/lib ) then
_foamAddLib \$PARMGRIDGEN_DIR/lib
endif
if ( -e \$PARMGRIDGEN_DIR/bin ) then
_foamAddPath \$PARMGRIDGEN_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%Files
%defattr(-,root,root)
%{_installPrefix}/include
%{_installPrefix}/lib/*
%{_installPrefix}/etc/*

View file

@ -0,0 +1,175 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for ParMetis-3.1.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name ParMetis
%define release %{_WM_OPTIONS}
%define version 3.1.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: ParMetis
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: ParMetis-3.1.1.patch_darwin
Patch1: ParMetis-3.1.1.patch
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%ifos darwin
%patch0 -p1
%else
%patch1 -p1
%endif
%build
[ -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"
# Need to remove this later
# if [ "$WM_ARCH" == "darwinIntel" ]
# then
# ARFLAGS="-dynamiclib -undefined dynamic_lookup"
# LIBEXT="dylib"
# else
# ARFLAGS=""
# LIBEXT="so"
# fi
# make \
# AR="gcc $ARFLAGS -shared -o" \
# OPTFLAGS="-O3 -shared" \
# RANLIB="true"
make
%install
# Manual installation
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include/ParMETISLib
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp *.h $RPM_BUILD_ROOT/%{_installPrefix}/include
cp ParMETISLib/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include/ParMETISLib
cp METISLib/libmetis-parmetis.* $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp ParMETISLib/libparmetis.* $RPM_BUILD_ROOT/%{_installPrefix}/lib
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PARMETIS_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$PARMETIS_DIR/lib ] && _foamAddLib \$PARMETIS_DIR/lib
# Enable access to the package applications if present
[ -d \$PARMETIS_DIR/bin ] && _foamAddPath \$PARMETIS_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv PARMETIS_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$PARMETIS_DIR/lib ) then
_foamAddLib \$PARMETIS_DIR/lib
endif
if ( -e \$PARMETIS_DIR/bin ) then
_foamAddPath \$PARMETIS_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%Files
%defattr(-,root,root)
%{_installPrefix}/*

View file

@ -0,0 +1,245 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for ParaView-3.8.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name ParaView
%define release %{_WM_OPTIONS}
%define version 3.8.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: ParaView
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.paraview.org/files/v3.8/
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: ParaView-3.8.1.patch_darwin
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
#--------------------------------------------------------------------------
#
# Here, we define default compiling options for cmake
#
# One can override the option on the commande line : --define='MACRO EXPR'
#
%{!?_withVerbose: %define _withVerbose false}
%{!?_withMesa: %define _withMesa false}
%{!?_withMPI: %define _withMPI false}
%{!?_withPython: %define _withPython false}
%{!?_withQt: %define _withQt true}
%{!?_qmakePath: %define _qmakePath Undefined}
%{!?_mesaIncludePath: %define _mesaIncludePath Undefined}
%{!?_mesaLibPath: %define _mesaLibPath Undefined}
%{!?_pythonLibPath: %define _pythonLibPath Undefined}
#--------------------------------------------------------------------------
%description
%{summary}
%prep
%setup -q
%ifos darwin
%patch0 -p1
%endif
%build
#
# set CMake cache variables
#
addCMakeVariable()
{
while [ -n "$1" ]
do
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
shift
done
}
# 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"
set +x
echo ""
echo "Compilation options:"
echo " _withVerbose : %{_withVerbose}"
echo " _withMesa : %{_withMesa}"
echo " _withMPI : %{_withMPI}"
echo " _withPython : %{_withPython}"
echo " _withQt : %{_withQt}"
echo " _qmakePath : %{_qmakePath}"
echo " _mesaIncludePath : %{_mesaIncludePath}"
echo " _mesaLibPath : %{_mesaLibPath}"
echo " _pythonLibPath : %{_pythonLibPath}"
echo ""
set -x
# 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
# new alternative to "make HTMLDocumentation"
addCMakeVariable PARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON
%ifos darwin
# Additional installation rules for Mac OS X
addCMakeVariable PARAVIEW_EXTRA_INSTALL_RULES_FILE:FILEPATH=%{_topdir}/BUILD/%{name}-%{version}/Applications/ParaView-3.8.1_extra_install_Darwin.cmake
%endif
echo "CMAKE_VARIABLES: $CMAKE_VARIABLES"
mkdir -p ./buildObj
cd ./buildObj
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$RPM_BUILD_ROOT%{_installPrefix} \
$CMAKE_VARIABLES \
..
make
%install
cd buildObj
make install
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PARAVIEW_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export PARAVIEW_VERSION=%{version}
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
# specified directory to see if a given library is a paraview plugin.
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
# startup of paraview or even make paraview crash on startup.
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview_plugins
[ -d \$PARAVIEW_DIR/lib/paraview-3.8 ] && _foamAddLib \$PARAVIEW_DIR/lib/paraview-3.8
# Enable access to the package applications if present
[ -d \$PARAVIEW_DIR/bin ] && _foamAddPath \$PARAVIEW_DIR/bin
if [ "$WM_ARCH" == "darwinIntel" ]
then
# Additional binary path is running on Mac OS X
[ -d \$PARAVIEW_DIR/bin/paraview.app/Contents/MacOS ] && _foamAddPath \$PARAVIEW_DIR/bin/paraview.app/Contents/MacOS
fi
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv PARAVIEW_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
setenv PARAVIEW_VERSION %{version}
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
# specified directory to see if a given library is a paraview plugin.
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
# startup of paraview or even make paraview crash on startup.
setenv PV_PLUGIN_PATH \$FOAM_LIBBIN/paraview_plugins
if ( -e \$PARAVIEW_DIR/lib/paraview-3.8 ) then
_foamAddLib \$PARAVIEW_DIR/lib/paraview-3.8
endif
if ( -e \$PARAVIEW_DIR/bin ) then
_foamAddPath \$PARAVIEW_DIR/bin
endif
# Additional binary path is running on Mac OS X
if ( -e \$PARAVIEW_DIR/bin/paraview.app/Contents/MacOS ) then
_foamAddPath \$PARAVIEW_DIR/bin/paraview.app/Contents/MacOS
endif
DOT_CSH_EOF
%clean
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -0,0 +1,146 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for Python-2.7
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name Python
%define release %{_WM_OPTIONS}
%define version 2.7
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: Python
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.python.org/ftp/python/2.7
Source: %url/%{name}-%{version}.tgz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
./configure \
--prefix=%{_installPrefix}
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PYTHON_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$PYTHON_DIR/lib ] && _foamAddLib \$PYTHON_DIR/lib
# Enable access to the package applications if present
[ -d \$PYTHON_DIR/bin ] && _foamAddPath \$PYTHON_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv PYTHON_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$PYTHON_DIR/lib ) then
_foamAddLib \$PYTHON_DIR/lib
endif
if ( -e \$PYTHON_DIR/bin ) then
_foamAddPath \$PYTHON_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -0,0 +1,146 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for cmake-2.8.3
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name cmake
%define release %{_WM_OPTIONS}
%define version 2.8.3
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: cmake
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.cmake.org/files/v2.8/
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
./configure \
--prefix=$RPM_BUILD_ROOT/%{_installPrefix}
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export CMAKE_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$CMAKE_DIR/lib ] && _foamAddLib \$CMAKE_DIR/lib
# Enable access to the package applications if present
[ -d \$CMAKE_DIR/bin ] && _foamAddPath \$CMAKE_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv CMAKE_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$CMAKE_DIR/lib ) then
_foamAddLib \$CMAKE_DIR/lib
endif
if ( -e \$CMAKE_DIR/bin ) then
_foamAddPath \$CMAKE_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

165
ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec vendored Normal file
View file

@ -0,0 +1,165 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for gcc-4.4.5
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name gcc
%define release %{_WM_OPTIONS}
%define version 4.4.5
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: gcc
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
GMP_VERSION=gmp-5.0.1
MPFR_VERSION=mpfr-3.0.0
mkdir ./objBuildDir
cd ./objBuildDir
../configure \
--prefix=%{_installPrefix} \
--enable-languages=c,c++ \
--enable-shared \
--disable-multilib \
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS \
--with-mpfr=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS
make
%install
cd ./objBuildDir
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export GCC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$GCC_DIR/lib ] && _foamAddLib \$GCC_DIR/lib
# Enable access to the package applications if present
[ -d \$GCC_DIR/bin ] && _foamAddPath \$GCC_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv GCC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$GCC_DIR/lib ) then
_foamAddLib \$GCC_DIR/lib
endif
if ( -e \$GCC_DIR/bin ) then
_foamAddPath \$GCC_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/bin
%{_installPrefix}/etc
%{_installPrefix}/include
%{_installPrefix}/info
%{_installPrefix}/lib
%{_installPrefix}/libexec
%{_installPrefix}/man
%{_installPrefix}/share

167
ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec vendored Normal file
View file

@ -0,0 +1,167 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for gcc-4.5.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name gcc
%define release %{_WM_OPTIONS}
%define version 4.5.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: gcc
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
GMP_VERSION=gmp-5.0.1
MPFR_VERSION=mpfr-3.0.0
MPC_VERSION=mpc-0.8.2
mkdir ./objBuildDir
cd ./objBuildDir
../configure \
--prefix=%{_installPrefix} \
--enable-languages=c,c++ \
--enable-shared \
--disable-multilib \
--with-mpc=$WM_THIRD_PARTY_DIR/packages/$MPC_VERSION/platforms/$WM_OPTIONS \
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS \
--with-mpfr=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS
make
%install
cd ./objBuildDir
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export GCC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$GCC_DIR/lib ] && _foamAddLib \$GCC_DIR/lib
# Enable access to the package applications if present
[ -d \$GCC_DIR/bin ] && _foamAddPath \$GCC_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv GCC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$GCC_DIR/lib ) then
_foamAddLib \$GCC_DIR/lib
endif
if ( -e \$GCC_DIR/bin ) then
_foamAddPath \$GCC_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/bin
%{_installPrefix}/etc
%{_installPrefix}/include
%{_installPrefix}/info
%{_installPrefix}/lib
%{_installPrefix}/libexec
%{_installPrefix}/man
%{_installPrefix}/share

147
ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec vendored Normal file
View file

@ -0,0 +1,147 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for gmp-5.0.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name gmp
%define release %{_WM_OPTIONS}
%define version 5.0.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: gmp
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gmp
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
./configure --prefix=%{_installPrefix}
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export GMP_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$GMP_DIR/lib ] && _foamAddLib \$GMP_DIR/lib
# Enable access to the package applications if present
[ -d \$GMP_DIR/bin ] && _foamAddPath \$GMP_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv GMP_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$GMP_DIR/lib ) then
_foamAddLib \$GMP_DIR/lib
endif
if ( -e \$GMP_DIR/bin ) then
_foamAddPath \$GMP_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/etc
%{_installPrefix}/include
%{_installPrefix}/lib
%{_installPrefix}/share

View file

@ -0,0 +1,156 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for mesquite-2.1.2
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name mesquite
%define release %{_WM_OPTIONS}
%define version 2.1.2
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: mesquite
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://software.sandia.gov/~jakraft
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
GMP_VERSION=gmp-5.0.1
./configure \
--prefix=%{_installPrefix} \
--enable-release \
--disable-debug-assertions \
--disable-igeom \
--disable-imesh \
--disable-irel \
--enable-shared \
--without-cppunit \
--enable-trap-fpe \
--disable-function-timers
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export MESQUITE_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$MESQUITE_DIR/lib ] && _foamAddLib \$MESQUITE_DIR/lib
# Enable access to the package applications if present
[ -d \$MESQUITE_DIR/bin ] && _foamAddPath \$MESQUITE_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv MESQUITE_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$MESQUITE_DIR/lib ) then
_foamAddLib \$MESQUITE_DIR/lib
endif
if ( -e \$MESQUITE_DIR/bin ) then
_foamAddPath \$MESQUITE_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -0,0 +1,162 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for metis-5.0pre2
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name metis
%define release %{_WM_OPTIONS}
%define version 5.0pre2
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: metis
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: metis-5.0pre2_patch_darwin
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%ifos darwin
%patch0 -p1
%endif
%build
[ -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"
%ifos darwin
# The parameter -D_POSIX_C_SOURCE=200809 has a side effect on Mac OS X
(cd GKlib/trunk && make OPTFLAGS="-O3 -fPIC")
(cd libmetis && make OPTFLAGS="-O3 -fPIC")
%else
(cd GKlib/trunk && make OPTFLAGS="-O3 -fPIC -D_POSIX_C_SOURCE=200809")
(cd libmetis && make OPTFLAGS="-O3 -fPIC -D_POSIX_C_SOURCE=200809")
%endif
%install
# Manual installation
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp GKlib/builds/*/libGKlib.* $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp build/*/libmetis.* $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp include/metis.h $RPM_BUILD_ROOT/%{_installPrefix}/include
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export METIS_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$METIS_DIR/lib ] && _foamAddLib \$METIS_DIR/lib
# Enable access to the package applications if present
[ -d \$METIS_DIR/bin ] && _foamAddPath \$METIS_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv METIS_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$METIS_DIR/lib ) then
_foamAddLib \$METIS_DIR/lib
endif
if ( -e \$METIS_DIR/bin ) then
_foamAddPath \$METIS_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%Files
%defattr(-,root,root)
%{_installPrefix}/*

154
ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec vendored Normal file
View file

@ -0,0 +1,154 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for mpc-0.8.2
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name mpc
%define release %{_WM_OPTIONS}
%define version 0.8.2
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: mpc
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.multiprecision.org/mpc/download/
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
GMP_VERSION=gmp-5.0.1
MPFR_VERSION=mpfr-3.0.0
./configure \
--prefix=%{_installPrefix} \
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS \
--with-mpfr=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export MPC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$MPC_DIR/lib ] && _foamAddLib \$MPC_DIR/lib
# Enable access to the package applications if present
[ -d \$MPC_DIR/bin ] && _foamAddPath \$MPC_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv MPC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$MPC_DIR/lib ) then
_foamAddLib \$MPC_DIR/lib
endif
if ( -e \$MPC_DIR/bin ) then
_foamAddPath \$MPC_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/etc
%{_installPrefix}/include
%{_installPrefix}/lib
%{_installPrefix}/share

View file

@ -0,0 +1,150 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for mpfr-3.0.0
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name mpfr
%define release %{_WM_OPTIONS}
%define version 3.0.0
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: mpfr
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.mpfr.org/mpfr-current
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
GMP_VERSION=gmp-5.0.1
./configure \
--prefix=%{_installPrefix} \
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export MPFR_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$MPFR_DIR/lib ] && _foamAddLib \$MPFR_DIR/lib
# Enable access to the package applications if present
[ -d \$MPFR_DIR/bin ] && _foamAddPath \$MPFR_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv MPFR_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$MPFR_DIR/lib ) then
_foamAddLib \$MPFR_DIR/lib
endif
if ( -e \$MPFR_DIR/bin ) then
_foamAddPath \$MPFR_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/etc
%{_installPrefix}/include
%{_installPrefix}/lib
%{_installPrefix}/share

View file

@ -0,0 +1,169 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for openmpi-1.4.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name openmpi
%define release %{_WM_OPTIONS}
%define version 1.4.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: openmpi
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.open-mpi.org/software/ompi/v1.4/downloads
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
unset mpiWith
# enable GridEngine if it appears to be in use
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
fi
# Infiniband support
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
# fi
./configure \
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
--disable-mpirun-prefix-by-default \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
--disable-mpi-f77 \
--disable-mpi-f90 \
--disable-mpi-cxx \
--disable-mpi-profile \
$mpiWith \
;
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$OPENMPI_DIR/lib ] && _foamAddLib \$OPENMPI_DIR/lib
# Enable access to the package applications if present
[ -d \$OPENMPI_DIR/bin ] && _foamAddPath \$OPENMPI_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv OPENMPI_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$OPENMPI_DIR/lib ) then
_foamAddLib \$OPENMPI_DIR/lib
endif
if ( -e \$OPENMPI_DIR/bin ) then
_foamAddPath \$OPENMPI_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/*

View file

@ -0,0 +1,169 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for openmpi-1.4.3
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name openmpi
%define release %{_WM_OPTIONS}
%define version 1.4.3
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: openmpi
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.open-mpi.org/software/ompi/v1.4/downloads
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
unset mpiWith
# enable GridEngine if it appears to be in use
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
fi
# Infiniband support
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
# fi
./configure \
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
--disable-mpirun-prefix-by-default \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
--disable-mpi-f77 \
--disable-mpi-f90 \
--disable-mpi-cxx \
--disable-mpi-profile \
$mpiWith \
;
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$OPENMPI_DIR/lib ] && _foamAddLib \$OPENMPI_DIR/lib
# Enable access to the package applications if present
[ -d \$OPENMPI_DIR/bin ] && _foamAddPath \$OPENMPI_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv OPENMPI_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$OPENMPI_DIR/lib ) then
_foamAddLib \$OPENMPI_DIR/lib
endif
if ( -e \$OPENMPI_DIR/bin ) then
_foamAddPath \$OPENMPI_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/*

View file

@ -0,0 +1,169 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for openmpi-1.5
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name openmpi
%define release %{_WM_OPTIONS}
%define version 1.5
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: openmpi
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.open-mpi.org/software/ompi/v1.5/downloads
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
unset mpiWith
# enable GridEngine if it appears to be in use
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
fi
# Infiniband support
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
# fi
./configure \
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
--disable-mpirun-prefix-by-default \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
--disable-mpi-f77 \
--disable-mpi-f90 \
--disable-mpi-cxx \
--disable-mpi-profile \
$mpiWith \
;
make
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$OPENMPI_DIR/lib ] && _foamAddLib \$OPENMPI_DIR/lib
# Enable access to the package applications if present
[ -d \$OPENMPI_DIR/bin ] && _foamAddPath \$OPENMPI_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv OPENMPI_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$OPENMPI_DIR/lib ) then
_foamAddLib \$OPENMPI_DIR/lib
endif
if ( -e \$OPENMPI_DIR/bin ) then
_foamAddPath \$OPENMPI_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/*

View file

@ -0,0 +1,161 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for qt-everywhere-opensource-src-4.7.0
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name qt-everywhere-opensource-src
%define release %{_WM_OPTIONS}
%define version 4.7.0
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
%define _unpackaged_files_terminate_build 0
%define _missing_doc_files_terminate_build 0
BuildRoot: %{buildroot}
Summary: qt-everywhere-opensource-src
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# 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"
./configure \
-opensource --confirm-license=yes \
--prefix=%{_installPrefix}
make
%install
# make install INSTALL_ROOT=$RPM_BUILD_ROOT%{_installPrefix}
make install INSTALL_ROOT=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export QT_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$QT_DIR/lib ] && _foamAddLib \$QT_DIR/lib
# Enable access to the package applications if present
[ -d \$QT_DIR/bin ] && _foamAddPath \$QT_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv QT_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$QT_DIR/lib ) then
_foamAddLib \$QT_DIR/lib
endif
if ( -e \$QT_DIR/bin ) then
_foamAddPath \$QT_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/bin
%{_installPrefix}/etc
%{_installPrefix}/lib
%{_installPrefix}/imports
%{_installPrefix}/include
%{_installPrefix}/mkspecs
%{_installPrefix}/plugins
%{_installPrefix}/phrasebooks
%{_installPrefix}/q3porting.xml
%{_installPrefix}/translations

View file

@ -0,0 +1,156 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 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
#
# Script
# RPM spec file for scotch-5.1.10b
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name scotch
%define release %{_WM_OPTIONS}
%define version 5.1.10b
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: scotch
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: https://gforge.inria.fr/frs/download.php/27583
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: scotch-5.1.10b_patch_0
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q -n %{name}_%{version}
%patch0 -p1
%build
# 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"
cd src
# Here, unfortunately, some hand tweaking might be necessary if your system is not running Linux or MacOS X
%ifos darwin
ln -s Make.inc/Makefile.inc.i686_mac_darwin10.shlib Makefile.inc
%else
ln -s Make.inc/Makefile.inc.i686_pc_linux2.shlib Makefile.inc
%endif
make scotch
make ptscotch
%install
cd src
mkdir -p $RPM_BUILD_ROOT%{_installPrefix}
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export SCOTCH_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$SCOTCH_DIR/lib ] && _foamAddLib \$SCOTCH_DIR/lib
# Enable access to the package applications if present
[ -d \$SCOTCH_DIR/bin ] && _foamAddPath \$SCOTCH_DIR/bin
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv SCOTCH_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$SCOTCH_DIR/lib ) then
_foamAddLib \$SCOTCH_DIR/lib
endif
if ( -e \$SCOTCH_DIR/bin ) then
_foamAddPath \$SCOTCH_DIR/bin
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/*

View file

View file

183
ThirdParty/tools/makeThirdPartyFunctionsForRPM vendored Executable file
View file

@ -0,0 +1,183 @@
#---------------------------------*- sh -*-------------------------------------
# ========= |
# \\ / 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/>.
#
# File
# makeThirdPartyFunctionsForRPM
#
# Description
# Functions for managing the third-party packages with RPM
#
#------------------------------------------------------------------------------
# define the build and the system architecture type
buildBase=$WM_THIRD_PARTY_DIR/rpmBuild
architecture=`rpm --eval "%{_target_cpu}"`
# Adjust the rpm command on Ubuntu system
rpm --force-debian >& /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && RPM_CMD="rpm --force-debian" #Success : Debian system
[ $RETVAL -ne 0 ] && RPM_CMD="rpm" #Failed : Non-Debian system
echo ""
echo "This system rpm command: $RPM_CMD"
echo ""
#
# Download/Build/Uninstall/Install a package
#
rpm_make()
{
package="$1"
rpmName=$package-$WM_OPTIONS.$architecture
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
# We check immediatly if the RPM binary package is available in the local RPMs vault.
# If so, we basically uninstall/reinstall the package. This is handy for installation
# on machines with no Internet access, so without downloading capabilities. If one wants to
# force the recompilation of a given package, just make sure to move the corresponding RPM
# binary package away from the local RPM vault.
#
if [ ! -e "$rpmFile" ]; then
#
# The package's RPM is absent. We build from the package source tarball
#
cd $buildBase
# Here, the logic is fairly simple:
# We assume that the 2nd command-line parameter is necessarily the URL for dowmloading the package.
# If more than 2 command-line parameters are supplied, we assume that these additional parameters
# are for the command rpmbuild.
# This is a bit fragile, improvements will come later if necessary.
#
[ "$#" -ge 2 ] && {
packageURL="$2"
packageTarBall=`basename $packageURL`
if [ ! -e "SOURCES/$packageTarBall" ]; then
echo "Download $packageTarBall from : $packageURL"
( cd SOURCES; wget --no-check-certificate $packageURL )
fi
}
[ "$#" -gt 2 ] && {
# We will pass the rest of the command-line arguments to rpmbuild
shift 2
}
echo "Making package $package using RPM."
rpm_build $package "$@"
fi
# Install RPM package if not done already
if [ ! -e "$WM_THIRD_PARTY_DIR/packages/$package/platforms/$WM_OPTIONS" ]; then
echo "Installing package: $package"
rpm_uninstall $package
rpm_install $package
else
echo "Package $package is already installed"
fi
echo "Done installing package $package"
echo ""
}
#
# Build a RPM file using the package SPEC file
#
rpm_build()
{
package="$1"
shift
specFile="$package.spec"
cd $buildBase
[ -e ./SPECS/$specFile ] || {
echo "rpm_build: missing SPEC file for package $package. Aborting."
return 1
}
#Build RPM package
echo "Building package $package"
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
}
#
# Uninstall a package using its RPM
#
rpm_uninstall()
{
package="$1"
rpmName=$package-$WM_OPTIONS.$architecture
cd $buildBase
echo " Uninstalling $package using RPM: $rpmName"
$RPM_CMD -e $rpmName --dbpath $buildBase/rpmDB --norepackage >& /dev/null
# Note: rpm will rant when uninstalling packages with an error message
# starting with "error: LOOP:"
# Googling about this problem shows that this error is benign, and
# is related to the list of the files included in the RPM, and the
# syntax used in the SPEC file. Need to revisit later... MB
}
#
# Install a package using its relocatable RPM
#
rpm_install()
{
package="$1";
rpmName=$package-$WM_OPTIONS.$architecture;
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm;
echo " Installing $package using RPM file: $rpmFile";
$RPM_CMD -ivh \
$rpmFile \
--dbpath $buildBase/rpmDB --force --nodeps;
}
#
# Populate the local RPM vault with comand-line supplied list of RPMs
#
rpm_populateRPMvault()
{
rpmVault=$buildBase/RPMS/$architecture
echo " Local RPM vault location: $rpmVault"
echo ""
echo " Moving the following RPMs to the local RPM vault: `echo $@`"
mkdir -p $rpmVault
mv $@ $rpmVault
echo ""
echo " Current content of the local RPM vault:"
ls -axlt $rpmVault
echo ""
}
# ----------------------------------------------------------------- end-of-file

View file

@ -2,9 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
if [ -d "$PARAVIEW_DIR" -a -r "$PARAVIEW_DIR" ]
then
case "$ParaView_VERSION" in
case "$PARAVIEW_VERSION" in
3*)
wmake libso vtkPV3Foam
(

View file

@ -9,6 +9,10 @@
cmake_minimum_required(VERSION 2.4)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
@ -52,5 +56,6 @@ TARGET_LINK_LIBRARIES(
OpenFOAM
finiteVolume
vtkPV3Foam
pqCore
)
#-----------------------------------------------------------------------------

View file

@ -2,13 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(ParaView_DIR)/VTK \
-I$(ParaView_DIR)/include/$(ParaView_MAJOR) \
-I$(ParaView_INST_DIR) \
-I$(ParaView_INST_DIR)/VTK \
-I$(ParaView_INST_DIR)/VTK/Common \
-I$(ParaView_INST_DIR)/VTK/Filtering \
-I$(ParaView_INST_DIR)/VTK/Rendering \
-I$(PARAVIEW_DIR)/include/paraview-3.8 \
-I../PV3FoamReader
LIB_LIBS = \

View file

@ -76,7 +76,8 @@ export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
#: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_DIR/ThirdParty}; export WM_THIRD_PARTY_DIR
# Source files, possibly with some verbosity
_foamSource()
@ -317,7 +318,7 @@ _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/paraview3/bashrc
_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc

View file

@ -70,7 +70,8 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
# 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
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_DIR/ThirdParty
# Source files, possibly with some verbosity
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; source \!*'
@ -189,10 +190,6 @@ case Linux:
setenv WM_LDFLAGS '-mabi=64 -G0'
setenv WM_MPLIB MPI
;;
case Darwin:
setenv WM_ARCH darwin
setenv WM_COMPILER
breaksw
case ppc64:
setenv WM_ARCH linuxPPC64
@ -209,6 +206,57 @@ case Linux:
endsw
breaksw
case Darwin:
switch (`uname -p`)
case powerpc:
setenv WM_ARCH darwinPpc
breaksw
case i386:
setenv WM_ARCH darwinIntel
breaksw
default:
echo "This seems to be an Intel-Mac please tell me the output of 'uname -p'. Bernhard."
setenv WM_ARCH darwinIntel
breaksw
endsw
switch ($WM_ARCH_OPTION)
case 32:
setenv WM_CFLAGS '-m32 -fPIC'
setenv WM_CXXFLAGS '-m32 -fPIC'
setenv WM_LDFLAGS '-m32'
breaksw;
case 64:
setenv WM_ARCH ${WM_ARCH}64
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC'
setenv WM_LDFLAGS '-m64'
breaksw;
default:
echo "Unknown WM_ARCH_OPTION $WM_ARCH_OPTION, should be 32 or 64"
breaksw
endsw
# Make sure that binaries use the best features of the used OS-Version
setenv MACOSX_DEPLOYMENT_TARGET `sw_vers -productVersion`
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2
switch ($WM_COMPILER)
case Gcc43:
setenv WM_CC 'gcc-mp-4.3'
setenv WM_CXX 'g++-mp-4.3'
breaksw;
case Gcc44:
setenv WM_CC 'gcc-mp-4.4'
setenv WM_CXX 'g++-mp-4.4'
breaksw;
case Gcc45:
setenv WM_CC 'gcc-mp-4.5'
setenv WM_CXX 'g++-mp-4.5'
breaksw;
endsw
setenv WM_COMPILER ""
breaksw
case SunOS:
setenv WM_ARCH SunOS64
setenv WM_COMPILER_LIB_ARCH 64
@ -261,7 +309,7 @@ _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
@ -285,6 +333,11 @@ if ( $?LD_PRELOAD ) then
setenv LD_PRELOAD `$cleanProg "$LD_PRELOAD"`
endif
#- Clean DYLD_LIBRARY_PATH
if ( $?DYLD_LIBRARY_PATH ) then
setenv DYLD_LIBRARY_PATH `$cleanProg "$DYLD_LIBRARY_PATH"`
endif
# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset cleanEnv cleanProg colonPath foamInstall foamOldDirs

View file

@ -144,16 +144,26 @@ unset MPI_ARCH_PATH
switch ("$WM_MPLIB")
case OPENMPI:
set mpi_version=openmpi-1.5
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
if (-e $WM_THIRD_PARTY_DIR/packages/openmpi-1.4.3 ) then
set mpi_version=openmpi-1.4.3
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh
# Tell OpenMPI where to find its install directory
setenv OPAL_PREFIX $MPI_ARCH_PATH
setenv MPI_HOME $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS
setenv MPI_ARCH_PATH $MPI_HOME
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
# Tell OpenMPI where to find its install directory
setenv OPAL_PREFIX $MPI_ARCH_PATH
else
set mpi_version=openmpi-1.5
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
# Tell OpenMPI where to find its install directory
setenv OPAL_PREFIX $MPI_ARCH_PATH
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
endif
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
unset mpi_version
breaksw
@ -288,6 +298,35 @@ if ( $?CGAL_LIB_DIR ) then
_foamAddLib $CGAL_LIB_DIR
endif
# Mesquite library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS/etc/mesquite-2.1.2.csh
endif
# Metis library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( -e $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2/platforms/$WM_OPTIONS/etc/metis-5.0pre2.csh
endif
# ParMetis library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( -e $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1/platforms/$WM_OPTIONS/etc/ParMetis-3.1.1.csh
endif
# ParMGridGen library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( -e $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS/etc/ParMGridGen-1.0.csh
endif
# Scotch library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( -e $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b/platforms/$WM_OPTIONS/etc/scotch-5.1.10b.csh
endif
# Switch on the hoard memory allocator if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -295,6 +334,35 @@ endif
# setenv LD_PRELOAD $FOAM_LIBBIN/libhoard.so:${LD_PRELOAD}
#endif
# Third party packages
# cmake
# ~~~~~
if ( -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.3 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3/platforms/$WM_OPTIONS/etc/cmake-2.8.3.csh
endif
# Python
# ~~~~~
if ( -e "$WM_THIRD_PARTY_DIR"/packages/Python-2.7 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/Python-2.7/platforms/$WM_OPTIONS/etc/Python-2.7.csh
endif
# QT
# ~~~~~
if ( -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.7.0 )then
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.0/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.7.0.csh
endif
# PARAVIEW
# ~~~~~
if ( -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.8.1 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.csh
endif
if ( $WM_ARCH == "darwinIntel" ) then
setenv DYLD_LIBRARY_PATH ${LD_LIBRARY_PATH}
endif
# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~

View file

@ -172,15 +172,35 @@ unset MPI_ARCH_PATH
case "$WM_MPLIB" in
OPENMPI)
mpi_version=openmpi-1.4.1
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
if [ -e $WM_THIRD_PARTY_DIR/packages/openmpi-1.4.3 ]
then
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using openmpi-1.4.3"
fi
mpi_version=openmpi-1.4.3
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.sh
# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH
export MPI_HOME=$WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS
export MPI_ARCH_PATH=$MPI_HOME
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH
elif [ -e $WM_THIRD_PARTY_DIR/packages/openmpi-1.4.1 ]
then
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using openmpi-1.4.1"
fi
mpi_version=openmpi-1.4.1
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.sh
export MPI_HOME=$WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS
export MPI_ARCH_PATH=$MPI_HOME
# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH
fi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version
@ -335,6 +355,112 @@ export MPI_BUFFER_SIZE
# fi
#fi
# Third party packages
#
# In order to use a pre-installed version of the ThirdParty packages, just set the
# appropriate XXX_DIR environment variable for a given package in order to disable
# the sourcing of the ThirdParty version of the same package.
# Load Mesquite library if the MESQUITE_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${MESQUITE_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS/etc/mesquite-2.1.2.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "MESQUITE_DIR is initialized to: $MESQUITE_DIR"
# Load Metis library if the METIS_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${METIS_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2/platforms/$WM_OPTIONS/etc/metis-5.0pre2.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "METIS_DIR is initialized to: $METIS_DIR"
# Load ParMetis library if the PARMETIS_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${PARMETIS_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1/platforms/$WM_OPTIONS/etc/ParMetis-3.1.1.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "PARMETIS_DIR is initialized to: $PARMETIS_DIR"
# Load ParMGridGen library if the PARMGRIDGEN_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${PARMGRIDGEN_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS/etc/ParMGridGen-1.0.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "PARMGRIDGEN_DIR is initialized to: $PARMGRIDGEN_DIR"
# Load Scotch library if the SCOTCH_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${SCOTCH_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b/platforms/$WM_OPTIONS/etc/scotch-5.1.10b.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "SCOTCH_DIR is initialized to: $SCOTCH_DIR"
# Load cmake if the CMAKE_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${CMAKE_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3/platforms/$WM_OPTIONS/etc/cmake-2.8.3.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "CMAKE_DIR is initialized to: $CMAKE_DIR"
# Load Python if the PYTHON_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${PYTHON_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/Python-2.7 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/Python-2.7/platforms/$WM_OPTIONS/etc/Python-2.7.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "PYTHON_DIR is initialized to: $PYTHON_DIR"
# Load QT if the QT_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${QT_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.0 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.0/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.7.0.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "QT_DIR is initialized to: $QT_DIR"
# Load ParaView if the PARAVIEW_DIR variable is empty or non-existent
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ ! -n "${PARAVIEW_DIR:+x}" ]
then
[ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.sh
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "PARAVIEW_DIR is initialized to: $PARAVIEW_DIR"
# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset _foamAddPath _foamAddLib minBufferSize

View file

@ -1,10 +1,10 @@
EXE_INC = \
-I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include \
-I$(METIS_DIR)/include \
-I../decompositionMethods/lnInclude \
-I../scotchDecomp/lnInclude
LIB_LIBS = \
-L$(FOAM_LIBBIN)/dummy \
-lmetis \
-lGKlib
-L$(METIS_DIR)/lib -lmetis \
-L$(METIS_DIR)/lib -lGKlib

View file

@ -2,13 +2,13 @@ include $(RULES)/mplib$(WM_MPLIB)
EXE_INC = \
$(PFLAGS) $(PINC) \
-I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \
-I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \
-I$(PARMETIS_DIR)/include/ParMETISLib \
-I$(PARMETIS_DIR)/include \
-I../decompositionMethods/lnInclude \
-I../metisDecomp/lnInclude \
-I../scotchDecomp/lnInclude
LIB_LIBS = \
-L$(FOAM_MPI_LIBBIN) \
-lmetis-parmetis \
-lparmetis
-L$(PARMETIS_DIR)/lib -lmetis-parmetis \
-L$(PARMETIS_DIR)/lib -lparmetis

View file

@ -1,9 +1,7 @@
EXE_INC = \
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch \
-I/usr/include/scotch \
-I$(SCOTCH_DIR)/include \
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-lscotch \
-lscotcherrexit
-L$(SCOTCH_DIR)/lib -lscotch \
-L$(SCOTCH_DIR)/lib -lscotcherrexit

View file

@ -1,9 +1,9 @@
EXE_INC = \
-I$(WM_THIRD_PARTY_DIR)/mesquite-2.1.2/lnInclude \
-I$(MESQUITE_DIR)/include \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
LIB_LIBS = \
-lmeshTools \
-ldynamicMesh \
-lmesquite
-L$(MESQUITE_DIR)/lib -lmesquite

View file

@ -7,9 +7,9 @@ TYPE_REAL=-DTYPE_REAL
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(ParMGridGen)/MGridGen/Lib/lnInclude \
-I$(ParMGridGen)/MGridGen/IMlib/lnInclude \
-I$(PARMGRIDGEN_DIR)/include/Lib \
-I$(PARMGRIDGEN_DIR)/include/IMlib \
$(TYPE_REAL)
LIB_LIBS = \
-lMGridGen
-L$(PARMGRIDGEN_DIR)/lib -lMGridGen