Fix deleting by r-rmpfr

This commit is contained in:
Tom Merrick 2017-05-23 10:17:48 -05:00
commit bd60f5c927
5 changed files with 119 additions and 17 deletions

View File

@ -1,5 +0,0 @@
--- a/tools/xml2mv.py 2016-06-27 17:49:27.000000000 +0200
+++ a/tools/xml2mv.py 2016-09-13 16:25:17.246960456 +0200
@@ -1 +1 @@
-#!/usr/bin/python
+#!/usr/bin/env python

View File

@ -41,10 +41,6 @@ class Magics(Package):
version('2.29.4', '91c561f413316fb665b3bb563f3878d1') version('2.29.4', '91c561f413316fb665b3bb563f3878d1')
version('2.29.0', 'db20a4d3c51a2da5657c31ae3de59709', preferred=True) version('2.29.0', 'db20a4d3c51a2da5657c31ae3de59709', preferred=True)
# The patch changes the hardcoded path to python in shebang to enable the
# usage of the first python installation that appears in $PATH
patch('no_hardcoded_python.patch', when='@:2.29.6')
# The patch reorders includes and adds namespaces where necessary to # The patch reorders includes and adds namespaces where necessary to
# resolve ambiguity of invocations of isnan and isinf functions. The # resolve ambiguity of invocations of isnan and isinf functions. The
# patch is not needed since the version 2.29.1 # patch is not needed since the version 2.29.1
@ -55,6 +51,7 @@ class Magics(Package):
variant('cairo', default=True, description='Enable cairo support[png/jpeg]') variant('cairo', default=True, description='Enable cairo support[png/jpeg]')
variant('metview', default=False, description='Enable metview support') variant('metview', default=False, description='Enable metview support')
variant('qt', default=False, description='Enable metview support with qt') variant('qt', default=False, description='Enable metview support with qt')
variant('eccodes', default=False, description='Use eccodes instead of grib-api')
depends_on('cmake', type='build') depends_on('cmake', type='build')
depends_on('pkg-config', type='build') depends_on('pkg-config', type='build')
@ -64,8 +61,8 @@ class Magics(Package):
depends_on('python', type='build') depends_on('python', type='build')
depends_on('perl', type='build') depends_on('perl', type='build')
depends_on('perl-xml-parser', type='build') depends_on('perl-xml-parser', type='build')
depends_on('eccodes', when='@2.30.0:') depends_on('eccodes', when='+eccodes')
depends_on('grib-api', when='@:2.29.6') depends_on('grib-api', when='~eccodes')
depends_on('proj') depends_on('proj')
depends_on('boost') depends_on('boost')
depends_on('expat') depends_on('expat')
@ -74,9 +71,14 @@ class Magics(Package):
depends_on('libemos', when='+bufr') depends_on('libemos', when='+bufr')
depends_on('qt', when='+metview+qt') depends_on('qt', when='+metview+qt')
conflicts('+eccodes', when='@:2.29.0')
# Replace system python and perl by spack versions:
def patch(self): def patch(self):
for plfile in glob.glob('*/*.pl'): for plfile in glob.glob('*/*.pl'):
filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', plfile) filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', plfile)
for pyfile in glob.glob('*/*.py'):
filter_file('#!/usr/bin/python', '#!/usr/bin/env python', pyfile)
def install(self, spec, prefix): def install(self, spec, prefix):
options = [] options = []
@ -87,11 +89,6 @@ def install(self, spec, prefix):
options.append('-DPROJ4_PATH=%s' % spec['proj'].prefix) options.append('-DPROJ4_PATH=%s' % spec['proj'].prefix)
options.append('-DENABLE_TESTS=OFF') options.append('-DENABLE_TESTS=OFF')
if self.version >= Version('2.30.0'):
options.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix)
else:
options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
if '+bufr' in spec: if '+bufr' in spec:
options.append('-DENABLE_BUFR=ON') options.append('-DENABLE_BUFR=ON')
options.append('-DLIBEMOS_PATH=%s' % spec['libemos'].prefix) options.append('-DLIBEMOS_PATH=%s' % spec['libemos'].prefix)
@ -119,6 +116,13 @@ def install(self, spec, prefix):
else: else:
options.append('-DENABLE_METVIEW=OFF') options.append('-DENABLE_METVIEW=OFF')
if '+eccodes' in spec:
options.append('-DENABLE_ECCODES=ON')
options.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix)
else:
options.append('-DENABLE_ECCODES=OFF')
options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
if (self.compiler.f77 is None) or (self.compiler.fc is None): if (self.compiler.f77 is None) or (self.compiler.fc is None):
options.append('-DENABLE_FORTRAN=OFF') options.append('-DENABLE_FORTRAN=OFF')

View File

@ -113,6 +113,8 @@ class Plumed(AutotoolsPackage):
force_autoreconf = True force_autoreconf = True
parallel = False
def apply_patch(self, other): def apply_patch(self, other):
plumed = subprocess.Popen( plumed = subprocess.Popen(
[join_path(self.spec.prefix.bin, 'plumed'), 'patch', '-p'], [join_path(self.spec.prefix.bin, 'plumed'), 'patch', '-p'],
@ -126,7 +128,7 @@ def apply_patch(self, other):
def setup_dependent_package(self, module, dependent_spec): def setup_dependent_package(self, module, dependent_spec):
# Make plumed visible from dependent packages # Make plumed visible from dependent packages
module.plumed = self.spec['plumed'].command module.plumed = dependent_spec['plumed'].command
@run_before('autoreconf') @run_before('autoreconf')
def filter_gslcblas(self): def filter_gslcblas(self):
@ -162,6 +164,14 @@ def configure_args(self):
'STATIC_LIBS=-mt_mpi' 'STATIC_LIBS=-mt_mpi'
]) ])
# Set flags to help find gsl
if '+gsl' in self.spec:
gsl_libs = self.spec['gsl'].libs
blas_libs = self.spec['blas'].libs
configure_opts.append('LDFLAGS={0}'.format(
(gsl_libs + blas_libs).ld_flags
))
# Additional arguments # Additional arguments
configure_opts.extend([ configure_opts.extend([
'--enable-shared={0}'.format('yes' if '+shared' in spec else 'no'), '--enable-shared={0}'.format('yes' if '+shared' in spec else 'no'),

View File

@ -0,0 +1,55 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program 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 terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class RRmpi(RPackage):
"""An interface (wrapper) to MPI APIs. It also provides interactive R
manager and worker environment."""
homepage = "http://www.stats.uwo.ca/faculty/yu/Rmpi"
url = "https://cran.r-project.org/src/contrib/Rmpi_0.6-6.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/Rmpi"
version('0.6-6', '59ae8ce62ff0ff99342d53942c745779')
depends_on('mpi')
depends_on('r@2.15.1:')
def install(self, spec, prefix):
if 'mpich' in spec:
Rmpi_type = 'MPICH'
elif 'mvapich' in spec:
Rmpi_type = 'MVAPICH'
else:
Rmpi_type = 'OPENMPI'
my_mpi = spec['mpi']
R('CMD', 'INSTALL',
'--configure-args=--with-Rmpi-type=%s' % Rmpi_type +
' --with-mpi=%s' % my_mpi.prefix,
'--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path)

View File

@ -0,0 +1,38 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program 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 terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class RSnow(RPackage):
"""Support for simple parallel computing in R."""
homepage = "https://cran.r-project.org/web/packages/snow/index.html"
url = "https://cran.r-project.org/src/contrib/snow_0.4-2.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/snow"
version('0.4-2', 'afc7b0dfd4518aedb6fc81712fd2ac70')
depends_on('r-rmpi', type='run')
depends_on('r@2.13.1:', type=('build', 'run'))