summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/multimethod/package.py10
-rw-r--r--var/spack/repos/builtin/packages/R/package.py63
-rw-r--r--var/spack/repos/builtin/packages/adios/package.py (renamed from var/spack/packages/adios/package.py)23
-rw-r--r--var/spack/repos/builtin/packages/armadillo/package.py67
-rw-r--r--var/spack/repos/builtin/packages/arpack/package.py40
-rw-r--r--var/spack/repos/builtin/packages/autoconf/package.py28
-rw-r--r--var/spack/repos/builtin/packages/automake/package.py20
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py12
-rw-r--r--var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch104
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cairo/package.py9
-rw-r--r--var/spack/repos/builtin/packages/cantera/package.py197
-rw-r--r--var/spack/repos/builtin/packages/curl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py39
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py10
-rw-r--r--var/spack/repos/builtin/packages/emacs/package.py35
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fenics/petsc-3.7.patch394
-rw-r--r--var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch39
-rw-r--r--var/spack/repos/builtin/packages/ferret/package.py103
-rw-r--r--var/spack/repos/builtin/packages/foam-extend/package.py235
-rw-r--r--var/spack/repos/builtin/packages/freetype/package.py5
-rw-r--r--var/spack/repos/builtin/packages/giflib/package.py41
-rw-r--r--var/spack/repos/builtin/packages/glib/g_date_strftime.patch34
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py8
-rw-r--r--var/spack/repos/builtin/packages/gmsh/package.py84
-rw-r--r--var/spack/repos/builtin/packages/harfbuzz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py29
-rw-r--r--var/spack/repos/builtin/packages/julia/package.py33
-rw-r--r--var/spack/repos/builtin/packages/libaio/package.py43
-rw-r--r--var/spack/repos/builtin/packages/libtool/package.py24
-rw-r--r--var/spack/repos/builtin/packages/libxpm/package.py44
-rw-r--r--var/spack/repos/builtin/packages/lrzip/package.py61
-rw-r--r--var/spack/repos/builtin/packages/lzo/package.py49
-rw-r--r--var/spack/repos/builtin/packages/mariadb/package.py59
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py50
-rw-r--r--var/spack/repos/builtin/packages/mumps/mumps-shared.patch119
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py168
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py47
-rw-r--r--var/spack/repos/builtin/packages/mxml/package.py (renamed from var/spack/packages/mxml/package.py)15
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave-splines/package.py44
-rw-r--r--var/spack/repos/builtin/packages/octave/package.py15
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/package.py6
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py139
-rw-r--r--var/spack/repos/builtin/packages/parmgridgen/package.py71
-rw-r--r--var/spack/repos/builtin/packages/pcre/package.py11
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py50
-rw-r--r--var/spack/repos/builtin/packages/postgresql/package.py15
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py115
-rw-r--r--var/spack/repos/builtin/packages/py-3to2/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-basemap/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-pil/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-pillow/package.py119
-rw-r--r--var/spack/repos/builtin/packages/py-protobuf/package.py50
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-image/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2py3k/package.py42
-rw-r--r--var/spack/repos/builtin/packages/python/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-BiocGenerics/package.py28
-rw-r--r--var/spack/repos/builtin/packages/r-R6/package.py46
-rw-r--r--var/spack/repos/builtin/packages/r-abind/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-curl/package.py51
-rw-r--r--var/spack/repos/builtin/packages/r-dbi/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-devtools/package.py50
-rw-r--r--var/spack/repos/builtin/packages/r-digest/package.py56
-rw-r--r--var/spack/repos/builtin/packages/r-filehash/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-foreign/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-git2r/package.py46
-rw-r--r--var/spack/repos/builtin/packages/r-httr/package.py49
-rw-r--r--var/spack/repos/builtin/packages/r-jsonlite/package.py50
-rw-r--r--var/spack/repos/builtin/packages/r-magic/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-memoise/package.py44
-rw-r--r--var/spack/repos/builtin/packages/r-mime/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-openssl/package.py52
-rw-r--r--var/spack/repos/builtin/packages/r-packrat/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-rjava/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-rmysql/package.py44
-rw-r--r--var/spack/repos/builtin/packages/r-rodbc/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-rpostgresql/package.py52
-rw-r--r--var/spack/repos/builtin/packages/r-rsqlite/package.py45
-rw-r--r--var/spack/repos/builtin/packages/r-rstudioapi/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-whisker/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-withr/package.py44
-rw-r--r--var/spack/repos/builtin/packages/r-xlconnect/package.py45
-rw-r--r--var/spack/repos/builtin/packages/r-xlconnectjars/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-xlsx/package.py45
-rw-r--r--var/spack/repos/builtin/packages/r-xlsxjars/package.py44
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py12
-rw-r--r--var/spack/repos/builtin/packages/serf/package.py5
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py13
-rw-r--r--var/spack/repos/builtin/packages/sundials/package.py148
-rw-r--r--var/spack/repos/builtin/packages/superlu-dist/package.py47
-rw-r--r--var/spack/repos/builtin/packages/superlu-mt/package.py134
-rw-r--r--var/spack/repos/builtin/packages/superlu/package.py54
-rw-r--r--var/spack/repos/builtin/packages/swiftsim/package.py77
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py5
-rw-r--r--var/spack/repos/builtin/packages/unixodbc/package.py42
98 files changed, 4375 insertions, 494 deletions
diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py
index 649afa5945..ca991632dd 100644
--- a/var/spack/repos/builtin.mock/packages/multimethod/package.py
+++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py
@@ -106,17 +106,11 @@ class Multimethod(Package):
#
# Make sure we can switch methods on different target
#
-# for platform_name in ['cray_xc', 'darwin', 'linux']:
-# file_path = join_path(spack.platform_path, platform_name)
-# platform_mod = imp.load_source('spack.platforms', file_path + '.py')
-# cls = getattr(platform_mod, mod_to_class(platform_name))
-
-# platform = cls()
- platform = spack.architecture.sys_type()
+ platform = spack.architecture.platform()
targets = platform.targets.values()
if len(targets) > 1:
targets = targets[:-1]
-
+
for target in targets:
@when('target='+target.name)
def different_by_target(self):
diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py
index 0177fe1a2b..001dde5329 100644
--- a/var/spack/repos/builtin/packages/R/package.py
+++ b/var/spack/repos/builtin/packages/R/package.py
@@ -22,30 +22,25 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import functools
-import glob
-import inspect
import os
-import re
-from contextlib import closing
-import spack
-from llnl.util.lang import match_predicate
from spack import *
from spack.util.environment import *
class R(Package):
- """
- R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a
- wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series
- analysis, classification, clustering, etc. Please consult the R project homepage for further information.
- """
+ """R is 'GNU S', a freely available language and environment for
+ statistical computing and graphics which provides a wide variety of
+ statistical and graphical techniques: linear and nonlinear modelling,
+ statistical tests, time series analysis, classification, clustering, etc.
+ Please consult the R project homepage for further information."""
+
homepage = "https://www.r-project.org"
url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz"
-
+
extendable = True
+ version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3')
@@ -53,7 +48,8 @@ class R(Package):
version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4')
version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74')
- variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK')
+ variant('external-lapack', default=False,
+ description='Links to externally installed BLAS/LAPACK')
# Virtual dependencies
depends_on('blas', when='+external-lapack')
@@ -65,6 +61,7 @@ class R(Package):
depends_on('icu')
depends_on('glib')
depends_on('zlib')
+ depends_on('bzip2')
depends_on('libtiff')
depends_on('jpeg')
depends_on('cairo')
@@ -72,18 +69,21 @@ class R(Package):
depends_on('freetype')
depends_on('tcl')
depends_on('tk')
+ depends_on('curl')
+ depends_on('pcre')
+ depends_on('jdk')
def install(self, spec, prefix):
rlibdir = join_path(prefix, 'rlib')
- options = ['--prefix=%s' % prefix,
- '--libdir=%s' % rlibdir,
- '--enable-R-shlib',
- '--enable-BLAS-shlib',
- '--enable-R-framework=no']
+ configure_args = ['--prefix=%s' % prefix,
+ '--libdir=%s' % rlibdir,
+ '--enable-R-shlib',
+ '--enable-BLAS-shlib',
+ '--enable-R-framework=no']
if '+external-lapack' in spec:
- options.extend(['--with-blas', '--with-lapack'])
+ configure_args.extend(['--with-blas', '--with-lapack'])
- configure(*options)
+ configure(*configure_args)
make()
make('install')
@@ -106,25 +106,24 @@ class R(Package):
r_libs_path = ':'.join(r_libs_path)
spack_env.set('R_LIBS', r_libs_path)
- # For run time environment set only the path for extension_spec and prepend it to R_LIBS
+ # For run time environment set only the path for extension_spec and
+ # prepend it to R_LIBS
if extension_spec.package.extends(self.spec):
- run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir))
-
+ run_env.prepend_path('R_LIBS', os.path.join(
+ extension_spec.prefix, self.r_lib_dir))
def setup_dependent_package(self, module, ext_spec):
- """
- Called before R modules' install() methods.
-
- In most cases, extensions will only need to have one line::
-
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
- """
+ """Called before R modules' install() methods. In most cases,
+ extensions will only need to have one line:
+ R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' %
+ self.stage.source_path)"""
# R extension builds can have a global R executable function
module.R = Executable(join_path(self.spec.prefix.bin, 'R'))
# Add variable for library directry
module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir)
- # Make the site packages directory for extensions, if it does not exist already.
+ # Make the site packages directory for extensions, if it does not exist
+ # already.
if ext_spec.package.is_extension:
mkdirp(module.r_lib_dir)
diff --git a/var/spack/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py
index 260dcbe851..9e0452ba6f 100644
--- a/var/spack/packages/adios/package.py
+++ b/var/spack/repos/builtin/packages/adios/package.py
@@ -1,15 +1,18 @@
import os
from spack import *
+
+
class Adios(Package):
- """The Adaptable IO System (ADIOS) provides a simple,
- flexible way for scientists to describe the
- data in their code that may need to be written,
- read, or processed outside of the running simulation
"""
-
+ The Adaptable IO System (ADIOS) provides a simple,
+ flexible way for scientists to describe the
+ data in their code that may need to be written,
+ read, or processed outside of the running simulation
+ """
+
homepage = "http://www.olcf.ornl.gov/center-projects/adios/"
- url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz"
+ url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz"
version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76')
@@ -22,13 +25,13 @@ class Adios(Package):
depends_on('mxml')
def install(self, spec, prefix):
- configure_args = ["--prefix=%s" % prefix,
- "--with-mxml=%s" % spec['mxml'].prefix,
+ configure_args = ["--prefix=%s" % prefix,
+ "--with-mxml=%s" % spec['mxml'].prefix,
"--with-hdf5=%s" % spec['hdf5'].prefix,
"--with-netcdf=%s" % os.environ["NETCDF_DIR"],
"--with-infiniband=no",
- "MPICC=cc","MPICXX=CC","MPIFC=ftn",
- "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"]
+ "MPICC=cc", "MPICXX=CC", "MPIFC=ftn",
+ "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"]
if spec.satisfies('%gcc'):
configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"])
diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py
new file mode 100644
index 0000000000..b3e5994e30
--- /dev/null
+++ b/var/spack/repos/builtin/packages/armadillo/package.py
@@ -0,0 +1,67 @@
+##############################################################################
+# 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 Armadillo(Package):
+ """Armadillo is a high quality linear algebra library (matrix maths)
+ for the C++ language, aiming towards a good balance between speed and
+ ease of use."""
+
+ homepage = "http://arma.sourceforge.net/"
+ url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz"
+
+ version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e')
+
+ variant('hdf5', default=False, description='Include HDF5 support')
+
+ depends_on('arpack')
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('superlu@5.2:')
+ depends_on('hdf5', when='+hdf5')
+
+ def install(self, spec, prefix):
+ cmake_args = [
+ # ARPACK support
+ '-DARPACK_LIBRARY={0}/libarpack.a'.format(
+ spec['arpack'].prefix.lib),
+ # BLAS support
+ '-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib),
+ # LAPACK support
+ '-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib),
+ # SuperLU support
+ '-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include),
+ '-DSuperLU_LIBRARY={0}/libsuperlu.a'.format(
+ spec['superlu'].prefix.lib64),
+ # HDF5 support
+ '-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
+ ]
+
+ cmake_args.extend(std_cmake_args)
+ cmake('.', *cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py
index 75158776fe..91b5f06a4a 100644
--- a/var/spack/repos/builtin/packages/arpack/package.py
+++ b/var/spack/repos/builtin/packages/arpack/package.py
@@ -24,12 +24,12 @@
##############################################################################
from spack import *
import os
-import shutil
+
class Arpack(Package):
"""A collection of Fortran77 subroutines designed to solve large scale
- eigenvalue problems.
- """
+ eigenvalue problems."""
+
homepage = "http://www.caam.rice.edu/software/ARPACK/"
url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz"
@@ -39,27 +39,35 @@ class Arpack(Package):
depends_on('lapack')
def patch(self):
- # Filter the cray makefile to make a spack one.
- shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc')
makefile = FileFilter('ARmake.inc')
- # Be sure to use Spack F77 wrapper
- makefile.filter('^FC.*', 'FC = f77')
- makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
+ # Section 1: Paths and Libraries
+
+ # Change the build directory
+ makefile.filter('^home.*', 'home = %s' % os.getcwd())
+
+ # Use external BLAS/LAPACK
+ makefile.filter('^BLASdir.*',
+ 'BLASdir = %s' % self.spec['blas'].prefix)
+ makefile.filter('^LAPACKdir.*',
+ 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+
+ # Do not include the platform in the library name
+ makefile.filter('^PLAT.*', 'PLAT = ')
+ makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = $(home)/libarpack.a')
- # Set up some variables.
- makefile.filter('^PLAT.*', 'PLAT = ')
- makefile.filter('^home.*', 'home = %s' % os.getcwd())
- makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
- makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+ # Section 2: Compilers
- # build the library in our own prefix.
- makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd())
+ # Be sure to use the Spack compiler wrapper
+ makefile.filter('^FC.*', 'FC = {0}'.format(os.environ['F77']))
+ makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g -fPIC')
+ if not which('ranlib'):
+ makefile.filter('^RANLIB.*', 'RANLIB = touch')
def install(self, spec, prefix):
with working_dir('SRC'):
make('all')
- mkdirp(prefix.lib)
+ mkdir(prefix.lib)
install('libarpack.a', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index d920855a2f..770ceed48b 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -24,18 +24,36 @@
##############################################################################
from spack import *
+
class Autoconf(Package):
- """Autoconf -- system configuration part of autotools"""
- homepage = "https://www.gnu.org/software/autoconf/"
- url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz"
+ """
+ Autoconf -- system configuration part of autotools
+ """
+ homepage = 'https://www.gnu.org/software/autoconf/'
+ url = 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz'
version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b')
version('2.62', '6c1f3b3734999035d77da5024aab4fbd')
- depends_on("m4")
+ depends_on('m4')
+
+ def _make_executable(self, name):
+ return Executable(join_path(self.prefix.bin, name))
+
+ def setup_dependent_package(self, module, dependent_spec):
+ # Autoconf is very likely to be a build dependency,
+ # so we add the tools it provides to the dependent module
+ executables = ['autoconf',
+ 'autoheader',
+ 'autom4te',
+ 'autoreconf',
+ 'autoscan',
+ 'autoupdate',
+ 'ifnames']
+ for name in executables:
+ setattr(module, name, self._make_executable(name))
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
-
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py
index 331b364496..78b0a5b34f 100644
--- a/var/spack/repos/builtin/packages/automake/package.py
+++ b/var/spack/repos/builtin/packages/automake/package.py
@@ -24,10 +24,13 @@
##############################################################################
from spack import *
+
class Automake(Package):
- """Automake -- make file builder part of autotools"""
- homepage = "http://www.gnu.org/software/automake/"
- url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz"
+ """
+ Automake -- make file builder part of autotools
+ """
+ homepage = 'http://www.gnu.org/software/automake/'
+ url = 'http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz'
version('1.15', '716946a105ca228ab545fc37a70df3a3')
version('1.14.1', 'd052a3e884631b9c7892f2efce542d75')
@@ -35,8 +38,17 @@ class Automake(Package):
depends_on('autoconf')
+ def _make_executable(self, name):
+ return Executable(join_path(self.prefix.bin, name))
+
+ def setup_dependent_package(self, module, dependent_spec):
+ # Automake is very likely to be a build dependency,
+ # so we add the tools it provides to the dependent module
+ executables = ['aclocal', 'automake']
+ for name in executables:
+ setattr(module, name, self._make_executable(name))
+
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
-
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index 5f305abb02..35d52128c3 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -24,11 +24,12 @@
##############################################################################
from spack import *
+
class Binutils(Package):
"""GNU binutils, which contain the linker, assembler, objdump and others"""
- homepage = "http://www.gnu.org/software/binutils/"
- url="https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
+ homepage = "http://www.gnu.org/software/binutils/"
+ url = "https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
# 2.26 is incompatible with py-pillow build for some reason.
version('2.26', '64146a0faa3b411ba774f47d41de239f')
@@ -41,12 +42,15 @@ class Binutils(Package):
depends_on('flex')
depends_on('bison')
- # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell
- variant('krellpatch', default=False, description="build with openspeedshop based patch.")
+ # Add a patch that creates binutils libiberty_pic.a which is preferred by
+ # OpenSpeedShop and cbtf-krell
+ variant('krellpatch', default=False,
+ description="build with openspeedshop based patch.")
variant('gold', default=True, description="build the gold linker")
patch('binutilskrell-2.24.patch', when='@2.24+krellpatch')
patch('cr16.patch')
+ patch('update_symbol-2.26.patch', when='@2.26')
variant('libiberty', default=False, description='Also install libiberty.')
diff --git a/var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch b/var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch
new file mode 100644
index 0000000000..2601f63a6b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch
@@ -0,0 +1,104 @@
+From 544ddf9322b1b83982e5cb84a54d084ee7e718ea Mon Sep 17 00:00:00 2001
+From: H.J. Lu <hjl.tools@gmail.com>
+Date: Wed, 24 Feb 2016 15:13:35 -0800
+Subject: [PATCH] Update symbol version for symbol from linker script
+
+We need to update symbol version for symbols from linker script.
+
+Backport from master
+
+bfd/
+
+ PR ld/19698
+ * elflink.c (bfd_elf_record_link_assignment): Set versioned if
+ symbol version is unknown.
+
+ld/
+
+ PR ld/19698
+ * testsuite/ld-elf/pr19698.d: New file.
+ * testsuite/ld-elf/pr19698.s: Likewise.
+ * testsuite/ld-elf/pr19698.t: Likewise.
+---
+ bfd/ChangeLog | 9 +++++++++
+ bfd/elflink.c | 13 +++++++++++++
+ ld/ChangeLog | 10 ++++++++++
+ ld/testsuite/ld-elf/pr19698.d | 10 ++++++++++
+ ld/testsuite/ld-elf/pr19698.s | 5 +++++
+ ld/testsuite/ld-elf/pr19698.t | 11 +++++++++++
+ 6 files changed, 58 insertions(+), 0 deletions(-)
+ create mode 100644 ld/testsuite/ld-elf/pr19698.d
+ create mode 100644 ld/testsuite/ld-elf/pr19698.s
+ create mode 100644 ld/testsuite/ld-elf/pr19698.t
+
+diff --git a/bfd/elflink.c b/bfd/elflink.c
+index ae8d148..8fcaadd 100644
+--- a/bfd/elflink.c
++++ b/bfd/elflink.c
+@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
+ if (h == NULL)
+ return provide;
+
++ if (h->versioned == unknown)
++ {
++ /* Set versioned if symbol version is unknown. */
++ char *version = strrchr (name, ELF_VER_CHR);
++ if (version)
++ {
++ if (version > name && version[-1] != ELF_VER_CHR)
++ h->versioned = versioned_hidden;
++ else
++ h->versioned = versioned;
++ }
++ }
++
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d
+new file mode 100644
+index 0000000..a39f67a
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr19698.d
+@@ -0,0 +1,10 @@
++#ld: -shared $srcdir/$subdir/pr19698.t
++#readelf : --dyn-syms --wide
++#target: *-*-linux* *-*-gnu* *-*-solaris*
++
++Symbol table '\.dynsym' contains [0-9]+ entries:
++#...
++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1
++#...
++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2
++#pass
+diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s
+new file mode 100644
+index 0000000..875dca4
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr19698.s
+@@ -0,0 +1,5 @@
++ .text
++ .globl foo
++ .type foo, %function
++foo:
++ .byte 0
+diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t
+new file mode 100644
+index 0000000..09d9125
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr19698.t
+@@ -0,0 +1,11 @@
++"foo@VERS.1" = foo;
++
++VERSION {
++VERS.2 {
++ global:
++ foo;
++};
++
++VERS.1 {
++};
++}
+--
+1.7.1
+
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index cde76c590a..67294fb9a1 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -25,7 +25,6 @@
from spack import *
import spack
import sys
-
import os
@@ -91,6 +90,7 @@ class Boost(Package):
'system',
'test',
'thread',
+ 'timer',
'wave'])
# mpi/python are not installed by default because they pull in many
diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py
index 5c7c2fae22..ddb8d2fd03 100644
--- a/var/spack/repos/builtin/packages/cairo/package.py
+++ b/var/spack/repos/builtin/packages/cairo/package.py
@@ -24,8 +24,10 @@
##############################################################################
from spack import *
+
class Cairo(Package):
- """Cairo is a 2D graphics library with support for multiple output devices."""
+ """Cairo is a 2D graphics library with support for multiple output
+ devices."""
homepage = "http://cairographics.org"
url = "http://cairographics.org/releases/cairo-1.14.0.tar.xz"
@@ -34,11 +36,12 @@ class Cairo(Package):
depends_on("libpng")
depends_on("glib")
depends_on("pixman")
- depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig.
+ depends_on("freetype")
+ depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig.
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
- "--disable-trace", # can cause problems with libiberty
+ "--disable-trace", # can cause problems with libiberty
"--enable-tee")
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py
new file mode 100644
index 0000000000..e9e5da4486
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cantera/package.py
@@ -0,0 +1,197 @@
+##############################################################################
+# 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 *
+import os
+
+
+class Cantera(Package):
+ """Cantera is a suite of object-oriented software tools for problems
+ involving chemical kinetics, thermodynamics, and/or transport processes."""
+
+ homepage = "http://www.cantera.org/docs/sphinx/html/index.html"
+ url = "https://github.com/Cantera/cantera/archive/v2.2.1.tar.gz"
+
+ version('2.2.1', '9d1919bdef39ddec54485fc8a741a3aa')
+
+ variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries')
+ variant('threadsafe', default=True, description='Build threadsafe, requires Boost')
+ variant('sundials', default=True, description='Build with external Sundials')
+ variant('python', default=False, description='Build the Cantera Python module')
+ variant('matlab', default=False, description='Build the Cantera Matlab toolbox')
+
+ # Required dependencies
+ depends_on('scons')
+
+ # Recommended dependencies
+ depends_on('blas', when='+lapack')
+ depends_on('lapack', when='+lapack')
+ depends_on('boost', when='+threadsafe')
+ depends_on('sundials', when='+sundials') # must be compiled with -fPIC
+
+ # Python module dependencies
+ extends('python', when='+python')
+ depends_on('py-numpy', when='+python')
+ depends_on('py-scipy', when='+python')
+ depends_on('py-cython', when='+python')
+ depends_on('py-3to2', when='+python')
+ # TODO: these "when" specs don't actually work
+ # depends_on('py-unittest2', when='+python^python@2.6')
+ # depends_on('py-unittest2py3k', when='+python^python@3.1')
+
+ # Matlab toolbox dependencies
+ # TODO: add Matlab package
+ # TODO: allow packages to extend multiple other packages
+ # extends('matlab', when='+matlab')
+
+ def install(self, spec, prefix):
+ # Required options
+ options = [
+ 'prefix={0}'.format(prefix),
+ 'CC={0}'.format(os.environ['CC']),
+ 'CXX={0}'.format(os.environ['CXX']),
+ 'F77={0}'.format(os.environ['F77']),
+ 'FORTRAN={0}'.format(os.environ['FC']),
+ 'cc_flags=-fPIC',
+ # Allow Spack environment variables to propagate through to SCons
+ 'env_vars=all'
+ ]
+
+ # BLAS/LAPACK support
+ if '+lapack' in spec:
+ options.extend([
+ 'blas_lapack_libs=lapack,blas',
+ 'blas_lapack_dir={0}'.format(spec['lapack'].prefix.lib)
+ ])
+
+ # Threadsafe build, requires Boost
+ if '+threadsafe' in spec:
+ options.extend([
+ 'build_thread_safe=yes',
+ 'boost_inc_dir={0}'.format(spec['boost'].prefix.include),
+ 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib),
+ 'boost_thread_lib=boost_thread-mt,boost_system-mt'
+ ])
+ else:
+ options.append('build_thread_safe=no')
+
+ # Sundials support
+ if '+sundials' in spec:
+ options.extend([
+ 'use_sundials=y',
+ 'sundials_include={0}'.format(spec['sundials'].prefix.include),
+ 'sundials_libdir={0}'.format(spec['sundials'].prefix.lib),
+ 'sundials_license={0}'.format(
+ join_path(spec['sundials'].prefix, 'LICENSE'))
+ ])
+ else:
+ options.append('use_sundials=n')
+
+ # Python module
+ if '+python' in spec:
+ options.extend([
+ 'python_package=full',
+ 'python_cmd={0}'.format(
+ join_path(spec['python'].prefix.bin, 'python')),
+ 'python_array_home={0}'.format(spec['py-numpy'].prefix)
+ ])
+ if spec['python'].satisfies('@3'):
+ options.extend([
+ 'python3_package=y',
+ 'python3_cmd={0}'.format(
+ join_path(spec['python'].prefix.bin, 'python')),
+ 'python3_array_home={0}'.format(spec['py-numpy'].prefix)
+ ])
+ else:
+ options.append('python3_package=n')
+ else:
+ options.append('python_package=none')
+ options.append('python3_package=n')
+
+ # Matlab toolbox
+ if '+matlab' in spec:
+ options.extend([
+ 'matlab_toolbox=y',
+ 'matlab_path={0}'.format(spec['matlab'].prefix)
+ ])
+ else:
+ options.append('matlab_toolbox=n')
+
+ scons('build', *options)
+
+ if '+python' in spec:
+ # Tests will always fail if Python dependencies aren't built
+ # In addition, 3 of the tests fail when run in parallel
+ scons('test', parallel=False)
+
+ scons('install')
+
+ self.filter_compilers()
+
+ def filter_compilers(self):
+ """Run after install to tell the Makefile and SConstruct files to use
+ the compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC, CXX, F77, and FC set to Spack's
+ generic cc, c++, f77, and f90. We want them to be bound to whatever
+ compiler they were built with."""
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+ dirname = os.path.join(self.prefix, 'share/cantera/samples')
+
+ cc_files = [
+ 'cxx/rankine/Makefile', 'cxx/NASA_coeffs/Makefile',
+ 'cxx/kinetics1/Makefile', 'cxx/flamespeed/Makefile',
+ 'cxx/combustor/Makefile', 'f77/SConstruct'
+ ]
+
+ cxx_files = [
+ 'cxx/rankine/Makefile', 'cxx/NASA_coeffs/Makefile',
+ 'cxx/kinetics1/Makefile', 'cxx/flamespeed/Makefile',
+ 'cxx/combustor/Makefile'
+ ]
+
+ f77_files = [
+ 'f77/Makefile', 'f77/SConstruct'
+ ]
+
+ fc_files = [
+ 'f90/Makefile', 'f90/SConstruct'
+ ]
+
+ for filename in cc_files:
+ filter_file(os.environ['CC'], self.compiler.cc,
+ os.path.join(dirname, filename), **kwargs)
+
+ for filename in cxx_files:
+ filter_file(os.environ['CXX'], self.compiler.cxx,
+ os.path.join(dirname, filename), **kwargs)
+
+ for filename in f77_files:
+ filter_file(os.environ['F77'], self.compiler.f77,
+ os.path.join(dirname, filename), **kwargs)
+
+ for filename in fc_files:
+ filter_file(os.environ['FC'], self.compiler.fc,
+ os.path.join(dirname, filename), **kwargs)
diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py
index e3de6ee5a1..79570205fa 100644
--- a/var/spack/repos/builtin/packages/curl/package.py
+++ b/var/spack/repos/builtin/packages/curl/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class Curl(Package):
"""cURL is an open source command line tool and library for
transferring data with URL syntax"""
@@ -31,6 +32,7 @@ class Curl(Package):
homepage = "http://curl.haxx.se"
url = "http://curl.haxx.se/download/curl-7.46.0.tar.bz2"
+ version('7.49.1', '6bb1f7af5b58b30e4e6414b8c1abccab')
version('7.47.1', '9ea3123449439bbd960cd25cf98796fb')
version('7.46.0', '9979f989a2a9930d10f1b3deeabc2148')
version('7.45.0', '62c1a352b28558f25ba6209214beadc8')
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 54b6426d36..068dbec10a 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -80,8 +80,8 @@ class Dealii(Package):
depends_on("netcdf-cxx", when='+netcdf+mpi')
depends_on("oce", when='+oce')
depends_on("p4est", when='+p4est+mpi')
- depends_on("petsc+mpi", when='+petsc+mpi')
- depends_on("slepc", when='+slepc+petsc+mpi')
+ depends_on("petsc@:3.6.4+mpi", when='+petsc+mpi') # FIXME: update after 3.7 is supported upstream. # NOQA: ignore=E501
+ depends_on("slepc@:3.6.3", when='+slepc+petsc+mpi')
depends_on("trilinos", when='+trilinos+mpi')
# developer dependnecies
@@ -108,12 +108,11 @@ class Dealii(Package):
# of Spack's. Be more specific to avoid this.
# Note that both lapack and blas are provided in -DLAPACK_XYZ.
'-DLAPACK_FOUND=true',
- '-DLAPACK_INCLUDE_DIRS=%s;%s' %
- (spec['lapack'].prefix.include,
- spec['blas'].prefix.include),
- '-DLAPACK_LIBRARIES=%s;%s' %
- (spec['lapack'].lapack_shared_lib,
- spec['blas'].blas_shared_lib),
+ '-DLAPACK_INCLUDE_DIRS=%s;%s' % (
+ spec['lapack'].prefix.include, spec['blas'].prefix.include),
+ '-DLAPACK_LIBRARIES=%s;%s' % (
+ spec['lapack'].lapack_shared_lib,
+ spec['blas'].blas_shared_lib),
'-DMUPARSER_DIR=%s' % spec['muparser'].prefix,
'-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix,
'-DTBB_DIR=%s' % spec['tbb'].prefix,
@@ -168,14 +167,14 @@ class Dealii(Package):
if '+netcdf' in spec:
options.extend([
'-DNETCDF_FOUND=true',
- '-DNETCDF_LIBRARIES=%s;%s' %
- (join_path(spec['netcdf-cxx'].prefix.lib,
- 'libnetcdf_c++.%s' % dsuf),
- join_path(spec['netcdf'].prefix.lib,
- 'libnetcdf.%s' % dsuf)),
- '-DNETCDF_INCLUDE_DIRS=%s;%s' %
- (spec['netcdf-cxx'].prefix.include,
- spec['netcdf'].prefix.include),
+ '-DNETCDF_LIBRARIES=%s;%s' % (
+ join_path(spec['netcdf-cxx'].prefix.lib,
+ 'libnetcdf_c++.%s' % dsuf),
+ join_path(spec['netcdf'].prefix.lib,
+ 'libnetcdf.%s' % dsuf)),
+ '-DNETCDF_INCLUDE_DIRS=%s;%s' % (
+ spec['netcdf-cxx'].prefix.include,
+ spec['netcdf'].prefix.include),
])
else:
options.extend([
@@ -246,7 +245,7 @@ class Dealii(Package):
# change Linear Algebra to Trilinos
# The below filter_file should be different for versions
# before and after 8.4.0
- if spec.satisfies('@8.4.0:'):
+ if spec.satisfies('@8.4.0:') or spec.satisfies('@dev'):
filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
else:
@@ -258,7 +257,7 @@ class Dealii(Package):
# the rest of the tests on step 40 only works for
# dealii version 8.4.0 and after
- if spec.satisfies('@8.4.0:'):
+ if spec.satisfies('@8.4.0:') or spec.satisfies('@dev'):
print('=====================================')
print('=== Step-40 Trilinos SuperluDist ====')
print('=====================================')
@@ -266,9 +265,9 @@ class Dealii(Package):
filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
(''), 'step-40.cc')
- filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
+ filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', # NOQA: ignore=E501
(''), 'step-40.cc')
- filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
+ filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', # NOQA: ignore=E501
(''), 'step-40.cc')
filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index e20fcffdd7..9ff4107619 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -28,7 +28,9 @@ from spack import *
class Eigen(Package):
"""
- Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms
+ Eigen is a C++ template library for linear algebra
+
+ Matrices, vectors, numerical solvers, and related algorithms
"""
homepage = 'http://eigen.tuxfamily.org/'
@@ -42,16 +44,16 @@ class Eigen(Package):
variant('scotch', default=True, description='Enables scotch backend')
variant('fftw', default=True, description='Enables FFTW backend')
variant('suitesparse', default=True, description='Enables SuiteSparse support')
+ variant('mpfr', default=True, description='Enables support for multi-precisions floating points via mpfr')
# TODO : dependency on googlehash, superlu, adolc missing
-
depends_on('cmake')
depends_on('metis@5:', when='+metis')
depends_on('scotch', when='+scotch')
depends_on('fftw', when='+fftw')
depends_on('suite-sparse', when='+suitesparse')
- depends_on('mpfr@2.3.0:') # Eigen 3.2.7 requires at least 2.3.0
- depends_on('gmp')
+ depends_on('mpfr@2.3.0:', when="+mpfr")
+ depends_on('gmp', when="+mpfr")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py
index 4b05864a1e..a9ebd6d42f 100644
--- a/var/spack/repos/builtin/packages/emacs/package.py
+++ b/var/spack/repos/builtin/packages/emacs/package.py
@@ -23,23 +23,44 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import llnl.util.tty as tty
+
class Emacs(Package):
"""The Emacs programmable text editor."""
+
homepage = "https://www.gnu.org/software/emacs"
url = "http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.gz"
version('24.5', 'd74b597503a68105e61b5b9f6d065b44')
+ variant('X', default=True, description="Enable a X toolkit (GTK+)")
+ variant('gtkplus', default=False, description="Enable a GTK+ as X toolkit (this variant is ignored if ~X)")
+
depends_on('ncurses')
- # Emacs also depends on:
- # GTK or other widget library
- # libtiff, png, etc.
- # For now, we assume the system provides all that stuff.
- # For Ubuntu 14.04 LTS:
- # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev
+ depends_on('libtiff', when='+X')
+ depends_on('libpng', when='+X')
+ depends_on('libxpm', when='+X')
+ depends_on('giflib', when='+X')
+ depends_on('gtkplus', when='+X+gtkplus')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ args = []
+ if '+X' in spec:
+ if '+gtkplus' in spec:
+ toolkit = 'gtk{0}'.format(spec['gtkplus'].version.up_to(1))
+ else:
+ toolkit = 'no'
+ args = [
+ '--with-x',
+ '--with-x-toolkit={0}'.format(toolkit)
+ ]
+ else:
+ args = ['--without-x']
+ if '+gtkplus' in spec:
+ tty.warn('The variant +gtkplus is ignored if ~X is selected.')
+
+ configure('--prefix={0}'.format(prefix), *args)
+
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
index 0845237656..465ab651be 100644
--- a/var/spack/repos/builtin/packages/fenics/package.py
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -57,6 +57,9 @@ class Fenics(Package):
# variant('slepc4py', default=True, description='Uses SLEPc4py')
# variant('pastix', default=True, description='Compile with Pastix')
+ patch('petsc-3.7.patch', when='^petsc@3.7:')
+ patch('petsc-version-detection.patch', when='@:1.6.1')
+
extends('python')
depends_on('py-numpy')
diff --git a/var/spack/repos/builtin/packages/fenics/petsc-3.7.patch b/var/spack/repos/builtin/packages/fenics/petsc-3.7.patch
new file mode 100644
index 0000000000..c1ba5c4da6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fenics/petsc-3.7.patch
@@ -0,0 +1,394 @@
+diff -Naur dolfin-1.6.0/dolfin/common/SubSystemsManager.cpp dolfin-1.6.0.new/dolfin/common/SubSystemsManager.cpp
+--- dolfin-1.6.0/dolfin/common/SubSystemsManager.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/common/SubSystemsManager.cpp 2016-06-26 23:42:56.391929550 +0200
+@@ -179,7 +179,7 @@
+ PetscInitialized(&is_initialized);
+ if (is_initialized)
+ {
+- PetscOptionsInsert(&argc, &argv, PETSC_NULL);
++ PetscOptionsInsert(NULL, &argc, &argv, PETSC_NULL);
+ }
+ else
+ {
+@@ -187,12 +187,12 @@
+ PetscInitializeNoArguments();
+
+ // Set options to avoid common failures with some 3rd party solvers
+- PetscOptionsSetValue("-mat_mumps_icntl_7", "0");
+- PetscOptionsSetValue("-mat_superlu_dist_colperm", "MMD_AT_PLUS_A");
++ PetscOptionsSetValue(NULL, "-mat_mumps_icntl_7", "0");
++ PetscOptionsSetValue(NULL, "-mat_superlu_dist_colperm", "MMD_AT_PLUS_A");
+
+ // Pass command line arguments to PETSc (will overwrite any
+ // default above)
+- PetscOptionsInsert(&argc, &argv, PETSC_NULL);
++ PetscOptionsInsert(NULL, &argc, &argv, PETSC_NULL);
+ }
+
+ // Set PETSc
+diff -Naur dolfin-1.6.0/dolfin/la/PETScKrylovSolver.cpp dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.cpp
+--- dolfin-1.6.0/dolfin/la/PETScKrylovSolver.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.cpp 2016-06-26 23:33:02.418351380 +0200
+@@ -564,6 +564,11 @@
+ return solve(x, b);
+ }
+ //-----------------------------------------------------------------------------
++PetscErrorCode PETScKrylovSolver::ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *vf)
++{
++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, static_cast<PetscViewerAndFormat *>(vf));
++}
++//-----------------------------------------------------------------------------
+ void PETScKrylovSolver::set_petsc_ksp_options()
+ {
+ PetscErrorCode ierr;
+@@ -585,7 +590,8 @@
+ const bool monitor_convergence = parameters["monitor_convergence"];
+ if (monitor_convergence)
+ {
+- ierr = KSPMonitorSet(_ksp, KSPMonitorTrueResidualNorm, 0, 0);
++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &_vf);
++ ierr = KSPMonitorSet(_ksp, ksp_monitor_norm, _vf, 0);
+ if (ierr != 0) petsc_error(ierr, __FILE__, "KSPMonitorSet");
+ }
+
+diff -Naur dolfin-1.6.0/dolfin/la/PETScKrylovSolver.h dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.h
+--- dolfin-1.6.0/dolfin/la/PETScKrylovSolver.h 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.h 2016-06-26 23:19:40.767042975 +0200
+@@ -179,6 +179,12 @@
+ // PETSc solver pointer
+ KSP _ksp;
+
++ // viewer for monitoring
++ PetscViewerAndFormat* _vf;
++
++ // monitoring function
++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx);
++
+ // DOLFIN-defined PETScUserPreconditioner
+ PETScUserPreconditioner* pc_dolfin;
+
+diff -Naur dolfin-1.6.0/dolfin/la/PETScLUSolver.cpp dolfin-1.6.0.new/dolfin/la/PETScLUSolver.cpp
+--- dolfin-1.6.0/dolfin/la/PETScLUSolver.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/PETScLUSolver.cpp 2016-06-26 23:13:36.903732301 +0200
+@@ -246,14 +246,14 @@
+ if (parameters["num_threads"].is_set())
+ {
+ // Use number of threads specified for LU solver
+- ierr = PetscOptionsSetValue("-mat_pastix_threadnbr",
++ ierr = PetscOptionsSetValue(NULL, "-mat_pastix_threadnbr",
+ parameters["num_threads"].value_str().c_str());
+ if (ierr != 0) petsc_error(ierr, __FILE__, "PetscOptionsSetValue");
+ }
+ else
+ {
+ // Use global number of threads
+- ierr = PetscOptionsSetValue("-mat_pastix_threadnbr",
++ ierr = PetscOptionsSetValue(NULL, "-mat_pastix_threadnbr",
+ dolfin::parameters["num_threads"].value_str().c_str());
+ if (ierr != 0) petsc_error(ierr, __FILE__, "PetscOptionsSetValue");
+ }
+diff -Naur dolfin-1.6.0/dolfin/la/PETScOptions.cpp dolfin-1.6.0.new/dolfin/la/PETScOptions.cpp
+--- dolfin-1.6.0/dolfin/la/PETScOptions.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/PETScOptions.cpp 2016-06-26 23:37:58.613121118 +0200
+@@ -54,7 +54,7 @@
+ {
+ SubSystemsManager::init_petsc();
+ PetscErrorCode ierr;
+- ierr = PetscOptionsClearValue(option.c_str());
++ ierr = PetscOptionsClearValue(NULL, option.c_str());
+ if (ierr != 0)
+ {
+ dolfin_error("PETScOptions.cpp",
+diff -Naur dolfin-1.6.0/dolfin/la/PETScOptions.h dolfin-1.6.0.new/dolfin/la/PETScOptions.h
+--- dolfin-1.6.0/dolfin/la/PETScOptions.h 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/PETScOptions.h 2016-06-26 23:37:54.352023709 +0200
+@@ -65,7 +65,7 @@
+
+ PetscErrorCode ierr;
+ std::string _option = "-" + option;
+- ierr = PetscOptionsSetValue(_option.c_str(),
++ ierr = PetscOptionsSetValue(NULL, _option.c_str(),
+ boost::lexical_cast<std::string>(value).c_str());
+ if (ierr != 0)
+ {
+diff -Naur dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.cpp dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.cpp
+--- dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.cpp 2016-06-26 23:35:25.930631132 +0200
+@@ -99,6 +99,19 @@
+ solve(_matA->size(0));
+ }
+ //-----------------------------------------------------------------------------
++PetscErrorCode SLEPcEigenSolver::eps_monitor(EPS eps, PetscInt its, PetscInt nconv, PetscScalar* eigr,
++ PetscScalar* eigi, PetscReal* errest,
++ PetscInt nest, void *vf)
++{
++ EPSMonitorAll(eps, its, nconv, eigr, eigi, errest, nest,
++ static_cast<PetscViewerAndFormat *>(vf));
++}
++//-----------------------------------------------------------------------------
++PetscErrorCode SLEPcEigenSolver::ksp_monitor(KSP ksp, PetscInt n, PetscReal rnorm, void *vf)
++{
++ KSPMonitorDefault(ksp, n, rnorm, static_cast<PetscViewerAndFormat *>(vf));
++}
++//-----------------------------------------------------------------------------
+ void SLEPcEigenSolver::solve(std::size_t n)
+ {
+ dolfin_assert(_matA);
+@@ -139,10 +152,11 @@
+ {
+ KSP ksp;
+ ST st;
+- EPSMonitorSet(_eps, EPSMonitorAll, NULL, NULL);
++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &_vf);
++ EPSMonitorSet(_eps, eps_monitor, _vf, NULL);
+ EPSGetST(_eps, &st);
+ STGetKSP(st, &ksp);
+- KSPMonitorSet(ksp, KSPMonitorDefault, NULL, NULL);
++ KSPMonitorSet(ksp, ksp_monitor, _vf, NULL);
+ EPSView(_eps, PETSC_VIEWER_STDOUT_SELF);
+ }
+
+diff -Naur dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.h dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.h
+--- dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.h 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.h 2016-06-26 23:36:08.784610612 +0200
+@@ -231,6 +231,11 @@
+ // SLEPc solver pointer
+ EPS _eps;
+
++ PetscViewerAndFormat* _vf;
++ static PetscErrorCode eps_monitor(EPS eps, int its, int nconv, PetscScalar *eigr,
++ PetscScalar *eigi, PetscReal* errest,
++ int nest, void *mctx);
++ static PetscErrorCode ksp_monitor(KSP ksp, PetscInt n, PetscReal rnorm, void *vf);
+ };
+
+ }
+diff -Naur dolfin-1.6.0/dolfin/nls/PETScSNESSolver.cpp dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.cpp
+--- dolfin-1.6.0/dolfin/nls/PETScSNESSolver.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.cpp 2016-06-26 23:19:40.166029256 +0200
+@@ -195,6 +195,15 @@
+ return this->solve(nonlinear_problem, x);
+ }
+ //-----------------------------------------------------------------------------
++PetscErrorCode
++PETScSNESSolver::snes_monitor(SNES snes, PetscInt its,
++ PetscReal fgnorm, void *vf)
++{
++ PetscViewerAndFormat * _vf = static_cast<PetscViewerAndFormat *>(vf);
++ SNESMonitorDefault(snes, its, fgnorm, _vf);
++ return(0);
++}
++//-----------------------------------------------------------------------------
+ void
+ PETScSNESSolver::init(NonlinearProblem& nonlinear_problem,
+ GenericVector& x)
+@@ -237,9 +246,11 @@
+ }
+
+ // Set some options from the parameters
+- if (report)
+- SNESMonitorSet(_snes, SNESMonitorDefault, PETSC_NULL, PETSC_NULL);
+-
++ if (report) {
++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &_snes_ctx.vf);
++ SNESMonitorSet(_snes, PETScSNESSolver::snes_monitor, _snes_ctx.vf, PETSC_NULL);
++ }
++
+ // Set the bounds, if any
+ set_bounds(x);
+
+@@ -293,8 +304,8 @@
+ SNESGetLineSearch(_snes, &linesearch);
+ #endif
+
+- if (report)
+- SNESLineSearchSetMonitor(linesearch, PETSC_TRUE);
++ // if (report)
++ // SNESLineSearchSetMonitor(linesearch, PETSC_TRUE);
+ const std::string line_search_type = std::string(parameters["line_search"]);
+ SNESLineSearchSetType(linesearch, line_search_type.c_str());
+
+@@ -466,6 +477,24 @@
+ }
+ #endif
+ //-----------------------------------------------------------------------------
++PetscErrorCode
++PETScSNESSolver::ksp_monitor(KSP ksp, PetscInt n,
++ PetscReal rnorm, void *vf)
++{
++ PetscViewerAndFormat * _vf = static_cast<PetscViewerAndFormat *>(vf);
++ KSPMonitorDefault(ksp, n, rnorm, _vf);
++ return(0);
++}
++//-----------------------------------------------------------------------------
++PetscErrorCode
++PETScSNESSolver::ksp_monitor_norm(KSP ksp, PetscInt n,
++ PetscReal rnorm, void *vf)
++{
++ PetscViewerAndFormat * _vf = static_cast<PetscViewerAndFormat *>(vf);
++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, _vf);
++ return(0);
++}
++//-----------------------------------------------------------------------------
+ void PETScSNESSolver::set_linear_solver_parameters()
+ {
+ KSP ksp;
+@@ -482,7 +511,7 @@
+ PetscObjectGetComm((PetscObject)_snes, &comm);
+
+ if (parameters["report"])
+- KSPMonitorSet(ksp, KSPMonitorDefault, PETSC_NULL, PETSC_NULL);
++ KSPMonitorSet(ksp, PETScSNESSolver::ksp_monitor, _snes_ctx.vf, PETSC_NULL);
+
+ const std::string linear_solver = parameters["linear_solver"];
+ const std::string preconditioner = parameters["preconditioner"];
+@@ -518,7 +547,7 @@
+ KSPSetInitialGuessNonzero(ksp, PETSC_FALSE);
+
+ if (krylov_parameters["monitor_convergence"])
+- KSPMonitorSet(ksp, KSPMonitorTrueResidualNorm, 0, 0);
++ KSPMonitorSet(ksp, PETScSNESSolver::ksp_monitor_norm, _snes_ctx.vf, 0);
+
+ // Set tolerances
+ const int max_iters = krylov_parameters["maximum_iterations"];
+diff -Naur dolfin-1.6.0/dolfin/nls/PETScSNESSolver.h dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.h
+--- dolfin-1.6.0/dolfin/nls/PETScSNESSolver.h 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.h 2016-06-26 22:31:21.554129282 +0200
+@@ -24,6 +24,7 @@
+
+ #include <map>
+ #include <petscsnes.h>
++#include <petscviewer.h>
+ #include <memory>
+ #include <dolfin/nls/NewtonSolver.h>
+ #include <dolfin/parameter/Parameters.h>
+@@ -124,8 +125,15 @@
+ Vec f_tmp;
+ const PETScVector* xl;
+ const PETScVector* xu;
++ PetscViewerAndFormat* vf;
+ };
+
++
++ // monitoring functions
++ static PetscErrorCode snes_monitor(SNES snes, PetscInt its, PetscReal fgnorm, void* ctx);
++ static PetscErrorCode ksp_monitor(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx);
++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx);
++
+ // PETSc solver pointer
+ SNES _snes;
+
+diff -Naur dolfin-1.6.0/dolfin/nls/PETScTAOSolver.cpp dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.cpp
+--- dolfin-1.6.0/dolfin/nls/PETScTAOSolver.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.cpp 2016-06-27 19:14:47.367885081 +0200
+@@ -186,6 +186,15 @@
+ init(optimisation_problem, x.down_cast<PETScVector>(), lb, ub);
+ }
+ //-----------------------------------------------------------------------------
++PetscErrorCode
++PETScTAOSolver::ksp_monitor_norm(KSP ksp, PetscInt n,
++ PetscReal rnorm, void * vf)
++{
++ PetscViewerAndFormat * _vf = static_cast<PetscViewerAndFormat *>(vf);
++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, _vf);
++ return(0);
++}
++//-----------------------------------------------------------------------------
+ void PETScTAOSolver::init(OptimisationProblem& optimisation_problem,
+ PETScVector& x,
+ const PETScVector& lb,
+@@ -365,9 +374,7 @@
+ set_tao(parameters["method"]);
+
+ // Set tolerances
+- TaoSetTolerances(_tao, parameters["function_absolute_tol"],
+- parameters["function_relative_tol"],
+- parameters["gradient_absolute_tol"],
++ TaoSetTolerances(_tao, parameters["gradient_absolute_tol"],
+ parameters["gradient_relative_tol"],
+ parameters["gradient_t_tol"]);
+
+@@ -490,8 +497,10 @@
+ KSPSetInitialGuessNonzero(ksp, PETSC_FALSE);
+
+ // KSP monitor
+- if (krylov_parameters["monitor_convergence"])
+- KSPMonitorSet(ksp, KSPMonitorTrueResidualNorm, 0, 0);
++ if (krylov_parameters["monitor_convergence"]) {
++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf);
++ KSPMonitorSet(ksp, ksp_monitor_norm, vf, 0);
++ }
+
+ // Get integer tolerances (to take care of casting to PetscInt)
+ const int max_iter = krylov_parameters["maximum_iterations"];
+diff -Naur dolfin-1.6.0/dolfin/nls/PETScTAOSolver.h dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.h
+--- dolfin-1.6.0/dolfin/nls/PETScTAOSolver.h 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.h 2016-06-27 19:08:00.634361160 +0200
+@@ -146,6 +146,10 @@
+ // TAO pointer
+ Tao _tao;
+
++ // monitoring functions
++ PetscViewerAndFormat* vf;
++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx);
++
+ // Update parameters when tao/ksp/pc_types are explictly given
+ void update_parameters(const std::string tao_type,
+ const std::string ksp_type,
+diff -Naur dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.cpp dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.cpp
+--- dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.cpp 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.cpp 2016-06-27 19:17:10.390216576 +0200
+@@ -313,9 +313,7 @@
+ dolfin_assert(_tao);
+
+ // Set tolerances
+- TaoSetTolerances(_tao, parameters["function_absolute_tol"],
+- parameters["function_relative_tol"],
+- parameters["gradient_absolute_tol"],
++ TaoSetTolerances(_tao, parameters["gradient_absolute_tol"],
+ parameters["gradient_relative_tol"],
+ parameters["gradient_t_tol"]);
+
+@@ -340,6 +338,15 @@
+ set_solver(method);
+ }
+ //-----------------------------------------------------------------------------
++PetscErrorCode
++TAOLinearBoundSolver::ksp_monitor_norm(KSP ksp, PetscInt n,
++ PetscReal rnorm, void * vf)
++{
++ PetscViewerAndFormat * _vf = static_cast<PetscViewerAndFormat *>(vf);
++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, _vf);
++ return(0);
++}
++//-----------------------------------------------------------------------------
+ void TAOLinearBoundSolver::set_ksp_options()
+ {
+ dolfin_assert(_tao);
+@@ -360,8 +367,10 @@
+ else
+ KSPSetInitialGuessNonzero(ksp, PETSC_FALSE);
+
+- if (krylov_parameters["monitor_convergence"])
+- KSPMonitorSet(ksp, KSPMonitorTrueResidualNorm, 0, 0);
++ if (krylov_parameters["monitor_convergence"]) {
++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf);
++ KSPMonitorSet(ksp, ksp_monitor_norm, vf, 0);
++ }
+
+ // Set tolerances
+ const int max_ksp_it = krylov_parameters["maximum_iterations"];
+diff -Naur dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.h dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.h
+--- dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.h 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.h 2016-06-27 19:08:09.157561005 +0200
+@@ -174,6 +174,10 @@
+ // Tao solver pointer
+ Tao _tao;
+
++ // monitoring functions
++ PetscViewerAndFormat* vf;
++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx);
++
+ // Petsc preconditioner
+ std::shared_ptr<PETScPreconditioner> preconditioner;
+
diff --git a/var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch b/var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch
new file mode 100644
index 0000000000..1429cd7bc6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch
@@ -0,0 +1,39 @@
+--- dolfin-1.6.0.orig/cmake/modules/FindPETSc.cmake 2015-07-28 17:05:55.000000000 +0200
++++ dolfin-1.6.0/cmake/modules/FindPETSc.cmake 2016-06-27 17:16:02.484402705 +0200
+@@ -207,13 +207,7 @@
+
+ endif()
+
+-# Build PETSc test program
+-if (DOLFIN_SKIP_BUILD_TESTS)
+- set(PETSC_TEST_RUNS TRUE)
+- set(PETSC_VERSION "UNKNOWN")
+- set(PETSC_VERSION_OK TRUE)
+-elseif (FOUND_PETSC_CONF)
+-
++if (FOUND_PETSC_CONF)
+ # Set flags for building test program
+ set(CMAKE_REQUIRED_INCLUDES ${PETSC_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_LIBRARIES ${PETSC_LIBRARIES})
+@@ -271,7 +265,10 @@
+ set(PETSC_VERSION_OK TRUE)
+ endif()
+ mark_as_advanced(PETSC_VERSION_OK)
++endif()
+
++ # Build PETSc test program
++if (NOT DOLFIN_SKIP_BUILD_TESTS AND FOUND_PETSC_CONF)
+ # Run PETSc test program
+ set(PETSC_TEST_LIB_CPP
+ "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/petsc_test_lib.cpp")
+@@ -359,7 +356,9 @@
+ else()
+ message(STATUS "PETSc configured without Cusp support")
+ endif()
+-
++else()
++ set(PETSC_TEST_RUNS TRUE)
++
+ endif()
+
+ # Check sizeof(PetscInt)
diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py
new file mode 100644
index 0000000000..15ddfcee16
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ferret/package.py
@@ -0,0 +1,103 @@
+##############################################################################
+# 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 *
+import os
+
+
+class Ferret(Package):
+ """Ferret is an interactive computer visualization and analysis environment
+ designed to meet the needs of oceanographers and meteorologists
+ analyzing large and complex gridded data sets."""
+ homepage = "http://ferret.noaa.gov/Ferret/"
+ url = "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz"
+
+ version('6.96', '51722027c864369f41bab5751dfff8cc',
+ url="ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz")
+
+ depends_on("hdf5~mpi~fortran")
+ depends_on("netcdf~mpi")
+ depends_on("netcdf-fortran")
+ depends_on("readline")
+ depends_on("zlib")
+
+ def patch(self):
+ hdf5_prefix = self.spec['hdf5'].prefix
+ netcdff_prefix = self.spec['netcdf-fortran'].prefix
+ readline_prefix = self.spec['readline'].prefix
+ libz_prefix = self.spec['zlib'].prefix
+
+ filter_file(r'^BUILDTYPE.+',
+ 'BUILDTYPE = x86_64-linux',
+ 'FERRET/site_specific.mk')
+ filter_file(r'^INSTALL_FER_DIR.+',
+ 'INSTALL_FER_DIR = %s' % self.spec.prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^HDF5_DIR.+',
+ 'HDF5_DIR = %s' % hdf5_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^NETCDF4_DIR.+',
+ 'NETCDF4_DIR = %s' % netcdff_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^READLINE_DIR.+',
+ 'READLINE_DIR = %s' % readline_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^LIBZ_DIR.+',
+ 'LIBZ_DIR = %s' % libz_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^JAVA_HOME.+',
+ ' ',
+ 'FERRET/site_specific.mk')
+ filter_file(r'-lm',
+ '-lgfortran -lm',
+ 'FERRET/platform_specific.mk.x86_64-linux')
+
+ def install(self, spec, prefix):
+ hdf5_prefix = spec['hdf5'].prefix
+ netcdff_prefix = spec['netcdf-fortran'].prefix
+ netcdf_prefix = spec['netcdf'].prefix
+ libz_prefix = spec['zlib'].prefix
+ ln = which('ln')
+ ln('-sf',
+ hdf5_prefix + '/lib',
+ hdf5_prefix + '/lib64')
+ ln('-sf',
+ netcdff_prefix + '/lib',
+ netcdff_prefix + '/lib64')
+ ln('-sf',
+ netcdf_prefix + '/lib/libnetcdf.a',
+ netcdff_prefix + '/lib/libnetcdf.a')
+ ln('-sf',
+ netcdf_prefix + '/lib/libnetcdf.la',
+ netcdff_prefix + '/lib/libnetcdf.la')
+ ln('-sf',
+ libz_prefix + '/lib',
+ libz_prefix + '/lib64')
+ os.environ['LDFLAGS'] = '-lquadmath'
+ with working_dir('FERRET', create=False):
+ os.environ['LD_X11'] = '-L/usr/lib/X11 -lX11'
+ os.environ['HOSTTYPE'] = 'x86_64-linux'
+ make(parallel=False)
+ make("install")
diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py
new file mode 100644
index 0000000000..4479fc9bee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/foam-extend/package.py
@@ -0,0 +1,235 @@
+from spack import *
+from spack.environment import *
+
+import multiprocessing
+import os
+
+
+class FoamExtend(Package):
+ """The foam-extend project is a fork of the OpenFOAM open source library
+ for Computational Fluid Dynamics (CFD)."""
+
+ homepage = "http://www.extend-project.de/"
+
+ version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2')
+ version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1')
+ version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0')
+
+ variant('paraview', default=False, description='Enable ParaFOAM')
+ variant('scotch', default=True, description='Activate Scotch as a possible decomposition library')
+ variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library')
+ variant('metis', default=True, description='Activate Metis as a possible decomposition library')
+ variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library')
+ variant('parmgridgen', default=True, description='Activate Parmgridgen support')
+ variant('source', default=True, description='Installs also the source folder')
+
+ supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'}
+
+ depends_on('mpi')
+ depends_on('python')
+ depends_on('flex@:2.5.99')
+ depends_on('zlib')
+
+ depends_on('scotch ~ metis', when='~ptscotch+scotch')
+ depends_on('scotch ~ metis + mpi', when='+ptscotch')
+ depends_on('metis@5:', when='+metis')
+ depends_on('parmetis', when='+parmetis')
+ depends_on('parmgridgen', when='+parmgridgen')
+
+ depends_on('paraview', when='+paraview')
+
+ def set_arch(self):
+ (sysname, nodename, release, version, machine) = os.uname()
+
+ if self.compiler.name not in self.supported_compilers:
+ raise RuntimeError('{0} is not a supported compiler \
+ to compile OpenFOAM'.format(self.compiler.name))
+
+ foam_compiler = self.supported_compilers[self.compiler.name]
+ if sysname == 'Linux':
+ arch = 'linux'
+ if foam_compiler == 'Clang':
+ raise RuntimeError('OS, compiler combination not\
+ supported ({0} {1})'.format(sysname, foam_compiler))
+ elif sysname == 'Darwin':
+ if machine == 'x86_64':
+ arch = 'darwinIntel'
+ if foam_compiler == 'Icc':
+ raise RuntimeError('OS, compiler combination not\
+ supported ({0} {1})'.format(sysname, foam_compiler))
+ else:
+ raise RuntimeError('{0} {1} is not a \
+ supported architecture'.format(sysname, machine))
+
+ return (arch, foam_compiler)
+
+ def get_openfoam_environment(self):
+ return EnvironmentModifications.from_sourcing_files(
+ join_path(self.stage.source_path,
+ 'etc/bashrc'))
+
+ def patch(self):
+ # change names to match the package and not the one patch in
+ # the Third-Party of foam-extend
+ if '+parmgridgen' in self.spec:
+ filter_file(r'-lMGridGen',
+ r'-lmgrid',
+ 'src/dbns/Make/options')
+
+ filter_file(
+ r'-lMGridGen',
+ r'-lmgrid',
+ 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') # NOQA: ignore=501
+
+ # Get the wmake arch and compiler
+ (arch, foam_compiler) = self.set_arch()
+
+ prefs_dict = {
+ 'compilerInstall': 'System',
+ 'WM_COMPILER': foam_compiler,
+ 'WM_ARCH_OPTION': '64',
+ 'WM_PRECISION_OPTION': 'DP',
+ 'WM_COMPILE_OPTION': 'SPACKOpt',
+ 'WM_MPLIB': 'SPACK',
+
+ 'CMAKE_DIR': self.spec['cmake'].prefix,
+ 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin,
+ 'PYTHON_DIR': self.spec['python'].prefix,
+ 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin,
+
+ 'FLEX_SYSTEM': 1,
+ 'FLEX_DIR': self.spec['flex'].prefix,
+
+ 'BISON_SYSTEM': 1,
+ 'BISON_DIR': self.spec['flex'].prefix,
+
+ 'ZLIB_SYSTEM': 1,
+ 'ZLIB_DIR': self.spec['zlib'].prefix,
+ }
+
+ if '+scotch' in self.spec or '+ptscotch' in self.spec:
+ prefs_dict['SCOTCH_SYSTEM'] = 1
+ prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix
+ prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin
+ prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib
+ prefs_dict['SCOTCH_INCLUDE_DIR'] = \
+ self.spec['scotch'].prefix.include
+
+ if '+metis' in self.spec:
+ prefs_dict['METIS_SYSTEM'] = 1
+ prefs_dict['METIS_DIR'] = self.spec['metis'].prefix
+ prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin
+ prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib
+ prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include
+
+ if '+parmetis' in self.spec:
+ prefs_dict['PARMETIS_SYSTEM'] = 1
+ prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix
+ prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin
+ prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib
+ prefs_dict['PARMETIS_INCLUDE_DIR'] = \
+ self.spec['parmetis'].prefix.include
+
+ if '+parmgridgen' in self.spec:
+ prefs_dict['PARMGRIDGEN_SYSTEM'] = 1
+ prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix
+ prefs_dict['PARMGRIDGEN_BIN_DIR'] = \
+ self.spec['parmgridgen'].prefix.bin
+ prefs_dict['PARMGRIDGEN_LIB_DIR'] = \
+ self.spec['parmgridgen'].prefix.lib
+ prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \
+ self.spec['parmgridgen'].prefix.include
+
+ if '+paraview' in self.spec:
+ prefs_dict['PARAVIEW_SYSTEM'] = 1
+ prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix,
+ prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin,
+ prefs_dict['QT_SYSTEM'] = 1
+ prefs_dict['QT_DIR'] = self.spec['qt'].prefix,
+ prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin,
+
+ # write the prefs files to define the configuration needed,
+ # only the prefs.sh is used by this script but both are
+ # installed for end users
+ with working_dir('.'):
+ with open("etc/prefs.sh", "w") as fh:
+ for key in sorted(prefs_dict):
+ fh.write('export {0}={1}\n'.format(key, prefs_dict[key]))
+
+ with open("etc/prefs.csh", "w") as fh:
+ for key in sorted(prefs_dict):
+ fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key]))
+
+ # Defining a different mpi and optimisation file to be able to
+ # make wmake get spack info with minimum modifications on
+ # configurations scripts
+ mpi_info = [
+ 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK',
+ 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include),
+ 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib)
+ ]
+
+ arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'],
+ foam_compiler])
+ option_path = ''.join([arch_path,
+ prefs_dict['WM_PRECISION_OPTION'],
+ prefs_dict['WM_COMPILE_OPTION']])
+ rule_path = join_path("wmake", "rules", arch_path)
+ build_path = join_path(self.stage.source_path, 'lib', option_path)
+ install_path = \
+ join_path(self.prefix,
+ 'foam-extend-{0}'.format(self.version.up_to(2)),
+ option_path)
+
+ rpaths_foam = ' '.join([
+ '{0}{1}'.format(self.compiler.cxx_rpath_arg,
+ install_path),
+ '{0}{1}'.format(self.compiler.cxx_rpath_arg,
+ build_path)
+ ])
+
+ compiler_flags = {
+ 'DBUG': rpaths_foam,
+ 'OPT': '-O3',
+ }
+
+ with working_dir(rule_path):
+ with open('mplibSPACK', "w") as fh:
+ fh.write('\n'.join(mpi_info))
+
+ for comp in ['c', 'c++']:
+ with open('{0}SPACKOpt'.format(comp), "w") as fh:
+ for key, val in compiler_flags.iteritems():
+ fh.write('{0}{1} = {2}\n'.format(comp, key, val))
+
+ def setup_environment(self, spack_env, run_env):
+ with working_dir(self.stage.path):
+ spack_env.set('FOAM_INST_DIR', os.path.abspath('.'))
+
+ (arch, foam_compiler) = self.set_arch()
+
+ run_env.set('FOAM_INST_DIR', self.prefix)
+
+ def install(self, spec, prefix):
+ env_openfoam = self.get_openfoam_environment()
+ env_openfoam.apply_modifications()
+
+ if self.parallel:
+ os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \
+ if self.make_jobs else str(multiprocessing.cpu_count())
+
+ allwmake = Executable('./Allwmake')
+ allwmake()
+
+ install_path = \
+ join_path(self.prefix,
+ 'foam-extend-{0}'.format(self.version.up_to(2)))
+
+ if '+source' in spec:
+ install_tree('src', join_path(install_path, 'src'))
+
+ install_tree('lib', join_path(install_path, 'lib'))
+ install_tree('bin', join_path(install_path, 'bin'))
+ install_tree('applications', join_path(install_path, 'applications'))
+ install_tree('etc', join_path(install_path, 'etc'))
+ install_tree('wmake', join_path(install_path, 'wmake'))
diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py
index 897c011396..dd181623d0 100644
--- a/var/spack/repos/builtin/packages/freetype/package.py
+++ b/var/spack/repos/builtin/packages/freetype/package.py
@@ -24,17 +24,18 @@
##############################################################################
from spack import *
+
class Freetype(Package):
"""Font package"""
homepage = "http://http://www.freetype.org"
url = "http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz"
- version('2.5.3' , 'cafe9f210e45360279c730d27bf071e9')
+ version('2.5.3', 'cafe9f210e45360279c730d27bf071e9')
depends_on('libpng')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure("--prefix=%s" % prefix, "--with-harfbuzz=no")
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py
new file mode 100644
index 0000000000..7082384b9b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/giflib/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 Giflib(Package):
+ """The GIFLIB project maintains the giflib service library, which has
+ been pulling images out of GIFs since 1989."""
+
+ homepage = "http://giflib.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/giflib/giflib-5.1.4.tar.bz2"
+
+ version('5.1.4', '2c171ced93c0e83bb09e6ccad8e3ba2b')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/glib/g_date_strftime.patch b/var/spack/repos/builtin/packages/glib/g_date_strftime.patch
new file mode 100644
index 0000000000..532c743277
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glib/g_date_strftime.patch
@@ -0,0 +1,34 @@
+From 00148329967adb196138372771052a3f606a6ea3 Mon Sep 17 00:00:00 2001
+From: coypu <coypu@sdf.org>
+Date: Wed, 2 Mar 2016 19:43:10 +0200
+Subject: [PATCH 2/2] gdate: Suppress string format literal warning
+
+Newer versions of GCC emit an error here, but we know it's safe.
+https://bugzilla.gnome.org/761550
+---
+ glib/gdate.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/glib/gdate.c b/glib/gdate.c
+index 4aece02..92c34d2 100644
+--- a/glib/gdate.c
++++ b/glib/gdate.c
+@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
+ *
+ * Returns: number of characters written to the buffer, or 0 the buffer was too small
+ */
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
++
+ gsize
+ g_date_strftime (gchar *s,
+ gsize slen,
+@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
+ return retval;
+ #endif
+ }
++
++#pragma GCC diagnostic pop
+--
+2.7.1
+
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index b146ea63d8..342a61a6a1 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -25,20 +25,24 @@
from spack import *
import sys
+
class Glib(Package):
"""The GLib package contains a low-level libraries useful for
providing data structure handling for C, portability wrappers
and interfaces for such runtime functionality as an event loop,
threads, dynamic loading and an object system."""
homepage = "https://developer.gnome.org/glib/"
- url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
+ url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
depends_on("libffi")
depends_on("zlib")
depends_on("pkg-config")
- depends_on('gettext', sys.platform=='darwin')
+ depends_on('gettext', sys.platform == 'darwin')
+
+ # The following patch is needed for gcc-6.1
+ patch('g_date_strftime.patch')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py
index e425d460c2..0951b86d57 100644
--- a/var/spack/repos/builtin/packages/gmsh/package.py
+++ b/var/spack/repos/builtin/packages/gmsh/package.py
@@ -27,39 +27,51 @@ from spack import *
class Gmsh(Package):
"""
- Gmsh is a free 3D finite element grid generator with a built-in CAD engine and post-processor. Its design goal is
- to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization
- capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of
- any input to these modules is done either interactively using the graphical user interface or in ASCII text files
- using Gmsh's own scripting language.
+ Gmsh is a free 3D finite element grid generator with a built-in CAD engine
+ and post-processor. Its design goal is to provide a fast, light and
+ user-friendly meshing tool with parametric input and advanced visualization
+ capabilities. Gmsh is built around four modules: geometry, mesh, solver and
+ post-processing. The specification of any input to these modules is done
+ either interactively using the graphical user interface or in ASCII text
+ files using Gmsh's own scripting language.
"""
homepage = 'http://gmsh.info'
url = 'http://gmsh.info/src/gmsh-2.11.0-source.tgz'
+ version('2.12.0', '7fbd2ec8071e79725266e72744d21e902d4fe6fa9e7c52340ad5f4be5c159d09')
version('2.11.0', 'f15b6e7ac9ca649c9a74440e1259d0db')
- # FIXME : Misses dependencies on gmm, PetsC, TetGen
-
- variant('shared', default=True, description='Enables the build of shared libraries')
- variant('debug', default=False, description='Builds the library in debug mode')
- variant('mpi', default=False, description='Builds MPI support for parser and solver')
- variant('fltk', default=False, description='Enables the build of the FLTK GUI')
- variant('hdf5', default=False, description='Enables HDF5 support')
- variant('compression', default=True, description='Enables IO compression through zlib')
+ variant('shared', default=True, description='Enables the build of shared libraries')
+ variant('debug', default=False, description='Builds the library in debug mode')
+ variant('mpi', default=False, description='Builds MPI support for parser and solver')
+ variant('fltk', default=False, description='Enables the build of the FLTK GUI')
+ variant('hdf5', default=False, description='Enables HDF5 support')
+ variant('compression', default=True, description='Enables IO compression through zlib')
+ variant('oce', default=False, description='Build with OCE')
+ variant('petsc', default=False, description='Build with PETSc')
+ variant('slepc', default=False, description='Build with SLEPc (only when PETSc is enabled)')
depends_on('blas')
depends_on('lapack')
+ depends_on('cmake@2.8:')
depends_on('gmp')
- depends_on('mpi', when='+mpi')
- depends_on('fltk', when='+fltk') # Assumes OpenGL with GLU is already provided by the system
+ depends_on('mpi', when='+mpi')
+ # Assumes OpenGL with GLU is already provided by the system:
+ depends_on('fltk', when='+fltk')
depends_on('hdf5', when='+hdf5')
- depends_on('zlib', when='+compression')
+ depends_on('oce', when='+oce')
+ depends_on('petsc+mpi', when='+petsc+mpi')
+ depends_on('petsc', when='+petsc~mpi')
+ depends_on('slepc', when='+slepc+petsc')
+ depends_on('zlib', when='+compression')
def install(self, spec, prefix):
-
options = []
options.extend(std_cmake_args)
+ # Make sure native file dialogs are used
+ options.extend(['-DENABLE_NATIVE_FILE_CHOOSER=ON'])
+
build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
@@ -68,11 +80,45 @@ class Gmsh(Package):
# Prevent GMsh from using its own strange directory structure on OSX
options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF')
+ # Make sure GMSH picks up correct BlasLapack by providing linker flags
+ options.append('-DBLAS_LAPACK_LIBRARIES=%s %s' %
+ (to_link_flags(spec['lapack'].lapack_shared_lib),
+ to_link_flags(spec['blas'].blas_shared_lib)))
+
+ # Gmsh does not have an option to compile against external metis.
+ # Its own Metis, however, fails to build
+ options.append('-DENABLE_METIS=OFF')
+
+ if '+fltk' in spec:
+ options.append('-DENABLE_FLTK=ON')
+ else:
+ options.append('-DENABLE_FLTK=OFF')
+
+ if '+oce' in spec:
+ env['CASROOT'] = self.spec['oce'].prefix
+ options.extend(['-DENABLE_OCC=ON'])
+ else:
+ options.extend(['-DENABLE_OCC=OFF'])
+
+ if '+petsc' in spec:
+ env['PETSC_DIR'] = self.spec['petsc'].prefix
+ options.extend(['-DENABLE_PETSC=ON'])
+ else:
+ options.extend(['-DENABLE_PETSC=OFF'])
+
+ if '+slepc' in spec:
+ env['SLEPC_DIR'] = self.spec['slepc'].prefix
+ options.extend(['-DENABLE_SLEPC=ON'])
+ else:
+ options.extend(['-DENABLE_SLEPC=OFF'])
+
if '+shared' in spec:
+ # Builds dynamic executable and installs shared library
options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON',
- '-DENABLE_BUILD_DYNAMIC:BOOL=ON']) # Builds dynamic executable and installs shared library
+ '-DENABLE_BUILD_DYNAMIC:BOOL=ON'])
else:
- options.append('-DENABLE_BUILD_LIB:BOOL=ON') # Builds and installs static library
+ # Builds and installs static library
+ options.append('-DENABLE_BUILD_LIB:BOOL=ON')
if '+debug' in spec:
options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py
index e4c1b80de3..f8d73d651b 100644
--- a/var/spack/repos/builtin/packages/harfbuzz/package.py
+++ b/var/spack/repos/builtin/packages/harfbuzz/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class Harfbuzz(Package):
"""The Harfbuzz package contains an OpenType text shaping engine."""
homepage = "http://www.freedesktop.org/wiki/Software/HarfBuzz/"
@@ -34,6 +35,8 @@ class Harfbuzz(Package):
depends_on("glib")
depends_on("icu")
depends_on("freetype")
+ depends_on("cairo")
+ depends_on("zlib")
def patch(self):
change_sed_delimiter('@', ';', 'src/Makefile.in')
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index e46f432be5..51a5823aa5 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -70,7 +70,8 @@ class Hdf5(Package):
raise RuntimeError(msg)
if '+threadsafe' in spec and ('+cxx' in spec or '+fortran' in spec):
- raise RuntimeError("cannot use variant +threadsafe with either +cxx or +fortran")
+ msg = 'cannot use variant +threadsafe with either +cxx or +fortran'
+ raise RuntimeError(msg)
def install(self, spec, prefix):
self.validate(spec)
@@ -164,7 +165,7 @@ int main(int argc, char **argv) {
"""
expected = """\
HDF5 version {version} {version}
-""".format(version=str(spec.version))
+""".format(version=str(spec.version.up_to(3)))
with open("check.c", 'w') as f:
f.write(source)
if '+mpi' in spec:
@@ -185,24 +186,30 @@ HDF5 version {version} {version}
if not success:
print "Produced output does not match expected output."
print "Expected output:"
- print '-'*80
+ print '-' * 80
print expected
- print '-'*80
+ print '-' * 80
print "Produced output:"
- print '-'*80
+ print '-' * 80
print output
- print '-'*80
+ print '-' * 80
raise RuntimeError("HDF5 install check failed")
shutil.rmtree(checkdir)
def url_for_version(self, version):
- v = str(version)
+ base_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
if version == Version("1.2.2"):
- return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz"
+ return "{0}/hdf5-{1}.tar.gz".format(base_url, version)
+ elif version < Version("1.6.6"):
+ return "{0}/hdf5-{1}/hdf5-{2}.tar.gz".format(
+ base_url, version.up_to(2), version)
elif version < Version("1.7"):
- return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz"
+ return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format(
+ base_url, version.up_to(2), version)
elif version < Version("1.10"):
- return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz"
+ return "{0}/hdf5-{1}/src/hdf5-{1}.tar.gz".format(
+ base_url, version)
else:
- return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz"
+ return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format(
+ base_url, version.up_to(2), version)
diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py
index 69b52130e9..99d138dcff 100644
--- a/var/spack/repos/builtin/packages/julia/package.py
+++ b/var/spack/repos/builtin/packages/julia/package.py
@@ -22,8 +22,9 @@
# 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 *
-import os
+
class Julia(Package):
"""The Julia Language: A fresh approach to technical computing"""
@@ -32,10 +33,14 @@ class Julia(Package):
version('master',
git='https://github.com/JuliaLang/julia.git', branch='master')
+ version('release-0.4',
+ git='https://github.com/JuliaLang/julia.git', branch='release-0.4')
+ version('0.4.6', 'd88db18c579049c23ab8ef427ccedf5d', preferred=True)
version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6')
version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac')
- patch('gc.patch')
+ patch('gc.patch', when='@0.4:0.4.5')
+ patch('gc.patch', when='@release-0.4')
patch('openblas.patch', when='@0.4:0.4.5')
# Build-time dependencies:
@@ -92,25 +97,21 @@ class Julia(Package):
depends_on("mpi")
def install(self, spec, prefix):
- if '@master' in spec:
- # Julia needs to know the offset from a specific commit
- git = which('git')
- git('fetch', '--unshallow')
-
# Explicitly setting CC, CXX, or FC breaks building libuv, one
# of Julia's dependencies. This might be a Darwin-specific
# problem. Given how Spack sets up compilers, Julia should
# still use Spack's compilers, even if we don't specify them
# explicitly.
- options = [#"CC=cc",
- #"CXX=c++",
- #"FC=fc",
- #"USE_SYSTEM_ARPACK=1",
- #"USE_SYSTEM_FFTW=1",
- #"USE_SYSTEM_GMP=1",
- #"USE_SYSTEM_MPFR=1",
- #TODO "USE_SYSTEM_PCRE=1",
- "prefix=%s" % prefix]
+ options = [
+ # "CC=cc",
+ # "CXX=c++",
+ # "FC=fc",
+ # "USE_SYSTEM_ARPACK=1",
+ # "USE_SYSTEM_FFTW=1",
+ # "USE_SYSTEM_GMP=1",
+ # "USE_SYSTEM_MPFR=1",
+ # "USE_SYSTEM_PCRE=1",
+ "prefix=%s" % prefix]
with open('Make.user', 'w') as f:
f.write('\n'.join(options) + '\n')
make()
diff --git a/var/spack/repos/builtin/packages/libaio/package.py b/var/spack/repos/builtin/packages/libaio/package.py
new file mode 100644
index 0000000000..735ced047b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libaio/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Libaio(Package):
+ """This is the linux native Asynchronous I/O interface library."""
+
+ homepage = "https://git.fedorahosted.org/cgit/libaio.git"
+ url = "https://git.fedorahosted.org/cgit/libaio.git/snapshot/libaio-0.3.110-1.tar.gz"
+
+ version('0.3.110-1', 'eb6b1b435afadb5b80c5dd80984249f6')
+
+ def install(self, spec, prefix):
+ # libaio is not supported on OS X
+ if spec.satisfies('arch=darwin-x86_64'):
+ # create a dummy directory
+ mkdir(prefix.lib)
+ return
+
+ make('prefix={0}'.format(prefix), 'install')
diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py
index 90e7b3b643..0e410a5061 100644
--- a/var/spack/repos/builtin/packages/libtool/package.py
+++ b/var/spack/repos/builtin/packages/libtool/package.py
@@ -24,18 +24,30 @@
##############################################################################
from spack import *
+
class Libtool(Package):
- """libtool -- library building part of autotools"""
- homepage = "https://www.gnu.org/software/libtool/"
- url = "http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz"
+ """
+ libtool -- library building part of autotools
+ """
+ homepage = 'https://www.gnu.org/software/libtool/'
+ url = 'http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz'
- version('2.4.6' , 'addf44b646ddb4e3919805aa88fa7c5e')
- version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50')
+ version('2.4.6', 'addf44b646ddb4e3919805aa88fa7c5e')
+ version('2.4.2', 'd2f3b7d4627e69e13514a40e72a24d50')
depends_on('m4')
+ def _make_executable(self, name):
+ return Executable(join_path(self.prefix.bin, name))
+
+ def setup_dependent_package(self, module, dependent_spec):
+ # Automake is very likely to be a build dependency,
+ # so we add the tools it provides to the dependent module
+ executables = ['libtoolize', 'libtool']
+ for name in executables:
+ setattr(module, name, self._make_executable(name))
+
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
-
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py
new file mode 100644
index 0000000000..10ca8158c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxpm/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 Libxpm(Package):
+ """Xpm file format library"""
+
+ homepage = "https://www.x.org/"
+ url = "https://www.x.org/archive//individual/lib/libXpm-3.5.11.tar.gz"
+
+ version('3.5.11', '7c67c878ee048206b070bc0b24154f04')
+ version('3.5.10', 'a70507638d74541bf30a771f1e5938bb')
+ version('3.5.9', 'd6d4b0f76248a6b346eb42dfcdaa72a6')
+ version('3.5.8', '2d81d6633e67ac5562e2fbee126b2897')
+ version('3.5.7', '7bbc8f112f7143ed6961a58ce4e14558')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/lrzip/package.py b/var/spack/repos/builtin/packages/lrzip/package.py
new file mode 100644
index 0000000000..42542acfdb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lrzip/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# 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 Lrzip(Package):
+ """A compression utility that excels at compressing large files
+ (usually > 10-50 MB). Larger files and/or more free RAM means that the
+ utility will be able to more effectively compress your files (ie: faster /
+ smaller size), especially if the filesize(s) exceed 100 MB. You can either
+ choose to optimise for speed (fast compression / decompression) or size,
+ but not both."""
+
+ homepage = 'http://lrzip.kolivas.org'
+ url = 'https://github.com/ckolivas/lrzip/archive/v0.630.tar.gz'
+
+ version('master', git='https://github.com/ckolivas/lrzip.git')
+ version('0.630', '3ca7f1d1365aa105089d1fbfc6b0924a')
+ version('0.621', '1f07227b39ae81a98934411e8611e341')
+ version('0.616', 'd40bdb046d0807ef602e36b1e9782cc0')
+ version('0.615', 'f1c01e7f3de07f54d916b61c989dfaf2')
+
+ # depends_on('coreutils')
+ depends_on('lzo')
+ depends_on('zlib')
+ depends_on('bzip2')
+
+ def install(self, spec, prefix):
+ set_executable('./autogen.sh')
+ autogen = Executable('./autogen.sh')
+
+ configure_args = [
+ '--prefix={0}'.format(prefix),
+ '--disable-dependency-tracking'
+ ]
+ autogen(*configure_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/lzo/package.py b/var/spack/repos/builtin/packages/lzo/package.py
new file mode 100644
index 0000000000..0961bbb58c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lzo/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# 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 Lzo(Package):
+ """Real-time data compression library"""
+
+ homepage = 'https://www.oberhumer.com/opensource/lzo/'
+ url = 'https://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz'
+
+ version('2.09', 'c7ffc9a103afe2d1bba0b015e7aa887f')
+ version('2.08', 'fcec64c26a0f4f4901468f360029678f')
+ version('2.07', '4011935e95171e78ad4894f7335c982a')
+ version('2.06', '95380bd4081f85ef08c5209f4107e9f8')
+ version('2.05', 'c67cda5fa191bab761c7cb06fe091e36')
+
+ def install(self, spec, prefix):
+ configure_args = [
+ '--prefix={0}'.format(prefix),
+ '--disable-dependency-tracking',
+ '--enable-shared'
+ ]
+ configure(*configure_args)
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/mariadb/package.py b/var/spack/repos/builtin/packages/mariadb/package.py
new file mode 100644
index 0000000000..d9df200d02
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mariadb/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# 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 Mariadb(Package):
+ """MariaDB turns data into structured information in a wide array of
+ applications, ranging from banking to websites. It is an enhanced, drop-in
+ replacement for MySQL. MariaDB is used because it is fast, scalable and
+ robust, with a rich ecosystem of storage engines, plugins and many other
+ tools make it very versatile for a wide variety of use cases."""
+
+ homepage = "https://mariadb.org/about/"
+ url = "https://downloads.mariadb.org/f/mariadb-10.1.14/source/mariadb-10.1.14.tar.gz"
+
+ version('10.1.14', '294925531e0fd2f0461e3894496a5adc')
+ version('5.5.49', '67b5a499a5f158b2a586e6e3bfb4f304')
+
+ variant('nonblocking', default=True, description='Allow non blocking '
+ 'operations in the mariadb client library.')
+
+ depends_on('boost')
+ depends_on('cmake')
+ depends_on('jemalloc')
+ depends_on('libaio')
+ depends_on('libedit')
+ depends_on('libevent', when='+nonblocking')
+ depends_on('ncurses')
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+
+ cmake('..', *std_cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 164d9db541..90670ee517 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -23,15 +23,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Mpich(Package):
"""MPICH is a high performance and widely portable implementation of
the Message Passing Interface (MPI) standard."""
homepage = "http://www.mpich.org"
- url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
- list_url = "http://www.mpich.org/static/downloads/"
+ url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
+ list_url = "http://www.mpich.org/static/downloads/"
list_depth = 2
version('3.2', 'f414cfa77099cd1fa1a5ae4e22db508a')
@@ -42,7 +41,8 @@ class Mpich(Package):
version('3.1', '5643dd176499bfb7d25079aaff25f2ec')
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
- variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
+ variant('verbs', default=False,
+ description='Build support for OpenFabrics verbs.')
variant('pmi', default=True, description='Build with PMI support')
variant('hydra', default=True, description='Build the hydra process manager')
@@ -50,6 +50,11 @@ class Mpich(Package):
provides('mpi@:1.3', when='@1:')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc'))
+ spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpic++'))
+ spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77'))
+ spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90'))
+
spack_env.set('MPICH_CC', spack_cc)
spack_env.set('MPICH_CXX', spack_cxx)
spack_env.set('MPICH_F77', spack_f77)
@@ -57,9 +62,9 @@ class Mpich(Package):
spack_env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dep_spec):
- self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
+ self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
- self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
+ self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
def install(self, spec, prefix):
@@ -92,7 +97,6 @@ class Mpich(Package):
self.filter_compilers()
-
def filter_compilers(self):
"""Run after install to make the MPI compilers use the
compilers that Spack built the package with.
@@ -102,18 +106,20 @@ class Mpich(Package):
be bound to whatever compiler they were built with.
"""
bin = self.prefix.bin
- mpicc = os.path.join(bin, 'mpicc')
- mpicxx = os.path.join(bin, 'mpicxx')
- mpif77 = os.path.join(bin, 'mpif77')
- mpif90 = os.path.join(bin, 'mpif90')
-
- spack_cc = os.environ['CC']
- spack_cxx = os.environ['CXX']
- spack_f77 = os.environ['F77']
- spack_fc = os.environ['FC']
-
- kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True }
- filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
- filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
- filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
- filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
+ mpicc = join_path(bin, 'mpicc')
+ mpicxx = join_path(bin, 'mpicxx')
+ mpif77 = join_path(bin, 'mpif77')
+ mpif90 = join_path(bin, 'mpif90')
+
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+ filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
+ filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
+ filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
+
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ for wrapper in (mpicc, mpicxx, mpif77, mpif90):
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/repos/builtin/packages/mumps/mumps-shared.patch b/var/spack/repos/builtin/packages/mumps/mumps-shared.patch
new file mode 100644
index 0000000000..592f48037c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mumps/mumps-shared.patch
@@ -0,0 +1,119 @@
+diff -Naur MUMPS_5.0.1/libseq/Makefile MUMPS_5.0.1.new/libseq/Makefile
+--- MUMPS_5.0.1/libseq/Makefile 2015-07-23 19:08:32.000000000 +0200
++++ MUMPS_5.0.1.new/libseq/Makefile 2016-06-07 10:41:16.585179151 +0200
+@@ -8,11 +8,15 @@
+
+ include ../Makefile.inc
+
+-libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
++libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT)$(SHLIBEXT)
+
+ libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
+ $(AR)$@ mpi.o mpic.o elapse.o
+ $(RANLIB) $@
++
++libmpiseq$(PLAT)$(SHLIBEXT): mpi.o mpic.o elapse.o
++ $(FC) $(LDFLAGS) $^ -o libmpiseq$(PLAT)$(SHLIBEXT)
++
+ .f.o:
+ $(FC) $(OPTF) -c $*.f $(OUTF)$*.o
+ .c.o:
+diff -Naur MUMPS_5.0.1/Makefile MUMPS_5.0.1.new/Makefile
+--- MUMPS_5.0.1/Makefile 2015-07-23 19:08:29.000000000 +0200
++++ MUMPS_5.0.1.new/Makefile 2016-06-07 10:50:21.863281217 +0200
+@@ -51,7 +51,7 @@
+ dexamples: d
+ (cd examples ; $(MAKE) d)
+
+-requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
++requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT)$(SHLIBEXT)
+
+ # dummy MPI library (sequential version)
+
+@@ -62,16 +62,25 @@
+ $(libdir)/libpord$(PLAT)$(LIBEXT):
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cd $(LPORDDIR); \
+- $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
++ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT); \
+ fi;
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
+ fi;
+
++$(libdir)/libpord$(PLAT)$(SHLIBEXT):
++ if [ "$(LPORDDIR)" != "" ] ; then \
++ cd $(LPORDDIR); \
++ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT) libpord$(PLAT)$(SHLIBEXT); \
++ fi;
++ if [ "$(LPORDDIR)" != "" ] ; then \
++ cp $(LPORDDIR)/libpord$(PLAT)$(SHLIBEXT) $@; \
++ fi;
++
+ clean:
+ (cd src; $(MAKE) clean)
+ (cd examples; $(MAKE) clean)
+- (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT))
++ (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT) *$(PLAT)$(SHLIBEXT))
+ (cd libseq; $(MAKE) clean)
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cd $(LPORDDIR); $(MAKE) realclean; \
+diff -Naur MUMPS_5.0.1/PORD/lib/Makefile MUMPS_5.0.1.new/PORD/lib/Makefile
+--- MUMPS_5.0.1/PORD/lib/Makefile 2015-07-23 19:08:29.000000000 +0200
++++ MUMPS_5.0.1.new/PORD/lib/Makefile 2016-06-07 10:49:48.889000958 +0200
+@@ -13,7 +13,7 @@
+
+ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
+ multisector.o gelim.o bucket.o tree.o \
+- symbfac.o interface.o sort.o minpriority.o
++ symbfac.o interface.o sort.o minpriority.o
+
+ # Note: numfac.c read.c mapping.c triangular.c matrix.c kernel.c
+ # were not direcly used by MUMPS and have been removed from the
+@@ -24,12 +24,15 @@
+ .c.o:
+ $(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
+
+-libpord$(LIBEXT):$(OBJS)
++libpord$(PLAT)$(LIBEXT):$(OBJS)
+ $(AR)$@ $(OBJS)
+ $(RANLIB) $@
+
++libpord$(PLAT)$(SHLIBEXT): $(OBJS)
++ $(CC) $(LDFLAGS) $(OBJS) -o libpord$(PLAT)$(SHLIBEXT)
++
+ clean:
+ rm -f *.o
+
+ realclean:
+- rm -f *.o libpord.a
++ rm -f *.o libpord$(PLAT)$(SHLIBEXT) libpord$(PLAT)$(LIBEXT)
+diff -Naur MUMPS_5.0.1/src/Makefile MUMPS_5.0.1.new/src/Makefile
+--- MUMPS_5.0.1/src/Makefile 2015-07-23 19:08:29.000000000 +0200
++++ MUMPS_5.0.1.new/src/Makefile 2016-06-07 10:40:52.534703722 +0200
+@@ -24,7 +24,10 @@
+ include $(topdir)/Makefile.inc
+
+ mumps_lib: $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
+- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
++ $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT) \
++ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \
++ $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT)
++
+
+ OBJS_COMMON_MOD = \
+ ana_omp_m.o\
+@@ -162,6 +165,13 @@
+ $(AR)$@ $?
+ $(RANLIB) $@
+
++$(libdir)/libmumps_common$(PLAT)$(SHLIBEXT): $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
++ $(FC) $(LDFLAGS) $^ -L$(libdir) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT)
++
++
++$(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT): $(OBJS_MOD) $(OBJS_OTHER)
++ $(FC) $(LDFLAGS) $^ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT)
++
+ # Dependencies between modules:
+ $(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \
+ $(ARITH)mumps_struc_def.o \
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index 92c45c9b95..8a90ef72d0 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -23,7 +23,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os, sys, glob
+import os
+import sys
+import subprocess
+
class Mumps(Package):
"""MUMPS: a MUltifrontal Massively Parallel sparse direct Solver"""
@@ -44,7 +47,6 @@ class Mumps(Package):
variant('idx64', default=False, description='Use int64_t/integer*8 as default index type')
variant('shared', default=True, description='Build shared libraries')
-
depends_on('scotch + esmumps', when='~ptscotch+scotch')
depends_on('scotch + esmumps + mpi', when='+ptscotch')
depends_on('metis@5:', when='+metis')
@@ -54,49 +56,64 @@ class Mumps(Package):
depends_on('scalapack', when='+mpi')
depends_on('mpi', when='+mpi')
+ patch('mumps-shared.patch', when='+shared')
+
# this function is not a patch function because in case scalapack
# is needed it uses self.spec['scalapack'].fc_link set by the
# setup_dependent_environment in scalapck. This happen after patch
# end before install
# def patch(self):
def write_makefile_inc(self):
- if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec:
- raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi')
+ if (('+parmetis' in self.spec or
+ '+ptscotch' in self.spec)) and '+mpi' not in self.spec:
+ raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') # NOQA: E501
- makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib]
+ makefile_conf = [
+ "LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib
+ ]
orderings = ['-Dpord']
if '+ptscotch' in self.spec or '+scotch' in self.spec:
join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '')
- makefile_conf.extend(
- ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
- "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
- join_lib,
- join_lib.join(['esmumps', 'scotch', 'scotcherr']))])
+ makefile_conf.extend([
+ "ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
+ "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
+ join_lib,
+ join_lib.join(['esmumps',
+ 'scotch',
+ 'scotcherr']))
+ ])
orderings.append('-Dscotch')
if '+ptscotch' in self.spec:
orderings.append('-Dptscotch')
if '+parmetis' in self.spec and '+metis' in self.spec:
- libname = 'parmetis' if '+parmetis' in self.spec else 'metis'
- makefile_conf.extend(
- ["IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
- "LMETIS = -L%s -l%s -L%s -l%s" % (self.spec['parmetis'].prefix.lib, 'parmetis',self.spec['metis'].prefix.lib, 'metis')])
+ makefile_conf.extend([
+ "IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
+ "LMETIS = -L%s -l%s -L%s -l%s" % (
+ self.spec['parmetis'].prefix.lib, 'parmetis',
+ self.spec['metis'].prefix.lib, 'metis')
+ ])
orderings.append('-Dparmetis')
elif '+metis' in self.spec:
- makefile_conf.extend(
- ["IMETIS = -I%s" % self.spec['metis'].prefix.include,
- "LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib, 'metis')])
+ makefile_conf.extend([
+ "IMETIS = -I%s" % self.spec['metis'].prefix.include,
+ "LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib,
+ 'metis')
+ ])
orderings.append('-Dmetis')
makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings)))
- # when building shared libs need -fPIC, otherwise
- # /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
+ # when building shared libs need -fPIC, otherwise /usr/bin/ld:
+ # graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can
+ # not be used when making a shared object; recompile with
+ # -fPIC
fpic = '-fPIC' if '+shared' in self.spec else ''
+
# TODO: test this part, it needs a full blas, scalapack and
# partitionning environment with 64bit integers
if '+idx64' in self.spec:
@@ -104,7 +121,7 @@ class Mumps(Package):
# the fortran compilation flags most probably are
# working only for intel and gnu compilers this is
# perhaps something the compiler should provide
- ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'),
+ ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic, '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), # NOQA: E501
'OPTL = %s -O ' % fpic,
'OPTC = %s -O -DINTSIZE64' % fpic])
else:
@@ -113,49 +130,47 @@ class Mumps(Package):
'OPTL = %s -O ' % fpic,
'OPTC = %s -O ' % fpic])
-
if '+mpi' in self.spec:
makefile_conf.extend(
- ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'),
- "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
- "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
+ ["CC = %s" % self.spec['mpi'].mpicc,
+ "FC = %s" % self.spec['mpi'].mpifc,
"SCALAP = %s" % self.spec['scalapack'].fc_link,
"MUMPS_TYPE = par"])
else:
makefile_conf.extend(
["CC = cc",
"FC = fc",
- "FL = fc",
"MUMPS_TYPE = seq"])
# TODO: change the value to the correct one according to the
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
- makefile_conf.append("CDEFS = -DAdd_")
+ makefile_conf.extend([
+ 'CDEFS = -DAdd_',
+ 'FL = $(FC)',
+ ])
if '+shared' in self.spec:
+ makefile_conf.append('SHLIBEXT = .%s' % dso_suffix)
if sys.platform == 'darwin':
- # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew)
- makefile_conf.extend([
- 'LIBEXT=.dylib',
- 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib),
- 'RANLIB=echo'
- ])
+ makefile_conf.append(
+ 'LDFLAGS = -dynamiclib -Wl,-install_name -Wl,{0}/$(notdir $@) {1}{0} -undefined dynamic_lookup'.format(prefix.lib, self.compiler.fc_rpath_arg) # NOQA: E501
+ )
else:
- makefile_conf.extend([
- 'LIBEXT=.so',
- 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib,
- 'RANLIB=echo'
- ])
- else:
- makefile_conf.extend([
- 'LIBEXT = .a',
- 'AR = ar vr',
- 'RANLIB = ranlib'
- ])
-
-
- makefile_inc_template = join_path(os.path.dirname(self.module.__file__),
- 'Makefile.inc')
+ makefile_conf.append(
+ 'LDFLAGS = -shared {0}{1}'.format(
+ self.compiler.fc_rpath_arg,
+ prefix.lib)
+ )
+
+ makefile_conf.extend([
+ 'LIBEXT = .a',
+ 'AR = ar vr ',
+ 'RANLIB = ranlib'
+ ])
+
+ makefile_inc_template = \
+ join_path(os.path.dirname(self.module.__file__),
+ 'Makefile.inc')
with open(makefile_inc_template, "r") as fh:
makefile_conf.extend(fh.read().split('\n'))
@@ -164,46 +179,53 @@ class Mumps(Package):
makefile_inc = '\n'.join(makefile_conf)
fh.write(makefile_inc)
-
-
def install(self, spec, prefix):
make_libs = []
# the choice to compile ?examples is to have kind of a sanity
# check on the libraries generated.
if '+float' in spec:
- make_libs.append('sexamples')
+ make_libs.append('s')
if '+complex' in spec:
- make_libs.append('cexamples')
+ make_libs.append('c')
if '+double' in spec:
- make_libs.append('dexamples')
+ make_libs.append('d')
if '+complex' in spec:
- make_libs.append('zexamples')
+ make_libs.append('z')
self.write_makefile_inc()
- # Build fails in parallel
- make(*make_libs, parallel=False)
+ make('mumps_lib', parallel=False)
+ make(*make_libs)
install_tree('lib', prefix.lib)
install_tree('include', prefix.include)
- if '~mpi' in spec:
- lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
- lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
- install('libseq/libmpiseq%s' % lib_suffix, prefix.lib)
- for f in glob.glob(join_path('libseq','*.h')):
- install(f, prefix.include)
-
- # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI
- # FIXME: use something like numdiff to compare blessed output with the current
- with working_dir('examples'):
- if '+float' in spec:
- os.system('./ssimpletest < input_simpletest_real')
- if '+complex' in spec:
- os.system('./csimpletest < input_simpletest_real')
- if '+double' in spec:
- os.system('./dsimpletest < input_simpletest_real')
- if '+complex' in spec:
- os.system('./zsimpletest < input_simpletest_cmplx')
+ if '~mpi' in spec:
+ install('libseq/libmpiseq.a', prefix.lib)
+ if '+shared' in spec:
+ install('libseq/libmpiseq.{0}'.format(dso_suffix), prefix.lib)
+ install('libseq/mpi.h', prefix.include)
+ install('libseq/mpif.h', prefix.include)
+
+ # FIXME: extend the tests to mpirun -np 2 (or alike) when
+ # build with MPI
+ # FIXME: use something like numdiff to compare blessed output
+ # with the current
+ # TODO: test the installed mumps and not the one in stage
+ if '~mpi' in spec:
+ for t in make_libs:
+ make('{0}examples'.format(t))
+
+ with working_dir('examples'):
+ for t in make_libs:
+ input_file = 'input_simpletest_{0}'.format(
+ 'real' if t in ['s', 'd'] else 'cmplx')
+ with open(input_file) as input:
+ test = './{0}simpletest'.format(t)
+ ret = subprocess.call(test,
+ stdin=input)
+ if ret is not 0:
+ raise RuntimeError(
+ 'The test {0} did not pass'.format(test))
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index d1944023d1..da386445bb 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -23,7 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Mvapich2(Package):
@@ -192,6 +191,11 @@ class Mvapich2(Package):
run_env.set('SLURM_MPI_TYPE', 'pmi2')
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
+ spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc'))
+ spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpicxx'))
+ spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77'))
+ spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90'))
+
spack_env.set('MPICH_CC', spack_cc)
spack_env.set('MPICH_CXX', spack_cxx)
spack_env.set('MPICH_F77', spack_f77)
@@ -245,27 +249,20 @@ class Mvapich2(Package):
be bound to whatever compiler they were built with.
"""
bin = self.prefix.bin
- mpicc = os.path.join(bin, 'mpicc')
- mpicxx = os.path.join(bin, 'mpicxx')
- mpif77 = os.path.join(bin, 'mpif77')
- mpif90 = os.path.join(bin, 'mpif90')
-
- spack_cc = os.environ['CC']
- spack_cxx = os.environ['CXX']
- spack_f77 = os.environ['F77']
- spack_fc = os.environ['FC']
-
- kwargs = {
- 'ignore_absent': True,
- 'backup': False,
- 'string': True
- }
-
- filter_file('CC="%s"' % spack_cc,
- 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
- filter_file('CXX="%s"' % spack_cxx,
- 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
- filter_file('F77="%s"' % spack_f77,
- 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
- filter_file('FC="%s"' % spack_fc,
- 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
+ mpicc = join_path(bin, 'mpicc')
+ mpicxx = join_path(bin, 'mpicxx')
+ mpif77 = join_path(bin, 'mpif77')
+ mpif90 = join_path(bin, 'mpif90')
+
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+ filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
+ filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
+ filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
+
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ for wrapper in (mpicc, mpicxx, mpif77, mpif90):
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py
index f79251d312..254a5f1595 100644
--- a/var/spack/packages/mxml/package.py
+++ b/var/spack/repos/builtin/packages/mxml/package.py
@@ -1,14 +1,15 @@
-import os
from spack import *
+
class Mxml(Package):
- """Mini-XML is a small XML library that you can use to read and write XML
- and XML-like data files in your application without requiring large
- non-standard libraries
+ """
+ Mini-XML is a small XML library that you can use to read and write XML
+ and XML-like data files in your application without requiring large
+ non-standard libraries
"""
homepage = "http://www.msweet.org"
- url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz"
+ url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz"
version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19')
version('2.8', 'd85ee6d30de053581242c4a86e79a5d2')
@@ -16,11 +17,11 @@ class Mxml(Package):
version('2.6', '68977789ae64985dddbd1a1a1652642e')
version('2.5', 'f706377fba630b39fa02fd63642b17e5')
- # module swap PrgEnv-intel PrgEnv-$COMP (Can use whatever compiler you want to use)
+ # module swap PrgEnv-intel PrgEnv-$COMP
+ # (Can use whatever compiler you want to use)
# Case statement to change CC and CXX flags
def install(self, spec, prefix):
configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static')
make()
make("install")
-
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
index 3d1951ceee..e52ff1af87 100644
--- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
@@ -24,12 +24,14 @@
##############################################################################
from spack import *
+
class NetcdfFortran(Package):
"""Fortran interface for NetCDF4"""
homepage = "http://www.unidata.ucar.edu/software/netcdf"
url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.4.3.tar.gz"
+ version('4.4.4', 'e855c789cd72e1b8bc1354366bf6ac72')
version('4.4.3', 'bfd4ae23a34635b273d3eb0d91cbde9e')
depends_on('netcdf')
diff --git a/var/spack/repos/builtin/packages/octave-splines/package.py b/var/spack/repos/builtin/packages/octave-splines/package.py
new file mode 100644
index 0000000000..11c9cc5ba7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/octave-splines/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 OctaveSplines(Package):
+ """Additional spline functions."""
+
+ homepage = "http://octave.sourceforge.net/splines/index.html"
+ url = "http://downloads.sourceforge.net/octave/splines-1.3.1.tar.gz"
+
+ version('1.3.1', 'f9665d780c37aa6a6e17d1f424c49bdeedb89d1192319a4e39c08784122d18f9')
+
+ extends('octave@3.6.0:')
+
+ def install(self, spec, prefix):
+ octave('--quiet',
+ '--norc',
+ '--built-in-docstrings-file=/dev/null',
+ '--texi-macros-file=/dev/null',
+ '--eval', 'pkg prefix %s; pkg install %s' %
+ (prefix, self.stage.archive_file))
diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py
index 72ff0ee6fc..f97bfc7d12 100644
--- a/var/spack/repos/builtin/packages/octave/package.py
+++ b/var/spack/repos/builtin/packages/octave/package.py
@@ -36,6 +36,8 @@ class Octave(Package):
homepage = "https://www.gnu.org/software/octave/"
url = "ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz"
+ extendable = True
+
version('4.0.2', 'c2a5cacc6e4c52f924739cdf22c2c687')
version('4.0.0', 'a69f8320a4f20a8480c1b278b1adb799')
@@ -212,3 +214,16 @@ class Octave(Package):
make()
make("install")
+
+ # ========================================================================
+ # Set up environment to make install easy for Octave extensions.
+ # ========================================================================
+
+ def setup_dependent_package(self, module, ext_spec):
+ """Called before Octave modules' install() methods.
+
+ In most cases, extensions will only need to have one line:
+ octave('--eval', 'pkg install %s' % self.stage.archive_file)
+ """
+ # Octave extension builds can have a global Octave executable function
+ module.octave = Executable(join_path(self.spec.prefix.bin, 'octave'))
diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py
index 9b2063593a..1d00edb06d 100644
--- a/var/spack/repos/builtin/packages/openjpeg/package.py
+++ b/var/spack/repos/builtin/packages/openjpeg/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class Openjpeg(Package):
"""
OpenJPEG is an open-source JPEG 2000 codec written in C language.
@@ -36,12 +37,13 @@ class Openjpeg(Package):
homepage = "https://github.com/uclouvain/openjpeg"
url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
- version('2.1' , '3e1c451c087f8462955426da38aa3b3d')
+ version('2.1', '3e1c451c087f8462955426da38aa3b3d')
version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5')
- version('2.0' , 'cdf266530fee8af87454f15feb619609')
+ version('2.0', 'cdf266530fee8af87454f15feb619609')
version('1.5.2', '545f98923430369a6b046ef3632ef95c')
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
+ depends_on('cmake')
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index be3d1342fc..15c8eefe96 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -24,6 +24,8 @@
##############################################################################
import os
+import llnl.util.tty as tty
+
from spack import *
@@ -61,6 +63,7 @@ class Openmpi(Package):
list_url = "http://www.open-mpi.org/software/ompi/"
list_depth = 3
+ version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b')
version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c')
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
version('1.10.0', '280cf952de68369cebaca886c5ce0304')
@@ -72,20 +75,27 @@ class Openmpi(Package):
patch('configure.patch', when="@1.10.0:1.10.1")
variant('psm', default=False, description='Build support for the PSM library.')
- variant('psm2', default=False, description='Build support for the Intel PSM2 library.')
- variant('pmi', default=False, description='Build support for PMI-based launchers')
- variant('verbs', default=_verbs_dir() is not None, description='Build support for OpenFabrics verbs.')
+ variant('psm2', default=False,
+ description='Build support for the Intel PSM2 library.')
+ variant('pmi', default=False,
+ description='Build support for PMI-based launchers')
+ variant('verbs', default=_verbs_dir() is not None,
+ description='Build support for OpenFabrics verbs.')
variant('mxm', default=False, description='Build Mellanox Messaging support')
- variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support')
+ variant('thread_multiple', default=False,
+ description='Enable MPI_THREAD_MULTIPLE support')
# TODO : variant support for alps, loadleveler is missing
- variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support')
- variant('slurm', default=False, description='Build SLURM scheduler component')
+ variant('tm', default=False,
+ description='Build TM (Torque, PBSPro, and compatible) support')
+ variant('slurm', default=False,
+ description='Build SLURM scheduler component')
variant('sqlite3', default=False, description='Build sqlite3 support')
- variant('vt', default=True, description='Build support for contributed package vt')
+ variant('vt', default=True,
+ description='Build support for contributed package vt')
# TODO : support for CUDA is missing
@@ -96,24 +106,44 @@ class Openmpi(Package):
depends_on('sqlite', when='+sqlite3')
def url_for_version(self, version):
- return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
-
+ return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) # NOQA: ignore=E501
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc'))
+ spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpic++'))
+ spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77'))
+ spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90'))
+
spack_env.set('OMPI_CC', spack_cc)
spack_env.set('OMPI_CXX', spack_cxx)
spack_env.set('OMPI_FC', spack_fc)
spack_env.set('OMPI_F77', spack_f77)
def setup_dependent_package(self, module, dep_spec):
- self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
+ self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
- self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
+ self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
+ def setup_environment(self, spack_env, run_env):
+ # As of 06/2016 there is no mechanism to specify that packages which
+ # depends on MPI need C or/and Fortran implementation. For now
+ # require both.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ tty.warn('OpenMPI : FORTRAN compiler not found')
+ tty.warn('OpenMPI : FORTRAN bindings will be disabled')
+ spack_env.unset('FC')
+ spack_env.unset('F77')
+ # Setting an attribute here and using it in the 'install'
+ # method is needed to ensure tty.warn is actually displayed
+ # to user and not redirected to spack-build.out
+ self.config_extra = ['--enable-mpi-fortran=none',
+ '--disable-oshmem-fortran']
+
@property
def verbs(self):
- # Up through version 1.6, this option was previously named --with-openib
+ # Up through version 1.6, this option was previously named
+ # --with-openib
if self.spec.satisfies('@:1.6'):
return 'openib'
# In version 1.7, it was renamed to be --with-verbs
@@ -121,17 +151,14 @@ class Openmpi(Package):
return 'verbs'
def install(self, spec, prefix):
- # As of 06/2016 there is no mechanism to specify that packages which
- # depends on MPI need C or/and Fortran implementation. For now
- # require both.
- if (self.compiler.f77 is None) or (self.compiler.fc is None):
- raise InstallError('OpenMPI requires both C and Fortran ',
- 'compilers!')
-
config_args = ["--prefix=%s" % prefix,
"--with-hwloc=%s" % spec['hwloc'].prefix,
"--enable-shared",
"--enable-static"]
+
+ if getattr(self, 'config_extra', None) is not None:
+ config_args.extend(self.config_extra)
+
# Variant based arguments
config_args.extend([
# Schedulers
@@ -142,7 +169,7 @@ class Openmpi(Package):
'--with-psm2' if '+psm2' in spec else '--without-psm2',
'--with-mxm' if '+mxm' in spec else '--without-mxm',
# Other options
- '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple',
+ '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', # NOQA: ignore=E501
'--with-pmi' if '+pmi' in spec else '--without-pmi',
'--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3',
'--enable-vt' if '+vt' in spec else '--disable-vt'
@@ -160,10 +187,7 @@ class Openmpi(Package):
# use this for LANL builds, but for LLNL builds, we need:
# "--with-platform=contrib/platform/llnl/optimized"
if self.version == ver("1.6.5") and '+lanl' in spec:
- config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
-
- if not self.compiler.f77 and not self.compiler.fc:
- config_args.append("--enable-mpi-fortran=no")
+ config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") # NOQA: ignore=E501
configure(*config_args)
make()
@@ -180,40 +204,33 @@ class Openmpi(Package):
be bound to whatever compiler they were built with.
"""
kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
- dir = os.path.join(self.prefix, 'share/openmpi/')
-
- cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt',
- 'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt']
-
- cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt',
- 'ortec++-wrapper-data.txt']
-
- fc_wrappers = ['mpifort-vt-wrapper-data.txt',
- 'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt']
-
- for wrapper in cc_wrappers:
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc,
- os.path.join(dir, wrapper), **kwargs)
-
- for wrapper in cxx_wrappers:
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx,
- os.path.join(dir, wrapper), **kwargs)
-
- for wrapper in fc_wrappers:
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
- os.path.join(dir, wrapper), **kwargs)
-
- # These are symlinks in newer versions, so check that here
- f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt']
- f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt']
-
- for wrapper in f77_wrappers:
- path = os.path.join(dir, wrapper)
- if not os.path.islink(path):
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77,
- path, **kwargs)
- for wrapper in f90_wrappers:
- path = os.path.join(dir, wrapper)
- if not os.path.islink(path):
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
- path, **kwargs)
+ wrapper_basepath = join_path(self.prefix, 'share', 'openmpi')
+
+ wrappers = [
+ ('mpicc-vt-wrapper-data.txt', self.compiler.cc),
+ ('mpicc-wrapper-data.txt', self.compiler.cc),
+ ('ortecc-wrapper-data.txt', self.compiler.cc),
+ ('shmemcc-wrapper-data.txt', self.compiler.cc),
+ ('mpic++-vt-wrapper-data.txt', self.compiler.cxx),
+ ('mpic++-wrapper-data.txt', self.compiler.cxx),
+ ('ortec++-wrapper-data.txt', self.compiler.cxx),
+ ('mpifort-vt-wrapper-data.txt', self.compiler.fc),
+ ('mpifort-wrapper-data.txt', self.compiler.fc),
+ ('shmemfort-wrapper-data.txt', self.compiler.fc),
+ ('mpif90-vt-wrapper-data.txt', self.compiler.fc),
+ ('mpif90-wrapper-data.txt', self.compiler.fc),
+ ('mpif77-vt-wrapper-data.txt', self.compiler.f77),
+ ('mpif77-wrapper-data.txt', self.compiler.f77)
+ ]
+
+ for wrapper_name, compiler in wrappers:
+ wrapper = join_path(wrapper_basepath, wrapper_name)
+ if not os.path.islink(wrapper):
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
+ match = 'compiler=.*'
+ substitute = 'compiler={compiler}'.format(compiler=compiler)
+ filter_file(match, substitute, wrapper, **kwargs)
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py
new file mode 100644
index 0000000000..02be777c36
--- /dev/null
+++ b/var/spack/repos/builtin/packages/parmgridgen/package.py
@@ -0,0 +1,71 @@
+##############################################################################
+# 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 Parmgridgen(Package):
+ """MGRIDGEN is a serial library written entirely in ANSI C that implements
+ (serial) algorithms for obtaining a sequence of successive coarse grids
+ that are well-suited for geometric multigrid methods.
+ ParMGridGen is the parallel version of MGridGen
+ """
+
+ homepage = "http://www-users.cs.umn.edu/~moulitsa/software.html"
+ url = "http://www-users.cs.umn.edu/~moulitsa/download/ParMGridGen-1.0.tar.gz"
+
+ version('1.0', '2872fa95b7fb91d6bd525490eed62038')
+
+ depends_on('mpi')
+
+ def install(self, spec, prefix):
+ make_opts = [
+ 'make=make',
+ 'COPTIONS=-fPIC',
+ 'LDOPTIONS=-fPIC',
+ 'CC={0}'.format(self.compiler.cc),
+ 'PARCC={0}'.format(spec['mpi'].mpicc),
+ 'LD={0}'.format(self.compiler.cc),
+ 'PARLD={0}'.format(spec['mpi'].mpicc),
+ 'LIBDIR=-L../..',
+ 'PARLIBS=-L../../ -lparmgrid -lmgrid -lm',
+ 'LIBS=-L../../ -lmgrid -lm',
+ 'parallel'
+ ]
+
+ make(*make_opts, parallel=False)
+
+ mkdirp(prefix.include, prefix.lib, prefix.bin)
+
+ install("mgridgen.h", prefix.include)
+ install("parmgridgen.h", prefix.include)
+
+ install("MGridGen/IMlib/libIMlib.a",
+ join_path(prefix.lib, 'libIMlib.a'))
+ install("libmgrid.a", prefix.lib)
+ install("libparmgrid.a", prefix.lib)
+
+ install("mgridgen", prefix.bin)
+ install("parmgridgen", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py
index 8e0f83110e..a43729a1ac 100644
--- a/var/spack/repos/builtin/packages/pcre/package.py
+++ b/var/spack/repos/builtin/packages/pcre/package.py
@@ -29,6 +29,7 @@ class Pcre(Package):
"""The PCRE package contains Perl Compatible Regular Expression
libraries. These are useful for implementing regular expression
pattern matching using the same syntax and semantics as Perl 5."""
+
homepage = "http://www.pcre.org"""
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2"
@@ -37,7 +38,15 @@ class Pcre(Package):
patch("intel.patch")
+ variant('utf', default=True,
+ description='Enable support for UTF-8/16/32, '
+ 'incompatible with EBCDIC.')
+
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure_args = ['--prefix=%s' % prefix]
+ if '+utf' in spec:
+ configure_args.append('--enable-utf')
+
+ configure(*configure_args)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 6456a1aabf..8dd1d8d2b9 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -28,13 +28,16 @@ from spack import *
class Petsc(Package):
"""
- PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications
- modeled by partial differential equations.
+ PETSc is a suite of data structures and routines for the scalable
+ (parallel) solution of scientific applications modeled by partial
+ differential equations.
"""
homepage = "http://www.mcs.anl.gov/petsc/index.html"
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
+ version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34')
+ version('3.6.4', '7632da2375a3df35b8891c9526dbdde7')
version('3.6.3', '91dd3522de5a5ef039ff8f50800db606')
version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13')
@@ -69,10 +72,12 @@ class Petsc(Package):
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('parmetis', when='+metis+mpi')
# Hypre does not support complex numbers.
- # Also PETSc prefer to build it without internal superlu, likely due to conflict in headers
- # see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py
+ # Also PETSc prefer to build it without internal superlu, likely due to
+ # conflict in headers see
+ # https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py # NOQA: ignore=E501
depends_on('hypre~internal-superlu', when='+hypre+mpi~complex')
- depends_on('superlu-dist', when='+superlu-dist+mpi')
+ depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi')
+ depends_on('superlu-dist@5.0.0:', when='@3.7:+superlu-dist+mpi')
depends_on('mumps+mpi', when='+mumps+mpi')
depends_on('scalapack', when='+mumps+mpi')
@@ -80,17 +85,17 @@ class Petsc(Package):
if '~mpi' in self.spec:
compiler_opts = [
'--with-cc=%s' % os.environ['CC'],
- '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'),
- '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'),
+ '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'), # NOQA: ignore=E501
+ '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'), # NOQA: ignore=E501
'--with-mpi=0'
]
- error_message_fmt = '\t{library} support requires "+mpi" to be activated'
+ error_message_fmt = '\t{library} support requires "+mpi" to be activated' # NOQA: ignore=E501
- # If mpi is disabled (~mpi), it's an error to have any of these enabled.
- # This generates a list of any such errors.
+ # If mpi is disabled (~mpi), it's an error to have any of these
+ # enabled. This generates a list of any such errors.
errors = [error_message_fmt.format(library=x)
- for x in ('hdf5', 'hypre', 'parmetis','mumps','superlu-dist')
- if ('+'+x) in self.spec]
+ for x in ('hdf5', 'hypre', 'parmetis', 'mumps', 'superlu-dist') # NOQA: ignore=E501
+ if ('+' + x) in self.spec]
if errors:
errors = ['incompatible variants given'] + errors
raise RuntimeError('\n'.join(errors))
@@ -105,26 +110,31 @@ class Petsc(Package):
options = ['--with-ssl=0']
options.extend(self.mpi_dependent_options())
options.extend([
- '--with-precision=%s' % ('double' if '+double' in spec else 'single'),
- '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'),
+ '--with-precision=%s' % ('double' if '+double' in spec else 'single'), # NOQA: ignore=E501
+ '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), # NOQA: ignore=E501
'--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
'--with-debugging=%s' % ('1' if '+debug' in spec else '0'),
'--with-blas-lapack-dir=%s' % spec['lapack'].prefix
])
# Activates library support if needed
- for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis','mumps','scalapack'):
+ for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis',
+ 'mumps', 'scalapack'):
options.append(
- '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0'))
+ '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) # NOQA: ignore=E501
)
if library in spec:
options.append(
- '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix)
+ '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) # NOQA: ignore=E501
)
- # PETSc does not pick up SuperluDist from the dir as they look for superlu_dist_4.1.a
+ # PETSc does not pick up SuperluDist from the dir as they look for
+ # superlu_dist_4.1.a
if 'superlu-dist' in spec:
options.extend([
- '--with-superlu_dist-include=%s' % spec['superlu-dist'].prefix.include,
- '--with-superlu_dist-lib=%s' % join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'),
+ '--with-superlu_dist-include=%s' %
+ spec['superlu-dist'].prefix.include,
+ '--with-superlu_dist-lib=%s' %
+ join_path(spec['superlu-dist'].prefix.lib,
+ 'libsuperlu_dist.a'),
'--with-superlu_dist=1'
])
else:
diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py
index 9362234881..caf3768362 100644
--- a/var/spack/repos/builtin/packages/postgresql/package.py
+++ b/var/spack/repos/builtin/packages/postgresql/package.py
@@ -24,18 +24,21 @@
##############################################################################
from spack import *
+
class Postgresql(Package):
- """PostgreSQL is a powerful, open source object-relational
- database system. It has more than 15 years of active
- development and a proven architecture that has earned it a
- strong reputation for reliability, data integrity, and
- correctness."""
+ """PostgreSQL is a powerful, open source object-relational database system.
+ It has more than 15 years of active development and a proven architecture
+ that has earned it a strong reputation for reliability, data integrity, and
+ correctness."""
+
homepage = "http://www.postgresql.org/"
url = "http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2"
version('9.3.4', 'd0a41f54c377b2d2fab4a003b0dac762')
+ version('9.5.3', '3f0c388566c688c82b01a0edf1e6b7a0')
- depends_on("openssl")
+ depends_on('openssl')
+ depends_on('readline')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
new file mode 100644
index 0000000000..fc77ba7412
--- /dev/null
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -0,0 +1,115 @@
+##############################################################################
+# 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 *
+import os
+
+
+class Psi4(Package):
+ """Psi4 is an open-source suite of ab initio quantum chemistry
+ programs designed for efficient, high-accuracy simulations of
+ a variety of molecular properties."""
+
+ homepage = "http://www.psicode.org/"
+ url = "https://github.com/psi4/psi4/archive/0.5.tar.gz"
+
+ version('0.5', '53041b8a9be3958384171d0d22f9fdd0')
+
+ # Required dependencies
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('boost+chrono+filesystem+python+regex+serialization+system+timer+thread')
+ depends_on('python')
+ depends_on('cmake')
+ depends_on('py-numpy')
+
+ # Optional dependencies
+ # TODO: add packages for these
+ # depends_on('perl')
+ # depends_on('erd')
+ # depends_on('pcm-solver')
+ # depends_on('chemps2')
+
+ def install(self, spec, prefix):
+ cmake_args = [
+ '-DBLAS_TYPE={0}'.format(spec['blas'].name.upper()),
+ '-DBLAS_LIBRARIES={0}'.format(spec['blas'].blas_shared_lib),
+ '-DLAPACK_TYPE={0}'.format(spec['lapack'].name.upper()),
+ '-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib),
+ '-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include),
+ '-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib),
+ '-DENABLE_CHEMPS2=OFF'
+ ]
+
+ cmake_args.extend(std_cmake_args)
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
+
+ self.filter_compilers(spec, prefix)
+
+ def filter_compilers(self, spec, prefix):
+ """Run after install to tell the configuration files to
+ use the compilers that Spack built the package with.
+
+ If this isn't done, they'll have PLUGIN_CXX set to
+ Spack's generic cxx. We want it to be bound to
+ whatever compiler it was built with."""
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+
+ cc_files = ['bin/psi4-config']
+ cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h']
+ template = 'share/psi4/plugin/Makefile.template'
+
+ for filename in cc_files:
+ filter_file(os.environ['CC'], self.compiler.cc,
+ os.path.join(prefix, filename), **kwargs)
+
+ for filename in cxx_files:
+ filter_file(os.environ['CXX'], self.compiler.cxx,
+ os.path.join(prefix, filename), **kwargs)
+
+ # The binary still keeps track of the compiler used to install Psi4
+ # and uses it when creating a plugin template
+ filter_file('@PLUGIN_CXX@', self.compiler.cxx,
+ os.path.join(prefix, template), **kwargs)
+
+ # The binary links to the build include directory instead of the
+ # installation include directory:
+ # https://github.com/psi4/psi4/issues/410
+ filter_file('@PLUGIN_INCLUDES@', '-I{0}'.format(
+ ' -I'.join([
+ os.path.join(spec['psi4'].prefix.include, 'psi4'),
+ os.path.join(spec['boost'].prefix.include, 'boost'),
+ os.path.join(spec['python'].prefix.include, 'python{0}'.format(
+ spec['python'].version.up_to(2))),
+ spec['lapack'].prefix.include,
+ spec['blas'].prefix.include,
+ '/usr/include'
+ ])
+ ), os.path.join(prefix, template), **kwargs)
diff --git a/var/spack/repos/builtin/packages/py-3to2/package.py b/var/spack/repos/builtin/packages/py-3to2/package.py
new file mode 100644
index 0000000000..1071a3c209
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-3to2/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# 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 Py3to2(Package):
+ """lib3to2 is a set of fixers that are intended to backport code written
+ for Python version 3.x into Python version 2.x."""
+
+ homepage = "https://pypi.python.org/pypi/3to2"
+ url = "https://pypi.python.org/packages/source/3/3to2/3to2-1.1.1.zip"
+
+ version('1.1.1', 'cbeed28e350dbdaef86111ace3052824')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py
index 95d02bce91..13f604bacd 100644
--- a/var/spack/repos/builtin/packages/py-basemap/package.py
+++ b/var/spack/repos/builtin/packages/py-basemap/package.py
@@ -23,10 +23,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
+
class PyBasemap(Package):
- """The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python."""
+ """The matplotlib basemap toolkit is a library for plotting
+ 2D data on maps in Python."""
+
homepage = "http://matplotlib.org/basemap/"
url = "https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz"
@@ -36,7 +38,7 @@ class PyBasemap(Package):
depends_on('py-setuptools')
depends_on('py-numpy')
depends_on('py-matplotlib+gui')
- depends_on('py-pillow')
+ depends_on('pil')
depends_on("geos")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-pil/package.py b/var/spack/repos/builtin/packages/py-pil/package.py
index dc4418fdfe..2b3cce26d3 100644
--- a/var/spack/repos/builtin/packages/py-pil/package.py
+++ b/var/spack/repos/builtin/packages/py-pil/package.py
@@ -24,14 +24,19 @@
##############################################################################
from spack import *
+
class PyPil(Package):
- """The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities."""
+ """The Python Imaging Library (PIL) adds image processing capabilities
+ to your Python interpreter. This library supports many file formats,
+ and provides powerful image processing and graphics capabilities."""
homepage = "http://www.pythonware.com/products/pil/"
url = "http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz"
version('1.1.7', 'fc14a54e1ce02a0225be8854bfba478e')
+ provides('pil')
+
extends('python')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py
index cdbc57e0a5..25cf412b31 100644
--- a/var/spack/repos/builtin/packages/py-pillow/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow/package.py
@@ -23,77 +23,108 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
+
class PyPillow(Package):
- """Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities."""
+ """Pillow is a fork of the Python Imaging Library (PIL). It adds image
+ processing capabilities to your Python interpreter. This library supports
+ many file formats, and provides powerful image processing and graphics
+ capabilities."""
- homepage = "https://python-pillow.github.io/"
+ homepage = "https://python-pillow.org/"
url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
+ # TODO: This version should be deleted once the next release comes out.
+ # TODO: It fixes a bug that prevented us from linking to Tk/Tcl.
+ # TODO: Tk/Tcl support is necessary for tkinter bitmap and photo images.
+ # TODO: If you require this support, run the following command:
+ # TODO: `spack install py-pillow@3.3.0.dev0 ^python+tk`
+ version('3.3.0.dev0', git='https://github.com/python-pillow/Pillow.git',
+ commit='30eced62868141a6c859a4370efd40b9434a7c3f')
+
+ version('3.2.0', '7cfd093c11205d9e2ebe3c51dfcad510', preferred=True)
version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d')
- provides('PIL')
+
+ provides('pil')
# These defaults correspond to Pillow defaults
variant('jpeg', default=True, description='Provide JPEG functionality')
variant('zlib', default=True, description='Access to compressed PNGs')
variant('tiff', default=False, description='Access to TIFF files')
variant('freetype', default=False, description='Font related services')
- variant('tk', default=False, description='Support for tkinter bitmap and photo images')
variant('lcms', default=False, description='Color management')
+ variant('jpeg2000', default=False, description='Provide JPEG 2000 functionality')
# Spack does not (yet) support these modes of building
- # variant('webp', default=False, description='')
- # variant('webpmux', default=False, description='')
- # variant('jpeg2000', default=False, description='')
+ # variant('webp', default=False, description='Provide the WebP format')
+ # variant('webpmux', default=False, description='WebP metadata, relies on WebP support') # NOQA: ignore=E501
+ # variant('imagequant', default=False, description='Provide improved color quantization') # NOQA: ignore=E501
+ # Required dependencies
extends('python')
depends_on('binutils')
depends_on('py-setuptools')
- depends_on('jpeg', when='+jpeg') # BUG: It will use the system libjpeg anyway
+ # Recommended dependencies
+ depends_on('jpeg', when='+jpeg')
depends_on('zlib', when='+zlib')
- depends_on('tiff', when='+tiff')
+
+ # Optional dependencies
+ depends_on('libtiff', when='+tiff')
depends_on('freetype', when='+freetype')
depends_on('lcms', when='+lcms')
- depends_on('tcl', when='+tk')
- depends_on('tk', when='+tk')
+ depends_on('openjpeg', when='+jpeg2000')
- def install(self, spec, prefix):
- libpath=[]
+ # Spack does not (yet) support these modes of building
+ # depends_on('webp', when='+webp')
+ # depends_on('webpmux', when='+webpmux')
+ # depends_on('imagequant', when='+imagequant')
+
+ def patch(self):
+ """Patch setup.py to provide lib and include directories
+ for dependencies."""
+
+ spec = self.spec
+ setup = FileFilter('setup.py')
if '+jpeg' in spec:
- libpath.append(join_path(spec['jpeg'].prefix, 'lib'))
+ setup.filter('JPEG_ROOT = None',
+ 'JPEG_ROOT = ("{0}", "{1}")'.format(
+ spec['jpeg'].prefix.lib,
+ spec['jpeg'].prefix.include))
if '+zlib' in spec:
- libpath.append(join_path(spec['zlib'].prefix, 'lib'))
+ setup.filter('ZLIB_ROOT = None',
+ 'ZLIB_ROOT = ("{0}", "{1}")'.format(
+ spec['zlib'].prefix.lib,
+ spec['zlib'].prefix.include))
if '+tiff' in spec:
- libpath.append(join_path(spec['tiff'].prefix, 'lib'))
+ setup.filter('TIFF_ROOT = None',
+ 'TIFF_ROOT = ("{0}", "{1}")'.format(
+ spec['libtiff'].prefix.lib,
+ spec['libtiff'].prefix.include))
if '+freetype' in spec:
- libpath.append(join_path(spec['freetype'].prefix, 'lib'))
+ setup.filter('FREETYPE_ROOT = None',
+ 'FREETYPE_ROOT = ("{0}", "{1}")'.format(
+ spec['freetype'].prefix.lib,
+ spec['freetype'].prefix.include))
if '+lcms' in spec:
- libpath.append(join_path(spec['lcms'].prefix, 'lib'))
-
- # This has not been tested, and likely needs some other treatment.
- #if '+tk' in spec:
- # libpath.append(join_path(spec['tcl'].prefix, 'lib'))
- # libpath.append(join_path(spec['tk'].prefix, 'lib'))
-
- # -------- Building
- cmd = ['build_ext',
- '--%s-jpeg' % ('enable' if '+jpeg' in spec else 'disable'),
- '--%s-zlib' % ('enable' if '+zlib' in spec else 'disable'),
- '--%s-tiff' % ('enable' if '+tiff' in spec else 'disable'),
- '--%s-freetype' % ('enable' if '+freetype' in spec else 'disable'),
- '--%s-lcms' % ('enable' if '+lcms' in spec else 'disable'),
- '-L'+':'.join(libpath) # NOTE: This does not make it find libjpeg
- ]
-
- #if '+tk' in spec:
- # cmd.extend(['--enable-tcl', '--enable-tk'])
- #else:
- # cmd.extend(['--disable-tcl', '--disable-tk'])
-
- # --------- Installation
- cmd.extend(['install', '--prefix=%s' % prefix])
-
- python('setup.py', *cmd)
+ setup.filter('LCMS_ROOT = None',
+ 'LCMS_ROOT = ("{0}", "{1}")'.format(
+ spec['lcms'].prefix.lib,
+ spec['lcms'].prefix.include))
+ if '+jpeg2000' in spec:
+ setup.filter('JPEG2K_ROOT = None',
+ 'JPEG2K_ROOT = ("{0}", "{1}")'.format(
+ spec['openjpeg'].prefix.lib,
+ spec['openjpeg'].prefix.include))
+
+ def install(self, spec, prefix):
+ def variant_to_flag(variant):
+ able = 'enable' if '+{0}'.format(variant) in spec else 'disable'
+ return '--{0}-{1}'.format(able, variant)
+
+ variants = ['jpeg', 'zlib', 'tiff', 'freetype', 'lcms', 'jpeg2000']
+ build_args = list(map(variant_to_flag, variants))
+
+ python('setup.py', 'build_ext', *build_args)
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py
new file mode 100644
index 0000000000..da3a65c22e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-protobuf/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 PyProtobuf(Package):
+ """Protocol buffers are Google's language-neutral, platform-neutral,
+ extensible mechanism for serializing structured data - think XML, but
+ smaller, faster, and simpler. You define how you want your data to be
+ structured once, then you can use special generated source code to easily
+ write and read your structured data to and from a variety of data streams
+ and using a variety of languages."""
+
+ homepage = 'https://developers.google.com/protocol-buffers/'
+ url = 'https://pypi.python.org/packages/source/p/protobuf/protobuf-3.0.0b2.tar.gz'
+
+ version('3.0.0b2', 'f0d3bd2394345a9af4a277cd0302ae83')
+ version('2.6.1', '6bf843912193f70073db7f22e2ea55e2')
+ version('2.5.0', '338813f3629d59e9579fed9035ecd457')
+ version('2.4.1', '72f5141d20ab1bcae6b1e00acfb1068a')
+ version('2.3.0', 'bb020c962f252fe81bfda8fb433bafdd')
+
+ extends('python')
+
+ depends_on('py-setuptools')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py
index 0479e9eb0a..4c8fd0942a 100644
--- a/var/spack/repos/builtin/packages/py-scikit-image/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py
@@ -24,8 +24,11 @@
##############################################################################
from spack import *
+
class PyScikitImage(Package):
- """Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc."""
+ """Image processing algorithms for SciPy, including IO, morphology,
+ filtering, warping, color manipulation, object detection, etc."""
+
homepage = "http://scikit-image.org/"
url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz"
@@ -34,7 +37,7 @@ class PyScikitImage(Package):
extends('python', ignore=r'bin/.*\.py$')
depends_on('py-dask')
- depends_on('py-pillow')
+ depends_on('pil')
depends_on('py-networkx')
depends_on('py-six')
depends_on('py-scipy')
diff --git a/var/spack/repos/builtin/packages/py-unittest2/package.py b/var/spack/repos/builtin/packages/py-unittest2/package.py
new file mode 100644
index 0000000000..f669a500ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-unittest2/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 PyUnittest2(Package):
+ """unittest2 is a backport of the new features added to the unittest
+ testing framework in Python 2.7 and onwards."""
+
+ homepage = "https://pypi.python.org/pypi/unittest2"
+ url = "https://pypi.python.org/packages/source/u/unittest2/unittest2-1.1.0.tar.gz"
+
+ version('1.1.0', 'f72dae5d44f091df36b6b513305ea000')
+
+ extends('python')
+ depends_on('py-setuptools')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
new file mode 100644
index 0000000000..ca857395fb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 PyUnittest2py3k(Package):
+ """unittest2 is a backport of the new features added to the unittest
+ testing framework in Python 2.7 and 3.2. This is a Python 3 compatible
+ version of unittest2."""
+
+ homepage = "https://pypi.python.org/pypi/unittest2py3k"
+ url = "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-0.5.1.tar.gz"
+
+ version('0.5.1', '8824ff92044310d9365f90d892bf0f09')
+
+ extends('python')
+ depends_on('py-setuptools')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index b6a62bf742..8033c52b91 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -203,8 +203,10 @@ class Python(Package):
r'site-packages/site[^/]*\.pyc?$',
r'site-packages/__pycache__/site[^/]*\.pyc?$'
])
+ if ext_pkg.name != 'py-pygments':
+ patterns.append(r'bin/pygmentize$')
if ext_pkg.name != 'py-numpy':
- patterns.append(r'bin/f2py$')
+ patterns.append(r'bin/f2py3?$')
return match_predicate(ignore_arg, patterns)
diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py
index 0d3b6a3e57..5a6ce72a4b 100644
--- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py
+++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py
@@ -24,15 +24,33 @@
##############################################################################
from spack import *
+
class RBiocgenerics(Package):
"""S4 generic functions needed by many Bioconductor packages."""
- homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html'
- url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz"
-
- version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False)
+ homepage = 'https://bioconductor.org/packages/BiocGenerics/'
+ version('bioc-3.3',
+ git='https://github.com/Bioconductor-mirror/BiocGenerics.git',
+ branch='release-3.3')
+ version('bioc-3.2',
+ git='https://github.com/Bioconductor-mirror/BiocGenerics.git',
+ branch='release-3.2')
extends('R')
+ def validate(self, spec):
+ """
+ Checks that the version of R is appropriate for the Bioconductor
+ version.
+ """
+ if spec.satisfies('@bioc-3.3'):
+ if not spec.satisfies('^R@3.3.0:3.3.9'):
+ raise InstallError('Must use R-3.3 for Bioconductor-3.3')
+ elif spec.satisfies('@bioc-3.2'):
+ if not spec.satisfies('^R@3.2.0:3.2.9'):
+ raise InstallError('Must use R-3.2 for Bioconductor-3.2')
+
def install(self, spec, prefix):
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ self.validate(spec)
+ R('CMD', 'INSTALL', '--library=%s' %
+ self.module.r_lib_dir, '%s' % self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-R6/package.py b/var/spack/repos/builtin/packages/r-R6/package.py
new file mode 100644
index 0000000000..0b75888e79
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-R6/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 RR6(Package):
+ """The R6 package allows the creation of classes with reference semantics,
+ similar to R's built-in reference classes. Compared to reference classes,
+ R6 classes are simpler and lighter-weight, and they are not built on S4
+ classes so they do not require the methods package. These classes allow
+ public and private members, and they support inheritance, even when the
+ classes are defined in different packages."""
+
+ homepage = "https://github.com/wch/R6/"
+ url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/R6"
+
+ version('2.1.2', 'b6afb9430e48707be87638675390e457')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py
index 34a1eee79f..96f623a096 100644
--- a/var/spack/repos/builtin/packages/r-abind/package.py
+++ b/var/spack/repos/builtin/packages/r-abind/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class RAbind(Package):
"""Combine multidimensional arrays into a single array. This is a
generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and
@@ -32,11 +33,12 @@ class RAbind(Package):
homepage = "https://cran.r-project.org/"
url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/abind"
- version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False)
+ version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5')
extends('R')
def install(self, spec, prefix):
-
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py
new file mode 100644
index 0000000000..c6e8f22a94
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-curl/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 RCurl(Package):
+ """The curl() and curl_download() functions provide highly configurable
+ drop-in replacements for base url() and download.file() with better
+ performance, support for encryption (https, ftps), gzip compression,
+ authentication, and other libcurl goodies. The core of the package
+ implements a framework for performing fully customized requests where data
+ can be processed either in memory, on disk, or streaming via the callback
+ or connection interfaces. Some knowledge of libcurl is recommended; for a
+ more-user-friendly web client see the 'httr' package which builds on this
+ package with http specific tools and logic."""
+
+ homepage = "https://github.com/jeroenooms/curl"
+ url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/RCurl"
+
+ version('0.9.7', 'a101f7de948cb828fef571c730f39217')
+
+ extends('R')
+
+ depends_on('curl')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-dbi/package.py b/var/spack/repos/builtin/packages/r-dbi/package.py
new file mode 100644
index 0000000000..a1e06d5100
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-dbi/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 RDbi(Package):
+ """A database interface definition for communication between R and
+ relational database management systems. All classes in this package are
+ virtual and need to be extended by the various R/DBMS implementations."""
+
+ homepage = "https://github.com/rstats-db/DBI"
+ url = "https://cran.r-project.org/src/contrib/DBI_0.4-1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/DBI"
+
+ version('0.4-1', 'c7ee8f1c5037c2284e99c62698d0f087')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-devtools/package.py b/var/spack/repos/builtin/packages/r-devtools/package.py
new file mode 100644
index 0000000000..5f0b7b8779
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-devtools/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 RDevtools(Package):
+ """Collection of package development tools."""
+
+ homepage = "https://github.com/hadley/devtools"
+ url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/devtools"
+
+ version('1.11.1', '242672ee27d24dddcbdaac88c586b6c2')
+
+ extends('R')
+
+ depends_on('r-httr')
+ depends_on('r-memoise')
+ depends_on('r-whisker')
+ depends_on('r-digest')
+ depends_on('r-rstudioapi')
+ depends_on('r-jsonlite')
+ depends_on('r-git2r')
+ depends_on('r-withr')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py
new file mode 100644
index 0000000000..1d11afb139
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-digest/package.py
@@ -0,0 +1,56 @@
+##############################################################################
+# 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 RDigest(Package):
+ """Implementation of a function 'digest()' for the creation of hash digests
+ of arbitrary R objects (using the md5, sha-1, sha-256, crc32, xxhash and
+ murmurhash algorithms) permitting easy comparison of R language objects, as
+ well as a function 'hmac()' to create hash-based message authentication
+ code. The md5 algorithm by Ron Rivest is specified in RFC 1321, the sha-1
+ and sha-256 algorithms are specified in FIPS-180-1 and FIPS-180-2, and the
+ crc32 algorithm is described in
+ ftp://ftp.rocksoft.com/cliens/rocksoft/papers/crc_v3.txt. For md5, sha-1,
+ sha-256 and aes, this package uses small standalone implementations that
+ were provided by Christophe Devine. For crc32, code from the zlib library
+ is used. For sha-512, an implementation by Aaron D. Gifford is used. For
+ xxhash, the implementation by Yann Collet is used. For murmurhash, an
+ implementation by Shane Day is used. Please note that this package is not
+ meant to be deployed for cryptographic purposes for which more
+ comprehensive (and widely tested) libraries such as OpenSSL should be
+ used."""
+
+ homepage = "http://dirk.eddelbuettel.com/code/digest.html"
+ url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/digest"
+
+ version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py
index fffae68019..a09b458eaf 100644
--- a/var/spack/repos/builtin/packages/r-filehash/package.py
+++ b/var/spack/repos/builtin/packages/r-filehash/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class RFilehash(Package):
"""Implements a simple key-value style database where character string keys
are associated with data values that are stored on the disk. A simple
@@ -37,10 +38,12 @@ class RFilehash(Package):
homepage = 'https://cran.r-project.org/'
url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/filehash"
- version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False)
+ version('2.3', '01fffafe09b148ccadc9814c103bdc2f')
extends('R')
def install(self, spec, prefix):
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-foreign/package.py b/var/spack/repos/builtin/packages/r-foreign/package.py
new file mode 100644
index 0000000000..df38fc5680
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-foreign/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 RForeign(Package):
+ """Functions for reading and writing data stored by some versions of Epi
+ Info, Minitab, S, SAS, SPSS, Stata, Systat and Weka and for reading and
+ writing some dBase files."""
+
+ homepage = "https://cran.r-project.org/web/packages/foreign/index.html"
+ url = "https://cran.r-project.org/src/contrib/foreign_0.8-66.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/foreign"
+
+ version('0.8-66', 'ff12190f4631dca31e30ca786c2c8f62')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py
new file mode 100644
index 0000000000..1f08379d6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-git2r/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 RGit2r(Package):
+ """Interface to the 'libgit2' library, which is a pure C implementation of
+ the 'Git' core methods. Provides access to 'Git' repositories to extract
+ data and running some basic 'Git' commands."""
+
+ homepage = "https://github.com/ropensci/git2r"
+ url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/git2r"
+
+ version('0.15.0', '57658b3298f9b9aadc0dd77b4ef6a1e1')
+
+ extends('R')
+
+ depends_on('zlib')
+ depends_on('openssl')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py
new file mode 100644
index 0000000000..77ec34ab03
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-httr/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# 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 RHttr(Package):
+ """Useful tools for working with HTTP organised by HTTP verbs (GET(),
+ POST(), etc). Configuration functions make it easy to control additional
+ request components (authenticate(), add_headers() and so on)."""
+
+ homepage = "https://github.com/hadley/httr"
+ url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/httr"
+
+ version('1.1.0', '5ffbbc5c2529e49f00aaa521a2b35600')
+
+ extends('R')
+
+ depends_on('r-jsonlite')
+ depends_on('r-mime')
+ depends_on('r-curl')
+ depends_on('r-openssl')
+ depends_on('r-R6')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py
new file mode 100644
index 0000000000..6e231ed345
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-jsonlite/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 RJsonlite(Package):
+ """A fast JSON parser and generator optimized for statistical data and the
+ web. Started out as a fork of 'RJSONIO', but has been completely rewritten
+ in recent versions. The package offers flexible, robust, high performance
+ tools for working with JSON in R and is particularly powerful for building
+ pipelines and interacting with a web API. The implementation is based on
+ the mapping described in the vignette (Ooms, 2014). In addition to
+ converting JSON data from/to R objects, 'jsonlite' contains functions to
+ stream, validate, and prettify JSON data. The unit tests included with the
+ package verify that all edge cases are encoded and decoded consistently for
+ use with dynamic data in systems and applications."""
+
+ homepage = "https://github.com/jeroenooms/jsonlite"
+ url = "https://cran.r-project.org/src/contrib/jsonlite_0.9.21.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/jsonlite"
+
+ version('0.9.21', '4fc382747f88a79ff0718a0d06bed45d')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py
index f86917ec0c..f6ba97740b 100644
--- a/var/spack/repos/builtin/packages/r-magic/package.py
+++ b/var/spack/repos/builtin/packages/r-magic/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class RMagic(Package):
"""A collection of efficient, vectorized algorithms for the creation and
investigation of magic squares and hypercubes, including a variety of
@@ -32,12 +33,14 @@ class RMagic(Package):
homepage = "https://cran.r-project.org/"
url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/magic"
- version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False)
+ version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029')
extends('R')
depends_on('r-abind')
def install(self, spec, prefix):
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-memoise/package.py b/var/spack/repos/builtin/packages/r-memoise/package.py
new file mode 100644
index 0000000000..6a0fb78650
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-memoise/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 RMemoise(Package):
+ """Cache the results of a function so that when you call it again with the
+ same arguments it returns the pre-computed value."""
+
+ homepage = "https://github.com/hadley/memoise"
+ url = "https://cran.r-project.org/src/contrib/memoise_1.0.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/memoise"
+
+ version('1.0.0', 'd31145292e2a88ae9a504cab1602e4ac')
+
+ extends('R')
+
+ depends_on('r-digest')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-mime/package.py b/var/spack/repos/builtin/packages/r-mime/package.py
new file mode 100644
index 0000000000..fb079f44c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-mime/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 RMime(Package):
+ """Guesses the MIME type from a filename extension using the data derived
+ from /etc/mime.types in UNIX-type systems."""
+
+ homepage = "https://github.com/yihui/mime"
+ url = "https://cran.r-project.org/src/contrib/mime_0.4.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/mime"
+
+ version('0.4', '789cb33e41db2206c6fc7c3e9fbc2c02')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py
new file mode 100644
index 0000000000..3e77923d76
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-openssl/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 ROpenssl(Package):
+ """Bindings to OpenSSL libssl and libcrypto, plus custom SSH pubkey
+ parsers. Supports RSA, DSA and EC curves P-256, P-384 and P-521.
+ Cryptographic signatures can either be created and verified manually or via
+ x509 certificates. AES can be used in cbc, ctr or gcm mode for symmetric
+ encryption; RSA for asymmetric (public key) encryption or EC for Diffie
+ Hellman. High-level envelope functions combine RSA and AES for encrypting
+ arbitrary sized data. Other utilities include key generators, hash
+ functions (md5, sha1, sha256, etc), base64 encoder, a secure random number
+ generator, and 'bignum' math methods for manually performing crypto
+ calculations on large multibyte integers."""
+
+ homepage = "https://github.com/jeroenooms/openssl#readme"
+ url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/openssl"
+
+ version('0.9.4', '82a890e71ed0e74499878bedacfb8ccb')
+
+ extends('R')
+
+ depends_on('openssl')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py
new file mode 100644
index 0000000000..9520952bd7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-packrat/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 RPackrat(Package):
+ """Manage the R packages your project depends on in an isolated, portable,
+ and reproducible way."""
+
+ homepage = "https://github.com/rstudio/packrat/"
+ url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/packrat"
+
+ version('0.4.7-1', '80c2413269b292ade163a70ba5053e84')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rjava/package.py b/var/spack/repos/builtin/packages/r-rjava/package.py
new file mode 100644
index 0000000000..0ce0942602
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rjava/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 RRjava(Package):
+ """Low-level interface to Java VM very much like .C/.Call and friends.
+ Allows creation of objects, calling methods and accessing fields."""
+
+ homepage = "http://www.rforge.net/rJava/"
+ url = "https://cran.r-project.org/src/contrib/rJava_0.9-8.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/rJava"
+
+ version('0.9-8', '51ae0d690ceed056ebe7c4be71fc6c7a')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rmysql/package.py b/var/spack/repos/builtin/packages/r-rmysql/package.py
new file mode 100644
index 0000000000..774c166f8b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rmysql/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 RRmysql(Package):
+ """Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases."""
+
+ homepage = "https://github.com/rstats-db/rmysql"
+ url = "https://cran.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/RMySQL"
+
+ version('0.10.9', '3628200a1864ac3005cfd55cc7cde17a')
+
+ extends('R')
+
+ depends_on('r-DBI')
+ depends_on('mariadb')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rodbc/package.py b/var/spack/repos/builtin/packages/r-rodbc/package.py
new file mode 100644
index 0000000000..9cc9aebd9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rodbc/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 RRodbc(Package):
+ """An ODBC database interface."""
+
+ homepage = "https://cran.rstudio.com/web/packages/RODBC/"
+ url = "https://cran.rstudio.com/src/contrib/RODBC_1.3-13.tar.gz"
+ list_url = "https://cran.rstudio.com/src/contrib/Archive/RODBC"
+
+ version('1.3-13', 'c52ef9139c2ed85adc53ad6effa7d68e')
+
+ extends('R')
+
+ depends_on('unixODBC')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rpostgresql/package.py b/var/spack/repos/builtin/packages/r-rpostgresql/package.py
new file mode 100644
index 0000000000..83c9b85525
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rpostgresql/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 RRpostgresql(Package):
+ """Database interface and PostgreSQL driver for R This package provides a
+ Database Interface (DBI) compliant driver for R to access PostgreSQL
+ database systems. In order to build and install this package from source,
+ PostgreSQL itself must be present your system to provide PostgreSQL
+ functionality via its libraries and header files. These files are provided
+ as postgresql-devel package under some Linux distributions. On Microsoft
+ Windows system the attached libpq library source will be used. A wiki and
+ issue tracking system for the package are available at Google Code at
+ https://code.google.com/p/rpostgresql/."""
+
+ homepage = "https://code.google.com/p/rpostgresql/"
+ url = "https://cran.r-project.org/src/contrib/RPostgreSQL_0.4-1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/RPostgreSQL"
+
+ version('0.4-1', 'e7b22e212afbb2cbb88bab937f93e55a')
+
+ extends('R')
+
+ depends_on('r-DBI')
+ depends_on('postgresql')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rsqlite/package.py b/var/spack/repos/builtin/packages/r-rsqlite/package.py
new file mode 100644
index 0000000000..9602f6d927
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rsqlite/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 RRsqlite(Package):
+ """This package embeds the SQLite database engine in R and provides an
+ interface compliant with the DBI package. The source for the SQLite engine
+ (version 3.8.6) is included."""
+
+ homepage = "https://github.com/rstats-db/RSQLite"
+ url = "https://cran.r-project.org/src/contrib/RSQLite_1.0.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/RSQLite"
+
+ version('1.0.0', 'e6cbe2709612b687c13a10d30c7bad45')
+
+ extends('R')
+
+ depends_on('r-DBI')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rstudioapi/package.py b/var/spack/repos/builtin/packages/r-rstudioapi/package.py
new file mode 100644
index 0000000000..0ef2d9b987
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rstudioapi/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 RRstudioapi(Package):
+ """Access the RStudio API (if available) and provide informative error
+ messages when it's not."""
+
+ homepage = "https://cran.r-project.org/web/packages/rstudioapi/index.html"
+ url = "https://cran.r-project.org/src/contrib/rstudioapi_0.5.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/rstudioapi"
+
+ version('0.5', '6ce1191da74e7bcbf06b61339486b3ba')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-whisker/package.py b/var/spack/repos/builtin/packages/r-whisker/package.py
new file mode 100644
index 0000000000..f338d150f1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-whisker/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 RWhisker(Package):
+ """logicless templating, reuse templates in many programming languages
+ including R"""
+
+ homepage = "http://github.com/edwindj/whisker"
+ url = "https://cran.r-project.org/src/contrib/whisker_0.3-2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/whisker"
+
+ version('0.3-2', 'c4b9bf9a22e69ce003fe68663ab5e8e6')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py
new file mode 100644
index 0000000000..5ce7437c84
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-withr/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 RWithr(Package):
+ """A set of functions to run code 'with' safely and temporarily modified
+ global state. Many of these functions were originally a part of the
+ 'devtools' package, this provides a simple package with limited
+ dependencies to provide access to these functions."""
+
+ homepage = "http://github.com/jimhester/withr"
+ url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/withr"
+
+ version('1.0.1', 'ac38af2c6f74027c9592dd8f0acb7598')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-xlconnect/package.py b/var/spack/repos/builtin/packages/r-xlconnect/package.py
new file mode 100644
index 0000000000..919291a023
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-xlconnect/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 RXlconnect(Package):
+ """Provides comprehensive functionality to read, write and format Excel
+ data."""
+
+ homepage = "http://miraisolutions.wordpress.com/"
+ url = "https://cran.r-project.org/src/contrib/XLConnect_0.2-11.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnect"
+
+ version('0.2-11', '9d1769a103cda05665df399cc335017d')
+
+ extends('R')
+
+ depends_on('r-XLConnectJars')
+ depends_on('r-rJava')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-xlconnectjars/package.py b/var/spack/repos/builtin/packages/r-xlconnectjars/package.py
new file mode 100644
index 0000000000..15d08cc5af
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-xlconnectjars/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 RXlconnectjars(Package):
+ """Provides external JAR dependencies for the XLConnect package."""
+
+ homepage = "http://miraisolutions.wordpress.com/"
+ url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnectJars"
+
+ version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb')
+
+ extends('R')
+
+ depends_on('r-rJava')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-xlsx/package.py b/var/spack/repos/builtin/packages/r-xlsx/package.py
new file mode 100644
index 0000000000..0aac6cdd1f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-xlsx/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 RXlsx(Package):
+ """Provide R functions to read/write/format Excel 2007 and Excel
+ 97/2000/XP/2003 file formats."""
+
+ homepage = "http://code.google.com/p/rexcel/"
+ url = "https://cran.rstudio.com/src/contrib/xlsx_0.5.7.tar.gz"
+ list_url = "https://cran.rstudio.com/src/contrib/Archive/xlsx"
+
+ version('0.5.7', '36b1b16f29c54b6089b1dae923180dd5')
+
+ extends('R')
+
+ depends_on('r-rJava')
+ depends_on('r-xlsxjars')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-xlsxjars/package.py b/var/spack/repos/builtin/packages/r-xlsxjars/package.py
new file mode 100644
index 0000000000..cff6e7427e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-xlsxjars/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 RXlsxjars(Package):
+ """The xlsxjars package collects all the external jars required for the
+ xlxs package. This release corresponds to POI 3.10.1."""
+
+ homepage = "https://cran.rstudio.com/web/packages/xlsxjars/index.html"
+ url = "https://cran.rstudio.com/src/contrib/xlsxjars_0.6.1.tar.gz"
+ list_url = "https://cran.rstudio.com/src/contrib/Archive/xlsxjars"
+
+ version('0.6.1', '5a1721d5733cb42f3a29e3f353e39166')
+
+ extends('R')
+
+ depends_on('r-rJava')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 3c2b4993ac..2f6e42c439 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -171,15 +171,13 @@ class Scotch(Package):
target == 'ptscotch'))
make(target, parallel=can_make_parallel)
- # todo change this to take into account darwin systems
- lib_ext = '.so' if '+shared' in self.spec else '.a'
+ lib_ext = dso_suffix if '+shared' in self.spec else 'a'
# It seams easier to remove metis wrappers from the folder that will be
# installed than to tweak the Makefiles
if '+metis' not in self.spec:
with working_dir('lib'):
- lib_ext = '.so' if '+shared' in self.spec else '.a'
- force_remove('libscotchmetis{0}'.format(lib_ext))
- force_remove('libptscotchparmetis{0}'.format(lib_ext))
+ force_remove('libscotchmetis.{0}'.format(lib_ext))
+ force_remove('libptscotchparmetis.{0}'.format(lib_ext))
with working_dir('include'):
force_remove('metis.h')
@@ -187,8 +185,8 @@ class Scotch(Package):
if '~esmumps' in self.spec and self.spec.version < Version('6.0.0'):
with working_dir('lib'):
- force_remove('libesmumps{0}'.format(lib_ext))
- force_remove('libptesmumps{0}'.format(lib_ext))
+ force_remove('libesmumps.{0}'.format(lib_ext))
+ force_remove('libptesmumps.{0}'.format(lib_ext))
with working_dir('include'):
force_remove('esmumps.h')
diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py
index 817db68241..ff6fd2da9b 100644
--- a/var/spack/repos/builtin/packages/serf/package.py
+++ b/var/spack/repos/builtin/packages/serf/package.py
@@ -28,10 +28,11 @@ from spack import *
class Serf(Package):
"""Apache Serf - a high performance C-based HTTP client library
built upon the Apache Portable Runtime (APR) library"""
+
homepage = 'https://serf.apache.org/'
url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2'
- version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446')
+ version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446')
depends_on('apr')
depends_on('apr-util')
@@ -41,8 +42,6 @@ class Serf(Package):
depends_on('zlib')
def install(self, spec, prefix):
- scons = which("scons")
-
options = ['PREFIX=%s' % prefix]
options.append('APR=%s' % spec['apr'].prefix)
options.append('APU=%s' % spec['apr-util'].prefix)
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index c148a579ec..d3739bf6a6 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -34,13 +34,16 @@ class Slepc(Package):
homepage = "http://www.grycap.upv.es/slepc"
url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
+ version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2')
+ version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876')
version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df')
- variant('arpack', default=False, description='Enables Arpack wrappers')
+ variant('arpack', default=True, description='Enables Arpack wrappers')
- depends_on('petsc')
- depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi')
- depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi')
+ depends_on('petsc@3.7:', when='@3.7.1:')
+ depends_on('petsc@3.6.3:3.6.4', when='@3.6.2:3.6.3')
+ depends_on('arpack-ng~mpi', when='+arpack^petsc~mpi')
+ depends_on('arpack-ng+mpi', when='+arpack^petsc+mpi')
def install(self, spec, prefix):
# set SLEPC_DIR for installation
@@ -64,7 +67,7 @@ class Slepc(Package):
configure('--prefix=%s' % prefix, *options)
make('MAKE_NP=%s' % make_jobs, parallel=False)
- #FIXME:
+ # FIXME:
# make('test')
make('install')
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
index ba2340f74c..c55198a850 100644
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -23,17 +23,151 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
+
class Sundials(Package):
- """SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)"""
+ """SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation
+ Solvers)"""
+
homepage = "http://computation.llnl.gov/casc/sundials/"
- url = "http://computation.llnl.gov/casc/sundials/download/code/sundials-2.5.0.tar.gz"
+ url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz"
+
+ version('2.6.2', '3deeb0ede9f514184c6bd83ecab77d95')
- version('2.5.0', 'aba8b56eec600de3109cfb967aa3ba0f')
+ variant('mpi', default=True, description='Enable MPI support')
+ variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries')
+ variant('klu', default=False, description='Build with SuiteSparse KLU libraries')
+ variant('superlu', default=False, description='Build with SuperLU_MT libraries')
+ variant('openmp', default=False, description='Enable OpenMP support')
+ variant('pthread', default=True, description='Enable POSIX threads support')
- depends_on("mpi")
+ depends_on('mpi', when='+mpi')
+ depends_on('blas', when='+lapack')
+ depends_on('lapack', when='+lapack')
+ depends_on('suite-sparse', when='+klu')
+ depends_on('superlu-mt+openmp', when='+superlu+openmp')
+ depends_on('superlu-mt+pthread', when='+superlu+pthread')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
- make()
- make("install")
+ cmake_args = std_cmake_args[:]
+ cmake_args.extend([
+ '-DBUILD_SHARED_LIBS=ON',
+ '-DCMAKE_C_FLAGS=-fPIC',
+ '-DCMAKE_Fortran_FLAGS=-fPIC',
+ '-DEXAMPLES_ENABLE=ON',
+ '-DEXAMPLES_INSTALL=ON',
+ '-DFCMIX_ENABLE=ON'
+ ])
+
+ # MPI support
+ if '+mpi' in spec:
+ cmake_args.extend([
+ '-DMPI_ENABLE=ON',
+ '-DMPI_MPICC={0}'.format(spec['mpi'].mpicc),
+ '-DMPI_MPIF77={0}'.format(spec['mpi'].mpif77)
+ ])
+ else:
+ cmake_args.append('-DMPI_ENABLE=OFF')
+
+ # Building with LAPACK and BLAS
+ if '+lapack' in spec:
+ cmake_args.extend([
+ '-DLAPACK_ENABLE=ON',
+ '-DLAPACK_LIBRARIES={0};{1}'.format(
+ spec['lapack'].lapack_shared_lib,
+ spec['blas'].blas_shared_lib
+ )
+ ])
+ else:
+ cmake_args.append('-DLAPACK_ENABLE=OFF')
+
+ # Building with KLU
+ if '+klu' in spec:
+ cmake_args.extend([
+ '-DKLU_ENABLE=ON',
+ '-DKLU_INCLUDE_DIR={0}'.format(
+ spec['suite-sparse'].prefix.include),
+ '-DKLU_LIBRARY_DIR={0}'.format(
+ spec['suite-sparse'].prefix.lib)
+ ])
+ else:
+ cmake_args.append('-DKLU_ENABLE=OFF')
+
+ # Building with SuperLU_MT
+ if '+superlu' in spec:
+ cmake_args.extend([
+ '-DSUPERLUMT_ENABLE=ON',
+ '-DSUPERLUMT_INCLUDE_DIR={0}'.format(
+ spec['superlu-mt'].prefix.include),
+ '-DSUPERLUMT_LIBRARY_DIR={0}'.format(
+ spec['superlu-mt'].prefix.lib)
+ ])
+ if '+openmp' in spec:
+ cmake_args.append('-DSUPERLUMT_THREAD_TYPE=OpenMP')
+ elif '+pthread' in spec:
+ cmake_args.append('-DSUPERLUMT_THREAD_TYPE=Pthread')
+ else:
+ msg = 'You must choose either +openmp or +pthread when '
+ msg += 'building with SuperLU_MT'
+ raise RuntimeError(msg)
+ else:
+ cmake_args.append('-DSUPERLUMT_ENABLE=OFF')
+
+ # OpenMP support
+ if '+openmp' in spec:
+ cmake_args.append('-DOPENMP_ENABLE=ON')
+ else:
+ cmake_args.append('-DOPENMP_ENABLE=OFF')
+
+ # POSIX threads support
+ if '+pthread' in spec:
+ cmake_args.append('-DPTHREAD_ENABLE=ON')
+ else:
+ cmake_args.append('-DPTHREAD_ENABLE=OFF')
+
+ with working_dir('build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
+
+ install('LICENSE', prefix)
+
+ self.filter_compilers()
+
+ def filter_compilers(self):
+ """Run after install to tell the Makefiles to use
+ the compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC, CPP, and F77 set to
+ Spack's generic cc and f77. We want them to be bound to
+ whatever compiler they were built with."""
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+ dirname = os.path.join(self.prefix, 'examples')
+
+ cc_files = [
+ 'arkode/C_serial/Makefile', 'arkode/C_parallel/Makefile',
+ 'cvode/serial/Makefile', 'cvode/parallel/Makefile',
+ 'cvodes/serial/Makefile', 'cvodes/parallel/Makefile',
+ 'ida/serial/Makefile', 'ida/parallel/Makefile',
+ 'idas/serial/Makefile', 'idas/parallel/Makefile',
+ 'kinsol/serial/Makefile', 'kinsol/parallel/Makefile',
+ 'nvector/serial/Makefile', 'nvector/parallel/Makefile',
+ 'nvector/pthreads/Makefile'
+ ]
+
+ f77_files = [
+ 'arkode/F77_serial/Makefile', 'cvode/fcmix_serial/Makefile',
+ 'ida/fcmix_serial/Makefile', 'ida/fcmix_pthreads/Makefile',
+ 'kinsol/fcmix_serial/Makefile'
+ ]
+
+ for filename in cc_files:
+ filter_file(os.environ['CC'], self.compiler.cc,
+ os.path.join(dirname, filename), **kwargs)
+
+ for filename in f77_files:
+ filter_file(os.environ['F77'], self.compiler.f77,
+ os.path.join(dirname, filename), **kwargs)
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py
index 6c06b5497c..e51d7224d9 100644
--- a/var/spack/repos/builtin/packages/superlu-dist/package.py
+++ b/var/spack/repos/builtin/packages/superlu-dist/package.py
@@ -25,50 +25,54 @@
from spack import *
import glob
+
class SuperluDist(Package):
- """A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines."""
+ """A general purpose library for the direct solution of large, sparse,
+ nonsymmetric systems of linear equations on high performance machines."""
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670')
- # default to version 4.3 since petsc and trilinos are not tested with 5.0.
- version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True)
+ version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae')
version('4.2', 'ae9fafae161f775fbac6eba11e530a65')
version('4.1', '4edee38cc29f687bd0c8eb361096a455')
version('4.0', 'c0b98b611df227ae050bc1635c6940e0')
- depends_on ('mpi')
- depends_on ('blas')
- depends_on ('lapack')
- depends_on ('parmetis')
- depends_on ('metis@5:')
+ depends_on('mpi')
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('parmetis')
+ depends_on('metis@5:')
def install(self, spec, prefix):
makefile_inc = []
makefile_inc.extend([
'PLAT = _mac_x',
- 'DSuperLUroot = %s' % self.stage.source_path, #self.stage.path, prefix
+ 'DSuperLUroot = %s' % self.stage.source_path,
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
'BLASDEF = -DUSE_VENDOR_BLAS',
- 'BLASLIB = -L%s -llapack %s -lblas' % (spec['lapack'].prefix.lib, spec['blas'].prefix.lib), # FIXME: avoid hardcoding blas/lapack lib names
+ 'BLASLIB = %s %s' %
+ (to_link_flags(spec['lapack'].lapack_shared_lib),
+ to_link_flags(spec['blas'].blas_shared_lib)),
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
'FLIBS =',
- 'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)',
+ 'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', # NOQA: ignore=E501
'ARCH = ar',
'ARCHFLAGS = cr',
'RANLIB = true',
- 'CC = mpicc', # FIXME avoid hardcoding MPI compiler names
- 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include),
+ 'CC = %s' % spec['mpi'].mpicc,
+ 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %
+ (spec['parmetis'].prefix.include,
+ spec['metis'].prefix.include),
'NOOPTS = -fPIC -std=c99',
- 'FORTRAN = mpif77',
+ 'FORTRAN = %s' % spec['mpi'].mpif77,
'F90FLAGS = -O2',
- 'LOADER = mpif77',
+ 'LOADER = %s' % spec['mpi'].mpif77,
'LOADOPTS =',
'CDEFS = -DAdd_'
- ])
+ ])
- #with working_dir('src'):
with open('make.inc', 'w') as fh:
fh.write('\n'.join(makefile_inc))
@@ -83,9 +87,10 @@ class SuperluDist(Package):
mkdirp(headers_location)
mkdirp(prefix.lib)
- headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h'))
+ headers = glob.glob(join_path(self.stage.source_path, 'SRC', '*.h'))
for h in headers:
- install(h,headers_location)
+ install(h, headers_location)
- superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a')
- install(superludist_lib,self.prefix.lib)
+ superludist_lib = join_path(self.stage.source_path,
+ 'lib/libsuperlu_dist.a')
+ install(superludist_lib, self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/superlu-mt/package.py b/var/spack/repos/builtin/packages/superlu-mt/package.py
new file mode 100644
index 0000000000..5a9429d6e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/superlu-mt/package.py
@@ -0,0 +1,134 @@
+##############################################################################
+# 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 *
+import glob
+import os
+
+
+class SuperluMt(Package):
+ """SuperLU is a general purpose library for the direct solution of large,
+ sparse, nonsymmetric systems of linear equations on high performance
+ machines. SuperLU_MT is designed for shared memory parallel machines."""
+
+ homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu_mt"
+ url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_mt_3.1.tar.gz"
+
+ version('3.1', '06ac62f1b4b7d17123fffa0d0c315e91')
+
+ variant('blas', default=True, description='Build with external BLAS library')
+
+ # Must choose one or the other
+ variant('openmp', default=False, description='Build with OpenMP support')
+ variant('pthread', default=True, description='Build with POSIX threads support')
+
+ # NOTE: must link with a single-threaded BLAS library
+ depends_on('blas', when='+blas')
+
+ # Cannot be built in parallel
+ parallel = False
+
+ def configure(self, spec):
+ # Validate chosen variants
+ if '+openmp' in spec and '+pthread' in spec:
+ msg = 'You cannot choose both +openmp and +pthread'
+ raise RuntimeError(msg)
+ if '~openmp' in spec and '~pthread' in spec:
+ msg = 'You must choose either +openmp or +pthread'
+ raise RuntimeError(msg)
+
+ # List of configuration options
+ config = []
+
+ # The machine (platform) identifier to append to the library names
+ if '+openmp' in spec:
+ # OpenMP
+ config.extend([
+ 'PLAT = _OPENMP',
+ 'TMGLIB = libtmglib.a',
+ 'MPLIB = {0}'.format(self.compiler.openmp_flag),
+ 'CFLAGS = {0}'.format(self.compiler.openmp_flag),
+ 'FFLAGS = {0}'.format(self.compiler.openmp_flag)
+ ])
+ elif '+pthread' in spec:
+ # POSIX threads
+ config.extend([
+ 'PLAT = _PTHREAD',
+ 'TMGLIB = libtmglib$(PLAT).a',
+ 'MPLIB = -lpthread'
+ ])
+
+ # The BLAS library
+ # NOTE: must link with a single-threaded BLAS library
+ if '+blas' in spec:
+ config.extend([
+ 'BLASDEF = -DUSE_VENDOR_BLAS',
+ 'BLASLIB = -L{0} -lblas'.format(spec['blas'].prefix.lib)
+ ])
+ else:
+ config.append('BLASLIB = ../lib/libblas$(PLAT).a')
+
+ # Generic options
+ config.extend([
+ # The name of the libraries to be created/linked to
+ 'SUPERLULIB = libsuperlu_mt$(PLAT).a',
+ 'MATHLIB = -lm',
+ # The archiver and the flag(s) to use when building archives
+ 'ARCH = ar',
+ 'ARCHFLAGS = cr',
+ 'RANLIB = {0}'.format('ranlib' if which('ranlib') else 'echo'),
+ # Definitions used by CPP
+ 'PREDEFS = -D_$(PLAT)',
+ # Compilers and flags
+ 'CC = {0}'.format(os.environ['CC']),
+ 'CFLAGS += $(PREDEFS) -D_LONGINT',
+ 'NOOPTS = -O0',
+ 'FORTRAN = {0}'.format(os.environ['FC']),
+ 'LOADER = {0}'.format(os.environ['CC']),
+ # C preprocessor defs for compilation
+ 'CDEFS = -DAdd_'
+ ])
+
+ # Write configuration options to include file
+ with open('make.inc', 'w') as inc:
+ for option in config:
+ inc.write('{0}\n'.format(option))
+
+ def install(self, spec, prefix):
+ # Set up make include file manually
+ self.configure(spec)
+
+ # BLAS needs to be compiled separately if using internal BLAS library
+ if '+blas' not in spec:
+ make('blaslib')
+
+ make()
+
+ # Install manually
+ install_tree('lib', prefix.lib)
+
+ headers = glob.glob(join_path('SRC', '*.h'))
+ mkdir(prefix.include)
+ for h in headers:
+ install(h, prefix.include)
diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py
new file mode 100644
index 0000000000..c634c1d1ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/superlu/package.py
@@ -0,0 +1,54 @@
+##############################################################################
+# 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 Superlu(Package):
+ """SuperLU is a general purpose library for the direct solution of large,
+ sparse, nonsymmetric systems of linear equations on high performance
+ machines. SuperLU is designed for sequential machines."""
+
+ homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu"
+ url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz"
+
+ version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447')
+
+ depends_on('blas')
+
+ def install(self, spec, prefix):
+ cmake_args = [
+ '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
+ # BLAS support
+ '-Denable_blaslib=OFF',
+ '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_shared_lib)
+ ]
+
+ cmake_args.extend(std_cmake_args)
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py
new file mode 100644
index 0000000000..42e8fb466a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/swiftsim/package.py
@@ -0,0 +1,77 @@
+##############################################################################
+# 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 *
+
+import llnl.util.tty as tty
+
+
+class Swiftsim(Package):
+ """
+ SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides
+ astrophysicists with a state of the art framework to perform
+ particle based simulations.
+ """
+
+ homepage = 'http://icc.dur.ac.uk/swift/'
+ url = 'http://gitlab.cosma.dur.ac.uk/swift/swiftsim/repository/archive.tar.gz?ref=v0.3.0'
+
+ version('0.3.0', git='https://gitlab.cosma.dur.ac.uk/swift/swiftsim.git', commit='254cc1b563b2f88ddcf437b1f71da123bb9db733')
+
+ variant('mpi', default=True, description='Enable distributed memory parallelism')
+
+ # Build dependencies
+ depends_on('autoconf')
+ depends_on('automake')
+ depends_on('libtool')
+ depends_on('m4')
+ # link-time / run-time dependencies
+ depends_on('mpi', when='+mpi')
+ depends_on('metis')
+ depends_on('hdf5~mpi', when='~mpi')
+ depends_on('hdf5+mpi', when='+mpi')
+
+ def setup_environment(self, spack_env, run_env):
+ # Needed to be able to download from the Durham gitlab repository
+ tty.warn('Setting "GIT_SSL_NO_VERIFY=1"')
+ tty.warn('This is needed to clone SWIFT repository')
+ spack_env.set('GIT_SSL_NO_VERIFY', 1)
+
+ def install(self, spec, prefix):
+ # Generate configure from configure.ac
+ # and Makefile.am
+ libtoolize()
+ aclocal()
+ autoconf()
+ autogen = Executable('./autogen.sh')
+ autogen()
+
+ # Configure and install
+ options = ['--prefix=%s' % prefix,
+ '--enable-mpi' if '+mpi' in spec else '--disable-mpi',
+ '--enable-optimization']
+ configure(*options)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 6913d79dcc..3a53ac5c01 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -45,6 +45,8 @@ class Trilinos(Package):
homepage = "https://trilinos.org/"
url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"
+ version('12.6.3', '960f5f4d3f7c3da818e5a5fb4684559eff7e0c25f959ef576561b8a52f0e4d1e')
+ version('12.6.2', '0c076090508170ddee5efeed317745027f9418319720dc40a072e478775279f9')
version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4')
version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
version('12.2.1', '6161926ea247863c690e927687f83be9')
@@ -89,7 +91,8 @@ class Trilinos(Package):
# work at the end. But let's avoid all this by simply using shared libs
depends_on('mumps@5.0:+mpi+shared', when='+mumps')
depends_on('scalapack', when='+mumps')
- depends_on('superlu-dist', when='+superlu-dist')
+ depends_on('superlu-dist@:4.3', when='@:12.6.1+superlu-dist')
+ depends_on('superlu-dist', when='@12.6.2:+superlu-dist')
depends_on('hypre~internal-superlu', when='+hypre')
depends_on('hdf5+mpi', when='+hdf5')
depends_on('python', when='+python')
diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py
new file mode 100644
index 0000000000..15de127b7e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/unixodbc/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# 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 Unixodbc(Package):
+ """ODBC is an open specification for providing application developers with
+ a predictable API with which to access Data Sources. Data Sources include
+ SQL Servers and any Data Source with an ODBC Driver."""
+
+ homepage = "http://www.unixodbc.org/"
+ url = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz"
+
+ version('2.3.4', 'bd25d261ca1808c947cb687e2034be81')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')