ThirdParty: Adding bison, flex and m4

This commit is contained in:
Martin Beaudoin 2011-05-08 22:48:26 -04:00
parent 4a271dbf06
commit 1d2f5551ac
25 changed files with 705 additions and 110 deletions

View file

@ -34,6 +34,8 @@
# to the appropriate location for your architcture so the other stage scripts
# will be able to pick them up
#
# Usage: ./AllMake.stage0 file_1.rpm file_2.rpm ... file_n.rpm
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#

View file

@ -61,18 +61,35 @@ 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 )
# You need gmp and mpfr for gcc-4.4.5
# Uncomment the following 3 lines for gcc-4.4.5
#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
#( rpm_make -p mpfr-3.0.0 -s mpfr-3.0.0.spec -u http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz )
#( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz )
#
# You need gmp, mpfr and mpc for gcc-4.5.1
# Uncomment the following 4 lines for gcc-4.5.1
#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
#( rpm_make -p mpfr-3.0.0 -s mpfr-3.0.0.spec -u http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz )
#( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz )
#( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u 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 )
#( rpm_make -p Python-2.7 -s Python-2.7.spec -u http://www.python.org/ftp/python/2.7/Python-2.7.tgz )
# m4
# You need a recent version of m4 in order to compile a recent version of bison
#( rpm_make -p m4-1.4.16 -s m4-1.4.16.spec -u http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz )
# bison
#( rpm_make -p bison-2.4.3 -s bison-2.4.3.spec -u http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz )
# flex
#( rpm_make -p flex-2.5.35 -s flex-2.5.35.spec -u http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz )
# cmake
( rpm_make cmake-2.8.3 http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz )
( rpm_make -p cmake-2.8.3 -s cmake-2.8.3.spec -u http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz )
echo ========================================
echo Done ThirdParty AllMake: Stage1

View file

@ -65,9 +65,9 @@ echo
if [ "$WM_MPLIB" != "SYSTEMOPENMPI" ]
then
# 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 )
#( rpm_make -p openmpi-1.4.1 -s openmpi-1.4.1.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz )
#( rpm_make -p openmpi-1.5 -s openmpi-1.5.spec -u http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.tar.gz )
( rpm_make -p openmpi-1.4.3 -s openmpi-1.4.3.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.gz )
else
echo "Using system installed OpenMPI"
echo ""

View file

@ -59,7 +59,7 @@ echo
# Metis
if [ -z "$METIS_SYSTEM" ]
then
( rpm_make metis-5.0pre2 http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz )
( rpm_make -p metis-5.0pre2 -s metis-5.0pre2.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz )
else
echo "Using system installed Metis"
echo ""
@ -68,7 +68,7 @@ fi
# ParMGridGen
if [ -z "$PARMGRIDGEN_SYSTEM" ]
then
( rpm_make ParMGridGen-1.0 http://www.mgnet.org/mgnet/Codes/parmgridgen/ParMGridGen-1.0.tar.gz )
( rpm_make -p ParMGridGen-1.0 -s ParMGridGen-1.0.spec -u http://www.mgnet.org/mgnet/Codes/parmgridgen/ParMGridGen-1.0.tar.gz )
else
echo "Using system installed ParMGridGen"
echo ""
@ -77,7 +77,7 @@ fi
# Libccmio
if [ -z "$LIBCCMIO_SYSTEM" ]
then
( rpm_make libccmio-2.6.1 https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz )
( rpm_make -p libccmio-2.6.1 -s libccmio-2.6.1.spec -u https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz )
else
echo "Using system installed Libccmio"
echo ""
@ -86,13 +86,13 @@ fi
# Mesquite
if [ -z "$MESQUITE_SYSTEM" ]
then
( rpm_make mesquite-2.1.2 http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz )
( rpm_make -p mesquite-2.1.2 -s mesquite-2.1.2.spec -u http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz )
else
echo "Using system installed Mesquite"
echo ""
fi
# The following two packages depends on the availability of OpenMPI
# The following three packages depends on the availability of OpenMPI
# The macro rpm_make() will make sure to update the ThirdParty environment variables before starting
# the compilation.
# Just make sure the OpenMPI environment variables are properly initialized, or that
@ -101,7 +101,7 @@ fi
# Scotch
if [ -z "$SCOTCH_SYSTEM" ]
then
( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
( rpm_make -p scotch-5.1.10b -s scotch-5.1.10b.spec -u https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
else
echo "Using system installed Scotch"
echo ""
@ -110,12 +110,21 @@ fi
# ParMetis
if [ -z "$PARMETIS_SYSTEM" ]
then
( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
( rpm_make -p ParMetis-3.1.1 -s ParMetis-3.1.1.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
else
echo "Using system installed ParMetis"
echo ""
fi
# Zoltan
if [ -z "$ZOLTAN_SYSTEM" ]
then
( rpm_make -p zoltan-3.5 -s zoltan-3.5.spec -u http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.5.tar.gz )
else
echo "Using system installed Zoltan"
echo ""
fi
echo ========================================
echo Done ThirdParty AllMake: Stage3
echo ========================================

View file

@ -59,7 +59,7 @@ echo
# qt-everywhere-opensource-src-4.7.0
if [ ! -z "$QT_THIRD_PARTY" ]
then
( 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 )
( rpm_make -p qt-everywhere-opensource-src-4.7.0 -s qt-everywhere-opensource-src-4.7.0.spec -u http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz )
else
echo "Using system installed QT"
echo ""
@ -69,9 +69,12 @@ fi
# Paraview
if [ -z "$PARAVIEW_SYSTEM" ]
then
# Make sure we get the value of QT_BIN_DIR initialized
. $WM_PROJECT_DIR/etc/settings.sh
if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ]
then
( rpm_make ParaView-3.8.1 http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \
( rpm_make -p ParaView-3.8.1 -s ParaView-3.8.1.spec -u http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \
-D '_qmakePath $QT_BIN_DIR/qmake'
)
else

View file

@ -166,7 +166,7 @@ Patch0: ParaView-3.8.1.patch_darwin
cd ./buildObj
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$RPM_BUILD_ROOT%{_installPrefix} \
-DCMAKE_INSTALL_PREFIX:PATH=%{_installPrefix} \
$CMAKE_VARIABLES \
..
@ -185,7 +185,7 @@ Patch0: ParaView-3.8.1.patch_darwin
export NO_BRP_STALE_LINK_ERROR=yes
cd buildObj
make install
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -99,7 +99,7 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -0,0 +1,153 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 bison-2.4.3
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2011)
#
#------------------------------------------------------------------------------
# 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 bison
%define release %{_WM_OPTIONS}
%define version 2.4.3
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: bison
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://ftp.gnu.org/gnu/bison
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}
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install DESTDIR=$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 BISON_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$BISON_DIR/lib ] && _foamAddLib \$BISON_DIR/lib
# Enable access to the package applications if present
[ -d \$BISON_DIR/bin ] && _foamAddPath \$BISON_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 BISON_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$BISON_DIR/lib ) then
_foamAddLib \$BISON_DIR/lib
endif
if ( -e \$BISON_DIR/bin ) then
_foamAddPath \$BISON_DIR/bin
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -93,13 +93,13 @@ Group: Development/Tools
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
./configure \
--prefix=$RPM_BUILD_ROOT/%{_installPrefix}
--prefix=%{_installPrefix}
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -0,0 +1,153 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 flex-2.5.35
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2011)
#
#------------------------------------------------------------------------------
# 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 flex
%define release %{_WM_OPTIONS}
%define version 2.5.35
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: flex
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35
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}
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install DESTDIR=$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 FLEX_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$FLEX_DIR/lib ] && _foamAddLib \$FLEX_DIR/lib
# Enable access to the package applications if present
[ -d \$FLEX_DIR/bin ] && _foamAddPath \$FLEX_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 FLEX_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$FLEX_DIR/lib ) then
_foamAddLib \$FLEX_DIR/lib
endif
if ( -e \$FLEX_DIR/bin ) then
_foamAddPath \$FLEX_DIR/bin
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -95,6 +95,10 @@ Group: Development/Tools
GMP_VERSION=gmp-5.0.1
MPFR_VERSION=mpfr-3.0.0
# Set LD_LIBRARY_FILE for GMP and MPFR so configure won't fail some of the tests
export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH
mkdir ./objBuildDir
cd ./objBuildDir
@ -111,7 +115,7 @@ Group: Development/Tools
%install
cd ./objBuildDir
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"
@ -126,12 +130,13 @@ 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
export WM_COMPILER_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$GCC_DIR/lib ] && _foamAddLib \$GCC_DIR/lib
[ -d \$WM_COMPILER_DIR/lib ] && _foamAddLib \$WM_COMPILER_DIR/lib
[ -d \$WM_COMPILER_DIR/lib64 ] && _foamAddLib \$WM_COMPILER_DIR/lib64
# Enable access to the package applications if present
[ -d \$GCC_DIR/bin ] && _foamAddPath \$GCC_DIR/bin
[ -d \$WM_COMPILER_DIR/bin ] && _foamAddPath \$WM_COMPILER_DIR/bin
DOT_SH_EOF
#
@ -140,28 +145,30 @@ DOT_SH_EOF
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
setenv WM_COMPILER_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$GCC_DIR/lib ) then
_foamAddLib \$GCC_DIR/lib
if ( -e \$WM_COMPILER_DIR/lib ) then
_foamAddLib \$WM_COMPILER_DIR/lib
endif
if ( -e \$GCC_DIR/bin ) then
_foamAddPath \$GCC_DIR/bin
if ( -e \$WM_COMPILER_DIR/lib64 ) then
_foamAddLib \$WM_COMPILER_DIR/lib64
endif
if ( -e \$WM_COMPILER_DIR/bin ) then
_foamAddPath \$WM_COMPILER_DIR/bin
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/bin
%{_installPrefix}/etc
%{_installPrefix}/include
%{_installPrefix}/info
%{_installPrefix}/lib
%{_installPrefix}/libexec
%{_installPrefix}/man
%{_installPrefix}/share
%{_installPrefix}

View file

@ -113,7 +113,7 @@ Group: Development/Tools
%install
cd ./objBuildDir
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -97,7 +97,7 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"
@ -137,6 +137,11 @@ if ( -e \$GMP_DIR/bin ) then
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}

153
ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec vendored Normal file
View file

@ -0,0 +1,153 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 m4-1.4.16
#
# 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 m4
%define release %{_WM_OPTIONS}
%define version 1.4.16
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: m4
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://ftp.gnu.org/gnu/m4
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}
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install DESTDIR=$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 M4_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
[ -d \$M4_DIR/lib ] && _foamAddLib \$M4_DIR/lib
# Enable access to the package applications if present
[ -d \$M4_DIR/bin ] && _foamAddPath \$M4_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 M4_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
if ( -e \$M4_DIR/lib ) then
_foamAddLib \$M4_DIR/lib
endif
if ( -e \$M4_DIR/bin ) then
_foamAddPath \$M4_DIR/bin
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -111,7 +111,7 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -104,7 +104,7 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -100,7 +100,8 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOTbg
# Creation of OpenFOAM specific .csh and .sh files"
@ -140,6 +141,12 @@ if ( -e \$MPFR_DIR/bin ) then
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}

View file

@ -97,6 +97,9 @@ Group: Development/Tools
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
else
mpiWith="$mpiWith --without-sge"
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
fi
# Infiniband support
@ -107,7 +110,8 @@ Group: Development/Tools
# fi
./configure \
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
--prefix=%{_installPrefix} \
--exec_prefix=%{_installPrefix} \
--disable-mpirun-prefix-by-default \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
@ -115,6 +119,7 @@ Group: Development/Tools
--disable-mpi-f90 \
--disable-mpi-cxx \
--disable-mpi-profile \
--without-slurm \
$mpiWith \
;
@ -122,7 +127,7 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -84,6 +84,7 @@ Group: Development/Tools
%prep
%setup -q
%build
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC"
@ -93,13 +94,19 @@ Group: Development/Tools
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
unset mpiWith
# enable GridEngine if it appears to be in use
# Enable GridEngine if it appears to be in use
# If you don't want any integration with SGE, simply unset the SGE
# environment variable
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
else
mpiWith="$mpiWith --without-sge"
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
fi
# Infiniband support
# Adjust according to your local paths
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
@ -107,22 +114,22 @@ Group: Development/Tools
# fi
./configure \
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
--prefix=%{_installPrefix} \
--exec_prefix=%{_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 \
;
--without-slurm \
--disable-mpi-profile $mpiWith
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"
@ -136,7 +143,7 @@ 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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/openmpi-1.4.3/platforms/\$WM_OPTIONS
export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export OPENMPI_BIN_DIR=\$OPENMPI_DIR/bin
export OPENMPI_LIB_DIR=\$OPENMPI_DIR/lib
@ -160,7 +167,7 @@ export PLIBS=\$OPENMPI_LINK_FLAGS
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
then
echo "Using system installed OpenMPI:"
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
@ -209,7 +216,7 @@ setenv PLIBS "\$OPENMPI_LINK_FLAGS"
if (\$?FOAM_VERBOSE && \$?prompt) then
echo "Using system installed OpenMPI:"
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
@ -229,4 +236,4 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/*
%{_installPrefix}

View file

@ -97,6 +97,9 @@ Group: Development/Tools
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
else
mpiWith="$mpiWith --without-sge"
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
fi
# Infiniband support
@ -107,13 +110,15 @@ Group: Development/Tools
# fi
./configure \
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
--prefix=%{_installPrefix} \
--exec_prefix=%{_installPrefix} \
--disable-mpirun-prefix-by-default \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
--disable-mpi-f77 \
--disable-mpi-f90 \
--disable-mpi-cxx \
--without-slurm \
--disable-mpi-profile \
$mpiWith \
;
@ -122,7 +127,7 @@ Group: Development/Tools
make -j $WM_NCOMPPROCS
%install
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"
@ -160,7 +165,7 @@ export PLIBS=\$OPENMPI_LINK_FLAGS
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
then
echo "Using system installed OpenMPI:"
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
@ -209,7 +214,7 @@ setenv PLIBS \`echo \$OPENMPI_LINK_FLAGS\`
if (\$?FOAM_VERBOSE && \$?prompt) then
echo "Using system installed OpenMPI:"
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"

View file

@ -97,14 +97,18 @@ Group: Development/Tools
./configure \
-opensource --confirm-license=yes \
-release -shared \
-nomake examples -nomake demos \
--prefix=%{_installPrefix}
# Explicitely specify LD_LIBRARY_PATH so it can find QT own libraries
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/lib
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
# make install INSTALL_ROOT=$RPM_BUILD_ROOT%{_installPrefix}
make install INSTALL_ROOT=$RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"
@ -145,15 +149,6 @@ 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
%{_installPrefix}

View file

@ -109,7 +109,7 @@ Patch0: scotch-5.1.10b_patch_0
%install
cd src
mkdir -p $RPM_BUILD_ROOT%{_installPrefix}
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of OpenFOAM specific .csh and .sh files"

View file

@ -49,13 +49,39 @@ echo ""
#
rpm_make()
{
package="$1"
# sort arguments
_PACKAGE=''
_SPECFILE=''
_PACKAGE_URL=''
_ADDITIONALFLAGS=''
while getopts p:s:u:a: flags
do
case $flags in
p) _PACKAGE=$OPTARG
;;
u) _PACKAGE_URL=$OPTARG
;;
s) _SPECFILE=$OPTARG
;;
a) _ADDITIONALFLAGS=$OPTARG
;;
esac
done
echo "Package name : $_PACKAGE"
echo "Package URL : $_PACKAGE_URL"
echo "RPM spec file name: $_SPECFILE"
echo "Additional flags : $_ADDITIONALFLAGS"
# Shift options
shift `expr $OPTIND - 1`
# Make sure the ThirdParty environment is up-to-date
echo "Updating the ThirdParty environment variables before building package $package"
echo "Updating the ThirdParty environment variables before building package $_PACKAGE"
. $WM_PROJECT_DIR/etc/settings.sh
rpmName=$package-$WM_OPTIONS.$architecture
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.
@ -76,35 +102,35 @@ rpm_make()
# are for the command rpmbuild.
# This is a bit fragile, improvements will come later if necessary.
#
[ "$#" -ge 2 ] && {
packageURL="$2"
packageTarBall=`basename $packageURL`
# Do we need to download the package using the supplied URL
if [ -n "$_PACKAGE_URL" ]; then
packageTarBall=`basename $_PACKAGE_URL`
if [ ! -e "SOURCES/$packageTarBall" ]; then
echo "Download $packageTarBall from : $packageURL"
( cd SOURCES; wget --no-check-certificate $packageURL )
echo "Download $packageTarBall from : $_PACKAGE_URL"
( cd SOURCES; wget --no-check-certificate $_PACKAGE_URL )
fi
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 "$@"
echo "Making package $_PACKAGE using RPM."
rpm_build $_PACKAGE $_SPECFILE $_ADDITIONALFLAGS "$@"
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
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"
echo "Package $_PACKAGE is already installed"
fi
echo "Done installing package $package"
unset _PACKAGE
unset _SPECFILE
unset _PACKAGE_URL
unset _ADDITIONALFLAGS
echo "Done installing package $_PACKAGE"
echo ""
}
@ -114,8 +140,8 @@ rpm_make()
rpm_build()
{
package="$1"
shift
specFile="$package.spec"
specFile="$2"
shift 2
cd $buildBase
@ -125,7 +151,7 @@ rpm_build()
}
#Build RPM package
echo "Building package $package"
echo "Building package $package using SPEC file : $specFile. Optional args: $@"
#rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
#
# Let's keep the compilation directory alive for now in order to facilitate postmortems of failed compilations

View file

@ -40,7 +40,7 @@ export FOAM_VERBOSE=1
# Specify system compiler
# ~~~~~~~~~~~~~~~~~~~~~~~
compilerInstall=system
compilerInstall=System
# Specify system openmpi
# ~~~~~~~~~~~~~~~~~~~~~~
@ -142,6 +142,15 @@ compilerInstall=system
#export PARAVIEW_DIR=path_to_system_installed_paraview
#export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin
# System installed bison
#export BISON_SYSTEM=1
# System installed flex
#export FLEX_SYSTEM=1
# System installed m4
#export M4_SYSTEM=1
# Specify ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~~
#export ParaView_VERSION=git # eg, cvs/git version

View file

@ -120,8 +120,13 @@ unset compilerBin compilerLib
# Select compiler installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# compilerInstall = OpenFOAM | System
#
# We can override the value of compilerInstall from prefs.sh
: ${compilerInstall:=System}
# Or we can force it right here
#compilerInstall=OpenFOAM
compilerInstall=System
#compilerInstall=System
case "${compilerInstall:-OpenFOAM}" in
OpenFOAM)
@ -131,6 +136,11 @@ OpenFOAM)
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
;;
Gcc44)
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.0/platforms/$WM_OPTIONS/etc/mpfr-3.0.0.sh
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.sh
;;
Gcc43)
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
@ -272,7 +282,7 @@ SYSTEMOPENMPI)
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using system installed OpenMPI:"
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : $OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : $OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : $OPENMPI_INCLUDE_DIR"
@ -475,6 +485,35 @@ export MPI_BUFFER_SIZE
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR"
# Load m4
# ~~~~~~~~~~
[ -z "$M4_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/m4-1.4.16 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/m4-1.4.16/platforms/$WM_OPTIONS/etc/m4-1.4.16.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " M4_DIR is initialized to: $M4_DIR"
# Load bison
# ~~~~~~~~~~
[ -z "$BISON_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/bison-2.4.3 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/bison-2.4.3/platforms/$WM_OPTIONS/etc/bison-2.4.3.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " BISON_DIR is initialized to: $BISON_DIR"
# Load flex
# ~~~~~~~~~~
[ -z "$FLEX_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/flex-2.5.35 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/flex-2.5.35/platforms/$WM_OPTIONS/etc/flex-2.5.35.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " FLEX_DIR is initialized to: $FLEX_DIR"
# Load zoltan
# ~~~~~~~~~~
[ -z "$ZOLTAN_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/zoltan_3.5 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/zoltan_3.5/platforms/$WM_OPTIONS/etc/zoltan_3.5.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " ZOLTAN_DIR is initialized to: $ZOLTAN_DIR"
# Load Python
# ~~~~~~~~~~~