spack/var/spack/repos/builtin/packages/openfoam-com/common/spack-Allwmake
Mark Olesen 1f2e56e1f3 refactor openfoam packages (#3669)
* Several improvements for the openfoam packages

--

Refactor openfoam packages by adding an OpenfoamArch class

Use separate configure, build, install phases.

Provide FOAM_PROJECT_DIR dependent env for openfoam packages
- easier way to locate

Eliminate intermediate installation directories
- unneeded clutter.
- makes it less than easy to find the etc/bashrc file

Add versioning for all openfoam patches
- no certainty which parts (if any) will be needed in future versions,
  especially if we strive to ensure that the upstream version builds
  well with spack to begin with.

Support build of develop branches
- helps track build regressions for future openfoam releases

STYLE: use common/ and assets/ to provide additional (build) resources ...

* - adjust OpenFOAM provider

Move openfoam-com up front since this is the one being used as a base
for the others
2017-06-21 11:35:31 -05:00

23 lines
746 B
Bash
Executable File

#!/bin/bash
# Build wrapper script - FOAM_INST_DIR is only required by foam-extend
export FOAM_INST_DIR=$(cd .. && pwd -L)
. $PWD/etc/bashrc '' # No arguments
mkdir -p $FOAM_APPBIN $FOAM_LIBBIN 2>/dev/null # Allow interrupt
echo "Build openfoam with SPACK ($@)"
echo WM_PROJECT_DIR = $WM_PROJECT_DIR
./Allwmake $@ # Pass arguments
# Link non-dummy MPI_FOAM type to parent-dir, where rpath can find it
if [ "${FOAM_MPI:=dummy}" != dummy -a -d "$FOAM_LIBBIN/$FOAM_MPI" ]
then
(
cd "$FOAM_LIBBIN" || exit 1
for i in $FOAM_MPI/lib*.so
do
[ -f $i ] && ln -sf $i "${i##*/}"
done
)
fi
# -----------------------------------------------------------------------------