openfoam: rename openfoam-com to openfoam (#11876)

The original packaging, with openfoam as a virtual and with
openfoam-com, openfoam-org and openfoam-extend as
providers, adds an obfuscation layer without any benefit.

- Rename `openfoam-com` to `openfoam`, and remove the 
  `openfoam` virtual package.
This commit is contained in:
Mark Olesen 2019-07-02 06:54:36 +01:00 committed by Todd Gamblin
parent 515b4045e9
commit 5fd3b5acda
16 changed files with 25 additions and 30 deletions

View File

@ -37,7 +37,6 @@ packages:
mpi: [openmpi, mpich] mpi: [openmpi, mpich]
mysql-client: [mysql, mariadb-c-client] mysql-client: [mysql, mariadb-c-client]
opencl: [pocl] opencl: [pocl]
openfoam: [openfoam-com, openfoam-org, foam-extend]
pil: [py-pillow] pil: [py-pillow]
pkgconfig: [pkgconf, pkg-config] pkgconfig: [pkgconf, pkg-config]
scalapack: [netlib-scalapack] scalapack: [netlib-scalapack]

View File

@ -24,7 +24,7 @@
# Changes # Changes
# 2017-03-28 Mark Olesen <mark.olesen@esi-group.com> # 2017-03-28 Mark Olesen <mark.olesen@esi-group.com>
# - avoid installing intermediate targets. # - avoid installing intermediate targets.
# - reworked to mirror the openfoam-com package. # - reworked to mirror the openfoam package.
# If changes are needed here, consider if they need applying there too. # If changes are needed here, consider if they need applying there too.
# #
# Known issues # Known issues
@ -37,10 +37,10 @@
from spack import * from spack import *
from spack.util.environment import EnvironmentModifications from spack.util.environment import EnvironmentModifications
from spack.pkg.builtin.openfoam_com import OpenfoamArch from spack.pkg.builtin.openfoam import OpenfoamArch
from spack.pkg.builtin.openfoam_com import add_extra_files from spack.pkg.builtin.openfoam import add_extra_files
from spack.pkg.builtin.openfoam_com import write_environ from spack.pkg.builtin.openfoam import write_environ
from spack.pkg.builtin.openfoam_com import rewrite_environ_files from spack.pkg.builtin.openfoam import rewrite_environ_files
import llnl.util.tty as tty import llnl.util.tty as tty
@ -78,7 +78,6 @@ class FoamExtend(Package):
variant('source', default=True, variant('source', default=True,
description='Install library/application sources and tutorials') description='Install library/application sources and tutorials')
provides('openfoam')
depends_on('mpi') depends_on('mpi')
depends_on('python') depends_on('python')
depends_on('zlib') depends_on('zlib')

View File

@ -20,7 +20,7 @@
import llnl.util.tty as tty import llnl.util.tty as tty
from spack import * from spack import *
from spack.pkg.builtin.openfoam_com import add_extra_files from spack.pkg.builtin.openfoam import add_extra_files
class OfAdiosWrite(Package): class OfAdiosWrite(Package):
@ -44,9 +44,9 @@ class OfAdiosWrite(Package):
variant('source', default=True, description='Install library source') variant('source', default=True, description='Install library source')
depends_on('openfoam-com@develop+source', when='@develop') depends_on('openfoam@develop+source', when='@develop')
depends_on('openfoam-com@1706+source', when='@1706') depends_on('openfoam@1706+source', when='@1706')
depends_on('openfoam-com@1612+source', when='@1612') depends_on('openfoam@1612+source', when='@1612')
depends_on('adios') depends_on('adios')
# General patches # General patches

View File

@ -30,8 +30,8 @@ class OfCatalyst(CMakePackage):
variant('full', default=False, description='Build against paraview (full) or catalyst (light)') variant('full', default=False, description='Build against paraview (full) or catalyst (light)')
depends_on('openfoam-com@1806', when='@1806', type=('build', 'link', 'run')) depends_on('openfoam@1806', when='@1806', type=('build', 'link', 'run'))
depends_on('openfoam-com@develop', when='@develop', type=('build', 'link', 'run')) depends_on('openfoam@develop', when='@develop', type=('build', 'link', 'run'))
depends_on('catalyst@5.5:', when='~full') depends_on('catalyst@5.5:', when='~full')
depends_on('paraview@5.5:+osmesa~qt', when='+full') depends_on('paraview@5.5:+osmesa~qt', when='+full')

View File

@ -8,7 +8,7 @@
import llnl.util.tty as tty import llnl.util.tty as tty
from spack import * from spack import *
from spack.pkg.builtin.openfoam_com import add_extra_files from spack.pkg.builtin.openfoam import add_extra_files
class OfPrecice(Package): class OfPrecice(Package):

View File

@ -1,2 +0,0 @@
Some helper tools for packaging applications/libraries dependent on an
openfoam provider.

View File

@ -17,7 +17,7 @@
############################################################################## ##############################################################################
# #
# Notes # Notes
# - The openfoam-org package is a modified version of the openfoam-com package. # - The openfoam-org package is a modified version of the openfoam package.
# If changes are needed here, consider if they should also be applied there. # If changes are needed here, consider if they should also be applied there.
# #
# - Building with boost/cgal is not included, since some of the logic is not # - Building with boost/cgal is not included, since some of the logic is not
@ -40,11 +40,11 @@
import llnl.util.tty as tty import llnl.util.tty as tty
from spack import * from spack import *
from spack.pkg.builtin.openfoam_com import add_extra_files from spack.pkg.builtin.openfoam import add_extra_files
from spack.pkg.builtin.openfoam_com import write_environ from spack.pkg.builtin.openfoam import write_environ
from spack.pkg.builtin.openfoam_com import rewrite_environ_files from spack.pkg.builtin.openfoam import rewrite_environ_files
from spack.pkg.builtin.openfoam_com import mplib_content from spack.pkg.builtin.openfoam import mplib_content
from spack.pkg.builtin.openfoam_com import OpenfoamArch from spack.pkg.builtin.openfoam import OpenfoamArch
class OpenfoamOrg(Package): class OpenfoamOrg(Package):
@ -76,7 +76,6 @@ class OpenfoamOrg(Package):
variant('source', default=True, variant('source', default=True,
description='Install library/application sources and tutorials') description='Install library/application sources and tutorials')
provides('openfoam')
depends_on('mpi') depends_on('mpi')
depends_on('zlib') depends_on('zlib')
depends_on('flex', type='build') depends_on('flex', type='build')
@ -128,7 +127,7 @@ def config(self):
return settings return settings
def setup_environment(self, spack_env, run_env): def setup_environment(self, spack_env, run_env):
# This should be similar to the openfoam-com package, # This should be similar to the openfoam package,
# but sourcing the etc/bashrc here seems to exit with an error. # but sourcing the etc/bashrc here seems to exit with an error.
# ... this needs to be examined in more detail. # ... this needs to be examined in more detail.
# #

View File

@ -0,0 +1 @@
Helper tools for packaging applications/libraries dependent on OpenFOAM.

View File

@ -4,7 +4,7 @@ export FOAM_INST_DIR=$(cd .. && pwd -L)
. $PWD/etc/bashrc '' # No arguments . $PWD/etc/bashrc '' # No arguments
mkdir -p $FOAM_APPBIN $FOAM_LIBBIN 2>/dev/null # Allow interrupt mkdir -p $FOAM_APPBIN $FOAM_LIBBIN 2>/dev/null # Allow interrupt
echo "Build openfoam with SPACK ($@)" echo "Build openfoam with SPACK ($@)"
echo WM_PROJECT_DIR = $WM_PROJECT_DIR echo "WM_PROJECT_DIR = $WM_PROJECT_DIR"
# Prefer spack-specific Allwmake if it exists # Prefer spack-specific Allwmake if it exists
if [ -f Allwmake-spack ] if [ -f Allwmake-spack ]

View File

@ -37,7 +37,7 @@
# - Combining +zoltan with +int64 has not been tested, but probably won't work. # - Combining +zoltan with +int64 has not been tested, but probably won't work.
# - Combining +mgridgen with +int64 or +float32 probably won't work. # - Combining +mgridgen with +int64 or +float32 probably won't work.
# #
# The spack 'develop' version of openfoam-com retains the upstream # The spack 'develop' version of openfoam retains the upstream
# WM_PROJECT_VERSION=plus naming internally. # WM_PROJECT_VERSION=plus naming internally.
# #
############################################################################## ##############################################################################
@ -64,7 +64,7 @@
def add_extra_files(foam_pkg, common, local, **kwargs): def add_extra_files(foam_pkg, common, local, **kwargs):
"""Copy additional common and local files into the stage.source_path """Copy additional common and local files into the stage.source_path
from the openfoam-com/common and the package/assets directories, from the openfoam/common and the package/assets directories,
respectively respectively
""" """
outdir = foam_pkg.stage.source_path outdir = foam_pkg.stage.source_path
@ -247,7 +247,7 @@ def mplib_content(spec, pre=None):
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
class OpenfoamCom(Package): class Openfoam(Package):
"""OpenFOAM is a GPL-opensource C++ CFD-toolbox. """OpenFOAM is a GPL-opensource C++ CFD-toolbox.
This offering is supported by OpenCFD Ltd, This offering is supported by OpenCFD Ltd,
producer and distributor of the OpenFOAM software via www.openfoam.com, producer and distributor of the OpenFOAM software via www.openfoam.com,
@ -263,7 +263,7 @@ class OpenfoamCom(Package):
list_url = "https://sourceforge.net/projects/openfoamplus/files/" list_url = "https://sourceforge.net/projects/openfoamplus/files/"
list_depth = 2 list_depth = 2
version('develop', branch='develop', submodules='True') # Needs credentials version('develop', branch='develop', submodules='True')
version('1906', 'ab7017e262c0c0fceec55c31e2153180') version('1906', 'ab7017e262c0c0fceec55c31e2153180')
version('1812_190531', 'a4b416838a8a76fdec22706a33c96de3') version('1812_190531', 'a4b416838a8a76fdec22706a33c96de3')
version('1812', '6a315687b3601eeece7ff7c7aed3d9a5') version('1812', '6a315687b3601eeece7ff7c7aed3d9a5')
@ -296,7 +296,6 @@ class OpenfoamCom(Package):
variant('source', default=True, variant('source', default=True,
description='Install library/application sources and tutorials') description='Install library/application sources and tutorials')
provides('openfoam')
depends_on('mpi') depends_on('mpi')
# After 1712, could suggest openmpi+thread_multiple for collated output # After 1712, could suggest openmpi+thread_multiple for collated output