diff options
author | Erik Schnetter <schnetter@gmail.com> | 2016-08-23 09:45:46 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2016-08-23 09:45:46 -0400 |
commit | 64d3f87e605f596c149152bbab98ad3cfc89d549 (patch) | |
tree | 8b767ef2943afafdd6b9932fba2b509d4fe344b7 /var | |
parent | e43eaad5570009622bf0b19b2a9df2f7e70f8f3e (diff) | |
parent | e81f3daa2836c4eb8a7d4e6d0f2cfc6b65875612 (diff) | |
download | spack-64d3f87e605f596c149152bbab98ad3cfc89d549.tar.gz spack-64d3f87e605f596c149152bbab98ad3cfc89d549.tar.bz2 spack-64d3f87e605f596c149152bbab98ad3cfc89d549.tar.xz spack-64d3f87e605f596c149152bbab98ad3cfc89d549.zip |
Merge branch 'develop' into eschnett/sympol
Diffstat (limited to 'var')
717 files changed, 19338 insertions, 2978 deletions
diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml new file mode 100644 index 0000000000..5f8b38007b --- /dev/null +++ b/var/spack/mock_configs/site_spackconfig/compilers.yaml @@ -0,0 +1,40 @@ +compilers: + all: + clang@3.3: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: None + strategy: PATH + gcc@4.5.0: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran + modules: None + strategy: PATH + gcc@5.2.0: + cc: cc + cxx: CC + f77: ftn + fc: ftn + modules: + - PrgEnv-gnu + - gcc/5.2.0 + strategy: MODULES + intel@15.0.1: + cc: cc + ccx: CC + f77: ftn + fc: ftn + modules: + - PrgEnv-intel + - intel/15.0.1 + strategy: MODULES + intel@15.1.2: + cc: /path/to/icc + cxx: /path/to/ic++ + f77: /path/to/ifort + fc: /path/to/ifort + strategy: PATH
\ No newline at end of file diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/a/package.py index 40b92240fc..0d75ee1256 100644 --- a/var/spack/repos/builtin.mock/packages/a/package.py +++ b/var/spack/repos/builtin.mock/packages/a/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class A(Package): """Simple package with no dependencies""" diff --git a/var/spack/repos/builtin.mock/packages/b/package.py b/var/spack/repos/builtin.mock/packages/b/package.py index c447a56b48..5729f24e79 100644 --- a/var/spack/repos/builtin.mock/packages/b/package.py +++ b/var/spack/repos/builtin.mock/packages/b/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class B(Package): """Simple package with no dependencies""" diff --git a/var/spack/repos/builtin.mock/packages/c/package.py b/var/spack/repos/builtin.mock/packages/c/package.py index 5b6079c4e3..80777a05bb 100644 --- a/var/spack/repos/builtin.mock/packages/c/package.py +++ b/var/spack/repos/builtin.mock/packages/c/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class C(Package): """Simple package with no dependencies""" diff --git a/var/spack/repos/builtin.mock/packages/callpath/package.py b/var/spack/repos/builtin.mock/packages/callpath/package.py index c297a123b8..56b969df98 100644 --- a/var/spack/repos/builtin.mock/packages/callpath/package.py +++ b/var/spack/repos/builtin.mock/packages/callpath/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Callpath(Package): homepage = "https://github.com/tgamblin/callpath" url = "http://github.com/tgamblin/callpath-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py index 355689a2d2..0c78f0bf68 100644 --- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py @@ -25,6 +25,7 @@ from spack import * import os + def check(condition, msg): """Raise an install error if condition is False.""" if not condition: @@ -38,8 +39,7 @@ class CmakeClient(Package): version('1.0', '4cb3ff35b2472aae70f542116d616e63') - depends_on('cmake') - + depends_on('cmake', type='build') def setup_environment(self, spack_env, run_env): spack_cc # Ensure spack module-scope variable is avaiabl @@ -47,8 +47,8 @@ class CmakeClient(Package): "setup_environment couldn't read global set by cmake.") check(self.spec['cmake'].link_arg == "test link arg", - "link arg on dependency spec not readable from setup_environment.") - + "link arg on dependency spec not readable from " + "setup_environment.") def setup_dependent_environment(self, spack_env, run_env, dspec): spack_cc # Ensure spack module-scope variable is avaiable @@ -56,8 +56,8 @@ class CmakeClient(Package): "setup_dependent_environment couldn't read global set by cmake.") check(self.spec['cmake'].link_arg == "test link arg", - "link arg on dependency spec not readable from setup_dependent_environment.") - + "link arg on dependency spec not readable from " + "setup_dependent_environment.") def setup_dependent_package(self, module, dspec): spack_cc # Ensure spack module-scope variable is avaiable @@ -65,9 +65,8 @@ class CmakeClient(Package): "setup_dependent_package couldn't read global set by cmake.") check(self.spec['cmake'].link_arg == "test link arg", - "link arg on dependency spec not readable from setup_dependent_package.") - - + "link arg on dependency spec not readable from " + "setup_dependent_package.") def install(self, spec, prefix): # check that cmake is in the global scope. diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py index 0356cf8afb..c8b6464e69 100644 --- a/var/spack/repos/builtin.mock/packages/cmake/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake/package.py @@ -25,6 +25,7 @@ from spack import * import os + def check(condition, msg): """Raise an install error if condition is False.""" if not condition: @@ -39,7 +40,6 @@ class Cmake(Package): version('3.4.3', '4cb3ff35b2472aae70f542116d616e63', url='https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz') - def setup_environment(self, spack_env, run_env): spack_cc # Ensure spack module-scope variable is avaiable spack_env.set('for_install', 'for_install') @@ -48,7 +48,6 @@ class Cmake(Package): spack_cc # Ensure spack module-scope variable is avaiable spack_env.set('from_cmake', 'from_cmake') - def setup_dependent_package(self, module, dspec): spack_cc # Ensure spack module-scope variable is avaiable @@ -57,7 +56,6 @@ class Cmake(Package): self.spec.link_arg = "test link arg" - def install(self, spec, prefix): mkdirp(prefix.bin) diff --git a/var/spack/repos/builtin.mock/packages/direct_mpich/package.py b/var/spack/repos/builtin.mock/packages/direct_mpich/package.py index 663908d56c..f38589ad4d 100644 --- a/var/spack/repos/builtin.mock/packages/direct_mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/direct_mpich/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class DirectMpich(Package): homepage = "http://www.example.com" url = "http://www.example.com/direct_mpich-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/dtbuild1/package.py b/var/spack/repos/builtin.mock/packages/dtbuild1/package.py new file mode 100644 index 0000000000..7429b2a8ef --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtbuild1/package.py @@ -0,0 +1,18 @@ +from spack import * + + +class Dtbuild1(Package): + """Package for use as a build tool for deptypes testing which has its own + deptree""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtbuild1-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dtbuild2', type='build') + depends_on('dtlink2') + depends_on('dtrun2', type='run') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtbuild2/package.py b/var/spack/repos/builtin.mock/packages/dtbuild2/package.py new file mode 100644 index 0000000000..cf3bb82a10 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtbuild2/package.py @@ -0,0 +1,13 @@ +from spack import * + + +class Dtbuild2(Package): + """Simple package which acts as a build dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtbuild2-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtbuild3/package.py b/var/spack/repos/builtin.mock/packages/dtbuild3/package.py new file mode 100644 index 0000000000..6ba7e69a41 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtbuild3/package.py @@ -0,0 +1,13 @@ +from spack import * + + +class Dtbuild3(Package): + """Simple package which acts as a build dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtbuild3-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtlink1/package.py b/var/spack/repos/builtin.mock/packages/dtlink1/package.py new file mode 100644 index 0000000000..2747dcf354 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtlink1/package.py @@ -0,0 +1,15 @@ +from spack import * + + +class Dtlink1(Package): + """Simple package which acts as a link dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtlink1-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dtlink3') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtlink2/package.py b/var/spack/repos/builtin.mock/packages/dtlink2/package.py new file mode 100644 index 0000000000..b80bad053f --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtlink2/package.py @@ -0,0 +1,13 @@ +from spack import * + + +class Dtlink2(Package): + """Simple package which acts as a link dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtlink2-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtlink3/package.py b/var/spack/repos/builtin.mock/packages/dtlink3/package.py new file mode 100644 index 0000000000..bee8b4b8f8 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtlink3/package.py @@ -0,0 +1,16 @@ +from spack import * + + +class Dtlink3(Package): + """Simple package which acts as a link dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtlink3-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dtbuild2', type='build') + depends_on('dtlink4') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtlink4/package.py b/var/spack/repos/builtin.mock/packages/dtlink4/package.py new file mode 100644 index 0000000000..3f05d5c0d6 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtlink4/package.py @@ -0,0 +1,13 @@ +from spack import * + + +class Dtlink4(Package): + """Simple package which acts as a link dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtlink4-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtlink5/package.py b/var/spack/repos/builtin.mock/packages/dtlink5/package.py new file mode 100644 index 0000000000..c8b1e97d37 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtlink5/package.py @@ -0,0 +1,13 @@ +from spack import * + + +class Dtlink5(Package): + """Simple package which acts as a link dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtlink5-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtrun1/package.py b/var/spack/repos/builtin.mock/packages/dtrun1/package.py new file mode 100644 index 0000000000..fb33b9b2f2 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtrun1/package.py @@ -0,0 +1,16 @@ +from spack import * + + +class Dtrun1(Package): + """Simple package which acts as a run dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtrun1-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dtlink5') + depends_on('dtrun3', type='run') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtrun2/package.py b/var/spack/repos/builtin.mock/packages/dtrun2/package.py new file mode 100644 index 0000000000..e5d4b5e0b4 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtrun2/package.py @@ -0,0 +1,13 @@ +from spack import * + + +class Dtrun2(Package): + """Simple package which acts as a run dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtrun2-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtrun3/package.py b/var/spack/repos/builtin.mock/packages/dtrun3/package.py new file mode 100644 index 0000000000..70dacf45ff --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtrun3/package.py @@ -0,0 +1,15 @@ +from spack import * + + +class Dtrun3(Package): + """Simple package which acts as a run dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtrun3-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dtbuild3', type='build') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dttop/package.py b/var/spack/repos/builtin.mock/packages/dttop/package.py new file mode 100644 index 0000000000..202a3b6883 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dttop/package.py @@ -0,0 +1,17 @@ +from spack import * + + +class Dttop(Package): + """Package with a complicated dependency tree""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dttop-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dtbuild1', type='build') + depends_on('dtlink1') + depends_on('dtrun1', type='run') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dtuse/package.py b/var/spack/repos/builtin.mock/packages/dtuse/package.py new file mode 100644 index 0000000000..bd7391cee8 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dtuse/package.py @@ -0,0 +1,15 @@ +from spack import * + + +class Dtuse(Package): + """Simple package which uses dttop""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dtuse-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dttop') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dyninst/package.py b/var/spack/repos/builtin.mock/packages/dyninst/package.py index ad486011e2..daf1b82ec6 100644 --- a/var/spack/repos/builtin.mock/packages/dyninst/package.py +++ b/var/spack/repos/builtin.mock/packages/dyninst/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Dyninst(Package): homepage = "https://paradyn.org" url = "http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz" diff --git a/var/spack/repos/builtin.mock/packages/e/package.py b/var/spack/repos/builtin.mock/packages/e/package.py index b951a3eaa6..c764007563 100644 --- a/var/spack/repos/builtin.mock/packages/e/package.py +++ b/var/spack/repos/builtin.mock/packages/e/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class E(Package): """Simple package with no dependencies""" diff --git a/var/spack/repos/builtin.mock/packages/externalmodule/package.py b/var/spack/repos/builtin.mock/packages/externalmodule/package.py new file mode 100644 index 0000000000..f7c9b056a4 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/externalmodule/package.py @@ -0,0 +1,38 @@ + +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Externalmodule(Package): + homepage = "http://somewhere.com" + url = "http://somewhere.com/module-1.0.tar.gz" + + version('1.0', '1234567890abcdef1234567890abcdef') + + depends_on('externalprereq') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/externalprereq/package.py b/var/spack/repos/builtin.mock/packages/externalprereq/package.py index bd3c4348bf..226742f2cb 100644 --- a/var/spack/repos/builtin.mock/packages/externalprereq/package.py +++ b/var/spack/repos/builtin.mock/packages/externalprereq/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Externalprereq(Package): homepage = "http://somewhere.com" url = "http://somewhere.com/prereq-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/externaltest/package.py b/var/spack/repos/builtin.mock/packages/externaltest/package.py index 2318887aec..252c42556e 100644 --- a/var/spack/repos/builtin.mock/packages/externaltest/package.py +++ b/var/spack/repos/builtin.mock/packages/externaltest/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Externaltest(Package): homepage = "http://somewhere.com" url = "http://somewhere.com/test-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/externaltool/package.py b/var/spack/repos/builtin.mock/packages/externaltool/package.py index 9ff2396f36..d2daddd350 100644 --- a/var/spack/repos/builtin.mock/packages/externaltool/package.py +++ b/var/spack/repos/builtin.mock/packages/externaltool/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Externaltool(Package): homepage = "http://somewhere.com" url = "http://somewhere.com/tool-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/externalvirtual/package.py b/var/spack/repos/builtin.mock/packages/externalvirtual/package.py index e19ef332f0..1f3553014b 100644 --- a/var/spack/repos/builtin.mock/packages/externalvirtual/package.py +++ b/var/spack/repos/builtin.mock/packages/externalvirtual/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Externalvirtual(Package): homepage = "http://somewhere.com" url = "http://somewhere.com/stuff-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/fake/package.py b/var/spack/repos/builtin.mock/packages/fake/package.py index 15aabf1101..b83eec7470 100644 --- a/var/spack/repos/builtin.mock/packages/fake/package.py +++ b/var/spack/repos/builtin.mock/packages/fake/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Fake(Package): homepage = "http://www.fake-spack-example.org" url = "http://www.fake-spack-example.org/downloads/fake-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/git-test/package.py b/var/spack/repos/builtin.mock/packages/git-test/package.py index aeea41146f..730e71ac6b 100644 --- a/var/spack/repos/builtin.mock/packages/git-test/package.py +++ b/var/spack/repos/builtin.mock/packages/git-test/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class GitTest(Package): """Mock package that uses git for fetching.""" homepage = "http://www.git-fetch-example.com" diff --git a/var/spack/repos/builtin.mock/packages/hg-test/package.py b/var/spack/repos/builtin.mock/packages/hg-test/package.py index 64719eb53c..70a9b7f2c7 100644 --- a/var/spack/repos/builtin.mock/packages/hg-test/package.py +++ b/var/spack/repos/builtin.mock/packages/hg-test/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class HgTest(Package): """Test package that does fetching with mercurial.""" homepage = "http://www.hg-fetch-example.com" diff --git a/var/spack/repos/builtin.mock/packages/hypre/package.py b/var/spack/repos/builtin.mock/packages/hypre/package.py index 3aedea9bf2..b9e31b09dc 100644 --- a/var/spack/repos/builtin.mock/packages/hypre/package.py +++ b/var/spack/repos/builtin.mock/packages/hypre/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Hypre(Package): """Hypre is included here as an example of a package that depends on both LAPACK and BLAS.""" diff --git a/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py b/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py index 6ed779889b..bbbf196129 100644 --- a/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class IndirectMpich(Package): """Test case for a package that depends on MPI and one of its dependencies requires a *particular version* of MPI. diff --git a/var/spack/repos/builtin.mock/packages/libdwarf/package.py b/var/spack/repos/builtin.mock/packages/libdwarf/package.py index b53e295e23..0fcbe4a62e 100644 --- a/var/spack/repos/builtin.mock/packages/libdwarf/package.py +++ b/var/spack/repos/builtin.mock/packages/libdwarf/package.py @@ -23,11 +23,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os # Only build certain parts of dwarf because the other ones break. dwarf_dirs = ['libdwarf', 'dwarfdump2'] + class Libdwarf(Package): homepage = "http://www.prevanders.net/dwarf.html" url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/libelf/package.py b/var/spack/repos/builtin.mock/packages/libelf/package.py index f52d8cefe1..90d00ad339 100644 --- a/var/spack/repos/builtin.mock/packages/libelf/package.py +++ b/var/spack/repos/builtin.mock/packages/libelf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libelf(Package): homepage = "http://www.mr511.de/software/english.html" url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/mpich/package.py b/var/spack/repos/builtin.mock/packages/mpich/package.py index f278f26b8b..936127398c 100644 --- a/var/spack/repos/builtin.mock/packages/mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/mpich/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Mpich(Package): homepage = "http://www.mpich.org" url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/mpich2/package.py b/var/spack/repos/builtin.mock/packages/mpich2/package.py index e6b68d2490..c92b4ba43a 100644 --- a/var/spack/repos/builtin.mock/packages/mpich2/package.py +++ b/var/spack/repos/builtin.mock/packages/mpich2/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Mpich2(Package): homepage = "http://www.mpich.org" url = "http://www.mpich.org/static/downloads/1.5/mpich2-1.5.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/mpileaks/package.py b/var/spack/repos/builtin.mock/packages/mpileaks/package.py index bc26f539ba..10fbf3845e 100644 --- a/var/spack/repos/builtin.mock/packages/mpileaks/package.py +++ b/var/spack/repos/builtin.mock/packages/mpileaks/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Mpileaks(Package): homepage = "http://www.llnl.gov" url = "http://www.llnl.gov/mpileaks-1.0.tar.gz" @@ -35,6 +36,8 @@ class Mpileaks(Package): variant('debug', default=False, description='Debug variant') variant('opt', default=False, description='Optimized variant') + variant('shared', default=True, description='Build shared library') + variant('static', default=True, description='Build static library') depends_on("mpi") depends_on("callpath") diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py index def73ad82e..fa3f815135 100644 --- a/var/spack/repos/builtin.mock/packages/multimethod/package.py +++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import spack.architecture class Multimethod(Package): @@ -49,7 +50,6 @@ class Multimethod(Package): def no_version_2(self): return 4 - # # These functions overlap, so there is ambiguity, but we'll take # the first one. @@ -62,7 +62,6 @@ class Multimethod(Package): def version_overlap(self): return 2 - # # More complicated case with cascading versions. # @@ -81,7 +80,6 @@ class Multimethod(Package): def mpi_version(self): return 1 - # # Use these to test whether the default method is called when no # match is found. This also tests whether we can switch methods @@ -98,31 +96,25 @@ class Multimethod(Package): def has_a_default(self): return 'intel' - - # - # Make sure we can switch methods on different architectures + # Make sure we can switch methods on different target # - @when('arch=x86_64') - def different_by_architecture(self): - return 'x86_64' - - @when('arch=ppc64') - def different_by_architecture(self): - return 'ppc64' - - @when('arch=ppc32') - def different_by_architecture(self): - return 'ppc32' - - @when('arch=arm64') - def different_by_architecture(self): - return 'arm64' - - + 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): + if isinstance(self.spec.architecture.target, basestring): + return self.spec.architecture.target + else: + return self.spec.architecture.target.name # # Make sure we can switch methods on different dependencies # + @when('^mpich') def different_by_dep(self): return 'mpich' @@ -131,7 +123,6 @@ class Multimethod(Package): def different_by_dep(self): return 'zmpi' - # # Make sure we can switch on virtual dependencies # diff --git a/var/spack/repos/builtin.mock/packages/netlib-blas/package.py b/var/spack/repos/builtin.mock/packages/netlib-blas/package.py index 9d567f2e9b..0a5b1d0e6a 100644 --- a/var/spack/repos/builtin.mock/packages/netlib-blas/package.py +++ b/var/spack/repos/builtin.mock/packages/netlib-blas/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class NetlibBlas(Package): homepage = "http://www.netlib.org/lapack/" url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" diff --git a/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py b/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py index 46d6ae43dc..755d3001a4 100644 --- a/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class NetlibLapack(Package): homepage = "http://www.netlib.org/lapack/" url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" diff --git a/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py b/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py index b36237c1e2..0f14fbaa61 100644 --- a/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py +++ b/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class OpenblasWithLapack(Package): """Dummy version of OpenBLAS that also provides LAPACK, for testing.""" homepage = "http://www.openblas.net" diff --git a/var/spack/repos/builtin.mock/packages/openblas/package.py b/var/spack/repos/builtin.mock/packages/openblas/package.py index 5b39447e83..f6cdeeea49 100644 --- a/var/spack/repos/builtin.mock/packages/openblas/package.py +++ b/var/spack/repos/builtin.mock/packages/openblas/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Openblas(Package): """OpenBLAS: An optimized BLAS library""" homepage = "http://www.openblas.net" diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py index f97959c763..337f54e24e 100644 --- a/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class OptionalDepTest2(Package): """Depends on the optional-dep-test package""" diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py index d8fe33c3da..2904b3782d 100644 --- a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class OptionalDepTest3(Package): """Depends on the optional-dep-test package""" diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py index 80c1da55f8..2c07e61769 100644 --- a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class OptionalDepTest(Package): """Description""" diff --git a/var/spack/repos/builtin.mock/packages/python/package.py b/var/spack/repos/builtin.mock/packages/python/package.py index dc21b475e5..a5290161ad 100644 --- a/var/spack/repos/builtin.mock/packages/python/package.py +++ b/var/spack/repos/builtin.mock/packages/python/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Python(Package): """Dummy Python package to demonstrate preferred versions.""" homepage = "http://www.python.org" @@ -40,4 +41,3 @@ class Python(Package): def install(self, spec, prefix): pass - diff --git a/var/spack/repos/builtin.mock/packages/svn-test/package.py b/var/spack/repos/builtin.mock/packages/svn-test/package.py index 2f197593e0..01d0929c28 100644 --- a/var/spack/repos/builtin.mock/packages/svn-test/package.py +++ b/var/spack/repos/builtin.mock/packages/svn-test/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class SvnTest(Package): """Mock package that uses svn for fetching.""" url = "http://www.example.com/svn-test-1.0.tar.gz" diff --git a/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py b/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py index 7c65909ad2..2129d9788b 100644 --- a/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py +++ b/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class TrivialInstallTestPackage(Package): """This package is a stub with a trivial install method. It allows us to test the install and uninstall logic of spack.""" diff --git a/var/spack/repos/builtin.mock/packages/zmpi/package.py b/var/spack/repos/builtin.mock/packages/zmpi/package.py index fcd3afe93b..b6a5b33011 100644 --- a/var/spack/repos/builtin.mock/packages/zmpi/package.py +++ b/var/spack/repos/builtin.mock/packages/zmpi/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Zmpi(Package): """This is a fake MPI package used to demonstrate virtual package providers with dependencies.""" diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index f8173169e1..b0ccba1009 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -51,7 +51,7 @@ class Imagemagick(Package): url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") depends_on('jpeg') - depends_on('libtool') + depends_on('libtool', type='build') depends_on('libpng') depends_on('freetype') depends_on('fontconfig') diff --git a/var/spack/repos/builtin/packages/LuaJIT/package.py b/var/spack/repos/builtin/packages/LuaJIT/package.py index db6f7d3cad..244c63c8fb 100644 --- a/var/spack/repos/builtin/packages/LuaJIT/package.py +++ b/var/spack/repos/builtin/packages/LuaJIT/package.py @@ -25,6 +25,7 @@ import os from spack import * + class Luajit(Package): """Flast flexible JITed lua""" homepage = "http://www.luajit.org" diff --git a/var/spack/repos/builtin/packages/Mitos/package.py b/var/spack/repos/builtin/packages/Mitos/package.py index 83aca3dc6a..d577a1b285 100644 --- a/var/spack/repos/builtin/packages/Mitos/package.py +++ b/var/spack/repos/builtin/packages/Mitos/package.py @@ -41,6 +41,7 @@ class Mitos(Package): depends_on('dyninst@8.2.1:') depends_on('hwloc') depends_on('mpi') + depends_on('cmake', type='build') def install(self, spec, prefix): with working_dir('spack-build', create=True): diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 0177fe1a2b..e880a3aa66 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 * +import shutil 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.1', 'f50a659738b73036e2f5635adbd229c5') + 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,59 +69,107 @@ class R(Package): depends_on('freetype') depends_on('tcl') depends_on('tk') + depends_on('curl') + depends_on('pcre') + depends_on('jdk') + + @property + def etcdir(self): + return join_path(prefix, 'rlib', 'R', 'etc') 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') + # Make a copy of Makeconf because it will be needed to properly build R + # dependencies in Spack. + src_makeconf = join_path(self.etcdir, 'Makeconf') + dst_makeconf = join_path(self.etcdir, 'Makeconf.spack') + shutil.copy(src_makeconf, dst_makeconf) + + self.filter_compilers(spec, prefix) + + def filter_compilers(self, spec, prefix): + """Run after install to tell the configuration files and Makefiles + to use the compilers that Spack built the package with. + + If this isn't done, they'll have CC and CXX set to Spack's generic + cc and c++. We want them to be bound to whatever compiler + they were built with.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + + filter_file(env['CC'], self.compiler.cc, + join_path(self.etcdir, 'Makeconf'), **kwargs) + filter_file(env['CXX'], self.compiler.cxx, + join_path(self.etcdir, 'Makeconf'), **kwargs) + filter_file(env['F77'], self.compiler.f77, + join_path(self.etcdir, 'Makeconf'), **kwargs) + filter_file(env['FC'], self.compiler.fc, + join_path(self.etcdir, 'Makeconf'), **kwargs) + # ======================================================================== # Set up environment to make install easy for R extensions. # ======================================================================== @property def r_lib_dir(self): - return os.path.join('rlib', 'R', 'library') + return join_path('rlib', 'R', 'library') def setup_dependent_environment(self, spack_env, run_env, extension_spec): # Set R_LIBS to include the library dir for the # extension and any other R extensions it depends on. r_libs_path = [] - for d in extension_spec.traverse(): + for d in extension_spec.traverse(deptype=nolink, deptype_query='run'): if d.package.extends(self.spec): - r_libs_path.append(os.path.join(d.prefix, self.r_lib_dir)) + r_libs_path.append(join_path(d.prefix, self.r_lib_dir)) r_libs_path = ':'.join(r_libs_path) spack_env.set('R_LIBS', r_libs_path) + spack_env.set('R_MAKEVARS_SITE', + join_path(self.etcdir, 'Makeconf.spack')) + + # Use the number of make_jobs set in spack. The make program will + # determine how many jobs can actually be started. + spack_env.set('MAKEFLAGS', '-j{0}'.format(make_jobs)) - # 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', join_path( + extension_spec.prefix, self.r_lib_dir)) + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'rlib', 'R', 'lib')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'rlib', 'R', 'lib')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'rlib', 'R', 'include')) 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:: + """Called before R modules' install() methods. In most cases, + extensions will only need to have one line: + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path)""" - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) - """ # 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) + module.r_lib_dir = join_path(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/repos/builtin/packages/SAMRAI/package.py b/var/spack/repos/builtin/packages/SAMRAI/package.py index 73c51ced23..e0648290d6 100644 --- a/var/spack/repos/builtin/packages/SAMRAI/package.py +++ b/var/spack/repos/builtin/packages/SAMRAI/package.py @@ -24,12 +24,14 @@ ############################################################################## from spack import * + class Samrai(Package): """SAMRAI (Structured Adaptive Mesh Refinement Application Infrastructure) - is an object-oriented C++ software library enables exploration of numerical, - algorithmic, parallel computing, and software issues associated with applying - structured adaptive mesh refinement (SAMR) technology in large-scale parallel - application development. + is an object-oriented C++ software library enables exploration of + numerical, algorithmic, parallel computing, and software issues + associated with applying structured adaptive mesh refinement + (SAMR) technology in large-scale parallel application development. + """ homepage = "https://computation.llnl.gov/project/SAMRAI/" url = "https://computation.llnl.gov/project/SAMRAI/download/SAMRAI-v3.9.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py new file mode 100644 index 0000000000..70249aebac --- /dev/null +++ b/var/spack/repos/builtin/packages/ack/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 Ack(Package): + """ack 2.14 is a tool like grep, optimized for programmers. + + Designed for programmers with large heterogeneous trees of + source code, ack is written purely in portable Perl 5 and takes + advantage of the power of Perl's regular expressions.""" + + homepage = "http://beyondgrep.com/" + url = "http://beyondgrep.com/ack-2.14-single-file" + + version('2.14', 'e74150a1609d28a70b450ef9cc2ed56b', expand=False) + + depends_on('perl') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + ack = 'ack-{0}-single-file'.format(self.version) + + # rewrite the script's #! line to call the perl dependency + shbang = '#!' + join_path(spec['perl'].prefix.bin, 'perl') + filter_file(r'^#!/usr/bin/env perl', shbang, ack) + + install(ack, join_path(prefix.bin, "ack")) + set_executable(join_path(prefix.bin, "ack")) diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py index 9d15bd71d9..6a4e67a1ca 100644 --- a/var/spack/repos/builtin/packages/activeharmony/package.py +++ b/var/spack/repos/builtin/packages/activeharmony/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class Activeharmony(Package): - """Active Harmony: a framework for auto-tuning (the automated search for values to improve the performance of a target application).""" + """Active Harmony: a framework for auto-tuning (the automated search for + values to improve the performance of a target application).""" homepage = "http://www.dyninst.org/harmony" url = "http://www.dyninst.org/sites/default/files/downloads/harmony/ah-4.5.tar.gz" @@ -34,6 +36,3 @@ class Activeharmony(Package): def install(self, spec, prefix): make("CFLAGS=-O3") make("install", 'PREFIX=%s' % prefix) - -from spack import * - diff --git a/var/spack/repos/builtin/packages/adept-utils/package.py b/var/spack/repos/builtin/packages/adept-utils/package.py index 7b6c3702af..1a6998fd96 100644 --- a/var/spack/repos/builtin/packages/adept-utils/package.py +++ b/var/spack/repos/builtin/packages/adept-utils/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class AdeptUtils(Package): """Utility libraries for LLNL performance tools.""" @@ -35,6 +36,7 @@ class AdeptUtils(Package): depends_on("boost") depends_on("mpi") + depends_on('cmake', type='build') def install(self, spec, prefix): cmake(*std_cmake_args) diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py new file mode 100644 index 0000000000..59e0a451a9 --- /dev/null +++ b/var/spack/repos/builtin/packages/adios/package.py @@ -0,0 +1,41 @@ +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 + """ + + homepage = "http://www.olcf.ornl.gov/center-projects/adios/" + url = "https://github.com/ornladios/ADIOS/archive/v1.9.0.tar.gz" + + version('1.9.0', '310ff02388bbaa2b1c1710ee970b5678') + + # Lots of setting up here for this package + # module swap PrgEnv-intel PrgEnv-$COMP + # module load cray-netcdf/4.3.3.1 + # module load cray-hdf5/1.8.14 + # module load python/2.7.10 + depends_on('hdf5') + depends_on('mxml') + + def install(self, spec, 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"] + + if spec.satisfies('%gcc'): + configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"]) + + configure(*configure_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index a6052ad7bd..c5d53de230 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -23,21 +23,24 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import sys + class AdolC(Package): - """A package for the automatic differentiation of first and higher derivatives of vector functions in C and C++ programs by operator overloading.""" + """A package for the automatic differentiation of first and higher + derivatives of vector functions in C and C++ programs by operator + overloading.""" homepage = "https://projects.coin-or.org/ADOL-C" url = "http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.6.1.tgz" version('head', svn='https://projects.coin-or.org/svn/ADOL-C/trunk/') version('2.6.1', '1032b28427d6e399af4610e78c0f087b') - + variant('doc', default=True, description='Install documentation') variant('openmp', default=False, description='Enable OpenMP support') variant('sparse', default=False, description='Enable sparse drivers') - variant('tests', default=True, description='Build all included examples as a test case') - + variant('tests', default=True, + description='Build all included examples as a test case') + patch('openmp_exam.patch') def install(self, spec, prefix): @@ -49,10 +52,14 @@ class AdolC(Package): if '+openmp' in spec: if spec.satisfies('%gcc'): make_args.extend([ - '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I <path to omp.h> -L <LLVM OpenMP library path> + # FIXME: Is this required? -I <path to omp.h> -L <LLVM + # OpenMP library path> + '--with-openmp-flag=-fopenmp' ]) else: - raise InstallError("OpenMP flags for compilers other than GCC are not implemented.") + raise InstallError( + "OpenMP flags for compilers other than GCC " + "are not implemented.") if '+sparse' in spec: make_args.extend([ @@ -63,7 +70,7 @@ class AdolC(Package): # whether Adol-C works as expected if '+tests' in spec: make_args.extend([ - '--enable-docexa', # Documeted examples + '--enable-docexa', # Documeted examples '--enable-addexa' # Additional examples ]) if '+openmp' in spec: @@ -74,31 +81,36 @@ class AdolC(Package): configure(*make_args) make() make("install") - + # Copy the config.h file, as some packages might require it source_directory = self.stage.source_path - config_h = join_path(source_directory,'ADOL-C','src','config.h') - install(config_h, join_path(prefix.include,'adolc')) - + config_h = join_path(source_directory, 'ADOL-C', 'src', 'config.h') + install(config_h, join_path(prefix.include, 'adolc')) + # Install documentation to {prefix}/share if '+doc' in spec: - install_tree(join_path('ADOL-C','doc'), - join_path(prefix.share,'doc')) - + install_tree(join_path('ADOL-C', 'doc'), + join_path(prefix.share, 'doc')) + # Install examples to {prefix}/share if '+tests' in spec: - install_tree(join_path('ADOL-C','examples'), - join_path(prefix.share,'examples')) - + install_tree(join_path('ADOL-C', 'examples'), + join_path(prefix.share, 'examples')) + # Run some examples that don't require user input # TODO: Check that bundled examples produce the correct results - with working_dir(join_path(source_directory,'ADOL-C','examples')): + with working_dir(join_path( + source_directory, 'ADOL-C', 'examples')): Executable('./tapeless_scalar')() Executable('./tapeless_vector')() - - with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + + with working_dir(join_path( + source_directory, + 'ADOL-C', 'examples', 'additional_examples')): Executable('./checkpointing/checkpointing')() - + if '+openmp' in spec: - with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + with working_dir(join_path( + source_directory, + 'ADOL-C', 'examples', 'additional_examples')): Executable('./checkpointing/checkpointing')() diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py index eb67facaf3..891061c62f 100644 --- a/var/spack/repos/builtin/packages/antlr/package.py +++ b/var/spack/repos/builtin/packages/antlr/package.py @@ -24,8 +24,9 @@ ############################################################################## from spack import * + class Antlr(Package): - + homepage = "http://www.antlr.org" url = "https://github.com/antlr/antlr/tarball/v2.7.7" @@ -41,22 +42,23 @@ class Antlr(Package): # CharScanner.hpp must include this line: #include <cstring> or else # ncap2 will not compile (this tarball is already patched). version('2.7.7', '914865e853fe8e1e61a9f23d045cb4ab', - # Patched version as described above - url='http://dust.ess.uci.edu/tmp/antlr-2.7.7.tar.gz') - # Unpatched version - # url='http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz') + # Patched version as described above + url='http://dust.ess.uci.edu/tmp/antlr-2.7.7.tar.gz') + # Unpatched version + # url='http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz') variant('cxx', default=False, description='Enable ANTLR for C++') variant('java', default=False, description='Enable ANTLR for Java') variant('python', default=False, description='Enable ANTLR for Python') variant('csharp', default=False, description='Enable ANTLR for Csharp') - def install(self, spec, prefix): # Check for future enabling of variants for v in ('+java', '+python', '+csharp'): if v in spec: - raise Error('Illegal variant %s; for now, Spack only knows how to build antlr or antlr+cxx') + raise Error( + ('Illegal variant %s; ' % v) + 'for now, ' + 'Spack only knows how to build antlr or antlr+cxx') config_args = [ '--prefix=%s' % prefix, diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py new file mode 100644 index 0000000000..b1647798b5 --- /dev/null +++ b/var/spack/repos/builtin/packages/ape/package.py @@ -0,0 +1,55 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Ape(Package): + """A tool for generating atomic pseudopotentials within a Density-Functional + Theory framework""" + + homepage = "http://www.tddft.org/programs/APE/" + url = "http://www.tddft.org/programs/APE/sites/default/files/ape-2.2.1.tar.gz" + + version('2.2.1', 'ab81da85bd749c0c136af088c7f9ad58') + + depends_on('gsl') + depends_on('libxc') + + def install(self, spec, prefix): + args = [] + args.extend([ + '--prefix=%s' % prefix, + '--with-gsl-prefix=%s' % spec['gsl'].prefix, + '--with-libxc-prefix=%s' % spec['libxc'].prefix + ]) + + if spec.satisfies('%clang') or spec.satisfies('%gcc'): + args.extend([ + 'FCFLAGS=-O2 -ffree-line-length-none' + ]) + + configure(*args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py index 20cbd8e8c6..832e10a1ec 100644 --- a/var/spack/repos/builtin/packages/apex/package.py +++ b/var/spack/repos/builtin/packages/apex/package.py @@ -25,6 +25,7 @@ from spack import * from spack.util.environment import * + class Apex(Package): homepage = "http://github.com/khuck/xpress-apex" url = "http://github.com/khuck/xpress-apex/archive/v0.1.tar.gz" @@ -33,23 +34,23 @@ class Apex(Package): depends_on("binutils+libiberty") depends_on("boost@1.54:") - depends_on("cmake@2.8.12:") + depends_on('cmake@2.8.12:', type='build') depends_on("activeharmony@4.5:") depends_on("ompt-openmp") def install(self, spec, prefix): - path=get_path("PATH") + path = get_path("PATH") path.remove(spec["binutils"].prefix.bin) path_set("PATH", path) with working_dir("build", create=True): cmake('-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DUSE_BFD=TRUE', - '-DBFD_ROOT=%s' % spec['binutils'].prefix, - '-DUSE_ACTIVEHARMONY=TRUE', - '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix, - '-DUSE_OMPT=TRUE', - '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix, - '..', *std_cmake_args) + '-DUSE_BFD=TRUE', + '-DBFD_ROOT=%s' % spec['binutils'].prefix, + '-DUSE_ACTIVEHARMONY=TRUE', + '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix, + '-DUSE_OMPT=TRUE', + '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix, + '..', *std_cmake_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 05dc670aed..8e01d3bbdd 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class AprUtil(Package): """Apache Portable Runtime Utility""" homepage = 'https://apr.apache.org/' diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py index 398e1c323d..0cd51f52e3 100644 --- a/var/spack/repos/builtin/packages/apr/package.py +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Apr(Package): """Apache portable runtime.""" homepage = 'https://apr.apache.org/' 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..4356f60aca --- /dev/null +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -0,0 +1,69 @@ +############################################################################## +# 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.2', 'b21585372d67a8876117fd515d8cf0a2') + version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e') + + variant('hdf5', default=False, description='Include HDF5 support') + + depends_on('cmake@2.8:', type='build') + depends_on('arpack-ng') # old arpack causes undefined symbols + 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.{1}'.format( + spec['arpack-ng'].prefix.lib, dso_suffix), + # 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-ng/make_install.patch b/var/spack/repos/builtin/packages/arpack-ng/make_install.patch new file mode 100644 index 0000000000..ad5cffcc19 --- /dev/null +++ b/var/spack/repos/builtin/packages/arpack-ng/make_install.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 607d221..50426c3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -389,3 +389,19 @@ target_link_libraries(bug_1323 arpack ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) + add_test(bug_1323 Tests/bug_1323) + + add_dependencies(check dnsimp_test bug_1315_single bug_1315_double bug_1323) ++ ++############################ ++# install ++############################ ++# 'make install' to the correct location ++install(TARGETS arpack ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin) ++ ++if (MPI) ++ install(TARGETS parpack ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin) ++endif () diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index fcd5171a7d..728c2345f2 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -27,7 +27,8 @@ from spack import * class ArpackNg(Package): """ - ARPACK-NG is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems. + ARPACK-NG is a collection of Fortran77 subroutines designed to solve large + scale eigenvalue problems. Important Features: @@ -38,43 +39,85 @@ class ArpackNg(Package): Generalized Problems. * Routines for Banded Matrices - Standard or Generalized Problems. * Routines for The Singular Value Decomposition. - * Example driver routines that may be used as templates to implement numerous - Shift-Invert strategies for all problem types, data types and precision. + * Example driver routines that may be used as templates to implement + numerous Shift-Invert strategies for all problem types, data types and + precision. - This project is a joint project between Debian, Octave and Scilab in order to - provide a common and maintained version of arpack. + This project is a joint project between Debian, Octave and Scilab in order + to provide a common and maintained version of arpack. - Indeed, no single release has been published by Rice university for the last - few years and since many software (Octave, Scilab, R, Matlab...) forked it and - implemented their own modifications, arpack-ng aims to tackle this by providing - a common repository and maintained versions. + Indeed, no single release has been published by Rice university for the + last few years and since many software (Octave, Scilab, R, Matlab...) + forked it and implemented their own modifications, arpack-ng aims to tackle + this by providing a common repository and maintained versions. arpack-ng is replacing arpack almost everywhere. """ homepage = 'https://github.com/opencollab/arpack-ng' url = 'https://github.com/opencollab/arpack-ng/archive/3.3.0.tar.gz' + version('3.4.0', 'ae9ca13f2143a7ea280cb0e2fd4bfae4') version('3.3.0', 'ed3648a23f0a868a43ef44c97a21bad5') - variant('shared', default=True, description='Enables the build of shared libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') variant('mpi', default=False, description='Activates MPI support') - # The function pdlamch10 does not set the return variable. This is fixed upstream + # The function pdlamch10 does not set the return variable. + # This is fixed upstream # see https://github.com/opencollab/arpack-ng/issues/34 - patch('pdlamch10.patch', when='@3.3:') + patch('pdlamch10.patch', when='@3.3.0') + + patch('make_install.patch', when='@3.4.0') + patch('parpack_cmake.patch', when='@3.4.0') depends_on('blas') depends_on('lapack') - depends_on('automake') - depends_on('autoconf') - depends_on('libtool@2.4.2:') + depends_on('automake', when='@3.3.0', type='build') + depends_on('autoconf', when='@3.3.0', type='build') + depends_on('libtool@2.4.2:', when='@3.3.0', type='build') + depends_on('cmake@2.8.6:', when='@3.4.0:', type='build') depends_on('mpi', when='+mpi') + @when('@3.4.0:') + def install(self, spec, prefix): + + options = ['-DEXAMPLES=ON'] + options.extend(std_cmake_args) + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + + # Make sure we use Spack's blas/lapack: + options.extend([ + '-DLAPACK_FOUND=true', + '-DLAPACK_INCLUDE_DIRS=%s' % spec['lapack'].prefix.include, + '-DLAPACK_LIBRARIES=%s' % ( + spec['lapack'].lapack_shared_lib if '+shared' in spec else + spec['lapack'].lapack_static_lib), + '-DBLAS_FOUND=true', + '-DBLAS_INCLUDE_DIRS=%s' % spec['blas'].prefix.include, + '-DBLAS_LIBRARIES=%s' % ( + spec['blas'].blas_shared_lib if '+shared' in spec else + spec['blas'].blas_static_lib) + ]) + + if '+mpi' in spec: + options.append('-DMPI=ON') + + # TODO: -DINTERFACE64=ON + + if '+shared' in spec: + options.append('-DBUILD_SHARED_LIBS=ON') + + cmake('.', *options) + make() + if self.run_tests: + make('test') + make('install') + + @when('@3.3.0') def install(self, spec, prefix): # Apparently autotools are not bootstrapped - # TODO: switch to use the CMake build in the next version - # rather than bootstrapping. which('libtoolize')() bootstrap = Executable('./bootstrap') @@ -83,13 +126,26 @@ class ArpackNg(Package): if '+mpi' in spec: options.extend([ '--enable-mpi', - 'F77=mpif77' #FIXME: avoid hardcoding MPI wrapper names + 'F77=%s' % spec['mpi'].mpif77 ]) - if '~shared' in spec: - options.append('--enable-shared=no') + if '+shared' in spec: + options.extend([ + '--with-blas=%s' % to_link_flags( + spec['blas'].blas_shared_lib), + '--with-lapack=%s' % to_link_flags( + spec['lapack'].lapack_shared_lib) + ]) + else: + options.extend([ + '--with-blas=%s' % spec['blas'].blas_static_lib, + '--with-lapack=%s' % spec['lapack'].lapack_static_lib, + '--enable-shared=no' + ]) bootstrap() configure(*options) make() + if self.run_tests: + make('check') make('install') diff --git a/var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch b/var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch new file mode 100644 index 0000000000..9b11bea6ac --- /dev/null +++ b/var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 607d221..345b7fc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,11 +113,12 @@ set_target_properties(arpack PROPERTIES OUTPUT_NAME arpack${LIBSUFFIX}) + + if (MPI) + # add_library(parpack SHARED +- add_library(parpack ++ add_library(parpack + ${parpacksrc_STAT_SRCS} + ${parpackutil_STAT_SRCS}) + + target_link_libraries(parpack ${MPI_Fortran_LIBRARIES}) ++ target_link_libraries(parpack arpack) + set_target_properties(parpack PROPERTIES OUTPUT_NAME parpack${LIBSUFFIX}) + endif () + 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/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py index a846e0ba65..be8db684f5 100644 --- a/var/spack/repos/builtin/packages/asciidoc/package.py +++ b/var/spack/repos/builtin/packages/asciidoc/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Asciidoc(Package): """ A presentable text document format for writing articles, UNIX man pages and other small to medium sized documents.""" diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py index 1d26145fd1..d5b6933ec3 100644 --- a/var/spack/repos/builtin/packages/atk/package.py +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Atk(Package): """ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK @@ -32,9 +33,16 @@ class Atk(Package): homepage = "https://developer.gnome.org/atk/" url = "http://ftp.gnome.org/pub/gnome/sources/atk/2.14/atk-2.14.0.tar.xz" + version('2.20.0', '5187b0972f4d3905f285540b31395e20') version('2.14.0', 'ecb7ca8469a5650581b1227d78051b8b') - depends_on("glib") + depends_on('glib') + depends_on('pkg-config', type='build') + + def url_for_version(self, version): + """Handle atk's version-based custom URLs.""" + url = 'http://ftp.gnome.org/pub/gnome/sources/atk' + return 'url+/%s/atk-%s.tar.xz' % (version.up_to(2), version) def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index c43d92c34f..f9d5da6166 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -23,20 +23,24 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +from spack.package_test import * from spack.util.executable import Executable import os.path + class Atlas(Package): - """ - Automatically Tuned Linear Algebra Software, generic shared ATLAS is an approach for the automatic generation and - optimization of numerical software. Currently ATLAS supplies optimized versions for the complete set of linear - algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines - in the LAPACK library. + """Automatically Tuned Linear Algebra Software, generic shared ATLAS is an + approach for the automatic generation and optimization of numerical + software. Currently ATLAS supplies optimized versions for the complete set + of linear algebra kernels known as the Basic Linear Algebra Subroutines + (BLAS), and a subset of the linear algebra routines in the LAPACK library. """ homepage = "http://math-atlas.sourceforge.net/" version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da', - url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2', preferred=True) + url='https://sourceforge.net/projects/math-atlas/files/Stable/3.10.2/atlas3.10.2.tar.bz2', preferred=True) + # not all packages (e.g. Trilinos@12.6.3) stopped using deprecated in 3.6.0 + # Lapack routines. Stick with 3.5.0 until this is fixed. resource(name='lapack', url='http://www.netlib.org/lapack/lapack-3.5.0.tgz', md5='b1d3e3e425b2e44a06760ff173104bdf', @@ -44,7 +48,7 @@ class Atlas(Package): when='@3:') version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', - url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') + url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2') variant('shared', default=True, description='Builds shared library') @@ -66,9 +70,24 @@ class Atlas(Package): options = [] if '+shared' in spec: - options.append('--shared') + options.extend([ + '--shared' + ]) + # TODO: for non GNU add '-Fa', 'alg', '-fPIC' ? + + # configure for 64-bit build + options.extend([ + '-b', '64' + ]) - # Lapack resource + # set compilers: + options.extend([ + '-C', 'ic', spack_cc, + '-C', 'if', spack_f77 + ]) + + # Lapack resource to provide full lapack build. Note that + # ATLAS only provides a few LAPACK routines natively. lapack_stage = self.stage[1] lapack_tarfile = os.path.basename(lapack_stage.fetcher.url) lapack_tarfile_path = join_path(lapack_stage.path, lapack_tarfile) @@ -81,4 +100,35 @@ class Atlas(Package): make('check') make('ptcheck') make('time') + if '+shared' in spec: + with working_dir('lib'): + make('shared_all') + make("install") + self.install_test() + + def setup_dependent_package(self, module, dspec): + # libsatlas.[so,dylib,dll ] contains all serial APIs (serial lapack, + # serial BLAS), and all ATLAS symbols needed to support them. Whereas + # libtatlas.[so,dylib,dll ] is parallel (multithreaded) version. + name = 'libsatlas.%s' % dso_suffix + libdir = find_library_path(name, + self.prefix.lib64, + self.prefix.lib) + + if '+shared' in self.spec: + self.spec.blas_shared_lib = join_path(libdir, name) + self.spec.lapack_shared_lib = self.spec.blas_shared_lib + + def install_test(self): + source_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.c') + blessed_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.output') + + include_flags = ["-I%s" % join_path(self.spec.prefix, "include")] + link_flags = ["-L%s" % join_path(self.spec.prefix, "lib"), + "-lsatlas"] + + output = compile_c_and_execute(source_file, include_flags, link_flags) + compare_output_file(output, blessed_file) diff --git a/var/spack/repos/builtin/packages/atlas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/atlas/test_cblas_dgemm.c new file mode 100644 index 0000000000..2cb90fb883 --- /dev/null +++ b/var/spack/repos/builtin/packages/atlas/test_cblas_dgemm.c @@ -0,0 +1,49 @@ +#include <cblas.h> +#include <stdio.h> + +double m[] = { + 3, 1, 3, + 1, 5, 9, + 2, 6, 5 +}; + +double x[] = { + -1, 3, -3 +}; + +#ifdef __cplusplus +extern "C" { +#endif + + void dgesv_(int *n, int *nrhs, double *a, int *lda, + int *ipivot, double *b, int *ldb, int *info); + +#ifdef __cplusplus +} +#endif + +int main(void) { + int i; + // blas: + double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; + cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); + for (i = 0; i < 9; i++) + printf("%f\n", C[i]); + + // lapack: + int ipiv[3]; + int j; + int info; + int n = 1; + int nrhs = 1; + int lda = 3; + int ldb = 3; + dgesv_(&n,&nrhs, &m[0], &lda, ipiv, &x[0], &ldb, &info); + for (i=0; i<3; ++i) + printf("%5.1f\n", x[i]); + + return 0; +} diff --git a/var/spack/repos/builtin/packages/atlas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/atlas/test_cblas_dgemm.output new file mode 100644 index 0000000000..01404462c4 --- /dev/null +++ b/var/spack/repos/builtin/packages/atlas/test_cblas_dgemm.output @@ -0,0 +1,12 @@ +11.000000 +-9.000000 +5.000000 +-9.000000 +21.000000 +-1.000000 +5.000000 +-1.000000 +3.000000 + -0.3 + 3.0 + -3.0 diff --git a/var/spack/repos/builtin/packages/atop/package.py b/var/spack/repos/builtin/packages/atop/package.py index 9cacafc634..e3a9d464a9 100644 --- a/var/spack/repos/builtin/packages/atop/package.py +++ b/var/spack/repos/builtin/packages/atop/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Atop(Package): """Atop is an ASCII full-screen performance monitor for Linux""" homepage = "http://www.atoptool.nl/index.php" @@ -37,4 +38,4 @@ class Atop(Package): install("atop", join_path(prefix.bin, "atop")) mkdirp(join_path(prefix.man, "man1")) install(join_path("man", "atop.1"), - join_path(prefix.man, "man1", "atop.1")) + join_path(prefix.man, "man1", "atop.1")) diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index d920855a2f..2de1c390db 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', type='build') + + 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/automaded/package.py b/var/spack/repos/builtin/packages/automaded/package.py index fc65a04a06..7e586b2991 100644 --- a/var/spack/repos/builtin/packages/automaded/package.py +++ b/var/spack/repos/builtin/packages/automaded/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Automaded(Package): """AutomaDeD (Automata-based Debugging for Dissimilar parallel tasks) is a tool for automatic diagnosis of performance and @@ -44,6 +45,7 @@ class Automaded(Package): depends_on('mpi') depends_on('boost') depends_on('callpath') + depends_on('cmake', type='build') def install(self, spec, prefix): cmake("-DSTATE_TRACKER_WITH_CALLPATH=ON", *std_cmake_args) 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/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py index 5820595be9..e0cd114635 100644 --- a/var/spack/repos/builtin/packages/bash/package.py +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Bash(Package): """The GNU Project's Bourne Again SHell.""" diff --git a/var/spack/repos/builtin/packages/bbcp/package.py b/var/spack/repos/builtin/packages/bbcp/package.py index 09e897f34e..f69ed395a3 100644 --- a/var/spack/repos/builtin/packages/bbcp/package.py +++ b/var/spack/repos/builtin/packages/bbcp/package.py @@ -24,18 +24,22 @@ ############################################################################## from spack import * + class Bbcp(Package): """Securely and quickly copy data from source to target""" homepage = "http://www.slac.stanford.edu/~abh/bbcp/" - version('git', git='http://www.slac.stanford.edu/~abh/bbcp/bbcp.git', branch="master") + version('git', git='http://www.slac.stanford.edu/~abh/bbcp/bbcp.git', + branch="master") def install(self, spec, prefix): cd("src") make() - # BBCP wants to build the executable in a directory whose name depends on the system type + # BBCP wants to build the executable in a directory whose name depends + # on the system type makesname = Executable("../MakeSname") - bbcp_executable_path = "../bin/%s/bbcp" % makesname(output=str).rstrip("\n") + bbcp_executable_path = "../bin/%s/bbcp" % makesname( + output=str).rstrip("\n") destination_path = "%s/bin/" % prefix mkdirp(destination_path) install(bbcp_executable_path, destination_path) diff --git a/var/spack/repos/builtin/packages/bcftools/package.py b/var/spack/repos/builtin/packages/bcftools/package.py new file mode 100644 index 0000000000..a1b4a06dbb --- /dev/null +++ b/var/spack/repos/builtin/packages/bcftools/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 Bcftools(Package): + """BCFtools is a set of utilities that manipulate variant calls in the + Variant Call Format (VCF) and its binary counterpart BCF. All + commands work transparently with both VCFs and BCFs, both + uncompressed and BGZF-compressed.""" + + homepage = "http://samtools.github.io/bcftools/" + url = "https://github.com/samtools/bcftools/releases/download/1.3.1/bcftools-1.3.1.tar.bz2" + + version('1.3.1', '575001e9fca37cab0c7a7287ad4b1cdb') + + depends_on('zlib') + + def install(self, spec, prefix): + make("prefix=%s" % prefix, "all") + make("prefix=%s" % prefix, "install") diff --git a/var/spack/repos/builtin/packages/bdw-gc/package.py b/var/spack/repos/builtin/packages/bdw-gc/package.py new file mode 100644 index 0000000000..5120266319 --- /dev/null +++ b/var/spack/repos/builtin/packages/bdw-gc/package.py @@ -0,0 +1,53 @@ +############################################################################## +# 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 BdwGc(Package): + """The Boehm-Demers-Weiser conservative garbage collector is a garbage + collecting replacement for C malloc or C++ new.""" + + homepage = "http://www.hboehm.info/gc/" + url = "http://www.hboehm.info/gc/gc_source/gc-7.4.4.tar.gz" + + version('7.4.4', '96d18b0448a841c88d56e4ab3d180297') + + variant('libatomic-ops', default=True, + description='Use external libatomic-ops') + + depends_on('libatomic-ops', when='+libatomic-ops') + + def install(self, spec, prefix): + config_args = [ + '--prefix={0}'.format(prefix), + '--with-libatomic-ops={0}'.format( + 'yes' if '+libatomic-ops' in spec else 'no') + ] + + configure(*config_args) + + make() + make('check') + make('install') diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py index 730a684ec5..f52050d7b9 100644 --- a/var/spack/repos/builtin/packages/bear/package.py +++ b/var/spack/repos/builtin/packages/bear/package.py @@ -24,14 +24,16 @@ ############################################################################## from spack import * + class Bear(Package): - """Bear is a tool that generates a compilation database for clang tooling from non-cmake build systems.""" + """Bear is a tool that generates a compilation database for clang tooling + from non-cmake build systems.""" homepage = "https://github.com/rizsotto/Bear" url = "https://github.com/rizsotto/Bear/archive/2.0.4.tar.gz" version('2.0.4', 'fd8afb5e8e18f8737ba06f90bd77d011') - depends_on("cmake") + depends_on('cmake', type='build') depends_on("python") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py new file mode 100644 index 0000000000..7dd17a062e --- /dev/null +++ b/var/spack/repos/builtin/packages/bertini/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 Bertini(Package): + """Bertini is a general-purpose solver, written in C, that was created + for research about polynomial continuation. It solves for the numerical + solution of systems of polynomial equations using homotopy continuation.""" + + homepage = "https://bertini.nd.edu/" + url = "https://bertini.nd.edu/BertiniSource_v1.5.tar.gz" + + version('1.5', 'e3f6cc6e7f9a0cf1d73185e8671af707') + + variant('mpi', default=True, description='Compile in parallel') + + depends_on('flex', type='build') + depends_on('bison', type='build') + depends_on('gmp') + depends_on('mpfr') + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/bib2xhtml/package.py b/var/spack/repos/builtin/packages/bib2xhtml/package.py index a9cbd204b6..b356038180 100644 --- a/var/spack/repos/builtin/packages/bib2xhtml/package.py +++ b/var/spack/repos/builtin/packages/bib2xhtml/package.py @@ -25,10 +25,11 @@ from spack import * from glob import glob + class Bib2xhtml(Package): """bib2xhtml is a program that converts BibTeX files into HTML.""" homepage = "http://www.spinellis.gr/sw/textproc/bib2xhtml/" - url='http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v3.0-15-gf506.tar.gz' + url = 'http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v3.0-15-gf506.tar.gz' version('3.0-15-gf506', 'a26ba02fe0053bbbf2277bdf0acf8645') diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 9e4cc98ae6..e329e6fd7a 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -24,28 +24,33 @@ ############################################################################## 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') - version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66') + version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66', preferred=True) version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b') version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') - depends_on('m4') - depends_on('flex') - depends_on('bison') + depends_on('m4', type='build') + depends_on('flex', type='build') + depends_on('bison', type='build') - # 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/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index c5bc051c80..70795f05cc 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -24,9 +24,10 @@ ############################################################################## from spack import * + class Bison(Package): - """Bison is a general-purpose parser generator that converts - an annotated context-free grammar into a deterministic LR or + """Bison is a general-purpose parser generator that converts + an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" homepage = "http://www.gnu.org/software/bison/" @@ -34,7 +35,7 @@ class Bison(Package): version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') - depends_on("m4") + depends_on("m4", type='build') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/blitz/package.py b/var/spack/repos/builtin/packages/blitz/package.py index acc6ddcd07..c92e49a732 100644 --- a/var/spack/repos/builtin/packages/blitz/package.py +++ b/var/spack/repos/builtin/packages/blitz/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Blitz(Package): """N-dimensional arrays for C++""" homepage = "http://github.com/blitzpp/blitz" diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 2f2965eb12..690a05a150 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -25,9 +25,8 @@ from spack import * import spack import sys - import os -import sys + class Boost(Package): """Boost provides free peer-reviewed portable C++ source @@ -75,23 +74,24 @@ class Boost(Package): version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') default_install_libs = set(['atomic', - 'chrono', - 'date_time', - 'filesystem', - 'graph', - 'iostreams', - 'locale', - 'log', - 'math', - 'program_options', - 'random', - 'regex', - 'serialization', - 'signals', - 'system', - 'test', - 'thread', - 'wave']) + 'chrono', + 'date_time', + 'filesystem', + 'graph', + 'iostreams', + 'locale', + 'log', + 'math', + 'program_options', + 'random', + 'regex', + 'serialization', + 'signals', + 'system', + 'test', + 'thread', + 'timer', + 'wave']) # mpi/python are not installed by default because they pull in many # dependencies and/or because there is a great deal of customization @@ -102,13 +102,19 @@ class Boost(Package): for lib in all_libs: variant(lib, default=(lib not in default_noinstall_libs), - description="Compile with {0} library".format(lib)) - - variant('debug', default=False, description='Switch to the debug version of Boost') - variant('shared', default=True, description="Additionally build shared libraries") - variant('multithreaded', default=True, description="Build multi-threaded versions of libraries") - variant('singlethreaded', default=True, description="Build single-threaded versions of libraries") - variant('icu_support', default=False, description="Include ICU support (for regex/locale libraries)") + description="Compile with {0} library".format(lib)) + + variant('debug', default=False, + description='Switch to the debug version of Boost') + variant('shared', default=True, + description="Additionally build shared libraries") + variant('multithreaded', default=True, + description="Build multi-threaded versions of libraries") + variant('singlethreaded', default=True, + description="Build single-threaded versions of libraries") + variant('icu_support', default=False, + description="Include ICU support (for regex/locale libraries)") + variant('graph', default=False, description="Build the Boost Graph library") depends_on('icu', when='+icu_support') depends_on('python', when='+python') @@ -120,15 +126,17 @@ class Boost(Package): patch('boost_11856.patch', when='@1.60.0%gcc@4.4.7') def url_for_version(self, version): - """Handle Boost's weird URLs, which write the version two different ways.""" + """ + Handle Boost's weird URLs, + which write the version two different ways. + """ parts = [str(p) for p in Version(version)] dots = ".".join(parts) underscores = "_".join(parts) - return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( - dots, underscores) + return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % (dots, underscores) def determine_toolset(self, spec): - if spec.satisfies("arch=darwin-x86_64"): + if spec.satisfies("platform=darwin"): return 'darwin' toolsets = {'g++': 'gcc', @@ -149,20 +157,20 @@ class Boost(Package): if '+python' in spec: options.append('--with-python=%s' % - join_path(spec['python'].prefix.bin, 'python')) + join_path(spec['python'].prefix.bin, 'python')) with open('user-config.jam', 'w') as f: compiler_wrapper = join_path(spack.build_env_path, 'c++') f.write("using {0} : : {1} ;\n".format(boostToolsetId, - compiler_wrapper)) + compiler_wrapper)) if '+mpi' in spec: f.write('using mpi : %s ;\n' % - join_path(spec['mpi'].prefix.bin, 'mpicxx')) + join_path(spec['mpi'].prefix.bin, 'mpicxx')) if '+python' in spec: f.write('using python : %s : %s ;\n' % - (spec['python'].version, - join_path(spec['python'].prefix.bin, 'python'))) + (spec['python'].version, + join_path(spec['python'].prefix.bin, 'python'))) def determine_b2_options(self, spec, options): if '+debug' in spec: @@ -178,8 +186,7 @@ class Boost(Package): '-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include, '-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib, '-s', 'ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include, - '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib, - ]) + '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib]) linkTypes = ['static'] if '+shared' in spec: @@ -191,7 +198,8 @@ class Boost(Package): if '+singlethreaded' in spec: threadingOpts.append('single') if not threadingOpts: - raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled") + raise RuntimeError("""At least one of {singlethreaded, + multithreaded} must be enabled""") options.extend([ 'toolset=%s' % self.determine_toolset(spec), @@ -202,9 +210,9 @@ class Boost(Package): def install(self, spec, prefix): # On Darwin, Boost expects the Darwin libtool. However, one of the - # dependencies may have pulled in Spack's GNU libtool, and these two are - # not compatible. We thus create a symlink to Darwin's libtool and add - # it at the beginning of PATH. + # dependencies may have pulled in Spack's GNU libtool, and these two + # are not compatible. We thus create a symlink to Darwin's libtool + # and add it at the beginning of PATH. if sys.platform == 'darwin': newdir = os.path.abspath('darwin-libtool') mkdirp(newdir) @@ -217,7 +225,8 @@ class Boost(Package): withLibs.append(lib) if not withLibs: # if no libraries are specified for compilation, then you dont have - # to configure/build anything, just copy over to the prefix directory. + # to configure/build anything, just copy over to the prefix + # directory. src = join_path(self.stage.source_path, 'boost') mkdirp(join_path(prefix, 'include')) dst = join_path(prefix, 'include', 'boost') @@ -235,6 +244,9 @@ class Boost(Package): withLibs.remove('chrono') if not spec.satisfies('@1.43.0:'): withLibs.remove('random') + if '+graph' in spec and '+mpi' in spec: + withLibs.remove('graph') + withLibs.append('graph_parallel') # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' @@ -259,6 +271,7 @@ class Boost(Package): for threadingOpt in threadingOpts: b2('install', 'threading=%s' % threadingOpt, *b2_options) - # The shared libraries are not installed correctly on Darwin; correct this + # The shared libraries are not installed correctly + # on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/bowtie2/package.py b/var/spack/repos/builtin/packages/bowtie2/package.py index 6d641da49b..a8a1a34ed4 100644 --- a/var/spack/repos/builtin/packages/bowtie2/package.py +++ b/var/spack/repos/builtin/packages/bowtie2/package.py @@ -24,12 +24,15 @@ ############################################################################## from spack import * from glob import glob + + class Bowtie2(Package): """Description""" homepage = "bowtie-bio.sourceforge.net/bowtie2/index.shtml" - version('2.2.5','51fa97a862d248d7ee660efc1147c75f', url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip") + version('2.2.5', '51fa97a862d248d7ee660efc1147c75f', + url="http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip") - patch('bowtie2-2.5.patch',when='@2.2.5', level=0) + patch('bowtie2-2.5.patch', when='@2.2.5', level=0) def install(self, spec, prefix): make() @@ -45,4 +48,3 @@ class Bowtie2(Package): # install('bowtie2-inspect',prefix.bin) # install('bowtie2-inspect-l',prefix.bin) # install('bowtie2-inspect-s',prefix.bin) - diff --git a/var/spack/repos/builtin/packages/boxlib/package.py b/var/spack/repos/builtin/packages/boxlib/package.py index ec7db6c08e..4f41aba6c6 100644 --- a/var/spack/repos/builtin/packages/boxlib/package.py +++ b/var/spack/repos/builtin/packages/boxlib/package.py @@ -24,17 +24,19 @@ ############################################################################## from spack import * + class Boxlib(Package): """BoxLib, a software framework for massively parallel block-structured adaptive mesh refinement (AMR) codes.""" homepage = "https://ccse.lbl.gov/BoxLib/" - url = "https://ccse.lbl.gov/pub/Downloads/BoxLib.git"; + url = "https://ccse.lbl.gov/pub/Downloads/BoxLib.git" # TODO: figure out how best to version this. No tags in the repo! version('master', git='https://ccse.lbl.gov/pub/Downloads/BoxLib.git') depends_on('mpi') + depends_on('cmake', type='build') def install(self, spec, prefix): args = std_cmake_args @@ -46,4 +48,3 @@ class Boxlib(Package): cmake('.', *args) make() make("install") - diff --git a/var/spack/repos/builtin/packages/bpp-core/package.py b/var/spack/repos/builtin/packages/bpp-core/package.py new file mode 100644 index 0000000000..f716a2ee05 --- /dev/null +++ b/var/spack/repos/builtin/packages/bpp-core/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 BppCore(Package): + """Bio++ core library.""" + + homepage = "http://biopp.univ-montp2.fr/wiki/index.php/Installation" + url = "http://biopp.univ-montp2.fr/repos/sources/bpp-core-2.2.0.tar.gz" + + version('2.2.0', '5789ed2ae8687d13664140cd77203477') + + depends_on('cmake', type='build') + + def install(self, spec, prefix): + cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/bpp-phyl/package.py b/var/spack/repos/builtin/packages/bpp-phyl/package.py new file mode 100644 index 0000000000..4ff77f1540 --- /dev/null +++ b/var/spack/repos/builtin/packages/bpp-phyl/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 BppPhyl(Package): + """Bio++ phylogeny library.""" + + homepage = "http://biopp.univ-montp2.fr/wiki/index.php/Installation" + url = "http://biopp.univ-montp2.fr/repos/sources/bpp-phyl-2.2.0.tar.gz" + + version('2.2.0', '5c40667ec0bf37e0ecaba321be932770') + + depends_on('cmake', type='build') + depends_on('bpp-core') + depends_on('bpp-seq') + + def install(self, spec, prefix): + cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/bpp-seq/package.py b/var/spack/repos/builtin/packages/bpp-seq/package.py new file mode 100644 index 0000000000..15c99da2b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/bpp-seq/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 BppSeq(Package): + """Bio++ seq library.""" + + homepage = "http://biopp.univ-montp2.fr/wiki/index.php/Installation" + url = "http://biopp.univ-montp2.fr/repos/sources/bpp-seq-2.2.0.tar.gz" + + version('2.2.0', '44adef0ff4d5ca4e69ccf258c9270633') + + depends_on('cmake', type='build') + depends_on('bpp-core') + + def install(self, spec, prefix): + cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/bpp-suite/package.py b/var/spack/repos/builtin/packages/bpp-suite/package.py new file mode 100644 index 0000000000..ef7f25a7ce --- /dev/null +++ b/var/spack/repos/builtin/packages/bpp-suite/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 BppSuite(Package): + """BppSuite is a suite of ready-to-use programs for phylogenetic and + sequence analysis.""" + + homepage = "http://biopp.univ-montp2.fr/wiki/index.php/BppSuite" + url = "http://biopp.univ-montp2.fr/repos/sources/bppsuite/bppsuite-2.2.0.tar.gz" + + version('2.2.0', 'd8b29ad7ccf5bd3a7beb701350c9e2a4') + + # FIXME: Add dependencies if required. + depends_on('cmake', type='build') + depends_on('texinfo', type='build') + depends_on('bpp-core') + depends_on('bpp-seq') + depends_on('bpp-phyl') + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/bwa/package.py b/var/spack/repos/builtin/packages/bwa/package.py new file mode 100644 index 0000000000..bb6763629b --- /dev/null +++ b/var/spack/repos/builtin/packages/bwa/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 Bwa(Package): + """Burrow-Wheeler Aligner for pairwise alignment between DNA sequences.""" + + homepage = "http://github.com/lh3/bwa" + url = "https://github.com/lh3/bwa/releases/download/v0.7.15/bwa-0.7.15.tar.bz2" + + version('0.7.15', 'fcf470a46a1dbe2f96a1c5b87c530554') + + depends_on('zlib') + + def install(self, spec, prefix): + filter_file(r'^INCLUDES=', + "INCLUDES=-I%s" % spec['zlib'].prefix.include, 'Makefile') + filter_file(r'^LIBS=', "LIBS=-L%s " % spec['zlib'].prefix.lib, + 'Makefile') + make() + + mkdirp(prefix.bin) + install('bwa', join_path(prefix.bin, 'bwa')) + set_executable(join_path(prefix.bin, 'bwa')) + mkdirp(prefix.doc) + install('README.md', prefix.doc) + install('NEWS.md', prefix.doc) + mkdirp(prefix.man1) + install('bwa.1', prefix.man1) diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 3b6d1d830e..9e5894a6a8 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -24,54 +24,69 @@ ############################################################################## from spack import * + class Bzip2(Package): """bzip2 is a freely available, patent free high-quality data - compressor. It typically compresses files to within 10% to 15% - of the best available techniques (the PPM family of statistical - compressors), whilst being around twice as fast at compression - and six times faster at decompression. + compressor. It typically compresses files to within 10% to 15% + of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression + and six times faster at decompression.""" - """ homepage = "http://www.bzip.org" url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b') - def patch(self): - mf = FileFilter('Makefile-libbz2_so') - mf.filter(r'^CC=gcc', 'CC=cc') + # bzip2 comes with two separate Makefiles for static and dynamic builds + # Tell both to use Spack's compiler wrapper instead of GCC + filter_file(r'^CC=gcc', 'CC=cc', 'Makefile') + filter_file(r'^CC=gcc', 'CC=cc', 'Makefile-libbz2_so') - # Below stuff patches the link line to use RPATHs on Mac OS X. + # Patch the link line to use RPATHs on macOS if 'darwin' in self.spec.architecture: v = self.spec.version - v1, v2, v3 = (v.up_to(i) for i in (1,2,3)) + v1, v2, v3 = (v.up_to(i) for i in (1, 2, 3)) - mf.filter('$(CC) -shared -Wl,-soname -Wl,libbz2.so.{0} -o libbz2.so.{1} $(OBJS)'.format(v2, v3), - '$(CC) -dynamiclib -Wl,-install_name -Wl,@rpath/libbz2.{0}.dylib -current_version {1} -compatibility_version {2} -o libbz2.{3}.dylib $(OBJS)'.format(v1, v2, v3, v3), string=True) + kwargs = {'ignore_absent': False, 'backup': False, 'string': True} - mf.filter('$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.{0}'.format(v3), - '$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.{0}.dylib'.format(v3), string=True) - mf.filter('rm -f libbz2.so.{0}'.format(v2), - 'rm -f libbz2.{0}.dylib'.format(v2), string=True) - mf.filter('ln -s libbz2.so.{0} libbz2.so.{1}'.format(v3, v2), - 'ln -s libbz2.{0}.dylib libbz2.{1}.dylib'.format(v3, v2), string=True) + mf = FileFilter('Makefile-libbz2_so') + mf.filter('$(CC) -shared -Wl,-soname -Wl,libbz2.so.{0} -o libbz2.so.{1} $(OBJS)' # noqa + .format(v2, v3), + '$(CC) -dynamiclib -Wl,-install_name -Wl,@rpath/libbz2.{0}.dylib -current_version {1} -compatibility_version {2} -o libbz2.{3}.dylib $(OBJS)' # noqa + .format(v1, v2, v3, v3), + **kwargs) + mf.filter( + '$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.{0}'.format(v3), # noqa + '$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.{0}.dylib' + .format(v3), **kwargs) + mf.filter( + 'rm -f libbz2.so.{0}'.format(v2), + 'rm -f libbz2.{0}.dylib'.format(v2), **kwargs) + mf.filter( + 'ln -s libbz2.so.{0} libbz2.so.{1}'.format(v3, v2), + 'ln -s libbz2.{0}.dylib libbz2.{1}.dylib'.format(v3, v2), + **kwargs) def install(self, spec, prefix): + # Build the dynamic library first make('-f', 'Makefile-libbz2_so') - make('clean') - make("install", "PREFIX=%s" % prefix) + # Build the static library and everything else + make() + make('install', 'PREFIX={0}'.format(prefix)) install('bzip2-shared', join_path(prefix.bin, 'bzip2')) - v1, v2, v3 = (self.spec.version.up_to(i) for i in (1,2,3)) + v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3)) if 'darwin' in self.spec.architecture: lib = 'libbz2.dylib' - lib1, lib2, lib3 = ('libbz2.{0}.dylib'.format(v) for v in (v1, v2, v3)) + lib1, lib2, lib3 = ('libbz2.{0}.dylib'.format(v) + for v in (v1, v2, v3)) else: lib = 'libbz2.so' - lib1, lib2, lib3 = ('libbz2.so.{0}'.format(v) for v in (v1, v2, v3)) + lib1, lib2, lib3 = ('libbz2.so.{0}'.format(v) + for v in (v1, v2, v3)) install(lib3, join_path(prefix.lib, lib3)) with working_dir(prefix.lib): diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py new file mode 100644 index 0000000000..4ebf3811a5 --- /dev/null +++ b/var/spack/repos/builtin/packages/c-blosc/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 +############################################################################## + +import sys + +from spack import * + + +class CBlosc(Package): + """Blosc, an extremely fast, multi-threaded, meta-compressor library""" + homepage = "http://www.blosc.org" + url = "https://github.com/Blosc/c-blosc/archive/v1.9.2.tar.gz" + + version('1.9.2', 'dd2d83069d74b36b8093f1c6b49defc5') + version('1.9.1', '7d708d3daadfacf984a87b71b1734ce2') + version('1.9.0', 'e4c1dc8e2c468e5cfa2bf05eeee5357a') + version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05') + version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f') + + depends_on("cmake", type='build') + depends_on("snappy") + depends_on("zlib") + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") + if sys.platform == 'darwin': + fix_darwin_install_name(prefix.lib) 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/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index 4b8fe0d8af..e5aed5ed65 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Caliper(Package): """ Caliper is a generic context annotation system. It gives programmers the @@ -34,16 +35,17 @@ class Caliper(Package): homepage = "https://github.com/LLNL/Caliper" url = "" - version('master', git='ssh://git@github.com:LLNL/Caliper.git') + version('master', git='https://github.com/LLNL/Caliper.git') variant('mpi', default=False, description='Enable MPI function wrappers.') depends_on('libunwind') depends_on('papi') depends_on('mpi', when='+mpi') + depends_on('cmake', type='build') def install(self, spec, prefix): - with working_dir('build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") + with working_dir('build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py index 2ad2dc60e4..f8227fa49e 100644 --- a/var/spack/repos/builtin/packages/callpath/package.py +++ b/var/spack/repos/builtin/packages/callpath/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Callpath(Package): """Library for representing callpaths consistently in distributed-memory performance tools.""" @@ -39,6 +40,7 @@ class Callpath(Package): depends_on("dyninst") depends_on("adept-utils") depends_on("mpi") + depends_on('cmake', type='build') def install(self, spec, prefix): # TODO: offer options for the walker used. 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..9c9c035325 --- /dev/null +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -0,0 +1,202 @@ +############################################################################## +# 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', type='build') + + # 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', type=nolink) + depends_on('py-scipy', when='+python', type=nolink) + depends_on('py-cython', when='+python', type=nolink) + depends_on('py-3to2', when='+python', type=nolink) + # 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/cask/package.py b/var/spack/repos/builtin/packages/cask/package.py new file mode 100644 index 0000000000..67cc48ab2a --- /dev/null +++ b/var/spack/repos/builtin/packages/cask/package.py @@ -0,0 +1,53 @@ +############################################################################## +# 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 +############################################################################## +# +# Based on Homebrew's formula: +# https://github.com/Homebrew/homebrew-core/blob/master/Formula/cask.rb +# +from spack import * +from glob import glob + + +class Cask(Package): + """Cask is a project management tool for Emacs Lisp to automate the package + development cycle; development, dependencies, testing, building, + packaging and more.""" + homepage = "http://cask.readthedocs.io/en/latest/" + url = "https://github.com/cask/cask/archive/v0.7.4.tar.gz" + + version('0.7.4', 'c973a7db43bc980dd83759a5864a1260') + + depends_on('emacs', type=nolink) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('bin/cask', prefix.bin) + install_tree('templates', join_path(prefix, 'templates')) + for el_file in glob("*.el"): + install(el_file, prefix) + for misc_file in ['COPYING', 'cask.png', 'README.md']: + install(misc_file, prefix) + # disable cask's automatic upgrading feature + touch(join_path(prefix, ".no-upgrade")) diff --git a/var/spack/repos/builtin/packages/cblas/package.py b/var/spack/repos/builtin/packages/cblas/package.py index 0b85c5842a..0828141307 100644 --- a/var/spack/repos/builtin/packages/cblas/package.py +++ b/var/spack/repos/builtin/packages/cblas/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class Cblas(Package): """The BLAS (Basic Linear Algebra Subprograms) are routines that @@ -42,11 +42,11 @@ class Cblas(Package): def patch(self): mf = FileFilter('Makefile.in') - mf.filter('^BLLIB =.*', 'BLLIB = %s/libblas.a' % self.spec['blas'].prefix.lib) + mf.filter('^BLLIB =.*', 'BLLIB = %s/libblas.a' % + self.spec['blas'].prefix.lib) mf.filter('^CC =.*', 'CC = cc') mf.filter('^FC =.*', 'FC = f90') - def install(self, spec, prefix): make('all') mkdirp(prefix.lib) @@ -54,6 +54,5 @@ class Cblas(Package): # Rename the generated lib file to libcblas.a install('./lib/cblas_LINUX.a', '%s/libcblas.a' % prefix.lib) - install('./include/cblas.h','%s' % prefix.include) - install('./include/cblas_f77.h','%s' % prefix.include) - + install('./include/cblas.h', '%s' % prefix.include) + install('./include/cblas_f77.h', '%s' % prefix.include) diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py index 7ce90ce0db..cbf36c3b61 100644 --- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py +++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py @@ -22,7 +22,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -################################################################################ +########################################################################## # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under @@ -38,39 +38,45 @@ # You should have received a copy of the GNU 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 CbtfArgonavis(Package): - """CBTF Argo Navis project contains the CUDA collector and supporting - libraries that was done as a result of a DOE SBIR grant.""" + """CBTF Argo Navis project contains the CUDA collector and supporting + libraries that was done as a result of a DOE SBIR grant. + + """ homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" # Mirror access template example - #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz" - #version('1.6', '0fafa0008478405c2c2319450f174ed4') + # url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz" + # version('1.6', '0fafa0008478405c2c2319450f174ed4') - version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-argonavis.git') + version('1.6', branch='master', + git='https://github.com/OpenSpeedShop/cbtf-argonavis.git') - depends_on("cmake@3.0.2") + depends_on("cmake@3.0.2", type='build') depends_on("boost@1.50.0:") depends_on("papi") depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("cbtf") depends_on("cbtf-krell") depends_on("cuda@6.0.37") - #depends_on("cuda") + # depends_on("cuda") parallel = False def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): - # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + # Sets build type parameters into cmakeOptions the options that will + # enable the cbtf-krell built type settings - compile_flags="-O2 -g" + compile_flags = "-O2 -g" BuildTypeOptions = [] - # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the + # stdcmakeargs for word in cmakeOptions[:]: if word.startswith('-DCMAKE_BUILD_TYPE'): cmakeOptions.remove(word) @@ -81,50 +87,54 @@ class CbtfArgonavis(Package): if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): cmakeOptions.remove(word) BuildTypeOptions.extend([ - '-DCMAKE_VERBOSE_MAKEFILE=ON', - '-DCMAKE_BUILD_TYPE=None', - '-DCMAKE_CXX_FLAGS=%s' % compile_flags, - '-DCMAKE_C_FLAGS=%s' % compile_flags + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags ]) cmakeOptions.extend(BuildTypeOptions) - def install(self, spec, prefix): - # Look for package installation information in the cbtf and cbtf-krell prefixes - cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) - - with working_dir('CUDA'): - with working_dir('build', create=True): - - cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DCUDA_DIR=%s' % spec['cuda'].prefix, - '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix, - '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix, - '-DCUPTI_DIR=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'), - '-DCUPTI_ROOT=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'), - '-DPAPI_ROOT=%s' % spec['papi'].prefix, - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DBoost_DIR=%s' % spec['boost'].prefix, - '-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DBoost_NO_SYSTEM_PATHS=ON' - ]) - - # Add in the standard cmake arguments - cmakeOptions.extend(std_cmake_args) - - # Adjust the standard cmake arguments to what we want the build type, etc to be - self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) - - # Invoke cmake - cmake('..', *cmakeOptions) - - make("clean") - make() - make("install") + # Look for package installation information in the cbtf and cbtf-krell + # prefixes + cmake_prefix_path = join_path( + spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + + with working_dir('CUDA'): + with working_dir('build', create=True): + + cmakeOptions = [] + cmakeOptions.extend( + ['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCUDA_DIR=%s' % spec['cuda'].prefix, + '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix, + '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix, + '-DCUPTI_DIR=%s' % join_path( + spec['cuda'].prefix + '/extras/CUPTI'), + '-DCUPTI_ROOT=%s' % join_path( + spec['cuda'].prefix + '/extras/CUPTI'), + '-DPAPI_ROOT=%s' % spec['papi'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DBoost_DIR=%s' % spec['boost'].prefix, + '-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DBoost_NO_SYSTEM_PATHS=ON']) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build + # type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py index 7506f78146..6f15c3f835 100644 --- a/var/spack/repos/builtin/packages/cbtf-krell/package.py +++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py @@ -22,7 +22,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -################################################################################ +########################################################################## # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under @@ -38,33 +38,43 @@ # You should have received a copy of the GNU 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 CbtfKrell(Package): - """CBTF Krell project contains the Krell Institute contributions to the CBTF project. - These contributions include many performance data collectors and support - libraries as well as some example tools that drive the data collection at - HPC levels of scale.""" + """CBTF Krell project contains the Krell Institute contributions to the + CBTF project. These contributions include many performance data + collectors and support libraries as well as some example tools + that drive the data collection at HPC levels of scale. + + """ homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" # optional mirror access template - #url = "file:/home/jeg/cbtf-krell-1.6.tar.gz" - #version('1.6', 'edeb61cd488f16e7b124f77db9ce762d') + # url = "file:/home/jeg/cbtf-krell-1.6.tar.gz" + # version('1.6', 'edeb61cd488f16e7b124f77db9ce762d') - version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-krell.git') + version('1.6', branch='master', + git='https://github.com/OpenSpeedShop/cbtf-krell.git') # MPI variants - variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.") - variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.") - variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.") - variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.") - variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.") - variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.") + variant('openmpi', default=False, + description="Build mpi experiment collector for openmpi MPI..") + variant('mpt', default=False, + description="Build mpi experiment collector for SGI MPT MPI.") + variant('mvapich2', default=False, + description="Build mpi experiment collector for mvapich2 MPI.") + variant('mvapich', default=False, + description="Build mpi experiment collector for mvapich MPI.") + variant('mpich2', default=False, + description="Build mpi experiment collector for mpich2 MPI.") + variant('mpich', default=False, + description="Build mpi experiment collector for mpich MPI.") # Dependencies for cbtf-krell - depends_on("cmake@3.0.2") + depends_on("cmake@3.0.2", type='build') # For binutils service depends_on("binutils@2.24+krellpatch") @@ -83,7 +93,8 @@ class CbtfKrell(Package): depends_on("papi") # MPI Installations - # These have not worked either for build or execution, commenting out for now + # These have not worked either for build or execution, commenting out for + # now depends_on("openmpi", when='+openmpi') depends_on("mpich", when='+mpich') depends_on("mpich2", when='+mpich2') @@ -94,11 +105,13 @@ class CbtfKrell(Package): parallel = False def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): - # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings - - compile_flags="-O2 -g" + # Sets build type parameters into cmakeOptions the options that will + # enable the cbtf-krell built type settings + + compile_flags = "-O2 -g" BuildTypeOptions = [] - # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the + # stdcmakeargs for word in cmakeOptions[:]: if word.startswith('-DCMAKE_BUILD_TYPE'): cmakeOptions.remove(word) @@ -109,75 +122,76 @@ class CbtfKrell(Package): if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): cmakeOptions.remove(word) BuildTypeOptions.extend([ - '-DCMAKE_VERBOSE_MAKEFILE=ON', - '-DCMAKE_BUILD_TYPE=None', - '-DCMAKE_CXX_FLAGS=%s' % compile_flags, - '-DCMAKE_C_FLAGS=%s' % compile_flags + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags ]) cmakeOptions.extend(BuildTypeOptions) - - def set_mpi_cmakeOptions(self, spec, cmakeOptions): - # Appends to cmakeOptions the options that will enable the appropriate MPI implementations - + # Appends to cmakeOptions the options that will enable the appropriate + # MPI implementations + MPIOptions = [] # openmpi if '+openmpi' in spec: MPIOptions.extend([ - '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix + '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix ]) # mpich if '+mpich' in spec: MPIOptions.extend([ - '-DMPICH_DIR=%s' % spec['mpich'].prefix + '-DMPICH_DIR=%s' % spec['mpich'].prefix ]) # mpich2 if '+mpich2' in spec: MPIOptions.extend([ - '-DMPICH2_DIR=%s' % spec['mpich2'].prefix + '-DMPICH2_DIR=%s' % spec['mpich2'].prefix ]) # mvapich if '+mvapich' in spec: MPIOptions.extend([ - '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix + '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix ]) # mvapich2 if '+mvapich2' in spec: MPIOptions.extend([ - '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix + '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix ]) # mpt if '+mpt' in spec: MPIOptions.extend([ - '-DMPT_DIR=%s' % spec['mpt'].prefix + '-DMPT_DIR=%s' % spec['mpt'].prefix ]) cmakeOptions.extend(MPIOptions) def install(self, spec, prefix): - # Add in paths for finding package config files that tell us where to find these packages - #cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['dyninst'].prefix) - #'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path + # Add in paths for finding package config files that tell us + # where to find these packages + # cmake_prefix_path = \ + # join_path(spec['cbtf'].prefix) + ':' + \ + # join_path(spec['dyninst'].prefix) + # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path - # Build cbtf-krell with cmake + # Build cbtf-krell with cmake with working_dir('build_cbtf_krell', create=True): cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, - '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - '-DPAPI_DIR=%s' % spec['papi'].prefix, - '-DBOOST_DIR=%s' % spec['boost'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix - ]) - + cmakeOptions.extend( + ['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix]) # Add any MPI implementations coming from variant settings self.set_mpi_cmakeOptions(spec, cmakeOptions) @@ -185,9 +199,10 @@ class CbtfKrell(Package): # Add in the standard cmake arguments cmakeOptions.extend(std_cmake_args) - # Adjust the standard cmake arguments to what we want the build type, etc to be + # Adjust the standard cmake arguments to what we want the build + # type, etc to be self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) - + # Invoke cmake cmake('..', *cmakeOptions) @@ -195,56 +210,54 @@ class CbtfKrell(Package): make() make("install") - - - #if '+cray' in spec: - #if 'cray' in self.spec.architecture: + # if '+cray' in spec: + # if 'cray' in self.spec.architecture: # if '+runtime' in spec: # with working_dir('build_cbtf_cray_runtime', create=True): # python_vers='%d.%d' % spec['python'].version[:2] # cmake .. \ - # -DCMAKE_BUILD_TYPE=Debug \ - # -DTARGET_OS="cray" \ - # -DRUNTIME_ONLY="true" \ - # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ - # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ - # -DCBTF_DIR=${CBTF_ROOT} \ - # -DBOOST_ROOT=${BOOST_INSTALL_PREFIX} \ - # -DXERCESC_DIR=${XERCESC_INSTALL_PREFIX} \ - # -DBINUTILS_DIR=${KRELL_ROOT} \ - # -DLIBMONITOR_DIR=${KRELL_ROOT_COMPUTE} \ - # -DLIBUNWIND_DIR=${KRELL_ROOT_COMPUTE} \ - # -DPAPI_DIR=${PAPI_ROOT} \ - # -DDYNINST_DIR=${DYNINST_CN_ROOT} \ - # -DMRNET_DIR=${MRNET_INSTALL_PREFIX} \ - # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 + # -DCMAKE_BUILD_TYPE=Debug \ + # -DTARGET_OS="cray" \ + # -DRUNTIME_ONLY="true" \ + # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ + # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ + # -DCBTF_DIR=${CBTF_ROOT} \ + # -DBOOST_ROOT=${BOOST_INSTALL_PREFIX} \ + # -DXERCESC_DIR=${XERCESC_INSTALL_PREFIX} \ + # -DBINUTILS_DIR=${KRELL_ROOT} \ + # -DLIBMONITOR_DIR=${KRELL_ROOT_COMPUTE} \ + # -DLIBUNWIND_DIR=${KRELL_ROOT_COMPUTE} \ + # -DPAPI_DIR=${PAPI_ROOT} \ + # -DDYNINST_DIR=${DYNINST_CN_ROOT} \ + # -DMRNET_DIR=${MRNET_INSTALL_PREFIX} \ + # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 # else: # with working_dir('build_cbtf_cray_frontend', create=True): # python_vers='%d.%d' % spec['python'].version[:2] # cmake .. \ - # -DCMAKE_BUILD_TYPE=Debug \ - # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ - # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ - # -DCBTF_DIR=${CBTF_ROOT} \ - # -DRUNTIME_TARGET_OS="cray" \ - # -DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_RUNTIME_ROOT} \ - # -DCBTF_CN_RUNTIME_DIR=${CBTF_CN_RUNTIME_ROOT} \ - # -DLIBMONITOR_CN_RUNTIME_DIR=${LIBMONITOR_CN_ROOT} \ - # -DLIBUNWIND_CN_RUNTIME_DIR=${LIBUNWIND_CN_ROOT} \ - # -DPAPI_CN_RUNTIME_DIR=${PAPI_CN_ROOT} \ - # -DXERCESC_CN_RUNTIME_DIR=/${XERCESC_CN_ROOT} \ - # -DMRNET_CN_RUNTIME_DIR=${MRNET_CN_ROOT} \ - # -DBOOST_CN_RUNTIME_DIR=${BOOST_CN_ROOT} \ - # -DDYNINST_CN_RUNTIME_DIR=${DYNINST_CN_ROOT} \ - # -DBOOST_ROOT=/${KRELL_ROOT} \ - # -DXERCESC_DIR=/${KRELL_ROOT} \ - # -DBINUTILS_DIR=/${KRELL_ROOT} \ - # -DLIBMONITOR_DIR=${KRELL_ROOT} \ - # -DLIBUNWIND_DIR=${KRELL_ROOT} \ - # -DPAPI_DIR=${PAPI_ROOT} \ - # -DDYNINST_DIR=${KRELL_ROOT} \ - # -DMRNET_DIR=${KRELL_ROOT} \ - # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 + # -DCMAKE_BUILD_TYPE=Debug \ + # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ + # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ + # -DCBTF_DIR=${CBTF_ROOT} \ + # -DRUNTIME_TARGET_OS="cray" \ + # -DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_RUNTIME_ROOT} \ + # -DCBTF_CN_RUNTIME_DIR=${CBTF_CN_RUNTIME_ROOT} \ + # -DLIBMONITOR_CN_RUNTIME_DIR=${LIBMONITOR_CN_ROOT} \ + # -DLIBUNWIND_CN_RUNTIME_DIR=${LIBUNWIND_CN_ROOT} \ + # -DPAPI_CN_RUNTIME_DIR=${PAPI_CN_ROOT} \ + # -DXERCESC_CN_RUNTIME_DIR=/${XERCESC_CN_ROOT} \ + # -DMRNET_CN_RUNTIME_DIR=${MRNET_CN_ROOT} \ + # -DBOOST_CN_RUNTIME_DIR=${BOOST_CN_ROOT} \ + # -DDYNINST_CN_RUNTIME_DIR=${DYNINST_CN_ROOT} \ + # -DBOOST_ROOT=/${KRELL_ROOT} \ + # -DXERCESC_DIR=/${KRELL_ROOT} \ + # -DBINUTILS_DIR=/${KRELL_ROOT} \ + # -DLIBMONITOR_DIR=${KRELL_ROOT} \ + # -DLIBUNWIND_DIR=${KRELL_ROOT} \ + # -DPAPI_DIR=${PAPI_ROOT} \ + # -DDYNINST_DIR=${KRELL_ROOT} \ + # -DMRNET_DIR=${KRELL_ROOT} \ + # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 # fi # # make("clean") @@ -264,22 +277,22 @@ class CbtfKrell(Package): # fi # # else: -# # Build cbtf-krell with cmake +# # Build cbtf-krell with cmake # with working_dir('build_cbtf_krell', create=True): # cmake('..', # '-DCMAKE_BUILD_TYPE=Debug', -# '-DCMAKE_INSTALL_PREFIX=%s' % prefix, -# '-DCBTF_DIR=%s' % spec['cbtf'].prefix, -# '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, -# '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, -# '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, -# '-DPAPI_DIR=%s' % spec['papi'].prefix, -# '-DBOOST_DIR=%s' % spec['boost'].prefix, -# '-DMRNET_DIR=%s' % spec['mrnet'].prefix, -# '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, -# '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, -# '-DOPENMPI_DIR=%s' % openmpi_prefix_path, -# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, +# '-DCMAKE_INSTALL_PREFIX=%s' % prefix, +# '-DCBTF_DIR=%s' % spec['cbtf'].prefix, +# '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, +# '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, +# '-DLIBUNWIND_DIR=%s'% spec['libunwind'].prefix, +# '-DPAPI_DIR=%s' % spec['papi'].prefix, +# '-DBOOST_DIR=%s' % spec['boost'].prefix, +# '-DMRNET_DIR=%s' % spec['mrnet'].prefix, +# '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, +# '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, +# '-DOPENMPI_DIR=%s' % openmpi_prefix_path, +# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, # *std_cmake_args) # # make("clean") diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py index fa7de3d4a3..b614a325f9 100644 --- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py +++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py @@ -22,7 +22,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -################################################################################ +########################################################################## # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under @@ -38,22 +38,24 @@ # You should have received a copy of the GNU 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 CbtfLanl(Package): - """CBTF LANL project contains a memory tool and data center type system command monitoring tool.""" + """CBTF LANL project contains a memory tool and data center type system + command monitoring tool.""" homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" - # Mirror access template example - #url = "file:/g/g24/jeg/cbtf-lanl-1.5.tar.gz" - #version('1.5', 'c3f78f967b0a42c6734ce4be0e602426') + # url = "file:/g/g24/jeg/cbtf-lanl-1.5.tar.gz" + # version('1.5', 'c3f78f967b0a42c6734ce4be0e602426') - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl') + version('1.6', branch='master', + git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl') - depends_on("cmake@3.0.2") + depends_on("cmake@3.0.2", type='build') # Dependencies for cbtf-krell depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("xerces-c@3.1.1:") @@ -63,11 +65,13 @@ class CbtfLanl(Package): parallel = False def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): - # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + # Sets build type parameters into cmakeOptions the options that will + # enable the cbtf-krell built type settings - compile_flags="-O2 -g" + compile_flags = "-O2 -g" BuildTypeOptions = [] - # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the + # stdcmakeargs for word in cmakeOptions[:]: if word.startswith('-DCMAKE_BUILD_TYPE'): cmakeOptions.remove(word) @@ -78,40 +82,43 @@ class CbtfLanl(Package): if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): cmakeOptions.remove(word) BuildTypeOptions.extend([ - '-DCMAKE_VERBOSE_MAKEFILE=ON', - '-DCMAKE_BUILD_TYPE=None', - '-DCMAKE_CXX_FLAGS=%s' % compile_flags, - '-DCMAKE_C_FLAGS=%s' % compile_flags + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags ]) cmakeOptions.extend(BuildTypeOptions) def install(self, spec, prefix): - # Add in paths for finding package config files that tell us where to find these packages - cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) - - with working_dir('build', create=True): - cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake') - ]) - - # Add in the standard cmake arguments - cmakeOptions.extend(std_cmake_args) - - # Adjust the standard cmake arguments to what we want the build type, etc to be - self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) - - # Invoke cmake - cmake('..', *cmakeOptions) - - make("clean") - make() - make("install") - + # Add in paths for finding package config files that tell us where to + # find these packages + cmake_prefix_path = join_path( + spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + + with working_dir('build', create=True): + cmakeOptions = [] + cmakeOptions.extend( + ['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCMAKE_MODULE_PATH=%s' % join_path( + prefix.share, 'KrellInstitute', 'cmake')]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build + # type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py index 2231cf1d45..bc3116bf2a 100644 --- a/var/spack/repos/builtin/packages/cbtf/package.py +++ b/var/spack/repos/builtin/packages/cbtf/package.py @@ -22,7 +22,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -################################################################################ +########################################################################## # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under @@ -38,26 +38,32 @@ # You should have received a copy of the GNU 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 Cbtf(Package): - """CBTF project contains the base code for CBTF that supports creating components, - component networks and the support to connect these components and component - networks into sequential and distributed network tools.""" + """CBTF project contains the base code for CBTF that supports creating + components, component networks and the support to connect these + components and component networks into sequential and distributed + network tools. + + """ homepage = "http://sourceforge.net/p/cbtf/wiki/Home" # Mirror access template example - #url = "file:/home/jeg/cbtf-1.6.tar.gz" - #version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987') + # url = "file:/home/jeg/cbtf-1.6.tar.gz" + # version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987') # Use when the git repository is available - version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf.git') + version('1.6', branch='master', + git='https://github.com/OpenSpeedShop/cbtf.git') - variant('runtime', default=False, description="build only the runtime libraries and collectors.") + variant('runtime', default=False, + description="build only the runtime libraries and collectors.") - depends_on("cmake@3.0.2") + depends_on("cmake@3.0.2", type='build') depends_on("boost@1.50.0:") depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("xerces-c@3.1.1:") @@ -67,11 +73,13 @@ class Cbtf(Package): parallel = False def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): - # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings - - compile_flags="-O2 -g" + # Sets build type parameters into cmakeOptions the options that will + # enable the cbtf-krell built type settings + + compile_flags = "-O2 -g" BuildTypeOptions = [] - # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the + # stdcmakeargs for word in cmakeOptions[:]: if word.startswith('-DCMAKE_BUILD_TYPE'): cmakeOptions.remove(word) @@ -80,61 +88,66 @@ class Cbtf(Package): if word.startswith('-DCMAKE_C_FLAGS'): cmakeOptions.remove(word) BuildTypeOptions.extend([ - '-DCMAKE_BUILD_TYPE=None', - '-DCMAKE_CXX_FLAGS=%s' % compile_flags, - '-DCMAKE_C_FLAGS=%s' % compile_flags + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags ]) cmakeOptions.extend(BuildTypeOptions) def install(self, spec, prefix): - with working_dir('build', create=True): - - # Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching - # in system paths (or other locations outside of BOOST_ROOT - # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT. - # Defaults to OFF. - - if '+runtime' in spec: - # Install message tag include file for use in Intel MIC cbtf-krell build - # FIXME - cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake') - ]) - - # Add in the standard cmake arguments - cmakeOptions.extend(std_cmake_args) - - # Adjust the standard cmake arguments to what we want the build type, etc to be - self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) - - # Invoke cmake - cmake('..', *cmakeOptions) - - else: - cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake') - ]) - - # Add in the standard cmake arguments - cmakeOptions.extend(std_cmake_args) - - # Adjust the standard cmake arguments to what we want the build type, etc to be - self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) - - # Invoke cmake - cmake('..', *cmakeOptions) - - make("clean") - make() - make("install") + with working_dir('build', create=True): + + # Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching + # in system paths (or other locations outside of BOOST_ROOT + # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT. + # Defaults to OFF. + + if '+runtime' in spec: + # Install message tag include file for use in Intel MIC + # cbtf-krell build + # FIXME + cmakeOptions = [] + cmakeOptions.extend( + ['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DCMAKE_MODULE_PATH=%s' % join_path( + prefix.share, 'KrellInstitute', 'cmake')]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build + # type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + else: + cmakeOptions = [] + cmakeOptions.extend( + ['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DCMAKE_MODULE_PATH=%s' % join_path( + prefix.share, 'KrellInstitute', 'cmake')]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build + # type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py new file mode 100644 index 0000000000..7400c3a56c --- /dev/null +++ b/var/spack/repos/builtin/packages/cdo/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 Cdo(Package): + """CDO is a collection of command line Operators to manipulate and analyse + Climate and NWP model Data. """ + + homepage = "https://code.zmaw.de/projects/cdo" + url = "https://code.zmaw.de/attachments/download/10198/cdo-1.6.9.tar.gz" + + version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2') + + depends_on('netcdf') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py index c53c667efb..716e0103d1 100644 --- a/var/spack/repos/builtin/packages/cereal/package.py +++ b/var/spack/repos/builtin/packages/cereal/package.py @@ -26,11 +26,20 @@ from spack import * import os import shutil + class Cereal(Package): - """cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns them into different representations, such as compact binary encodings, XML, or JSON. cereal was designed to be fast, light-weight, and easy to extend - it has no external dependencies and can be easily bundled with other code or used standalone.""" + """cereal is a header-only C++11 serialization library. cereal takes + arbitrary data types and reversibly turns them into different + representations, such as compact binary encodings, XML, or + JSON. cereal was designed to be fast, light-weight, and easy to + extend - it has no external dependencies and can be easily bundled + with other code or used standalone. + + """ homepage = "http://uscilab.github.io/cereal/" url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz" + version('1.2.0', 'e372c9814696481dbdb7d500e1410d2b') version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9') version('1.1.1', '0ceff308c38f37d5b5f6df3927451c27') version('1.1.0', '9f2d5f72e935c54f4c6d23e954ce699f') @@ -39,7 +48,7 @@ class Cereal(Package): patch("Werror.patch") - depends_on("cmake @2.6.2:") + depends_on('cmake@2.6.2:', type='build') def install(self, spec, prefix): # Don't use -Werror diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index ed49ae5808..c68b3ffc0d 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cfitsio(Package): """ CFITSIO is a library of C and Fortran subroutines for reading and writing diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py index ea1b20e34f..e522b4a5a0 100644 --- a/var/spack/repos/builtin/packages/cgal/package.py +++ b/var/spack/repos/builtin/packages/cgal/package.py @@ -27,10 +27,12 @@ from spack import * class Cgal(Package): - """ - CGAL is a software project that provides easy access to efficient and reliable geometric algorithms in the form of - a C++ library. CGAL is used in various areas needing geometric computation, such as geographic information systems, - computer aided design, molecular biology, medical imaging, computer graphics, and robotics. + """CGAL is a software project that provides easy access to efficient and + reliable geometric algorithms in the form of a C++ library. CGAL + is used in various areas needing geometric computation, such as + geographic information systems, computer aided design, molecular + biology, medical imaging, computer graphics, and robotics. + """ homepage = 'http://www.cgal.org/' url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz' @@ -38,15 +40,18 @@ class Cgal(Package): version('4.7', '4826714810f3b4c65cac96b90fb03b67') version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d') - # Installation instructions : http://doc.cgal.org/latest/Manual/installation.html - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + # Installation instructions : + # http://doc.cgal.org/latest/Manual/installation.html + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds a debug version of the libraries') depends_on('boost') depends_on('mpfr') depends_on('gmp') depends_on('zlib') - depends_on('cmake') + depends_on('cmake', type='build') # FIXME : Qt5 dependency missing (needs Qt5 and OpenGL) # FIXME : Optional third party libraries missing @@ -55,7 +60,8 @@ class Cgal(Package): options = [] options.extend(std_cmake_args) - # CGAL supports only Release and Debug build type. Any other build type will raise an error at configure time + # CGAL supports only Release and Debug build type. Any other build type + # will raise an error at configure time if '+debug' in spec: options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') else: diff --git a/var/spack/repos/builtin/packages/cgm/package.py b/var/spack/repos/builtin/packages/cgm/package.py index c5da72d25a..5a998d471c 100644 --- a/var/spack/repos/builtin/packages/cgm/package.py +++ b/var/spack/repos/builtin/packages/cgm/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cgm(Package): """The Common Geometry Module, Argonne (CGMA) is a code library which provides geometry functionality used for mesh generation and @@ -33,7 +34,7 @@ class Cgm(Package): version('13.1.1', '4e8dbc4ba8f65767b29f985f7a23b01f') version('13.1.0', 'a6c7b22660f164ce893fb974f9cb2028') - version('13.1' , '95f724bda04919fc76818a5b7bc0b4ed') + version('13.1', '95f724bda04919fc76818a5b7bc0b4ed') depends_on("mpi") @@ -42,7 +43,6 @@ class Cgm(Package): '//\1', 'geom/parallel/CGMReadParallel.cpp') - def install(self, spec, prefix): configure("--with-mpi", "--prefix=%s" % prefix, diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py new file mode 100644 index 0000000000..ba3fd7f821 --- /dev/null +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -0,0 +1,73 @@ +############################################################################## +# 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 Cgns(Package): + """The CFD General Notation System (CGNS) provides a general, portable, + and extensible standard for the storage and retrieval of computational + fluid dynamics (CFD) analysis data.""" + + homepage = "http://cgns.github.io/" + url = "https://github.com/CGNS/CGNS/archive/v3.3.0.tar.gz" + + version('3.3.0', '64e5e8d97144c1462bee9ea6b2a81d7f') + + variant('hdf5', default=True, description='Enable HDF5 interface') + + depends_on('cmake', type='build') + depends_on('hdf5', when='+hdf5') + + def install(self, spec, prefix): + cmake_args = std_cmake_args[:] + + if self.compiler.f77 and self.compiler.fc: + cmake_args.append('-DCGNS_ENABLE_FORTRAN=ON') + else: + cmake_args.append('-DCGNS_ENABLE_FORTRAN=OFF') + + if '+hdf5' in spec: + cmake_args.extend([ + '-DCGNS_ENABLE_HDF5=ON', + '-DHDF5_NEEDS_ZLIB=ON' + ]) + + if spec.satisfies('^hdf5+mpi'): + cmake_args.append('-DHDF5_NEEDS_MPI=ON') + else: + cmake_args.append('-DHDF5_NEEDS_MPI=OFF') + + if spec.satisfies('^hdf5+szip'): + cmake_args.append('-DHDF5_NEEDS_SZIP=ON') + else: + cmake_args.append('-DHDF5_NEEDS_SZIP=OFF') + else: + cmake_args.append('-DCGNS_ENABLE_HDF5=OFF') + + with working_dir('spack-build', create=True): + cmake('..', *cmake_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/cityhash/package.py b/var/spack/repos/builtin/packages/cityhash/package.py index caa15780e3..d6d7f51558 100644 --- a/var/spack/repos/builtin/packages/cityhash/package.py +++ b/var/spack/repos/builtin/packages/cityhash/package.py @@ -25,16 +25,18 @@ from spack import * from spack.util.environment import * + class Cityhash(Package): homepage = "https://github.com/google/cityhash" url = "https://github.com/google/cityhash" - version('2013-07-31', git='https://github.com/google/cityhash.git', commit='8af9b8c2b889d80c22d6bc26ba0df1afb79a30db') - version('master', branch='master', git='https://github.com/google/cityhash.git') + version('2013-07-31', git='https://github.com/google/cityhash.git', + commit='8af9b8c2b889d80c22d6bc26ba0df1afb79a30db') + version('master', branch='master', + git='https://github.com/google/cityhash.git') def install(self, spec, prefix): configure('--enable-sse4.2', '--prefix=%s' % prefix) make() make("install") - diff --git a/var/spack/repos/builtin/packages/cleverleaf/package.py b/var/spack/repos/builtin/packages/cleverleaf/package.py index 6b54d1bf26..61e6dca433 100644 --- a/var/spack/repos/builtin/packages/cleverleaf/package.py +++ b/var/spack/repos/builtin/packages/cleverleaf/package.py @@ -24,22 +24,26 @@ ############################################################################## from spack import * + class Cleverleaf(Package): - """ - CleverLeaf is a hydrodynamics mini-app that extends CloverLeaf with Adaptive - Mesh Refinement using the SAMRAI toolkit from Lawrence Livermore National - Laboratory. The primary goal of CleverLeaf is to evaluate the application of - AMR to the Lagrangian-Eulerian hydrodynamics scheme used by CloverLeaf. + """CleverLeaf is a hydrodynamics mini-app that extends CloverLeaf with + Adaptive Mesh Refinement using the SAMRAI toolkit from Lawrence + Livermore National Laboratory. The primary goal of CleverLeaf is + to evaluate the application of AMR to the Lagrangian-Eulerian + hydrodynamics scheme used by CloverLeaf. + """ homepage = "http://uk-mac.github.io/CleverLeaf/" url = "https://github.com/UK-MAC/CleverLeaf/tarball/master" - version('develop', git='https://github.com/UK-MAC/CleverLeaf_ref.git', branch='develop') + version('develop', git='https://github.com/UK-MAC/CleverLeaf_ref.git', + branch='develop') depends_on("SAMRAI@3.8.0:") depends_on("hdf5+mpi") depends_on("boost") + depends_on('cmake', type='build') def install(self, spec, prefix): cmake(*std_cmake_args) diff --git a/var/spack/repos/builtin/packages/cloog/package.py b/var/spack/repos/builtin/packages/cloog/package.py index db3d2ac928..a979ae83fc 100644 --- a/var/spack/repos/builtin/packages/cloog/package.py +++ b/var/spack/repos/builtin/packages/cloog/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cloog(Package): """CLooG is a free software and library to generate code for scanning Z-polyhedra. That is, it finds a code (e.g. in C, diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 7b2a125fe5..90a7c20d19 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -24,12 +24,14 @@ ############################################################################## from spack import * + class Cmake(Package): """A cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.""" homepage = 'https://www.cmake.org' url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + version('3.6.0', 'aa40fbecf49d99c083415c2411d12db9') version('3.5.2', '701386a1b5ec95f8d1075ecf96383e02') version('3.5.1', 'ca051f4a66375c89d1a524e726da0296') version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e') @@ -39,20 +41,24 @@ class Cmake(Package): version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f') version('2.8.10.2', '097278785da7182ec0aea8769d06860c') - variant('ncurses', default=True, description='Enables the build of the ncurses gui') - variant('openssl', default=True, description="Enables CMake's OpenSSL features") + variant('ncurses', default=True, + description='Enables the build of the ncurses gui') + variant('openssl', default=True, + description="Enables CMake's OpenSSL features") variant('qt', default=False, description='Enables the build of cmake-gui') - variant('doc', default=False, description='Enables the generation of html and man page documentation') + variant('doc', default=False, + description='Enables the generation of html and man page docs') depends_on('ncurses', when='+ncurses') depends_on('openssl', when='+openssl') depends_on('qt', when='+qt') - depends_on('python@2.7.11:', when='+doc') - depends_on('py-sphinx', when='+doc') + depends_on('python@2.7.11:', when='+doc', type='build') + depends_on('py-sphinx', when='+doc', type='build') def url_for_version(self, version): """Handle CMake's version-based custom URLs.""" - return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version) + return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % ( + version.up_to(2), version) def validate(self, spec): """ diff --git a/var/spack/repos/builtin/packages/cmocka/package.py b/var/spack/repos/builtin/packages/cmocka/package.py index 41f80d9761..274b78379a 100644 --- a/var/spack/repos/builtin/packages/cmocka/package.py +++ b/var/spack/repos/builtin/packages/cmocka/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cmocka(Package): """Unit-testing framework in pure C""" homepage = "https://cmocka.org/" @@ -32,9 +33,11 @@ class Cmocka(Package): version('1.0.1', 'ed861e501a21a92b2af63e466df2015e') parallel = False + depends_on('cmake', type='build') + def install(self, spec, prefix): with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) + cmake('..', *std_cmake_args) - make() - make("install") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py index f4c05f5b5f..0c62023952 100644 --- a/var/spack/repos/builtin/packages/cnmem/package.py +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cnmem(Package): """CNMem mempool for CUDA devices""" homepage = "https://github.com/NVIDIA/cnmem" @@ -31,6 +32,6 @@ class Cnmem(Package): version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") def install(self, spec, prefix): - cmake('.',*std_cmake_args) - make() - make('install') + cmake('.', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py index cb8f596b41..94cfa11341 100644 --- a/var/spack/repos/builtin/packages/coreutils/package.py +++ b/var/spack/repos/builtin/packages/coreutils/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Coreutils(Package): """The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py new file mode 100644 index 0000000000..ce9675d300 --- /dev/null +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -0,0 +1,178 @@ +############################################################################## +# 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 +############################################################################## +import os +import shutil +import copy + +from spack import * + + +class Cp2k(Package): + """CP2K is a quantum chemistry and solid state physics software package + that can perform atomistic simulations of solid state, liquid, molecular, + periodic, material, crystal, and biological systems + """ + homepage = 'https://www.cp2k.org' + url = 'https://sourceforge.net/projects/cp2k/files/cp2k-3.0.tar.bz2' + + version('3.0', 'c05bc47335f68597a310b1ed75601d35') + + variant('mpi', default=True, description='Enable MPI support') + variant('plumed', default=False, description='Enable PLUMED support') + + depends_on('python', type='build') + + depends_on('lapack') + depends_on('blas') + depends_on('fftw') + + depends_on('mpi', when='+mpi') + depends_on('scalapack', when='+mpi') + depends_on('plumed+shared+mpi', when='+plumed+mpi') + depends_on('plumed+shared~mpi', when='+plumed~mpi') + + # TODO : add dependency on libint + # TODO : add dependency on libsmm, libxsmm + # TODO : add dependency on elpa + # TODO : add dependency on CUDA + # TODO : add dependency on PEXSI + # TODO : add dependency on QUIP + # TODO : add dependency on libwannier90 + + parallel = False + + def install(self, spec, prefix): + # Construct a proper filename for the architecture file + cp2k_architecture = '{0.architecture}-{0.compiler.name}'.format(spec) + cp2k_version = 'sopt' if '~mpi' in spec else 'popt' + makefile_basename = '.'.join([cp2k_architecture, cp2k_version]) + makefile = join_path('arch', makefile_basename) + + # Write the custom makefile + with open(makefile, 'w') as mkf: + # Optimization flags + optflags = { + 'gcc': ['-O2', + '-ffast-math', + '-ffree-form', + '-ffree-line-length-none', + '-ftree-vectorize', + '-funroll-loops', + '-mtune=native'], + 'intel': ['-O2', + '-pc64', + '-unroll', + '-heap-arrays 64'] + } + cppflags = [ + '-D__FFTW3', + '-I' + spec['fftw'].prefix.include + ] + fcflags = copy.deepcopy(optflags[self.spec.compiler.name]) + fcflags.extend([ + '-I' + spec['fftw'].prefix.include + ]) + ldflags = ['-L' + spec['fftw'].prefix.lib] + libs = [] + if '+plumed' in self.spec: + # Include Plumed.inc in the Makefile + mkf.write('include {0}\n'.format( + join_path(self.spec['plumed'].prefix.lib, + 'plumed', + 'src', + 'lib', + 'Plumed.inc') + )) + # Add required macro + cppflags.extend(['-D__PLUMED2']) + libs.extend([ + join_path(self.spec['plumed'].prefix.lib, 'libplumed.so') + ]) + + mkf.write('CC = {0.compiler.cc}\n'.format(self)) + if '%intel' in self.spec: + # CPP is a commented command in Intel arch of CP2K + # This is the hack through which cp2k developers avoid doing : + # + # ${CPP} <file>.F > <file>.f90 + # + # and use `-fpp` instead + mkf.write('CPP = # {0.compiler.cc} -P\n'.format(self)) + mkf.write('AR = xiar -r\n') + else: + mkf.write('CPP = {0.compiler.cc} -E\n'.format(self)) + mkf.write('AR = ar -r\n') + fc = self.compiler.fc if '~mpi' in spec else self.spec['mpi'].mpifc + mkf.write('FC = {0}\n'.format(fc)) + mkf.write('LD = {0}\n'.format(fc)) + # Intel + if '%intel' in self.spec: + cppflags.extend([ + '-D__INTEL_COMPILER', + '-D__MKL' + ]) + fcflags.extend([ + '-diag-disable 8290,8291,10010,10212,11060', + '-free', + '-fpp' + ]) + # MPI + if '+mpi' in self.spec: + cppflags.extend([ + '-D__parallel', + '-D__SCALAPACK' + ]) + ldflags.extend([ + '-L' + spec['scalapack'].prefix.lib + ]) + libs.extend(spec['scalapack'].scalapack_shared_libs) + + # LAPACK / BLAS + ldflags.extend([ + '-L' + spec['lapack'].prefix.lib, + '-L' + spec['blas'].prefix.lib + ]) + libs.extend([ + join_path(spec['fftw'].prefix.lib, 'libfftw3.so'), + spec['lapack'].lapack_shared_lib, + spec['blas'].blas_shared_lib + ]) + + # Write compiler flags to file + mkf.write('CPPFLAGS = {0}\n'.format(' '.join(cppflags))) + mkf.write('FCFLAGS = {0}\n'.format(' '.join(fcflags))) + mkf.write('LDFLAGS = {0}\n'.format(' '.join(ldflags))) + mkf.write('LIBS = {0}\n'.format(' '.join(libs))) + + with working_dir('makefiles'): + # Apparently the Makefile bases its paths on PWD + # so we need to set PWD = os.getcwd() + pwd_backup = env['PWD'] + env['PWD'] = os.getcwd() + make('ARCH={0}'.format(cp2k_architecture), + 'VERSION={0}'.format(cp2k_version)) + env['PWD'] = pwd_backup + exe_dir = join_path('exe', cp2k_architecture) + shutil.copytree(exe_dir, self.prefix.bin) diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py index 16f052ef2f..fd48fcb7e3 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cppcheck(Package): """A tool for static C/C++ code analysis.""" homepage = "http://cppcheck.sourceforge.net/" diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py index 7e05587087..bef26cdcbd 100644 --- a/var/spack/repos/builtin/packages/cram/package.py +++ b/var/spack/repos/builtin/packages/cram/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cram(Package): """Cram runs many small MPI jobs inside one large MPI job.""" homepage = "https://github.com/llnl/cram" @@ -33,6 +34,7 @@ class Cram(Package): extends('python') depends_on("mpi") + depends_on('cmake', type='build') def install(self, spec, prefix): cmake(".", *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index 77895a7331..e9294a14a6 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -25,12 +25,15 @@ import glob from spack import * + class Cryptopp(Package): """Crypto++ is an open-source C++ library of cryptographic schemes. The - library supports a number of different cryptography algorithms, including - authenticated encryption schemes (GCM, CCM), hash functions (SHA-1, SHA2), - public-key encryption (RSA, DSA), and a few obsolete/historical encryption - algorithms (MD5, Panama).""" + library supports a number of different cryptography algorithms, + including authenticated encryption schemes (GCM, CCM), hash + functions (SHA-1, SHA2), public-key encryption (RSA, DSA), and a + few obsolete/historical encryption algorithms (MD5, Panama). + + """ homepage = "http://www.cryptopp.com" base_url = "http://www.cryptopp.com" diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py index 88d522f486..f21226cce1 100644 --- a/var/spack/repos/builtin/packages/cscope/package.py +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Cscope(Package): """Cscope is a developer's tool for browsing source code.""" homepage = "http://http://cscope.sourceforge.net/" diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py index 40c2cc6893..09237f87c3 100644 --- a/var/spack/repos/builtin/packages/cube/package.py +++ b/var/spack/repos/builtin/packages/cube/package.py @@ -28,8 +28,8 @@ from spack import * class Cube(Package): """ - Cube the profile viewer for Score-P and Scalasca profiles. It displays a multi-dimensional performance space - consisting of the dimensions: + Cube the profile viewer for Score-P and Scalasca profiles. It displays a + multi-dimensional performance space consisting of the dimensions: - performance metric - call path - system resource @@ -38,14 +38,17 @@ class Cube(Package): homepage = "http://www.scalasca.org/software/cube-4.x/download.html" url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz" + version('4.3.4', '50f73060f55311cb12c5b3cb354d59fa', + url='http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3.4.tar.gz') version('4.3.3', '07e109248ed8ffc7bdcce614264a2909', url='http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3.3.tar.gz') - version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20', url="http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz") # TODO : add variant that builds GUI on top of Qt + depends_on('zlib') + def install(self, spec, prefix): configure_args = ["--prefix=%s" % prefix, "--without-paraver", diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 96694670ad..558535bec6 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -26,22 +26,27 @@ from spack import * from glob import glob import os + class Cuda(Package): - """CUDA is a parallel computing platform and programming model invented by - NVIDIA. It enables dramatic increases in computing performance by harnessing - the power of the graphics processing unit (GPU). + """CUDA is a parallel computing platform and programming model invented + by NVIDIA. It enables dramatic increases in computing performance by + harnessing the power of the graphics processing unit (GPU). + + Note: NVIDIA does not provide a download URL for CUDA so you will + need to download it yourself. Go to + https://developer.nvidia.com/cuda-downloads and select your Operating + System, Architecture, Distribution, and Version. For the Installer + Type, select runfile and click Download. Spack will search your + current directory for this file. Alternatively, add this file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html - Note: NVIDIA does not provide a download URL for CUDA so you will need to - download it yourself. Go to https://developer.nvidia.com/cuda-downloads - and select your Operating System, Architecture, Distribution, and Version. - For the Installer Type, select runfile and click Download. Spack will search - your current directory for this file. Alternatively, add this file to a - mirror so that Spack can find it. For instructions on how to set up a mirror, - see http://software.llnl.gov/spack/mirrors.html + Note: This package does not currently install the drivers necessary + to run CUDA. These will need to be installed manually. See: + http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux for + details. - Note: This package does not currently install the drivers necessary to run - CUDA. These will need to be installed manually. See: - http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux for details.""" + """ homepage = "http://www.nvidia.com/object/cuda_home_new.html" @@ -50,15 +55,15 @@ class Cuda(Package): version('6.5.14', '90b1b8f77313600cc294d9271741f4da', expand=False, url="file://%s/cuda_6.5.14_linux_64.run" % os.getcwd()) - def install(self, spec, prefix): runfile = glob(os.path.join(self.stage.path, 'cuda*.run'))[0] chmod = which('chmod') chmod('+x', runfile) runfile = which(runfile) - # Note: NVIDIA does not officially support many newer versions of compilers. - # For example, on CentOS 6, you must use GCC 4.4.7 or older. See: + # Note: NVIDIA does not officially support many newer versions of + # compilers. For example, on CentOS 6, you must use GCC 4.4.7 or + # older. See: # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements # for details. @@ -68,4 +73,3 @@ class Cuda(Package): '--toolkit', # install CUDA Toolkit '--toolkitpath=%s' % prefix ) - diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index e3de6ee5a1..4954e435c0 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,8 @@ class Curl(Package): homepage = "http://curl.haxx.se" url = "http://curl.haxx.se/download/curl-7.46.0.tar.bz2" + version('7.50.1', '015f6a0217ca6f2c5442ca406476920b') + 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/czmq/package.py b/var/spack/repos/builtin/packages/czmq/package.py index d69f3e5009..ef6374619b 100644 --- a/var/spack/repos/builtin/packages/czmq/package.py +++ b/var/spack/repos/builtin/packages/czmq/package.py @@ -25,33 +25,37 @@ from spack import * import os + class Czmq(Package): """ A C interface to the ZMQ library """ homepage = "http://czmq.zeromq.org" url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz" - version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz') + version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', + url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz') - depends_on('libtool') - depends_on('automake') - depends_on('autoconf') - depends_on('pkg-config') + depends_on('libtool', type='build') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + depends_on('pkg-config', type='build') depends_on('zeromq') def install(self, spec, prefix): - bash = which("bash") # Work around autogen.sh oddities + # bash = which("bash") # bash("./autogen.sh") mkdirp("config") autoreconf = which("autoreconf") autoreconf("--install", "--verbose", "--force", - "-I", "config", - "-I", os.path.join(spec['pkg-config'].prefix, "share", "aclocal"), - "-I", os.path.join(spec['automake'].prefix, "share", "aclocal"), - "-I", os.path.join(spec['libtool'].prefix, "share", "aclocal"), - ) + "-I", "config", + "-I", os.path.join(spec['pkg-config'].prefix, + "share", "aclocal"), + "-I", os.path.join(spec['automake'].prefix, + "share", "aclocal"), + "-I", os.path.join(spec['libtool'].prefix, + "share", "aclocal"), + ) configure("--prefix=%s" % prefix) make() make("install") - diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/daal/package.py new file mode 100644 index 0000000000..e13dd80e19 --- /dev/null +++ b/var/spack/repos/builtin/packages/daal/package.py @@ -0,0 +1,28 @@ +from spack import * +import os + +from spack.pkg.builtin.intel import IntelInstaller + + +class Daal(IntelInstaller): + """Intel Data Analytics Acceleration Library. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/daal" + + version('2016.2.181', 'aad2aa70e5599ebfe6f85b29d8719d46', + url="file://%s/l_daal_2016.2.181.tgz" % os.getcwd()) + version('2016.3.210', 'ad747c0dd97dace4cad03cf2266cad28', + url="file://%s/l_daal_2016.3.210.tgz" % os.getcwd()) + + def install(self, spec, prefix): + + self.intel_prefix = os.path.join(prefix, "pkg") + IntelInstaller.install(self, spec, prefix) + + daal_dir = os.path.join(self.intel_prefix, "daal") + for f in os.listdir(daal_dir): + os.symlink(os.path.join(daal_dir, f), os.path.join(self.prefix, f)) diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py index 3a8ddf28ef..e8f7d0889b 100644 --- a/var/spack/repos/builtin/packages/dakota/package.py +++ b/var/spack/repos/builtin/packages/dakota/package.py @@ -26,17 +26,22 @@ from spack import * class Dakota(Package): - """ - The Dakota toolkit provides a flexible, extensible interface between analysis codes and iterative systems - analysis methods. Dakota contains algorithms for: + """The Dakota toolkit provides a flexible, extensible interface between + analysis codes and iterative systems analysis methods. Dakota + contains algorithms for: - optimization with gradient and non gradient-based methods; - - uncertainty quantification with sampling, reliability, stochastic expansion, and epistemic methods; + - uncertainty quantification with sampling, reliability, stochastic + - expansion, and epistemic methods; - parameter estimation with nonlinear least squares methods; - - sensitivity/variance analysis with design of experiments and parameter study methods. + - sensitivity/variance analysis with design of experiments and + - parameter study methods. + + These capabilities may be used on their own or as components within + advanced strategies such as hybrid optimization, surrogate-based + optimization, mixed integer nonlinear programming, or optimization + under uncertainty. - These capabilities may be used on their own or as components within advanced strategies such as hybrid optimization, - surrogate-based optimization, mixed integer nonlinear programming, or optimization under uncertainty. """ homepage = 'https://dakota.sandia.gov/' @@ -45,8 +50,10 @@ class Dakota(Package): version('6.3', '05a58d209fae604af234c894c3f73f6d') - variant('debug', default=False, description='Builds a debug version of the libraries') - variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds a debug version of the libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') variant('mpi', default=True, description='Activates MPI support') depends_on('blas') @@ -55,6 +62,7 @@ class Dakota(Package): depends_on('python') depends_on('boost') + depends_on('cmake', type='build') def url_for_version(self, version): return Dakota._url_str.format(version=version) @@ -63,12 +71,17 @@ class Dakota(Package): options = [] options.extend(std_cmake_args) - options.extend(['-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), - '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF')]) + options.extend([ + '-DCMAKE_BUILD_TYPE:STRING=%s' % ( + 'Debug' if '+debug' in spec else 'Release'), + '-DBUILD_SHARED_LIBS:BOOL=%s' % ( + 'ON' if '+shared' in spec else 'OFF')]) if '+mpi' in spec: - options.extend(['-DDAKOTA_HAVE_MPI:BOOL=ON', - '-DMPI_CXX_COMPILER:STRING=%s' % join_path(spec['mpi'].prefix.bin, 'mpicxx')]) + options.extend([ + '-DDAKOTA_HAVE_MPI:BOOL=ON', + '-DMPI_CXX_COMPILER:STRING=%s' % join_path( + spec['mpi'].prefix.bin, 'mpicxx')]) build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path diff --git a/var/spack/repos/builtin/packages/damselfly/package.py b/var/spack/repos/builtin/packages/damselfly/package.py index 42fab63f98..a37728c92b 100644 --- a/var/spack/repos/builtin/packages/damselfly/package.py +++ b/var/spack/repos/builtin/packages/damselfly/package.py @@ -24,15 +24,19 @@ ############################################################################## from spack import * + class Damselfly(Package): """Damselfly is a model-based parallel network simulator.""" homepage = "https://github.com/llnl/damselfly" url = "https://github.com/llnl/damselfly" - version('1.0', '05cf7e2d8ece4408c0f2abb7ab63fd74c0d62895', git='https://github.com/llnl/damselfly.git', tag='v1.0') + version('1.0', '05cf7e2d8ece4408c0f2abb7ab63fd74c0d62895', + git='https://github.com/llnl/damselfly.git', tag='v1.0') + + depends_on('cmake', type='build') def install(self, spec, prefix): with working_dir('spack-build', create=True): - cmake('-DCMAKE_BUILD_TYPE=release', '..', *std_cmake_args) - make() - make('install') + cmake('-DCMAKE_BUILD_TYPE=release', '..', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/datamash/package.py b/var/spack/repos/builtin/packages/datamash/package.py new file mode 100644 index 0000000000..ef30c50ebe --- /dev/null +++ b/var/spack/repos/builtin/packages/datamash/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 Datamash(Package): + """ + GNU datamash is a command-line program which performs basic numeric, + textual and statistical operations on input textual data files. + """ + + homepage = "https://www.gnu.org/software/datamash/" + url = "http://ftp.gnu.org/gnu/datamash/datamash-1.0.5.tar.gz" + + version('1.1.0', '79a6affca08107a095e97e4237fc8775') + version('1.0.7', '9f317bab07454032ba9c068e7f17b04b') + version('1.0.6', 'ff26fdef0f343cb695cf1853e14a1a5b') + version('1.0.5', '9a29549dc7feca49fdc5fab696614e11') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 130ba2ea1f..fdca68f53f 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Dbus(Package): """D-Bus is a message bus system, a simple way for applications to talk to one another. D-Bus supplies both a system daemon (for diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 54b6426d36..939d8fc013 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -37,30 +37,53 @@ class Dealii(Package): version('8.3.0', 'fc6cdcb16309ef4bea338a4f014de6fa') version('8.2.1', '71c728dbec14f371297cd405776ccf08') version('8.1.0', 'aa8fadc2ce5eb674f44f997461bf668d') - version('dev', git='https://github.com/dealii/dealii.git') + version('develop', git='https://github.com/dealii/dealii.git') variant('mpi', default=True, description='Compile with MPI') - variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') - variant('doc', default=False, description='Compile with documentation') + variant('arpack', default=True, + description='Compile with Arpack and PArpack (only with MPI)') + variant('doc', default=False, + description='Compile with documentation') variant('gsl', default=True, description='Compile with GSL') - variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') + variant('hdf5', default=True, + description='Compile with HDF5 (only with MPI)') variant('metis', default=True, description='Compile with Metis') - variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') + variant('netcdf', default=True, + description='Compile with Netcdf (only with MPI)') variant('oce', default=True, description='Compile with OCE') - variant('p4est', default=True, description='Compile with P4est (only with MPI)') - variant('petsc', default=True, description='Compile with Petsc (only with MPI)') - variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') - variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') + variant('p4est', default=True, + description='Compile with P4est (only with MPI)') + variant('petsc', default=True, + description='Compile with Petsc (only with MPI)') + variant('slepc', default=True, + description='Compile with Slepc (only with Petsc and MPI)') + variant('trilinos', default=True, + description='Compile with Trilinos (only with MPI)') + variant('python', default=True, + description='Compile with Python bindings') # required dependencies, light version depends_on("blas") # Boost 1.58 is blacklisted, see # https://github.com/dealii/dealii/issues/1591 # Require at least 1.59 - depends_on("boost@1.59.0:+thread+system+serialization+iostreams", when='~mpi') # NOQA: ignore=E501 - depends_on("boost@1.59.0:+mpi+thread+system+serialization+iostreams", when='+mpi') # NOQA: ignore=E501 + # +python won't affect @:8.4.1 + depends_on("boost@1.59.0:+thread+system+serialization+iostreams", + when='@:8.4.1~mpi') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+mpi", + when='@:8.4.1+mpi') + # since @8.5.0: (and @develop) python bindings are introduced: + depends_on("boost@1.59.0:+thread+system+serialization+iostreams", + when='@8.5.0:~mpi~python') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+mpi", + when='@8.5.0:+mpi~python') + depends_on("boost@1.59.0:+thread+system+serialization+iostreams+python", + when='@8.5.0:~mpi+python') + depends_on( + "boost@1.59.0:+thread+system+serialization+iostreams+mpi+python", + when='@8.5.0:+mpi+python') depends_on("bzip2") - depends_on("cmake") + depends_on("cmake", type='build') depends_on("lapack") depends_on("muparser") depends_on("suite-sparse") @@ -73,20 +96,21 @@ class Dealii(Package): depends_on("doxygen+graphviz", when='+doc') depends_on("graphviz", when='+doc') depends_on("gsl", when='@8.5.0:+gsl') - depends_on("gsl", when='@dev+gsl') depends_on("hdf5+mpi", when='+hdf5+mpi') depends_on("metis@5:", when='+metis') depends_on("netcdf+mpi", when="+netcdf+mpi") 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+mpi", when='@8.5.0:+petsc+mpi') + depends_on("slepc", when='@8.5.0:+slepc+petsc+mpi') + depends_on("petsc@:3.6.4+mpi", when='@:8.4.1+petsc+mpi') + depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi') depends_on("trilinos", when='+trilinos+mpi') # developer dependnecies - depends_on("numdiff", when='@dev') - depends_on("astyle@2.04", when='@dev') + depends_on("numdiff", when='@develop') + depends_on("astyle@2.04", when='@develop') def install(self, spec, prefix): options = [] @@ -108,18 +132,33 @@ 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, '-DZLIB_DIR=%s' % spec['zlib'].prefix ]) + if spec.satisfies('@8.5.0:'): + options.extend([ + '-DDEAL_II_COMPONENT_PYTHON_BINDINGS=%s' % + ('ON' if '+python' in spec else 'OFF') + ]) + + # Set directory structure: + if spec.satisfies('@:8.2.1'): + options.extend(['-DDEAL_II_COMPONENT_COMPAT_FILES=OFF']) + else: + options.extend([ + '-DDEAL_II_EXAMPLES_RELDIR=share/deal.II/examples', + '-DDEAL_II_DOCREADME_RELDIR=share/deal.II/', + '-DDEAL_II_DOCHTML_RELDIR=share/deal.II/doc' + ]) + # MPI if '+mpi' in spec: options.extend([ @@ -135,7 +174,8 @@ class Dealii(Package): # Optional dependencies for which librariy names are the same as CMake # variables: - for library in ('gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis'): # NOQA: ignore=E501 + for library in ( + 'gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis'): if library in spec: options.extend([ '-D%s_DIR=%s' % (library.upper(), spec[library].prefix), @@ -168,14 +208,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([ @@ -194,115 +234,123 @@ class Dealii(Package): ]) cmake('.', *options) - make() - make("test") + if self.run_tests: + make("test") make("install") # run some MPI examples with different solvers from PETSc and Trilinos - env['DEAL_II_DIR'] = prefix - print('=====================================') - print('============ EXAMPLES ===============') - print('=====================================') - # take bare-bones step-3 - print('=====================================') - print('============ Step-3 =================') - print('=====================================') - with working_dir('examples/step-3'): - cmake('.') - make('release') - make('run', parallel=False) - - # An example which uses Metis + PETSc - # FIXME: switch step-18 to MPI - with working_dir('examples/step-18'): + if self.run_tests: + env['DEAL_II_DIR'] = prefix print('=====================================') - print('============= Step-18 ===============') + print('============ EXAMPLES ===============') print('=====================================') - # list the number of cycles to speed up - filter_file(r'(end_time = 10;)', ('end_time = 3;'), 'step-18.cc') - if '^petsc' in spec and '^metis' in spec: - cmake('.') - make('release') - make('run', parallel=False) - - # take step-40 which can use both PETSc and Trilinos - # FIXME: switch step-40 to MPI run - with working_dir('examples/step-40'): + # take bare-bones step-3 print('=====================================') - print('========== Step-40 PETSc ============') + print('============ Step-3 =================') print('=====================================') - # list the number of cycles to speed up - filter_file(r'(const unsigned int n_cycles = 8;)', - ('const unsigned int n_cycles = 2;'), 'step-40.cc') - cmake('.') - if '^petsc' in spec: + with working_dir('examples/step-3'): + cmake('.') make('release') make('run', parallel=False) - print('=====================================') - print('========= Step-40 Trilinos ==========') - print('=====================================') - # 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:'): - filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', - ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') - else: - filter_file(r'(#define USE_PETSC_LA.*)', - ('// #define USE_PETSC_LA'), 'step-40.cc') - if '^trilinos+hypre' in spec: - make('release') - make('run', parallel=False) + # An example which uses Metis + PETSc + # FIXME: switch step-18 to MPI + with working_dir('examples/step-18'): + print('=====================================') + print('============= Step-18 ===============') + print('=====================================') + # list the number of cycles to speed up + filter_file(r'(end_time = 10;)', ('end_time = 3;'), + 'step-18.cc') + if '^petsc' in spec and '^metis' in spec: + cmake('.') + make('release') + make('run', parallel=False) - # the rest of the tests on step 40 only works for - # dealii version 8.4.0 and after - if spec.satisfies('@8.4.0:'): + # take step-40 which can use both PETSc and Trilinos + # FIXME: switch step-40 to MPI run + with working_dir('examples/step-40'): print('=====================================') - print('=== Step-40 Trilinos SuperluDist ====') + print('========== Step-40 PETSc ============') print('=====================================') - # change to direct solvers - 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;)', - (''), 'step-40.cc') - filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', - (''), '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') - if '^trilinos+superlu-dist' in spec: + # list the number of cycles to speed up + filter_file(r'(const unsigned int n_cycles = 8;)', + ('const unsigned int n_cycles = 2;'), 'step-40.cc') + cmake('.') + if '^petsc' in spec: make('release') - make('run', paralle=False) + make('run', parallel=False) print('=====================================') - print('====== Step-40 Trilinos MUMPS =======') + print('========= Step-40 Trilinos ==========') print('=====================================') - # switch to Mumps - filter_file(r'(Amesos_Superludist)', - ('Amesos_Mumps'), 'step-40.cc') - if '^trilinos+mumps' in spec: + # 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:'): + filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', + ('#define FORCE_USE_OF_TRILINOS'), + 'step-40.cc') + else: + filter_file(r'(#define USE_PETSC_LA.*)', + ('// #define USE_PETSC_LA'), 'step-40.cc') + if '^trilinos+hypre' in spec: make('release') make('run', parallel=False) - print('=====================================') - print('============ Step-36 ================') - print('=====================================') - with working_dir('examples/step-36'): - if 'slepc' in spec: - cmake('.') - make('release') - make('run', parallel=False) + # the rest of the tests on step 40 only works for + # dealii version 8.4.0 and after + if spec.satisfies('@8.4.0:'): + print('=====================================') + print('=== Step-40 Trilinos SuperluDist ====') + print('=====================================') + # change to direct solvers + 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 + filter_file( + r'(LA::MPI::PreconditionAMG preconditioner;)', + (''), 'step-40.cc') + filter_file( + r'(LA::MPI::PreconditionAMG::AdditionalData data;)', + (''), 'step-40.cc') + filter_file( + r'(preconditioner.initialize\(system_matrix, data\);)', + (''), '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 + filter_file( + r'(preconditioner\);)', (''), 'step-40.cc') + if '^trilinos+superlu-dist' in spec: + make('release') + make('run', paralle=False) - print('=====================================') - print('============ Step-54 ================') - print('=====================================') - with working_dir('examples/step-54'): - if 'oce' in spec: - cmake('.') - make('release') - make('run', parallel=False) + print('=====================================') + print('====== Step-40 Trilinos MUMPS =======') + print('=====================================') + # switch to Mumps + filter_file(r'(Amesos_Superludist)', + ('Amesos_Mumps'), 'step-40.cc') + if '^trilinos+mumps' in spec: + make('release') + make('run', parallel=False) + + print('=====================================') + print('============ Step-36 ================') + print('=====================================') + with working_dir('examples/step-36'): + if 'slepc' in spec: + cmake('.') + make('release') + make('run', parallel=False) + + print('=====================================') + print('============ Step-54 ================') + print('=====================================') + with working_dir('examples/step-54'): + if 'oce' in spec: + cmake('.') + make('release') + make('run', parallel=False) def setup_environment(self, spack_env, env): env.set('DEAL_II_DIR', self.prefix) diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py index 38742b7e7d..94cd75656d 100644 --- a/var/spack/repos/builtin/packages/dia/package.py +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Dia(Package): """Dia is a program for drawing structured diagrams.""" homepage = 'https://wiki.gnome.org/Apps/Dia' @@ -31,10 +32,10 @@ class Dia(Package): version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') - depends_on('intltool') + depends_on('intltool', type='build') depends_on('gtkplus@2.6.0:') depends_on('cairo') - #depends_on('libart') # optional dependency, not yet supported by spack. + # depends_on('libart') # optional dependency, not yet supported by spack. depends_on('libpng') depends_on('libxslt') depends_on('python') diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py index 9c22174610..87137168f3 100644 --- a/var/spack/repos/builtin/packages/docbook-xml/package.py +++ b/var/spack/repos/builtin/packages/docbook-xml/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -import glob from spack import * @@ -35,9 +34,10 @@ class DocbookXml(Package): version('4.5', '03083e288e87a7e829e437358da7ef9e') def install(self, spec, prefix): - cp = which('cp') - - install_args = ['-a', '-t', prefix] - install_args.extend(glob.glob('*')) - - cp(*install_args) + for item in os.listdir('.'): + src = os.path.abspath(item) + dst = os.path.join(prefix, item) + if os.path.isdir(item): + install_tree(src, dst, symlinks=True) + else: + install(src, dst) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index b2e9582b5a..f29110ac1d 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -39,14 +39,15 @@ class Doxygen(Package): version('1.8.10', '79767ccd986f12a0f949015efb5f058f') # graphviz appears to be a run-time optional dependency - variant('graphviz', default=True, description='Build with dot command support from Graphviz.') # NOQA: ignore=E501 + variant('graphviz', default=True, + description='Build with dot command support from Graphviz.') - depends_on("cmake@2.8.12:") - depends_on("flex") - depends_on("bison") + depends_on("cmake@2.8.12:", type='build') + depends_on("flex", type='build') + depends_on("bison", type='build') # optional dependencies - depends_on("graphviz", when="+graphviz") + depends_on("graphviz", when="+graphviz", type='run') def install(self, spec, prefix): cmake('.', *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/dri2proto/package.py b/var/spack/repos/builtin/packages/dri2proto/package.py index 25ea783c0c..65b86714f1 100644 --- a/var/spack/repos/builtin/packages/dri2proto/package.py +++ b/var/spack/repos/builtin/packages/dri2proto/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Dri2proto(Package): """DRI2 Protocol Headers.""" homepage = "http://http://cgit.freedesktop.org/xorg/proto/dri2proto/" diff --git a/var/spack/repos/builtin/packages/dtcmp/package.py b/var/spack/repos/builtin/packages/dtcmp/package.py index b50b2ae3ae..e59e246d47 100644 --- a/var/spack/repos/builtin/packages/dtcmp/package.py +++ b/var/spack/repos/builtin/packages/dtcmp/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Dtcmp(Package): """The Datatype Comparison Library provides comparison operations and parallel sort algorithms for MPI applications.""" diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 735936f087..90c83bdc3a 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Dyninst(Package): """API for dynamic binary instrumentation. Modify programs while they are executing without recompiling, re-linking, or re-executing.""" @@ -43,6 +44,7 @@ class Dyninst(Package): depends_on("libelf") depends_on("libdwarf") depends_on("boost@1.42:") + depends_on('cmake', type='build') # new version uses cmake def install(self, spec, prefix): @@ -54,16 +56,18 @@ class Dyninst(Package): '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), - '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), + '-DLIBELF_INCLUDE_DIR=%s' % join_path( + libelf.include, 'libelf'), + '-DLIBELF_LIBRARIES=%s' % join_path( + libelf.lib, 'libelf.so'), '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), + '-DLIBDWARF_LIBRARIES=%s' % join_path( + libdwarf.lib, 'libdwarf.so'), *std_cmake_args) make() make("install") - @when('@:8.1') def install(self, spec, prefix): configure("--prefix=" + prefix) diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index e20fcffdd7..36d6850c1a 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -22,36 +22,41 @@ # 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 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/' url = 'http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2' - version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184', url='http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2') + version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184', + url='http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2') - variant('debug', default=False, description='Builds the library in debug mode') + variant('debug', default=False, + description='Builds the library in debug mode') variant('metis', default=True, description='Enables metis backend') 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('suitesparse', default=True, + description='Enables SuiteSparse support') + variant('mpfr', default=True, + description='Enables support for multi-precisions FP via mpfr') # TODO : dependency on googlehash, superlu, adolc missing - - depends_on('cmake') + depends_on('cmake', type='build') 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/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index ecb5759ddc..ef8c2433c9 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Elfutils(Package): """elfutils is a collection of various binary tools such as eu-objdump, eu-readelf, and other utilities that allow you to @@ -47,4 +48,3 @@ class Elfutils(Package): configure('--prefix=%s' % prefix, '--enable-maintainer-mode') make() make("install") - diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index ae81422495..f28d63f6c3 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -34,7 +34,8 @@ class Elpa(Package): homepage = 'http://elpa.mpcdf.mpg.de/' url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz' - version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6', url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz') + version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6', + url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz') variant('openmp', default=False, description='Activates OpenMP support') diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index 4b05864a1e..94d42a3c9f 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -23,23 +23,45 @@ # 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 (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/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index fe7a5ee4f6..85594bab47 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -35,7 +35,7 @@ class EnvironmentModules(Package): version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') # Dependencies: - depends_on('tcl') + depends_on('tcl', type=alldeps) def install(self, spec, prefix): tcl_spec = spec['tcl'] @@ -46,17 +46,18 @@ class EnvironmentModules(Package): "--without-tclx", "--with-tclx-ver=0.0", "--prefix=%s" % prefix, - "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'), # It looks for tclConfig.sh - "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[0], tcl_spec.version.version[1]), + # It looks for tclConfig.sh + "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'), + "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[ + 0], tcl_spec.version.version[1]), '--disable-debug', '--disable-dependency-tracking', '--disable-silent-rules', - '--disable-versioning', + '--disable-versioning', '--datarootdir=%s' % prefix.share, 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) ] - configure(*config_args) make() make('install') diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index ef6a3ccc7b..447964f286 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -26,20 +26,28 @@ from spack import * import os + class Espresso(Package): """ - QE is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials - modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials. + QE is an integrated suite of Open-Source computer codes for + electronic-structure calculations and materials modeling at + the nanoscale. It is based on density-functional theory, plane + waves, and pseudopotentials. """ homepage = 'http://quantum-espresso.org' url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz' + version( + '5.4.0', + '8bb78181b39bd084ae5cb7a512c1cfe7', + url='http://www.qe-forge.org/gf/download/frsrelease/211/968/espresso-5.4.0.tar.gz' + ) version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3') - variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support') + variant('mpi', default=True, description='Builds with mpi support') variant('openmp', default=False, description='Enables openMP support') variant('scalapack', default=True, description='Enables scalapack support') - variant('elpa', default=True, description='Use elpa as an eigenvalue solver') + variant('elpa', default=True, description='Uses elpa as an eigenvalue solver') depends_on('blas') depends_on('lapack') @@ -47,7 +55,12 @@ class Espresso(Package): depends_on('mpi', when='+mpi') depends_on('fftw~mpi', when='~mpi') depends_on('fftw+mpi', when='+mpi') - depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation + # TODO : + mpi needed to avoid false dependencies installation + depends_on('scalapack', when='+scalapack+mpi') + + # Spurious problems running in parallel the Makefile + # generated by qe configure + parallel = False def check_variants(self, spec): error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active' @@ -87,10 +100,9 @@ class Espresso(Package): configure(*options) make('all') - if spec.architecture.startswith('darwin'): + if spec.satisfies('platform=darwin'): mkdirp(prefix.bin) for filename in glob("bin/*.x"): install(filename, prefix.bin) else: make('install') - diff --git a/var/spack/repos/builtin/packages/exodusii/package.py b/var/spack/repos/builtin/packages/exodusii/package.py index 5e9227af46..15fe1e89a6 100644 --- a/var/spack/repos/builtin/packages/exodusii/package.py +++ b/var/spack/repos/builtin/packages/exodusii/package.py @@ -32,21 +32,24 @@ from spack import * # TODO: Create installation options for NetCDF that support larger page size # TODO: suggested by Exodus (see the repository "README" file). + class Exodusii(Package): - """Exodus II is a C++/Fortran library developed to store and retrieve data for - finite element analyses. It's used for preprocessing (problem definition), - postprocessing (results visualization), and data transfer between codes. - An Exodus II data file is a random access, machine independent, binary - file that is written and read via C, C++, or Fortran API routines.""" + """Exodus II is a C++/Fortran library developed to store and retrieve + data for finite element analyses. It's used for preprocessing + (problem definition), postprocessing (results visualization), and + data transfer between codes. An Exodus II data file is a random + access, machine independent, binary file that is written and read + via C, C++, or Fortran API routines. + + """ homepage = "https://github.com/gsjaardema/seacas" url = "https://github.com/gsjaardema/seacas/archive/master.zip" - version('2016-02-08', git='https://github.com/gsjaardema/seacas.git', commit='dcf3529') + version('2016-02-08', + git='https://github.com/gsjaardema/seacas.git', commit='dcf3529') - # TODO: Make this a build dependency once build dependencies are supported - # (see: https://github.com/LLNL/spack/pull/378). - depends_on('cmake@2.8.7:') + depends_on('cmake@2.8.7:', type='build') depends_on('hdf5~shared~mpi') depends_on('netcdf~mpi') @@ -56,11 +59,14 @@ class Exodusii(Package): ff = FileFilter('cmake-exodus') ff.filter('CMAKE_INSTALL_PREFIX:PATH=${ACCESS}', - 'CMAKE_INSTALL_PREFIX:PATH=%s' % self.spec.prefix, string=True) + 'CMAKE_INSTALL_PREFIX:PATH=%s' % self.spec.prefix, + string=True) ff.filter('NetCDF_DIR:PATH=${TPL}', - 'NetCDF_DIR:PATH=%s' % self.spec['netcdf'].prefix, string=True) + 'NetCDF_DIR:PATH=%s' % self.spec['netcdf'].prefix, + string=True) ff.filter('HDF5_ROOT:PATH=${TPL}', - 'HDF5_ROOT:PATH=%s' % self.spec['hdf5'].prefix, string=True) + 'HDF5_ROOT:PATH=%s' % self.spec['hdf5'].prefix, + string=True) def install(self, spec, prefix): mkdirp('build') diff --git a/var/spack/repos/builtin/packages/exonerate/package.py b/var/spack/repos/builtin/packages/exonerate/package.py new file mode 100644 index 0000000000..7921e64058 --- /dev/null +++ b/var/spack/repos/builtin/packages/exonerate/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 Exonerate(Package): + """Pairwise sequence alignment of DNA and proteins""" + + homepage = "http://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate" + url = "http://ftp.ebi.ac.uk/pub/software/vertebrategenomics/exonerate/exonerate-2.2.0.tar.gz" + + version('2.4.0', '126fbade003b80b663a1d530c56f1904') + + depends_on('pkg-config', type="build") + depends_on('glib') + + parallel = False + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix), '--disable-debug', + '--disable-dependency-tracking') + make() + make('install') diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py index 51e827b2c5..7d0fdae1d4 100644 --- a/var/spack/repos/builtin/packages/expat/package.py +++ b/var/spack/repos/builtin/packages/expat/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Expat(Package): """<eXpat/> is an XML parser library written in C""" homepage = "http://expat.sourceforge.net/" @@ -31,7 +32,7 @@ class Expat(Package): version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd') - depends_on('cmake') + depends_on('cmake', type='build') def install(self, spec, prefix): @@ -39,4 +40,3 @@ class Expat(Package): cmake('..', *std_cmake_args) make() make('install') - diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 84c410e4ba..72bfbe6326 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -25,7 +25,23 @@ from spack import * # typical working line with extrae 3.0.1 -# ./configure --prefix=/usr/local --with-mpi=/usr/lib64/mpi/gcc/openmpi --with-unwind=/usr/local --with-papi=/usr --with-dwarf=/usr --with-elf=/usr --with-dyninst=/usr --with-binutils=/usr --with-xml-prefix=/usr --enable-openmp --enable-nanos --enable-pthread --disable-parallel-merge LDFLAGS=-pthread +# ./configure +# --prefix=/usr/local +# --with-mpi=/usr/lib64/mpi/gcc/openmpi +# --with-unwind=/usr/local +# --with-papi=/usr +# --with-dwarf=/usr +# --with-elf=/usr +# --with-dyninst=/usr +# --with-binutils=/usr +# --with-xml-prefix=/usr +# --enable-openmp +# --enable-nanos +# --enable-pthread +# --disable-parallel-merge +# +# LDFLAGS=-pthread + class Extrae(Package): """Extrae is the package devoted to generate tracefiles which can @@ -55,16 +71,16 @@ class Extrae(Package): elif 'mvapich2' in spec: mpi = spec['mvapich2'] - configure("--prefix=%s" % prefix, - "--with-mpi=%s" % mpi.prefix, - "--with-unwind=%s" % spec['libunwind'].prefix, - "--with-dyninst=%s" % spec['dyninst'].prefix, - "--with-boost=%s" % spec['boost'].prefix, - "--with-dwarf=%s" % spec['libdwarf'].prefix, - "--with-papi=%s" % spec['papi'].prefix, - "--with-dyninst-headers=%s" % spec['dyninst'].prefix.include, - "--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib) + configure("--prefix=%s" % prefix, + "--with-mpi=%s" % mpi.prefix, + "--with-unwind=%s" % spec['libunwind'].prefix, + "--with-dyninst=%s" % spec['dyninst'].prefix, + "--with-boost=%s" % spec['boost'].prefix, + "--with-dwarf=%s" % spec['libdwarf'].prefix, + "--with-papi=%s" % spec['papi'].prefix, + "--with-dyninst-headers=%s" % spec[ + 'dyninst'].prefix.include, + "--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib) make() make("install", parallel=False) - diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py index c49d0624f6..10be30ab8b 100644 --- a/var/spack/repos/builtin/packages/exuberant-ctags/package.py +++ b/var/spack/repos/builtin/packages/exuberant-ctags/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class ExuberantCtags(Package): """The canonical ctags generator""" homepage = "ctags.sourceforge.net" diff --git a/var/spack/repos/builtin/packages/fastx_toolkit/package.py b/var/spack/repos/builtin/packages/fastx_toolkit/package.py new file mode 100644 index 0000000000..04b4d24b39 --- /dev/null +++ b/var/spack/repos/builtin/packages/fastx_toolkit/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 FastxToolkit(Package): + """The FASTX-Toolkit is a collection of command line tools for + Short-Reads FASTA/FASTQ files preprocessing.""" + + homepage = "http://hannonlab.cshl.edu/fastx_toolkit/" + url = "https://github.com/agordon/fastx_toolkit/releases/download/0.0.14/fastx_toolkit-0.0.14.tar.bz2" + + version('0.0.14', 'bf1993c898626bb147de3d6695c20b40') + + depends_on('libgtextutils') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + + 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..eeeefc540d 100644 --- a/var/spack/repos/builtin/packages/fenics/package.py +++ b/var/spack/repos/builtin/packages/fenics/package.py @@ -36,7 +36,7 @@ class Fenics(Package): homepage = "http://fenicsproject.org/" url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz" - base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz" # NOQA: ignore E501 + base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz" variant('hdf5', default=True, description='Compile with HDF5') variant('parmetis', default=True, description='Compile with ParMETIS') @@ -44,19 +44,27 @@ class Fenics(Package): variant('petsc', default=True, description='Compile with PETSc') variant('slepc', default=True, description='Compile with SLEPc') variant('trilinos', default=True, description='Compile with Trilinos') - variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') + variant('suite-sparse', default=True, + description='Compile with SuiteSparse solvers') variant('vtk', default=False, description='Compile with VTK') variant('qt', default=False, description='Compile with QT') - variant('mpi', default=True, description='Enables the distributed memory support') - variant('openmp', default=True, description='Enables the shared memory support') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + variant('mpi', default=True, + description='Enables the distributed memory support') + variant('openmp', default=True, + description='Enables the shared memory support') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds a debug version of the libraries') # not part of spack list for now # variant('petsc4py', default=True, description='Uses PETSc4py') # 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') @@ -106,7 +114,8 @@ class Fenics(Package): ] for release in releases: - version(release['version'], release['md5'], url=base_url.format(pkg='dolfin', version=release['version'])) + version(release['version'], release['md5'], url=base_url.format( + pkg='dolfin', version=release['version'])) for name, md5 in release['resources'].items(): resource(name=name, url=base_url.format(pkg=name, **release), 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/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 434aeea616..570cd1bbdd 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -28,26 +28,36 @@ from spack import * class Fftw(Package): - """ - FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of - arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine - transforms or DCT/DST). We believe that FFTW, which is free software, should become the FFT library of choice for - most applications. + """FFTW is a C subroutine library for computing the discrete Fourier + transform (DFT) in one or more dimensions, of arbitrary input + size, and of both real and complex data (as well as of even/odd + data, i.e. the discrete cosine/sine transforms or DCT/DST). We + believe that FFTW, which is free software, should become the FFT + library of choice for most applications. + """ homepage = "http://www.fftw.org" url = "http://www.fftw.org/fftw-3.3.4.tar.gz" version('3.3.4', '2edab8c06b24feeb3b82bbb3ebf3e7b3') - variant('float', default=True, description='Produces a single precision version of the library') - variant('long_double', default=True, description='Produces a long double precision version of the library') - variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') + variant( + 'float', default=True, + description='Produces a single precision version of the library') + variant( + 'long_double', default=True, + description='Produces a long double precision version of the library') + variant( + 'quad', default=False, + description='Produces a quad precision version of the library ' + '(works only with GCC and libquadmath)') variant('openmp', default=False, description="Enable OpenMP support.") variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') - # TODO : add support for architecture specific optimizations as soon as targets are supported + # TODO : add support for architecture specific optimizations as soon as + # targets are supported def install(self, spec, prefix): options = ['--prefix=%s' % prefix, @@ -57,9 +67,9 @@ class Fftw(Package): if '+openmp' in spec: # Note: Apple's Clang does not support OpenMP. if spec.satisfies('%clang'): - ver = str(self.compiler.version) - if ver.endswith('-apple'): - raise InstallError("Apple's clang does not support OpenMP") + ver = str(self.compiler.version) + if ver.endswith('-apple'): + raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: options.append("--disable-fortran") diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py index 9d23a3d63d..0e85f410c1 100644 --- a/var/spack/repos/builtin/packages/fish/package.py +++ b/var/spack/repos/builtin/packages/fish/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Fish(Package): """fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family. diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index b778538606..9b173bb0dd 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -34,7 +34,8 @@ class Flex(Package): version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') - depends_on("bison") + depends_on("bison", type='build') + depends_on("m4", type='build') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/fltk/package.py b/var/spack/repos/builtin/packages/fltk/package.py index f8ac5bc2a4..f29b64b02b 100644 --- a/var/spack/repos/builtin/packages/fltk/package.py +++ b/var/spack/repos/builtin/packages/fltk/package.py @@ -26,13 +26,16 @@ from spack import * class Fltk(Package): - """ - FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and - MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its - built-in GLUT emulation. + """FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for + UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides + modern GUI functionality without the bloat and supports 3D + graphics via OpenGL and its built-in GLUT emulation. + + FLTK is designed to be small and modular enough to be statically + linked, but works fine as a shared library. FLTK also includes an + excellent UI builder called FLUID that can be used to create + applications in minutes. - FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK - also includes an excellent UI builder called FLUID that can be used to create applications in minutes. """ homepage = 'http://www.fltk.org/' url = 'http://fltk.org/pub/fltk/1.3.3/fltk-1.3.3-source.tar.gz' @@ -41,7 +44,8 @@ class Fltk(Package): patch('font.patch', when='@1.3.3') - variant('shared', default=True, description='Enables the build of shared libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') def install(self, spec, prefix): options = ['--prefix=%s' % prefix, diff --git a/var/spack/repos/builtin/packages/flux/package.py b/var/spack/repos/builtin/packages/flux/package.py index 2b972d63ae..2fd2392b5e 100644 --- a/var/spack/repos/builtin/packages/flux/package.py +++ b/var/spack/repos/builtin/packages/flux/package.py @@ -25,13 +25,15 @@ from spack import * import os + class Flux(Package): """ A next-generation resource manager (pre-alpha) """ homepage = "https://github.com/flux-framework/flux-core" url = "https://github.com/flux-framework/flux-core" - version('master', branch='master', git='https://github.com/flux-framework/flux-core') + version('master', branch='master', + git='https://github.com/flux-framework/flux-core') # Also needs autotools, but should use the system version if available depends_on("zeromq@4.0.4:") @@ -45,19 +47,18 @@ class Flux(Package): depends_on("py-cffi") # TODO: This provides a catalog, hacked with environment below for now - depends_on("docbook-xml") - depends_on("asciidoc") + depends_on("docbook-xml", type='build') + depends_on("asciidoc", type='build') def install(self, spec, prefix): # Bootstrap with autotools bash = which('bash') bash('./autogen.sh') - bash('./autogen.sh') #yes, twice, intentionally + bash('./autogen.sh') # yes, twice, intentionally # Fix asciidoc dependency on xml style sheets and whatnot - os.environ['XML_CATALOG_FILES'] = os.path.join(spec['docbook-xml'].prefix, - 'catalog.xml') + os.environ['XML_CATALOG_FILES'] = os.path.join( + spec['docbook-xml'].prefix, 'catalog.xml') # Configure, compile & install configure("--prefix=" + prefix) make("install", "V=1") - 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..6b3b87a110 --- /dev/null +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -0,0 +1,248 @@ +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('cmake', type='build') + + 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 + + # 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/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py index 76e9d8cb3f..0d7e47f228 100644 --- a/var/spack/repos/builtin/packages/fontconfig/package.py +++ b/var/spack/repos/builtin/packages/fontconfig/package.py @@ -24,12 +24,13 @@ ############################################################################## from spack import * + class Fontconfig(Package): """Fontconfig customizing font access""" homepage = "http://www.freedesktop.org/wiki/Software/fontconfig/" url = "http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz" - version('2.11.1' , 'e75e303b4f7756c2b16203a57ac87eba') + version('2.11.1', 'e75e303b4f7756c2b16203a57ac87eba') depends_on('freetype') depends_on('libxml2') 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/gasnet/package.py b/var/spack/repos/builtin/packages/gasnet/package.py index b3bd6c25f2..12ecd9fd6f 100644 --- a/var/spack/repos/builtin/packages/gasnet/package.py +++ b/var/spack/repos/builtin/packages/gasnet/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Gasnet(Package): """GASNet is a language-independent, low-level networking layer that provides network-independent, high-performance communication @@ -36,24 +37,24 @@ class Gasnet(Package): version('1.24.0', 'c8afdf48381e8b5a7340bdb32ca0f41a') - def install(self, spec, prefix): # TODO: don't use paths with @ in them. change_sed_delimiter('@', ';', 'configure') - configure("--prefix=%s" % prefix, - # TODO: factor IB suport out into architecture description. - "--enable-ibv", - "--enable-udp", - "--disable-mpi", - "--enable-par", - "--enable-mpi-compat", - "--enable-segment-fast", - "--disable-aligned-segments", - # TODO: make an option so that Legion can request builds with/without this. - # See the Legion webpage for details on when to/not to use. - "--disable-pshm", - "--with-segment-mmap-max=64MB") + configure( + "--prefix=%s" % prefix, + # TODO: factor IB suport out into architecture description. + "--enable-ibv", + "--enable-udp", + "--disable-mpi", + "--enable-par", + "--enable-mpi-compat", + "--enable-segment-fast", + "--disable-aligned-segments", + # TODO: make option so Legion can request builds with/without this. + # See the Legion webpage for details on when to/not to use. + "--disable-pshm", + "--with-segment-mmap-max=64MB") make() make("install") diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 224105ea0f..72a5cb22f8 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -15,6 +15,7 @@ class Gcc(Package): list_depth = 2 version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1') + version('5.4.0', '4c626ac2a83ef30dfb9260e6f59c2b30') version('5.3.0', 'c9616fd448f980259c31de613e575719') version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467') version('4.9.3', '6f831b4d251872736e8e9cc09746f327') diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index caff06bdd6..4fdfafc992 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Gdal(Package): """ GDAL is a translator library for raster and vector geospatial @@ -62,7 +63,7 @@ class Gdal(Package): depends_on("libpng") depends_on("zlib") depends_on("proj") - depends_on("py-numpy") + depends_on("py-numpy", type=nolink) parallel = False diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index 58d8a545db..9145009fa4 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -27,9 +27,10 @@ from spack import * class Gdb(Package): - """ - GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes - -- or what another program was doing at the moment it crashed. + """GDB, the GNU Project debugger, allows you to see what is going on + `inside' another program while it executes -- or what another + program was doing at the moment it crashed. + """ homepage = "https://www.gnu.org/software/gdb" url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz" @@ -41,7 +42,7 @@ class Gdb(Package): version('7.9', '8f8ced422fe462a00e0135a643544f17') version('7.8.2', '8b0ea8b3559d3d90b3ff4952f0aeafbc') - depends_on('texinfo') + depends_on('texinfo', type='build') def install(self, spec, prefix): configure('--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py index daf43f3256..d7a0200395 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class GdkPixbuf(Package): """The Gdk Pixbuf is a toolkit for image loading and pixel buffer manipulation. It is used by GTK+ 2 and GTK+ 3 to load and diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py index 88438b0a99..324186cfbc 100644 --- a/var/spack/repos/builtin/packages/geos/package.py +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class Geos(Package): """GEOS (Geometry Engine - Open Source) is a C++ port of the Java diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index df301aea3c..cf260c3f8a 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -24,31 +24,80 @@ ############################################################################## from spack import * + class Gettext(Package): """GNU internationalization (i18n) and localization (l10n) library.""" homepage = "https://www.gnu.org/software/gettext/" url = "http://ftpmirror.gnu.org/gettext/gettext-0.19.7.tar.xz" - version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5') + version('0.19.8.1', 'df3f5690eaa30fd228537b00cb7b7590') + version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5') + + # Recommended variants + variant('curses', default=True, description='Use libncurses') + variant('libxml2', default=True, description='Use libxml2') + variant('git', default=True, description='Enable git support') + variant('tar', default=True, description='Enable tar support') + variant('bzip2', default=True, description='Enable bzip2 support') + variant('xz', default=True, description='Enable xz support') + + # Optional variants + variant('libunistring', default=False, description='Use libunistring') + + # Recommended dependencies + depends_on('ncurses', when='+curses') + depends_on('libxml2', when='+libxml2') + # Java runtime and compiler (e.g. GNU gcj or kaffe) + # C# runtime and compiler (e.g. pnet or mono) + depends_on('tar', when='+tar') + # depends_on('gzip', when='+gzip') + depends_on('bzip2', when='+bzip2') + depends_on('xz', when='+xz') + + # Optional dependencies + # depends_on('glib') # circular dependency? + # depends_on('libcroco@0.6.1:') + depends_on('libunistring', when='+libunistring') + # depends_on('cvs') def install(self, spec, prefix): - options = ['--disable-dependency-tracking', - '--disable-silent-rules', - '--disable-debug', - '--prefix=%s' % prefix, - '--with-included-gettext', - '--with-included-glib', - '--with-included-libcroco', - '--with-included-libunistring', - '--with-emacs', - '--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share, - '--disable-java', - '--disable-csharp', - '--without-git', # Don't use VCS systems to create these archives - '--without-cvs', - '--without-xz'] - - configure(*options) + config_args = [ + '--prefix={0}'.format(prefix), + '--disable-java', + '--disable-csharp', + '--with-included-glib', + '--with-included-gettext', + '--with-included-libcroco', + '--without-emacs', + '--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share, + '--without-cvs' + ] + + if '+curses' in spec: + config_args.append('--with-ncurses-prefix={0}'.format( + spec['ncurses'].prefix)) + else: + config_args.append('--disable-curses') + + if '+libxml2' in spec: + config_args.append('--with-libxml2-prefix={0}'.format( + spec['libxml2'].prefix)) + else: + config_args.append('--with-included-libxml') + + if '+bzip2' not in spec: + config_args.append('--without-bzip2') + + if '+xz' not in spec: + config_args.append('--without-xz') + + if '+libunistring' in spec: + config_args.append('--with-libunistring-prefix={0}'.format( + spec['libunistring'].prefix)) + else: + config_args.append('--with-included-libunistring') + + configure(*config_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/gflags/package.py b/var/spack/repos/builtin/packages/gflags/package.py index 9f3552d53d..7e04c9b682 100644 --- a/var/spack/repos/builtin/packages/gflags/package.py +++ b/var/spack/repos/builtin/packages/gflags/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Gflags(Package): """The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for @@ -37,6 +37,8 @@ class Gflags(Package): version('2.1.2', 'ac432de923f9de1e9780b5254884599f') + depends_on('cmake', type='build') + def install(self, spec, prefix): cmake("-DCMAKE_INSTALL_PREFIX=" + prefix, "-DBUILD_SHARED_LIBS=ON") 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/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 03e7d3e031..3cc879088d 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Git(Package): """Git is a free and open source distributed version control system designed to handle everything from small to very large @@ -36,40 +37,36 @@ class Git(Package): version('2.7.3', 'fa1c008b56618c355a32ba4a678305f6') version('2.7.1', 'bf0706b433a8dedd27a63a72f9a66060') - # See here for info on vulnerable Git versions: # http://www.theregister.co.uk/2016/03/16/git_server_client_patch_now/ # All the following are vulnerable - #version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423') - #version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8') - #version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd') - #version('2.6.0', 'eb76a07148d94802a1745d759716a57e') - #version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b') - #version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c') - + # version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423') + # version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8') + # version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd') + # version('2.6.0', 'eb76a07148d94802a1745d759716a57e') + # version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b') + # version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c') depends_on("openssl") - depends_on("autoconf") + depends_on("autoconf", type='build') depends_on("curl") depends_on("expat") - - # Also depends_on gettext: apt-get install gettext (Ubuntu) - - # Use system perl for now. - # depends_on("perl") - # depends_on("pcre") - + depends_on("gettext") depends_on("zlib") + depends_on("pcre") + depends_on("perl") def install(self, spec, prefix): + env['LDFLAGS'] = "-L%s" % spec['gettext'].prefix.lib + " -lintl" configure_args = [ "--prefix=%s" % prefix, - "--without-pcre", + "--with-libpcre=%s" % spec['pcre'].prefix, "--with-openssl=%s" % spec['openssl'].prefix, "--with-zlib=%s" % spec['zlib'].prefix, "--with-curl=%s" % spec['curl'].prefix, "--with-expat=%s" % spec['expat'].prefix, - ] + "--with-perl=%s" % join_path(spec['perl'].prefix.bin, 'perl'), + ] which('autoreconf')('-i') configure(*configure_args) diff --git a/var/spack/repos/builtin/packages/gl2ps/package.py b/var/spack/repos/builtin/packages/gl2ps/package.py index 25172bd544..d5e7b00027 100644 --- a/var/spack/repos/builtin/packages/gl2ps/package.py +++ b/var/spack/repos/builtin/packages/gl2ps/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Gl2ps(Package): """GL2PS is a C library providing high quality vector output for any OpenGL application.""" 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..2720831e4f 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import sys + class Glib(Package): """The GLib package contains a low-level libraries useful for @@ -33,12 +33,22 @@ class Glib(Package): homepage = "https://developer.gnome.org/glib/" url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" + version('2.49.4', 'e2c87c03017b0cd02c4c73274b92b148') version('2.42.1', '89c4119e50e767d3532158605ee9121a') - depends_on("libffi") - depends_on("zlib") - depends_on("pkg-config") - depends_on('gettext', sys.platform=='darwin') + depends_on('libffi') + depends_on('zlib') + depends_on('pkg-config', type='build') + depends_on('gettext') + depends_on('pcre+utf', when='@2.49:') + + # The following patch is needed for gcc-6.1 + patch('g_date_strftime.patch', when='@2.42.1') + + def url_for_version(self, version): + """Handle glib's version-based custom URLs.""" + url = 'http://ftp.gnome.org/pub/gnome/sources/glib' + return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version) def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py index 0c9212f17d..c565b3cae7 100644 --- a/var/spack/repos/builtin/packages/glm/package.py +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -26,17 +26,18 @@ from spack import * class Glm(Package): - """ - OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on - the OpenGL Shading Language (GLSL) specification. + """OpenGL Mathematics (GLM) is a header only C++ mathematics library for + graphics software based on the OpenGL Shading Language (GLSL) + specification. + """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.tar.gz" version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8') - - depends_on ("cmake") + + depends_on('cmake', type='build') def install(self, spec, prefix): with working_dir('spack-build', create=True): diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index c144d6660b..f832834a28 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -34,7 +34,7 @@ class Global(Package): version('6.5', 'dfec818b4f53d91721e247cf7b218078') - depends_on('exuberant-ctags') + depends_on('exuberant-ctags', type=nolink) depends_on('ncurses') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/glog/package.py b/var/spack/repos/builtin/packages/glog/package.py index 03ee092429..14f042732b 100644 --- a/var/spack/repos/builtin/packages/glog/package.py +++ b/var/spack/repos/builtin/packages/glog/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Glog(Package): """C++ implementation of the Google logging module.""" diff --git a/var/spack/repos/builtin/packages/glpk/package.py b/var/spack/repos/builtin/packages/glpk/package.py index 2ab3c38150..1b52643e59 100644 --- a/var/spack/repos/builtin/packages/glpk/package.py +++ b/var/spack/repos/builtin/packages/glpk/package.py @@ -22,22 +22,23 @@ # 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 Glpk(Package): - """ - The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed - integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in - the form of a callable library + """The GLPK (GNU Linear Programming Kit) package is intended for solving + large-scale linear programming (LP), mixed integer programming + (MIP), and other related problems. It is a set of routines written + in ANSI C and organized in the form of a callable library + """ homepage = "https://www.gnu.org/software/glpk" url = "http://ftp.gnu.org/gnu/glpk/glpk-4.57.tar.gz" version('4.57', '237531a54f73155842f8defe51aedb0f') - variant('gmp', default=False, description='Activates support for GMP library') + variant('gmp', default=False, + description='Activates support for GMP library') depends_on('gmp', when='+gmp') diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py index 3933788425..d85330dd6e 100644 --- a/var/spack/repos/builtin/packages/gmp/package.py +++ b/var/spack/repos/builtin/packages/gmp/package.py @@ -24,18 +24,20 @@ ############################################################################## from spack import * + class Gmp(Package): - """GMP is a free library for arbitrary precision arithmetic, - operating on signed integers, rational numbers, and - floating-point numbers.""" + """GMP is a free library for arbitrary precision arithmetic, operating + on signed integers, rational numbers, and floating-point numbers.""" + homepage = "https://gmplib.org" url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2" - version('6.1.0' , '86ee6e54ebfc4a90b643a65e402c4048') + version('6.1.1', '4c175f86e11eb32d8bf9872ca3a8e11d') + version('6.1.0', '86ee6e54ebfc4a90b643a65e402c4048') version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470') - version('6.0.0' , '6ef5869ae735db9995619135bd856b84') + version('6.0.0', '6ef5869ae735db9995619135bd856b84') - depends_on("m4") + depends_on("m4", type='build') 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..72f490e2f4 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -27,39 +27,57 @@ 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:', type='build') 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 +86,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/gnu-prolog/package.py b/var/spack/repos/builtin/packages/gnu-prolog/package.py new file mode 100644 index 0000000000..1e0487c654 --- /dev/null +++ b/var/spack/repos/builtin/packages/gnu-prolog/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 GnuProlog(Package): + """A free Prolog compiler with constraint solving over finite domains.""" + homepage = "http://www.gprolog.org/" + url = "http://www.gprolog.org/gprolog-1.4.4.tar.gz" + + version('1.4.4', '37009da471e5217ff637ad1c516448c8') + + parallel = False + + def install(self, spec, prefix): + with working_dir('src'): + configure('--with-install-dir=%s' % prefix, + '--without-links-dir') + make() + make('install') diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index a76677e066..600b6d285f 100644 --- a/var/spack/repos/builtin/packages/gnuplot/package.py +++ b/var/spack/repos/builtin/packages/gnuplot/package.py @@ -27,13 +27,18 @@ from spack import * import os + class Gnuplot(Package): - """ - Gnuplot is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other - platforms. The source code is copyrighted but freely distributed (i.e., you don't have to pay for it). It was - originally created to allow scientists and students to visualize mathematical functions and data interactively, - but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by - third-party applications like Octave. Gnuplot has been supported and under active development since 1986 + """Gnuplot is a portable command-line driven graphing utility for Linux, + OS/2, MS Windows, OSX, VMS, and many other platforms. The source + code is copyrighted but freely distributed (i.e., you don't have + to pay for it). It was originally created to allow scientists and + students to visualize mathematical functions and data + interactively, but has grown to support many non-interactive uses + such as web scripting. It is also used as a plotting engine by + third-party applications like Octave. Gnuplot has been supported + and under active development since 1986 + """ homepage = "http://www.gnuplot.info" url = "http://downloads.sourceforge.net/project/gnuplot/gnuplot/5.0.1/gnuplot-5.0.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py index 71b571bc88..5f7b0daf9b 100644 --- a/var/spack/repos/builtin/packages/gnutls/package.py +++ b/var/spack/repos/builtin/packages/gnutls/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Gnutls(Package): """GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them. It diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 13b83517d1..259498c145 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -24,8 +24,8 @@ class Go(Package): # to-do, make non-c self-hosting compilers feasible without backflips # should be a dep on external go compiler - depends_on('go-bootstrap') - depends_on('git') + depends_on('go-bootstrap', type='build') + depends_on('git', type='alldeps') def install(self, spec, prefix): bash = which('bash') diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index 9444253c8c..6f3cafec06 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Googletest(Package): """Google test framework for C++. Also called gtest.""" homepage = "https://github.com/google/googletest" @@ -31,7 +32,7 @@ class Googletest(Package): version('1.7.0', '5eaf03ed925a47b37c8e1d559eb19bc4') - depends_on("cmake") + depends_on("cmake", type='build') def install(self, spec, prefix): which('cmake')('.', *std_cmake_args) @@ -40,9 +41,8 @@ class Googletest(Package): # Google Test doesn't have a make install # We have to do our own install here. - install_tree('include', prefix.include) + install_tree('include', prefix.include) mkdirp(prefix.lib) - install('./libgtest.a', '%s' % prefix.lib) - install('./libgtest_main.a', '%s' % prefix.lib) - + install('./libgtest.a', '%s' % prefix.lib) + install('./libgtest_main.a', '%s' % prefix.lib) diff --git a/var/spack/repos/builtin/packages/gperf/package.py b/var/spack/repos/builtin/packages/gperf/package.py index af176afcf6..0e54d0e037 100644 --- a/var/spack/repos/builtin/packages/gperf/package.py +++ b/var/spack/repos/builtin/packages/gperf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Gperf(Package): """GNU gperf is a perfect hash function generator. For a given list of strings, it produces a hash function and hash table, in diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py index 1f17ab71a4..c6ca6c8057 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -24,14 +24,20 @@ ############################################################################## from spack import * + class Gperftools(Package): - """Google's fast malloc/free implementation, especially for multi-threaded applications. - Contains tcmalloc, heap-checker, heap-profiler, and cpu-profiler.""" + """Google's fast malloc/free implementation, especially for + multi-threaded applications. Contains tcmalloc, heap-checker, + heap-profiler, and cpu-profiler. + + """ homepage = "https://code.google.com/p/gperftools" url = "https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz" - version('2.4', '2171cea3bbe053036fb5d5d25176a160', url="https://github.com/gperftools/gperftools/releases/download/gperftools-2.4/gperftools-2.4.tar.gz") - version('2.3', 'f54dd119f0e46ac1f13264f8d97adf90', url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") + version('2.4', '2171cea3bbe053036fb5d5d25176a160', + url="https://github.com/gperftools/gperftools/releases/download/gperftools-2.4/gperftools-2.4.tar.gz") + version('2.3', 'f54dd119f0e46ac1f13264f8d97adf90', + url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") depends_on("libunwind") diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py index f70f32cc8a..0c3cd9b649 100644 --- a/var/spack/repos/builtin/packages/graphlib/package.py +++ b/var/spack/repos/builtin/packages/graphlib/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Graphlib(Package): """Library to create, manipulate, and export graphs Graphlib.""" homepage = "http://https://github.com/lee218llnl/graphlib" @@ -31,6 +32,8 @@ class Graphlib(Package): version('2.0.0', '43c6df84f1d38ba5a5dce0ae19371a70') + depends_on('cmake', type='build') + def install(self, spec, prefix): cmake(".", *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 2f99015ba2..b37121248c 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -37,14 +37,16 @@ class Graphviz(Package): # related to missing Perl packages. If spack begins support for Perl in the # future, this package can be updated to depend_on('perl') and the # ncecessary devel packages. - variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') # NOQA: ignore=E501 + variant( + 'perl', default=False, + description='Enable if you need the optional Perl language bindings.') parallel = False depends_on("swig") depends_on("python") depends_on("ghostscript") - depends_on("pkg-config") + depends_on("pkg-config", type='build') def install(self, spec, prefix): options = ['--prefix=%s' % prefix] diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 1a50a42488..d39c9738ef 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -22,19 +22,21 @@ # 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 Gromacs(Package): - """ - GROMACS (GROningen MAchine for Chemical Simulations) is a molecular dynamics package primarily designed for - simulations of proteins, lipids and nucleic acids. It was originally developed in the Biophysical Chemistry - department of University of Groningen, and is now maintained by contributors in universities and research centers - across the world. - - GROMACS is one of the fastest and most popular software packages available and can run on CPUs as well as GPUs. - It is free, open source released under the GNU General Public License. Starting from version 4.6, GROMACS is - released under the GNU Lesser General Public License. + """GROMACS (GROningen MAchine for Chemical Simulations) is a molecular + dynamics package primarily designed for simulations of proteins, lipids + and nucleic acids. It was originally developed in the Biophysical + Chemistry department of University of Groningen, and is now maintained + by contributors in universities and research centers across the world. + + GROMACS is one of the fastest and most popular software packages + available and can run on CPUs as well as GPUs. It is free, open source + released under the GNU General Public License. Starting from version 4.6, + GROMACS is released under the GNU Lesser General Public License. """ homepage = 'http://www.gromacs.org' @@ -43,16 +45,26 @@ class Gromacs(Package): version('5.1.2', '614d0be372f1a6f1f36382b7a6fcab98') variant('mpi', default=True, description='Activate MPI support') - variant('shared', default=True, description='Enables the build of shared libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') variant('debug', default=False, description='Enables debug mode') - variant('double', default=False, description='Produces a double precision version of the executables') + variant( + 'double', default=False, + description='Produces a double precision version of the executables') + variant('plumed', default=False, description='Enable PLUMED support') depends_on('mpi', when='+mpi') - + depends_on('plumed+mpi', when='+plumed+mpi') + depends_on('plumed~mpi', when='+plumed~mpi') depends_on('fftw') + depends_on('cmake', type='build') # TODO : add GPU support + def patch(self): + if '+plumed' in self.spec: + self.spec['plumed'].package.apply_patch(self) + def install(self, spec, prefix): options = [] diff --git a/var/spack/repos/builtin/packages/gsl/package.py b/var/spack/repos/builtin/packages/gsl/package.py index c1695a6f02..574d3b9402 100644 --- a/var/spack/repos/builtin/packages/gsl/package.py +++ b/var/spack/repos/builtin/packages/gsl/package.py @@ -27,17 +27,19 @@ from spack import * class Gsl(Package): - """ - The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the - GNU General Public License. The library provides a wide range of mathematical routines such as random number - generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive - test suite. + """The GNU Scientific Library (GSL) is a numerical library for C and C++ + programmers. It is free software under the GNU General Public + License. The library provides a wide range of mathematical + routines such as random number generators, special functions and + least-squares fitting. There are over 1000 functions in total with + an extensive test suite. + """ homepage = "http://www.gnu.org/software/gsl" url = "http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-2.1.tar.gz" - version('2.1' , 'd8f70abafd3e9f0bae03c52d1f4e8de5') - version('2.0' , 'ae44cdfed78ece40e73411b63a78c375') + version('2.1', 'd8f70abafd3e9f0bae03c52d1f4e8de5') + version('2.0', 'ae44cdfed78ece40e73411b63a78c375') version('1.16', 'e49a664db13d81c968415cd53f62bc8b') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py index c135e89f78..c85bbe4094 100644 --- a/var/spack/repos/builtin/packages/gtkplus/package.py +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -24,12 +24,15 @@ ############################################################################## from spack import * + class Gtkplus(Package): - """The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications.""" + """The GTK+ 2 package contains libraries used for creating graphical user + interfaces for applications.""" homepage = "http://www.gtk.org" - version('2.24.25', '612350704dd3aacb95355a4981930c6f', - url="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.25.tar.xz") + version( + '2.24.25', '612350704dd3aacb95355a4981930c6f', + url="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.25.tar.xz") depends_on("atk") depends_on("gdk-pixbuf") diff --git a/var/spack/repos/builtin/packages/gts/package.py b/var/spack/repos/builtin/packages/gts/package.py new file mode 100644 index 0000000000..2b3d4dd4f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/gts/package.py @@ -0,0 +1,53 @@ +############################################################################## +# 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 Gts(Package): + """GTS stands for the GNU Triangulated Surface Library. + + It is an Open Source Free Software Library intended to provide a set of + useful functions to deal with 3D surfaces meshed with interconnected + triangles. The source code is available free of charge under the Free + Software LGPL license. + + The code is written entirely in C with an object-oriented approach + based mostly on the design of GTK+. Careful attention is paid to + performance related issues as the initial goal of GTS is to provide a + simple and efficient library to scientists dealing with 3D computational + surface meshes. + """ + + homepage = "http://gts.sourceforge.net/index.html" + url = "http://gts.sourceforge.net/tarballs/gts-snapshot-121130.tar.gz" + + version('121130', '023ebb6b13b8707534182a3ef0d12908') + + depends_on('glib') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/guile/package.py b/var/spack/repos/builtin/packages/guile/package.py new file mode 100644 index 0000000000..22aff1bddf --- /dev/null +++ b/var/spack/repos/builtin/packages/guile/package.py @@ -0,0 +1,68 @@ +############################################################################## +# 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 Guile(Package): + """Guile is the GNU Ubiquitous Intelligent Language for Extensions, + the official extension language for the GNU operating system.""" + + homepage = "https://www.gnu.org/software/guile/" + url = "ftp://ftp.gnu.org/gnu/guile/guile-2.0.11.tar.gz" + + version('2.0.11', 'e532c68c6f17822561e3001136635ddd') + + variant('readline', default=True, description='Use the readline library') + + depends_on('gmp@4.2:') + depends_on('gettext') + depends_on('libtool@1.5.6:') + depends_on('libunistring@0.9.3:') + depends_on('bdw-gc@7.0:') + depends_on('libffi') + depends_on('readline', when='+readline') + depends_on('pkg-config', type='build') + + def install(self, spec, prefix): + config_args = [ + '--prefix={0}'.format(prefix), + '--with-libunistring-prefix={0}'.format( + spec['libunistring'].prefix), + '--with-libltdl-prefix={0}'.format(spec['libtool'].prefix), + '--with-libgmp-prefix={0}'.format(spec['gmp'].prefix), + '--with-libintl-prefix={0}'.format(spec['gettext'].prefix) + ] + + if '+readline' in spec: + config_args.append('--with-libreadline-prefix={0}'.format( + spec['readline'].prefix)) + else: + config_args.append('--without-libreadline-prefix') + + configure(*config_args) + + make() + make('check') + make('install') 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/harminv/package.py b/var/spack/repos/builtin/packages/harminv/package.py new file mode 100644 index 0000000000..184535ebb0 --- /dev/null +++ b/var/spack/repos/builtin/packages/harminv/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 Harminv(Package): + """Harminv is a free program (and accompanying library) to solve the + problem of harmonic inversion - given a discrete-time, finite-length + signal that consists of a sum of finitely-many sinusoids (possibly + exponentially decaying) in a given bandwidth, it determines the + frequencies, decay constants, amplitudes, and phases of those sinusoids.""" + + homepage = "http://ab-initio.mit.edu/wiki/index.php/Harminv" + url = "http://ab-initio.mit.edu/harminv/harminv-1.4.tar.gz" + + version('1.4', 'b95e24a9bc7e07d3d2202d1605e9e86f') + + depends_on('blas') + depends_on('lapack') + + def install(self, spec, prefix): + config_args = [ + '--prefix={0}'.format(prefix), + '--with-blas={0}'.format(spec['blas'].prefix.lib), + '--with-lapack={0}'.format(spec['lapack'].prefix.lib), + '--enable-shared' + ] + + configure(*config_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index 7ad4df2fde..aafb345be6 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Hdf(Package): """HDF4 (also known as HDF) is a library and multi-object file format for storing and managing data between machines.""" @@ -41,10 +42,9 @@ class Hdf(Package): depends_on("szip", when='+szip') depends_on("zlib") - def url_for_version(self, version): - return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str(version) + "/src/hdf-" + str(version) + ".tar.gz" - + return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str( + version) + "/src/hdf-" + str(version) + ".tar.gz" def install(self, spec, prefix): config_args = [ @@ -52,9 +52,9 @@ class Hdf(Package): '--prefix=%s' % prefix, '--with-jpeg=%s' % spec['jpeg'].prefix, '--with-zlib=%s' % spec['zlib'].prefix, - '--disable-netcdf', # must be disabled to build NetCDF with HDF4 support + '--disable-netcdf', # must be disabled to build NetCDF with HDF4 '--enable-fortran', - '--disable-shared', # fortran and shared libraries are not compatible + '--disable-shared', # fortran and shared libs are not compatible '--enable-static', '--enable-production' ] diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py new file mode 100644 index 0000000000..088c1e9d9b --- /dev/null +++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py @@ -0,0 +1,212 @@ +############################################################################## +# 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 +############################################################################## + +import os +import shutil +import sys + +from spack import * + + +def _install_shlib(name, src, dst): + """Install a shared library from directory src to directory dst""" + if sys.platform == "darwin": + shlib0 = name + ".0.dylib" + shlib = name + ".dylib" + shutil.copyfile(join_path(src, shlib0), join_path(dst, shlib0)) + os.symlink(shlib0, join_path(dst, shlib)) + else: + shlib000 = name + ".so.0.0.0" + shlib0 = name + ".so.0" + shlib = name + ".dylib" + shutil.copyfile(join_path(src, shlib000), join_path(dst, shlib000)) + os.symlink(shlib000, join_path(dst, shlib0)) + os.symlink(shlib0, join_path(dst, shlib)) + + +class Hdf5Blosc(Package): + """Blosc filter for HDF5""" + homepage = "https://github.com/Blosc/hdf5-blosc" + url = "https://github.com/Blosc/hdf5-blosc" + + version('master', git='https://github.com/Blosc/hdf5-blosc', + branch='master') + + depends_on("c-blosc") + depends_on("hdf5") + depends_on("libtool", type='build') + + parallel = False + + def install(self, spec, prefix): + # The included cmake recipe doesn"t work for Darwin + # cmake(".", *std_cmake_args) + # + # make() + # make("install") + # if sys.platform == "darwin": + # fix_darwin_install_name(prefix.lib) + + libtool = Executable(join_path(spec["libtool"].prefix.bin, "libtool")) + + # TODO: these vars are not used. + # if "+mpi" in spec["hdf5"]: + # cc = "mpicc" + # else: + # cc = "cc" + # shlibext = "so" if sys.platform != "darwin" else "dylib" + + mkdirp(prefix.include) + mkdirp(prefix.lib) + + # Build and install filter + with working_dir("src"): + libtool("--mode=compile", "--tag=CC", + "cc", "-g", "-O", + "-c", "blosc_filter.c") + libtool("--mode=link", "--tag=CC", + "cc", "-g", "-O", + "-rpath", prefix.lib, + "-o", "libblosc_filter.la", + "blosc_filter.lo", + "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc", + "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") + _install_shlib("libblosc_filter", ".libs", prefix.lib) + + # Build and install plugin + # The plugin requires at least HDF5 1.8.11: + if spec["hdf5"].satisfies("@1.8.11:"): + libtool("--mode=compile", "--tag=CC", + "cc", "-g", "-O", + "-c", "blosc_plugin.c") + libtool("--mode=link", "--tag=CC", + "cc", "-g", "-O", + "-rpath", prefix.lib, + "-o", "libblosc_plugin.la", + "blosc_plugin.lo", + "-L%s" % prefix.lib, "-lblosc_filter", + "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc", + "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") + _install_shlib("libblosc_plugin", ".libs", prefix.lib) + + self.check_install(spec) + + def check_install(self, spec): + "Build and run a small program to test the installed HDF5 Blosc plugin" + print "Checking HDF5-Blosc plugin..." + checkdir = "spack-check" + with working_dir(checkdir, create=True): + source = r"""\ +#include <hdf5.h> +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> + +#define FILTER_BLOSC 32001 /* Blosc filter ID registered with the HDF group */ + +int main(int argc, char **argv) { + herr_t herr; + hid_t file = H5Fcreate("file.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + assert(file >= 0); + hsize_t dims[3] = {10, 10, 10}; + hid_t space = H5Screate_simple(3, dims, NULL); + assert(space >= 0); + hid_t create_proplist = H5Pcreate(H5P_DATASET_CREATE); + assert(create_proplist >= 0); + herr = H5Pset_chunk(create_proplist, 3, dims); + assert(herr >= 0); + herr = H5Pset_filter(create_proplist, FILTER_BLOSC, H5Z_FLAG_OPTIONAL, 0, + NULL); + assert(herr >= 0); + htri_t all_filters_avail = H5Pall_filters_avail(create_proplist); + assert(all_filters_avail > 0); + hid_t dataset = H5Dcreate(file, "dataset", H5T_NATIVE_DOUBLE, space, + H5P_DEFAULT, create_proplist, H5P_DEFAULT); + assert(dataset >= 0); + double data[10][10][10]; + for (int k=0; k<10; ++k) { + for (int j=0; j<10; ++j) { + for (int i=0; i<10; ++i) { + data[k][j][i] = 1.0 / (1.0 + i + j + k); + } + } + } + herr = H5Dwrite(dataset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, + &data[0][0][0]); + assert(herr >= 0); + herr = H5Pclose(create_proplist); + assert(herr >= 0); + herr = H5Dclose(dataset); + assert(herr >= 0); + herr = H5Sclose(space); + assert(herr >= 0); + herr = H5Fclose(file); + assert(herr >= 0); + printf("Done.\n"); + return 0; +} +""" + expected = """\ +Done. +""" + with open("check.c", "w") as f: + f.write(source) + if "+mpi" in spec["hdf5"]: + cc = which("mpicc") + else: + cc = which("cc") + # TODO: Automate these path and library settings + cc("-c", "-I%s" % spec["hdf5"].prefix.include, "check.c") + cc("-o", "check", "check.o", + "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") + try: + check = Executable("./check") + output = check(return_output=True) + except: + output = "" + success = output == expected + if not success: + print "Produced output does not match expected output." + print "Expected output:" + print "-" * 80 + print expected + print "-" * 80 + print "Produced output:" + print "-" * 80 + print output + print "-" * 80 + print "Environment:" + env = which("env") + env() + raise RuntimeError("HDF5 Blosc plugin check failed") + shutil.rmtree(checkdir) + + def setup_environment(self, spack_env, run_env): + spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) + run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) + run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index e46f432be5..aedaf18218 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -40,19 +40,22 @@ class Hdf5(Package): version('1.10.0-patch1', '9180ff0ef8dc2ef3f61bd37a7404f295') version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') - version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True) + version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') - variant('debug', default=False, description='Builds a debug version of the library') - variant('shared', default=True, description='Builds a shared version of the library') + variant('debug', default=False, + description='Builds a debug version of the library') + variant('shared', default=True, + description='Builds a shared version of the library') variant('cxx', default=True, description='Enable C++ support') variant('fortran', default=True, description='Enable Fortran support') variant('mpi', default=False, description='Enable MPI support') variant('szip', default=False, description='Enable szip support') - variant('threadsafe', default=False, description='Enable thread-safe capabilities') + variant('threadsafe', default=False, + description='Enable thread-safe capabilities') depends_on("mpi", when='+mpi') depends_on("szip", when='+szip') @@ -70,7 +73,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 +168,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 +189,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/hmmer/package.py b/var/spack/repos/builtin/packages/hmmer/package.py new file mode 100644 index 0000000000..6a236e9fc9 --- /dev/null +++ b/var/spack/repos/builtin/packages/hmmer/package.py @@ -0,0 +1,76 @@ +############################################################################## +# 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 Hmmer(Package): + """HMMER is used for searching sequence databases for sequence homologs, + and for making sequence alignments. It implements methods using + probabilistic models called profile hidden Markov models (profile HMMs). + """ + homepage = 'http://www.hmmer.org' + url = 'http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2.tar.gz' + + version('3.1b2', 'c8c141018bc0ccd7fc37b33f2b945d5f') + version('3.0', '4cf685f3bc524ba5b5cdaaa070a83588') + version('2.4i', 'dab234c87e026ac1de942450750acd20') + version('2.3.2', '5f073340c0cf761288f961a73821228a') + version('2.3.1', 'c724413e5761c630892506698a4716e2') + + variant('mpi', default=True, description='Compile with MPI') + variant('gsl', default=False, description='Compile with GSL') + + depends_on('mpi', when='+mpi') + depends_on('gsl', when='+gsl') + + def url_for_version(self, version): + base_url = 'http://eddylab.org/software' + + if version >= Version('3.0'): + return '{0}/hmmer3/{1}/hmmer-{1}.tar.gz'.format(base_url, version) + else: + return '{0}/hmmer/{1}/hmmer-{1}.tar.gz'.format(base_url, version) + + def install(self, spec, prefix): + configure_args = [ + '--prefix={0}'.format(prefix) + ] + + if '+gsl' in self.spec: + configure_args.extend([ + '--with-gsl', + 'LIBS=-lgsl -lgslcblas' + ]) + + if '+mpi' in self.spec: + configure_args.append('--enable-mpi') + + configure(*configure_args) + make() + + if self.run_tests: + make('check') + + make('install') diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py index 90d5107e3b..79e99e7b89 100644 --- a/var/spack/repos/builtin/packages/hoomd-blue/package.py +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -25,6 +25,7 @@ from spack import * import os + class HoomdBlue(Package): """HOOMD-blue is a general-purpose particle simulation toolkit. It scales from a single CPU core to thousands of GPUs. @@ -45,18 +46,18 @@ class HoomdBlue(Package): variant('doc', default=True, description='Generate documentation') extends('python') - depends_on('py-numpy') + depends_on('py-numpy', type=nolink) depends_on('boost+python') - depends_on('cmake') + depends_on('cmake', type='build') depends_on('mpi', when='+mpi') depends_on('cuda', when='+cuda') - depends_on('doxygen', when='+doc') + depends_on('doxygen', when='+doc', type='build') def install(self, spec, prefix): cmake_args = [ '-DPYTHON_EXECUTABLE=%s/python' % spec['python'].prefix.bin, - '-DBOOST_ROOT=%s' % spec['boost' ].prefix + '-DBOOST_ROOT=%s' % spec['boost'].prefix ] # MPI support @@ -73,9 +74,9 @@ class HoomdBlue(Package): cmake_args.append('-DENABLE_CUDA=OFF') # CUDA-aware MPI library support - #if '+cuda' in spec and '+mpi' in spec: + # if '+cuda' in spec and '+mpi' in spec: # cmake_args.append('-DENABLE_MPI_CUDA=ON') - #else: + # else: # cmake_args.append('-DENABLE_MPI_CUDA=OFF') # There may be a bug in the MPI-CUDA code. See: diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py new file mode 100644 index 0000000000..efd5c8bb1d --- /dev/null +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -0,0 +1,119 @@ +############################################################################## +# 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 +import platform + + +class Hpl(Package): + """HPL is a software package that solves a (random) dense linear system + in double precision (64 bits) arithmetic on distributed-memory computers. + It can thus be regarded as a portable as well as freely available + implementation of the High Performance Computing Linpack Benchmark.""" + + homepage = "http://www.netlib.org/benchmark/hpl/" + url = "http://www.netlib.org/benchmark/hpl/hpl-2.2.tar.gz" + + version('2.2', '0eb19e787c3dc8f4058db22c9e0c5320') + + variant('openmp', default=False, description='Enable OpenMP support') + + depends_on('mpi@1.1:') + depends_on('blas') + + parallel = False + + def configure(self, spec, arch): + # List of configuration options + # Order is important + config = [] + + # OpenMP support + if '+openmp' in spec: + config.append( + 'OMP_DEFS = {0}'.format(self.compiler.openmp_flag) + ) + + config.extend([ + # Shell + 'SHELL = /bin/sh', + 'CD = cd', + 'CP = cp', + 'LN_S = ln -fs', + 'MKDIR = mkdir -p', + 'RM = /bin/rm -f', + 'TOUCH = touch', + # Platform identifier + 'ARCH = {0}'.format(arch), + # HPL Directory Structure / HPL library + 'TOPdir = {0}'.format(os.getcwd()), + 'INCdir = $(TOPdir)/include', + 'BINdir = $(TOPdir)/bin/$(ARCH)', + 'LIBdir = $(TOPdir)/lib/$(ARCH)', + 'HPLlib = $(LIBdir)/libhpl.a', + # Message Passing library (MPI) + 'MPinc = -I{0}'.format(spec['mpi'].prefix.include), + 'MPlib = -L{0}'.format(spec['mpi'].prefix.lib), + # Linear Algebra library (BLAS or VSIPL) + 'LAinc = {0}'.format(spec['blas'].prefix.include), + 'LAlib = {0}'.format(spec['blas'].blas_shared_lib), + # F77 / C interface + 'F2CDEFS = -DAdd_ -DF77_INTEGER=int -DStringSunStyle', + # HPL includes / libraries / specifics + 'HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) ' + + '-I$(LAinc) -I$(MPinc)', + 'HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib)', + 'HPL_OPTS = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT', + 'HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)', + # Compilers / linkers - Optimization flags + 'CC = {0}'.format(spec['mpi'].mpicc), + 'CCNOOPT = $(HPL_DEFS)', + 'CCFLAGS = $(HPL_DEFS) -O3', + 'LINKER = $(CC)', + 'LINKFLAGS = $(CCFLAGS) $(OMP_DEFS)', + 'ARCHIVER = ar', + 'ARFLAGS = r', + 'RANLIB = echo' + ]) + + # Write configuration options to include file + with open('Make.{0}'.format(arch), 'w') as makefile: + for var in config: + makefile.write('{0}\n'.format(var)) + + def install(self, spec, prefix): + # Arch used for file naming purposes only + arch = '{0}-{1}'.format(platform.system(), platform.processor()) + + # Generate Makefile include + self.configure(spec, arch) + + make('arch={0}'.format(arch)) + + # Manual installation + install_tree(join_path('bin', arch), prefix.bin) + install_tree(join_path('lib', arch), prefix.lib) + install_tree(join_path('include', arch), prefix.include) + install_tree('man', prefix.man) diff --git a/var/spack/repos/builtin/packages/hpx5/package.py b/var/spack/repos/builtin/packages/hpx5/package.py index cd0c0b7a7b..686e959719 100644 --- a/var/spack/repos/builtin/packages/hpx5/package.py +++ b/var/spack/repos/builtin/packages/hpx5/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Hpx5(Package): """The HPX-5 Runtime System. HPX-5 (High Performance ParalleX) is an open source, portable, performance-oriented runtime developed at diff --git a/var/spack/repos/builtin/packages/htslib/package.py b/var/spack/repos/builtin/packages/htslib/package.py new file mode 100644 index 0000000000..1a8b8fd2f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/htslib/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 Htslib(Package): + """C library for high-throughput sequencing data formats.""" + + homepage = "https://github.com/samtools/htslib" + url = "https://github.com/samtools/htslib/releases/download/1.3.1/htslib-1.3.1.tar.bz2" + + version('1.3.1', '16d78f90b72f29971b042e8da8be6843') + + depends_on('zlib') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index ee0168c38e..c163628840 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Hwloc(Package): """The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py index 3d56056022..eee346ba49 100644 --- a/var/spack/repos/builtin/packages/hydra/package.py +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Hydra(Package): """Hydra is a process management system for starting parallel jobs. Hydra is designed to natively work with existing launcher daemons @@ -37,7 +38,6 @@ class Hydra(Package): version('3.2', '4d670916695bf7e3a869cc336a881b39') - def install(self, spec, prefix): configure('--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index f87dae9f4e..fdc236dcf4 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -23,7 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os, sys +import os +import sys + class Hypre(Package): """Hypre is a library of high performance preconditioners that @@ -37,30 +39,37 @@ class Hypre(Package): version('2.10.0b', '768be38793a35bb5d055905b271f5b8e') # hypre does not know how to build shared libraries on Darwin - variant('shared', default=sys.platform!='darwin', description="Build shared library version (disables static library)") + variant('shared', default=(sys.platform != 'darwin'), + description="Build shared library (disables static library)") # SuperluDist have conflicting headers with those in Hypre - variant('internal-superlu', default=True, description="Use internal Superlu routines") + variant('internal-superlu', default=True, + description="Use internal Superlu routines") depends_on("mpi") depends_on("blas") depends_on("lapack") def install(self, spec, prefix): - blas_dir = spec['blas'].prefix - lapack_dir = spec['lapack'].prefix - mpi_dir = spec['mpi'].prefix - - os.environ['CC'] = os.path.join(mpi_dir, 'bin', 'mpicc') - os.environ['CXX'] = os.path.join(mpi_dir, 'bin', 'mpicxx') - os.environ['F77'] = os.path.join(mpi_dir, 'bin', 'mpif77') - + os.environ['CC'] = spec['mpi'].mpicc + os.environ['CXX'] = spec['mpi'].mpicxx + os.environ['F77'] = spec['mpi'].mpif77 + # Since +shared does not build on macOS and also Atlas does not have + # a single static lib to build against, link against shared libs with + # a hope that --whole-archive linker option (or alike) was used + # to command the linker to include whole static libs' content into the + # shared lib + # Note: --with-(lapack|blas)_libs= needs space separated list of names configure_args = [ - "--prefix=%s" % prefix, - "--with-lapack-libs=lapack", - "--with-lapack-lib-dirs=%s/lib" % lapack_dir, - "--with-blas-libs=blas", - "--with-blas-lib-dirs=%s/lib" % blas_dir] + '--prefix=%s' % prefix, + '--with-lapack-libs=%s' % to_lib_name( + spec['lapack'].lapack_shared_lib), + '--with-lapack-lib-dirs=%s' % spec['lapack'].prefix.lib, + '--with-blas-libs=%s' % to_lib_name( + spec['blas'].blas_shared_lib), + '--with-blas-lib-dirs=%s' % spec['blas'].prefix.lib + ] + if '+shared' in self.spec: configure_args.append("--enable-shared") @@ -76,4 +85,12 @@ class Hypre(Package): configure(*configure_args) make() + if self.run_tests: + make("check") + make("test") + Executable(join_path('test', 'ij'))() + sstruct = Executable(join_path('test', 'struct')) + sstruct() + sstruct('-in', 'test/sstruct.in.default', '-solver', '40', + '-rhsone') make("install") diff --git a/var/spack/repos/builtin/packages/ibmisc/package.py b/var/spack/repos/builtin/packages/ibmisc/package.py new file mode 100644 index 0000000000..736886df96 --- /dev/null +++ b/var/spack/repos/builtin/packages/ibmisc/package.py @@ -0,0 +1,55 @@ +from spack import * + + +class Ibmisc(CMakePackage): + """Misc. reusable utilities used by IceBin.""" + + homepage = "https://github.com/citibeth/ibmisc" + url = "https://github.com/citibeth/ibmisc/tarball/123" + + version('0.1.0', '12f2a32432a11db48e00217df18e59fa') + + variant('everytrace', default=False, + description='Report errors through Everytrace') + variant('proj', default=True, + description='Compile utilities for PROJ.4 library') + variant('blitz', default=True, + description='Compile utilities for Blitz library') + variant('netcdf', default=True, + description='Compile utilities for NetCDF library') + variant('boost', default=True, + description='Compile utilities for Boost library') + variant('udunits2', default=True, + description='Compile utilities for UDUNITS2 library') + variant('googletest', default=True, + description='Compile utilities for Google Test library') + variant('python', default=True, + description='Compile utilities for use with Python/Cython') + + extends('python') + + depends_on('eigen') + depends_on('everytrace', when='+everytrace') + depends_on('proj', when='+proj') + depends_on('blitz', when='+blitz') + depends_on('netcdf-cxx4', when='+netcdf') + depends_on('udunits2', when='+udunits2') + depends_on('googletest', when='+googletest', type='build') + depends_on('py-cython', when='+python', type=nolink) + depends_on('py-numpy', when='+python', type=nolink) + depends_on('boost', when='+boost') + + # Build dependencies + depends_on('cmake', type='build') + depends_on('doxygen', type='build') + + def configure_args(self): + spec = self.spec + return [ + '-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'), + '-DUSE_PROJ4=%s' % ('YES' if '+proj' in spec else 'NO'), + '-DUSE_BLITZ=%s' % ('YES' if '+blitz' in spec else 'NO'), + '-DUSE_NETCDF=%s' % ('YES' if '+netcdf' in spec else 'NO'), + '-DUSE_BOOST=%s' % ('YES' if '+boost' in spec else 'NO'), + '-DUSE_UDUNITS2=%s' % ('YES' if '+udunits2' in spec else 'NO'), + '-DUSE_GTEST=%s' % ('YES' if '+googletest' in spec else 'NO')] diff --git a/var/spack/repos/builtin/packages/icu/package.py b/var/spack/repos/builtin/packages/icu/package.py index c7cabb5d95..b8d366b905 100644 --- a/var/spack/repos/builtin/packages/icu/package.py +++ b/var/spack/repos/builtin/packages/icu/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Icu(Package): """The International Components for Unicode (ICU) package is a mature, widely used set of C/C++ libraries providing Unicode and @@ -36,12 +37,10 @@ class Icu(Package): version('54.1', 'e844caed8f2ca24c088505b0d6271bc0') - def url_for_version(self, version): return "http://download.icu-project.org/files/icu4c/%s/icu4c-%s-src.tgz" % ( version, str(version).replace('.', '_')) - def install(self, spec, prefix): with working_dir("source"): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py index 6cfec99c3f..2bcf86cd13 100644 --- a/var/spack/repos/builtin/packages/icu4c/package.py +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -24,9 +24,12 @@ ############################################################################## from spack import * + class Icu4c(Package): - """ICU is a mature, widely used set of C/C++ and Java libraries - providing Unicode and Globalization support for software applications.""" + """ICU is a mature, widely used set of C/C++ and Java libraries providing + Unicode and Globalization support for software applications. + + """ homepage = "http://site.icu-project.org/" url = "http://downloads.sourceforge.net/project/icu/ICU4C/54.1/icu4c-54_1-src.tgz" diff --git a/var/spack/repos/builtin/packages/ilmbase/package.py b/var/spack/repos/builtin/packages/ilmbase/package.py new file mode 100644 index 0000000000..873c830623 --- /dev/null +++ b/var/spack/repos/builtin/packages/ilmbase/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 Ilmbase(Package): + """OpenEXR ILM Base libraries (high dynamic-range image file format)""" + + homepage = "http://www.openexr.com/" + url = "http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.0.tar.gz" + + version('2.2.0', 'b540db502c5fa42078249f43d18a4652') + version('2.1.0', 'af1115f4d759c574ce84efcde9845d29') + version('2.0.1', '74c0d0d2873960bd0dc1993f8e03f0ae') + version('1.0.2', '26c133ee8ca48e1196fbfb3ffe292ab4') + version('0.9.0', '4df45f8116cb7a013b286caf6da30a2e') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + make('install') diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py new file mode 100644 index 0000000000..65db3351a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -0,0 +1,299 @@ +from spack import * +import os +import re + +from spack.pkg.builtin.intel import IntelInstaller, filter_pick, \ + get_all_components + + +class IntelParallelStudio(IntelInstaller): + """Intel Parallel Studio. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" + + # TODO: can also try the online installer (will download files on demand) + version('composer.2016.2', '1133fb831312eb519f7da897fec223fa', + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" + % os.getcwd()) + version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + version('composer.2016.3', '3208eeabee951fc27579177b593cefe9', + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" + % os.getcwd()) + version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3', + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3', + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + + variant('rpath', default=True, description="Add rpath to .cfg files") + variant('newdtags', default=False, + description="Allow use of --enable-new-dtags in MPI wrappers") + variant('all', default=False, + description="Install all files with the requested edition") + variant('mpi', default=True, + description="Install the Intel MPI library and ITAC tool") + variant('mkl', default=True, description="Install the Intel MKL library") + variant('daal', + default=True, description="Install the Intel DAAL libraries") + variant('ipp', default=True, description="Install the Intel IPP libraries") + variant('tools', default=True, description="Install the Intel Advisor, " + "VTune Amplifier, and Inspector tools") + + provides('mpi', when='@cluster:+mpi') + provides('mkl', when='+mkl') + provides('daal', when='+daal') + provides('ipp', when='+ipp') + + # virtual dependency + provides('blas', when='+mkl') + provides('lapack', when='+mkl') + # TODO: MKL also provides implementation of Scalapack. + + def check_variants(self, spec): + error_message = '\t{variant} can not be turned off if "+all" is set' + + if self.spec.satisfies('+all'): + errors = [error_message.format(variant=x) + for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools') + if ('~' + x) in self.spec] + if errors: + errors = ['incompatible variants given'] + errors + raise InstallError('\n'.join(errors)) + + def install(self, spec, prefix): + self.check_variants(spec) + + base_components = "ALL" # when in doubt, install everything + mpi_components = "" + mkl_components = "" + daal_components = "" + ipp_components = "" + + if not spec.satisfies('+all'): + all_components = get_all_components() + regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' + base_components = \ + filter_pick(all_components, re.compile(regex).search) + regex = '(icsxe|imb|mpi|itac|intel-ta|intel-tc|clck)' + mpi_components = \ + filter_pick(all_components, re.compile(regex).search) + mkl_components = \ + filter_pick(all_components, re.compile('(mkl)').search) + daal_components = \ + filter_pick(all_components, re.compile('(daal)').search) + ipp_components = \ + filter_pick(all_components, re.compile('(ipp)').search) + regex = '(gdb|vtune|inspector|advisor)' + tool_components = \ + filter_pick(all_components, re.compile(regex).search) + components = base_components + + if not spec.satisfies('+all'): + if spec.satisfies('+mpi'): + components += mpi_components + if spec.satisfies('+mkl'): + components += mkl_components + if spec.satisfies('+daal'): + components += daal_components + if spec.satisfies('+ipp'): + components += ipp_components + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or + spec.satisfies('@professional')): + components += tool_components + + if spec.satisfies('+all'): + self.intel_components = 'ALL' + else: + self.intel_components = ';'.join(components) + IntelInstaller.install(self, spec, prefix) + + absbindir = os.path.dirname( + os.path.realpath(os.path.join(self.prefix.bin, "icc"))) + abslibdir = os.path.dirname( + os.path.realpath(os.path.join( + self.prefix.lib, "intel64", "libimf.a"))) + + os.symlink(self.global_license_file, os.path.join(absbindir, + "license.lic")) + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or + spec.satisfies('@professional')): + os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses")) + os.symlink(self.global_license_file, os.path.join( + self.prefix, "inspector_xe/licenses", "license.lic")) + os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses")) + os.symlink(self.global_license_file, os.path.join( + self.prefix, "advisor_xe/licenses", "license.lic")) + os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses")) + os.symlink(self.global_license_file, os.path.join( + self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) + + if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \ + spec.satisfies('@cluster'): + for ifile in os.listdir(os.path.join(self.prefix, "itac")): + if os.path.isdir(os.path.join(self.prefix, "itac", ifile)): + os.symlink(self.global_license_file, + os.path.join(self.prefix, "itac", ifile, + "license.lic")) + if os.path.isdir(os.path.join(self.prefix, "itac", + ifile, "intel64")): + os.symlink(self.global_license_file, + os.path.join(self.prefix, "itac", + ifile, "intel64", + "license.lic")) + if spec.satisfies('~newdtags'): + wrappers = ["mpif77", "mpif77", "mpif90", "mpif90", + "mpigcc", "mpigcc", "mpigxx", "mpigxx", + "mpiicc", "mpiicc", "mpiicpc", "mpiicpc", + "mpiifort", "mpiifort"] + wrapper_paths = [] + for root, dirs, files in os.walk(spec.prefix): + for name in files: + if name in wrappers: + wrapper_paths.append(os.path.join(spec.prefix, + root, name)) + for wrapper in wrapper_paths: + filter_file(r'-Xlinker --enable-new-dtags', r' ', + wrapper) + + if spec.satisfies('+rpath'): + for compiler_command in ["icc", "icpc", "ifort"]: + cfgfilename = os.path.join(absbindir, "%s.cfg" % + compiler_command) + with open(cfgfilename, "w") as f: + f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir) + + os.symlink(os.path.join(self.prefix.man, "common", "man1"), + os.path.join(self.prefix.man, "man1")) + + def setup_dependent_package(self, module, dspec): + # For now use Single Dynamic Library: + # To set the threading layer at run time, use the + # mkl_set_threading_layer function or set MKL_THREADING_LAYER + # variable to one of the following values: INTEL, SEQUENTIAL, PGI. + # To set interface layer at run time, use the mkl_set_interface_layer + # function or set the MKL_INTERFACE_LAYER variable to LP64 or ILP64. + + # Otherwise one would need to specify several libraries + # (e.g. mkl_intel_lp64;mkl_sequential;mkl_core), which reflect + # different interface and threading layers. + + name = 'libmkl_rt.%s' % dso_suffix + libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib) + + self.spec.blas_shared_lib = join_path(libdir, name) + self.spec.lapack_shared_lib = self.spec.blas_shared_lib + + def setup_environment(self, spack_env, run_env): + # TODO: Determine variables needed for the professional edition. + + major_ver = self.version[1] + + # Remove paths that were guessed but are incorrect for this package. + run_env.remove_path('LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('CPATH', + join_path(self.prefix, 'include')) + + # Add the default set of variables + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'tbb', 'include')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', 'mic')) + + if self.spec.satisfies('+all'): + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), + 'libipt', 'intel64', 'lib')) + run_env.set('GDBSERVER_MIC', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), 'gdb', + 'targets', 'mic', 'bin', 'gdbserver')) + run_env.set('GDB_CROSS', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), + 'gdb', 'intel64_mic', 'bin', 'gdb-mic')) + run_env.set('MPM_LAUNCHER', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), 'mpm', + 'mic', + 'bin', 'start_mpm.sh')) + run_env.set('INTEL_PYTHONHOME', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), 'python', + 'intel64')) + + if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')): + # Only I_MPI_ROOT is set here because setting the various PATH + # variables will potentially be in conflict with other MPI + # environment modules. The I_MPI_ROOT environment variable can be + # used as a base to set necessary PATH variables for using Intel + # MPI. It is also possible to set the variables in the modules.yaml + # file if Intel MPI is the dominant, or only, MPI on a system. + run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi')) + + if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'): + spack_env.set('MKLROOT', self.prefix) + + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'mkl', 'lib', + 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'mkl', 'lib', + 'intel64')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'mkl', 'include')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'mkl', 'lib', 'mic')) + run_env.set('MKLROOT', join_path(self.prefix, 'mkl')) + + if self.spec.satisfies('+all') or self.spec.satisfies('+daal'): + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'daal', 'lib', + 'intel64_lin')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'daal', 'lib', + 'intel64_lin')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'daal', 'include')) + run_env.prepend_path('CLASSPATH', + join_path(self.prefix, 'daal', 'lib', + 'daal.jar')) + run_env.set('DAALROOT', join_path(self.prefix, 'daal')) + + if self.spec.satisfies('+all') or self.spec.satisfies('+ipp'): + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'ipp', 'lib', + 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'ipp', 'lib', + 'intel64')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'ipp', 'include')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'ipp', 'lib', 'mic')) + run_env.set('IPPROOT', join_path(self.prefix, 'ipp')) diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py new file mode 100644 index 0000000000..26134a12ae --- /dev/null +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -0,0 +1,152 @@ +from spack import * +import os +import re + + +def filter_pick(input_list, regex_filter): + """Returns the items in input_list that are found in the regex_filter""" + return [l for l in input_list for m in (regex_filter(l),) if m] + + +def unfilter_pick(input_list, regex_filter): + """Returns the items in input_list that are not found in the + regex_filter""" + return [l for l in input_list for m in (regex_filter(l),) if not m] + + +def get_all_components(): + """Returns a list of all the components associated with the downloaded + Intel package""" + all_components = [] + with open("pset/mediaconfig.xml", "r") as f: + lines = f.readlines() + for line in lines: + if line.find('<Abbr>') != -1: + component = line[line.find('<Abbr>') + 6:line.find('</Abbr>')] + all_components.append(component) + return all_components + + +class IntelInstaller(Package): + """Base package containing common methods for installing Intel software""" + + homepage = "https://software.intel.com/en-us" + intel_components = "ALL" + license_required = True + license_comment = '#' + license_files = ['Licenses/license.lic'] + license_vars = ['INTEL_LICENSE_FILE'] + license_url = \ + 'https://software.intel.com/en-us/articles/intel-license-manager-faq' + + @property + def global_license_file(self): + """Returns the path where a global license file should be stored.""" + if not self.license_files: + return + return join_path(self.global_license_dir, "intel", + os.path.basename(self.license_files[0])) + + def install(self, spec, prefix): + + if not hasattr(self, "intel_prefix"): + self.intel_prefix = self.prefix + + silent_config_filename = 'silent.cfg' + with open(silent_config_filename, 'w') as f: + f.write(""" +ACCEPT_EULA=accept +PSET_MODE=install +CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes +PSET_INSTALL_DIR=%s +NONRPM_DB_DIR=%s +ACTIVATION_LICENSE_FILE=%s +ACTIVATION_TYPE=license_file +PHONEHOME_SEND_USAGE_DATA=no +CONTINUE_WITH_OPTIONAL_ERROR=yes +COMPONENTS=%s +""" % (self.intel_prefix, self.intel_prefix, self.global_license_file, + self.intel_components)) + + install_script = Executable("./install.sh") + install_script('--silent', silent_config_filename) + + +class Intel(IntelInstaller): + """Intel Compilers. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" + + # TODO: can also try the online installer (will download files on demand) + version('16.0.2', '1133fb831312eb519f7da897fec223fa', + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" + % os.getcwd()) + version('16.0.3', '3208eeabee951fc27579177b593cefe9', + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" + % os.getcwd()) + + variant('rpath', default=True, description="Add rpath to .cfg files") + + def install(self, spec, prefix): + components = [] + all_components = get_all_components() + regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' + components = filter_pick(all_components, re.compile(regex).search) + + self.intel_components = ';'.join(components) + IntelInstaller.install(self, spec, prefix) + + absbindir = os.path.split(os.path.realpath(os.path.join( + self.prefix.bin, "icc")))[0] + abslibdir = os.path.split(os.path.realpath(os.path.join( + self.prefix.lib, "intel64", "libimf.a")))[0] + + # symlink or copy? + os.symlink(self.global_license_file, + os.path.join(absbindir, "license.lic")) + + if spec.satisfies('+rpath'): + for compiler_command in ["icc", "icpc", "ifort"]: + cfgfilename = os.path.join(absbindir, "%s.cfg" % + compiler_command) + with open(cfgfilename, "w") as f: + f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir) + + os.symlink(os.path.join(self.prefix.man, "common", "man1"), + os.path.join(self.prefix.man, "man1")) + + def setup_environment(self, spack_env, run_env): + + # Remove paths that were guessed but are incorrect for this package. + run_env.remove_path('LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('CPATH', + join_path(self.prefix, 'include')) + + # Add the default set of variables + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'tbb', 'include')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', 'mic')) diff --git a/var/spack/repos/builtin/packages/intltool/package.py b/var/spack/repos/builtin/packages/intltool/package.py index 48830c474a..e934734691 100644 --- a/var/spack/repos/builtin/packages/intltool/package.py +++ b/var/spack/repos/builtin/packages/intltool/package.py @@ -24,8 +24,12 @@ ############################################################################## from spack import * + class Intltool(Package): - """intltool is a set of tools to centralize translation of many different file formats using GNU gettext-compatible PO files.""" + """intltool is a set of tools to centralize translation of many different + file formats using GNU gettext-compatible PO files. + + """ homepage = 'https://freedesktop.org/wiki/Software/intltool/' version('0.51.0', '12e517cac2b57a0121cda351570f1e63') @@ -37,7 +41,7 @@ class Intltool(Package): def install(self, spec, prefix): # configure, build, install: - options = ['--prefix=%s' % prefix ] + options = ['--prefix=%s' % prefix] configure(*options) make() make('install') diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index 6aa72e5cc9..b8825c0fe4 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Ior(Package): """The IOR software is used for benchmarking parallel file systems using POSIX, MPI-IO, or HDF5 interfaces.""" @@ -41,7 +42,6 @@ class Ior(Package): depends_on('hdf5+mpi', when='+hdf5') depends_on('netcdf+mpi', when='+ncmpi') - def install(self, spec, prefix): os.system('./bootstrap') diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py index 47c5ca0c09..d5981e9975 100644 --- a/var/spack/repos/builtin/packages/ipopt/package.py +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Ipopt(Package): """Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a software package for large-scale nonlinear optimization.""" @@ -38,9 +39,9 @@ class Ipopt(Package): depends_on("blas") depends_on("lapack") - depends_on("pkg-config") - depends_on("mumps+double~mpi") - + depends_on("pkg-config", type='build') + depends_on("mumps+double~mpi") + def install(self, spec, prefix): # Dependency directories blas_dir = spec['blas'].prefix @@ -55,7 +56,7 @@ class Ipopt(Package): # By convention, spack links blas & lapack libs to libblas & liblapack blas_lib = "-L%s" % blas_dir.lib + " -lblas" lapack_lib = "-L%s" % lapack_dir.lib + " -llapack" - + configure_args = [ "--prefix=%s" % prefix, "--with-mumps-incdir=%s" % mumps_dir.include, @@ -65,8 +66,8 @@ class Ipopt(Package): "--with-blas-lib=%s" % blas_lib, "--with-lapack-incdir=%s" % lapack_dir.include, "--with-lapack-lib=%s" % lapack_lib - ] - + ] + configure(*configure_args) # IPOPT does not build correctly in parallel on OS X diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/ipp/package.py new file mode 100644 index 0000000000..2bd931d5bd --- /dev/null +++ b/var/spack/repos/builtin/packages/ipp/package.py @@ -0,0 +1,26 @@ +from spack import * +import os + +from spack.pkg.builtin.intel import IntelInstaller + + +class Ipp(IntelInstaller): + """Intel Integrated Performance Primitives. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-ipp" + + version('9.0.3.210', '0e1520dd3de7f811a6ef6ebc7aa429a3', + url="file://%s/l_ipp_9.0.3.210.tgz" % os.getcwd()) + + def install(self, spec, prefix): + + self.intel_prefix = os.path.join(prefix, "pkg") + IntelInstaller.install(self, spec, prefix) + + ipp_dir = os.path.join(self.intel_prefix, "ipp") + for f in os.listdir(ipp_dir): + os.symlink(os.path.join(ipp_dir, f), os.path.join(self.prefix, f)) diff --git a/var/spack/repos/builtin/packages/isl/package.py b/var/spack/repos/builtin/packages/isl/package.py index f456f62225..259f4881f5 100644 --- a/var/spack/repos/builtin/packages/isl/package.py +++ b/var/spack/repos/builtin/packages/isl/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Isl(Package): """isl is a thread-safe C library for manipulating sets and relations of integer points bounded by affine constraints.""" diff --git a/var/spack/repos/builtin/packages/jasper/fix_alpha_channel_assert_fail.patch b/var/spack/repos/builtin/packages/jasper/fix_alpha_channel_assert_fail.patch new file mode 100644 index 0000000000..cbf79ff971 --- /dev/null +++ b/var/spack/repos/builtin/packages/jasper/fix_alpha_channel_assert_fail.patch @@ -0,0 +1,25 @@ +diff --git a/src/libjasper/jpc/jpc_dec.c b/src/libjasper/jpc/jpc_dec.c +index fa72a0e..1f4845f 100644 +--- a/src/libjasper/jpc/jpc_dec.c ++++ b/src/libjasper/jpc/jpc_dec.c +@@ -1069,12 +1069,18 @@ static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile) + /* Apply an inverse intercomponent transform if necessary. */ + switch (tile->cp->mctid) { + case JPC_MCT_RCT: +- assert(dec->numcomps == 3); ++ if (dec->numcomps != 3 && dec->numcomps != 4) { ++ jas_eprintf("bad number of components (%d)\n", dec->numcomps); ++ return -1; ++ } + jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data, + tile->tcomps[2].data); + break; + case JPC_MCT_ICT: +- assert(dec->numcomps == 3); ++ if (dec->numcomps != 3 && dec->numcomps != 4) { ++ jas_eprintf("bad number of components (%d)\n", dec->numcomps); ++ return -1; ++ } + jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data, + tile->tcomps[2].data); + break; diff --git a/var/spack/repos/builtin/packages/jasper/package.py b/var/spack/repos/builtin/packages/jasper/package.py new file mode 100644 index 0000000000..f450c7d155 --- /dev/null +++ b/var/spack/repos/builtin/packages/jasper/package.py @@ -0,0 +1,63 @@ +############################################################################## +# 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 Jasper(Package): + """Library for manipulating JPEG-2000 images""" + + homepage = "https://www.ece.uvic.ca/~frodo/jasper/" + url = "https://www.ece.uvic.ca/~frodo/jasper/software/jasper-1.900.1.zip" + + version('1.900.1', 'a342b2b4495b3e1394e161eb5d85d754') + + variant('shared', default=True, + description='Builds shared versions of the libraries') + variant('debug', default=False, + description='Builds debug versions of the libraries') + + depends_on('libjpeg-turbo') + + # Fixes a bug (still in upstream as of v.1.900.1) where an assertion fails + # when certain JPEG-2000 files with an alpha channel are processed + # see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786 + patch('fix_alpha_channel_assert_fail.patch') + + def install(self, spec, prefix): + configure_options = [ + '--prefix={0}'.format(prefix), + '--mandir={0}'.format(spec.prefix.man), + ] + + if '+shared' in spec: + configure_options.append('--enable-shared') + + if '+debug' not in spec: + configure_options.append('--disable-debug') + + configure(*configure_options) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index 2ec86f05e3..63bf6514cb 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -22,24 +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 ############################################################################## -#------------------------------------------------------------------------------ +# # Author: Justin Too <too1@llnl.gov> -#------------------------------------------------------------------------------ -import distutils -from distutils import dir_util -from subprocess import call +# +import distutils.dir_util import spack from spack import * import llnl.util.tty as tty + class Jdk(Package): """The Java Development Kit (JDK) released by Oracle Corporation in the form of a binary product aimed at Java developers.""" homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html" version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf', - url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz") + url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz") + version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4', + url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz") # Oracle requires that you accept their License Agreement in order # to access the Java packages in download.oracle.com. In order to @@ -47,9 +48,9 @@ class Jdk(Package): # commandline options. # # See http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux - curl_options=[ - '-j', # junk cookies - '-H', # specify required License Agreement cookie + curl_options = [ + '-j', # junk cookies + '-H', # specify required License Agreement cookie 'Cookie: oraclelicense=accept-securebackup-cookie'] def do_fetch(self, mirror_only=False): @@ -65,6 +66,5 @@ class Jdk(Package): # Now perform the actual fetch super(Jdk, self).do_fetch(mirror_only) - def install(self, spec, prefix): distutils.dir_util.copy_tree(".", prefix) diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py index a67754a513..f5a983b7a9 100644 --- a/var/spack/repos/builtin/packages/jemalloc/package.py +++ b/var/spack/repos/builtin/packages/jemalloc/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class Jemalloc(Package): - """jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support.""" + """jemalloc is a general purpose malloc(3) implementation that emphasizes + fragmentation avoidance and scalable concurrency support.""" homepage = "http://www.canonware.com/jemalloc/" url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2" @@ -36,7 +38,7 @@ class Jemalloc(Package): variant('prof', default=False, description='Enable heap profiling') def install(self, spec, prefix): - configure_args = ['--prefix=%s' % prefix,] + configure_args = ['--prefix=%s' % prefix, ] if '+stats' in spec: configure_args.append('--enable-stats') diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py index e4a9d8535b..594240d950 100644 --- a/var/spack/repos/builtin/packages/jpeg/package.py +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Jpeg(Package): """libjpeg is a widely used free library with functions for handling the JPEG image data format. It implements a JPEG codec (encoding and decoding) diff --git a/var/spack/repos/builtin/packages/judy/package.py b/var/spack/repos/builtin/packages/judy/package.py index 8d47767ef0..8b8b261e53 100644 --- a/var/spack/repos/builtin/packages/judy/package.py +++ b/var/spack/repos/builtin/packages/judy/package.py @@ -24,8 +24,9 @@ ############################################################################## from spack import * + class Judy(Package): - """A general-purpose dynamic array, associative array and hash-trie - Judy""" + """Judy: General-purpose dynamic array, associative array and hash-trie.""" homepage = "http://judy.sourceforge.net/" url = "http://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 69b52130e9..536ce69236 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,23 +33,27 @@ 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: - # depends_on("awk") - # depends_on("m4") - # depends_on("pkg-config") + # depends_on("awk", type='build') + # depends_on("m4", type='build') + # depends_on("pkg-config", type='build') # Combined build-time and run-time dependencies: - depends_on("binutils") - depends_on("cmake @2.8:") - depends_on("git") - depends_on("openssl") - depends_on("python @2.7:2.999") + depends_on("binutils", type=nolink) + depends_on("cmake @2.8:", type=nolink) + depends_on("git", type=nolink) + depends_on("openssl", type=nolink) + depends_on("python @2.7:2.999", type=nolink) # I think that Julia requires the dependencies above, but it # builds fine (on my system) without these. We should enable them @@ -88,29 +93,25 @@ class Julia(Package): # USE_SYSTEM_LIBGIT2=0 # Run-time dependencies for Julia packages: - depends_on("hdf5") - depends_on("mpi") + depends_on("hdf5", type='run') + depends_on("mpi", type='run') 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/kdiff3/package.py b/var/spack/repos/builtin/packages/kdiff3/package.py new file mode 100644 index 0000000000..48f4b9c379 --- /dev/null +++ b/var/spack/repos/builtin/packages/kdiff3/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 Kdiff3(Package): + """Compare and merge 2 or 3 files or directories.""" + homepage = "http://kdiff3.sourceforge.net/" + url = "https://downloads.sourceforge.net/project/kdiff3/kdiff3/0.9.98/kdiff3-0.9.98.tar.gz" + + version('0.9.98', 'b52f99f2cf2ea75ed5719315cbf77446') + + depends_on("qt@5.2.0:") + + def install(self, spec, prefix): + # make is done inside + configure('qt4') + + # there is no make install, bummer... + mkdirp(self.prefix.bin) + install(join_path(self.stage.source_path, 'releaseQt', 'kdiff3'), + self.prefix.bin) diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py index 7c73c4518b..5346fc8cb9 100644 --- a/var/spack/repos/builtin/packages/kealib/package.py +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -24,20 +24,21 @@ ############################################################################## from spack import * + class Kealib(Package): """An HDF5 Based Raster File Format - + KEALib provides an implementation of the GDAL data model. The format supports raster attribute tables, image pyramids, meta-data and in-built statistics while also handling very large files and compression throughout. - + Based on the HDF5 standard, it also provides a base from which other formats can be derived and is a good choice for long term data archiving. An independent software library (libkea) provides complete access to the KEA image format and a GDAL driver allowing KEA images to be used from any GDAL supported software. - + Development work on this project has been funded by Landcare Research. """ homepage = "http://kealib.org/" @@ -51,7 +52,8 @@ class Kealib(Package): with working_dir('trunk', create=False): cmake_args = [] cmake_args.append("-DCMAKE_INSTALL_PREFIX=%s" % prefix) - cmake_args.append("-DHDF5_INCLUDE_DIR=%s" % spec['hdf5'].prefix.include) + cmake_args.append("-DHDF5_INCLUDE_DIR=%s" % + spec['hdf5'].prefix.include) cmake_args.append("-DHDF5_LIB_PATH=%s" % spec['hdf5'].prefix.lib) cmake('.', *cmake_args) diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index d405e9a51d..cf8d2b7e39 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Kripke(Package): """Kripke is a simple, scalable, 3D Sn deterministic particle transport proxy/mini app. diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py index f256810005..d7c96a03d8 100644 --- a/var/spack/repos/builtin/packages/launchmon/package.py +++ b/var/spack/repos/builtin/packages/launchmon/package.py @@ -29,13 +29,13 @@ class Launchmon(Package): """Software infrastructure that enables HPC run-time tools to co-locate tool daemons with a parallel job.""" homepage = "https://github.com/LLNL/LaunchMON" - url = "https://github.com/LLNL/LaunchMON/releases/download/v1.0.2/launchmon-v1.0.2.tar.gz" # NOQA: ignore=E501 + url = "https://github.com/LLNL/LaunchMON/releases/download/v1.0.2/launchmon-v1.0.2.tar.gz" version('1.0.2', '8d6ba77a0ec2eff2fde2c5cc8fa7ff7a') - depends_on('autoconf') - depends_on('automake') - depends_on('libtool') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') def install(self, spec, prefix): configure( diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py index 434d8e6c98..4d3fc59568 100644 --- a/var/spack/repos/builtin/packages/lcms/package.py +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Lcms(Package): """Little cms is a color management library. Implements fast transforms between ICC profiles. It is focused on speed, and is diff --git a/var/spack/repos/builtin/packages/leveldb/package.py b/var/spack/repos/builtin/packages/leveldb/package.py index 408f1d31c1..f571baa1ce 100644 --- a/var/spack/repos/builtin/packages/leveldb/package.py +++ b/var/spack/repos/builtin/packages/leveldb/package.py @@ -22,10 +22,10 @@ # 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 os import glob from spack import * + class Leveldb(Package): """LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.""" diff --git a/var/spack/repos/builtin/packages/libNBC/package.py b/var/spack/repos/builtin/packages/libNBC/package.py index ed1d0ce96f..414498a37a 100644 --- a/var/spack/repos/builtin/packages/libNBC/package.py +++ b/var/spack/repos/builtin/packages/libNBC/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libnbc(Package): """LibNBC is a prototypic implementation of a nonblocking interface for MPI collective operations. Based on ANSI C and 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/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py index f11d732afa..0cf3932957 100644 --- a/var/spack/repos/builtin/packages/libarchive/package.py +++ b/var/spack/repos/builtin/packages/libarchive/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libarchive(Package): """libarchive: C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats.""" diff --git a/var/spack/repos/builtin/packages/libatomic-ops/package.py b/var/spack/repos/builtin/packages/libatomic-ops/package.py new file mode 100644 index 0000000000..0167fbcb33 --- /dev/null +++ b/var/spack/repos/builtin/packages/libatomic-ops/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 LibatomicOps(Package): + """This package provides semi-portable access to hardware-provided + atomic memory update operations on a number architectures.""" + + homepage = "https://github.com/ivmai/libatomic_ops" + url = "http://www.hboehm.info/gc/gc_source/libatomic_ops-7.4.4.tar.gz" + + version('7.4.4', '426d804baae12c372967a6d183e25af2') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix), + '--enable-shared') + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/libcerf/package.py b/var/spack/repos/builtin/packages/libcerf/package.py index b30d76f4e9..7fb47f8dcd 100644 --- a/var/spack/repos/builtin/packages/libcerf/package.py +++ b/var/spack/repos/builtin/packages/libcerf/package.py @@ -27,9 +27,10 @@ from spack import * class Libcerf(Package): - """ - A self-contained C library providing complex error functions, based on Faddeeva's plasma dispersion function - w(z). Also provides Dawson's integral and Voigt's convolution of a Gaussian and a Lorentzian + """A self-contained C library providing complex error functions, based + on Faddeeva's plasma dispersion function w(z). Also provides Dawson's + integral and Voigt's convolution of a Gaussian and a Lorentzian + """ homepage = "http://sourceforge.net/projects/libcerf" url = "http://downloads.sourceforge.net/project/libcerf/libcerf-1.3.tgz" diff --git a/var/spack/repos/builtin/packages/libcircle/package.py b/var/spack/repos/builtin/packages/libcircle/package.py index 75fdb96125..971c29f5f1 100644 --- a/var/spack/repos/builtin/packages/libcircle/package.py +++ b/var/spack/repos/builtin/packages/libcircle/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Libcircle(Package): """libcircle provides an efficient distributed queue on a cluster, using self-stabilizing work stealing.""" @@ -32,7 +32,7 @@ class Libcircle(Package): homepage = "https://github.com/hpc/libcircle" version('0.2.1-rc.1', '2b1369a5736457239f908abf88143ec2', - url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz') + url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz') depends_on('mpi') diff --git a/var/spack/repos/builtin/packages/libctl/package.py b/var/spack/repos/builtin/packages/libctl/package.py new file mode 100644 index 0000000000..53d30ce5c3 --- /dev/null +++ b/var/spack/repos/builtin/packages/libctl/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 Libctl(Package): + """libctl is a free Guile-based library implementing flexible + control files for scientific simulations.""" + + homepage = "http://ab-initio.mit.edu/wiki/index.php/Libctl" + url = "http://ab-initio.mit.edu/libctl/libctl-3.2.2.tar.gz" + + version('3.2.2', '5fd7634dc9ae8e7fa70a68473b9cbb68') + + depends_on('guile') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix), + '--enable-shared', + 'GUILE={0}'.format(join_path( + spec['guile'].prefix.bin, 'guile')), + 'GUILE_CONFIG={0}'.format(join_path( + spec['guile'].prefix.bin, 'guile-config'))) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py index b05412e588..543eab11b3 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -24,12 +24,13 @@ ############################################################################## from spack import * + class Libdrm(Package): """A userspace library for accessing the DRM, direct rendering manager, on Linux, BSD and other operating systems that support the ioctl interface.""" - homepage = "http://dri.freedesktop.org/libdrm/" # no real website... + homepage = "http://dri.freedesktop.org/libdrm/" # no real website... url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz" version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') diff --git a/var/spack/repos/builtin/packages/libedit/package.py b/var/spack/repos/builtin/packages/libedit/package.py index 4366344679..235e7648bc 100644 --- a/var/spack/repos/builtin/packages/libedit/package.py +++ b/var/spack/repos/builtin/packages/libedit/package.py @@ -24,12 +24,14 @@ ############################################################################## from spack import * + class Libedit(Package): """An autotools compatible port of the NetBSD editline library""" homepage = "http://thrysoee.dk/editline/" url = "http://thrysoee.dk/editline/libedit-20150325-3.1.tar.gz" - version('3.1', '43cdb5df3061d78b5e9d59109871b4f6', url="http://thrysoee.dk/editline/libedit-20150325-3.1.tar.gz") + version('3.1', '43cdb5df3061d78b5e9d59109871b4f6', + url="http://thrysoee.dk/editline/libedit-20150325-3.1.tar.gz") depends_on('ncurses') diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py index 1e1deea818..3304d27bdb 100644 --- a/var/spack/repos/builtin/packages/libelf/package.py +++ b/var/spack/repos/builtin/packages/libelf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libelf(Package): """libelf lets you read, modify or create ELF object files in an architecture-independent way. The library takes care of size diff --git a/var/spack/repos/builtin/packages/libepoxy/package.py b/var/spack/repos/builtin/packages/libepoxy/package.py new file mode 100644 index 0000000000..364ea1e30c --- /dev/null +++ b/var/spack/repos/builtin/packages/libepoxy/package.py @@ -0,0 +1,39 @@ +############################################################################## +# 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 Libepoxy(Package): + """Epoxy is a library for handling OpenGL function pointer management for + you.""" + homepage = "https://github.com/anholt/libepoxy" + url = "https://github.com/anholt/libepoxy/releases/download/v1.3.1/libepoxy-1.3.1.tar.bz2" + + version('1.3.1', '96f6620a9b005a503e7b44b0b528287d') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index 3ae427a2eb..65b3a716c0 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -24,11 +24,13 @@ ############################################################################## from spack import * + class Libevent(Package): """The libevent API provides a mechanism to execute a callback function - when a specific event occurs on a file descriptor or after a timeout has been - reached. Furthermore, libevent also support callbacks due to signals or regular - timeouts. + when a specific event occurs on a file descriptor or after a + timeout has been reached. Furthermore, libevent also support + callbacks due to signals or regular timeouts. + """ homepage = "http://libevent.org" @@ -46,7 +48,8 @@ class Libevent(Package): version('2.0.13', 'af786b4b3f790c9d3279792edf7867fc') version('2.0.12', '42986228baf95e325778ed328a93e070') - variant('openssl', default=True, description="Build with encryption enabled at the libevent level.") + variant('openssl', default=True, + description="Build with encryption enabled at the libevent level.") depends_on('openssl', when='+openssl') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index 1d3c85c8e0..fa113ee86c 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -24,18 +24,21 @@ ############################################################################## from spack import * + class Libffi(Package): """The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time.""" homepage = "https://sourceware.org/libffi/" - - version('3.2.1','83b89587607e3eb65c70d361f13bab43',url = "ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") - #version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug $(lib64) instead of ${lib64} in libffi.pc + + version('3.2.1', '83b89587607e3eb65c70d361f13bab43', + url="ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") + # version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = + # "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug + # $(lib64) instead of ${lib64} in libffi.pc def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() make("install") - diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py index b1a316cc1b..b556def4d3 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libgcrypt(Package): """Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptographic diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py index 5e4e420842..acfdebb972 100644 --- a/var/spack/repos/builtin/packages/libgd/package.py +++ b/var/spack/repos/builtin/packages/libgd/package.py @@ -27,11 +27,14 @@ from spack import * class Libgd(Package): - """ - GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and - "wrappers" are available for Perl, PHP and other languages. GD creates PNG, JPEG, GIF, WebP, XPM, BMP images, - among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the - fly. While not restricted to use on the web, the most common applications of GD involve website development. + """GD is an open source code library for the dynamic creation of images + by programmers. GD is written in C, and "wrappers" are available + for Perl, PHP and other languages. GD creates PNG, JPEG, GIF, + WebP, XPM, BMP images, among other formats. GD is commonly used to + generate charts, graphics, thumbnails, and most anything else, on + the fly. While not restricted to use on the web, the most common + applications of GD involve website development. + """ homepage = "https://github.com/libgd/libgd" @@ -40,6 +43,7 @@ class Libgd(Package): version('2.1.1', 'e91a1a99903e460e7ba00a794e72cc1e') depends_on('libpng') + depends_on('cmake', type='build') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/libgpg-error/package.py b/var/spack/repos/builtin/packages/libgpg-error/package.py index 3fe82a69e7..a0e2acd516 100644 --- a/var/spack/repos/builtin/packages/libgpg-error/package.py +++ b/var/spack/repos/builtin/packages/libgpg-error/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class LibgpgError(Package): """Libgpg-error is a small library that defines common error values for all GnuPG components. Among these are GPG, GPGSM, diff --git a/var/spack/repos/builtin/packages/libgtextutils/package.py b/var/spack/repos/builtin/packages/libgtextutils/package.py new file mode 100644 index 0000000000..201e031869 --- /dev/null +++ b/var/spack/repos/builtin/packages/libgtextutils/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 Libgtextutils(Package): + """Gordon's Text utils Library.""" + + homepage = "https://github.com/agordon/libgtextutils" + url = "https://github.com/agordon/libgtextutils/releases/download/0.7/libgtextutils-0.7.tar.gz" + + version('0.7', '593c7c62e3c76ec49f5736eed4f96806') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/libhio/package.py b/var/spack/repos/builtin/packages/libhio/package.py new file mode 100644 index 0000000000..17bd86d310 --- /dev/null +++ b/var/spack/repos/builtin/packages/libhio/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 Libhio(Package): + """ + A library for writing to hierarchical data store systems. + """ + + homepage = "https://github.com/hpc/libhio/" + url = "https://github.com/hpc/libhio/releases/download/hio.1.3.0.1/libhio-1.3.0.1.tar.gz" + + version('1.3.0.1', 'c073541de8dd70aeb8878bd00d6d877f') + + depends_on("libjson-c") + depends_on("bzip2") + depends_on("pkg-config", type="build") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py new file mode 100644 index 0000000000..f2eeb07b26 --- /dev/null +++ b/var/spack/repos/builtin/packages/libiconv/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 Libiconv(Package): + """GNU libiconv provides an implementation of the iconv() function + and the iconv program for character set conversion.""" + + homepage = "https://www.gnu.org/software/libiconv/" + url = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz" + + version('1.14', 'e34509b1623cec449dfeb73d7ce9c6c6') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix), + '--enable-extra-encodings') + + make() + make('check') + make('install') diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index 8615b2ed83..6252a88542 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class LibjpegTurbo(Package): """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG compression and @@ -35,8 +36,8 @@ class LibjpegTurbo(Package): version('1.3.1', '2c3a68129dac443a72815ff5bb374b05') # Can use either of these. - depends_on("yasm") - depends_on("nasm") + depends_on("yasm", type='build') + depends_on("nasm", type='build') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/libjson-c/package.py b/var/spack/repos/builtin/packages/libjson-c/package.py index 75f3e130ad..662ed3cb5a 100644 --- a/var/spack/repos/builtin/packages/libjson-c/package.py +++ b/var/spack/repos/builtin/packages/libjson-c/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class LibjsonC(Package): """ A JSON implementation in C """ homepage = "https://github.com/json-c/json-c/wiki" @@ -34,5 +35,5 @@ class LibjsonC(Package): def install(self, spec, prefix): configure('--prefix=%s' % prefix) - make() + make(parallel=False) make("install") diff --git a/var/spack/repos/builtin/packages/libmng/package.py b/var/spack/repos/builtin/packages/libmng/package.py index dd0903c4bd..a77aada79c 100644 --- a/var/spack/repos/builtin/packages/libmng/package.py +++ b/var/spack/repos/builtin/packages/libmng/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libmng(Package): """libmng -THE reference library for reading, displaying, writing and examining Multiple-Image Network Graphics. MNG is the animation @@ -39,7 +40,8 @@ class Libmng(Package): def patch(self): # jpeg requires stdio to beincluded before its headrs. - filter_file(r'^(\#include \<jpeglib\.h\>)', '#include<stdio.h>\n\\1', 'libmng_types.h') + filter_file(r'^(\#include \<jpeglib\.h\>)', + '#include<stdio.h>\n\\1', 'libmng_types.h') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py index 883d8af405..f680baa265 100644 --- a/var/spack/repos/builtin/packages/libmonitor/package.py +++ b/var/spack/repos/builtin/packages/libmonitor/package.py @@ -24,19 +24,19 @@ ############################################################################## from spack import * + class Libmonitor(Package): """Libmonitor is a library for process and thread control.""" - homepage = "http://hpctoolkit.org" - - version('20130218', svn='http://libmonitor.googlecode.com/svn/trunk/', revision=146) - variant('krellpatch', default=False, description="build with openspeedshop based patch.") - + homepage = "https://github.com/HPCToolkit/libmonitor" + version('20130218', git='https://github.com/HPCToolkit/libmonitor.git', + commit='4f2311e') + variant('krellpatch', default=False, + description="build with openspeedshop based patch.") patch('libmonitorkrell-0000.patch', when='@20130218+krellpatch') patch('libmonitorkrell-0001.patch', when='@20130218+krellpatch') patch('libmonitorkrell-0002.patch', when='@20130218+krellpatch') - def install(self, spec, prefix): configure("--prefix=" + prefix) make() diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py index 42e8711a7d..a65b81b69b 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os.path + class Libpciaccess(Package): """Generic PCI access library.""" @@ -37,7 +37,7 @@ class Libpciaccess(Package): def install(self, spec, prefix): # libpciaccess does not support OS X - if spec.satisfies('arch=darwin-x86_64'): + if spec.satisfies('platform=darwin'): # create a dummy directory mkdir(prefix.lib) return diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index 951b91eabd..1afe4911e6 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libpng(Package): """libpng graphics file format""" homepage = "http://www.libpng.org/pub/png/libpng.html" diff --git a/var/spack/repos/builtin/packages/libpthread-stubs/package.py b/var/spack/repos/builtin/packages/libpthread-stubs/package.py new file mode 100644 index 0000000000..ea36758a83 --- /dev/null +++ b/var/spack/repos/builtin/packages/libpthread-stubs/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 LibpthreadStubs(Package): + """The libpthread-stubs package provides weak aliases for pthread + functions not provided in libc or otherwise available by + default. """ + homepage = "http://xcb.freedesktop.org/" + url = "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2" + + version('0.3', 'e8fa31b42e13f87e8f5a7a2b731db7ee') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libsigsegv/package.py b/var/spack/repos/builtin/packages/libsigsegv/package.py index 14acdcbcd2..715d24bcf7 100644 --- a/var/spack/repos/builtin/packages/libsigsegv/package.py +++ b/var/spack/repos/builtin/packages/libsigsegv/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libsigsegv(Package): """GNU libsigsegv is a library for handling page faults in user mode.""" homepage = "https://www.gnu.org/software/libsigsegv/" diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py index 831a75e659..1c930e21dd 100644 --- a/var/spack/repos/builtin/packages/libsodium/package.py +++ b/var/spack/repos/builtin/packages/libsodium/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libsodium(Package): """Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more.""" diff --git a/var/spack/repos/builtin/packages/libtermkey/package.py b/var/spack/repos/builtin/packages/libtermkey/package.py index c7db959a40..64688505c4 100644 --- a/var/spack/repos/builtin/packages/libtermkey/package.py +++ b/var/spack/repos/builtin/packages/libtermkey/package.py @@ -24,17 +24,17 @@ ############################################################################## from spack import * + class Libtermkey(Package): """Easy keyboard entry processing for terminal programs""" homepage = "http://www.leonerd.org.uk/code/libtermkey/" url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz" - version('0.18' , '3be2e3e5a851a49cc5e8567ac108b520') - version('0.17' , '20edb99e0d95ec1690fe90e6a555ae6d') - version('0.16' , '7a24b675aaeb142d30db28e7554987d4') + version('0.18', '3be2e3e5a851a49cc5e8567ac108b520') + version('0.17', '20edb99e0d95ec1690fe90e6a555ae6d') + version('0.16', '7a24b675aaeb142d30db28e7554987d4') version('0.15b', '27689756e6c86c56ae454f2ac259bc3d') - version('0.14' , 'e08ce30f440f9715c459060e0e048978') - + version('0.14', 'e08ce30f440f9715c459060e0e048978') def install(self, spec, prefix): make() diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py index 4b03e7997b..cef9fcaae5 100644 --- a/var/spack/repos/builtin/packages/libtiff/package.py +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libtiff(Package): """libtiff graphics format library""" homepage = "http://www.remotesensing.org/libtiff/" diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 90e7b3b643..a0070d72d0 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', type='build') - 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/libunistring/package.py b/var/spack/repos/builtin/packages/libunistring/package.py new file mode 100644 index 0000000000..5b8837e72b --- /dev/null +++ b/var/spack/repos/builtin/packages/libunistring/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 Libunistring(Package): + """This library provides functions for manipulating Unicode strings + and for manipulating C strings according to the Unicode standard.""" + + homepage = "https://www.gnu.org/software/libunistring/" + url = "http://ftp.gnu.org/gnu/libunistring/libunistring-0.9.6.tar.xz" + + version('0.9.6', 'cb09c398020c27edac10ca590e9e9ef3') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + + make() + # make('check') # test-verify fails for me, contacted developers + make('install') diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py index 980b765c02..63ab4aec59 100644 --- a/var/spack/repos/builtin/packages/libunwind/package.py +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libunwind(Package): """A portable and efficient C programming interface (API) to determine the call-chain of a program.""" diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py index 0dd32ec77d..553f0dddb8 100644 --- a/var/spack/repos/builtin/packages/libuuid/package.py +++ b/var/spack/repos/builtin/packages/libuuid/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libuuid(Package): """Portable uuid C library""" # FIXME: add a proper url for your package's homepage here. diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py index 63565c7aea..dae10809f2 100644 --- a/var/spack/repos/builtin/packages/libuv/package.py +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libuv(Package): """Multi-platform library with a focus on asynchronous IO""" homepage = "http://libuv.org" @@ -31,9 +32,9 @@ class Libuv(Package): version('1.9.0', '14737f9c76123a19a290dabb7d1cd04c') - depends_on('automake') - depends_on('autoconf') - depends_on('libtool') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + depends_on('libtool', type='build') def install(self, spec, prefix): bash = which("bash") diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py index e57af273ad..2e1ef99b98 100644 --- a/var/spack/repos/builtin/packages/libvterm/package.py +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libvterm(Package): """An abstract library implementation of a terminal emulator""" homepage = "http://www.leonerd.org.uk/code/libvterm/" diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py new file mode 100644 index 0000000000..b9215bc601 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxau/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 Libxau(Package): + """The libXau package contains a library implementing the X11 + Authorization Protocol. This is useful for restricting client + access to the display.""" + homepage = "http://xcb.freedesktop.org/" + url = "http://ftp.x.org/pub/individual/lib/libXau-1.0.8.tar.bz2" + + version('1.0.8', '685f8abbffa6d145c0f930f00703b21b') + + depends_on('xproto') + depends_on('pkg-config', type='build') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py index 87437373d6..9ea4d1c326 100644 --- a/var/spack/repos/builtin/packages/libxc/package.py +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libxc(Package): """Libxc is a library of exchange-correlation functionals for density-functional theory.""" @@ -33,7 +34,6 @@ class Libxc(Package): version('2.2.2', 'd9f90a0d6e36df6c1312b6422280f2ec') - def install(self, spec, prefix): configure('--prefix=%s' % prefix, '--enable-shared') diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 0f39bb0f1d..82ddb2742e 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct @@ -35,18 +36,22 @@ class Libxcb(Package): version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb') version('1.11.1', '118623c15a96b08622603a71d8789bf3') - depends_on("python") - depends_on("xcb-proto") - depends_on("pkg-config") - # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev - # depends_on('xau') # Ubuntu: apt-get install libxau-dev + depends_on("python", type='build') + depends_on("xcb-proto") + depends_on("pkg-config", type='build') + depends_on("libpthread-stubs") + depends_on('libxau') def patch(self): - filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h') - + filter_file( + 'typedef struct xcb_auth_info_t {', + 'typedef struct {', + 'src/xcb.h') def install(self, spec, prefix): + env['PKG_CONFIG_PATH'] = env[ + 'PKG_CONFIG_PATH'] + ':/usr/lib64/pkgconfig' configure("--prefix=%s" % prefix) make() diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index baaa2fc83d..0f4810fa8a 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class Libxml2(Package): """Libxml2 is the XML C parser and toolkit developed for the Gnome @@ -36,14 +36,16 @@ class Libxml2(Package): variant('python', default=False, description='Enable Python support') - extends('python', when='+python', ignore=r'(bin.*$)|(include.*$)|(share.*$)|(lib/libxml2.*$)|(lib/xml2.*$)|(lib/cmake.*$)') + extends('python', when='+python', + ignore=r'(bin.*$)|(include.*$)|(share.*$)|(lib/libxml2.*$)|' + '(lib/xml2.*$)|(lib/cmake.*$)') depends_on('zlib') depends_on('xz') def install(self, spec, prefix): if '+python' in spec: - site_packages_dir = os.path.join(prefix, 'lib/python%s.%s/site-packages' %(spec['python'].version[:2])) - python_args = ["--with-python=%s" % spec['python'].prefix, "--with-python-install-dir=%s" % site_packages_dir] + python_args = ["--with-python=%s" % spec['python'].prefix, + "--with-python-install-dir=%s" % site_packages_dir] else: python_args = ["--without-python"] 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/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py index 6d63ea6426..fe5d5667e9 100644 --- a/var/spack/repos/builtin/packages/libxshmfence/package.py +++ b/var/spack/repos/builtin/packages/libxshmfence/package.py @@ -24,11 +24,12 @@ ############################################################################## from spack import * + class Libxshmfence(Package): """This is a tiny library that exposes a event API on top of Linux futexes.""" - homepage = "http://keithp.com/blogs/dri3_extension/" # not really... + homepage = "http://keithp.com/blogs/dri3_extension/" # not really... url = "http://xorg.freedesktop.org/archive/individual/lib/libxshmfence-1.2.tar.gz" version('1.2', 'f0b30c0fc568b22ec524859ee28556f1') diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py index c6c439ad09..47d1c170c6 100644 --- a/var/spack/repos/builtin/packages/libxslt/package.py +++ b/var/spack/repos/builtin/packages/libxslt/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libxslt(Package): """Libxslt is the XSLT C library developed for the GNOME project. XSLT itself is a an XML language to define diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py new file mode 100644 index 0000000000..a736490600 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -0,0 +1,66 @@ +############################################################################## +# 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 Libxsmm(Package): + '''LIBXSMM is a library for small dense and small sparse matrix-matrix + multiplications targeting Intel Architecture (x86).''' + + homepage = 'https://github.com/hfp/libxsmm' + url = 'https://github.com/hfp/libxsmm/archive/1.4.3.tar.gz' + + version('1.4.3', '9839bf0fb8be7badf1e97ce4c817149b') + version('1.4.2', 'ea025761437f3b5c936821b9ca21ec31') + version('1.4.1', '71648500ea4510529845d329091917df') + version('1.4', 'b42f91bf5285e7ad0463446e55ebdc2b') + + def patch(self): + kwargs = {'ignore_absent': False, 'backup': False, 'string': True} + makefile = FileFilter('Makefile.inc') + + # Spack sets CC, CXX, and FC to point to the compiler wrappers + # Don't let Makefile.inc overwrite these + makefile.filter('CC = icc', 'CC ?= icc', **kwargs) + makefile.filter('CC = gcc', 'CC ?= gcc', **kwargs) + makefile.filter('CXX = icpc', 'CXX ?= icpc', **kwargs) + makefile.filter('CXX = g++', 'CXX ?= g++', **kwargs) + makefile.filter('FC = ifort', 'FC ?= ifort', **kwargs) + makefile.filter('FC = gfortran', 'FC ?= gfortran', **kwargs) + + def manual_install(self, prefix): + install_tree('include', prefix.include) + install_tree('lib', prefix.lib) + install_tree('documentation', prefix.share + '/libxsmm/doc') + + def install(self, spec, prefix): + make_args = [ + 'ROW_MAJOR=0', + 'INDICES_M={0}'.format(' '.join(str(i) for i in range(1, 25))), + 'INDICES_N={0}'.format(' '.join(str(i) for i in range(1, 25))), + 'INDICES_K={0}'.format(' '.join(str(i) for i in range(1, 25))) + ] + make(*make_args) + self.manual_install(prefix) diff --git a/var/spack/repos/builtin/packages/llvm-lld/package.py b/var/spack/repos/builtin/packages/llvm-lld/package.py index 073c2d1b9e..1dcf88e3c0 100644 --- a/var/spack/repos/builtin/packages/llvm-lld/package.py +++ b/var/spack/repos/builtin/packages/llvm-lld/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class LlvmLld(Package): """lld - The LLVM Linker lld is a new set of modular code for creating linker tools.""" @@ -34,6 +35,8 @@ class LlvmLld(Package): version('3.4', '3b6a17e58c8416c869c14dd37682f78e') + depends_on('cmake', type='build') + def install(self, spec, prefix): env['CXXFLAGS'] = self.compier.cxx11_flag diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index c32f66590a..61ea8daac4 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -23,35 +23,54 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os, glob +import os class Llvm(Package): """The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines, though it does provide helpful libraries - that can be used to build them. The name "LLVM" itself is not an acronym; - it is the full name of the project. + toolchain technologies. Despite its name, LLVM has little to do + with traditional virtual machines, though it does provide helpful + libraries that can be used to build them. The name "LLVM" itself + is not an acronym; it is the full name of the project. + """ homepage = 'http://llvm.org/' url = 'http://llvm.org/releases/3.7.1/llvm-3.7.1.src.tar.xz' - version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') # currently required by mesa package + # currently required by mesa package + version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', + url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') - variant('debug', default=False, description="Build a debug version of LLVM, this increases binary size by an order of magnitude, make sure you have 20-30gb of space available to build this") - variant('clang', default=True, description="Build the LLVM C/C++/Objective-C compiler frontend") + variant('debug', default=False, + description="Build a debug version of LLVM, this increases " + "binary size by an order of magnitude, make sure you have " + "20-30gb of space available to build this") + variant('clang', default=True, + description="Build the LLVM C/C++/Objective-C compiler frontend") variant('lldb', default=True, description="Build the LLVM debugger") - variant('internal_unwind', default=True, description="Build the libcxxabi libunwind") - variant('polly', default=True, description="Build the LLVM polyhedral optimization plugin, only builds for 3.7.0+") - variant('libcxx', default=True, description="Build the LLVM C++ standard library") - variant('compiler-rt', default=True, description="Build the LLVM compiler runtime, including sanitizers") - variant('gold', default=True, description="Add support for LTO with the gold linker plugin") - variant('shared_libs', default=False, description="Build all components as shared libraries, faster, less memory to build, less stable") - variant('link_dylib', default=False, description="Build and link the libLLVM shared library rather than static") - variant('all_targets', default=True, description="Build all supported targets, default targets <current arch>,NVPTX,AMDGPU,CppBackend") + variant('internal_unwind', default=True, + description="Build the libcxxabi libunwind") + variant('polly', default=True, + description="Build the LLVM polyhedral optimization plugin, " + "only builds for 3.7.0+") + variant('libcxx', default=True, + description="Build the LLVM C++ standard library") + variant('compiler-rt', default=True, + description="Build LLVM compiler runtime, including sanitizers") + variant('gold', default=True, + description="Add support for LTO with the gold linker plugin") + variant('shared_libs', default=False, + description="Build all components as shared libraries, faster, " + "less memory to build, less stable") + variant('link_dylib', default=False, + description="Build and link the libLLVM shared library rather " + "than static") + variant('all_targets', default=True, + description="Build all supported targets, default targets " + "<current arch>,NVPTX,AMDGPU,CppBackend") # Build dependency - depends_on('cmake @2.8.12.2:') + depends_on('cmake@2.8.12.2:', type='build') # Universal dependency depends_on('python@2.7:2.8') # Seems not to support python 3.X.Y @@ -68,147 +87,147 @@ class Llvm(Package): depends_on('gmp', when='@:3.6.999 +polly') depends_on('isl', when='@:3.6.999 +polly') - base_url = 'http://llvm.org/releases/%%(version)s/%(pkg)s-%%(version)s.src.tar.xz' - llvm_url = base_url % { 'pkg' : 'llvm'} + base_url = 'http://llvm.org/releases/%%(version)s/%(pkg)s-%%(version)s.src.tar.xz' + llvm_url = base_url % {'pkg': 'llvm'} resources = { - 'compiler-rt' : { - 'url' : base_url % { 'pkg' : 'compiler-rt'}, - 'destination' : 'projects', - 'placement' : 'compiler-rt', - }, - 'openmp' : { - 'url' : base_url % { 'pkg' : 'openmp'}, - 'destination' : 'projects', - 'placement' : 'openmp', - }, - 'libcxx' : { - 'url' : base_url % { 'pkg' : 'libcxx'}, - 'destination' : 'projects', - 'placement' : 'libcxx', - }, - 'libcxxabi' : { - 'url' : base_url % { 'pkg' : 'libcxxabi'}, - 'destination' : 'projects', - 'placement' : 'libcxxabi', - }, - 'clang' : { - 'url' : base_url % { 'pkg' : 'cfe'}, - 'destination' : 'tools', - 'placement' : 'clang', - }, - 'clang-tools-extra' : { - 'url' : base_url % { 'pkg' : 'clang-tools-extra'}, - 'destination' : 'tools/clang/tools', - 'placement' : 'extra', - }, - 'lldb' : { - 'url' : base_url % { 'pkg' : 'lldb'}, - 'destination' : 'tools', - 'placement' : 'lldb', - }, - 'polly' : { - 'url' : base_url % { 'pkg' : 'polly'}, - 'destination' : 'tools', - 'placement' : 'polly', - }, - 'llvm-libunwind' : { - 'url' : base_url % { 'pkg' : 'libunwind'}, - 'destination' : 'projects', - 'placement' : 'libunwind', - }, - } + 'compiler-rt': { + 'url': base_url % {'pkg': 'compiler-rt'}, + 'destination': 'projects', + 'placement': 'compiler-rt', + }, + 'openmp': { + 'url': base_url % {'pkg': 'openmp'}, + 'destination': 'projects', + 'placement': 'openmp', + }, + 'libcxx': { + 'url': base_url % {'pkg': 'libcxx'}, + 'destination': 'projects', + 'placement': 'libcxx', + }, + 'libcxxabi': { + 'url': base_url % {'pkg': 'libcxxabi'}, + 'destination': 'projects', + 'placement': 'libcxxabi', + }, + 'clang': { + 'url': base_url % {'pkg': 'cfe'}, + 'destination': 'tools', + 'placement': 'clang', + }, + 'clang-tools-extra': { + 'url': base_url % {'pkg': 'clang-tools-extra'}, + 'destination': 'tools/clang/tools', + 'placement': 'extra', + }, + 'lldb': { + 'url': base_url % {'pkg': 'lldb'}, + 'destination': 'tools', + 'placement': 'lldb', + }, + 'polly': { + 'url': base_url % {'pkg': 'polly'}, + 'destination': 'tools', + 'placement': 'polly', + }, + 'llvm-libunwind': { + 'url': base_url % {'pkg': 'libunwind'}, + 'destination': 'projects', + 'placement': 'libunwind', + }, + } releases = [ - { - 'version' : 'trunk', - 'repo' : 'http://llvm.org/svn/llvm-project/llvm/trunk', - 'resources' : { - 'compiler-rt' : 'http://llvm.org/svn/llvm-project/compiler-rt/trunk', - 'openmp' : 'http://llvm.org/svn/llvm-project/openmp/trunk', - 'polly' : 'http://llvm.org/svn/llvm-project/polly/trunk', - 'libcxx' : 'http://llvm.org/svn/llvm-project/libcxx/trunk', - 'libcxxabi' : 'http://llvm.org/svn/llvm-project/libcxxabi/trunk', - 'clang' : 'http://llvm.org/svn/llvm-project/cfe/trunk', - 'clang-tools-extra' : 'http://llvm.org/svn/llvm-project/clang-tools-extra/trunk', - 'lldb' : 'http://llvm.org/svn/llvm-project/lldb/trunk', - 'llvm-libunwind' : 'http://llvm.org/svn/llvm-project/libunwind/trunk', - } - }, - { - 'version' : '3.8.0', - 'md5':'07a7a74f3c6bd65de4702bf941b511a0', - 'resources' : { - 'compiler-rt' : 'd6fcbe14352ffb708e4d1ac2e48bb025', - 'openmp' : '8fd7cc35d48051613cf1e750e9f22e40', - 'polly' : '1b3b20f52d34a4024e21a4ea7112caa7', - 'libcxx' : 'd6e0bdbbee39f7907ad74fd56d03b88a', - 'libcxxabi' : 'bbe6b4d72c7c5978550d370af529bcf7', - 'clang' : 'cc99e7019bb74e6459e80863606250c5', - 'clang-tools-extra' : 'c2344f50e0eea0b402f0092a80ddc036', - 'lldb' : 'a5da35ed9cc8c8817ee854e3dbfba00e', - 'llvm-libunwind' : '162ade468607f153cca12be90b5194fa', - } - }, - { - 'version' : '3.7.1', - 'md5':'bf8b3a2c79e61212c5409041dfdbd319', - 'resources' : { - 'compiler-rt' : '1c6975daf30bb3b0473b53c3a1a6ff01', - 'openmp' : 'b4ad08cda4e5c22e42b66062b140438e', - 'polly' : '3a2a7367002740881637f4d47bca4dc3', - 'libcxx' : 'f9c43fa552a10e14ff53b94d04bea140', - 'libcxxabi' : '52d925afac9f97e9dcac90745255c169', - 'clang' : '0acd026b5529164197563d135a8fd83e', - 'clang-tools-extra' : '5d49ff745037f061a7c86aeb6a24c3d2', - 'lldb' : 'a106d8a0d21fc84d76953822fbaf3398', - 'llvm-libunwind' : '814bd52c9247c5d04629658fbcb3ab8c', - } - }, - { - 'version' : '3.7.0', - 'md5':'b98b9495e5655a672d6cb83e1a180f8e', - 'resources' : { - 'compiler-rt' : '383c10affd513026f08936b5525523f5', - 'openmp' : 'f482c86fdead50ba246a1a2b0bbf206f', - 'polly' : '32f93ffc9cc7e042df22089761558f8b', - 'libcxx' : '46aa5175cbe1ad42d6e9c995968e56dd', - 'libcxxabi' : '5aa769e2fca79fa5335cfae8f6258772', - 'clang' : '8f9d27335e7331cf0a4711e952f21f01', - 'clang-tools-extra' : 'd5a87dacb65d981a427a536f6964642e', - 'lldb' : 'e5931740400d1dc3e7db4c7ba2ceff68', - 'llvm-libunwind' : '9a75392eb7eb8ed5c0840007e212baf5', - } - }, - { - 'version' : '3.6.2', - 'md5':'0c1ee3597d75280dee603bae9cbf5cc2', - 'resources' : { - 'compiler-rt' : 'e3bc4eb7ba8c39a6fe90d6c988927f3c', - 'openmp' : '65dd5863b9b270960a96817e9152b123', - 'libcxx' : '22214c90697636ef960a49aef7c1823a', - 'libcxxabi' : '17518e361e4e228f193dd91e8ef54ba2', - 'clang' : 'ff862793682f714bb7862325b9c06e20', - 'clang-tools-extra' : '3ebc1dc41659fcec3db1b47d81575e06', - 'lldb' : '51e5eb552f777b950bb0ff326e60d5f0', - } - }, - { - 'version' : '3.5.1', - 'md5':'2d3d8004f38852aa679e5945b8ce0b14', - 'resources' : { - 'compiler-rt' : 'd626cfb8a9712cb92b820798ab5bc1f8', - 'openmp' : '121ddb10167d7fc38b1f7e4b029cf059', - 'libcxx' : '406f09b1dab529f3f7879f4d548329d2', - 'libcxxabi' : 'b22c707e8d474a99865ad3c521c3d464', - 'clang' : '93f9532f8f7e6f1d8e5c1116907051cb', - 'clang-tools-extra' : 'f13f31ed3038acadc6fa63fef812a246', - 'lldb' : 'cc5ea8a414c62c33e760517f8929a204', - } - }, - ] + { + 'version': 'trunk', + 'repo': 'http://llvm.org/svn/llvm-project/llvm/trunk', + 'resources': { + 'compiler-rt': 'http://llvm.org/svn/llvm-project/compiler-rt/trunk', + 'openmp': 'http://llvm.org/svn/llvm-project/openmp/trunk', + 'polly': 'http://llvm.org/svn/llvm-project/polly/trunk', + 'libcxx': 'http://llvm.org/svn/llvm-project/libcxx/trunk', + 'libcxxabi': 'http://llvm.org/svn/llvm-project/libcxxabi/trunk', + 'clang': 'http://llvm.org/svn/llvm-project/cfe/trunk', + 'clang-tools-extra': 'http://llvm.org/svn/llvm-project/clang-tools-extra/trunk', + 'lldb': 'http://llvm.org/svn/llvm-project/lldb/trunk', + 'llvm-libunwind': 'http://llvm.org/svn/llvm-project/libunwind/trunk', + } + }, + { + 'version': '3.8.0', + 'md5': '07a7a74f3c6bd65de4702bf941b511a0', + 'resources': { + 'compiler-rt': 'd6fcbe14352ffb708e4d1ac2e48bb025', + 'openmp': '8fd7cc35d48051613cf1e750e9f22e40', + 'polly': '1b3b20f52d34a4024e21a4ea7112caa7', + 'libcxx': 'd6e0bdbbee39f7907ad74fd56d03b88a', + 'libcxxabi': 'bbe6b4d72c7c5978550d370af529bcf7', + 'clang': 'cc99e7019bb74e6459e80863606250c5', + 'clang-tools-extra': 'c2344f50e0eea0b402f0092a80ddc036', + 'lldb': 'a5da35ed9cc8c8817ee854e3dbfba00e', + 'llvm-libunwind': '162ade468607f153cca12be90b5194fa', + } + }, + { + 'version': '3.7.1', + 'md5': 'bf8b3a2c79e61212c5409041dfdbd319', + 'resources': { + 'compiler-rt': '1c6975daf30bb3b0473b53c3a1a6ff01', + 'openmp': 'b4ad08cda4e5c22e42b66062b140438e', + 'polly': '3a2a7367002740881637f4d47bca4dc3', + 'libcxx': 'f9c43fa552a10e14ff53b94d04bea140', + 'libcxxabi': '52d925afac9f97e9dcac90745255c169', + 'clang': '0acd026b5529164197563d135a8fd83e', + 'clang-tools-extra': '5d49ff745037f061a7c86aeb6a24c3d2', + 'lldb': 'a106d8a0d21fc84d76953822fbaf3398', + 'llvm-libunwind': '814bd52c9247c5d04629658fbcb3ab8c', + } + }, + { + 'version': '3.7.0', + 'md5': 'b98b9495e5655a672d6cb83e1a180f8e', + 'resources': { + 'compiler-rt': '383c10affd513026f08936b5525523f5', + 'openmp': 'f482c86fdead50ba246a1a2b0bbf206f', + 'polly': '32f93ffc9cc7e042df22089761558f8b', + 'libcxx': '46aa5175cbe1ad42d6e9c995968e56dd', + 'libcxxabi': '5aa769e2fca79fa5335cfae8f6258772', + 'clang': '8f9d27335e7331cf0a4711e952f21f01', + 'clang-tools-extra': 'd5a87dacb65d981a427a536f6964642e', + 'lldb': 'e5931740400d1dc3e7db4c7ba2ceff68', + 'llvm-libunwind': '9a75392eb7eb8ed5c0840007e212baf5', + } + }, + { + 'version': '3.6.2', + 'md5': '0c1ee3597d75280dee603bae9cbf5cc2', + 'resources': { + 'compiler-rt': 'e3bc4eb7ba8c39a6fe90d6c988927f3c', + 'openmp': '65dd5863b9b270960a96817e9152b123', + 'libcxx': '22214c90697636ef960a49aef7c1823a', + 'libcxxabi': '17518e361e4e228f193dd91e8ef54ba2', + 'clang': 'ff862793682f714bb7862325b9c06e20', + 'clang-tools-extra': '3ebc1dc41659fcec3db1b47d81575e06', + 'lldb': '51e5eb552f777b950bb0ff326e60d5f0', + } + }, + { + 'version': '3.5.1', + 'md5': '2d3d8004f38852aa679e5945b8ce0b14', + 'resources': { + 'compiler-rt': 'd626cfb8a9712cb92b820798ab5bc1f8', + 'openmp': '121ddb10167d7fc38b1f7e4b029cf059', + 'libcxx': '406f09b1dab529f3f7879f4d548329d2', + 'libcxxabi': 'b22c707e8d474a99865ad3c521c3d464', + 'clang': '93f9532f8f7e6f1d8e5c1116907051cb', + 'clang-tools-extra': 'f13f31ed3038acadc6fa63fef812a246', + 'lldb': 'cc5ea8a414c62c33e760517f8929a204', + } + }, + ] for release in releases: - if release['version'] == 'trunk' : + if release['version'] == 'trunk': version(release['version'], svn=release['repo']) for name, repo in release['resources'].items(): @@ -230,18 +249,19 @@ class Llvm(Package): def install(self, spec, prefix): env['CXXFLAGS'] = self.compiler.cxx11_flag - cmake_args = [ arg for arg in std_cmake_args if 'BUILD_TYPE' not in arg ] + cmake_args = [arg for arg in std_cmake_args if 'BUILD_TYPE' not in arg] build_type = 'RelWithDebInfo' if '+debug' in spec else 'Release' cmake_args.extend([ - '..', - '-DCMAKE_BUILD_TYPE=' + build_type, - '-DLLVM_REQUIRES_RTTI:BOOL=ON', - '-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp', - '-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix ]) + '..', + '-DCMAKE_BUILD_TYPE=' + build_type, + '-DLLVM_REQUIRES_RTTI:BOOL=ON', + '-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp', + '-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix]) if '+gold' in spec: - cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + os.path.join( spec['binutils'].prefix, 'include')) + cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + + os.path.join(spec['binutils'].prefix, 'include')) if '+polly' in spec: cmake_args.append('-DLINK_POLLY_INTO_TOOLS:Bool=ON') else: @@ -265,27 +285,30 @@ class Llvm(Package): if '+link_dylib' in spec: cmake_args.append('-DLLVM_LINK_LLVM_DYLIB:Bool=ON') - if '+all_targets' not in spec: # all is default on cmake + if '+all_targets' not in spec: # all is default on cmake targets = ['CppBackend', 'NVPTX', 'AMDGPU'] - if 'x86' in spec.architecture.lower(): + if 'x86' in spec.architecture.target.lower(): targets.append('X86') - elif 'arm' in spec.architecture.lower(): + elif 'arm' in spec.architecture.target.lower(): targets.append('ARM') - elif 'aarch64' in spec.architecture.lower(): + elif 'aarch64' in spec.architecture.target.lower(): targets.append('AArch64') - elif 'sparc' in spec.architecture.lower(): + elif 'sparc' in spec.architecture.target.lower(): targets.append('sparc') - elif ('ppc' in spec.architecture.lower() or - 'power' in spec.architecture.lower()): + elif ('ppc' in spec.architecture.target.lower() or + 'power' in spec.architecture.target.lower()): targets.append('PowerPC') - cmake_args.append('-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets)) + cmake_args.append( + '-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets)) - if '+clang' not in spec: + if '+clang' not in spec: if '+clang_extra' in spec: - raise SpackException('The clang_extra variant requires the clang variant to be selected') + raise SpackException( + 'The clang_extra variant requires the `+clang` variant.') if '+lldb' in spec: - raise SpackException('The lldb variant requires the clang variant to be selected') + raise SpackException( + 'The lldb variant requires the `+clang` variant') with working_dir('spack-build', create=True): cmake(*cmake_args) diff --git a/var/spack/repos/builtin/packages/lmdb/package.py b/var/spack/repos/builtin/packages/lmdb/package.py index 79c020b2df..8c6c23d8dc 100644 --- a/var/spack/repos/builtin/packages/lmdb/package.py +++ b/var/spack/repos/builtin/packages/lmdb/package.py @@ -25,12 +25,12 @@ import os from spack import * + class Lmdb(Package): """Read-only mirror of official repo on openldap.org. Issues and pull requests here are ignored. Use OpenLDAP ITS for issues. http://www.openldap.org/software/repo.html""" - homepage = "http://www.openldap.org/software/repo.html" url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.16.tar.gz" diff --git a/var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch b/var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch new file mode 100644 index 0000000000..70f0d47925 --- /dev/null +++ b/var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch @@ -0,0 +1,10 @@ +--- a/Makefile.in 2016-07-21 13:03:27.861000000 -0400 ++++ b/Makefile.in 2016-07-21 13:03:58.416000000 -0400 +@@ -197,6 +197,7 @@ + -e 's|@colorize@|$(COLORIZE)|g' \ + -e 's|@duplicate_paths@|$(DUPLICATE_PATHS)|g' \ + -e 's|@allow_tcl_mfiles@|$(ALLOW_TCL_MFILES)|g' \ ++ -e 's|@path_to_tclsh@|$(PATH_TO_TCLSH)|g' \ + -e 's|@mpath_avail@|$(MPATH_AVAIL)|g' \ + -e 's|@short_time@|$(SHORT_TIME)|g' \ + -e 's|@cacheDirs@|$(SPIDER_CACHE_DIRS)|g' \ diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index 0a8b9b4577..69965bc423 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -23,7 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os +from glob import glob + class Lmod(Package): """ @@ -34,17 +35,38 @@ class Lmod(Package): variable. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found. """ - homepage = "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod" - url = "http://sourceforge.net/projects/lmod/files/Lmod-6.0.1.tar.bz2/download" + homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' + url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz' + version('6.4.5', '14f6c58dbc0a5a75574d795eac2c1e3c') + version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4') + version('6.3.7', '0fa4d5a24c41cae03776f781aa2dedc1') version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9') - depends_on("lua@5.2:") + depends_on('lua@5.2:') + depends_on('lua-luaposix', type=nolink) + depends_on('lua-luafilesystem', type=nolink) + depends_on('tcl', type=nolink) + + parallel = False + + def setup_environment(self, spack_env, run_env): + stage_lua_path = join_path( + self.stage.path, 'Lmod-{version}', 'src', '?.lua') + spack_env.append_path('LUA_PATH', stage_lua_path.format( + version=self.version), separator=';') + + patch('fix_tclsh_paths.patch', when='@:6.4.3') + + def patch(self): + """The tcl scripts should use the tclsh that was discovered + by the configure script. Touch up their #! lines so that the + sed in the Makefile's install step has something to work on. + Requires the change in the associated patch file.fg""" + if self.spec.version <= Version('6.4.3'): + for tclscript in glob('src/*.tcl'): + filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript) def install(self, spec, prefix): - # Add our lua to PATH - os.environ['PATH'] = spec['lua'].prefix.bin + ';' + os.environ['PATH'] - configure('--prefix=%s' % prefix) - make() - make("install") + 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/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py new file mode 100644 index 0000000000..a61b9dd675 --- /dev/null +++ b/var/spack/repos/builtin/packages/lua-luafilesystem/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 LuaLuafilesystem(Package): + """ + LuaFileSystem is a Lua library developed to complement the set of + functions related to file systems offered by the standard Lua distribution. + + LuaFileSystem offers a portable way to access the underlying directory + structure and file attributes. + + LuaFileSystem is free software and uses the same license as Lua 5.1 + """ + homepage = 'http://keplerproject.github.io/luafilesystem' + url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz' + + version('1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95') + + extends('lua') + + def install(self, spec, prefix): + rockspec_fmt = join_path(self.stage.path, + 'luafilesystem-v_{version.underscored}', + 'rockspecs', + 'luafilesystem-{version.dotted}-1.rockspec') + luarocks('--tree=' + prefix, 'install', + rockspec_fmt.format(version=self.spec.version)) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 170f90516a..ca0a481a83 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -57,7 +57,7 @@ class Lua(Package): placement='luarocks') def install(self, spec, prefix): - if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"): + if spec.satisfies("platform=darwin"): target = 'macosx' else: target = 'linux' @@ -86,7 +86,7 @@ class Lua(Package): def setup_dependent_environment(self, spack_env, run_env, extension_spec): lua_paths = [] - for d in extension_spec.traverse(): + for d in extension_spec.traverse(deptypes=nolink, deptype_query='run'): if d.package.extends(self.spec): lua_paths.append(os.path.join(d.prefix, self.lua_lib_dir)) lua_paths.append(os.path.join(d.prefix, self.lua_share_dir)) @@ -105,6 +105,9 @@ class Lua(Package): spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';') spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') + # Add LUA to PATH for dependent packages + spack_env.prepend_path('PATH', self.prefix.bin) + # For run time environment set only the path for extension_spec and # prepend it to LUAPATH if extension_spec.package.extends(self.spec): @@ -137,11 +140,11 @@ class Lua(Package): @property def lua_lib_dir(self): - return os.path.join('lib', 'lua', '%d.%d' % self.version[:2]) + return os.path.join('lib', 'lua', self.version.up_to(2)) @property def lua_share_dir(self): - return os.path.join('share', 'lua', '%d.%d' % self.version[:2]) + return os.path.join('share', 'lua', self.version.up_to(2)) def setup_dependent_package(self, module, ext_spec): """ @@ -153,5 +156,5 @@ class Lua(Package): """ # Lua extension builds can have lua and luarocks executable functions module.lua = Executable(join_path(self.spec.prefix.bin, 'lua')) - module.luarocks = Executable(join_path(self.spec.prefix.bin, - 'luarocks')) + module.luarocks = Executable( + join_path(self.spec.prefix.bin, 'luarocks')) diff --git a/var/spack/repos/builtin/packages/lwgrp/package.py b/var/spack/repos/builtin/packages/lwgrp/package.py index 471098c873..9322d69b9b 100644 --- a/var/spack/repos/builtin/packages/lwgrp/package.py +++ b/var/spack/repos/builtin/packages/lwgrp/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Lwgrp(Package): """Thie light-weight group library provides process group representations using O(log N) space and time.""" diff --git a/var/spack/repos/builtin/packages/lwm2/package.py b/var/spack/repos/builtin/packages/lwm2/package.py index 340474b47e..063204b84a 100644 --- a/var/spack/repos/builtin/packages/lwm2/package.py +++ b/var/spack/repos/builtin/packages/lwm2/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Lwm2(Package): """LWM2: Light Weight Measurement Module. This is a PMPI module that can collect a number of time-sliced MPI and POSIX I/O 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/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index dcb306dcd3..b3bb5e61ce 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class M4(Package): """GNU M4 is an implementation of the traditional Unix macro processor.""" homepage = "https://www.gnu.org/software/m4/m4.html" @@ -33,14 +34,16 @@ class M4(Package): patch('pgi.patch', when='@1.4.17') - variant('sigsegv', default=True, description="Build the libsigsegv dependency") + variant('sigsegv', default=True, + description="Build the libsigsegv dependency") depends_on('libsigsegv', when='+sigsegv') def install(self, spec, prefix): configure_args = [] if 'libsigsegv' in spec: - configure_args.append('--with-libsigsegv-prefix=%s' % spec['libsigsegv'].prefix) + configure_args.append('--with-libsigsegv-prefix=%s' % + spec['libsigsegv'].prefix) else: configure_args.append('--without-libsigsegv-prefix') diff --git a/var/spack/repos/builtin/packages/mafft/package.py b/var/spack/repos/builtin/packages/mafft/package.py new file mode 100644 index 0000000000..131b8c58f9 --- /dev/null +++ b/var/spack/repos/builtin/packages/mafft/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 Mafft(Package): + """MAFFT is a multiple sequence alignment program for unix-like + operating systems. It offers a range of multiple alignment + methods, L-INS-i (accurate; for alignment of <~200 sequences), + FFT-NS-2 (fast; for alignment of <~30,000 sequences), etc.""" + + homepage = "http://mafft.cbrc.jp/alignment/software/index.html" + url = "http://mafft.cbrc.jp/alignment/software/mafft-7.221-with-extensions-src.tgz" + + version('7.221', 'b1aad911e51024d631722a2e061ba215') + + def install(self, spec, prefix): + with working_dir('core'): + make('PREFIX=%s' % prefix) + make('PREFIX=%s' % prefix, '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/mbedtls/package.py b/var/spack/repos/builtin/packages/mbedtls/package.py index ae34d25691..e1a42c0d9a 100644 --- a/var/spack/repos/builtin/packages/mbedtls/package.py +++ b/var/spack/repos/builtin/packages/mbedtls/package.py @@ -24,20 +24,24 @@ ############################################################################## from spack import * + class Mbedtls(Package): - """ - mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint. + """mbed TLS (formerly known as PolarSSL) makes it trivially easy for + developers to include cryptographic and SSL/TLS capabilities in + their (embedded) products, facilitating this functionality with a + minimal coding footprint. + """ homepage = "https://tls.mbed.org" url = "https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.2.1.tar.gz" - version('2.2.1' , '73a38f96898d6d03e32f55dd9f9a67be') - version('2.2.0' , 'eaf4586c1ef93ae872e606b6c1203942') - version('2.1.4' , '40cdf67b6c6d92c9cbcfd552d39ea3ae') - version('2.1.3' , '7eb4cf1dfa68578a2c8dbd0b6fa752dd') + version('2.2.1', '73a38f96898d6d03e32f55dd9f9a67be') + version('2.2.0', 'eaf4586c1ef93ae872e606b6c1203942') + version('2.1.4', '40cdf67b6c6d92c9cbcfd552d39ea3ae') + version('2.1.3', '7eb4cf1dfa68578a2c8dbd0b6fa752dd') version('1.3.16', '4144d7320c691f721aeb9e67a1bc38e0') - depends_on('cmake') + depends_on('cmake', type='build') def install(self, spec, prefix): cmake('.', *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/meep/package.py b/var/spack/repos/builtin/packages/meep/package.py new file mode 100644 index 0000000000..2c1018e711 --- /dev/null +++ b/var/spack/repos/builtin/packages/meep/package.py @@ -0,0 +1,109 @@ +############################################################################## +# 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 Meep(Package): + """Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation + software package developed at MIT to model electromagnetic systems.""" + + homepage = "http://ab-initio.mit.edu/wiki/index.php/Meep" + + version('1.3', '18a5b9e18008627a0411087e0bb60db5') + version('1.2.1', '9be2e743c3a832ae922de9d955d016c5') + version('1.1.1', '415e0cd312b6caa22b5dd612490e1ccf') + + variant('blas', default=True, description='Enable BLAS support') + variant('lapack', default=True, description='Enable LAPACK support') + variant('harminv', default=True, description='Enable Harminv support') + variant('guile', default=True, description='Enable Guilde support') + variant('libctl', default=True, description='Enable libctl support') + variant('mpi', default=True, description='Enable MPI support') + variant('hdf5', default=True, description='Enable HDF5 support') + variant('gsl', default=True, description='Enable GSL support') + + depends_on('blas', when='+blas') + depends_on('lapack', when='+lapack') + depends_on('harminv', when='+harminv') + depends_on('guile', when='+guile') + depends_on('libctl@3.2:', when='+libctl') + depends_on('mpi', when='+mpi') + depends_on('hdf5~mpi', when='+hdf5~mpi') + depends_on('hdf5+mpi', when='+hdf5+mpi') + depends_on('gsl', when='+gsl') + + def url_for_version(self, version): + base_url = "http://ab-initio.mit.edu/meep" + if version > Version('1.1.1'): + return "{0}/meep-{1}.tar.gz".format(base_url, version) + else: + return "{0}/old/meep-{1}.tar.gz".format(base_url, version) + + def install(self, spec, prefix): + config_args = [ + '--prefix={0}'.format(prefix), + '--enable-shared' + ] + + if '+blas' in spec: + config_args.append('--with-blas={0}'.format( + spec['blas'].prefix.lib)) + else: + config_args.append('--without-blas') + + if '+lapack' in spec: + config_args.append('--with-lapack={0}'.format( + spec['lapack'].prefix.lib)) + else: + config_args.append('--without-lapack') + + if '+libctl' in spec: + config_args.append('--with-libctl={0}'.format( + join_path(spec['libctl'].prefix.share, 'libctl'))) + else: + config_args.append('--without-libctl') + + if '+mpi' in spec: + config_args.append('--with-mpi') + else: + config_args.append('--without-mpi') + + if '+hdf5' in spec: + config_args.append('--with-hdf5') + else: + config_args.append('--without-hdf5') + + configure(*config_args) + + make() + + # aniso_disp test fails unless installed with harminv + # near2far test fails unless installed with gsl + if self.run_tests and '+harminv' in spec and '+gsl' in spec: + # Most tests fail when run in parallel + # 2D_convergence tests still fails to converge for unknown reasons + make('check', parallel=False) + + make('install') diff --git a/var/spack/repos/builtin/packages/memaxes/package.py b/var/spack/repos/builtin/packages/memaxes/package.py index 135384e2f7..ffad167788 100644 --- a/var/spack/repos/builtin/packages/memaxes/package.py +++ b/var/spack/repos/builtin/packages/memaxes/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Memaxes(Package): """MemAxes is a visualizer for sampled memory trace data.""" @@ -32,7 +33,7 @@ class Memaxes(Package): version('0.5', '5874f3fda9fd2d313c0ff9684f915ab5', url='https://github.com/llnl/MemAxes/archive/v0.5.tar.gz') - depends_on("cmake@2.8.9:") + depends_on('cmake@2.8.9:', type='build') depends_on("qt@5:") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index bd9c9eec4a..299b9a9267 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -24,13 +24,13 @@ ############################################################################## from spack import * + class Mesa(Package): """Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.""" homepage = "http://www.mesa3d.org" url = "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/8.0.5/MesaLib-8.0.5.tar.gz" - # url = "ftp://ftp.freedesktop.org/pub/mesa/10.4.4/MesaLib-10.4.4.tar.gz" # version('10.4.4', '8d863a3c209bf5116b2babfccccc68ce') version('8.0.5', 'cda5d101f43b8784fa60bdeaca4056f2') @@ -44,13 +44,12 @@ class Mesa(Package): # mesa 10.x # depends_on("py-mako") - # depends_on("flex") - # depends_on("bison") + # depends_on("flex", type='build') + # depends_on("bison", type='build') # depends_on("dri2proto") # depends_on("libxcb") # depends_on("libxshmfence") - def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index c4f2afaff2..9f8ed5c9e8 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -43,14 +43,18 @@ class Metis(Package): version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5') version('4.0.3', 'd3848b454532ef18dc83e4fb160d1e10') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds the library in debug mode') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds the library in debug mode') variant('gdb', default=False, description='Enables gdb support') - variant('idx64', default=False, description='Use int64_t as default index type') - variant('real64', default=False, description='Use double precision floating point types') + variant('idx64', default=False, + description='Use int64_t as default index type') + variant('real64', default=False, + description='Use double precision floating point types') - depends_on('cmake@2.8:', when='@5:') # build-time dependency + depends_on('cmake@2.8:', when='@5:', type='build') patch('install_gklib_defs_rename.patch', when='@5:') diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 504efb5e35..fd91f705eb 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -23,7 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import glob, string +import glob +import string + class Mfem(Package): """Free, lightweight, scalable C++ library for finite element methods.""" @@ -31,11 +33,15 @@ class Mfem(Package): homepage = 'http://www.mfem.org' url = 'https://github.com/mfem/mfem' -# version('3.1', git='https://github.com/mfem/mfem.git', -# commit='dbae60fe32e071989b52efaaf59d7d0eb2a3b574') + version('3.2', + '2938c3deed4ec4f7fd5b5f5cfe656845282e86e2dcd477d292390058b7b94340', + url='http://goo.gl/Y9T75B', expand=False, preferred=True) - version('3.1', '841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57', + version('3.1', + '841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57', url='http://goo.gl/xrScXn', expand=False) +# version('3.1', git='https://github.com/mfem/mfem.git', +# commit='dbae60fe32e071989b52efaaf59d7d0eb2a3b574') variant('metis', default=False, description='Activate support for metis') variant('hypre', default=False, description='Activate support for hypre') @@ -60,7 +66,7 @@ class Mfem(Package): depends_on('blas', when='+suite-sparse') depends_on('lapack', when='+suite-sparse') depends_on('metis@5:', when='+suite-sparse ^suite-sparse@4.5:') - depends_on('cmake', when='^metis@5:') + depends_on('cmake', when='^metis@5:', type='build') def check_variants(self, spec): if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec): @@ -69,8 +75,9 @@ class Mfem(Package): if '+suite-sparse' in spec and ('+metis' not in spec or '+lapack' not in spec): raise InstallError('mfem+suite-sparse must be built with ' + - '+metis and +lapack!') - if 'metis@5:' in spec and '%clang' in spec and ('^cmake %gcc' not in spec): + '+metis and +lapack!') + if 'metis@5:' in spec and '%clang' in spec and ( + '^cmake %gcc' not in spec): raise InstallError('To work around CMake bug with clang, must ' + 'build mfem with mfem[+variants] %clang ' + '^cmake %gcc to force CMake to build with gcc') @@ -84,15 +91,17 @@ class Mfem(Package): if '+lapack' in spec: lapack_lib = '-L{0} -llapack -L{1} -lblas'.format( spec['lapack'].prefix.lib, spec['blas'].prefix.lib) - options.extend(['MFEM_USE_LAPACK=YES', - 'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include, - 'LAPACK_LIB=%s' % lapack_lib]) + options.extend([ + 'MFEM_USE_LAPACK=YES', + 'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include, + 'LAPACK_LIB=%s' % lapack_lib]) if '+hypre' in spec: - options.extend(['HYPRE_DIR=%s' % spec['hypre'].prefix, - 'HYPRE_OPT=-I%s' % spec['hypre'].prefix.include, - 'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib + - ' -lHYPRE']) + options.extend([ + 'HYPRE_DIR=%s' % spec['hypre'].prefix, + 'HYPRE_OPT=-I%s' % spec['hypre'].prefix.include, + 'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib + + ' -lHYPRE']) if '+metis' in spec: metis_lib = '-L%s -lmetis' % spec['metis'].prefix.lib @@ -100,22 +109,26 @@ class Mfem(Package): metis_str = 'MFEM_USE_METIS_5=YES' else: metis_str = 'MFEM_USE_METIS_5=NO' - options.extend([metis_str, - 'METIS_DIR=%s' % spec['metis'].prefix, - 'METIS_OPT=-I%s' % spec['metis'].prefix.include, - 'METIS_LIB=%s' % metis_lib]) + options.extend([ + metis_str, + 'METIS_DIR=%s' % spec['metis'].prefix, + 'METIS_OPT=-I%s' % spec['metis'].prefix.include, + 'METIS_LIB=%s' % metis_lib]) - if '+mpi' in spec: options.extend(['MFEM_USE_MPI=YES']) + if '+mpi' in spec: + options.extend(['MFEM_USE_MPI=YES']) if '+suite-sparse' in spec: ssp = spec['suite-sparse'].prefix ss_lib = '-L%s' % ssp.lib ss_lib += (' -lumfpack -lcholmod -lcolamd -lamd -lcamd' + - ' -lccolamd -lsuitesparseconfig') + ' -lccolamd -lsuitesparseconfig') no_librt_archs = ['darwin-i686', 'darwin-x86_64'] - no_rt = any(map(lambda a: spec.satisfies('='+a), no_librt_archs)) - if not no_rt: ss_lib += ' -lrt' + no_rt = any(map(lambda a: spec.satisfies('=' + a), + no_librt_archs)) + if not no_rt: + ss_lib += ' -lrt' ss_lib += (' ' + metis_lib + ' ' + lapack_lib) options.extend(['MFEM_USE_SUITESPARSE=YES', @@ -123,10 +136,11 @@ class Mfem(Package): 'SUITESPARSE_OPT=-I%s' % ssp.include, 'SUITESPARSE_LIB=%s' % ss_lib]) - if '+debug' in spec: options.extend(['MFEM_DEBUG=YES']) + if '+debug' in spec: + options.extend(['MFEM_DEBUG=YES']) # Dirty hack to cope with URL redirect - tgz_file = string.split(self.url,'/')[-1] + tgz_file = string.split(self.url, '/')[-1] tar = which('tar') tar('xzvf', tgz_file) cd(glob.glob('mfem*')[0]) @@ -136,12 +150,12 @@ class Mfem(Package): make('all') # Run a small test before installation - args = ['-m', join_path('data','star.mesh'), '--no-visualization'] + args = ['-m', join_path('data', 'star.mesh'), '--no-visualization'] if '+mpi' in spec: Executable(join_path(spec['mpi'].prefix.bin, 'mpirun'))('-np', '4', - join_path('examples','ex1p'), + join_path('examples', 'ex1p'), *args) else: Executable(join_path('examples', 'ex1'))(*args) diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py new file mode 100644 index 0000000000..71a233ff3e --- /dev/null +++ b/var/spack/repos/builtin/packages/mkl/package.py @@ -0,0 +1,72 @@ +from spack import * +import os + +from spack.pkg.builtin.intel import IntelInstaller + + +class Mkl(IntelInstaller): + """Intel Math Kernel Library. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html. + + To set the threading layer at run time set MKL_THREADING_LAYER + variable to one of the following values: INTEL (default), SEQUENTIAL, PGI. + To set interface layer at run time, use set the MKL_INTERFACE_LAYER + variable to LP64 (default) or ILP64. + """ + + homepage = "https://software.intel.com/en-us/intel-mkl" + + version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65', + url="file://%s/l_mkl_11.3.2.181.tgz" % os.getcwd()) + version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34', + url="file://%s/l_mkl_11.3.3.210.tgz" % os.getcwd()) + + # virtual dependency + provides('blas') + provides('lapack') + # TODO: MKL also provides implementation of Scalapack. + + def install(self, spec, prefix): + + self.intel_prefix = os.path.join(prefix, "pkg") + IntelInstaller.install(self, spec, prefix) + + mkl_dir = os.path.join(self.intel_prefix, "mkl") + for f in os.listdir(mkl_dir): + os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f)) + + # Unfortunately MKL libs are natively distrubted in prefix/lib/intel64. + # To make MKL play nice with Spack, symlink all files to prefix/lib: + mkl_lib_dir = os.path.join(prefix, "lib", "intel64") + for f in os.listdir(mkl_lib_dir): + os.symlink(os.path.join(mkl_lib_dir, f), + os.path.join(self.prefix, "lib", f)) + + def setup_dependent_package(self, module, dspec): + # For now use Single Dynamic Library: + # To set the threading layer at run time, use the + # mkl_set_threading_layer function or set MKL_THREADING_LAYER + # variable to one of the following values: INTEL, SEQUENTIAL, PGI. + # To set interface layer at run time, use the mkl_set_interface_layer + # function or set the MKL_INTERFACE_LAYER variable to LP64 or ILP64. + + # Otherwise one would need to specify several libraries + # (e.g. mkl_intel_lp64;mkl_sequential;mkl_core), which reflect + # different interface and threading layers. + + name = 'libmkl_rt.%s' % dso_suffix + libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib) + + # Now set blas/lapack libs: + self.spec.blas_shared_lib = join_path(libdir, name) + self.spec.lapack_shared_lib = self.spec.blas_shared_lib + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + # set up MKLROOT for everyone using MKL package + spack_env.set('MKLROOT', self.prefix) + + def setup_environment(self, spack_env, env): + env.set('MKLROOT', self.prefix) diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py index 92eb976f8b..71cacd5dfe 100644 --- a/var/spack/repos/builtin/packages/mpc/package.py +++ b/var/spack/repos/builtin/packages/mpc/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Mpc(Package): """Gnu Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the diff --git a/var/spack/repos/builtin/packages/mpe2/package.py b/var/spack/repos/builtin/packages/mpe2/package.py index f69ea2d65b..a129d59949 100644 --- a/var/spack/repos/builtin/packages/mpe2/package.py +++ b/var/spack/repos/builtin/packages/mpe2/package.py @@ -24,8 +24,9 @@ ############################################################################## from spack import * + class Mpe2(Package): - """Message Passing Extensions (MPE) -- Parallel, shared X window graphics""" + """Message Passing Extensions (MPE): Parallel, shared X window graphics""" homepage = "http://www.mcs.anl.gov/research/projects/perfvis/software/MPE/" url = "ftp://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-1.3.0.tar.gz" diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py index ed3926a8ab..5777cd1926 100644 --- a/var/spack/repos/builtin/packages/mpfr/package.py +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Mpfr(Package): """The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.""" diff --git a/var/spack/repos/builtin/packages/mpibash/package.py b/var/spack/repos/builtin/packages/mpibash/package.py index b328b98ecf..f3feaaaa42 100644 --- a/var/spack/repos/builtin/packages/mpibash/package.py +++ b/var/spack/repos/builtin/packages/mpibash/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Mpibash(Package): """Parallel scripting right from the Bourne-Again Shell (Bash)""" homepage = "http://www.ccs3.lanl.gov/~pakin/software/mpibash-4.3.html" @@ -36,7 +36,7 @@ class Mpibash(Package): patch('mpibash-4.3.patch', level=1, when='@4.3') # above patch modifies configure.ac - depends_on('autoconf') + depends_on('autoconf', type='build') # uses MPI_Exscan which is in MPI-1.2 and later depends_on('mpi@1.2:') 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/mpileaks/package.py b/var/spack/repos/builtin/packages/mpileaks/package.py index 51bc66a0eb..ec4e9b30cc 100644 --- a/var/spack/repos/builtin/packages/mpileaks/package.py +++ b/var/spack/repos/builtin/packages/mpileaks/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class Mpileaks(Package): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" + """Tool to detect and report leaked MPI objects like MPI_Requests and + MPI_Datatypes.""" homepage = "https://github.com/hpc/mpileaks" url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz" diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index 3380c7f823..490e99dd83 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -24,34 +24,40 @@ ############################################################################## from spack import * + class Mrnet(Package): """The MRNet Multi-Cast Reduction Network.""" homepage = "http://paradyn.org/mrnet" url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" - version('5.0.1-2', git='https://github.com/dyninst/mrnet.git', commit='20b1eacfc6d680d9f6472146d2dfaa0f900cc2e9') + version('5.0.1-2', git='https://github.com/dyninst/mrnet.git', + commit='20b1eacfc6d680d9f6472146d2dfaa0f900cc2e9') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') version('4.1.0', '5a248298b395b329e2371bf25366115c') version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') - # Add a patch that brings mrnet-5.0.1 up to date with the current development tree - # The development tree contains fixes needed for the krell based tools - variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") + # Add a patch that brings mrnet-5.0.1 up to date with the current + # development tree The development tree contains fixes needed for the + # krell based tools + variant('krellpatch', default=False, + description="Build MRNet with krell openspeedshop based patch.") patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') - variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") + variant('lwthreads', default=False, + description="Also build the MRNet LW threadsafe libraries") parallel = False depends_on("boost") def install(self, spec, prefix): - # Build the MRNet LW thread safe libraries when the krelloptions variant is present + # Build the MRNet LW thread safe libraries when the krelloptions + # variant is present if '+lwthreads' in spec: - configure("--prefix=%s" %prefix, "--enable-shared", "--enable-ltwt-threadsafe") + configure("--prefix=%s" % prefix, "--enable-shared", + "--enable-ltwt-threadsafe") else: - configure("--prefix=%s" %prefix, "--enable-shared") + configure("--prefix=%s" % prefix, "--enable-shared") make() make("install") - diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py index 925dceabed..9a726e2356 100644 --- a/var/spack/repos/builtin/packages/msgpack-c/package.py +++ b/var/spack/repos/builtin/packages/msgpack-c/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class MsgpackC(Package): """A small, fast binary interchange format convertible to/from JSON""" homepage = "http://www.msgpack.org" @@ -31,6 +32,8 @@ class MsgpackC(Package): version('1.4.1', 'e2fd3a7419b9bc49e5017fdbefab87e0') + depends_on('cmake', type='build') + def install(self, spec, prefix): cmake('.', *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 92c45c9b95..32bc42a9c3 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 glob + class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -33,24 +36,31 @@ class Mumps(Package): version('5.0.1', 'b477573fdcc87babe861f62316833db0') - variant('mpi', default=True, description='Activate the compilation of MUMPS with the MPI support') - variant('scotch', default=False, description='Activate Scotch as a possible ordering library') - variant('ptscotch', default=False, description='Activate PT-Scotch as a possible ordering library') - variant('metis', default=False, description='Activate Metis as a possible ordering library') - variant('parmetis', default=False, description='Activate Parmetis as a possible ordering library') - variant('double', default=True, description='Activate the compilation of dmumps') - variant('float', default=True, description='Activate the compilation of smumps') - variant('complex', default=True, description='Activate the compilation of cmumps and/or zmumps') - variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') + variant('mpi', default=True, + description='Compile MUMPS with MPI support') + variant('scotch', default=False, + description='Activate Scotch as a possible ordering library') + variant('ptscotch', default=False, + description='Activate PT-Scotch as a possible ordering library') + variant('metis', default=False, + description='Activate Metis as a possible ordering library') + variant('parmetis', default=False, + description='Activate Parmetis as a possible ordering library') + variant('double', default=True, + description='Activate the compilation of dmumps') + variant('float', default=True, + description='Activate the compilation of smumps') + variant('complex', default=True, + description='Activate the compilation of cmumps and/or zmumps') + 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') depends_on('parmetis', when="+parmetis") depends_on('blas') - depends_on('lapack') depends_on('scalapack', when='+mpi') depends_on('mpi', when='+mpi') @@ -60,42 +70,54 @@ class Mumps(Package): # 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') - makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib] + makefile_conf = ["LIBBLAS = %s" % to_link_flags( + self.spec['blas'].blas_shared_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 + # /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 @@ -104,7 +126,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 'OPTL = %s -O ' % fpic, 'OPTC = %s -O -DINTSIZE64' % fpic]) else: @@ -113,7 +135,6 @@ 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'), @@ -134,16 +155,17 @@ class Mumps(Package): if '+shared' in self.spec: if sys.platform == 'darwin': - # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) + # 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), + 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'], prefix.lib), # noqa 'RANLIB=echo' ]) else: makefile_conf.extend([ 'LIBEXT=.so', - 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib, + 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib, # noqa 'RANLIB=echo' ]) else: @@ -153,9 +175,8 @@ class Mumps(Package): 'RANLIB = ranlib' ]) - - makefile_inc_template = join_path(os.path.dirname(self.module.__file__), - 'Makefile.inc') + 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,8 +185,6 @@ class Mumps(Package): makefile_inc = '\n'.join(makefile_conf) fh.write(makefile_inc) - - def install(self, spec, prefix): make_libs = [] @@ -189,15 +208,15 @@ class Mumps(Package): install_tree('lib', prefix.lib) install_tree('include', prefix.include) - if '~mpi' in spec: + 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')): + 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 + # FIXME: extend the tests to mpirun -np 2 when build with MPI + # FIXME: use something like numdiff to compare output files with working_dir('examples'): if '+float' in spec: os.system('./ssimpletest < input_simpletest_real') diff --git a/var/spack/repos/builtin/packages/munge/package.py b/var/spack/repos/builtin/packages/munge/package.py index ebe3e18882..51455006e9 100644 --- a/var/spack/repos/builtin/packages/munge/package.py +++ b/var/spack/repos/builtin/packages/munge/package.py @@ -25,12 +25,14 @@ from spack import * import os + class Munge(Package): """ MUNGE Uid 'N' Gid Emporium """ homepage = "https://code.google.com/p/munge/" url = "https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2" - version('0.5.11', 'bd8fca8d5f4c1fcbef1816482d49ee01', url='https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2') + version('0.5.11', 'bd8fca8d5f4c1fcbef1816482d49ee01', + url='https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2') depends_on('openssl') depends_on('libgcrypt') @@ -41,4 +43,3 @@ class Munge(Package): make() make("install") - diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py index 47d1855329..1373c8cd7b 100644 --- a/var/spack/repos/builtin/packages/muparser/package.py +++ b/var/spack/repos/builtin/packages/muparser/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Muparser(Package): """C++ math expression parser library.""" homepage = "http://muparser.beltoforion.de/" diff --git a/var/spack/repos/builtin/packages/muster/package.py b/var/spack/repos/builtin/packages/muster/package.py index 993f147245..81817e48dc 100644 --- a/var/spack/repos/builtin/packages/muster/package.py +++ b/var/spack/repos/builtin/packages/muster/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Muster(Package): """The Muster library provides implementations of sequential and parallel K-Medoids clustering algorithms. It is intended as a @@ -39,6 +40,7 @@ class Muster(Package): depends_on("boost") depends_on("mpi") + depends_on('cmake', type='build') def install(self, spec, prefix): cmake(".", *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index d1944023d1..17124a0572 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): @@ -41,7 +40,8 @@ class Mvapich2(Package): provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2 provides('mpi@:3.0', when='@2.0:') # MVAPICH2-2.0 supports MPI 3.0 - variant('debug', default=False, description='Enables debug information and error messages at run-time') + variant('debug', default=False, + description='Enable debug info and error messages at run-time') ########## # TODO : Process managers should be grouped into the same variant, @@ -52,10 +52,14 @@ class Mvapich2(Package): GFORKER = 'gforker' REMSHELL = 'remshell' SLURM_INCOMPATIBLE_PMS = (HYDRA, GFORKER, REMSHELL) - variant(SLURM, default=False, description='Sets slurm as the only process manager') - variant(HYDRA, default=False, description='Sets hydra as one of the process managers') - variant(GFORKER, default=False, description='Sets gforker as one of the process managers') - variant(REMSHELL, default=False, description='Sets remshell as one of the process managers') + variant(SLURM, default=False, + description='Set slurm as the only process manager') + variant(HYDRA, default=False, + description='Set hydra as one of the process managers') + variant(GFORKER, default=False, + description='Set gforker as one of the process managers') + variant(REMSHELL, default=False, + description='Set remshell as one of the process managers') ########## ########## @@ -68,15 +72,28 @@ class Mvapich2(Package): NEMESIS = 'nemesis' MRAIL = 'mrail' SUPPORTED_NETWORKS = (PSM, SOCK, NEMESIS, NEMESISIB, NEMESISIBTCP) - variant(PSM, default=False, description='Configures a build for QLogic PSM-CH3') - variant(SOCK, default=False, description='Configures a build for TCP/IP-CH3') - variant(NEMESISIBTCP, default=False, description='Configures a build for both OFA-IB-Nemesis and TCP/IP-Nemesis') - variant(NEMESISIB, default=False, description='Configures a build for OFA-IB-Nemesis') - variant(NEMESIS, default=False, description='Configures a build for TCP/IP-Nemesis') - variant(MRAIL, default=False, description='Configures a build for OFA-IB-CH3') + variant( + PSM, default=False, + description='Configure for QLogic PSM-CH3') + variant( + SOCK, default=False, + description='Configure for TCP/IP-CH3') + variant( + NEMESISIBTCP, default=False, + description='Configure for both OFA-IB-Nemesis and TCP/IP-Nemesis') + variant( + NEMESISIB, default=False, + description='Configure for OFA-IB-Nemesis') + variant( + NEMESIS, default=False, + description='Configure for TCP/IP-Nemesis') + variant( + MRAIL, default=False, + description='Configure for OFA-IB-CH3') ########## # FIXME : CUDA support is missing + depends_on('libpciaccess') def url_for_version(self, version): base_url = "http://mvapich.cse.ohio-state.edu/download" @@ -192,6 +209,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 +267,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/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py new file mode 100644 index 0000000000..113c48c18f --- /dev/null +++ b/var/spack/repos/builtin/packages/mxml/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 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 + """ + + homepage = "http://www.msweet.org" + url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" + + version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19') + version('2.8', 'd85ee6d30de053581242c4a86e79a5d2') + version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9') + version('2.6', '68977789ae64985dddbd1a1a1652642e') + version('2.5', 'f706377fba630b39fa02fd63642b17e5') + + # 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/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index 63269a50b1..792e3fe3c7 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -43,8 +43,8 @@ class Nag(Package): def url_for_version(self, version): # TODO: url and checksum are architecture dependent # TODO: We currently only support x86_64 - return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % \ - str(version).replace('.', '') + return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % str( + version).replace('.', '') def install(self, spec, prefix): # Set installation directories diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py index c955e6d13e..9faccccaae 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Nasm(Package): """NASM (Netwide Assembler) is an 80x86 assembler designed for portability and modularity. It includes a disassembler as well.""" diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py index 68bddd6957..d59ca09381 100644 --- a/var/spack/repos/builtin/packages/nccmp/package.py +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Nccmp(Package): """Compare NetCDF Files""" homepage = "http://nccmp.sourceforge.net/" diff --git a/var/spack/repos/builtin/packages/ncdu/package.py b/var/spack/repos/builtin/packages/ncdu/package.py index 0f2f9cda45..2147319d3f 100644 --- a/var/spack/repos/builtin/packages/ncdu/package.py +++ b/var/spack/repos/builtin/packages/ncdu/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Ncdu(Package): """ Ncdu is a disk usage analyzer with an ncurses interface. It is designed @@ -38,15 +39,15 @@ class Ncdu(Package): version('1.11', '9e44240a5356b029f05f0e70a63c4d12') version('1.10', '7535decc8d54eca811493e82d4bfab2d') - version('1.9' , '93258079db897d28bb8890e2db89b1fb') - version('1.8' , '94d7a821f8a0d7ba8ef3dd926226f7d5') - version('1.7' , '172047c29d232724cc62e773e82e592a') + version('1.9', '93258079db897d28bb8890e2db89b1fb') + version('1.8', '94d7a821f8a0d7ba8ef3dd926226f7d5') + version('1.7', '172047c29d232724cc62e773e82e592a') depends_on("ncurses") def install(self, spec, prefix): configure('--prefix=%s' % prefix, - '--with-ncurses=%s' % spec['ncurses']) + '--with-ncurses=%s' % spec['ncurses']) make() make("install") diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 4bc4da68e3..16d72b4593 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class Nco(Package): """The NCO toolkit manipulates and analyzes data stored in @@ -39,9 +39,9 @@ class Nco(Package): depends_on('netcdf') depends_on('antlr@2.7.7+cxx') # (required for ncap2) - depends_on('gsl') # (desirable for ncap2) + depends_on('gsl') # (desirable for ncap2) depends_on('udunits2') # (allows dimensional unit transformations) - # depends_on('opendap') # (enables network transparency), + # depends_on('opendap') # (enables network transparency), def install(self, spec, prefix): opts = [ diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 3ab2b0477d..aaacbac7b1 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -24,11 +24,14 @@ ############################################################################## from spack import * + class Ncurses(Package): - """The ncurses (new curses) library is a free software emulation of curses - in System V Release 4.0, and more. It uses terminfo format, supports pads and - color and multiple highlights and forms characters and function-key mapping, - and has all the other SYSV-curses enhancements over BSD curses. + """The ncurses (new curses) library is a free software emulation of + curses in System V Release 4.0, and more. It uses terminfo format, + supports pads and color and multiple highlights and forms + characters and function-key mapping, and has all the other + SYSV-curses enhancements over BSD curses. + """ homepage = "http://invisible-island.net/ncurses/ncurses.html" diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index b39e17ca49..f61e6984b5 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Ncview(Package): """Simple viewer for NetCDF files.""" homepage = "http://meteora.ucsd.edu/~pierce/ncview_home_page.html" diff --git a/var/spack/repos/builtin/packages/ndiff/package.py b/var/spack/repos/builtin/packages/ndiff/package.py index 3c9dd4054a..dc41add03f 100644 --- a/var/spack/repos/builtin/packages/ndiff/package.py +++ b/var/spack/repos/builtin/packages/ndiff/package.py @@ -24,11 +24,15 @@ ############################################################################## from spack import * + class Ndiff(Package): - """The ndiff tool is a binary utility that compares putatively similar files - while ignoring small numeric differernces. This utility is most often used - to compare files containing a lot of floating-point numeric data that - may be slightly different due to numeric error.""" + """The ndiff tool is a binary utility that compares putatively similar + files while ignoring small numeric differernces. This utility is + most often used to compare files containing a lot of + floating-point numeric data that may be slightly different due to + numeric error. + + """ homepage = "http://ftp.math.utah.edu/pub/ndiff/" url = "http://ftp.math.utah.edu/pub/ndiff/ndiff-2.00.tar.gz" diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 994c51c0da..2c3ab73309 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class NetcdfCxx(Package): """Deprecated C++ compatibility bindings for NetCDF. These do NOT read or write NetCDF-4 files, and are no longer diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py index f8af76429b..0fb181a7b2 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py @@ -34,7 +34,7 @@ class NetcdfCxx4(Package): version('4.2.1', 'd019853802092cf686254aaba165fc81') depends_on('netcdf') - depends_on("autoconf") + depends_on("autoconf", type='build') def install(self, spec, prefix): # Rebuild to prevent problems of inconsistency in git repo 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/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index c2256d5e9f..ab40c14340 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -26,20 +26,23 @@ from spack import * class Netcdf(Package): - """NetCDF is a set of software libraries and self-describing, machine-independent - data formats that support the creation, access, and sharing of array-oriented - scientific data.""" + """NetCDF is a set of software libraries and self-describing, + machine-independent data formats that support the creation, access, + and sharing of array-oriented scientific data. + + """ homepage = "http://www.unidata.ucar.edu/software/netcdf" url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz" + version('4.4.1', '7843e35b661c99e1d49e60791d5072d8') version('4.4.0', 'cffda0cbd97fdb3a06e9274f7aef438e') version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') variant('mpi', default=True, description='Enables MPI parallelism') variant('hdf4', default=False, description='Enable HDF4 support') - depends_on("m4") + depends_on("m4", type='build') depends_on("hdf", when='+hdf4') # Required for DAP support @@ -47,8 +50,10 @@ class Netcdf(Package): # Required for NetCDF-4 support depends_on("zlib") - depends_on("hdf5+mpi", when='+mpi') - depends_on("hdf5~mpi", when='~mpi') + depends_on('hdf5@:1.8+mpi', when='@:4.4.0+mpi') + depends_on('hdf5+mpi', when='@4.4.1:+mpi') + depends_on('hdf5@:1.8~mpi', when='@:4.4.0~mpi') + depends_on('hdf5~mpi', when='@4.4.1:~mpi') def install(self, spec, prefix): # Environment variables @@ -71,18 +76,19 @@ class Netcdf(Package): "--enable-dap" ] - # Make sure Netcdf links against Spack's curl - # Otherwise it may pick up system's curl, which could lead to link errors: - # /usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0' + # Make sure Netcdf links against Spack's curl, otherwise + # otherwise it may pick up system's curl, which can give link + # errors, e.g.: + # undefined reference to `SSL_CTX_use_certificate_chain_file` LIBS.append("-lcurl") CPPFLAGS.append("-I%s" % spec['curl'].prefix.include) - LDFLAGS.append( "-L%s" % spec['curl'].prefix.lib) + LDFLAGS.append("-L%s" % spec['curl'].prefix.lib) if '+mpi' in spec: config_args.append('--enable-parallel4') CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix) - LDFLAGS.append( "-L%s/lib" % spec['hdf5'].prefix) + LDFLAGS.append("-L%s/lib" % spec['hdf5'].prefix) # HDF4 support # As of NetCDF 4.1.3, "--with-hdf4=..." is no longer a valid option @@ -90,13 +96,13 @@ class Netcdf(Package): if '+hdf4' in spec: config_args.append("--enable-hdf4") CPPFLAGS.append("-I%s/include" % spec['hdf'].prefix) - LDFLAGS.append( "-L%s/lib" % spec['hdf'].prefix) - LIBS.append( "-l%s" % "jpeg") + LDFLAGS.append("-L%s/lib" % spec['hdf'].prefix) + LIBS.append("-l%s" % "jpeg") if 'szip' in spec: CPPFLAGS.append("-I%s/include" % spec['szip'].prefix) - LDFLAGS.append( "-L%s/lib" % spec['szip'].prefix) - LIBS.append( "-l%s" % "sz") + LDFLAGS.append("-L%s/lib" % spec['szip'].prefix) + LIBS.append("-l%s" % "sz") # Fortran support # In version 4.2+, NetCDF-C and NetCDF-Fortran have split. diff --git a/var/spack/repos/builtin/packages/netgauge/package.py b/var/spack/repos/builtin/packages/netgauge/package.py index be9292fabb..b57cdbe5f3 100644 --- a/var/spack/repos/builtin/packages/netgauge/package.py +++ b/var/spack/repos/builtin/packages/netgauge/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Netgauge(Package): """Netgauge is a high-precision network parameter measurement tool. It supports benchmarking of many different network protocols diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 47857eb713..08c94a5c9b 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -26,11 +26,12 @@ from spack import * class NetlibLapack(Package): - """ - LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix - inversions, least squared solutions to linear sets of equations, eigenvector analysis, singular value - decomposition, etc. It is a very comprehensive and reputable package that has found extensive use in the - scientific community. + """LAPACK version 3.X is a comprehensive FORTRAN library that does + linear algebra operations including matrix inversions, least squared + solutions to linear sets of equations, eigenvector analysis, singular + value decomposition, etc. It is a very comprehensive and reputable + package that has found extensive use in the scientific community. + """ homepage = "http://www.netlib.org/lapack/" url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" @@ -44,37 +45,43 @@ class NetlibLapack(Package): variant('debug', default=False, description='Activates the Debug build type') variant('shared', default=True, description="Build shared library version") - variant('external-blas', default=False, description='Build lapack with an external blas') + variant('external-blas', default=False, + description='Build lapack with an external blas') - variant('lapacke', default=True, description='Activates the build of the LAPACKE C interface') + variant('lapacke', default=True, + description='Activates the build of the LAPACKE C interface') # virtual dependency provides('blas', when='~external-blas') provides('lapack') - depends_on('cmake') + depends_on('cmake', type='build') depends_on('blas', when='+external-blas') - def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. if self.spec.satisfies('@3.6.0:'): - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + filter_file( + '${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', + 'CBLAS/CMakeLists.txt', string=True) def install_one(self, spec, prefix, shared): - cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), - '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), - '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] + cmake_args = [ + '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), + '-DCMAKE_BUILD_TYPE:STRING=%s' % ( + 'Debug' if '+debug' in spec else 'Release'), + '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] if spec.satisfies('@3.6.0:'): - cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS + cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS if '+external-blas' in spec: - # TODO : the mechanism to specify the library should be more general, + # TODO : mechanism to specify the library should be more general, # TODO : but this allows to have an hook to an external blas cmake_args.extend([ '-DUSE_OPTIMIZED_BLAS:BOOL=ON', - '-DBLAS_LIBRARIES:PATH=%s' % join_path(spec['blas'].prefix.lib, 'libblas.a') + '-DBLAS_LIBRARIES:PATH=%s' % join_path( + spec['blas'].prefix.lib, 'libblas.a') ]) cmake_args.extend(std_cmake_args) @@ -85,7 +92,6 @@ class NetlibLapack(Package): make() make("install") - def install(self, spec, prefix): # Always build static libraries. self.install_one(spec, prefix, False) @@ -94,15 +100,17 @@ class NetlibLapack(Package): if '+shared' in spec: self.install_one(spec, prefix, True) - def setup_dependent_package(self, module, dspec): # This is WIP for a prototype interface for virtual packages. # We can update this as more builds start depending on BLAS/LAPACK. - libdir = find_library_path('libblas.a', self.prefix.lib64, self.prefix.lib) + libdir = find_library_path( + 'libblas.a', self.prefix.lib64, self.prefix.lib) self.spec.blas_static_lib = join_path(libdir, 'libblas.a') self.spec.lapack_static_lib = join_path(libdir, 'liblapack.a') if '+shared' in self.spec: - self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) - self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) + self.spec.blas_shared_lib = join_path( + libdir, 'libblas.%s' % dso_suffix) + self.spec.lapack_shared_lib = join_path( + libdir, 'liblapack.%s' % dso_suffix) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index f7fe26a42d..49b8633209 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -25,8 +25,10 @@ from spack import * import sys + class NetlibScalapack(Package): - """ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines""" + """ScaLAPACK is a library of high-performance linear algebra routines for + parallel distributed memory machines""" homepage = "http://www.netlib.org/scalapack/" url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz" @@ -37,21 +39,34 @@ class NetlibScalapack(Package): # versions before 2.0.0 are not using cmake and requires blacs as # a separated package - variant('shared', default=True, description='Build the shared library version') + variant('shared', default=True, + description='Build the shared library version') variant('fpic', default=False, description="Build with -fpic compiler option") provides('scalapack') - depends_on('cmake') depends_on('mpi') depends_on('lapack') + depends_on('cmake', when='@2.0.0:', type='build') def install(self, spec, prefix): options = [ - "-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else 'OFF'), - "-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else 'ON'), - "-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", # forces scalapack to use find_package(LAPACK) - ] + "-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else + 'OFF'), + "-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else + 'ON'), + # forces scalapack to use find_package(LAPACK): + "-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", + ] + + # Make sure we use Spack's Lapack: + options.extend([ + '-DLAPACK_FOUND=true', + '-DLAPACK_INCLUDE_DIRS=%s' % spec['lapack'].prefix.include, + '-DLAPACK_LIBRARIES=%s' % ( + spec['lapack'].lapack_shared_lib if '+shared' in spec else + spec['lapack'].lapack_static_lib), + ]) if '+fpic' in spec: options.extend([ @@ -66,16 +81,15 @@ class NetlibScalapack(Package): make() make("install") - # The shared libraries are not installed correctly on Darwin; correct this + # The shared libraries are not installed correctly on Darwin: if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) - def setup_dependent_package(self, module, dependent_spec): spec = self.spec - lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' - lib_suffix = lib_dsuffix if '+shared' in spec else '.a' + lib_suffix = dso_suffix if '+shared' in spec else 'a' spec.fc_link = '-L%s -lscalapack' % spec.prefix.lib spec.cc_link = spec.fc_link - spec.libraries = [join_path(spec.prefix.lib, 'libscalapack%s' % lib_suffix)] + spec.libraries = [join_path(spec.prefix.lib, + 'libscalapack.%s' % lib_suffix)] diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py index 56e4836611..02e9ef5f1e 100644 --- a/var/spack/repos/builtin/packages/nettle/package.py +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Nettle(Package): """The Nettle package contains the low-level cryptographic library that is designed to fit easily in many contexts.""" diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py new file mode 100644 index 0000000000..54f3dbf915 --- /dev/null +++ b/var/spack/repos/builtin/packages/nextflow/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 Nextflow(Package): + """Data-driven computational pipelines""" + + homepage = "http://www.nextflow.io" + + version('0.20.1', '0e4e0e3eca1c2c97f9b4bffd944b923a', + url='https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow', + expand=False) + + depends_on('jdk') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install("nextflow", join_path(prefix.bin, "nextflow")) + set_executable(join_path(prefix.bin, "nextflow")) diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index e3f3819289..dcd00576dd 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Ninja(Package): """ A small, fast Make alternative """ homepage = "https://martine.github.io/ninja/" @@ -35,7 +36,6 @@ class Ninja(Package): extends('python') def install(self, spec, prefix): - sh = which('sh') python('configure.py', '--bootstrap') cp = which('cp') diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index e15d60cb0b..fb897f560b 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -25,6 +25,7 @@ from spack import * import sys + class Numdiff(Package): """Numdiff is a little program that can be used to compare putatively similar files line by line and field by field, ignoring small numeric @@ -35,7 +36,7 @@ class Numdiff(Package): version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') - depends_on('gettext', sys.platform=='darwin') + depends_on('gettext', when=sys.platform == 'darwin', type='build') def install(self, spec, prefix): options = ['--prefix=%s' % prefix] diff --git a/var/spack/repos/builtin/packages/ocaml/package.py b/var/spack/repos/builtin/packages/ocaml/package.py new file mode 100644 index 0000000000..9488d3b7a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/ocaml/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 Ocaml(Package): + """OCaml is an industrial strength programming language supporting + functional, imperative and object-oriented styles""" + + homepage = "http://ocaml.org/" + url = "http://caml.inria.fr/pub/distrib/ocaml-4.03/ocaml-4.03.0.tar.gz" + + version('4.03.0', '43812739ea1b4641cf480f57f977c149') + + depends_on('ncurses') + + def install(self, spec, prefix): + configure('-prefix', '{0}'.format(prefix)) + + make('world.opt') + make('install') diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 0f0fcfb733..4f9f7b2e12 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -23,24 +23,27 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import platform, sys +import platform + class Oce(Package): - """ - Open CASCADE Community Edition: - patches/improvements/experiments contributed by users over the official Open CASCADE library. + """Open CASCADE Community Edition: + patches/improvements/experiments contributed by users over the official + Open CASCADE library. """ homepage = "https://github.com/tpaviot/oce" url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz" + version('0.17.2', 'bf2226be4cd192606af677cf178088e5') version('0.17.1', '36c67b87093c675698b483454258af91') - version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d') + version('0.17', 'f1a89395c4b0d199bea3db62b85f818d') version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3') - version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca') + version('0.16', '7a4b4df5a104d75a537e25e7dd387eca') - variant('tbb', default=True, description='Build with Intel Threading Building Blocks') + variant('tbb', default=True, + description='Build with Intel Threading Building Blocks') - depends_on('cmake@2.8:') + depends_on('cmake@2.8:', type='build') depends_on('tbb', when='+tbb') # There is a bug in OCE which appears with Clang (version?) or GCC 6.0 @@ -49,8 +52,7 @@ class Oce(Package): # http://tracker.dev.opencascade.org/view.php?id=26042 # https://github.com/tpaviot/oce/issues/605 # https://github.com/tpaviot/oce/commit/61cb965b9ffeca419005bc15e635e67589c421dd.patch - patch('null.patch',when='@0.16:0.17.1') - + patch('null.patch', when='@0.16:0.17.1') def install(self, spec, prefix): options = [] @@ -63,7 +65,8 @@ class Oce(Package): '-DOCE_DISABLE_X11:BOOL=ON', '-DOCE_DRAW:BOOL=OFF', '-DOCE_MODEL:BOOL=ON', - '-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % ('TBB' if '+tbb' in spec else 'NONE'), + '-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % ( + 'TBB' if '+tbb' in spec else 'NONE'), '-DOCE_OCAF:BOOL=ON', '-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF', '-DOCE_VISUALISATION:BOOL=OFF', @@ -77,15 +80,8 @@ class Oce(Package): '-DOCE_OSX_USE_COCOA:BOOL=ON', ]) - cmake('.', *options) + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + cmake('.', *options) make("install/strip") - - # OCE tests build is brocken at least on Darwin. - # Unit tests are linked against libTKernel.10.dylib isntead of /full/path/libTKernel.10.dylib - # see https://github.com/tpaviot/oce/issues/612 - # make("test") - - # The shared libraries are not installed correctly on Darwin; correct this - if (sys.platform == 'darwin'): - fix_darwin_install_name(prefix.lib) + make("test") 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..aa521899e5 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') @@ -59,16 +61,16 @@ class Octave(Package): variant('qrupdate', default=False) variant('qscintilla', default=False) variant('qt', default=False) - variant('suiteparse', default=False) + variant('suitesparse', default=False) variant('zlib', default=False) # Required dependencies depends_on('blas') depends_on('lapack') # Octave does not configure with sed from darwin: - depends_on('sed', sys.platform == 'darwin') + depends_on('sed', when=sys.platform == 'darwin', type='build') depends_on('pcre') - depends_on('pkg-config') + depends_on('pkg-config', type='build') # Strongly recommended dependencies depends_on('readline', when='+readline') @@ -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/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py new file mode 100644 index 0000000000..6fa2e0368f --- /dev/null +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -0,0 +1,86 @@ +############################################################################## +# 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 Octopus(Package): + """A real-space finite-difference (time-dependent) density-functional + theory code.""" + + homepage = "http://www.tddft.org/programs/octopus/" + url = "http://www.tddft.org/programs/octopus/down.php?file=5.0.1/octopus-5.0.1.tar.gz" + + version('5.0.1', '2b6392ab67b843f9d4ca7413fc07e822') + + depends_on('blas') + depends_on('gsl') + depends_on('lapack') + depends_on('libxc') + depends_on('mpi') + depends_on('fftw+mpi') + + # optional dependencies: + # TODO: scalapack, metis, parmetis, netcdf, etsf_io, SPARSKIT, ARPACK, + # FEAST, Libfm, PFFT, ISF, PNFFT + + def install(self, spec, prefix): + args = [] + args.extend([ + '--prefix=%s' % prefix, + '--with-blas=%s' % to_link_flags( + spec['blas'].blas_shared_lib), + '--with-lapack=%s' % to_link_flags( + spec['lapack'].lapack_shared_lib), + '--with-gsl-prefix=%s' % spec['gsl'].prefix, + '--with-libxc-prefix=%s' % spec['libxc'].prefix, + 'CC=%s' % spec['mpi'].mpicc, + 'FC=%s' % spec['mpi'].mpifc, + '--enable-mpi', + '--with-fft-lib=-L%s -lfftw3' % spec['fftw'].prefix.lib + # --with-blacs=${prefix}/lib/libscalapack.dylib + # --with-netcdf-prefix=netcdf-fortran + # --with-etsf-io-prefix= + # --with-sparskit=${prefix}/lib/libskit.a + # --with-pfft-prefix=${prefix} --with-mpifftw-prefix=${prefix} + # --with-arpack=${prefix}/lib/libarpack.dylib + # --with-parpack=${prefix}/lib/libparpack.dylib + # --with-metis-prefix=${prefix} --with-parmetis-prefix=${prefix} + # --with-berkeleygw-prefix=${prefix} + ]) + + # Supposedly configure does not pick up the required flags for gfortran + # Without it there are: + # Error: Line truncated @ global.F90:157:132 + # Error: Unterminated character constant @ global.F90:157:20 + if spec.satisfies('%clang') or spec.satisfies('%gcc'): + args.extend([ + 'FCFLAGS=-O2 -ffree-line-length-none' + ]) + + configure(*args) + make() + # short tests take forever... + # make('check-short') + make('install') diff --git a/var/spack/repos/builtin/packages/ompss/package.py b/var/spack/repos/builtin/packages/ompss/package.py index c0848ffd70..02925974ea 100644 --- a/var/spack/repos/builtin/packages/ompss/package.py +++ b/var/spack/repos/builtin/packages/ompss/package.py @@ -26,19 +26,18 @@ from spack import * import os import glob -# working config lines for ompss 14.06 : -#./nanox-0.7/config.log: $ ./configure --prefix=/usr/gapps/exmatex/ompss --with-mcc=/usr/gapps/exmatex/ompss/ --with-hwloc=/usr -#./mcxx-1.99.2/config.log: $ ./configure --prefix=/usr/gapps/exmatex/ompss --with-nanox=/usr/gapps/exmatex/ompss --enable-ompss --with-mpi=/opt/mvapich2-intel-shmem-1.7 --enable-tl-openmp-profile --enable-tl-openmp-intel class Ompss(Package): - """OmpSs is an effort to integrate features from the StarSs - programming model developed by BSC into a single programming - model. In particular, our objective is to extend OpenMP with - new directives to support asynchronous parallelism and - heterogeneity (devices like GPUs). However, it can also be - understood as new directives extending other accelerator based - APIs like CUDA or OpenCL. Our OmpSs environment is built on top - of our Mercurium compiler and Nanos++ runtime system.""" + """OmpSs is an effort to integrate features from the StarSs programming + model developed by BSC into a single programming model. In + particular, our objective is to extend OpenMP with new directives + to support asynchronous parallelism and heterogeneity (devices + like GPUs). However, it can also be understood as new directives + extending other accelerator based APIs like CUDA or OpenCL. Our + OmpSs environment is built on top of our Mercurium compiler and + Nanos++ runtime system. + + """ homepage = "http://pm.bsc.es/" url = "http://pm.bsc.es/sites/default/files/ftp/ompss/releases/ompss-14.10.tar.gz" list_url = 'http://pm.bsc.es/ompss-downloads' @@ -47,7 +46,7 @@ class Ompss(Package): # all dependencies are optional, really depends_on("mpi") - #depends_on("openmp") + # depends_on("openmp") depends_on("hwloc") depends_on("extrae") @@ -61,14 +60,22 @@ class Ompss(Package): openmp_options = ["--enable-tl-openmp-profile"] if spec.satisfies('%intel'): - openmp_options.append( "--enable-tl-openmp-intel" ) + openmp_options.append("--enable-tl-openmp-intel") os.chdir(glob.glob('./nanox-*').pop()) - configure("--prefix=%s" % prefix, "--with-mcc=%s" % prefix, "--with-extrae=%s" % spec['extrae'].prefix, "--with-hwloc=%s" % spec['hwloc'].prefix) + configure("--prefix=%s" % prefix, + "--with-mcc=%s" % prefix, + "--with-extrae=%s" % + spec['extrae'].prefix, + "--with-hwloc=%s" % spec['hwloc'].prefix) make() make("install") os.chdir(glob.glob('../mcxx-*').pop()) - configure("--prefix=%s" % prefix, "--with-nanox=%s" % prefix, "--enable-ompss", "--with-mpi=%s" % mpi.prefix, *openmp_options) + configure("--prefix=%s" % prefix, + "--with-nanox=%s" % prefix, + "--enable-ompss", + "--with-mpi=%s" % mpi.prefix, + *openmp_options) make() make("install") diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py index e74dcf6c23..40159e4c6c 100644 --- a/var/spack/repos/builtin/packages/ompt-openmp/package.py +++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py @@ -24,24 +24,26 @@ ############################################################################## from spack import * + class OmptOpenmp(Package): - """LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP mirror. This library provides a drop-in replacement of the OpenMP runtimes for GCC, Intel and LLVM/Clang.""" + """LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the + OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP + mirror. This library provides a drop-in replacement of the OpenMP + runtimes for GCC, Intel and LLVM/Clang. + + """ homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" url = "http://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz" version('0.1', '2334e6a84b52da41b27afd9831ed5370') - # depends_on("foo") + depends_on('cmake', type='build') def install(self, spec, prefix): with working_dir("runtime/build", create=True): - - # FIXME: Modify the configure line to suit your build system here. - cmake('-DCMAKE_C_COMPILER=%s' % self.compiler.cc, + cmake('-DCMAKE_C_COMPILER=%s' % self.compiler.cc, '-DCMAKE_CXX_COMPILER=%s' % self.compiler.cxx, '-DCMAKE_INSTALL_PREFIX=%s' % prefix, '..', *std_cmake_args) - - # FIXME: Add logic to build and install here make() make("install") diff --git a/var/spack/repos/builtin/packages/opari2/package.py b/var/spack/repos/builtin/packages/opari2/package.py index 510fff9fc2..e901f8ed39 100644 --- a/var/spack/repos/builtin/packages/opari2/package.py +++ b/var/spack/repos/builtin/packages/opari2/package.py @@ -25,18 +25,24 @@ from spack import * + class Opari2(Package): """ - OPARI2 is a source-to-source instrumentation tool for OpenMP and hybrid codes. It surrounds OpenMP directives and - runtime library calls with calls to the POMP2 measurement interface. OPARI2 will provide you with a new - initialization method that allows for multi-directory and parallel builds as well as the usage of pre-instrumented - libraries. Furthermore, an efficient way of tracking parent-child relationships was added. Additionally, we extended - OPARI2 to support instrumentation of OpenMP 3.0 tied tasks. + OPARI2 is a source-to-source instrumentation tool for OpenMP and hybrid + codes. It surrounds OpenMP directives and runtime library calls with calls + to the POMP2 measurement interface. OPARI2 will provide you with a new + initialization method that allows for multi-directory and parallel builds + as well as the usage of pre-instrumented libraries. Furthermore, an + efficient way of tracking parent-child relationships was added. + Additionally, we extended OPARI2 to support instrumentation of OpenMP 3.0 + tied tasks. """ homepage = "http://www.vi-hps.org/projects/score-p" url = "http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.2.tar.gz" + version('2.0', '72350dbdb6139f2e68a5055a4f0ba16c', + url='http://www.vi-hps.org/upload/packages/opari2/opari2-2.0.tar.gz') version('1.1.4', '245d3d11147a06de77909b0805f530c0', url='http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.4.tar.gz') version('1.1.2', '9a262c7ca05ff0ab5f7775ae96f3539e') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 22e49daaa7..37f7a7005d 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -37,9 +37,12 @@ class Openblas(Package): version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') - variant('shared', default=True, description="Build shared libraries as well as static libs.") # NOQA: ignore=E501 - variant('openmp', default=False, description="Enable OpenMP support.") - variant('fpic', default=True, description="Build position independent code") # NOQA: ignore=E501 + variant('shared', default=True, + description="Build shared libraries as well as static libs.") + variant('openmp', default=False, + description="Enable OpenMP support.") + variant('fpic', default=True, + description="Build position independent code") # virtual dependency provides('blas') @@ -48,6 +51,13 @@ class Openblas(Package): patch('make.patch') def install(self, spec, prefix): + # As of 06/2016 there is no mechanism to specify that packages which + # depends on Blas/Lapack need C or/and Fortran symbols. For now + # require both. + if self.compiler.f77 is None: + raise InstallError('OpenBLAS requires both C and Fortran ', + 'compilers!') + # Configure fails to pick up fortran from FC=/abs/path/to/f77, but # works fine with FC=/abs/path/to/gfortran. # When mixing compilers make sure that diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py index 989c66316c..03cc7ba427 100644 --- a/var/spack/repos/builtin/packages/opencv/package.py +++ b/var/spack/repos/builtin/packages/opencv/package.py @@ -23,50 +23,186 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +from glob import glob class Opencv(Package): + """OpenCV is released under a BSD license and hence it's free for both + academic and commercial use. It has C++, C, Python and Java interfaces and + supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for + computational efficiency and with a strong focus on real-time applications. + Written in optimized C/C++, the library can take advantage of multi-core + processing. Enabled with OpenCL, it can take advantage of the hardware + acceleration of the underlying heterogeneous compute platform. Adopted all + around the world, OpenCV has more than 47 thousand people of user community + and estimated number of downloads exceeding 9 million. Usage ranges from + interactive art, to mines inspection, stitching maps on the web or through + advanced robotics. """ - OpenCV is released under a BSD license and hence it's free for both academic and commercial use. It has C++, C, - Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for - computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library - can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware - acceleration of the underlying heterogeneous compute platform. Adopted all around the world, OpenCV has more than - 47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from - interactive art, to mines inspection, stitching maps on the web or through advanced robotics. - """ + homepage = 'http://opencv.org/' url = 'https://github.com/Itseez/opencv/archive/3.1.0.tar.gz' version('3.1.0', '70e1dd07f0aa06606f1bc0e3fa15abd3') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds a debug version of the libraries') variant('eigen', default=True, description='Activates support for eigen') variant('ipp', default=True, description='Activates support for IPP') + variant('jasper', default=True, description='Activates support for JasPer') + variant('cuda', default=False, description='Activates support for CUDA') + variant('gtk', default=False, description='Activates support for GTK') + variant('vtk', default=False, description='Activates support for VTK') + variant('qt', default=False, description='Activates support for QT') + variant('python', default=False, + description='Enables the build of Python extensions') + variant('java', default=False, + description='Activates support for Java') + + depends_on('cmake', type='build') + depends_on('eigen', when='+eigen', type='build') depends_on('zlib') depends_on('libpng') depends_on('libjpeg-turbo') depends_on('libtiff') - depends_on('python') - depends_on('py-numpy') - - depends_on('eigen', when='+eigen') + depends_on('jasper', when='+jasper') + depends_on('cuda', when='+cuda') + depends_on('gtkplus', when='+gtk') + depends_on('vtk', when='+vtk') + depends_on('qt', when='+qt') + depends_on('jdk', when='+java') + depends_on('py-numpy', when='+python', type='nolink') - # FIXME : GUI extensions missing - # FIXME : CUDA extensions still missing + extends('python', when='+python') def install(self, spec, prefix): cmake_options = [] cmake_options.extend(std_cmake_args) - cmake_options.extend(['-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), - '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), - '-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF', - '-DWITH_IPP:BOOL=%s' % ('ON' if '+ipp' in spec else 'OFF')]) + cmake_options.extend([ + '-DCMAKE_BUILD_TYPE:STRING={0}'.format(( + 'Debug' if '+debug' in spec else 'Release')), + '-DBUILD_SHARED_LIBS:BOOL={0}'.format(( + 'ON' if '+shared' in spec else 'OFF')), + '-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF', + '-DWITH_IPP:BOOL={0}'.format(( + 'ON' if '+ipp' in spec else 'OFF')), + '-DWITH_CUDA:BOOL={0}'.format(( + 'ON' if '+cuda' in spec else 'OFF')), + '-DWITH_QT:BOOL={0}'.format(( + 'ON' if '+qt' in spec else 'OFF')), + '-DWITH_VTK:BOOL={0}'.format(( + 'ON' if '+vtk' in spec else 'OFF')), + '-DBUILD_opencv_java:BOOL={0}'.format(( + 'ON' if '+java' in spec else 'OFF')), + ]) + + # Media I/O + zlib = spec['zlib'] + cmake_options.extend([ + '-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(zlib.prefix.lib, + 'libz.{0}'.format(dso_suffix))), + '-DZLIB_INCLUDE_DIR:PATH={0}'.format(zlib.prefix.include) + ]) + + libpng = spec['libpng'] + cmake_options.extend([ + '-DPNG_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(libpng.prefix.lib, + 'libpng.{0}'.format(dso_suffix))), + '-DPNG_INCLUDE_DIR:PATH={0}'.format(libpng.prefix.include) + ]) + + libjpeg = spec['libjpeg-turbo'] + cmake_options.extend([ + '-DJPEG_LIBRARY:FILEPATH={0}'.format( + join_path(libjpeg.prefix.lib, + 'libjpeg.{0}'.format(dso_suffix))), + '-DJPEG_INCLUDE_DIR:PATH={0}'.format(libjpeg.prefix.include) + ]) + + libtiff = spec['libtiff'] + cmake_options.extend([ + '-DTIFF_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(libtiff.prefix.lib, + 'libtiff.{0}'.format(dso_suffix))), + '-DTIFF_INCLUDE_DIR:PATH={0}'.format(libtiff.prefix.include) + ]) + + jasper = spec['jasper'] + cmake_options.extend([ + '-DJASPER_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(jasper.prefix.lib, + 'libjasper.{0}'.format(dso_suffix))), + '-DJASPER_INCLUDE_DIR:PATH={0}'.format(jasper.prefix.include) + ]) + + # GUI + if '+gtk' not in spec: + cmake_options.extend([ + '-DWITH_GTK:BOOL=OFF', + '-DWITH_GTK_2_X:BOOL=OFF' + ]) + elif '^gtkplus@3:' in spec: + cmake_options.extend([ + '-DWITH_GTK:BOOL=ON', + '-DWITH_GTK_2_X:BOOL=OFF' + ]) + elif '^gtkplus@2:3' in spec: + cmake_options.extend([ + '-DWITH_GTK:BOOL=OFF', + '-DWITH_GTK_2_X:BOOL=ON' + ]) + + # Python + if '+python' in spec: + python = spec['python'] + + try: + python_lib = glob(join_path( + python.prefix.lib, 'libpython*.{0}'.format(dso_suffix)))[0] + except KeyError: + raise InstallError('Cannot find libpython') + + try: + python_include_dir = glob(join_path(python.prefix.include, + 'python*'))[0] + except KeyError: + raise InstallError('Cannot find python include directory') + + if '^python@3:' in spec: + python_exe = join_path(python.prefix.bin, 'python3') + cmake_options.extend([ + '-DBUILD_opencv_python3=ON', + '-DPYTHON3_EXECUTABLE={0}'.format(python_exe), + '-DPYTHON3_LIBRARY={0}'.format(python_lib), + '-DPYTHON3_INCLUDE_DIR={0}'.format(python_include_dir), + '-DBUILD_opencv_python2=OFF', + ]) + elif '^python@2:3' in spec: + python_exe = join_path(python.prefix.bin, 'python2') + cmake_options.extend([ + '-DBUILD_opencv_python2=ON', + '-DPYTHON2_EXECUTABLE={0}'.format(python_exe), + '-DPYTHON2_LIBRARY={0}'.format(python_lib), + '-DPYTHON2_INCLUDE_DIR={0}'.format(python_include_dir), + '-DBUILD_opencv_python3=OFF', + ]) + else: + cmake_options.extend([ + '-DBUILD_opencv_python2=OFF', + '-DBUILD_opencv_python3=OFF' + ]) with working_dir('spack_build', create=True): cmake('..', *cmake_options) diff --git a/var/spack/repos/builtin/packages/openexr/package.py b/var/spack/repos/builtin/packages/openexr/package.py new file mode 100644 index 0000000000..3619bd063c --- /dev/null +++ b/var/spack/repos/builtin/packages/openexr/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 Openexr(Package): + """OpenEXR Graphics Tools (high dynamic-range image file format)""" + + homepage = "http://www.openexr.com/" + url = "https://savannah.nongnu.org/download/openexr/openexr-2.2.0.tar.gz" + + version('2.2.0', 'b64e931c82aa3790329c21418373db4e') + version('2.1.0', '33735d37d2ee01c6d8fbd0df94fb8b43') + version('2.0.1', '4387e6050d2faa65dd5215618ff2ddce') + version('1.7.0', '27113284f7d26a58f853c346e0851d7a') + version('1.6.1', '11951f164f9c872b183df75e66de145a') + version('1.5.0', '55342d2256ab3ae99da16f16b2e12ce9') + version('1.4.0a', 'd0a4b9a930c766fa51561b05fb204afe') + version('1.3.2', '1522fe69135016c52eb88fc7d8514409') + + variant('debug', default=False, + description='Builds a debug version of the libraries') + + depends_on('pkg-config', type='build') + depends_on('ilmbase') + + def install(self, spec, prefix): + configure_options = ['--prefix={0}'.format(prefix)] + if '+debug' not in spec: + configure_options.append('--disable-debug') + configure(*configure_options) + make('install') diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py index 9b2063593a..1bc5b04f6f 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', type='build') 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 4e465e1784..b0efe27def 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,8 @@ class Openmpi(Package): list_url = "http://www.open-mpi.org/software/ompi/" list_depth = 3 + version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674') + version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b') version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c') version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') version('1.10.0', '280cf952de68369cebaca886c5ce0304') @@ -72,48 +76,77 @@ 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 provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') + provides('mpi@:3.1', when='@2.0.0:') depends_on('hwloc') 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) 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 @@ -125,6 +158,10 @@ class Openmpi(Package): "--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 @@ -135,14 +172,15 @@ 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'), '--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' ]) if '+verbs' in spec: path = _verbs_dir() - if path is not None: + if path is not None and path not in ('/usr', '/usr/local'): config_args.append('--with-%s=%s' % (self.verbs, path)) else: config_args.append('--with-%s' % self.verbs) @@ -153,10 +191,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() @@ -173,40 +208,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/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index c501ea063c..270a4e68d8 100644 --- a/var/spack/repos/builtin/packages/openspeedshop/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop/package.py @@ -22,7 +22,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -################################################################################ +########################################################################## # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under @@ -38,53 +38,75 @@ # You should have received a copy of the GNU 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 Openspeedshop(Package): - """OpenSpeedShop is a community effort by The Krell Institute with current direct funding from DOEs NNSA. - It builds on top of a broad list of community infrastructures, most notably Dyninst and MRNet from UW, - libmonitor from Rice, and PAPI from UTK. OpenSpeedShop is an open source multi platform Linux performance - tool which is targeted to support performance analysis of applications running on both single node and - large scale IA64, IA32, EM64T, AMD64, PPC, ARM, Blue Gene and Cray platforms. OpenSpeedShop development - is hosted by the Krell Institute. The infrastructure and base components of OpenSpeedShop are released - as open source code primarily under LGPL. + """OpenSpeedShop is a community effort by The Krell Institute with + current direct funding from DOEs NNSA. It builds on top of a broad + list of community infrastructures, most notably Dyninst and MRNet + from UW, libmonitor from Rice, and PAPI from UTK. OpenSpeedShop is an + open source multi platform Linux performance tool which is targeted + to support performance analysis of applications running on both + single node and large scale IA64, IA32, EM64T, AMD64, PPC, ARM, Blue + Gene and Cray platforms. OpenSpeedShop development is hosted by the + Krell Institute. The infrastructure and base components of + OpenSpeedShop are released as open source code primarily under LGPL. + """ homepage = "http://www.openspeedshop.org" - url = "https://github.com/OpenSpeedShop" + url = "https://github.com/OpenSpeedShop" version('2.2', '16cb051179c2038de4e8a845edf1d573') # Use when the git repository is available - version('2.2', branch='master', git='https://github.com/OpenSpeedShop/openspeedshop.git') + version('2.2', branch='master', + git='https://github.com/OpenSpeedShop/openspeedshop.git') # Optional mirror template - #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz" - #version('2.2', '643337740dc6c2faca60f42d3620b0e1') + # url="file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz" + # version('2.2', '643337740dc6c2faca60f42d3620b0e1') parallel = False - variant('offline', default=True, description="build with offline instrumentor enabled.") - variant('cbtf', default=False, description="build with cbtf instrumentor enabled.") - variant('runtime', default=False, description="build only the runtime libraries and collectors.") - variant('frontend', default=False, description="build only the front-end tool using the runtime_dir to point to the target build.") - variant('cuda', default=False, description="build with cuda packages included.") - variant('ptgf', default=False, description="build with the PTGF based gui package enabled.") - variant('rtfe', default=False, description="build for generic cluster platforms that have different processors on the fe and be nodes.") + variant('offline', default=True, + description="build with offline instrumentor enabled.") + variant('cbtf', default=False, + description="build with cbtf instrumentor enabled.") + variant('runtime', default=False, + description="build only the runtime libraries and collectors.") + variant('frontend', default=False, + description="build only the front-end tool using the runtime_dir " + "to point to the target build.") + variant('cuda', default=False, + description="build with cuda packages included.") + variant('ptgf', default=False, + description="build with the PTGF based gui package enabled.") + variant('rtfe', default=False, + description="build for generic cluster platforms that have " + "different processors on the fe and be nodes.") # MPI variants - variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.") - variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.") - variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.") - variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.") - variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.") - variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.") - - depends_on("cmake@3.0.2") - # Dependencies for openspeedshop that are common to all the variants of the OpenSpeedShop build - depends_on("bison") - depends_on("flex") - depends_on("binutils@2.24+krellpatch") + variant('openmpi', default=False, + description="Build mpi experiment collector for openmpi MPI.") + variant('mpt', default=False, + description="Build mpi experiment collector for SGI MPT MPI.") + variant('mvapich2', default=False, + description="Build mpi experiment collector for mvapich2 MPI.") + variant('mvapich', default=False, + description="Build mpi experiment collector for mvapich MPI.") + variant('mpich2', default=False, + description="Build mpi experiment collector for mpich2 MPI.") + variant('mpich', default=False, + description="Build mpi experiment collector for mpich MPI.") + + depends_on("cmake@3.0.2", type='build') + # Dependencies for openspeedshop that are common to all the variants of + # the OpenSpeedShop build + depends_on("bison", type='build') + depends_on("flex", type='build') + depends_on("binutils@2.24+krellpatch", type='build') depends_on("libelf") depends_on("libdwarf") depends_on("sqlite") @@ -111,11 +133,13 @@ class Openspeedshop(Package): depends_on("mrnet@5.0.1:+lwthreads+krellpatch", when='+cbtf') def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): - # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + # Sets build type parameters into cmakeOptions the options that will + # enable the cbtf-krell built type settings - compile_flags="-O2 -g" + compile_flags = "-O2 -g" BuildTypeOptions = [] - # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the + # stdcmakeargs for word in cmakeOptions[:]: if word.startswith('-DCMAKE_BUILD_TYPE'): cmakeOptions.remove(word) @@ -124,63 +148,64 @@ class Openspeedshop(Package): if word.startswith('-DCMAKE_C_FLAGS'): cmakeOptions.remove(word) BuildTypeOptions.extend([ - '-DCMAKE_BUILD_TYPE=None', - '-DCMAKE_CXX_FLAGS=%s' % compile_flags, - '-DCMAKE_C_FLAGS=%s' % compile_flags + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags ]) cmakeOptions.extend(BuildTypeOptions) def set_mpi_cmakeOptions(self, spec, cmakeOptions): - # Appends to cmakeOptions the options that will enable the appropriate MPI implementations - + # Appends to cmakeOptions the options that will enable the appropriate + # MPI implementations + MPIOptions = [] # openmpi if '+openmpi' in spec: MPIOptions.extend([ - '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix + '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix ]) # mpich if '+mpich' in spec: MPIOptions.extend([ - '-DMPICH_DIR=%s' % spec['mpich'].prefix + '-DMPICH_DIR=%s' % spec['mpich'].prefix ]) # mpich2 if '+mpich2' in spec: MPIOptions.extend([ - '-DMPICH2_DIR=%s' % spec['mpich2'].prefix + '-DMPICH2_DIR=%s' % spec['mpich2'].prefix ]) # mvapich if '+mvapich' in spec: MPIOptions.extend([ - '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix + '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix ]) # mvapich2 if '+mvapich2' in spec: MPIOptions.extend([ - '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix + '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix ]) # mpt if '+mpt' in spec: MPIOptions.extend([ - '-DMPT_DIR=%s' % spec['mpt'].prefix + '-DMPT_DIR=%s' % spec['mpt'].prefix ]) cmakeOptions.extend(MPIOptions) - def install(self, spec, prefix): - #openmpi_prefix_path = "/opt/openmpi-1.8.2" - #mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" - #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, - #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, - #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, + # openmpi_prefix_path = "/opt/openmpi-1.8.2" + # mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" + # '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + # '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + # '-DMVAPICH_DIR=%s' % mvapich_prefix_path, - # FIXME: How do we make this dynamic in spack? That is, can we specify the paths to cuda dynamically? - # WAITING for external package support. - #if '+cuda' in spec: + # FIXME: How do we make this dynamic in spack? + # FIXME: That is, can we specify the paths to cuda dynamically? + # WAITING for external package support. + # if '+cuda' in spec: # cuda_prefix_path = "/usr/local/cuda-6.0" # cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" @@ -190,19 +215,20 @@ class Openspeedshop(Package): with working_dir('build_runtime', create=True): cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DINSTRUMENTOR=%s' % instrumentor_setting, - '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, - '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - '-DPAPI_DIR=%s' % spec['papi'].prefix - ]) - + cmakeOptions.extend([ + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix]) + # Add any MPI implementations coming from variant settings self.set_mpi_cmakeOptions(spec, cmakeOptions) cmakeOptions.extend(std_cmake_args) - # Adjust the build options to the favored ones for this build + # Adjust the build options to the favored ones for this + # build self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) cmake('..', *cmakeOptions) @@ -214,43 +240,49 @@ class Openspeedshop(Package): cmake_prefix_path = join_path(spec['dyninst'].prefix) with working_dir('build', create=True): - #python_vers=join_path(spec['python'].version[:2]) - #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, - #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, - #'-DMPICH_DIR=%s' % spec['mpich'].prefix, - #'-DMPICH2_DIR=%s' % spec['mpich2'].prefix, - #'-DBoost_NO_SYSTEM_PATHS=TRUE', - #'-DBOOST_ROOT=%s' % spec['boost'].prefix, - #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + # python_vers=join_path(spec['python'].version[:2]) + # '-DOPENMPI_DIR=%s' % openmpi_prefix_path, + # '-DMVAPICH_DIR=%s' % mvapich_prefix_path, + # '-DMPICH_DIR=%s' % spec['mpich'].prefix, + # '-DMPICH2_DIR=%s' % spec['mpich2'].prefix, + # '-DBoost_NO_SYSTEM_PATHS=TRUE', + # '-DBOOST_ROOT=%s' % spec['boost'].prefix, + # '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, - python_vers='%d.%d' % spec['python'].version[:2] + python_vers = '%d.%d' % spec['python'].version[:2] cmakeOptions = [] - cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DINSTRUMENTOR=%s' % instrumentor_setting, - '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - '-DLIBELF_DIR=%s' % spec['libelf'].prefix, - '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, - '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, - '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - '-DPAPI_DIR=%s' % spec['papi'].prefix, - '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, - '-DQTLIB_DIR=%s' % spec['qt'].prefix, - '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), - '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, - '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DDYNINST_DIR=%s' % spec['dyninst'].prefix - ]) + cmakeOptions.extend([ + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, + '-DQTLIB_DIR=%s' % spec['qt'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path( + spec['python'].prefix, '/bin/python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path( + spec['python'].prefix.include, + 'python' + python_vers), + '-DPYTHON_LIBRARY=%s' % join_path( + spec['python'].prefix.lib, + 'libpython' + python_vers + '.so'), + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix]) # Add any MPI implementations coming from variant settings self.set_mpi_cmakeOptions(spec, cmakeOptions) cmakeOptions.extend(std_cmake_args) - # Adjust the build options to the favored ones for this build + # Adjust the build options to the favored ones for this + # build self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) cmake('..', *cmakeOptions) @@ -261,160 +293,171 @@ class Openspeedshop(Package): elif '+cbtf' in spec: instrumentor_setting = "cbtf" - resolve_symbols = "symtabapi" - cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + ':' + join_path(spec['dyninst'].prefix) - #runtime_platform_cray = "cray" - #if '+cray' in spec: + cmake_prefix_path = ':'.join(spec['cbtf'].prefix, + spec['cbtf-krell'].prefix, + spec['dyninst'].prefix) + + # resolve_symbols = "symtabapi" + # runtime_platform_cray = "cray" + # if '+cray' in spec: # if '+runtime' in spec: - # #-DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_INSTALL_DIR} \ - # with working_dir('build_cbtf_cray_runtime', create=True): - # python_vers='%d.%d' % spec['python'].version[:2] - # cmake('..', - # '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - # '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - # '-DRUNTIME_PLATFORM=%s' % runtime_platform_cray, - # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - # '-DRESOLVE_SYMBOLS=%s' % resolve_symbols, - # '-DINSTRUMENTOR=%s' % instrumentor_setting, - # '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - # '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - # '-DCBTF_KRELL_CN_RUNTIME_DIR=%s' % spec['cbtf-krell'].prefix, - # '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - # '-DLIBELF_DIR=%s' % spec['libelf'].prefix, - # '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, - # '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - # '-DPAPI_DIR=%s' % spec['papi'].prefix, - # '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - # '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - # '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - # '-DBoost_NO_SYSTEM_PATHS=TRUE', - # '-DBOOST_ROOT=%s' % spec['boost'].prefix, - # *std_cmake_args) + # #-DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_INSTALL_DIR} \ + # with working_dir('build_cbtf_cray_runtime', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake('..', + # '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + # '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + # '-DRUNTIME_PLATFORM=%s' % runtime_platform_cray, + # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + # '-DRESOLVE_SYMBOLS=%s' % resolve_symbols, + # '-DINSTRUMENTOR=%s' % instrumentor_setting, + # '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + # '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + # '-DCBTF_KRELL_CN_RUNTIME_DIR=%s' % spec['cbtf-krell'].prefix, + # '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + # '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + # '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + # '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + # '-DPAPI_DIR=%s' % spec['papi'].prefix, + # '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + # '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + # '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + # '-DBoost_NO_SYSTEM_PATHS=TRUE', + # '-DBOOST_ROOT=%s' % spec['boost'].prefix, + # *std_cmake_args) # make("clean") # make() # make("install") - - #elif '+mic' in spec: - # comment out else and shift over the default case below until arch detection is in - #else: + # elif '+mic' in spec: + # comment out else and shift over the default case below + # until arch detection is in else: if '+runtime' in spec: with working_dir('build_cbtf_runtime', create=True): - python_vers='%d.%d' % spec['python'].version[:2] - cmake('..', - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DINSTRUMENTOR=%s' % instrumentor_setting, - '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - '-DLIBELF_DIR=%s' % spec['libelf'].prefix, - '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), - '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, - '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - *std_cmake_args) + python_vers = '%d.%d' % spec['python'].version[:2] + cmake( + '..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path( + spec['python'].prefix, 'bin', 'python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path( + spec['python'].prefix.include, + 'python' + python_vers), + '-DPYTHON_LIBRARY=%s' % join_path( + spec['python'].prefix.lib, + 'libpython' + python_vers + '.so'), + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + *std_cmake_args) + make("clean") make() make("install") else: with working_dir('build_cbtf', create=True): - python_vers='%d.%d' % spec['python'].version[:2] - #python_vers=join_path(spec['python'].version[:2]) - cmake('..', - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DINSTRUMENTOR=%s' % instrumentor_setting, - '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - '-DLIBELF_DIR=%s' % spec['libelf'].prefix, - '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, - '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - '-DQTLIB_DIR=%s' % spec['qt'].prefix, - '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), - '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, - '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - *std_cmake_args) + python_vers = '%d.%d' % spec['python'].version[:2] + # python_vers=join_path(spec['python'].version[:2]) + cmake( + '..', + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DQTLIB_DIR=%s' % spec['qt'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path( + spec['python'].prefix, 'bin', 'python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path( + spec['python'].prefix.include, + 'python' + python_vers), + '-DPYTHON_LIBRARY=%s' % join_path( + spec['python'].prefix.lib, + 'libpython' + python_vers + '.so'), + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + *std_cmake_args) + make("clean") make() make("install") - #if '+frontend' in spec: - # with working_dir('build_frontend', create=True): - # tbd - - - - #if '+cbtf' in spec: - # if cray build type detected: - # if '+runtime' in spec: - # with working_dir('build_cray_cbtf_compute', create=True): - # tbd - # else: - # with working_dir('build_cray_cbtf_frontend', create=True): - # tbd - # with working_dir('build_cray_osscbtf_frontend', create=True): - # tbd - # fi - # elif '+intelmic' in spec: - # if '+runtime' in spec: - # with working_dir('build_intelmic_cbtf_compute', create=True): - # tbd - # else: - # with working_dir('build_intelmic_cbtf_frontend', create=True): - # tbd - # with working_dir('build_intelmic_osscbtf_frontend', create=True): - # fi - # else - # with working_dir('build_cluster_cbtf', create=True): - # tbd - # with working_dir('build_cluster osscbtf', create=True): - # tbd - # fi - #elif '+offline' in spec: - # if cray build type detected: - # if '+runtime' in spec: - # with working_dir('build_cray_ossoff_compute', create=True): - # tbd - # else: - # with working_dir('build_cray_ossoff_frontend', create=True): - # tbd - # fi - # elif '+intelmic' in spec: - # if '+runtime' in spec: - # with working_dir('build_intelmic_ossoff_compute', create=True): - # tbd - # else: - # with working_dir('build_intelmic_ossoff_frontend', create=True): - # tbd - # fi - # elif bgq build type detected: - # if '+runtime' in spec: - # with working_dir('build_bgq_ossoff_compute', create=True): - # tbd - # else: - # with working_dir('build_bgq_ossoff_frontend', create=True): - # tbd - # fi - # else - # with working_dir('build_cluster ossoff', create=True): - # tbd - # fi - #fi - - - +# if '+frontend' in spec: +# with working_dir('build_frontend', create=True): +# tbd + +# if '+cbtf' in spec: +# if cray build type detected: +# if '+runtime' in spec: +# with working_dir('build_cray_cbtf_compute', create=True): +# tbd +# else: +# with working_dir('build_cray_cbtf_frontend', create=True): +# tbd +# with working_dir('build_cray_osscbtf_frontend', create=True): +# tbd +# fi +# elif '+intelmic' in spec: +# if '+runtime' in spec: +# with working_dir('build_intelmic_cbtf_compute', create=True): +# tbd +# else: +# with working_dir('build_intelmic_cbtf_frontend', create=True): +# tbd +# with working_dir('build_intelmic_osscbtf_frontend', create=True): +# fi +# else +# with working_dir('build_cluster_cbtf', create=True): +# tbd +# with working_dir('build_cluster osscbtf', create=True): +# tbd +# fi +# elif '+offline' in spec: +# if cray build type detected: +# if '+runtime' in spec: +# with working_dir('build_cray_ossoff_compute', create=True): +# tbd +# else: +# with working_dir('build_cray_ossoff_frontend', create=True): +# tbd +# fi +# elif '+intelmic' in spec: +# if '+runtime' in spec: +# with working_dir('build_intelmic_ossoff_compute', create=True): +# tbd +# else: +# with working_dir('build_intelmic_ossoff_frontend', create=True): +# tbd +# fi +# elif bgq build type detected: +# if '+runtime' in spec: +# with working_dir('build_bgq_ossoff_compute', create=True): +# tbd +# else: +# with working_dir('build_bgq_ossoff_frontend', create=True): +# tbd +# fi +# else +# with working_dir('build_cluster ossoff', create=True): +# tbd +# fi +# fi diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 34ab0703ad..8d9049a8f7 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -22,7 +22,6 @@ # 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 urllib import llnl.util.tty as tty from spack import * @@ -35,7 +34,7 @@ class Openssl(Package): Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library.""" homepage = "http://www.openssl.org" - url = "https://www.openssl.org/source/openssl-1.0.1h.tar.gz" + url = "ftp://openssl.org/source/openssl-1.0.1h.tar.gz" version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') version('1.0.1r', '1abd905e079542ccae948af37e393d28') @@ -50,70 +49,38 @@ class Openssl(Package): parallel = False def url_for_version(self, version): - # This URL is computed pinging the place where the latest version is stored. To avoid slowdown - # due to repeated pinging, we store the URL in a private class attribute to do the job only once per version - openssl_urls = getattr(Openssl, '_openssl_url', {}) - openssl_url = openssl_urls.get(version, None) - # Same idea, but just to avoid issuing the same message multiple times - warnings_given_to_user = getattr(Openssl, '_warnings_given', {}) - if openssl_url is None: - if self.spec.satisfies('@external'): - # The version @external is reserved to system openssl. In that case return a fake url and exit - openssl_url = '@external (reserved version for system openssl)' - if not warnings_given_to_user.get(version, False): - tty.msg('Using openssl@external : the version @external is reserved for system openssl') - warnings_given_to_user[version] = True - else: - openssl_url = self.check_for_outdated_release(version, warnings_given_to_user) # Store the computed URL - openssl_urls[version] = openssl_url - # Store the updated dictionary of URLS - Openssl._openssl_url = openssl_urls - # Store the updated dictionary of warnings - Openssl._warnings_given = warnings_given_to_user + if '@system' in self.spec: + return '@system (reserved version for system openssl)' + else: + return super(Openssl, self).url_for_version(self.version) - return openssl_url - - def check_for_outdated_release(self, version, warnings_given_to_user): - latest = 'ftp://ftp.openssl.org/source/openssl-{version}.tar.gz' - older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' - # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then - # return the url for older format - version_number = '.'.join([str(x) for x in version[:-1]]) - try: - openssl_url = latest.format(version=version) - urllib.urlopen(openssl_url) - except IOError: - openssl_url = older.format(version_number=version_number, version_full=version) - # Checks if we already warned the user for this particular version of OpenSSL. - # If not we display a warning message and mark this version - if not warnings_given_to_user.get(version, False): - tty.warn( - 'This installation depends on an old version of OpenSSL, which may have known security issues. ') - tty.warn('Consider updating to the latest version of this package.') - tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) - warnings_given_to_user[version] = True - - return openssl_url + def handle_fetch_error(self, error): + tty.warn("Fetching OpenSSL failed. This may indicate that OpenSSL has " + "been updated, and the version in your instance of Spack is " + "insecure. Consider updating to the latest OpenSSL version.") def install(self, spec, prefix): # OpenSSL uses a variable APPS in its Makefile. If it happens to be set # in the environment, then this will override what is set in the # Makefile, leading to build errors. env.pop('APPS', None) - if spec.satisfies("arch=darwin-x86_64") or spec.satisfies("arch=ppc64"): + + if spec.satisfies('target=x86_64') or spec.satisfies('target=ppc64'): # This needs to be done for all 64-bit architectures (except Linux, # where it happens automatically?) env['KERNEL_BITS'] = '64' - config = Executable("./config") - config("--prefix=%s" % prefix, - "--openssldir=%s" % join_path(prefix, 'etc', 'openssl'), - "zlib", - "no-krb5", - "shared") + + options = ['zlib', 'no-krb5', 'shared'] + + config = Executable('./config') + config('--prefix=%s' % prefix, + '--openssldir=%s' % join_path(prefix, 'etc', 'openssl'), + *options) + # Remove non-standard compiler options if present. These options are # present e.g. on Darwin. They are non-standard, i.e. most compilers # (e.g. gcc) will not accept them. filter_file(r'-arch x86_64', '', 'Makefile') make() - make("install") + make('install') diff --git a/var/spack/repos/builtin/packages/opium/package.py b/var/spack/repos/builtin/packages/opium/package.py new file mode 100644 index 0000000000..2c81d92cc0 --- /dev/null +++ b/var/spack/repos/builtin/packages/opium/package.py @@ -0,0 +1,55 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Opium(Package): + """DFT pseudopotential generation project""" + + homepage = "https://opium.sourceforge.net/index.html" + url = "https://downloads.sourceforge.net/project/opium/opium/opium-v3.8/opium-v3.8-src.tgz" + + version('3.8', 'f710c0f869e70352b4a510c31e13bf9f') + + depends_on('blas') + depends_on('lapack') + + def install(self, spec, prefix): + options = [ + 'LDFLAGS=%s %s' % ( + to_link_flags(spec['lapack'].lapack_shared_lib), + to_link_flags(spec['blas'].blas_shared_lib) + ) + ] + + configure(*options) + with working_dir("src", create=False): + make("all-subdirs") + make("opium") + + # opium not have a make install :-(( + mkdirp(self.prefix.bin) + install(join_path(self.stage.source_path, 'opium'), + self.prefix.bin) diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py index 2104bf842b..161ba6254a 100644 --- a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py +++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class OsuMicroBenchmarks(Package): """The Ohio MicroBenchmark suite is a collection of independent MPI message passing performance microbenchmarks developed and written at @@ -41,7 +42,6 @@ class OsuMicroBenchmarks(Package): depends_on('mpi') depends_on('cuda', when='+cuda') - def install(self, spec, prefix): config_args = [ 'CC=%s' % spec['mpi'].prefix.bin + '/mpicc', diff --git a/var/spack/repos/builtin/packages/otf/package.py b/var/spack/repos/builtin/packages/otf/package.py index 4a7a00b212..39eb5a85aa 100644 --- a/var/spack/repos/builtin/packages/otf/package.py +++ b/var/spack/repos/builtin/packages/otf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Otf(Package): """To improve scalability for very large and massively parallel traces the Open Trace Format (OTF) is developed at ZIH as a diff --git a/var/spack/repos/builtin/packages/otf2/package.py b/var/spack/repos/builtin/packages/otf2/package.py index 131836f8ac..ee39f448eb 100644 --- a/var/spack/repos/builtin/packages/otf2/package.py +++ b/var/spack/repos/builtin/packages/otf2/package.py @@ -27,8 +27,8 @@ from spack import * class Otf2(Package): - """ - The Open Trace Format 2 is a highly scalable, memory efficient event trace data format plus support library. + """The Open Trace Format 2 is a highly scalable, memory efficient event + trace data format plus support library. """ homepage = "http://www.vi-hps.org/score-p" @@ -46,10 +46,10 @@ class Otf2(Package): url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") def install(self, spec, prefix): - configure_args=["--prefix=%s" % prefix, - "--enable-shared", - "CFLAGS=-fPIC", - "CXXFLAGS=-fPIC"] + configure_args = ["--prefix=%s" % prefix, + "--enable-shared", + "CFLAGS=-fPIC", + "CXXFLAGS=-fPIC"] configure(*configure_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index d0db4f7f20..114fd00011 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -24,46 +24,42 @@ ############################################################################## from spack import * + class P4est(Package): - """Dynamic management of a collection (a forest) of adaptive octrees in parallel""" + """Dynamic management of a collection (a forest) of adaptive octrees in + parallel""" homepage = "http://www.p4est.org" url = "http://p4est.github.io/release/p4est-1.1.tar.gz" version('1.1', '37ba7f4410958cfb38a2140339dbf64f') - variant('tests', default=True, description='Run small tests') - # build dependencies - depends_on('automake') - depends_on('autoconf') - depends_on('libtool@2.4.2:') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + depends_on('libtool@2.4.2:', type='build') # other dependencies - depends_on('lua') # Needed for the submodule sc + depends_on('lua') # Needed for the submodule sc depends_on('mpi') depends_on('zlib') def install(self, spec, prefix): - options = ['--enable-mpi', - '--enable-shared', - '--disable-vtk-binary', - '--without-blas', - 'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL', - 'CFLAGS=-O2', - 'CC=%s' % self.spec['mpi'].mpicc, - 'CXX=%s' % self.spec['mpi'].mpicxx, - 'FC=%s' % self.spec['mpi'].mpifc, - 'F77=%s' % self.spec['mpi'].mpif77 - ] + options = [ + '--enable-mpi', + '--enable-shared', + '--disable-vtk-binary', + '--without-blas', + 'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL', + 'CFLAGS=-O2', + 'CC=%s' % self.spec['mpi'].mpicc, + 'CXX=%s' % self.spec['mpi'].mpicxx, + 'FC=%s' % self.spec['mpi'].mpifc, + 'F77=%s' % self.spec['mpi'].mpif77 + ] configure('--prefix=%s' % prefix, *options) make() - # Make tests optional as sometimes mpiexec can't be run with an error: - # mpiexec has detected an attempt to run as root. - # Running at root is *strongly* discouraged as any mistake (e.g., in - # defining TMPDIR) or bug can result in catastrophic damage to the OS - # file system, leaving your system in an unusable state. - if '+tests' in self.spec: - make("check") + if self.run_tests: + make("check") make("install") diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index a04f6d64e0..2da20e9dc2 100644 --- a/var/spack/repos/builtin/packages/pango/package.py +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Pango(Package): """Pango is a library for laying out and rendering of text, with an emphasis on internationalization. It can be used anywhere @@ -31,8 +32,11 @@ class Pango(Package): far has been done in the context of the GTK+ widget toolkit.""" homepage = "http://www.pango.org" url = "http://ftp.gnome.org/pub/gnome/sources/pango/1.36/pango-1.36.8.tar.xz" + list_url = "http://ftp.gnome.org/pub/gnome/sources/pango/" + list_depth = 2 version('1.36.8', '217a9a753006275215fa9fa127760ece') + version('1.40.1', '6fc88c6529890d6c8e03074d57a3eceb') depends_on("harfbuzz") depends_on("cairo") diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index ecd958407f..5c4abe1730 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -28,6 +28,7 @@ import os import sys from llnl.util.filesystem import fix_darwin_install_name + class Papi(Package): """PAPI provides the tool designer and application engineer with a consistent interface and methodology for use of the performance @@ -47,7 +48,7 @@ class Papi(Package): def install(self, spec, prefix): with working_dir("src"): - configure_args=["--prefix=%s" % prefix] + configure_args = ["--prefix=%s" % prefix] # PAPI uses MPI if MPI is present; since we don't require # an MPI package, we ensure that all attempts to use MPI diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py index d6324b63e6..c91b01c964 100644 --- a/var/spack/repos/builtin/packages/paradiseo/package.py +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -23,40 +23,50 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import sys + class Paradiseo(Package): - """A C++ white-box object-oriented framework dedicated to the reusable design of metaheuristics.""" + """A C++ white-box object-oriented framework dedicated to the reusable + design of metaheuristics.""" homepage = "http://paradiseo.gforge.inria.fr/" - # Installing from the development version is a better option at this + # Installing from the development version is a better option at this # point than using the very old supplied packages version('head', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git') - # This is a version that the package formula author has tested successfully. - # However, the clone is very large (~1Gb git history). The history in the - # head version has been trimmed significantly. - version('dev-safe', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git', - commit='dbb8fbe9a786efd4d1c26408ac1883442e7643a6') - variant('mpi', default=True, description='Compile with parallel and distributed metaheuristics module') - variant('smp', default=True, description='Compile with symmetric multi-processing module ') - variant('edo', default=True, description='Compile with (Experimental) EDO module') - #variant('tests', default=False, description='Compile with build tests') - #variant('doc', default=False, description='Compile with documentation') - variant('debug', default=False, description='Builds a debug version of the libraries') + # This is a version that the package formula author has tested + # successfully. However, the clone is very large (~1Gb git + # history). The history in the head version has been trimmed + # significantly. + version( + 'dev-safe', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git', + commit='dbb8fbe9a786efd4d1c26408ac1883442e7643a6') + + variant('mpi', default=True, + description='Compile with parallel and distributed ' + 'metaheuristics module') + variant('smp', default=True, + description='Compile with symmetric multi-processing module ') + variant('edo', default=True, + description='Compile with (Experimental) EDO module') + + # variant('tests', default=False, description='Compile with build tests') + # variant('doc', default=False, description='Compile with documentation') + variant('debug', default=False, + description='Builds a debug version of the libraries') variant('openmp', default=False, description='Enable OpenMP support') variant('gnuplot', default=False, description='Enable GnuPlot support') - + # Required dependencies - depends_on ("cmake") + depends_on("cmake", type='build') # Optional dependencies - depends_on ("mpi", when="+mpi") - depends_on ("doxygen", when='+doc') - depends_on ("gnuplot", when='+gnuplot') - depends_on ("eigen", when='+edo') - depends_on ("boost~mpi", when='+edo~mpi') - depends_on ("boost+mpi", when='+edo+mpi') + depends_on("mpi", when="+mpi") + depends_on("doxygen", when='+doc', type='build') + depends_on("gnuplot", when='+gnuplot') + depends_on("eigen", when='+edo', type='build') + depends_on("boost~mpi", when='+edo~mpi') + depends_on("boost+mpi", when='+edo+mpi') # Patches patch('enable_eoserial.patch') @@ -69,16 +79,21 @@ class Paradiseo(Package): options.extend(std_cmake_args) options.extend([ - '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), + '-DCMAKE_BUILD_TYPE:STRING=%s' % ( + 'Debug' if '+debug' in spec else 'Release'), '-DINSTALL_TYPE:STRING=MIN', '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), - '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler + # Note: This requires a C++11 compatible compiler + '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), - '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE'), - '-DENABLE_OPENMP:BOOL=%s' % ('TRUE' if '+openmp' in spec else 'FALSE'), - '-DENABLE_GNUPLOT:BOOL=%s' % ('TRUE' if '+gnuplot' in spec else 'FALSE') + '-DENABLE_CMAKE_TESTING:BOOL=%s' % ( + 'TRUE' if '+tests' in spec else 'FALSE'), + '-DENABLE_OPENMP:BOOL=%s' % ( + 'TRUE' if '+openmp' in spec else 'FALSE'), + '-DENABLE_GNUPLOT:BOOL=%s' % ( + 'TRUE' if '+gnuplot' in spec else 'FALSE') ]) - + with working_dir('spack-build', create=True): # Configure cmake('..', *options) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index 59c44c8a4a..be4a8bc38b 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class ParallelNetcdf(Package): """Parallel netCDF (PnetCDF) is a library providing high-performance parallel I/O while still maintaining file-format compatibility with @@ -37,12 +38,14 @@ class ParallelNetcdf(Package): variant('cxx', default=True, description='Build the C++ Interface') variant('fortran', default=True, description='Build the Fortran Interface') - variant('fpic', default=True, description='Produce position-independent code (for use with shared libraries)') + variant('fpic', default=True, + description='Produce position-independent code (for shared libs)') - depends_on("m4") + depends_on("m4", type='build') depends_on("mpi") - # See: https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL + # See: + # https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL def install(self, spec, prefix): args = list() if '+fpic' in spec: @@ -53,7 +56,7 @@ class ParallelNetcdf(Package): args.append('--disable-fortran') args.extend(["--prefix=%s" % prefix, - "--with-mpi=%s" % spec['mpi'].prefix]) + "--with-mpi=%s" % spec['mpi'].prefix]) configure(*args) make() make("install") diff --git a/var/spack/repos/builtin/packages/parallel/package.py b/var/spack/repos/builtin/packages/parallel/package.py new file mode 100644 index 0000000000..2306dace55 --- /dev/null +++ b/var/spack/repos/builtin/packages/parallel/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 Parallel(Package): + """ + GNU parallel is a shell tool for executing jobs in parallel using + one or more computers. A job can be a single command or a small + script that has to be run for each of the lines in the input. + """ + + homepage = "http://www.gnu.org/software/parallel/" + url = "http://ftp.gnu.org/gnu/parallel/parallel-20160422.tar.bz2" + + version('20160422', '24621f684130472694333709bd4454cb') + version('20160322', '4e81e0d36902ab4c4e969ee6f35e6e57') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py index 50ce6b79fb..1b6e3ce8e6 100644 --- a/var/spack/repos/builtin/packages/paraver/package.py +++ b/var/spack/repos/builtin/packages/paraver/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Paraver(Package): """"A very powerful performance visualization and analysis tool based on traces that can be used to analyse any information that @@ -36,7 +37,7 @@ class Paraver(Package): version('4.5.3', '625de9ec0d639acd18d1aaa644b38f72') depends_on("boost") - #depends_on("extrae") + # depends_on("extrae") depends_on("wx") depends_on("wxpropgrid") @@ -47,8 +48,11 @@ class Paraver(Package): make("install") os.chdir("../paraver-kernel") - #"--with-extrae=%s" % spec['extrae'].prefix, - configure("--prefix=%s" % prefix, "--with-ptools-common-files=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization") + # "--with-extrae=%s" % spec['extrae'].prefix, + configure("--prefix=%s" % prefix, + "--with-ptools-common-files=%s" % prefix, + "--with-boost=%s" % spec['boost'].prefix, + "--with-boost-serialization=boost_serialization") make() make("install") @@ -58,8 +62,11 @@ class Paraver(Package): make("install") os.chdir("../wxparaver") - #"--with-extrae=%s" % spec['extrae'].prefix, - configure("--prefix=%s" % prefix, "--with-paraver=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization", "--with-wxdir=%s" % spec['wx'].prefix.bin) + # "--with-extrae=%s" % spec['extrae'].prefix, + configure("--prefix=%s" % prefix, + "--with-paraver=%s" % prefix, + "--with-boost=%s" % spec['boost'].prefix, + "--with-boost-serialization=boost_serialization", + "--with-wxdir=%s" % spec['wx'].prefix.bin) make() make("install") - diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 711cbc98c9..68c781734e 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Paraview(Package): homepage = 'http://www.paraview.org' url = 'http://www.paraview.org/files/v5.0/ParaView-v' @@ -43,31 +44,31 @@ class Paraview(Package): variant('opengl2', default=False, description='Enable OpenGL2 backend') depends_on('python@2:2.7', when='+python') - depends_on('py-numpy', when='+python') - depends_on('py-matplotlib', when='+python') + depends_on('py-numpy', when='+python', type='run') + depends_on('py-matplotlib', when='+python', type='run') depends_on('tcl', when='+tcl') depends_on('mpi', when='+mpi') depends_on('qt@:4', when='+qt') + depends_on('cmake', type='build') depends_on('bzip2') depends_on('freetype') - #depends_on('hdf5+mpi', when='+mpi') - #depends_on('hdf5~mpi', when='~mpi') + # depends_on('hdf5+mpi', when='+mpi') + # depends_on('hdf5~mpi', when='~mpi') depends_on('jpeg') depends_on('libpng') depends_on('libtiff') depends_on('libxml2') - #depends_on('netcdf') - #depends_on('netcdf-cxx') - #depends_on('protobuf') # version mismatches? - #depends_on('sqlite') # external version not supported + # depends_on('netcdf') + # depends_on('netcdf-cxx') + # depends_on('protobuf') # version mismatches? + # depends_on('sqlite') # external version not supported depends_on('zlib') def url_for_version(self, version): """Handle ParaView version-based custom URLs.""" return self._url_str % (version.up_to(2), version) - def install(self, spec, prefix): with working_dir('spack-build', create=True): def feature_to_bool(feature, on='ON', off='OFF'): @@ -79,34 +80,46 @@ class Paraview(Package): return feature_to_bool(feature, on='OFF', off='ON') feature_args = std_cmake_args[:] - feature_args.append('-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % feature_to_bool('+qt')) - feature_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=%s' % feature_to_bool('+python')) + feature_args.append( + '-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % feature_to_bool('+qt')) + feature_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=%s' % + feature_to_bool('+python')) if '+python' in spec: - feature_args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s/bin/python' % spec['python'].prefix) - feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' % feature_to_bool('+mpi')) + feature_args.append( + '-DPYTHON_EXECUTABLE:FILEPATH=%s/bin/python' + % spec['python'].prefix) + feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' % + feature_to_bool('+mpi')) if '+mpi' in spec: - feature_args.append('-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix) - feature_args.append('-DVTK_ENABLE_TCL_WRAPPING:BOOL=%s' % feature_to_bool('+tcl')) - feature_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % feature_to_bool('+osmesa')) - feature_args.append('-DVTK_USE_X:BOOL=%s' % nfeature_to_bool('+osmesa')) - feature_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) + feature_args.append( + '-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix) + feature_args.append( + '-DVTK_ENABLE_TCL_WRAPPING:BOOL=%s' % feature_to_bool('+tcl')) + feature_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % + feature_to_bool('+osmesa')) + feature_args.append('-DVTK_USE_X:BOOL=%s' % + nfeature_to_bool('+osmesa')) + feature_args.append( + '-DVTK_RENDERING_BACKEND:STRING=%s' % + feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) feature_args.extend(std_cmake_args) if 'darwin' in self.spec.architecture: feature_args.append('-DVTK_USE_X:BOOL=OFF') - feature_args.append('-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON') + feature_args.append( + '-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON') cmake('..', - '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, - '-DBUILD_TESTING:BOOL=OFF', - '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USE_SYSTEM_HDF5:BOOL=OFF', - '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', - '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', - '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', - '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', - *feature_args) + '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, + '-DBUILD_TESTING:BOOL=OFF', + '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=OFF', + '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', + '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', + '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', + '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', + *feature_args) make() make('install') diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 9b36f273e4..8afae91af1 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -38,19 +38,21 @@ class Parmetis(Package): version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds the library in debug mode') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds the library in debug mode') variant('gdb', default=False, description='Enables gdb support') - depends_on('cmake@2.8:') # build dependency + depends_on('cmake@2.8:', type='build') depends_on('mpi') depends_on('metis@5:') patch('enable_external_metis.patch') # bug fixes from PETSc developers - # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ # NOQA: ignore=E501 + # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch') - # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ # NOQA: ignore=E501 + # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') def url_for_version(self, version): 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/parpack/package.py b/var/spack/repos/builtin/packages/parpack/package.py index 5930dada85..84bc88b3b0 100644 --- a/var/spack/repos/builtin/packages/parpack/package.py +++ b/var/spack/repos/builtin/packages/parpack/package.py @@ -26,6 +26,7 @@ from spack import * import os import shutil + class Parpack(Package): """ARPACK is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.""" @@ -52,13 +53,13 @@ class Parpack(Package): mf.filter('^PLAT.*', 'PLAT = ') mf.filter('^home.*', 'home = %s' % os.getcwd()) mf.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) - mf.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) + mf.filter('^LAPACKdir.*', 'LAPACKdir = %s' % + self.spec['lapack'].prefix) mf.filter('^MAKE.*', 'MAKE = make') # build the library in our own prefix. mf.filter('^ARPACKLIB.*', 'PARPACKLIB = %s/libparpack.a' % os.getcwd()) - def install(self, spec, prefix): with working_dir('PARPACK/SRC/MPI'): make('all') diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py index 3860875bcc..cd1f679062 100644 --- a/var/spack/repos/builtin/packages/patchelf/package.py +++ b/var/spack/repos/builtin/packages/patchelf/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class Patchelf(Package): - """PatchELF is a small utility to modify the dynamic linker and RPATH of ELF executables.""" + """PatchELF is a small utility to modify the dynamic linker and RPATH of + ELF executables.""" homepage = "https://nixos.org/patchelf.html" url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz" diff --git a/var/spack/repos/builtin/packages/pcre/intel.patch b/var/spack/repos/builtin/packages/pcre/intel.patch new file mode 100644 index 0000000000..f160f55e1b --- /dev/null +++ b/var/spack/repos/builtin/packages/pcre/intel.patch @@ -0,0 +1,12 @@ +diff -up pcre-8.38/pcrecpp.cc.intel pcre-8.38/pcrecpp.cc +--- pcre-8.38/pcrecpp.cc.intel 2014-09-15 07:48:59.000000000 -0600 ++++ pcre-8.38/pcrecpp.cc 2016-06-08 16:16:56.702721214 -0600 +@@ -66,7 +66,7 @@ Arg RE::no_arg((void*)NULL); + // inclusive test if we ever needed it. (Note that not only the + // __attribute__ syntax, but also __USER_LABEL_PREFIX__, are + // gnu-specific.) +-#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) ++#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) && !defined(__INTEL_COMPILER) + # define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x) + # define ULP_AS_STRING_INTERNAL(x) #x + # define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 7a9f3b911d..6f306ab0f9 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Pcre(Package): """The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression @@ -34,7 +35,18 @@ class Pcre(Package): version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97') version('8.38', '00aabbfe56d5a48b270f999b508c5ad2') + 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_args.append('--enable-unicode-properties') + + configure(*configure_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/pcre2/package.py b/var/spack/repos/builtin/packages/pcre2/package.py index b013685f05..a2739e0584 100644 --- a/var/spack/repos/builtin/packages/pcre2/package.py +++ b/var/spack/repos/builtin/packages/pcre2/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Pcre2(Package): """The PCRE2 package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py index 60136fc0cd..074d28540b 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -27,17 +27,21 @@ from spack import * class Pdt(Package): - """ - Program Database Toolkit (PDT) is a framework for analyzing source code written in several programming languages - and for making rich program knowledge accessible to developers of static and dynamic analysis tools. PDT implements - a standard program representation, the program database (PDB), that can be accessed in a uniform way through a - class library supporting common PDB operations. + """Program Database Toolkit (PDT) is a framework for analyzing source + code written in several programming languages and for making rich + program knowledge accessible to developers of static and dynamic + analysis tools. PDT implements a standard program representation, + the program database (PDB), that can be accessed in a uniform way + through a class library supporting common PDB operations. + """ homepage = "https://www.cs.uoregon.edu/research/pdt/home.php" - url = "https://www.cs.uoregon.edu/research/tau/pdt_releases/pdt-3.21.tar.gz" - version('3.21', '8df94298b71703decf680709a4ddf68f') - version('3.19', 'ba5591994998771fdab216699e362228') + version('3.21', '3092ca0d8833b69992c17e63ae66c263') + version('3.19', '5c5e1e6607086aa13bf4b1b9befc5864') + + def url_for_version(self, version): + return 'https://www.cs.uoregon.edu/research/tau/pdt_releases/pdtoolkit-%s.tar.gz' % (version) def install(self, spec, prefix): configure('-prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py new file mode 100644 index 0000000000..d71a7492ba --- /dev/null +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -0,0 +1,75 @@ +############################################################################## +# 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 +############################################################################## +# +# Author: George Hartzell <hartzell@alerce.com> +# Date: July 21, 2016 +# Author: Justin Too <justin@doubleotoo.com> +# Date: September 6, 2015 +# +from spack import * + + +class Perl(Package): + """Perl 5 is a highly capable, feature-rich programming language with over + 27 years of development.""" + homepage = "http://www.perl.org" + url = "http://www.cpan.org/src/5.0/perl-5.22.2.tar.gz" + + version('5.24.0', 'c5bf7f3285439a2d3b6a488e14503701') + version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b') + version('5.20.3', 'd647d0ea5a7a8194c34759ab9f2610cd') + # 5.18.4 fails with gcc-5 + # https://rt.perl.org/Public/Bug/Display.html?id=123784 + # version('5.18.4' , '1f9334ff730adc05acd3dd7130d295db') + + # Installing cpanm alongside the core makes it safe and simple for + # people/projects to install their own sets of perl modules. Not + # having it in core increases the "energy of activation" for doing + # things cleanly. + variant('cpanm', default=True, + description='Optionally install cpanm with the core packages.') + + resource( + name="cpanm", + url="http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7042.tar.gz", + md5="e87f55fbcb3c13a4754500c18e89219f", + destination="cpanm", + placement="cpanm" + ) + + def install(self, spec, prefix): + configure = Executable('./Configure') + configure("-des", "-Dprefix=" + prefix) + make() + if self.run_tests: + make("test") + make("install") + + if '+cpanm' in spec: + with working_dir(join_path('cpanm', 'cpanm')): + perl = Executable(join_path(prefix.bin, 'perl')) + perl('Makefile.PL') + 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..66e1abdf1a 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -28,31 +28,41 @@ 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') version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') version('3.4.4', '7edbc68aa6d8d6a3295dd5f6c2f6979d') - variant('shared', default=True, description='Enables the build of shared libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') variant('mpi', default=True, description='Activates MPI support') - variant('double', default=True, description='Switches between single and double precision') + variant('double', default=True, + description='Switches between single and double precision') variant('complex', default=False, description='Build with complex numbers') variant('debug', default=False, description='Compile in debug mode') - variant('metis', default=True, description='Activates support for metis and parmetis') - variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)') + variant('metis', default=True, + description='Activates support for metis and parmetis') + variant('hdf5', default=True, + description='Activates support for HDF5 (only parallel)') variant('boost', default=True, description='Activates support for Boost') - variant('hypre', default=True, description='Activates support for Hypre (only parallel)') - variant('mumps', default=True, description='Activates support for MUMPS (only parallel)') - variant('superlu-dist', default=True, description='Activates support for SuperluDist (only parallel)') + variant('hypre', default=True, + description='Activates support for Hypre (only parallel)') + variant('mumps', default=True, + description='Activates support for MUMPS (only parallel)') + variant('superlu-dist', default=True, + description='Activates support for SuperluDist (only parallel)') # Virtual dependencies depends_on('blas') @@ -69,10 +79,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 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 +92,21 @@ 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'), + '--with-fc=%s' % (os.environ['FC'] + if self.compiler.fc is not None else '0'), '--with-mpi=0' ] - error_message_fmt = '\t{library} support requires "+mpi" to be activated' - - # 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] + error_message_fmt = \ + '\t{library} support requires "+mpi" to be activated' + + # 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] if errors: errors = ['incompatible variants given'] + errors raise RuntimeError('\n'.join(errors)) @@ -105,26 +121,35 @@ 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'), + '--with-scalar-type=%s' % ( + 'complex' if '+complex' in spec else 'real'), '--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')) ) 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) ) - # 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: @@ -138,6 +163,36 @@ class Petsc(Package): make('MAKE_NP=%s' % make_jobs, parallel=False) make("install") + # solve Poisson equation in 2D to make sure nothing is broken: + if ('mpi' in spec) and self.run_tests: + with working_dir('src/ksp/ksp/examples/tutorials'): + env['PETSC_DIR'] = self.prefix + cc = Executable(spec['mpi'].mpicc) + cc('ex50.c', '-I%s' % prefix.include, '-L%s' % prefix.lib, + '-lpetsc', '-lm', '-o', 'ex50') + run = Executable(join_path(spec['mpi'].prefix.bin, 'mpirun')) + run('ex50', '-da_grid_x', '4', '-da_grid_y', '4') + if 'superlu-dist' in spec: + run('ex50', + '-da_grid_x', '4', + '-da_grid_y', '4', + '-pc_type', 'lu', + '-pc_factor_mat_solver_package', 'superlu_dist') + + if 'mumps' in spec: + run('ex50', + '-da_grid_x', '4', + '-da_grid_y', '4', + '-pc_type', 'lu', + '-pc_factor_mat_solver_package', 'mumps') + + if 'hypre' in spec: + run('ex50', + '-da_grid_x', '4', + '-da_grid_y', '4', + '-pc_type', 'hypre', + '-pc_hypre_type', 'boomeramg') + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): # set up PETSC_DIR for everyone using PETSc package spack_env.set('PETSC_DIR', self.prefix) diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 7170c65303..c58d563682 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -41,6 +41,7 @@ class Pgi(Package): homepage = "http://www.pgroup.com/" url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() + version('16.5', 'a40e8852071b5d600cb42f31631b3de1') version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') variant('network', default=True, diff --git a/var/spack/repos/builtin/packages/pidx/package.py b/var/spack/repos/builtin/packages/pidx/package.py index d38dcd7b96..e19bb9e470 100644 --- a/var/spack/repos/builtin/packages/pidx/package.py +++ b/var/spack/repos/builtin/packages/pidx/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Pidx(Package): """PIDX Parallel I/O Library. @@ -36,6 +37,7 @@ class Pidx(Package): version('1.0', git='https://github.com/sci-visus/PIDX.git', commit='6afa1cf71d1c41263296dc049c8fabaf73c296da') + depends_on('cmake', type='build') depends_on("mpi") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index 34d8dfea0d..3d7e332a3f 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Pixman(Package): """The Pixman package contains a library that provides low-level pixel manipulation features such as image compositing and diff --git a/var/spack/repos/builtin/packages/pkg-config/g_date_strftime.patch b/var/spack/repos/builtin/packages/pkg-config/g_date_strftime.patch new file mode 100644 index 0000000000..9538f23875 --- /dev/null +++ b/var/spack/repos/builtin/packages/pkg-config/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/glib/gdate.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c +index 4aece02..92c34d2 100644 +--- a/glib/glib/gdate.c ++++ b/glib/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/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py index ddbc151767..45e8e8b74e 100644 --- a/var/spack/repos/builtin/packages/pkg-config/package.py +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -24,23 +24,29 @@ ############################################################################## from spack import * + class PkgConfig(Package): - """pkg-config is a helper tool used when compiling applications and libraries""" + """pkg-config is a helper tool used when compiling applications + and libraries""" + homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/" url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" - version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') + version('0.29.1', 'f739a28cae4e0ca291f82d1d41ef107d') + version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') parallel = False + # The following patch is needed for gcc-6.1 + patch('g_date_strftime.patch') + def install(self, spec, prefix): - configure("--prefix=%s" %prefix, - "--enable-shared", - "--with-internal-glib") # There's a bootstrapping problem here; - # glib uses pkg-config as well, so - # break the cycle by using the internal - # glib. + configure("--prefix={0}".format(prefix), + "--enable-shared", + # There's a bootstrapping problem here; + # glib uses pkg-config as well, so break + # the cycle by using the internal glib. + "--with-internal-glib") make() make("install") - diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py new file mode 100644 index 0000000000..b670b4c2b8 --- /dev/null +++ b/var/spack/repos/builtin/packages/plumed/package.py @@ -0,0 +1,112 @@ +############################################################################## +# 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 +############################################################################## +import subprocess + +from spack import * + + +class Plumed(Package): + """PLUMED is an open source library for free energy calculations in + molecular systems which works together with some of the most popular + molecular dynamics engines. + + Free energy calculations can be performed as a function of many order + parameters with a particular focus on biological problems, using state + of the art methods such as metadynamics, umbrella sampling and + Jarzynski-equation based steered MD. + + The software, written in C++, can be easily interfaced with both fortran + and C/C++ codes. + """ + homepage = 'http://www.plumed.org/' + url = 'https://github.com/plumed/plumed2/archive/v2.2.3.tar.gz' + + version('2.2.3', 'a6e3863e40aac07eb8cf739cbd14ecf8') + + variant('shared', default=True, description='Builds shared libraries') + variant('mpi', default=True, description='Activates MPI support') + variant('gsl', default=True, description='Activates GSL support') + + depends_on('zlib') + depends_on('blas') + depends_on('lapack') + + depends_on('mpi', when='+mpi') + depends_on('gsl', when='+gsl') + + # Dictionary mapping PLUMED versions to the patches it provides + # interactively + plumed_patches = { + '2.2.3': { + 'amber-14': '1', + 'gromacs-4.5.7': '2', + 'gromacs-4.6.7': '3', + 'gromacs-5.0.7': '4', + 'gromacs-5.1.2': '5', + 'lammps-6Apr13': '6', + 'namd-2.8': '7', + 'namd-2.9': '8', + 'espresso-5.0.2': '9' + } + } + + def apply_patch(self, other): + plumed = subprocess.Popen( + [join_path(self.spec.prefix.bin, 'plumed'), 'patch', '-p'], + stdin=subprocess.PIPE + ) + opts = Plumed.plumed_patches[str(self.version)] + search = '{0.name}-{0.version}'.format(other) + choice = opts[search] + '\n' + plumed.stdin.write(choice) + plumed.wait() + + def setup_dependent_package(self, module, ext_spec): + # Make plumed visible from dependent packages + module.plumed = Executable(join_path(self.spec.prefix.bin, 'plumed')) + + def install(self, spec, prefix): + # From plumed docs : + # Also consider that this is different with respect to what some other + # configure script does in that variables such as MPICXX are + # completely ignored here. In case you work on a machine where CXX is + # set to a serial compiler and MPICXX to a MPI compiler, to compile + # with MPI you should use: + # + # > ./configure CXX="$MPICXX" + configure_opts = [ + 'CXX={0}'.format(spec['mpi'].mpicxx) + ] if '+mpi' in self.spec else [] + + configure_opts.extend([ + '--prefix={0}'.format(prefix), + '--enable-shared={0}'.format('yes' if '+shared' in spec else 'no'), + '--enable-mpi={0}'.format('yes' if '+mpi' in spec else 'no'), + '--enable-gsl={0}'.format('yes' if '+gsl' in spec else 'no') + ]) + + configure(*configure_opts) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/pmgr_collective/package.py b/var/spack/repos/builtin/packages/pmgr_collective/package.py index a6e3b8e2a2..f6466a7954 100644 --- a/var/spack/repos/builtin/packages/pmgr_collective/package.py +++ b/var/spack/repos/builtin/packages/pmgr_collective/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PmgrCollective(Package): """PMGR_COLLECTIVE provides a scalable network for bootstrapping MPI jobs.""" 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/ppl/package.py b/var/spack/repos/builtin/packages/ppl/package.py index a54c6ce221..73404103f0 100644 --- a/var/spack/repos/builtin/packages/ppl/package.py +++ b/var/spack/repos/builtin/packages/ppl/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Ppl(Package): """The Parma Polyhedra Library (PPL) provides numerical abstractions especially targeted at applications in the field of diff --git a/var/spack/repos/builtin/packages/prank/package.py b/var/spack/repos/builtin/packages/prank/package.py new file mode 100644 index 0000000000..d627e8a0b6 --- /dev/null +++ b/var/spack/repos/builtin/packages/prank/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 Prank(Package): + """A powerful multiple sequence alignment browser.""" + + homepage = "http://wasabiapp.org/software/prank/" + url = "http://wasabiapp.org/download/prank/prank.source.140603.tgz" + + version('150803', '71ac2659e91c385c96473712c0a23e8a') + + depends_on('mafft') + depends_on('exonerate') + depends_on('bpp-suite') # for bppancestor + + def install(self, spec, prefix): + with working_dir('src'): + make() + mkdirp(prefix.bin) + install('prank', prefix.bin) diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index 20dd4f5f69..06ab6108b6 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Proj(Package): """Cartographic Projections""" homepage = "https://github.com/OSGeo/proj.4/wiki" diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index d4befc34ab..bf0073b16a 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Protobuf(Package): """Google's data interchange format.""" 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..6296d0cee6 --- /dev/null +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -0,0 +1,123 @@ +############################################################################## +# 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', type='build') + depends_on('py-numpy', type=nolink) + + # 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-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py index 05f4616ff5..ca59105b4c 100644 --- a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py +++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PySqlalchemy(Package): """The Python SQL Toolkit and Object Relational Mapper""" diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py index ace9320424..2549972a6d 100644 --- a/var/spack/repos/builtin/packages/py-argcomplete/package.py +++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyArgcomplete(Package): """Bash tab completion for argparse.""" diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py index 8ba6696b0c..a47b7ffa33 100644 --- a/var/spack/repos/builtin/packages/py-astroid/package.py +++ b/var/spack/repos/builtin/packages/py-astroid/package.py @@ -22,7 +22,7 @@ # 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 depends_on, extends, version +from spack import depends_on, extends, version, nolink from spack import Package @@ -37,10 +37,9 @@ class PyAstroid(Package): version('1.4.1', 'ed70bfed5e4b25be4292e7fe72da2c02') extends('python') - depends_on('py-logilab-common') - depends_on('py-setuptools') - depends_on('py-six') + depends_on('py-logilab-common', type=nolink) + depends_on('py-setuptools', type='build') + depends_on('py-six', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py index 86875bbcae..25dce87e49 100644 --- a/var/spack/repos/builtin/packages/py-astropy/package.py +++ b/var/spack/repos/builtin/packages/py-astropy/package.py @@ -24,29 +24,38 @@ ############################################################################## from spack import * + class PyAstropy(Package): - """ - The Astropy Project is a community effort to develop a single core + """The Astropy Project is a community effort to develop a single core package for Astronomy in Python and foster interoperability between - Python astronomy packages. - """ + Python astronomy packages.""" + homepage = 'http://www.astropy.org/' + url = 'https://pypi.python.org/packages/source/a/astropy/astropy-1.1.2.tar.gz' + version('1.1.2', 'cbe32023b5b1177d1e2498a0d00cda51') version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d') - def url_for_version(self, version): - return 'https://pypi.python.org/packages/source/a/astropy/astropy-{0}.tar.gz'.format(version) - + # Required dependencies extends('python') + depends_on('py-numpy', type=nolink) + # Optional dependencies + depends_on('py-h5py', type=nolink) + depends_on('py-beautifulsoup4', type=nolink) + depends_on('py-pyyaml', type=nolink) + depends_on('py-scipy', type=nolink) + depends_on('libxml2') + depends_on('py-matplotlib', type=nolink) + depends_on('py-pytz', type=nolink) + depends_on('py-scikit-image', type=nolink) + depends_on('py-pandas', type=nolink) + + # System dependencies depends_on('cfitsio') depends_on('expat') - depends_on('py-h5py') - depends_on('py-numpy') - depends_on('py-scipy') def install(self, spec, prefix): python('setup.py', 'build', '--use-system-cfitsio', - '--use-system-expat') - python('setup.py', 'install', '--prefix=' + prefix) - + '--use-system-expat') + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-autopep8/package.py b/var/spack/repos/builtin/packages/py-autopep8/package.py index f2fd3cd683..f6c08e2728 100644 --- a/var/spack/repos/builtin/packages/py-autopep8/package.py +++ b/var/spack/repos/builtin/packages/py-autopep8/package.py @@ -1,5 +1,6 @@ from spack import * + class PyAutopep8(Package): """Automatic pep8 formatter""" homepage = "https://github.com/hhatto/autopep8" @@ -8,9 +9,8 @@ class PyAutopep8(Package): version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1') extends('python') - depends_on('py-setuptools') - depends_on('py-pep8') + depends_on('py-setuptools', type='build') + depends_on('py-pep8', type=nolink) 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..9c7f6454df 100644 --- a/var/spack/repos/builtin/packages/py-basemap/package.py +++ b/var/spack/repos/builtin/packages/py-basemap/package.py @@ -23,20 +23,22 @@ # 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" version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8') extends('python') - depends_on('py-setuptools') - depends_on('py-numpy') - depends_on('py-matplotlib+gui') - depends_on('py-pillow') + depends_on('py-setuptools', type='build') + depends_on('py-numpy', type=nolink) + depends_on('py-matplotlib+gui', type=nolink) + depends_on('pil', type=nolink) depends_on("geos") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py new file mode 100644 index 0000000000..64368fe70d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-beautifulsoup4/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 PyBeautifulsoup4(Package): + """Beautiful Soup is a Python library for pulling data out of HTML and + XML files. It works with your favorite parser to provide idiomatic ways + of navigating, searching, and modifying the parse tree.""" + + homepage = "https://www.crummy.com/software/BeautifulSoup" + url = "https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.4.1.tar.gz" + + version('4.4.1', '8fbd9a7cac0704645fa20d1419036815') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py index 26f42e060b..c3edf9735b 100644 --- a/var/spack/repos/builtin/packages/py-biopython/package.py +++ b/var/spack/repos/builtin/packages/py-biopython/package.py @@ -24,16 +24,21 @@ ############################################################################## from spack import * + class PyBiopython(Package): - """It is a distributed collaborative effort to develop Python libraries and applications which address the needs of current and future work in bioinformatics.""" + """A distributed collaborative effort to develop Python libraries and + applications which address the needs of current and future work in + bioinformatics. + + """ homepage = "http://biopython.org/wiki/Main_Page" url = "http://biopython.org/DIST/biopython-1.65.tar.gz" version('1.65', '143e7861ade85c0a8b5e2bbdd1da1f67') extends('python') - depends_on('py-mx') - depends_on('py-numpy') + depends_on('py-mx', type=nolink) + depends_on('py-numpy', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-blessings/package.py b/var/spack/repos/builtin/packages/py-blessings/package.py index 05a1f5bcbb..e6fc6aa983 100644 --- a/var/spack/repos/builtin/packages/py-blessings/package.py +++ b/var/spack/repos/builtin/packages/py-blessings/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyBlessings(Package): """A nicer, kinder way to write to the terminal """ homepage = "https://github.com/erikrose/blessings" @@ -31,7 +32,7 @@ class PyBlessings(Package): version('1.6', '4f552a8ebcd4982693c92571beb99394') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') extends("python") diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py index 1a186b219c..ad2ee749d3 100644 --- a/var/spack/repos/builtin/packages/py-bottleneck/package.py +++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py @@ -24,15 +24,16 @@ ############################################################################## from spack import * + class PyBottleneck(Package): - """Bottleneck is a collection of fast NumPy array functions written in Cython.""" + """A collection of fast NumPy array functions written in Cython.""" homepage = "https://pypi.python.org/pypi/Bottleneck/1.0.0" url = "https://pypi.python.org/packages/source/B/Bottleneck/Bottleneck-1.0.0.tar.gz" version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2') extends('python') - depends_on('py-numpy') + depends_on('py-numpy', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py index 58d0a81990..7c08e51de8 100644 --- a/var/spack/repos/builtin/packages/py-cffi/package.py +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -22,8 +22,11 @@ # 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 os + from spack import * + class PyCffi(Package): """Foreign Function Interface for Python calling C code""" homepage = "http://cffi.readthedocs.org/en/latest/" @@ -33,9 +36,17 @@ class PyCffi(Package): version('1.1.2', 'ca6e6c45b45caa87aee9adc7c796eaea') extends('python') - depends_on('py-setuptools') - depends_on('py-pycparser') + depends_on('py-setuptools', type='build') + depends_on('py-pycparser', type=nolink) depends_on('libffi') def install(self, spec, prefix): + # This sets the compiler (and flags) that distutils will use + # to create the final shared library. It will use the + # compiler specified by the environment variable 'CC' for all + # other compilation. We are setting the 'LDSHARED" to the + # spack compiler wrapper plus a few extra flags necessary for + # building the shared library. + os.environ['LDSHARED'] = "{0} -shared -pthread".format(spack_cc) + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-coverage/package.py b/var/spack/repos/builtin/packages/py-coverage/package.py index 92a5bd0088..c2a698b0bd 100644 --- a/var/spack/repos/builtin/packages/py-coverage/package.py +++ b/var/spack/repos/builtin/packages/py-coverage/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyCoverage(Package): """ Testing coverage checker for python """ # FIXME: add a proper url for your package's homepage here. @@ -32,7 +33,7 @@ class PyCoverage(Package): version('4.0a6', '1bb4058062646148965bef0796b61efc') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') extends('python') diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py index 7fe2f953f7..5f50e3b6c2 100644 --- a/var/spack/repos/builtin/packages/py-csvkit/package.py +++ b/var/spack/repos/builtin/packages/py-csvkit/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyCsvkit(Package): """A library of utilities for working with CSV, the king of tabular file formats""" @@ -35,12 +36,12 @@ class PyCsvkit(Package): extends('python') - depends_on('py-dateutil') - depends_on('py-dbf') - depends_on('py-xlrd') - depends_on('py-SQLAlchemy') - depends_on('py-six') - depends_on('py-openpyxl') + depends_on('py-dateutil', type=nolink) + depends_on('py-dbf', type=nolink) + depends_on('py-xlrd', type=nolink) + depends_on('py-SQLAlchemy', type=nolink) + depends_on('py-six', type=nolink) + depends_on('py-openpyxl', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 5ccc508697..4b3e1cabe1 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyCython(Package): """The Cython compiler for writing C extensions for the Python language.""" homepage = "https://pypi.python.org/pypi/cython" diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 831f86e81c..4bc2c6fc99 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyDask(Package): """Minimal task scheduling abstraction""" homepage = "https://github.com/dask/dask/" @@ -33,7 +34,7 @@ class PyDask(Package): extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py index eb8eb09e75..40945232c1 100644 --- a/var/spack/repos/builtin/packages/py-dateutil/package.py +++ b/var/spack/repos/builtin/packages/py-dateutil/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyDateutil(Package): """Extensions to the standard Python datetime module.""" homepage = "https://pypi.python.org/pypi/dateutil" @@ -34,8 +35,8 @@ class PyDateutil(Package): version('2.5.2', 'eafe168e8f404bf384514f5116eedbb6') extends('python') - depends_on('py-setuptools') - depends_on('py-six') + depends_on('py-setuptools', type='build') + depends_on('py-six', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py index 09c93de428..7f83bce75e 100644 --- a/var/spack/repos/builtin/packages/py-dbf/package.py +++ b/var/spack/repos/builtin/packages/py-dbf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyDbf(Package): """Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files (including memos)""" diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py index 90a95cd0cb..9101b07a0d 100644 --- a/var/spack/repos/builtin/packages/py-decorator/package.py +++ b/var/spack/repos/builtin/packages/py-decorator/package.py @@ -24,8 +24,11 @@ ############################################################################## from spack import * + class PyDecorator(Package): - """The aim of the decorator module it to simplify the usage of decorators for the average programmer, and to popularize decorators by showing various non-trivial examples.""" + """The aim of the decorator module it to simplify the usage of decorators + for the average programmer, and to popularize decorators by showing + various non-trivial examples.""" homepage = "https://github.com/micheles/decorator" url = "https://pypi.python.org/packages/source/d/decorator/decorator-4.0.9.tar.gz" @@ -33,7 +36,7 @@ class PyDecorator(Package): extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-docutils/package.py b/var/spack/repos/builtin/packages/py-docutils/package.py new file mode 100644 index 0000000000..3a938d918b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-docutils/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 PyDocutils(Package): + """Docutils is an open-source text processing system for processing + plaintext documentation into useful formats, such as HTML, LaTeX, + man-pages, open-document or XML. It includes reStructuredText, the + easy to read, easy to use, what-you-see-is-what-you-get plaintext + markup language.""" + + homepage = "http://docutils.sourceforge.net/" + url = "https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz" + + version('0.12', '4622263b62c5c771c03502afa3157768') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-emcee/package.py b/var/spack/repos/builtin/packages/py-emcee/package.py new file mode 100644 index 0000000000..397f737cb1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-emcee/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 PyEmcee(Package): + """emcee is an MIT licensed pure-Python implementation of Goodman & Weare's + Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler.""" + + homepage = "http://dan.iel.fm/emcee/current/" + url = "https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz" + + version('2.1.0', 'c6b6fad05c824d40671d4a4fc58dfff7') + + extends('python') + depends_on('py-numpy', type=nolink) + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-epydoc/package.py b/var/spack/repos/builtin/packages/py-epydoc/package.py index b370075e02..9d4b93dad4 100644 --- a/var/spack/repos/builtin/packages/py-epydoc/package.py +++ b/var/spack/repos/builtin/packages/py-epydoc/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class PyEpydoc(Package): - """Epydoc is a tool for generating API documentation documentation for Python modules, based on their docstrings.""" + """Epydoc is a tool for generating API documentation documentation for + Python modules, based on their docstrings.""" homepage = "https://pypi.python.org/pypi/epydoc" url = "https://pypi.python.org/packages/source/e/epydoc/epydoc-3.0.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py index b261467d84..2fabe03d66 100644 --- a/var/spack/repos/builtin/packages/py-flake8/package.py +++ b/var/spack/repos/builtin/packages/py-flake8/package.py @@ -34,7 +34,7 @@ class PyFlake8(Package): version('2.5.4', 'a4585b3569b95c3f66acb8294a7f06ef') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-funcsigs/package.py b/var/spack/repos/builtin/packages/py-funcsigs/package.py index 9d987b284e..c3d37f6b98 100644 --- a/var/spack/repos/builtin/packages/py-funcsigs/package.py +++ b/var/spack/repos/builtin/packages/py-funcsigs/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class PyFuncsigs(Package): """Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2.""" @@ -34,10 +34,7 @@ class PyFuncsigs(Package): extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - - - diff --git a/var/spack/repos/builtin/packages/py-genders/package.py b/var/spack/repos/builtin/packages/py-genders/package.py index 44f6cb1ef4..f919a7e6c2 100644 --- a/var/spack/repos/builtin/packages/py-genders/package.py +++ b/var/spack/repos/builtin/packages/py-genders/package.py @@ -24,16 +24,19 @@ ############################################################################## from spack import * + class PyGenders(Package): - """Genders is a static cluster configuration database used for cluster configuration management. It is used by a variety of tools and scripts for management of large clusters.""" + """Genders is a static cluster configuration database used for cluster + configuration management. It is used by a variety of tools and scripts + for management of large clusters.""" homepage = "https://github.com/chaos/genders" url = "https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz" - version('1.22', '9ea59a024dcbddb85b0ed25ddca9bc8e', url='https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz') + version('1.22', '9ea59a024dcbddb85b0ed25ddca9bc8e', + url='https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz') extends('python') def install(self, spec, prefix): - configure("--prefix=%s" %prefix) + configure("--prefix=%s" % prefix) make(parallel=False) make("install") - diff --git a/var/spack/repos/builtin/packages/py-genshi/package.py b/var/spack/repos/builtin/packages/py-genshi/package.py index cba479a88f..ea8d26c796 100644 --- a/var/spack/repos/builtin/packages/py-genshi/package.py +++ b/var/spack/repos/builtin/packages/py-genshi/package.py @@ -36,7 +36,7 @@ class PyGenshi(Package): version('0.6', '604e8b23b4697655d36a69c2d8ef7187') extends("python") - depends_on("py-setuptools") + depends_on("py-setuptools", type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py index 3381c4a5ac..a448a66e51 100644 --- a/var/spack/repos/builtin/packages/py-gnuplot/package.py +++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py @@ -24,15 +24,17 @@ ############################################################################## from spack import * + class PyGnuplot(Package): - """Gnuplot.py is a Python package that allows you to create graphs from within Python using the gnuplot plotting program.""" + """Gnuplot.py is a Python package that allows you to create graphs from + within Python using the gnuplot plotting program.""" homepage = "http://gnuplot-py.sourceforge.net/" url = "http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.tar.gz" version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1') extends('python') - depends_on('py-numpy') + depends_on('py-numpy', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index de72bac44e..90a67c51bd 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -23,21 +23,44 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import re + class PyH5py(Package): - """The h5py package provides both a high- and low-level interface to the HDF5 library from Python.""" + """The h5py package provides both a high- and low-level interface to the + HDF5 library from Python.""" + homepage = "https://pypi.python.org/pypi/h5py" url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz" - version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758') + version('2.6.0', 'ec476211bd1de3f5ac150544189b0bf4') version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74') + version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758') + + variant('mpi', default=False, description='Build with MPI support') - extends('python', ignore=lambda f: re.match(r'bin/cy*', f)) - depends_on('hdf5') - depends_on('py-numpy') - depends_on('py-cython') + extends('python') + + # Build dependencies + depends_on('py-cython@0.19:', type='build') + depends_on('pkg-config', type='build') + depends_on('py-setuptools', type='build') + depends_on('hdf5@1.8.4:') + depends_on('hdf5+mpi', when='+mpi') + depends_on('mpi', when='+mpi') + depends_on('py-mpi4py', when='+mpi') + + # Build and runtime dependencies + depends_on('py-numpy@1.6.1:', type=nolink) + + # Runtime dependencies + depends_on('py-six', type=nolink) def install(self, spec, prefix): - python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix) - python('setup.py', 'install', '--prefix=%s' % prefix) + python('setup.py', 'configure', + '--hdf5={0}'.format(spec['hdf5'].prefix)) + + if '+mpi' in spec: + env['CC'] = spec['mpi'].mpicc + python('setup.py', 'configure', '--mpi') + + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py new file mode 100644 index 0000000000..d7446c06d4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-iminuit/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 PyIminuit(Package): + """Interactive IPython-Friendly Minimizer based on SEAL Minuit2.""" + + homepage = "https://pypi.python.org/pypi/iminuit" + url = "https://pypi.python.org/packages/source/i/iminuit/iminuit-1.2.tar.gz" + + version('1.2', '4701ec472cae42015e26251703e6e984') + + # Required dependencies + extends('python') + depends_on('py-setuptools', type='build') + + # Optional dependencies + depends_on('py-numpy', type=nolink) + depends_on('py-matplotlib', type=nolink) + depends_on('py-cython', type='build') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py index 7a94f90b38..ac3291e21e 100644 --- a/var/spack/repos/builtin/packages/py-ipython/package.py +++ b/var/spack/repos/builtin/packages/py-ipython/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class PyIpython(Package): - """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" + """IPython provides a rich toolkit to help you make the most out of using + Python interactively.""" homepage = "https://pypi.python.org/pypi/ipython" url = "https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz" @@ -33,8 +35,8 @@ class PyIpython(Package): version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') extends('python') - depends_on('py-pygments') - depends_on('py-setuptools') + depends_on('py-pygments', type=nolink) + depends_on('py-setuptools', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py index fd1d6b4419..32acf75131 100644 --- a/var/spack/repos/builtin/packages/py-jdcal/package.py +++ b/var/spack/repos/builtin/packages/py-jdcal/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyJdcal(Package): """Julian dates from proleptic Gregorian and Julian calendars""" diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py index 48312d9baf..943edf521a 100644 --- a/var/spack/repos/builtin/packages/py-jinja2/package.py +++ b/var/spack/repos/builtin/packages/py-jinja2/package.py @@ -22,7 +22,7 @@ # 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 depends_on, extends, version +from spack import depends_on, extends, version, nolink from spack import Package @@ -43,9 +43,8 @@ class PyJinja2(Package): version('2.7', 'ec70433f325051dcedacbb2465028a35') extends("python") - depends_on("py-setuptools") - depends_on("py-markupsafe") + depends_on("py-setuptools", type='build') + depends_on("py-markupsafe", type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-lockfile/package.py b/var/spack/repos/builtin/packages/py-lockfile/package.py index 998b41abc6..b873625bdb 100644 --- a/var/spack/repos/builtin/packages/py-lockfile/package.py +++ b/var/spack/repos/builtin/packages/py-lockfile/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyLockfile(Package): """The lockfile package exports a LockFile class which provides a simple API for locking files. Unlike the Windows msvcrt.locking @@ -41,7 +42,7 @@ class PyLockfile(Package): version('0.10.2', '1aa6175a6d57f082cd12e7ac6102ab15') extends("python") - depends_on("py-setuptools") + depends_on("py-setuptools", type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-logilab-common/package.py b/var/spack/repos/builtin/packages/py-logilab-common/package.py index 8675c48e9a..ac1b933e43 100644 --- a/var/spack/repos/builtin/packages/py-logilab-common/package.py +++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py @@ -22,7 +22,7 @@ # 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 depends_on, extends, version +from spack import depends_on, extends, version, nolink from spack import Package @@ -34,9 +34,8 @@ class PyLogilabCommon(Package): version('1.2.0', 'f7b51351b7bfe052746fa04c03253c0b') extends("python") - depends_on("py-setuptools") - depends_on("py-six") + depends_on("py-setuptools", type='build') + depends_on("py-six", type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-mako/package.py b/var/spack/repos/builtin/packages/py-mako/package.py index a03ef4defb..18a8dc0e68 100644 --- a/var/spack/repos/builtin/packages/py-mako/package.py +++ b/var/spack/repos/builtin/packages/py-mako/package.py @@ -24,16 +24,17 @@ ############################################################################## from spack import * + class PyMako(Package): - """A super-fast templating language that borrows the best - ideas from the existing templating languages.""" + """A super-fast templating language that borrows the best + ideas from the existing templating languages.""" homepage = "https://pypi.python.org/pypi/mako" - url = "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz" + url = "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz" version('1.0.1', '9f0aafd177b039ef67b90ea350497a54') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') extends('python') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index 58c9f70066..0a039d1d47 100644 --- a/var/spack/repos/builtin/packages/py-markupsafe/package.py +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -44,8 +44,7 @@ class PyMarkupsafe(Package): version('0.19', '64b05361adb92c11839fc470e308c593') extends("python") - depends_on("py-setuptools") + depends_on("py-setuptools", type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 14f9716ae6..c454a47ec3 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -25,6 +25,7 @@ from spack import * import os + class PyMatplotlib(Package): """Python plotting package.""" homepage = "https://pypi.python.org/pypi/matplotlib" @@ -38,19 +39,20 @@ class PyMatplotlib(Package): extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') - depends_on('py-pyside', when='+gui') - depends_on('py-ipython', when='+ipython') - depends_on('py-pyparsing') - depends_on('py-six') - depends_on('py-dateutil') - depends_on('py-pytz') - depends_on('py-nose') - depends_on('py-numpy') - depends_on('py-mock') - depends_on('py-pbr') - depends_on('py-funcsigs') + depends_on('py-setuptools', type='build') + depends_on('py-pyside', when='+gui', type=nolink) + depends_on('py-ipython', when='+ipython', type=nolink) + depends_on('py-pyparsing', type=nolink) + depends_on('py-six', type=nolink) + depends_on('py-dateutil', type=nolink) + depends_on('py-pytz', type=nolink) + depends_on('py-nose', type=nolink) + depends_on('py-numpy', type=nolink) + depends_on('py-mock', type=nolink) + depends_on('py-pbr', type=nolink) + depends_on('py-funcsigs', type=nolink) - depends_on('pkg-config') + depends_on('pkg-config', type='build') depends_on('freetype') depends_on('qt', when='+gui') depends_on('bzip2') @@ -64,12 +66,12 @@ class PyMatplotlib(Package): if str(self.version) in ['1.4.2', '1.4.3']: # hack to fix configuration file config_file = None - for p,d,f in os.walk(prefix.lib): + for p, d, f in os.walk(prefix.lib): for file in f: if file.find('matplotlibrc') != -1: config_file = join_path(p, 'matplotlibrc') print config_file - if config_file == None: + if config_file is None: raise InstallError('could not find config file') filter_file(r'backend : pyside', 'backend : Qt4Agg', diff --git a/var/spack/repos/builtin/packages/py-meep/package.py b/var/spack/repos/builtin/packages/py-meep/package.py new file mode 100644 index 0000000000..269ac55c67 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-meep/package.py @@ -0,0 +1,75 @@ +############################################################################## +# 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 PyMeep(Package): + """Python-meep is a wrapper around libmeep. It allows the scripting of + Meep-simulations with Python""" + + homepage = "https://launchpad.net/python-meep" + url = "https://launchpad.net/python-meep/1.4/1.4/+download/python-meep-1.4.2.tar" + + version('1.4.2', 'f8913542d18b0dda92ebc64f0a10ce56') + + variant('mpi', default=True, description='Enable MPI support') + + extends('python') + depends_on('py-numpy', type=nolink) + depends_on('py-scipy', type=nolink) + depends_on('py-matplotlib', type=nolink) + + depends_on('mpi', when='+mpi') + depends_on('meep~mpi', when='~mpi') + depends_on('meep+mpi', when='+mpi') + + # As of SWIG 3.0.3, Python-style comments are now treated as + # pre-processor directives. Use older SWIG. But not too old, + # or else it can't handle newer C++ compilers and flags. + depends_on('swig@1.3.39:3.0.2') + + def install(self, spec, prefix): + setup = 'setup-mpi.py' if '+mpi' in spec else 'setup.py' + + include_dirs = [ + spec['meep'].prefix.include, + spec['py-numpy'].include + ] + + library_dirs = [ + spec['meep'].prefix.lib + ] + + if '+mpi' in spec: + include_dirs.append(spec['mpi'].prefix.include) + library_dirs.append(spec['mpi'].prefix.lib) + + include_flags = '-I{0}'.format(','.join(include_dirs)) + library_flags = '-L{0}'.format(','.join(library_dirs)) + + python(setup, 'clean', '--all') + python(setup, 'build_ext', include_flags, library_flags) + python(setup, 'install', '--prefix={0}'.format(prefix)) + python(setup, 'bdist', include_flags, library_flags) diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py index 9bcbb5a927..399c10005e 100644 --- a/var/spack/repos/builtin/packages/py-mistune/package.py +++ b/var/spack/repos/builtin/packages/py-mistune/package.py @@ -40,7 +40,7 @@ class PyMistune(Package): version('0.5', '997736554f1f95eea78c66ae339b5722') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-mock/package.py b/var/spack/repos/builtin/packages/py-mock/package.py index 0587131b88..2c70535f19 100644 --- a/var/spack/repos/builtin/packages/py-mock/package.py +++ b/var/spack/repos/builtin/packages/py-mock/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyMock(Package): """mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how @@ -35,8 +36,8 @@ class PyMock(Package): version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb') extends('python') - depends_on('py-pbr') - depends_on('py-setuptools@17.1:') + depends_on('py-pbr', type=nolink) + depends_on('py-setuptools@17.1:', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py index 2764b8b3c6..1f0e52804e 100644 --- a/var/spack/repos/builtin/packages/py-mpi4py/package.py +++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py @@ -24,8 +24,14 @@ ############################################################################## from spack import * + class PyMpi4py(Package): - """This package provides Python bindings for the Message Passing Interface (MPI) standard. It is implemented on top of the MPI-1/MPI-2 specification and exposes an API which grounds on the standard MPI-2 C++ bindings.""" + """This package provides Python bindings for the Message Passing + Interface (MPI) standard. It is implemented on top of the + MPI-1/MPI-2 specification and exposes an API which grounds on the + standard MPI-2 C++ bindings. + + """ homepage = "https://pypi.python.org/pypi/mpi4py" url = "https://pypi.python.org/packages/source/m/mpi4py/mpi4py-1.3.1.tar.gz" @@ -33,7 +39,7 @@ class PyMpi4py(Package): version('1.3.1', 'dbe9d22bdc8ed965c23a7ceb6f32fc3c') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') depends_on('mpi') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py index 899ff053a9..e5bae34694 100644 --- a/var/spack/repos/builtin/packages/py-mpmath/package.py +++ b/var/spack/repos/builtin/packages/py-mpmath/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyMpmath(Package): """A Python library for arbitrary-precision floating-point arithmetic.""" homepage = "http://mpmath.org" diff --git a/var/spack/repos/builtin/packages/py-mx/package.py b/var/spack/repos/builtin/packages/py-mx/package.py index d0f9f7cadf..f5631916f6 100644 --- a/var/spack/repos/builtin/packages/py-mx/package.py +++ b/var/spack/repos/builtin/packages/py-mx/package.py @@ -24,8 +24,14 @@ ############################################################################## from spack import * + class PyMx(Package): - """The eGenix.com mx Base Distribution for Python is a collection of professional quality software tools which enhance Python's usability in many important areas such as fast text searching, date/time processing and high speed data types.""" + """The eGenix.com mx Base Distribution for Python is a collection of + professional quality software tools which enhance Python's + usability in many important areas such as fast text searching, + date/time processing and high speed data types. + + """ homepage = "http://www.egenix.com/products/python/mxBase/" url = "https://downloads.egenix.com/python/egenix-mx-base-3.2.8.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-mysqldb1/package.py b/var/spack/repos/builtin/packages/py-mysqldb1/package.py index 9918ba3e64..693fda6dbb 100644 --- a/var/spack/repos/builtin/packages/py-mysqldb1/package.py +++ b/var/spack/repos/builtin/packages/py-mysqldb1/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyMysqldb1(Package): """Legacy mysql bindings for python""" homepage = "https://github.com/farcepest/MySQLdb1" @@ -32,8 +33,7 @@ class PyMysqldb1(Package): version('1.2.5', '332c8f4955b6bc0c79ea15170bf7321b') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py new file mode 100644 index 0000000000..81f9fe4d09 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-nestle/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 PyNestle(Package): + """Nested sampling algorithms for evaluating Bayesian evidence.""" + + homepage = "http://kbarbary.github.io/nestle/" + url = "https://pypi.python.org/packages/source/n/nestle/nestle-0.1.1.tar.gz" + + version('0.1.1', '4875c0f9a0a8e263c1d7f5fa6ce604c5') + + # Required dependencies + extends('python') + depends_on('py-numpy', type=nolink) + + # Optional dependencies + depends_on('py-scipy', type=nolink) + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-netcdf/package.py index e3f857a0ce..e4f67d75a6 100644 --- a/var/spack/repos/builtin/packages/py-netcdf/package.py +++ b/var/spack/repos/builtin/packages/py-netcdf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyNetcdf(Package): """Python interface to the netCDF Library.""" homepage = "http://unidata.github.io/netcdf4-python" @@ -32,8 +33,8 @@ class PyNetcdf(Package): version('1.2.3.1', '4fc4320d4f2a77b894ebf8da1c9895af') extends('python') - depends_on('py-numpy') - depends_on('py-cython') + depends_on('py-numpy', type=nolink) + depends_on('py-cython', type=nolink) depends_on('netcdf') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py index 6bdb24e36e..79ad420f8f 100644 --- a/var/spack/repos/builtin/packages/py-networkx/package.py +++ b/var/spack/repos/builtin/packages/py-networkx/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class PyNetworkx(Package): - """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.""" + """NetworkX is a Python package for the creation, manipulation, and study + of the structure, dynamics, and functions of complex networks.""" homepage = "http://networkx.github.io/" url = "https://pypi.python.org/packages/source/n/networkx/networkx-1.11.tar.gz" @@ -33,7 +35,8 @@ class PyNetworkx(Package): extends('python') - depends_on('py-decorator') + depends_on('py-decorator', type=nolink) + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py index abb2d500a2..eb3dd77219 100644 --- a/var/spack/repos/builtin/packages/py-nose/package.py +++ b/var/spack/repos/builtin/packages/py-nose/package.py @@ -36,8 +36,8 @@ class PyNose(Package): version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16') version('1.3.7', '4d3ad0ff07b61373d2cefc89c5d0b20b') - extends('python', ignore=r'bin/nosetests.*$') - depends_on('py-setuptools') + extends('python') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py index d8bacd179f..b3b2e1d47d 100644 --- a/var/spack/repos/builtin/packages/py-numexpr/package.py +++ b/var/spack/repos/builtin/packages/py-numexpr/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import re + class PyNumexpr(Package): """Fast numerical expression evaluator for NumPy""" @@ -34,7 +34,7 @@ class PyNumexpr(Package): version('2.5', '84f66cced45ba3e30dcf77a937763aaa') extends('python') - depends_on('py-numpy') + depends_on('py-numpy', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index e9672b7bb0..f800b5e834 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import platform + class PyNumpy(Package): """NumPy is the fundamental package for scientific computing with Python. @@ -38,15 +40,27 @@ class PyNumpy(Package): version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') version('1.9.1', '78842b73560ec378142665e712ae4ad9') - variant('blas', default=True) variant('lapack', default=True) extends('python') - depends_on('py-nose') + depends_on('py-nose', type='build') + depends_on('py-setuptools', type='build') depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') + def setup_dependent_package(self, module, dep_spec): + python_version = self.spec['python'].version.up_to(2) + arch = '{0}-{1}'.format(platform.system().lower(), platform.machine()) + + self.spec.include = join_path( + self.prefix.lib, + 'python{0}'.format(python_version), + 'site-packages', + 'numpy-{0}-py{1}-{2}.egg'.format( + self.spec.version, python_version, arch), + 'numpy/core/include') + def install(self, spec, prefix): libraries = [] library_dirs = [] @@ -63,6 +77,6 @@ class PyNumpy(Package): f.write('[DEFAULT]\n') f.write('libraries=%s\n' % ','.join(libraries)) f.write('library_dirs=%s\n' % ':'.join(library_dirs)) + f.write('rpath=%s\n' % ':'.join(library_dirs)) python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py index 30cb52348f..fa32cb879f 100644 --- a/var/spack/repos/builtin/packages/py-openpyxl/package.py +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyOpenpyxl(Package): """A Python library to read/write Excel 2007 xlsx/xlsm files""" @@ -34,8 +35,8 @@ class PyOpenpyxl(Package): extends('python') - depends_on('py-jdcal') - depends_on('py-setuptools') + depends_on('py-jdcal', type=nolink) + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 7f54fc5d76..37234ae652 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -23,10 +23,18 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class PyPandas(Package): - """pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with relational or labeled data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open source data analysis / manipulation tool available in any language.""" + """pandas is a Python package providing fast, flexible, and expressive + data structures designed to make working with relational or + labeled data both easy and intuitive. It aims to be the + fundamental high-level building block for doing practical, real + world data analysis in Python. Additionally, it has the broader + goal of becoming the most powerful and flexible open source data + analysis / manipulation tool available in any language. + + """ homepage = "http://pandas.pydata.org/" url = "https://pypi.python.org/packages/source/p/pandas/pandas-0.16.0.tar.gz#md5=bfe311f05dc0c351f8955fbd1e296e73" @@ -35,12 +43,12 @@ class PyPandas(Package): version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6') extends('python') - depends_on('py-dateutil') - depends_on('py-numpy') - depends_on('py-setuptools') - depends_on('py-pytz') - depends_on('py-numexpr') - depends_on('py-bottleneck') + depends_on('py-dateutil', type=nolink) + depends_on('py-numpy', type=nolink) + depends_on('py-setuptools', type='build') + depends_on('py-pytz', type=nolink) + depends_on('py-numexpr', type=nolink) + depends_on('py-bottleneck', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pbr/package.py b/var/spack/repos/builtin/packages/py-pbr/package.py index 336ea37144..a0cfe0e5a5 100644 --- a/var/spack/repos/builtin/packages/py-pbr/package.py +++ b/var/spack/repos/builtin/packages/py-pbr/package.py @@ -23,10 +23,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class PyPbr(Package): - """PBR is a library that injects some useful and sensible default behaviors into your setuptools run.""" + """PBR is a library that injects some useful and sensible default + behaviors into your setuptools run.""" homepage = "https://pypi.python.org/pypi/pbr" url = "https://pypi.python.org/packages/source/p/pbr/pbr-1.8.1.tar.gz" @@ -34,9 +35,7 @@ class PyPbr(Package): extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - - diff --git a/var/spack/repos/builtin/packages/py-pep8/package.py b/var/spack/repos/builtin/packages/py-pep8/package.py index 987783b392..87d1da9ab0 100644 --- a/var/spack/repos/builtin/packages/py-pep8/package.py +++ b/var/spack/repos/builtin/packages/py-pep8/package.py @@ -1,5 +1,6 @@ from spack import * + class PyPep8(Package): """python pep8 format checker""" homepage = "https://github.com/PyCQA/pycodestyle" @@ -8,8 +9,7 @@ class PyPep8(Package): version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-periodictable/package.py b/var/spack/repos/builtin/packages/py-periodictable/package.py index 7d8a635979..51d9cc2046 100644 --- a/var/spack/repos/builtin/packages/py-periodictable/package.py +++ b/var/spack/repos/builtin/packages/py-periodictable/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPeriodictable(Package): """nose extends the test loading and running features of unittest, making it easier to write, find and run tests.""" @@ -33,8 +34,8 @@ class PyPeriodictable(Package): version('1.4.1', '7246b63cc0b6b1be6e86b6616f9e866e') - depends_on('py-numpy') - depends_on('py-pyparsing') + depends_on('py-numpy', type=nolink) + depends_on('py-pyparsing', type=nolink) extends('python') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-pexpect/package.py b/var/spack/repos/builtin/packages/py-pexpect/package.py index dd95af9643..8a99c0473b 100644 --- a/var/spack/repos/builtin/packages/py-pexpect/package.py +++ b/var/spack/repos/builtin/packages/py-pexpect/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPexpect(Package): """Pexpect allows easy control of interactive console applications.""" homepage = "https://pypi.python.org/pypi/pexpect" diff --git a/var/spack/repos/builtin/packages/py-phonopy/package.py b/var/spack/repos/builtin/packages/py-phonopy/package.py index 68774c90c2..d5b3313a98 100644 --- a/var/spack/repos/builtin/packages/py-phonopy/package.py +++ b/var/spack/repos/builtin/packages/py-phonopy/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPhonopy(Package): """Phonopy is an open source package for phonon calculations at harmonic and quasi-harmonic levels.""" @@ -33,10 +34,10 @@ class PyPhonopy(Package): version('1.10.0', '973ed1bcea46e21b9bf747aab9061ff6') extends('python') - depends_on('py-numpy') - depends_on('py-scipy') - depends_on('py-matplotlib') - depends_on('py-pyyaml') + depends_on('py-numpy', type=nolink) + depends_on('py-scipy', type=nolink) + depends_on('py-matplotlib', type=nolink) + depends_on('py-pyyaml', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--home=%s' % 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..1d8b3faa6f 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -23,77 +23,111 @@ # 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') + # variant('imagequant', default=False, + # description='Provide improved color quantization') + # Required dependencies extends('python') - depends_on('binutils') - depends_on('py-setuptools') + depends_on('binutils', type='build') + depends_on('py-setuptools', type='build') - 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-pmw/package.py b/var/spack/repos/builtin/packages/py-pmw/package.py index 062bfe9c03..e0a332a6bf 100644 --- a/var/spack/repos/builtin/packages/py-pmw/package.py +++ b/var/spack/repos/builtin/packages/py-pmw/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class PyPmw(Package): - """Pmw is a toolkit for building high-level compound widgets, or megawidgets, constructed using other widgets as component parts.""" + """Pmw is a toolkit for building high-level compound widgets, or + megawidgets, constructed using other widgets as component parts.""" homepage = "https://pypi.python.org/pypi/Pmw" url = "https://pypi.python.org/packages/source/P/Pmw/Pmw-2.0.0.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py index e3edc7b706..cf814733d4 100644 --- a/var/spack/repos/builtin/packages/py-prettytable/package.py +++ b/var/spack/repos/builtin/packages/py-prettytable/package.py @@ -38,7 +38,7 @@ class PyPrettytable(Package): version('0.7.2', 'a6b80afeef286ce66733d54a0296b13b') extends("python") - depends_on("py-setuptools") + depends_on("py-setuptools", type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % 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..dd2b5651de --- /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', type='build') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py index 9c6e219264..a79c2e477b 100644 --- a/var/spack/repos/builtin/packages/py-py2neo/package.py +++ b/var/spack/repos/builtin/packages/py-py2neo/package.py @@ -38,9 +38,8 @@ class PyPy2neo(Package): version('2.0.5', '143b1f9c0aa22faf170c1b9f84c7343b') version('2.0.4', 'b3f7efd3344dc3f66db4eda11e5899f7') - depends_on("py-setuptools") + depends_on("py-setuptools", type='build') extends("python") def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-pychecker/package.py b/var/spack/repos/builtin/packages/py-pychecker/package.py index 137c5f491c..e81c3dbc9b 100644 --- a/var/spack/repos/builtin/packages/py-pychecker/package.py +++ b/var/spack/repos/builtin/packages/py-pychecker/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPychecker(Package): """""" homepage = "http://pychecker.sourceforge.net/" diff --git a/var/spack/repos/builtin/packages/py-pycparser/package.py b/var/spack/repos/builtin/packages/py-pycparser/package.py index c33769c526..ef1b772ffc 100644 --- a/var/spack/repos/builtin/packages/py-pycparser/package.py +++ b/var/spack/repos/builtin/packages/py-pycparser/package.py @@ -24,16 +24,16 @@ ############################################################################## from spack import * + class PyPycparser(Package): - """pycparser is a complete parser of the C language, written in pure python""" + """A complete parser of the C language, written in pure python.""" homepage = "https://github.com/eliben/pycparser" url = "https://pypi.python.org/packages/source/p/pycparser/pycparser-2.13.tar.gz" version('2.13', 'e4fe1a2d341b22e25da0d22f034ef32f') - extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pydatalog/package.py b/var/spack/repos/builtin/packages/py-pydatalog/package.py new file mode 100644 index 0000000000..da157d3679 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydatalog/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyPydatalog(Package): + """pyDatalog adds logic programming to Python.""" + homepage = 'https://pypi.python.org/pypi/pyDatalog/' + url = 'https://pypi.python.org/packages/09/0b/2670eb9c0027aacfb5b5024ca75e5fee2f1261180ab8797108ffc941158a/pyDatalog-0.17.1.zip' + + version('0.17.1', '6b2682301200068d208d6f2d01723939') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py index 0c4a7a36cc..bf781daf83 100644 --- a/var/spack/repos/builtin/packages/py-pyelftools/package.py +++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class PyPyelftools(Package): - """A pure-Python library for parsing and analyzing ELF files and DWARF debugging information""" + """A pure-Python library for parsing and analyzing ELF files and DWARF + debugging information""" homepage = "https://pypi.python.org/pypi/pyelftools" url = "https://pypi.python.org/packages/source/p/pyelftools/pyelftools-0.23.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py index fedf3d068d..2d22bd9f03 100644 --- a/var/spack/repos/builtin/packages/py-pygments/package.py +++ b/var/spack/repos/builtin/packages/py-pygments/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPygments(Package): """Pygments is a syntax highlighting package written in Python.""" homepage = "https://pypi.python.org/pypi/pygments" @@ -33,7 +34,7 @@ class PyPygments(Package): version('2.0.2', '238587a1370d62405edabd0794b3ec4a') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py index 66118e8228..c505d44530 100644 --- a/var/spack/repos/builtin/packages/py-pylint/package.py +++ b/var/spack/repos/builtin/packages/py-pylint/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import re + class PyPylint(Package): """array processing for numbers, strings, records, and objects.""" @@ -34,8 +34,8 @@ class PyPylint(Package): version('1.4.3', '5924c1c7ca5ca23647812f5971d0ea44') extends('python') - depends_on('py-nose') - depends_on('py-setuptools') + depends_on('py-nose', type='build') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py index f762789dea..6fef71304c 100644 --- a/var/spack/repos/builtin/packages/py-pypar/package.py +++ b/var/spack/repos/builtin/packages/py-pypar/package.py @@ -24,12 +24,16 @@ ############################################################################## from spack import * + class PyPypar(Package): - """Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using MPI.""" + """Pypar is an efficient but easy-to-use module that allows programs + written in Python to run in parallel on multiple processors and + communicate using MPI.""" homepage = "http://code.google.com/p/pypar/" url = "https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz" - version('2.1.5_108', '7a1f28327d2a3b679f9455c843d850b8', url='https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz') + version('2.1.5_108', '7a1f28327d2a3b679f9455c843d850b8', + url='https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz') extends('python') depends_on('mpi') diff --git a/var/spack/repos/builtin/packages/py-pyparsing/package.py b/var/spack/repos/builtin/packages/py-pyparsing/package.py index 0423aa3bdb..67d255b02d 100644 --- a/var/spack/repos/builtin/packages/py-pyparsing/package.py +++ b/var/spack/repos/builtin/packages/py-pyparsing/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPyparsing(Package): """A Python Parsing Module.""" homepage = "https://pypi.python.org/pypi/pyparsing" diff --git a/var/spack/repos/builtin/packages/py-pyqt/package.py b/var/spack/repos/builtin/packages/py-pyqt/package.py index b090e25682..de68bfaa90 100644 --- a/var/spack/repos/builtin/packages/py-pyqt/package.py +++ b/var/spack/repos/builtin/packages/py-pyqt/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPyqt(Package): """PyQt is a set of Python v2 and v3 bindings for Digia's Qt application framework and runs on all platforms supported by Qt @@ -34,7 +35,7 @@ class PyPyqt(Package): version('4.11.3', '997c3e443165a89a559e0d96b061bf70') extends('python') - depends_on('py-sip') + depends_on('py-sip', type=nolink) # TODO: allow qt5 when conditional deps are supported. # TODO: Fix version matching so that @4 works like @:4 diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py index affee6c55a..1cb3e4745f 100644 --- a/var/spack/repos/builtin/packages/py-pyside/package.py +++ b/var/spack/repos/builtin/packages/py-pyside/package.py @@ -25,6 +25,7 @@ from spack import * import os + class PyPyside(Package): """Python bindings for Qt.""" homepage = "https://pypi.python.org/pypi/pyside" @@ -32,11 +33,10 @@ class PyPyside(Package): version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') - # TODO: make build dependency - # depends_on("cmake") + depends_on('cmake', type='build') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') depends_on('qt@:4') def patch(self): @@ -44,7 +44,8 @@ class PyPyside(Package): # Figure out the special RPATH pypkg = self.spec['python'].package rpath = self.rpath - rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'PySide')) + rpath.append(os.path.join( + self.prefix, pypkg.site_packages_dir, 'PySide')) # Add Spack's standard CMake args to the sub-builds. # They're called BY setup.py so we have to patch it. @@ -62,7 +63,6 @@ class PyPyside(Package): r'#rpath_cmd(pyside_path, srcpath)', 'pyside_postinstall.py') - def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix, diff --git a/var/spack/repos/builtin/packages/py-pytables/package.py b/var/spack/repos/builtin/packages/py-pytables/package.py index 47592fb3d1..f87e74211f 100644 --- a/var/spack/repos/builtin/packages/py-pytables/package.py +++ b/var/spack/repos/builtin/packages/py-pytables/package.py @@ -23,10 +23,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import re + class PyPytables(Package): - """PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data.""" + """PyTables is a package for managing hierarchical datasets and designed to + efficiently and easily cope with extremely large amounts of data.""" homepage = "http://www.pytables.org/" url = "https://github.com/PyTables/PyTables/archive/v.3.2.2.tar.gz" @@ -34,9 +35,10 @@ class PyPytables(Package): extends('python') depends_on('hdf5') - depends_on('py-numpy') - depends_on('py-numexpr') - depends_on('py-cython') + depends_on('py-numpy', type=nolink) + depends_on('py-numexpr', type=nolink) + depends_on('py-cython', type=nolink) + depends_on('py-setuptools', type='build') def install(self, spec, prefix): env["HDF5_DIR"] = spec['hdf5'].prefix diff --git a/var/spack/repos/builtin/packages/py-python-daemon/package.py b/var/spack/repos/builtin/packages/py-python-daemon/package.py index ae6393986d..a30dc00ba4 100644 --- a/var/spack/repos/builtin/packages/py-python-daemon/package.py +++ b/var/spack/repos/builtin/packages/py-python-daemon/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPythonDaemon(Package): """Library to implement a well-behaved Unix daemon process. @@ -42,9 +43,8 @@ class PyPythonDaemon(Package): version('2.0.5', '73e7f49f525c51fa4a995aea4d80de41') extends("python") - depends_on("py-setuptools") - depends_on("py-lockfile") + depends_on("py-setuptools", type='build') + depends_on("py-lockfile", type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py index caf2c90e73..96f686d591 100644 --- a/var/spack/repos/builtin/packages/py-pytz/package.py +++ b/var/spack/repos/builtin/packages/py-pytz/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPytz(Package): """World timezone definitions, modern and historical.""" homepage = "https://pypi.python.org/pypi/pytz" diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py index c0e22ba681..8da391fac1 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyPyyaml(Package): """PyYAML is a YAML parser and emitter for Python.""" homepage = "http://pyyaml.org/wiki/PyYAML" diff --git a/var/spack/repos/builtin/packages/py-restview/package.py b/var/spack/repos/builtin/packages/py-restview/package.py new file mode 100644 index 0000000000..047214c58e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-restview/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 PyRestview(Package): + """A viewer for ReStructuredText documents that renders them on the fly.""" + + homepage = "https://mg.pov.lt/restview/" + url = "https://pypi.python.org/packages/source/r/restview/restview-2.6.1.tar.gz" + + version('2.6.1', 'ac8b70e15b8f1732d1733d674813666b') + + extends('python') + depends_on('py-docutils', type=nolink) + depends_on('py-pygments', type=nolink) + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py index 03fd2b4a06..f86d813766 100644 --- a/var/spack/repos/builtin/packages/py-rpy2/package.py +++ b/var/spack/repos/builtin/packages/py-rpy2/package.py @@ -24,16 +24,22 @@ ############################################################################## from spack import * + class PyRpy2(Package): - """rpy2 is a redesign and rewrite of rpy. It is providing a low-level interface to R from Python, a proposed high-level interface, including wrappers to graphical libraries, as well as R-like structures and functions.""" + """rpy2 is a redesign and rewrite of rpy. It is providing a low-level + interface to R from Python, a proposed high-level interface, + including wrappers to graphical libraries, as well as R-like + structures and functions. + + """ homepage = "https://pypi.python.org/pypi/rpy2" - url = "https://pypi.python.org/packages/source/r/rpy2/rpy2-2.5.4.tar.gz" + url = "https://pypi.python.org/packages/source/r/rpy2/rpy2-2.5.4.tar.gz" version('2.5.4', '115a20ac30883f096da2bdfcab55196d') version('2.5.6', 'a36e758b633ce6aec6a5f450bfee980f') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') depends_on('R') diff --git a/var/spack/repos/builtin/packages/py-scientificpython/package.py b/var/spack/repos/builtin/packages/py-scientificpython/package.py index 7f7eb76b73..e2273dc164 100644 --- a/var/spack/repos/builtin/packages/py-scientificpython/package.py +++ b/var/spack/repos/builtin/packages/py-scientificpython/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyScientificpython(Package): """ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, 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..fbeb5c95ca 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" @@ -33,12 +36,13 @@ class PyScikitImage(Package): extends('python', ignore=r'bin/.*\.py$') - depends_on('py-dask') - depends_on('py-pillow') - depends_on('py-networkx') - depends_on('py-six') - depends_on('py-scipy') - depends_on('py-matplotlib') + depends_on('py-dask', type=nolink) + depends_on('pil', type=nolink) + depends_on('py-networkx', type=nolink) + depends_on('py-six', type=nolink) + depends_on('py-scipy', type=nolink) + depends_on('py-matplotlib', type=nolink) + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py index 7bb5853b19..3cd7ea74f3 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyScikitLearn(Package): """""" homepage = "https://pypi.python.org/pypi/scikit-learn" @@ -35,9 +36,9 @@ class PyScikitLearn(Package): extends('python') - depends_on('py-setuptools') - depends_on('py-numpy') - depends_on('py-scipy') + depends_on('py-setuptools', type='build') + depends_on('py-numpy', type=nolink) + depends_on('py-scipy', type=nolink) def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index f7c372b345..cab516e1df 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyScipy(Package): """Scientific Library for Python.""" homepage = "http://www.scipy.org/" @@ -34,14 +35,15 @@ class PyScipy(Package): version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') extends('python') - depends_on('py-nose') - depends_on('py-numpy+blas+lapack') + depends_on('py-nose', type='build') + depends_on('py-numpy+blas+lapack', type=nolink) def install(self, spec, prefix): if 'atlas' in spec: # libatlas.so actually isn't always installed, but this # seems to make the build autodetect things correctly. - env['ATLAS'] = join_path(spec['atlas'].prefix.lib, 'libatlas.' + dso_suffix) + env['ATLAS'] = join_path( + spec['atlas'].prefix.lib, 'libatlas.' + dso_suffix) else: env['BLAS'] = spec['blas'].blas_shared_lib env['LAPACK'] = spec['lapack'].lapack_shared_lib diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 68032cb68d..08d5e5d552 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -24,8 +24,11 @@ ############################################################################## from spack import * + class PySetuptools(Package): - """Easily download, build, install, upgrade, and uninstall Python packages.""" + """A Python utility that aids in the process of downloading, building, + upgrading, installing, and uninstalling Python packages.""" + homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" @@ -40,4 +43,4 @@ class PySetuptools(Package): extends('python') def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) + setup_py('install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py index a2240c68a4..0713f26ebc 100644 --- a/var/spack/repos/builtin/packages/py-shiboken/package.py +++ b/var/spack/repos/builtin/packages/py-shiboken/package.py @@ -25,18 +25,18 @@ from spack import * import os + class PyShiboken(Package): - """Shiboken generates bindings for C++ libraries using CPython source code.""" + """Shiboken generates bindings for C++ libraries using CPython.""" homepage = "https://shiboken.readthedocs.org/" url = "https://pypi.python.org/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz" version('1.2.2', '345cfebda221f525842e079a6141e555') - # TODO: make build dependency - # depends_on("cmake") + depends_on('cmake', type='build') extends('python') - depends_on("py-setuptools") + depends_on("py-setuptools", type='build') depends_on("libxml2") depends_on("qt@:4.8") @@ -46,7 +46,8 @@ class PyShiboken(Package): # They're called BY setup.py so we have to patch it. pypkg = self.spec['python'].package rpath = self.rpath - rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'Shiboken')) + rpath.append(os.path.join( + self.prefix, pypkg.site_packages_dir, 'Shiboken')) filter_file( r'OPTION_CMAKE,', @@ -62,7 +63,6 @@ class PyShiboken(Package): r'#rpath_cmd(shiboken_path, srcpath)', 'shiboken_postinstall.py') - def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix, diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py index fc8e7f5296..9d97f08433 100644 --- a/var/spack/repos/builtin/packages/py-sip/package.py +++ b/var/spack/repos/builtin/packages/py-sip/package.py @@ -25,8 +25,10 @@ from spack import * import os + class PySip(Package): - """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" + """SIP is a tool that makes it very easy to create Python bindings for C + and C++ libraries.""" homepage = "http://www.riverbankcomputing.com/software/sip/intro" url = "http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.5/sip-4.16.5.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py index 3efb3d4317..da0c7aa003 100644 --- a/var/spack/repos/builtin/packages/py-six/package.py +++ b/var/spack/repos/builtin/packages/py-six/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PySix(Package): """Python 2 and 3 compatibility utilities.""" homepage = "https://pypi.python.org/pypi/six" @@ -33,7 +34,7 @@ class PySix(Package): version('1.10.0', '34eed507548117b2ab523ab14b2f8b55') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py new file mode 100644 index 0000000000..feb3856e8b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sncosmo/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 PySncosmo(Package): + """SNCosmo is a Python library for high-level supernova cosmology + analysis.""" + + homepage = "http://sncosmo.readthedocs.io/" + url = "https://pypi.python.org/packages/source/s/sncosmo/sncosmo-1.2.0.tar.gz" + + version('1.2.0', '028e6d1dc84ab1c17d2f3b6378b2cb1e') + + # Required dependencies + # py-sncosmo binaries are duplicates of those from py-astropy + extends('python', ignore=r'bin/.*') + depends_on('py-numpy', type=nolink) + depends_on('py-scipy', type=nolink) + depends_on('py-astropy', type=nolink) + + # Recommended dependencies + depends_on('py-matplotlib', type=nolink) + depends_on('py-iminuit', type=nolink) + depends_on('py-emcee', type=nolink) + depends_on('py-nestle', type=nolink) + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py index d00f1d128b..2295a6a0c3 100644 --- a/var/spack/repos/builtin/packages/py-sphinx/package.py +++ b/var/spack/repos/builtin/packages/py-sphinx/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PySphinx(Package): """Sphinx Documentation Generator.""" homepage = "http://sphinx-doc.org" diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py index 53af720c50..0e972480f3 100644 --- a/var/spack/repos/builtin/packages/py-storm/package.py +++ b/var/spack/repos/builtin/packages/py-storm/package.py @@ -34,7 +34,7 @@ class PyStorm(Package): version('0.20', '8628503141f0f06c0749d607ac09b9c7') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py index 5e38fc5be1..3d8b86ac4d 100644 --- a/var/spack/repos/builtin/packages/py-sympy/package.py +++ b/var/spack/repos/builtin/packages/py-sympy/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PySympy(Package): """SymPy is a Python library for symbolic mathematics.""" homepage = "https://pypi.python.org/pypi/sympy" diff --git a/var/spack/repos/builtin/packages/py-tappy/package.py b/var/spack/repos/builtin/packages/py-tappy/package.py index a1026a9b4b..03e9528ad7 100644 --- a/var/spack/repos/builtin/packages/py-tappy/package.py +++ b/var/spack/repos/builtin/packages/py-tappy/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyTappy(Package): """Python TAP interface module for unit tests""" homepage = "https://github.com/mblayman/tappy" @@ -33,7 +34,7 @@ class PyTappy(Package): version('1.6', 'c8bdb93ad66e05f939905172a301bedf') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py index 200a33a676..672a3ee587 100644 --- a/var/spack/repos/builtin/packages/py-tuiview/package.py +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyTuiview(Package): """ TuiView is a lightweight raster GIS with powerful raster attribute @@ -35,8 +36,8 @@ class PyTuiview(Package): version('1.1.7', '4b3b38a820cc239c8ab4a181ac5d4c30') extends("python") - depends_on("py-pyqt") - depends_on("py-numpy") + depends_on("py-pyqt", type=nolink) + depends_on("py-numpy", type=nolink) depends_on("gdal") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py index 27db4adff4..edf1e7b0d7 100644 --- a/var/spack/repos/builtin/packages/py-twisted/package.py +++ b/var/spack/repos/builtin/packages/py-twisted/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyTwisted(Package): """An asynchronous networking framework written in Python""" homepage = "https://twistedmatrix.com/" @@ -32,7 +33,7 @@ class PyTwisted(Package): version('15.4.0', '5337ffb6aeeff3790981a2cd56db9655') version('15.3.0', 'b58e83da2f00b3352afad74d0c5c4599') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') extends('python') 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..174ab0ca5f --- /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', type='build') + + 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..95e6dcbff0 --- /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', type='build') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-urwid/package.py b/var/spack/repos/builtin/packages/py-urwid/package.py index 0accc72df8..943fb250f6 100644 --- a/var/spack/repos/builtin/packages/py-urwid/package.py +++ b/var/spack/repos/builtin/packages/py-urwid/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyUrwid(Package): """A full-featured console UI library""" homepage = "http://urwid.org/" @@ -31,10 +32,9 @@ class PyUrwid(Package): version('1.3.0', 'a989acd54f4ff1a554add464803a9175') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') extends("python") def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py index d42cb96eb7..0ed567df95 100644 --- a/var/spack/repos/builtin/packages/py-virtualenv/package.py +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import shutil + class PyVirtualenv(Package): """virtualenv is a tool to create isolated Python environments.""" @@ -35,7 +35,7 @@ class PyVirtualenv(Package): version('15.0.1', '28d76a0d9cbd5dc42046dd14e76a6ecc') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-wcsaxes/package.py b/var/spack/repos/builtin/packages/py-wcsaxes/package.py new file mode 100644 index 0000000000..9588b879fa --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wcsaxes/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 PyWcsaxes(Package): + """WCSAxes is a framework for making plots of Astronomical data + in Matplotlib.""" + + homepage = "http://wcsaxes.readthedocs.io/en/latest/index.html" + url = "https://github.com/astrofrog/wcsaxes/archive/v0.8.tar.gz" + + version('0.8', 'de1c60fdae4c330bf5ddb9f1ab5ab920') + + extends('python', ignore=r'bin/pbr') + depends_on('py-numpy', type=nolink) + depends_on('py-matplotlib', type=nolink) + depends_on('py-astropy', type=nolink) + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py index 68b6f3d679..f0ad340835 100644 --- a/var/spack/repos/builtin/packages/py-wheel/package.py +++ b/var/spack/repos/builtin/packages/py-wheel/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyWheel(Package): """A built-package format for Python.""" @@ -33,7 +34,7 @@ class PyWheel(Package): version('0.26.0', '4cfc6e7e3dc7377d0164914623922a10') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py index 9220f90340..81c3c928c0 100644 --- a/var/spack/repos/builtin/packages/py-xlrd/package.py +++ b/var/spack/repos/builtin/packages/py-xlrd/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyXlrd(Package): """Library for developers to extract data from Microsoft Excel (tm) spreadsheet files""" diff --git a/var/spack/repos/builtin/packages/py-yapf/package.py b/var/spack/repos/builtin/packages/py-yapf/package.py index 60f740c98d..bc26b82b07 100644 --- a/var/spack/repos/builtin/packages/py-yapf/package.py +++ b/var/spack/repos/builtin/packages/py-yapf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class PyYapf(Package): """ Yet Another Python Formatter """ homepage = "https://github.com/google/yapf" @@ -33,7 +34,7 @@ class PyYapf(Package): version('0.2.1', '348ccf86cf2057872e4451b204fb914c') extends('python') - depends_on('py-setuptools') + depends_on('py-setuptools', type='build') 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 86c12498e1..c4e6754969 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -22,14 +22,12 @@ # 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 +import llnl.util.tty as tty from llnl.util.lang import match_predicate from spack import * from spack.util.environment import * @@ -37,66 +35,147 @@ from spack.util.environment import * class Python(Package): """The Python programming language.""" + homepage = "http://www.python.org" url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz" - extendable = True - + version('3.5.2', '3fe8434643a78630c61c6464fe2e7e72') version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe') version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36') - version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True) + version('3.4.3', '4281ff86778db65892c05151d5de738d') + version('3.3.6', 'cdb3cd08f96f074b3f3994ccb51063e9') + version('3.2.6', '23815d82ae706e9b781ca65865353d39') + version('3.1.5', '02196d3fc7bc76bdda68aa36b0dd16ab') + version('2.7.12', '88d61f82e3616a4be952828b3694109d', preferred=True) + version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b') version('2.7.10', 'd7547558fd673bd9d38e2108c6b42521') version('2.7.9', '5eebcaa0030dc4061156d3429657fb83') version('2.7.8', 'd4bca0159acb0b44a781292b5231936f') + extendable = True + + variant('tk', default=False, description='Provide support for Tkinter') + variant('ucs4', default=False, + description='Enable UCS4 (wide) unicode strings') + # From https://docs.python.org/2/c-api/unicode.html: Python's default + # builds use a 16-bit type for Py_UNICODE and store Unicode values + # internally as UCS2. It is also possible to build a UCS4 version of Python + # (most recent Linux distributions come with UCS4 builds of Python). These + # builds then use a 32-bit type for Py_UNICODE and store Unicode data + # internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary + # compatible. + depends_on("openssl") depends_on("bzip2") depends_on("readline") depends_on("ncurses") depends_on("sqlite") depends_on("zlib") + depends_on("tk", when="+tk") + depends_on("tcl", when="+tk") + + @when('@2.7,3.4:') + def patch(self): + # NOTE: Python's default installation procedure makes it possible for a + # user's local configurations to change the Spack installation. In + # order to prevent this behavior for a full installation, we must + # modify the installation script so that it ignores user files. + ff = FileFilter('Makefile.pre.in') + ff.filter( + r'^(.*)setup\.py(.*)((build)|(install))(.*)$', + r'\1setup.py\2 --no-user-cfg \3\6' + ) def install(self, spec, prefix): + # TODO: The '--no-user-cfg' option for Python installation is only in + # Python v2.7 and v3.4+ (see https://bugs.python.org/issue1180) and + # adding support for ignoring user configuration will require + # significant changes to this package for other Python versions. + if not spec.satisfies('@2.7,3.4:'): + tty.warn(('Python v{0} may not install properly if Python ' + 'user configurations are present.').format(self.version)) + # Need this to allow python build to find the Python installation. - env['PYTHONHOME'] = prefix + env['PYTHONHOME'], env['PYTHONPATH'] = prefix, prefix env['MACOSX_DEPLOYMENT_TARGET'] = '10.6' # Rest of install is pretty standard except setup.py needs to # be able to read the CPPFLAGS and LDFLAGS as it scans for the # library and headers to build - configure_args= [ - "--prefix=%s" % prefix, - "--with-threads", - "--enable-shared", - "CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include" % ( - spec['openssl'].prefix, spec['bzip2'].prefix, - spec['readline'].prefix, spec['ncurses'].prefix, - spec['sqlite'].prefix, spec['zlib'].prefix), - "LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib" % ( - spec['openssl'].prefix, spec['bzip2'].prefix, - spec['readline'].prefix, spec['ncurses'].prefix, - spec['sqlite'].prefix, spec['zlib'].prefix) - ] - if spec.satisfies('@3:'): - configure_args.append('--without-ensurepip') - configure(*configure_args) - make() - make("install") + dep_pfxs = [dspec.prefix for dspec in spec.dependencies('link')] + config_args = [ + '--prefix={0}'.format(prefix), + '--with-threads', + '--enable-shared', + 'CPPFLAGS=-I{0}'.format(' -I'.join(dp.include for dp in dep_pfxs)), + 'LDFLAGS=-L{0}'.format(' -L'.join(dp.lib for dp in dep_pfxs)), + ] + + if '+ucs4' in spec: + if spec.satisfies('@:2.7'): + config_args.append('--enable-unicode=ucs4') + elif spec.satisfies('@3.0:3.2'): + config_args.append('--with-wide-unicode') + elif spec.satisfies('@3.3:'): + # https://docs.python.org/3.3/whatsnew/3.3.html + raise ValueError( + '+ucs4 variant not compatible with Python 3.3 and beyond') - # Modify compiler paths in configuration files. This is necessary for - # building site packages outside of spack - filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)', - (r'\4\5'), - join_path(prefix.lib, 'python%d.%d' % self.version[:2], '_sysconfigdata.py')) + if spec.satisfies('@3:'): + config_args.append('--without-ensurepip') - python3_version = '' + configure(*config_args) + make() + make('install') + + self.filter_compilers(spec, prefix) + + # TODO: Once better testing support is integrated, add the following tests + # https://wiki.python.org/moin/TkInter + # + # if '+tk' in spec: + # env['TK_LIBRARY'] = join_path(spec['tk'].prefix.lib, + # 'tk{0}'.format(spec['tk'].version.up_to(2))) + # env['TCL_LIBRARY'] = join_path(spec['tcl'].prefix.lib, + # 'tcl{0}'.format(spec['tcl'].version.up_to(2))) + # + # $ python + # >>> import _tkinter + # + # if spec.satisfies('@3:') + # >>> import tkinter + # >>> tkinter._test() + # else: + # >>> import Tkinter + # >>> Tkinter._test() + + def filter_compilers(self, spec, prefix): + """Run after install to tell the configuration files and Makefiles + to use the compilers that Spack built the package with. + + If this isn't done, they'll have CC and CXX set to Spack's generic + cc and c++. We want them to be bound to whatever compiler + they were built with.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + + dirname = join_path(prefix.lib, + 'python{0}'.format(self.version.up_to(2))) + + config = 'config' if spec.satisfies('@3:'): - python3_version = '-%d.%dm' % self.version[:2] - makefile_filepath = join_path(prefix.lib, 'python%d.%d' % self.version[:2], 'config%s' % python3_version, 'Makefile') - filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)', - (r'\4\5'), - makefile_filepath) + config = 'config-{0}m'.format(self.version.up_to(2)) + files = [ + '_sysconfigdata.py', + join_path(config, 'Makefile') + ] + + for filename in files: + filter_file(env['CC'], self.compiler.cc, + join_path(dirname, filename), **kwargs) + filter_file(env['CXX'], self.compiler.cxx, + join_path(dirname, filename), **kwargs) # ======================================================================== # Set up environment to make install easy for python extensions. @@ -104,57 +183,60 @@ class Python(Package): @property def python_lib_dir(self): - return os.path.join('lib', 'python%d.%d' % self.version[:2]) - + return join_path('lib', 'python{0}'.format(self.version.up_to(2))) @property def python_include_dir(self): - return os.path.join('include', 'python%d.%d' % self.version[:2]) - + return join_path('include', 'python{0}'.format(self.version.up_to(2))) @property def site_packages_dir(self): - return os.path.join(self.python_lib_dir, 'site-packages') - + return join_path(self.python_lib_dir, 'site-packages') def setup_dependent_environment(self, spack_env, run_env, extension_spec): - # TODO: do this only for actual extensions. + """Set PYTHONPATH to include site-packages dir for the + extension and any other python extensions it depends on.""" + pythonhome = self.prefix + spack_env.set('PYTHONHOME', pythonhome) - # Set PYTHONPATH to include site-packages dir for the - # extension and any other python extensions it depends on. python_paths = [] - for d in extension_spec.traverse(): + for d in extension_spec.traverse(deptype=nolink, deptype_query='run'): if d.package.extends(self.spec): - python_paths.append(os.path.join(d.prefix, self.site_packages_dir)) + python_paths.append(join_path(d.prefix, + self.site_packages_dir)) pythonpath = ':'.join(python_paths) spack_env.set('PYTHONPATH', pythonpath) - # For run time environment set only the path for extension_spec and prepend it to PYTHONPATH + # For run time environment set only the path for + # extension_spec and prepend it to PYTHONPATH if extension_spec.package.extends(self.spec): - run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir)) - + run_env.prepend_path('PYTHONPATH', join_path( + extension_spec.prefix, self.site_packages_dir)) def setup_dependent_package(self, module, ext_spec): - """ - Called before python modules' install() methods. + """Called before python modules' install() methods. In most cases, extensions will only need to have one line:: - python('setup.py', 'install', '--prefix=%s' % prefix) - """ - # Python extension builds can have a global python executable function - if self.version >= Version("3.0.0") and self.version < Version("4.0.0"): - module.python = Executable(join_path(self.spec.prefix.bin, 'python3')) - else: - module.python = Executable(join_path(self.spec.prefix.bin, 'python')) + setup_py('install', '--prefix={0}'.format(prefix))""" + python_path = join_path( + self.spec.prefix.bin, + 'python{0}'.format('3' if self.spec.satisfies('@3') else '') + ) - # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. - module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) - module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir) - module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir) + module.python = Executable(python_path) + module.setup_py = Executable(python_path + ' setup.py --no-user-cfg') - # Make the site packages directory for extensions, if it does not exist already. + # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. + module.python_lib_dir = join_path(ext_spec.prefix, + self.python_lib_dir) + module.python_include_dir = join_path(ext_spec.prefix, + self.python_include_dir) + module.site_packages_dir = join_path(ext_spec.prefix, + self.site_packages_dir) + + # Make the site packages directory for extensions if ext_spec.package.is_extension: mkdirp(module.site_packages_dir) @@ -167,25 +249,30 @@ class Python(Package): ignore_arg = args.get('ignore', lambda f: False) # Always ignore easy-install.pth, as it needs to be merged. - patterns = [r'easy-install\.pth$'] + patterns = [r'site-packages/easy-install\.pth$'] # Ignore pieces of setuptools installed by other packages. + # Must include directory name or it will remove all site*.py files. if ext_pkg.name != 'py-setuptools': - patterns.append(r'/site[^/]*\.pyc?$') - patterns.append(r'setuptools\.pth') - patterns.append(r'bin/easy_install[^/]*$') - patterns.append(r'setuptools.*egg$') + patterns.extend([ + r'bin/easy_install[^/]*$', + r'site-packages/setuptools[^/]*\.egg$', + r'site-packages/setuptools\.pth$', + 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) - def write_easy_install_pth(self, exts): paths = [] for ext in sorted(exts.values()): - ext_site_packages = os.path.join(ext.prefix, self.site_packages_dir) - easy_pth = "%s/easy-install.pth" % ext_site_packages + ext_site_packages = join_path(ext.prefix, self.site_packages_dir) + easy_pth = join_path(ext_site_packages, "easy-install.pth") if not os.path.isfile(easy_pth): continue @@ -195,15 +282,18 @@ class Python(Package): line = line.rstrip() # Skip lines matching these criteria - if not line: continue - if re.search(r'^(import|#)', line): continue - if (ext.name != 'py-setuptools' and - re.search(r'setuptools.*egg$', line)): continue + if not line: + continue + if re.search(r'^(import|#)', line): + continue + if ((ext.name != 'py-setuptools' and + re.search(r'setuptools.*egg$', line))): + continue paths.append(line) - site_packages = os.path.join(self.prefix, self.site_packages_dir) - main_pth = "%s/easy-install.pth" % site_packages + site_packages = join_path(self.prefix, self.site_packages_dir) + main_pth = join_path(site_packages, "easy-install.pth") if not paths: if os.path.isfile(main_pth): @@ -211,15 +301,22 @@ class Python(Package): else: with closing(open(main_pth, 'w')) as f: - f.write("import sys; sys.__plen = len(sys.path)\n") + f.write(""" +import sys +sys.__plen = len(sys.path) +""") for path in paths: - f.write("%s\n" % path) - f.write("import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; " - "p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)\n") - + f.write("{0}\n".format(path)) + f.write(""" +new = sys.path[sys.__plen:] +del sys.path[sys.__plen:] +p = getattr(sys, '__egginsert', 0) +sys.path[p:p] = new +sys.__egginsert = p + len(new) +""") def activate(self, ext_pkg, **args): - ignore=self.python_ignore(ext_pkg, args) + ignore = self.python_ignore(ext_pkg, args) args.update(ignore=ignore) super(Python, self).activate(ext_pkg, **args) @@ -228,12 +325,12 @@ class Python(Package): exts[ext_pkg.name] = ext_pkg.spec self.write_easy_install_pth(exts) - def deactivate(self, ext_pkg, **args): args.update(ignore=self.python_ignore(ext_pkg, args)) super(Python, self).deactivate(ext_pkg, **args) exts = spack.install_layout.extension_map(self.spec) - if ext_pkg.name in exts: # Make deactivate idempotent. + # Make deactivate idempotent + if ext_pkg.name in exts: del exts[ext_pkg.name] self.write_easy_install_pth(exts) diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py index 280c9cc12c..2733d8b652 100644 --- a/var/spack/repos/builtin/packages/qhull/package.py +++ b/var/spack/repos/builtin/packages/qhull/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Qhull(Package): """Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furt hest-site @@ -44,8 +45,8 @@ class Qhull(Package): # https://github.com/qhull/qhull/pull/5 patch('qhull-iterator.patch', when='@1.0') - - depends_on('cmake') + + depends_on('cmake', type='build') def install(self, spec, prefix): with working_dir('spack-build', create=True): diff --git a/var/spack/repos/builtin/packages/qrupdate/package.py b/var/spack/repos/builtin/packages/qrupdate/package.py index 314950dc36..f6b4c80cf4 100644 --- a/var/spack/repos/builtin/packages/qrupdate/package.py +++ b/var/spack/repos/builtin/packages/qrupdate/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Qrupdate(Package): """qrupdate is a Fortran library for fast updates of QR and Cholesky decompositions.""" diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 0c91a5ce87..4239fa292b 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" homepage = 'http://qt.io' @@ -37,15 +38,17 @@ class Qt(Package): version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb') version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009') - # Add patch for compile issues with qt3 found with use in the OpenSpeedShop project - variant('krellpatch', default=False, description="Build with openspeedshop based patch.") + # Add patch for compile issues with qt3 found with use in the + # OpenSpeedShop project + variant('krellpatch', default=False, + description="Build with openspeedshop based patch.") variant('mesa', default=False, description="Depend on mesa.") variant('gtk', default=False, description="Build with gtkplus.") patch('qt3krell.patch', when='@3.3.8b+krellpatch') # Use system openssl for security. - #depends_on("openssl") + # depends_on("openssl") depends_on("glib") depends_on("gtkplus", when='+gtk') @@ -60,52 +63,48 @@ class Qt(Package): # Webkit # depends_on("gperf") - # depends_on("flex") - # depends_on("bison") - # depends_on("ruby") + # depends_on("flex", type='build') + # depends_on("bison", type='build') + # depends_on("ruby", type='build') # depends_on("icu4c") # OpenGL hardware acceleration depends_on("mesa", when='@4:+mesa') depends_on("libxcb") - def url_for_version(self, version): url = "http://download.qt.io/archive/qt/" if version >= Version('5'): url += "%s/%s/single/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version, version) + (version.up_to(2), version, version) elif version >= Version('4.8'): url += "%s/%s/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version, version) + (version.up_to(2), version, version) elif version >= Version('4.6'): url += "%s/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version) + (version.up_to(2), version) elif version >= Version('4.0'): url += "%s/qt-x11-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version) + (version.up_to(2), version) elif version >= Version('3'): url += "%s/qt-x11-free-%s.tar.gz" % \ - (version.up_to(1), version) + (version.up_to(1), version) elif version >= Version('2.1'): url += "%s/qt-x11-%s.tar.gz" % \ - (version.up_to(1), version) + (version.up_to(1), version) else: url += "%s/qt-%s.tar.gz" % \ - (version.up_to(1), version) + (version.up_to(1), version) return url - def setup_environment(self, spack_env, env): env.set('QTDIR', self.prefix) - def setup_dependent_environment(self, spack_env, run_env, dspec): spack_env.set('QTDIR', self.prefix) - def patch(self): if self.spec.satisfies('@4'): qmake_conf = 'mkspecs/common/g++-base.conf' @@ -117,11 +116,14 @@ class Qt(Package): return # Fix qmake compilers in the default mkspec - filter_file(r'^QMAKE_COMPILER *=.*$', 'QMAKE_COMPILER = cc', qmake_conf) - filter_file(r'^QMAKE_CC *=.*$', 'QMAKE_CC = cc', qmake_conf) - filter_file(r'^QMAKE_CXX *=.*$', 'QMAKE_CXX = c++', qmake_conf) - filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', 'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) - + filter_file(r'^QMAKE_COMPILER *=.*$', + 'QMAKE_COMPILER = cc', qmake_conf) + filter_file(r'^QMAKE_CC *=.*$', + 'QMAKE_CC = cc', qmake_conf) + filter_file(r'^QMAKE_CXX *=.*$', + 'QMAKE_CXX = c++', qmake_conf) + filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', + 'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) @property def common_config_args(self): @@ -155,7 +157,7 @@ class Qt(Package): @when('@3') def configure(self): # An user report that this was necessary to link Qt3 on ubuntu - os.environ['LD_LIBRARY_PATH'] = os.getcwd()+'/lib' + os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib' configure('-prefix', self.prefix, '-v', '-thread', @@ -169,17 +171,16 @@ class Qt(Package): '-no-webkit', *self.common_config_args) - @when('@5') def configure(self): configure('-no-eglfs', '-no-directfb', '-qt-xcb', - # If someone wants to get a webkit build working, be my guest! + # If someone wants to get a webkit build working, be my + # guest! '-skip', 'qtwebkit', *self.common_config_args) - def install(self, spec, prefix): self.configure() make() diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index 47b5706063..2eaff0a240 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Qthreads(Package): """The qthreads API is designed to make using large numbers of threads convenient and easy, and to allow portable access to 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-assertthat/package.py b/var/spack/repos/builtin/packages/r-assertthat/package.py new file mode 100644 index 0000000000..4070b6fe8d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-assertthat/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 RAssertthat(Package): + """assertthat is an extension to stopifnot() that makes it easy to declare + the pre and post conditions that you code should satisfy, while also + producing friendly error messages so that your users know what they've done + wrong.""" + + homepage = "https://cran.r-project.org/web/packages/assertthat/index.html" + url = "https://cran.r-project.org/src/contrib/assertthat_0.1.tar.gz" + + version('0.1', '59f9d7f7c00077ea54d763b78eeb5798') + + 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-base64enc/package.py b/var/spack/repos/builtin/packages/r-base64enc/package.py new file mode 100644 index 0000000000..4c5d14a90f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-base64enc/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 RBase64enc(Package): + """This package provides tools for handling base64 encoding. It is more + flexible than the orphaned base64 package.""" + + homepage = "http://www.rforge.net/base64enc" + url = "https://cran.r-project.org/src/contrib/base64enc_0.1-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/base64enc" + + version('0.1-3', '0f476dacdd11a3e0ad56d13f5bc2f190') + + 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-bh/package.py b/var/spack/repos/builtin/packages/r-bh/package.py new file mode 100644 index 0000000000..a0f30b779f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-bh/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 RBh(Package): + """Boost provides free peer-reviewed portable C++ source libraries. A large + part of Boost is provided as C++ template code which is resolved entirely + at compile-time without linking. This package aims to provide the most + useful subset of Boost libraries for template use among CRAN package. By + placing these libraries in this package, we offer a more efficient + distribution system for CRAN as replication of this code in the sources of + other packages is avoided. As of release 1.60.0-2, the following Boost + libraries are included: 'algorithm' 'any' 'bimap' 'bind' 'circular_buffer' + 'concept' 'config' 'container' 'date'_'time' 'detail' 'dynamic_bitset' + 'exception' 'filesystem' 'flyweight' 'foreach' 'functional' 'fusion' + 'geometry' 'graph' 'heap' 'icl' 'integer' 'interprocess' 'intrusive' 'io' + 'iostreams' 'iterator' 'math' 'move' 'mpl' 'multiprcecision' 'numeric' + 'pending' 'phoenix' 'preprocessor' 'random' 'range' 'smart_ptr' 'spirit' + 'tuple' 'type_trains' 'typeof' 'unordered' 'utility' 'uuid'.""" + + homepage = "https://cran.r-project.org/web/packages/BH/index.html" + url = "https://cran.r-project.org/src/contrib/BH_1.60.0-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/BH" + + version('1.60.0-2', 'b50fdc85285da05add4e9da664a2d551') + + 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-boot/package.py b/var/spack/repos/builtin/packages/r-boot/package.py new file mode 100644 index 0000000000..1f2f541fec --- /dev/null +++ b/var/spack/repos/builtin/packages/r-boot/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 RBoot(Package): + """Functions and datasets for bootstrapping from the book "Bootstrap + Methods and Their Application" by A. C. Davison and D. V. Hinkley (1997, + CUP), originally written by Angelo Canty for S.""" + + homepage = "https://cran.r-project.org/package=boot" + url = "https://cran.r-project.org/src/contrib/boot_1.3-18.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/boot" + + version('1.3-18', '711dd58af14e1027eb8377d9202e9b6f') + + 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-brew/package.py b/var/spack/repos/builtin/packages/r-brew/package.py new file mode 100644 index 0000000000..111606d576 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-brew/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 RBrew(Package): + """brew implements a templating framework for mixing text and R code for + report generation. brew template syntax is similar to PHP, Ruby's erb + module, Java Server Pages, and Python's psp module.""" + + homepage = "https://cran.r-project.org/package=brew" + url = "https://cran.r-project.org/src/contrib/brew_1.0-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/brew" + + version('1.0-6', '4aaca5e6ec145e0fc0fe6375ce1f3806') + + 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-car/package.py b/var/spack/repos/builtin/packages/r-car/package.py new file mode 100644 index 0000000000..f4a3824983 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-car/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 RCar(Package): + """Functions and Datasets to Accompany J. Fox and S. Weisberg, An R + Companion to Applied Regression, Second Edition, Sage, 2011.""" + + homepage = "https://r-forge.r-project.org/projects/car/" + url = "https://cran.r-project.org/src/contrib/car_2.1-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/car" + + version('2.1-2', '0f78ad74ef7130126d319acec23951a0') + + extends('R') + + depends_on('r-mass', type=nolink) + depends_on('r-mgcv', type=nolink) + depends_on('r-nnet', type=nolink) + depends_on('r-pbkrtest', type=nolink) + depends_on('r-quantreg', type=nolink) + + 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-caret/package.py b/var/spack/repos/builtin/packages/r-caret/package.py new file mode 100644 index 0000000000..460526c7d3 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-caret/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 RCaret(Package): + """Misc functions for training and plotting classification and regression + models.""" + + homepage = "https://github.com/topepo/caret/" + url = "https://cran.r-project.org/src/contrib/caret_6.0-70.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/caret" + + version('6.0-70', '202d7abb6a679af716ea69fb2573f108') + + extends('R') + + depends_on('r-lattice', type=nolink) + depends_on('r-ggplot2', type=nolink) + depends_on('r-car', type=nolink) + depends_on('r-foreach', type=nolink) + depends_on('r-plyr', type=nolink) + depends_on('r-nlme', type=nolink) + depends_on('r-reshape2', type=nolink) + + 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-chron/package.py b/var/spack/repos/builtin/packages/r-chron/package.py new file mode 100644 index 0000000000..9cd9d76e9e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-chron/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 RChron(Package): + """Chronological objects which can handle dates and times.""" + + homepage = "https://cran.r-project.org/package=chron" + url = "https://cran.r-project.org/src/contrib/chron_2.3-47.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/chron" + + version('2.3-47', 'b8890cdc5f2337f8fd775b0becdcdd1f') + + 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-class/package.py b/var/spack/repos/builtin/packages/r-class/package.py new file mode 100644 index 0000000000..f541ea3611 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-class/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 RClass(Package): + """Various functions for classification, including k-nearest neighbour, + Learning Vector Quantization and Self-Organizing Maps.""" + + homepage = "http://www.stats.ox.ac.uk/pub/MASS4/" + url = "https://cran.r-project.org/src/contrib/class_7.3-14.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/class" + + version('7.3-14', '6a21dd206fe4ea29c55faeb65fb2b71e') + + extends('R') + + depends_on('r-mass', type=nolink) + + 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-cluster/package.py b/var/spack/repos/builtin/packages/r-cluster/package.py new file mode 100644 index 0000000000..0fdf2ce5de --- /dev/null +++ b/var/spack/repos/builtin/packages/r-cluster/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 RCluster(Package): + """Methods for Cluster analysis. Much extended the original from Peter + Rousseeuw, Anja Struyf and Mia Hubert, based on Kaufman and Rousseeuw + (1990) "Finding Groups in Data".""" + + homepage = "https://cran.r-project.org/web/packages/cluster/index.html" + url = "https://cran.r-project.org/src/contrib/cluster_2.0.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/cluster" + + version('2.0.4', 'bb4deceaafb1c42bb1278d5d0dc11e59') + + 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-codetools/package.py b/var/spack/repos/builtin/packages/r-codetools/package.py new file mode 100644 index 0000000000..bea2f78c82 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-codetools/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 RCodetools(Package): + """Code analysis tools for R.""" + + homepage = "https://cran.r-project.org/web/packages/codetools/index.html" + url = "https://cran.r-project.org/src/contrib/codetools_0.2-14.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/codetools" + + version('0.2-14', '7ec41d4f8bd6ba85facc8c5e6adc1f4d') + + 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-colorspace/package.py b/var/spack/repos/builtin/packages/r-colorspace/package.py new file mode 100644 index 0000000000..a7622cad95 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-colorspace/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 RColorspace(Package): + """Carries out mapping between assorted color spaces including RGB, HSV, + HLS, CIEXYZ, CIELUV, HCL (polar CIELUV), CIELAB and polar CIELAB. + Qualitative, sequential, and diverging color palettes based on HCL colors + are provided.""" + + homepage = "https://cran.r-project.org/web/packages/colorspace/index.html" + url = "https://cran.r-project.org/src/contrib/colorspace_1.2-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/colorspace" + + version('1.2-6', 'a30191e9caf66f77ff4e99c062e9dce1') + + 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-crayon/package.py b/var/spack/repos/builtin/packages/r-crayon/package.py new file mode 100644 index 0000000000..1e0befbca9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-crayon/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 RCrayon(Package): + """Colored terminal output on terminals that support 'ANSI' color and + highlight codes. It also works in 'Emacs' 'ESS'. 'ANSI' color support is + automatically detected. Colors and highlighting can be combined and nested. + New styles can also be created easily. This package was inspired by the + 'chalk' 'JavaScript' project.""" + + homepage = "https://github.com/gaborcsardi/crayon" + url = "https://cran.r-project.org/src/contrib/crayon_1.3.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/crayon" + + version('1.3.2', 'fe29c6204d2d6ff4c2f9d107a03d0cb9') + + 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-cubature/package.py b/var/spack/repos/builtin/packages/r-cubature/package.py new file mode 100644 index 0000000000..1d8f837922 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-cubature/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 RCubature(Package): + """Adaptive multivariate integration over hypercubes""" + + homepage = "https://cran.r-project.org/package=cubature" + url = "https://cran.r-project.org/src/contrib/cubature_1.1-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/cubature" + + version('1.1-2', '5617e1d82baa803a3814d92461da45c9') + + 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-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py new file mode 100644 index 0000000000..24c0eadb2d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-curl/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 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/curl" + + version('1.0', '93d34926d6071e1fba7e728b482f0dd9') + 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-datatable/package.py b/var/spack/repos/builtin/packages/r-datatable/package.py new file mode 100644 index 0000000000..fb0b2f1053 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-datatable/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 RDatatable(Package): + """Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, + fast add/modify/delete of columns by group using no copies at all, list + columns and a fast file reader (fread). Offers a natural and flexible + syntax, for faster development.""" + + homepage = "https://github.com/Rdatatable/data.table/wiki" + url = "https://cran.r-project.org/src/contrib/data.table_1.9.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/data.table" + + version('1.9.6', 'b1c0c7cce490bdf42ab288541cc55372') + + extends('R') + + depends_on('r-chron', type='nolink') + + 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..75506dd257 --- /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', type=nolink) + depends_on('r-memoise', type=nolink) + depends_on('r-whisker', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-rstudioapi', type=nolink) + depends_on('r-jsonlite', type=nolink) + depends_on('r-git2r', type=nolink) + depends_on('r-withr', type=nolink) + + 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-diagrammer/package.py b/var/spack/repos/builtin/packages/r-diagrammer/package.py new file mode 100644 index 0000000000..7ff3b8548b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-diagrammer/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 RDiagrammer(Package): + """Create graph diagrams and flowcharts using R.""" + + homepage = "https://github.com/rich-iannone/DiagrammeR" + url = "https://cran.r-project.org/src/contrib/DiagrammeR_0.8.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/DiagrammeR" + + version('0.8.4', '9ee295c744f5d4ba9a84289ca7bdaf1a') + + extends('R') + + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-igraph', type=nolink) + depends_on('r-influencer', type=nolink) + depends_on('r-rstudioapi@0.6:', type=nolink) + depends_on('r-stringr', type=nolink) + depends_on('r-visnetwork', type=nolink) + depends_on('r-scales', type=nolink) + + 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-dichromat/package.py b/var/spack/repos/builtin/packages/r-dichromat/package.py new file mode 100644 index 0000000000..663e5295af --- /dev/null +++ b/var/spack/repos/builtin/packages/r-dichromat/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 RDichromat(Package): + """Collapse red-green or green-blue distinctions to simulate the effects of + different types of color-blindness.""" + + homepage = "https://cran.r-project.org/web/packages/dichromat/index.html" + url = "https://cran.r-project.org/src/contrib/dichromat_2.0-0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/dichromat" + + version('2.0-0', '84e194ac95a69763d740947a7ee346a6') + + 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-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-doparallel/package.py b/var/spack/repos/builtin/packages/r-doparallel/package.py new file mode 100644 index 0000000000..7cebfd9e58 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-doparallel/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 RDoparallel(Package): + """Provides a parallel backend for the %dopar% function using the parallel + package.""" + + homepage = "https://cran.r-project.org/web/packages/doParallel/index.html" + url = "https://cran.r-project.org/src/contrib/doParallel_1.0.10.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/doParallel" + + version('1.0.10', 'd9fbde8f315d98d055483ee3493c9b43') + + extends('R') + + depends_on('r-foreach', type=nolink) + depends_on('r-iterators', type=nolink) + + 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-dplyr/package.py b/var/spack/repos/builtin/packages/r-dplyr/package.py new file mode 100644 index 0000000000..ded7651278 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-dplyr/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 RDplyr(Package): + """A fast, consistent tool for working with data frame like objects, both + in memory and out of memory.""" + + homepage = "https://github.com/hadley/dplyr" + url = "https://cran.r-project.org/src/contrib/dplyr_0.5.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/dplyr" + + version('0.5.0', '1fcafcacca70806eea2e6d465cdb94ef') + + extends('R') + + depends_on('r-assertthat', type=nolink) + depends_on('r-R6', type=nolink) + depends_on('r-rcpp', type=nolink) + depends_on('r-tibble', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-lazyeval', type=nolink) + depends_on('r-dbi', type=nolink) + depends_on('r-bh', type=nolink) + + 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-dt/package.py b/var/spack/repos/builtin/packages/r-dt/package.py new file mode 100644 index 0000000000..f134ee8913 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-dt/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RDt(Package): + """Data objects in R can be rendered as HTML tables using the JavaScript + library 'DataTables' (typically via R Markdown or Shiny). The 'DataTables' + library has been included in this R package. The package name 'DT' is an + abbreviation of 'DataTables'.""" + + homepage = "http://rstudio.github.io/DT" + url = "https://cran.r-project.org/src/contrib/DT_0.1.tar.gz" + + version('0.1', '5c8df984921fa484784ec4b8a4fb6f3c') + + extends('R') + + depends_on('r-htmltools', type=nolink) + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-magrittr', type=nolink) + + 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-dygraphs/package.py b/var/spack/repos/builtin/packages/r-dygraphs/package.py new file mode 100644 index 0000000000..9b01d7aa18 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-dygraphs/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 RDygraphs(Package): + """An R interface to the 'dygraphs' JavaScript charting library (a copy of + which is included in the package). Provides rich facilities for charting + time-series data in R, including highly configurable series- and + axis-display and interactive features like zoom/pan and series/point + highlighting.""" + + homepage = "https://cran.r-project.org/web/packages/dygraphs/index.html" + url = "https://cran.r-project.org/src/contrib/dygraphs_0.9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/dygraphs" + + version('0.9', '7f0ce4312bcd3f0a58b8c03b2772f833') + + extends('R') + + depends_on('r-magrittr', type=nolink) + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-zoo', type=nolink) + depends_on('r-xts', type=nolink) + + 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-e1071/package.py b/var/spack/repos/builtin/packages/r-e1071/package.py new file mode 100644 index 0000000000..c2e7166403 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-e1071/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 RE1071(Package): + """Functions for latent class analysis, short time Fourier transform, fuzzy + clustering, support vector machines, shortest path computation, bagged + clustering, naive Bayes classifier, ...""" + + homepage = "https://cran.r-project.org/package=e1071" + url = "https://cran.r-project.org/src/contrib/e1071_1.6-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/e1071" + + version('1.6-7', 'd109a7e3dd0c905d420e327a9a921f5a') + + extends('R') + + depends_on('r-class', type=nolink) + + 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-foreach/package.py b/var/spack/repos/builtin/packages/r-foreach/package.py new file mode 100644 index 0000000000..2a7324ae99 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-foreach/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 RForeach(Package): + """Support for the foreach looping construct. Foreach is an idiom that + allows for iterating over elements in a collection, without the use of an + explicit loop counter. This package in particular is intended to be used + for its return value, rather than for its side effects. In that sense, it + is similar to the standard lapply function, but doesn't require the + evaluation of a function. Using foreach without side effects also + facilitates executing the loop in parallel.""" + + homepage = "https://cran.r-project.org/web/packages/foreach/index.html" + url = "https://cran.r-project.org/src/contrib/foreach_1.4.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/foreach" + + version('1.4.3', 'ef45768126661b259f9b8994462c49a0') + + extends('R') + + depends_on('r-codetools', type=nolink) + depends_on('r-iterators', type=nolink) + + 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-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-gdata/package.py b/var/spack/repos/builtin/packages/r-gdata/package.py new file mode 100644 index 0000000000..0a09a1145b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gdata/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 RGdata(Package): + """Various R programming tools for data manipulation, including: - medical + unit conversions ('ConvertMedUnits', 'MedUnits'), - combining objects + ('bindData', 'cbindX', 'combine', 'interleave'), - character vector + operations ('centerText', 'startsWith', 'trim'), - factor manipulation + ('levels', 'reorder.factor', 'mapLevels'), - obtaining information about R + objects ('object.size', 'elem', 'env', 'humanReadable', 'is.what', 'll', + 'keep', 'ls.funs', 'Args','nPairs', 'nobs'), - manipulating MS-Excel + formatted files ('read.xls', 'installXLSXsupport', 'sheetCount', + 'xlsFormats'), - generating fixed-width format files ('write.fwf'), - + extricating components of date & time objects ('getYear', 'getMonth', + 'getDay', 'getHour', 'getMin', 'getSec'), - operations on columns of data + frames ('matchcols', 'rename.vars'), - matrix operations ('unmatrix', + 'upperTriangle', 'lowerTriangle'), - operations on vectors ('case', + 'unknownToNA', 'duplicated2', 'trimSum'), - operations on data frames + ('frameApply', 'wideByFactor'), - value of last evaluated expression + ('ans'), and - wrapper for 'sample' that ensures consistent behavior for + both scalar and vector arguments ('resample').""" + + homepage = "https://cran.r-project.org/package=gdata" + url = "https://cran.r-project.org/src/contrib/gdata_2.17.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gdata" + + version('2.17.0', 'c716b663b9dc16ad8cafe6acc781a75f') + + extends('R') + + depends_on('r-gtools', type=nolink) + + 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-geosphere/package.py b/var/spack/repos/builtin/packages/r-geosphere/package.py new file mode 100644 index 0000000000..21ae07fd41 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-geosphere/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 RGeosphere(Package): + """Spherical trigonometry for geographic applications. That is, compute + distances and related measures for angular (longitude/latitude) + locations.""" + + homepage = "https://cran.r-project.org/package=geosphere" + url = "https://cran.r-project.org/src/contrib/geosphere_1.5-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/geosphere" + + version('1.5-5', '28efb7a8e266c7f076cdbcf642455f3e') + + extends('R') + + depends_on('r-sp', type=nolink) + + 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-ggmap/package.py b/var/spack/repos/builtin/packages/r-ggmap/package.py new file mode 100644 index 0000000000..2dfca19b51 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ggmap/package.py @@ -0,0 +1,57 @@ +############################################################################## +# 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 RGgmap(Package): + """A collection of functions to visualize spatial data and models on top of + static maps from various online sources (e.g Google Maps and Stamen Maps). + It includes tools common to those tasks, including functions for + geolocation and routing.""" + + homepage = "https://github.com/dkahle/ggmap" + url = "https://cran.r-project.org/src/contrib/ggmap_2.6.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ggmap" + + version('2.6.1', '25ad414a3a1c6d59a227a9f22601211a') + + extends('R') + + depends_on('r-ggplot2', type=nolink) + depends_on('r-proto', type=nolink) + depends_on('r-rgooglemaps', type=nolink) + depends_on('r-png', type=nolink) + depends_on('r-plyr', type=nolink) + depends_on('r-reshape2', type=nolink) + depends_on('r-rjson', type=nolink) + depends_on('r-mapproj', type=nolink) + depends_on('r-jpeg', type=nolink) + depends_on('r-geosphere', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-scales', type=nolink) + + 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-ggplot2/package.py b/var/spack/repos/builtin/packages/r-ggplot2/package.py new file mode 100644 index 0000000000..a8cf21930f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ggplot2/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 RGgplot2(Package): + """An implementation of the grammar of graphics in R. It combines the + advantages of both base and lattice graphics: conditioning and shared axes + are handled automatically, and you can still build up a plot step by step + from multiple data sources. It also implements a sophisticated + multidimensional conditioning system and a consistent interface to map data + to aesthetic attributes. See http://ggplot2.org for more information, + documentation and examples.""" + + homepage = "http://ggplot2.org/" + url = "https://cran.r-project.org/src/contrib/ggplot2_2.1.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ggplot2" + + version('2.1.0', '771928cfb97c649c720423deb3ec7fd3') + + extends('R') + + depends_on('r-digest', type=nolink) + depends_on('r-gtable', type=nolink) + depends_on('r-mass', type=nolink) + depends_on('r-plyr', type=nolink) + depends_on('r-reshape2', type=nolink) + depends_on('r-scales', type=nolink) + + 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-ggvis/package.py b/var/spack/repos/builtin/packages/r-ggvis/package.py new file mode 100644 index 0000000000..29b2069ae9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ggvis/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 RGgvis(Package): + """An implementation of an interactive grammar of graphics, taking the best + parts of 'ggplot2', combining them with the reactive framework from 'shiny' + and web graphics from 'vega'.""" + + homepage = "http://ggvis.rstudio.com/" + url = "https://cran.r-project.org/src/contrib/ggvis_0.4.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ggvis" + + version('0.4.2', '039f45e5c7f1e0652779163d7d99f922') + + extends('R') + + depends_on('r-assertthat', type=nolink) + depends_on('r-jsonlite', type=nolink) + depends_on('r-shiny', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-dplyr', type=nolink) + depends_on('r-lazyeval', type=nolink) + depends_on('r-htmltools', type=nolink) + + 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-glmnet/package.py b/var/spack/repos/builtin/packages/r-glmnet/package.py new file mode 100644 index 0000000000..af6e1d1b63 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-glmnet/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 RGlmnet(Package): + """Extremely efficient procedures for fitting the entire lasso or + elastic-net regularization path for linear regression, logistic and + multinomial regression models, Poisson regression and the Cox model. Two + recent additions are the multiple-response Gaussian, and the grouped + multinomial. The algorithm uses cyclical coordinate descent in a path-wise + fashion, as described in the paper linked to via the URL below.""" + + homepage = "http://www.jstatsoft.org/v33/i01/" + url = "https://cran.r-project.org/src/contrib/glmnet_2.0-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/glmnet" + + version('2.0-5', '049b18caa29529614cd684db3beaec2a') + + extends('R') + + depends_on('r-matrix', type=nolink) + depends_on('r-foreach', type=nolink) + + 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-googlevis/package.py b/var/spack/repos/builtin/packages/r-googlevis/package.py new file mode 100644 index 0000000000..bcb7caa0fb --- /dev/null +++ b/var/spack/repos/builtin/packages/r-googlevis/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RGooglevis(Package): + """R interface to Google Charts API, allowing users to create interactive + charts based on data frames. Charts are displayed locally via the R HTTP + help server. A modern browser with an Internet connection is required and + for some charts a Flash player. The data remains local and is not uploaded + to Google.""" + + homepage = "https://github.com/mages/googleVis#googlevis" + url = "https://cran.r-project.org/src/contrib/googleVis_0.6.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/googleVis" + + version('0.6.0', 'ec36fd2a6884ddc7baa894007d0d0468') + + extends('R') + + depends_on('r-jsonlite', type=nolink) + + 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-gridbase/package.py b/var/spack/repos/builtin/packages/r-gridbase/package.py new file mode 100644 index 0000000000..a2f55b4470 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gridbase/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 RGridbase(Package): + """Integration of base and grid graphics.""" + + homepage = "https://cran.r-project.org/web/packages/gridBase/index.html" + url = "https://cran.r-project.org/src/contrib/gridBase_0.4-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gridBase" + + version('0.4-7', '6d5064a85f5c966a92ee468ae44c5f1f') + + 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-gridextra/package.py b/var/spack/repos/builtin/packages/r-gridextra/package.py new file mode 100644 index 0000000000..537426d42f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gridextra/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 RGridextra(Package): + """Provides a number of user-level functions to work with "grid" graphics, + notably to arrange multiple grid-based plots on a page, and draw tables.""" + + homepage = "https://github.com/baptiste/gridextra" + url = "https://cran.r-project.org/src/contrib/gridExtra_2.2.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gridExtra" + + version('2.2.1', '7076c2122d387c7ef3add69a1c4fc1b2') + + extends('R') + + depends_on('r-gtable', type=nolink) + + 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-gtable/package.py b/var/spack/repos/builtin/packages/r-gtable/package.py new file mode 100644 index 0000000000..74dee0b3d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gtable/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 RGtable(Package): + """Tools to make it easier to work with "tables" of 'grobs'.""" + + homepage = "https://cran.r-project.org/web/packages/gtable/index.html" + url = "https://cran.r-project.org/src/contrib/gtable_0.2.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gtable" + + version('0.2.0', '124090ae40b2dd3170ae11180e0d4cab') + + 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-gtools/package.py b/var/spack/repos/builtin/packages/r-gtools/package.py new file mode 100644 index 0000000000..367bb30f87 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gtools/package.py @@ -0,0 +1,60 @@ +############################################################################## +# 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 RGtools(Package): + """Functions to assist in R programming, including: - assist in developing, + updating, and maintaining R and R packages ('ask', 'checkRVersion', + 'getDependencies', 'keywords', 'scat'), - calculate the logit and inverse + logit transformations ('logit', 'inv.logit'), - test if a value is missing, + empty or contains only NA and NULL values ('invalid'), - manipulate R's + .Last function ('addLast'), - define macros ('defmacro'), - detect odd and + even integers ('odd', 'even'), - convert strings containing non-ASCII + characters (like single quotes) to plain ASCII ('ASCIIfy'), - perform a + binary search ('binsearch'), - sort strings containing both numeric and + character components ('mixedsort'), - create a factor variable from the + quantiles of a continuous variable ('quantcut'), - enumerate permutations + and combinations ('combinations', 'permutation'), - calculate and convert + between fold-change and log-ratio ('foldchange', 'logratio2foldchange', + 'foldchange2logratio'), - calculate probabilities and generate random + numbers from Dirichlet distributions ('rdirichlet', 'ddirichlet'), - apply + a function over adjacent subsets of a vector ('running'), - modify the + TCP\_NODELAY ('de-Nagle') flag for socket objects, - efficient 'rbind' of + data frames, even if the column names don't match ('smartbind'), - generate + significance stars from p-values ('stars.pval'), - convert characters + to/from ASCII codes.""" + + homepage = "https://cran.r-project.org/package=gtools" + url = "https://cran.r-project.org/src/contrib/gtools_3.5.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gtools" + + version('3.5.0', '45f8800c0336d35046641fbacc56bdbb') + + 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-htmltools/package.py b/var/spack/repos/builtin/packages/r-htmltools/package.py new file mode 100644 index 0000000000..21cdbe9184 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-htmltools/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 RHtmltools(Package): + """Tools for HTML generation and output.""" + + homepage = "https://github.com/rstudio/htmltools" + url = "https://cran.r-project.org/src/contrib/htmltools_0.3.5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/htmltools" + + version('0.3.5', '5f001aff4a39e329f7342dcec5139724') + + extends('R') + + depends_on('r-digest', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-htmlwidgets/package.py b/var/spack/repos/builtin/packages/r-htmlwidgets/package.py new file mode 100644 index 0000000000..8090776f06 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-htmlwidgets/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RHtmlwidgets(Package): + """A framework for creating HTML widgets that render in various contexts + including the R console, 'R Markdown' documents, and 'Shiny' web + applications.""" + + homepage = "https://github.com/ramnathv/htmlwidgets" + url = "https://cran.r-project.org/src/contrib/htmlwidgets_0.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/htmlwidgets" + + version('0.6', '7fa522d2eda97593978021bda9670c0e') + + extends('R') + + depends_on('r-htmltools', type=nolink) + depends_on('r-jsonlite', type=nolink) + depends_on('r-yaml', type=nolink) + + 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-httpuv/package.py b/var/spack/repos/builtin/packages/r-httpuv/package.py new file mode 100644 index 0000000000..57025d3a3c --- /dev/null +++ b/var/spack/repos/builtin/packages/r-httpuv/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 RHttpuv(Package): + """Provides low-level socket and protocol support for handling HTTP and + WebSocket requests directly from within R. It is primarily intended as a + building block for other packages, rather than making it particularly easy + to create complete web applications using httpuv alone. httpuv is built on + top of the libuv and http-parser C libraries, both of which were developed + by Joyent, Inc. (See LICENSE file for libuv and http-parser license + information.)""" + + homepage = "https://github.com/rstudio/httpuv" + url = "https://cran.r-project.org/src/contrib/httpuv_1.3.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/httpuv" + + version('1.3.3', 'c78ae068cf59e949b9791be987bb4489') + + extends('R') + + depends_on('r-rcpp', type=nolink) + + 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..227594fc0d --- /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', type=nolink) + depends_on('r-mime', type=nolink) + depends_on('r-curl', type=nolink) + depends_on('r-openssl', type=nolink) + depends_on('r-R6', type=nolink) + + 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-igraph/package.py b/var/spack/repos/builtin/packages/r-igraph/package.py new file mode 100644 index 0000000000..37925d4e02 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-igraph/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 RIgraph(Package): + """Routines for simple graphs and network analysis. It can handle large + graphs very well and provides functions for generating random and regular + graphs, graph visualization, centrality methods and much more.""" + + homepage = "http://igraph.org/" + url = "https://cran.r-project.org/src/contrib/igraph_1.0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/igraph" + + version('1.0.1', 'ea33495e49adf4a331e4ba60ba559065') + + extends('R') + + depends_on('r-matrix', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-nmf', type=nolink) + depends_on('r-irlba', type=nolink) + depends_on('gmp') + depends_on('libxml2') + + 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-influencer/package.py b/var/spack/repos/builtin/packages/r-influencer/package.py new file mode 100644 index 0000000000..dd525daf2b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-influencer/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 RInfluencer(Package): + """Provides functionality to compute various node centrality measures on + networks. Included are functions to compute betweenness centrality (by + utilizing Madduri and Bader's SNAP library), implementations of Burt's + constraint and effective network size (ENS) metrics, Borgatti's algorithm + to identify key players, and Valente's bridging metric. On Unix systems, + the betweenness, Key Players, and bridging implementations are parallelized + with OpenMP, which may run faster on systems which have OpenMP + configured.""" + + homepage = "https://github.com/rcc-uchicago/influenceR" + url = "https://cran.r-project.org/src/contrib/influenceR_0.1.0.tar.gz" + + version('0.1.0', '6c8b6decd78c341364b5811fb3050ba5') + + extends('R') + + depends_on('r-igraph', type=nolink) + depends_on('r-matrix', type=nolink) + + 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-inline/package.py b/var/spack/repos/builtin/packages/r-inline/package.py new file mode 100644 index 0000000000..35eb8ca76f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-inline/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 RInline(Package): + """Functionality to dynamically define R functions and S4 methods with + inlined C, C++ or Fortran code supporting .C and .Call calling + conventions.""" + + homepage = "https://cran.r-project.org/web/packages/inline/index.html" + url = "https://cran.r-project.org/src/contrib/inline_0.3.14.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/inline" + + version('0.3.14', '9fe304a6ebf0e3889c4c6a7ad1c50bca') + + 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-irlba/package.py b/var/spack/repos/builtin/packages/r-irlba/package.py new file mode 100644 index 0000000000..42cc142e8a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-irlba/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 RIrlba(Package): + """Fast and memory efficient methods for truncated singular and eigenvalue + decompositions and principal component analysis of large sparse or dense + matrices.""" + + homepage = "https://cran.r-project.org/web/packages/irlba/index.html" + url = "https://cran.r-project.org/src/contrib/irlba_2.0.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/irlba" + + version('2.0.0', '557674cf8b68fea5b9f231058c324d26') + + extends('R') + + depends_on('r-matrix', type=nolink) + + 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-iterators/package.py b/var/spack/repos/builtin/packages/r-iterators/package.py new file mode 100644 index 0000000000..f5a3489e7d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-iterators/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 RIterators(Package): + """Support for iterators, which allow a programmer to traverse through all + the elements of a vector, list, or other collection of data.""" + + homepage = "https://cran.r-project.org/web/packages/iterators/index.html" + url = "https://cran.r-project.org/src/contrib/iterators_1.0.8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/iterators" + + version('1.0.8', '2ded7f82cddd8174f1ec98607946c6ee') + + 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-jpeg/package.py b/var/spack/repos/builtin/packages/r-jpeg/package.py new file mode 100644 index 0000000000..ef940720f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-jpeg/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 RJpeg(Package): + """This package provides an easy and simple way to read, write and display + bitmap images stored in the JPEG format. It can read and write both files + and in-memory raw vectors.""" + + homepage = "http://www.rforge.net/jpeg/" + url = "https://cran.r-project.org/src/contrib/jpeg_0.1-8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/jpeg" + + version('0.1-8', '696007451d14395b1ed1d0e9af667a57') + + extends('R') + + depends_on('jpeg') + + 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..d1cb4b52c1 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-jsonlite/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 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_1.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/jsonlite" + + version('1.0', 'c8524e086de22ab39b8ac8000220cc87') + 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-labeling/package.py b/var/spack/repos/builtin/packages/r-labeling/package.py new file mode 100644 index 0000000000..02e5da9d85 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-labeling/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 RLabeling(Package): + """Provides a range of axis labeling algorithms.""" + + homepage = "https://cran.r-project.org/web/packages/labeling/index.html" + url = "https://cran.r-project.org/src/contrib/labeling_0.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/labeling" + + version('0.3', 'ccd7082ec0b211aba8a89d85176bb534') + + 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-lattice/package.py b/var/spack/repos/builtin/packages/r-lattice/package.py new file mode 100644 index 0000000000..ba29feefc4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lattice/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 RLattice(Package): + """A powerful and elegant high-level data visualization system inspired by + Trellis graphics, with an emphasis on multivariate data. Lattice is + sufficient for typical graphics needs, and is also flexible enough to + handle most nonstandard requirements. See ?Lattice for an introduction.""" + + homepage = "http://lattice.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/lattice_0.20-33.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lattice" + + version('0.20-33', 'd487c94db1bfe00a27270f4c71baf53e') + + 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-lazyeval/package.py b/var/spack/repos/builtin/packages/r-lazyeval/package.py new file mode 100644 index 0000000000..f80fb4d272 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lazyeval/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 RLazyeval(Package): + """An alternative approach to non-standard evaluation using formulas. + Provides a full implementation of LISP style 'quasiquotation', making it + easier to generate code with other code.""" + + homepage = "https://cran.r-project.org/web/packages/lazyeval/index.html" + url = "https://cran.r-project.org/src/contrib/lazyeval_0.2.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lazyeval" + + version('0.2.0', 'df1daac908dcf02ae7e12f4335b1b13b') + + 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-leaflet/package.py b/var/spack/repos/builtin/packages/r-leaflet/package.py new file mode 100644 index 0000000000..2a91100c34 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-leaflet/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 RLeaflet(Package): + """Create and customize interactive maps using the 'Leaflet' JavaScript + library and the 'htmlwidgets' package. These maps can be used directly from + the R console, from 'RStudio', in Shiny apps and R Markdown documents.""" + + homepage = "http://rstudio.github.io/leaflet/" + url = "https://cran.r-project.org/src/contrib/leaflet_1.0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/leaflet" + + version('1.0.1', '7f3d8b17092604d87d4eeb579f73d5df') + + extends('R') + + depends_on('r-base64enc', type=nolink) + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-htmltools', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-markdown', type=nolink) + depends_on('r-png', type=nolink) + depends_on('r-rcolorbrewer', type=nolink) + depends_on('r-raster', type=nolink) + depends_on('r-scales', type=nolink) + depends_on('r-sp', type=nolink) + + 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-lme4/package.py b/var/spack/repos/builtin/packages/r-lme4/package.py new file mode 100644 index 0000000000..c52d9d0e27 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lme4/package.py @@ -0,0 +1,53 @@ +############################################################################## +# 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 RLme4(Package): + """Fit linear and generalized linear mixed-effects models. The models and + their components are represented using S4 classes and methods. The core + computational algorithms are implemented using the 'Eigen' C++ library for + numerical linear algebra and 'RcppEigen' "glue".""" + + homepage = "https://github.com/lme4/lme4/" + url = "https://cran.r-project.org/src/contrib/lme4_1.1-12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lme4" + + version('1.1-12', 'da8aaebb67477ecb5631851c46207804') + + extends('R') + + depends_on('r-matrix', type=nolink) + depends_on('r-mass', type=nolink) + depends_on('r-lattice', type=nolink) + depends_on('r-nlme', type=nolink) + depends_on('r-minqa', type=nolink) + depends_on('r-nloptr', type=nolink) + depends_on('r-rcpp', type=nolink) + depends_on('r-rcppeigen', type=nolink) + + 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-lmtest/package.py b/var/spack/repos/builtin/packages/r-lmtest/package.py new file mode 100644 index 0000000000..31a36f1f7e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lmtest/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 RLmtest(Package): + """A collection of tests, data sets, and examples for diagnostic checking + in linear regression models. Furthermore, some generic tools for inference + in parametric models are provided.""" + + homepage = "https://cran.r-project.org/package=lmtest" + url = "https://cran.r-project.org/src/contrib/lmtest_0.9-34.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lmtest" + + version('0.9-34', 'fcdf7286bb5ccc2ca46be00bf25ac2fe') + + extends('R') + + depends_on('r-zoo', type=nolink) + + 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-lubridate/package.py b/var/spack/repos/builtin/packages/r-lubridate/package.py new file mode 100644 index 0000000000..2e5661fa4d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lubridate/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 RLubridate(Package): + """Functions to work with date-times and timespans: fast and user friendly + parsing of date-time data, extraction and updating of components of a + date-time (years, months, days, hours, minutes, and seconds), algebraic + manipulation on date-time and timespan objects. The 'lubridate' package has + a consistent and memorable syntax that makes working with dates easy and + fun.""" + + homepage = "https://cran.r-project.org/web/packages/lubridate/index.html" + url = "https://cran.r-project.org/src/contrib/lubridate_1.5.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lubridate" + + version('1.5.6', 'a5dc44817548ee219d26a10bae92e611') + + extends('R') + + depends_on('r-stringr', type=nolink) + + 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..2b8f95351a 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') + depends_on('r-abind', type=nolink) 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-magrittr/package.py b/var/spack/repos/builtin/packages/r-magrittr/package.py new file mode 100644 index 0000000000..11476c3d1e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-magrittr/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 RMagrittr(Package): + """Provides a mechanism for chaining commands with a new forward-pipe + operator, %>%. This operator will forward a value, or the result of an + expression, into the next function call/expression. There is flexible + support for the type of right-hand side expressions. For more information, + see package vignette.""" + + homepage = "https://cran.r-project.org/web/packages/magrittr/index.html" + url = "https://cran.r-project.org/src/contrib/magrittr_1.5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/magrittr" + + version('1.5', 'e74ab7329f2b9833f0c3c1216f86d65a') + + 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-mapproj/package.py b/var/spack/repos/builtin/packages/r-mapproj/package.py new file mode 100644 index 0000000000..0f8bbe199b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mapproj/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 RMapproj(Package): + """Converts latitude/longitude into projected coordinates.""" + + homepage = "https://cran.r-project.org/package=mapproj" + url = "https://cran.r-project.org/src/contrib/mapproj_1.2-4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mapproj" + + version('1.2-4', '10e22bde1c790e1540672f15ddcaee71') + + extends('R') + + depends_on('r-maps', type=nolink) + + 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-maps/package.py b/var/spack/repos/builtin/packages/r-maps/package.py new file mode 100644 index 0000000000..1e0bfd2d43 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-maps/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 RMaps(Package): + """Display of maps. Projection code and larger maps are in separate + packages ('mapproj' and 'mapdata').""" + + homepage = "https://cran.r-project.org/" + url = "https://cran.r-project.org/src/contrib/maps_3.1.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/maps" + + version('3.1.1', 'ff045eccb6d5a658db5a539116ddf764') + + 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-maptools/package.py b/var/spack/repos/builtin/packages/r-maptools/package.py new file mode 100644 index 0000000000..8d045a4ed4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-maptools/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 RMaptools(Package): + """Set of tools for manipulating and reading geographic data, in particular + ESRI shapefiles; C code used from shapelib. It includes binary access to + GSHHG shoreline files. The package also provides interface wrappers for + exchanging spatial objects with packages such as PBSmapping, spatstat, + maps, RArcInfo, Stata tmap, WinBUGS, Mondrian, and others.""" + + homepage = "http://r-forge.r-project.org/projects/maptools/" + url = "https://cran.r-project.org/src/contrib/maptools_0.8-39.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/maptools" + + version('0.8-39', '3690d96afba8ef22c8e27ae540ffb836') + + extends('R') + + depends_on('r-sp', type=nolink) + depends_on('r-foreign', type=nolink) + depends_on('r-lattice', type=nolink) + + 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-markdown/package.py b/var/spack/repos/builtin/packages/r-markdown/package.py new file mode 100644 index 0000000000..c34727d2b0 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-markdown/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RMarkdown(Package): + """Provides R bindings to the 'Sundown' 'Markdown' rendering library + (https://github.com/vmg/sundown). 'Markdown' is a plain-text formatting + syntax that can be converted to 'XHTML' or other formats. See + http://en.wikipedia.org/wiki/Markdown for more information about + 'Markdown'.""" + + homepage = "https://github.com/rstudio/markdown" + url = "https://cran.r-project.org/src/contrib/markdown_0.7.7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/markdown" + + version('0.7.7', '72deca9c675c7cc9343048edbc29f7ff') + + extends('R') + + depends_on('r-mime', type=nolink) + + 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-mass/package.py b/var/spack/repos/builtin/packages/r-mass/package.py new file mode 100644 index 0000000000..1ab01d2256 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mass/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 RMass(Package): + """Functions and datasets to support Venables and Ripley, "Modern Applied + Statistics with S" (4th edition, 2002).""" + + homepage = "http://www.stats.ox.ac.uk/pub/MASS4/" + url = "https://cran.r-project.org/src/contrib/MASS_7.3-45.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/MASS" + + version('7.3-45', 'aba3d12fab30f1793bee168a1efea88b') + + 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-matrix/package.py b/var/spack/repos/builtin/packages/r-matrix/package.py new file mode 100644 index 0000000000..1b45dc55ca --- /dev/null +++ b/var/spack/repos/builtin/packages/r-matrix/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 RMatrix(Package): + """Classes and methods for dense and sparse matrices and operations on them + using 'LAPACK' and 'SuiteSparse'.""" + + homepage = "http://matrix.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/Matrix_1.2-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/Matrix" + + version('1.2-6', 'f545307fb1284861e9266c4e9712c55e') + + extends('R') + + depends_on('r-lattice', type=nolink) + + 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-matrixmodels/package.py b/var/spack/repos/builtin/packages/r-matrixmodels/package.py new file mode 100644 index 0000000000..3cdce6fea6 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-matrixmodels/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 RMatrixmodels(Package): + """Modelling with sparse and dense 'Matrix' matrices, using modular + prediction and response module classes.""" + + homepage = "http://matrix.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/MatrixModels_0.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/MatrixModels" + + version('0.4-1', '65b3ab56650c62bf1046a3eb1f1e19a0') + + extends('R') + + depends_on('r-matrix', type=nolink) + + 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-memoise/package.py b/var/spack/repos/builtin/packages/r-memoise/package.py new file mode 100644 index 0000000000..81f3ff1dab --- /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', type=nolink) + + 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-mgcv/package.py b/var/spack/repos/builtin/packages/r-mgcv/package.py new file mode 100644 index 0000000000..4c49462ba2 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mgcv/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RMgcv(Package): + """GAMs, GAMMs and other generalized ridge regression with multiple + smoothing parameter estimation by GCV, REML or UBRE/AIC. Includes a gam() + function, a wide variety of smoothers, JAGS support and distributions + beyond the exponential family.""" + + homepage = "https://cran.r-project.org/package=mgcv" + url = "https://cran.r-project.org/src/contrib/mgcv_1.8-13.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mgcv" + + version('1.8-13', '30607be3aaf44b13bd8c81fc32e8c984') + + extends('R') + + depends_on('r-nlme', type=nolink) + depends_on('r-matrix', type=nolink) + + 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..5e78889a76 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mime/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 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.5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mime" + + version('0.5', '87e00b6d57b581465c19ae869a723c4d') + 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-minqa/package.py b/var/spack/repos/builtin/packages/r-minqa/package.py new file mode 100644 index 0000000000..16cff20b41 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-minqa/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 RMinqa(Package): + """Derivative-free optimization by quadratic approximation based on an + interface to Fortran implementations by M. J. D. Powell.""" + + homepage = "http://optimizer.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/minqa_1.2.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/minqa" + + version('1.2.4', 'bcaae4fdba60a33528f2116e2fd51105') + + extends('R') + + depends_on('r-rcpp', type=nolink) + + 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-multcomp/package.py b/var/spack/repos/builtin/packages/r-multcomp/package.py new file mode 100644 index 0000000000..54416502d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-multcomp/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 RMultcomp(Package): + """Simultaneous tests and confidence intervals for general linear + hypotheses in parametric models, including linear, generalized linear, + linear mixed effects, and survival models. The package includes demos + reproducing analyzes presented in the book "Multiple Comparisons Using R" + (Bretz, Hothorn, Westfall, 2010, CRC Press).""" + + homepage = "http://multcomp.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/multcomp_1.4-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/multcomp" + + version('1.4-6', 'f1353ede2ed78b23859a7f1f1f9ebe88') + + extends('R') + + depends_on('r-mvtnorm', type=nolink) + depends_on('r-survival', type=nolink) + depends_on('r-thdata', type=nolink) + depends_on('r-sandwich', type=nolink) + depends_on('r-codetools', type=nolink) + + 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-munsell/package.py b/var/spack/repos/builtin/packages/r-munsell/package.py new file mode 100644 index 0000000000..b96b90f9c7 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-munsell/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RMunsell(Package): + """Provides easy access to, and manipulation of, the Munsell colours. + Provides a mapping between Munsell's original notation (e.g. "5R 5/10") and + hexadecimal strings suitable for use directly in R graphics. Also provides + utilities to explore slices through the Munsell colour tree, to transform + Munsell colours and display colour palettes.""" + + homepage = "https://cran.r-project.org/web/packages/munsell/index.html" + url = "https://cran.r-project.org/src/contrib/munsell_0.4.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/munsell" + + version('0.4.3', 'ebd205323dc37c948f499ee08be9c476') + + extends('R') + + depends_on('r-colorspace', type=nolink) + + 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-mvtnorm/package.py b/var/spack/repos/builtin/packages/r-mvtnorm/package.py new file mode 100644 index 0000000000..b3f7db60c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mvtnorm/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 RMvtnorm(Package): + """Computes multivariate normal and t probabilities, quantiles, random + deviates and densities.""" + + homepage = "http://mvtnorm.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/mvtnorm_1.0-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mvtnorm" + + version('1.0-5', '5894dd3969bbfa26f4862c45f9a48a52') + + 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-ncdf4/package.py b/var/spack/repos/builtin/packages/r-ncdf4/package.py new file mode 100644 index 0000000000..11bf7abb38 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ncdf4/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 RNcdf4(Package): + """Provides a high-level R interface to data files written using Unidata's + netCDF library (version 4 or earlier), which are binary data files that are + portable across platforms and include metadata information in addition to + the data sets. Using this package, netCDF files (either version 4 or + "classic" version 3) can be opened and data sets read in easily. It is also + easy to create new netCDF dimensions, variables, and files, in either + version 3 or 4 format, and manipulate existing netCDF files. This package + replaces the former ncdf package, which only worked with netcdf version 3 + files. For various reasons the names of the functions have had to be + changed from the names in the ncdf package. The old ncdf package is still + available at the URL given below, if you need to have backward + compatibility. It should be possible to have both the ncdf and ncdf4 + packages installed simultaneously without a problem. However, the ncdf + package does not provide an interface for netcdf version 4 files.""" + + homepage = "http://cirrus.ucsd.edu/~pierce/ncdf" + url = "https://cran.r-project.org/src/contrib/ncdf4_1.15.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ncdf4" + + version('1.15', 'cd60dadbae3be31371e1ed40ddeb420a') + + extends('R') + + depends_on('netcdf') + + 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-networkd3/package.py b/var/spack/repos/builtin/packages/r-networkd3/package.py new file mode 100644 index 0000000000..8884f7cf1b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-networkd3/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 RNetworkd3(Package): + """Creates 'D3' 'JavaScript' network, tree, dendrogram, and Sankey graphs + from 'R'.""" + + homepage = "http://cran.r-project.org/package=networkD3" + url = "https://cran.r-project.org/src/contrib/networkD3_0.2.12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/networkD3" + + version('0.2.12', '356fe4be59698e6fb052644bd9659d84') + + extends('R') + + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-igraph', type=nolink) + depends_on('r-magrittr', type=nolink) + + 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-nlme/package.py b/var/spack/repos/builtin/packages/r-nlme/package.py new file mode 100644 index 0000000000..1b6bb114e1 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nlme/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 RNlme(Package): + """Fit and compare Gaussian linear and nonlinear mixed-effects models.""" + + homepage = "https://cran.r-project.org/package=nlme" + url = "https://cran.r-project.org/src/contrib/nlme_3.1-128.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/nlme" + + version('3.1-128', '3d75ae7380bf123761b95a073eb55008') + + extends('R') + + depends_on('r-lattice', type=nolink) + + 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-nloptr/package.py b/var/spack/repos/builtin/packages/r-nloptr/package.py new file mode 100644 index 0000000000..58cb585c49 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nloptr/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RNloptr(Package): + """nloptr is an R interface to NLopt. NLopt is a free/open-source library + for nonlinear optimization, providing a common interface for a number of + different free optimization routines available online as well as original + implementations of various other algorithms. See + http://ab-initio.mit.edu/wiki/index.php/NLopt_Introduction for more + information on the available algorithms. During installation on Unix the + NLopt code is downloaded and compiled from the NLopt website.""" + + homepage = "https://cran.r-project.org/package=nloptr" + url = "https://cran.r-project.org/src/contrib/nloptr_1.0.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/nloptr" + + version('1.0.4', '9af69a613349b236fd377d0a107f484c') + + 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-nmf/package.py b/var/spack/repos/builtin/packages/r-nmf/package.py new file mode 100644 index 0000000000..c30a1ac101 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nmf/package.py @@ -0,0 +1,60 @@ +############################################################################## +# 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 RNmf(Package): + """Provides a framework to perform Non-negative Matrix Factorization (NMF). + The package implements a set of already published algorithms and seeding + methods, and provides a framework to test, develop and plug new/custom + algorithms. Most of the built-in algorithms have been optimized in C++, and + the main interface function provides an easy way of performing parallel + computations on multicore machines..""" + + homepage = "http://renozao.github.io/NMF" + url = "https://cran.r-project.org/src/contrib/NMF_0.20.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/NMF" + + version('0.20.6', '81df07b3bf710a611db5af24730ff3d0') + + extends('R') + + depends_on('r-pkgmaker', type=nolink) + depends_on('r-registry', type=nolink) + depends_on('r-rngtools', type=nolink) + depends_on('r-cluster', type=nolink) + depends_on('r-stringr', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-gridbase', type=nolink) + depends_on('r-colorspace', type=nolink) + depends_on('r-rcolorbrewer', type=nolink) + depends_on('r-foreach', type=nolink) + depends_on('r-doparallel', type=nolink) + depends_on('r-ggplot2', type=nolink) + depends_on('r-reshape2', type=nolink) + + 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-nnet/package.py b/var/spack/repos/builtin/packages/r-nnet/package.py new file mode 100644 index 0000000000..be048f5ad0 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nnet/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 RNnet(Package): + """Software for feed-forward neural networks with a single hidden layer, + and for multinomial log-linear models.""" + + homepage = "http://www.stats.ox.ac.uk/pub/MASS4/" + url = "https://cran.r-project.org/src/contrib/nnet_7.3-12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/nnet" + + version('7.3-12', 'dc7c6f0d0de53d8fc72b44554400a74e') + + 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-np/package.py b/var/spack/repos/builtin/packages/r-np/package.py new file mode 100644 index 0000000000..bff7d0f195 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-np/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 RNp(Package): + """This package provides a variety of nonparametric (and semiparametric) + kernel methods that seamlessly handle a mix of continuous, unordered, and + ordered factor data types. We would like to gratefully acknowledge support + from the Natural Sciences and Engineering Research Council of Canada + (NSERC:www.nserc.ca), the Social Sciences and Humanities Research Council + of Canada (SSHRC:www.sshrc.ca), and the Shared Hierarchical Academic + Research Computing Network (SHARCNET:www.sharcnet.ca).""" + + homepage = "https://github.com/JeffreyRacine/R-Package-np/" + url = "https://cran.r-project.org/src/contrib/np_0.60-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/np" + + version('0.60-2', 'e094d52ddff7280272b41e6cb2c74389') + + extends('R') + + depends_on('r-boot', type=nolink) + depends_on('r-cubature', type=nolink) + + 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-pbkrtest/package.py b/var/spack/repos/builtin/packages/r-pbkrtest/package.py new file mode 100644 index 0000000000..40b6f96927 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-pbkrtest/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 RPbkrtest(Package): + """Test in mixed effects models. Attention is on mixed effects models as + implemented in the 'lme4' package. This package implements a parametric + bootstrap test and a Kenward Roger modification of F-tests for linear mixed + effects models and a parametric bootstrap test for generalized linear mixed + models.""" + + homepage = "http://people.math.aau.dk/~sorenh/software/pbkrtest/" + url = "https://cran.r-project.org/src/contrib/pbkrtest_0.4-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/pbkrtest" + + version('0.4-6', '0a7d9ff83b8d131af9b2335f35781ef9') + + extends('R') + + depends_on('r-lme4', type=nolink) + depends_on('r-matrix', type=nolink) + depends_on('r-mass', type=nolink) + + 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-pkgmaker/package.py b/var/spack/repos/builtin/packages/r-pkgmaker/package.py new file mode 100644 index 0000000000..87daec5ad0 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-pkgmaker/package.py @@ -0,0 +1,53 @@ +############################################################################## +# 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 RPkgmaker(Package): + """This package provides some low-level utilities to use for package + development. It currently provides managers for multiple package specific + options and registries, vignette, unit test and bibtex related utilities. + It serves as a base package for packages like NMF, RcppOctave, doRNG, and + as an incubator package for other general purposes utilities, that will + eventually be packaged separately. It is still under heavy development and + changes in the interface(s) are more than likely to happen.""" + + homepage = "https://renozao.github.io/pkgmaker" + url = "https://cran.r-project.org/src/contrib/pkgmaker_0.22.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/pkgmaker" + + version('0.22', '73a0c6d3e84c6dadf3de7582ef7e88a4') + + extends('R') + + depends_on('r-registry', type=nolink) + depends_on('r-codetools', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-stringr', type=nolink) + depends_on('r-xtable', type=nolink) + + 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-plotrix/package.py b/var/spack/repos/builtin/packages/r-plotrix/package.py new file mode 100644 index 0000000000..d1d61dbc4d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-plotrix/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 RPlotrix(Package): + """Lots of plots, various labeling, axis and color scaling functions.""" + + homepage = "https://cran.r-project.org/package=plotrix" + url = "https://cran.r-project.org/src/contrib/plotrix_3.6-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/plotrix" + + version('3.6-3', '23e3e022a13a596e9b77b40afcb4a2ef') + + 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-plyr/package.py b/var/spack/repos/builtin/packages/r-plyr/package.py new file mode 100644 index 0000000000..fe4512347a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-plyr/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 RPlyr(Package): + """A set of tools that solves a common set of problems: you need to break a + big problem down into manageable pieces, operate on each piece and then put + all the pieces back together. For example, you might want to fit a model to + each spatial location or time point in your study, summarise data by panels + or collapse high-dimensional arrays to simpler summary statistics. The + development of 'plyr' has been generously supported by 'Becton + Dickinson'.""" + + homepage = "http://had.co.nz/plyr" + url = "https://cran.r-project.org/src/contrib/plyr_1.8.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/plyr" + + version('1.8.4', 'ef455cf7fc06e34837692156b7b2587b') + + extends('R') + + depends_on('r-rcpp', type=nolink) + + 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-png/package.py b/var/spack/repos/builtin/packages/r-png/package.py new file mode 100644 index 0000000000..d3a80a4e16 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-png/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 RPng(Package): + """This package provides an easy and simple way to read, write and display + bitmap images stored in the PNG format. It can read and write both files + and in-memory raw vectors.""" + + homepage = "http://www.rforge.net/png/" + url = "https://cran.r-project.org/src/contrib/png_0.1-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/png" + + version('0.1-7', '1ebc8b8aa5979b12c5ec2384b30d649f') + + extends('R') + + depends_on('libpng') + + 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-praise/package.py b/var/spack/repos/builtin/packages/r-praise/package.py new file mode 100644 index 0000000000..102d86d2fa --- /dev/null +++ b/var/spack/repos/builtin/packages/r-praise/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 RPraise(Package): + """Build friendly R packages that praise their users if they have done + something good, or they just need it to feel better.""" + + homepage = "https://github.com/gaborcsardi/praise" + url = "https://cran.r-project.org/src/contrib/praise_1.0.0.tar.gz" + + version('1.0.0', '9318724cec0454884b5f762bee2da6a1') + + 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-proto/package.py b/var/spack/repos/builtin/packages/r-proto/package.py new file mode 100644 index 0000000000..07ace3ad29 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-proto/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 RProto(Package): + """An object oriented system using object-based, also called + prototype-based, rather than class-based object oriented ideas.""" + + homepage = "http://r-proto.googlecode.com/" + url = "https://cran.r-project.org/src/contrib/proto_0.3-10.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/proto" + + version('0.3-10', 'd5523943a5be6ca2f0ab557c900f8212') + + 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-quantmod/package.py b/var/spack/repos/builtin/packages/r-quantmod/package.py new file mode 100644 index 0000000000..ecfbf49055 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-quantmod/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 RQuantmod(Package): + """Specify, build, trade, and analyse quantitative financial trading + strategies.""" + + homepage = "http://www.quantmod.com/" + url = "https://cran.r-project.org/src/contrib/quantmod_0.4-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/quantmod" + + version('0.4-5', 'cab3c409e4de3df98a20f1ded60f3631') + + extends('R') + + depends_on('r-xts', type=nolink) + depends_on('r-zoo', type=nolink) + depends_on('r-ttr', type=nolink) + + 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-quantreg/package.py b/var/spack/repos/builtin/packages/r-quantreg/package.py new file mode 100644 index 0000000000..89a26070ba --- /dev/null +++ b/var/spack/repos/builtin/packages/r-quantreg/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 RQuantreg(Package): + """Estimation and inference methods for models of conditional quantiles: + Linear and nonlinear parametric and non-parametric (total variation + penalized) models for conditional quantiles of a univariate response + and several methods for handling censored survival data. Portfolio + selection methods based on expected shortfall risk are also + included.""" + + homepage = "https://cran.r-project.org/package=quantreg" + url = "https://cran.r-project.org/src/contrib/quantreg_5.26.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/quantreg" + + version('5.26', '1d89ed932fb4d67ae2d5da0eb8c2989f') + + extends('R') + + depends_on('r-sparsem', type=nolink) + depends_on('r-matrix', type=nolink) + depends_on('r-matrixmodels', type=nolink) + + 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-randomforest/package.py b/var/spack/repos/builtin/packages/r-randomforest/package.py new file mode 100644 index 0000000000..1066c217f4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-randomforest/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 RRandomforest(Package): + """Classification and regression based on a forest of trees using random + inputs.""" + + homepage = "https://www.stat.berkeley.edu/~breiman/RandomForests/" + url = "https://cran.r-project.org/src/contrib/randomForest_4.6-12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/randomForest" + + version('4.6-12', '071c03af974198e861f1475c5bab9e7a') + + 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-raster/package.py b/var/spack/repos/builtin/packages/r-raster/package.py new file mode 100644 index 0000000000..39f4256703 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-raster/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 RRaster(Package): + """Reading, writing, manipulating, analyzing and modeling of gridded + spatial data. The package implements basic and high-level functions. + Processing of very large files is supported.""" + + homepage = "http://cran.r-project.org/package=raster" + url = "https://cran.r-project.org/src/contrib/raster_2.5-8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/raster" + + version('2.5-8', '2a7db931c74d50516e82d04687c0a577') + + extends('R') + + depends_on('r-sp', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-rcolorbrewer/package.py b/var/spack/repos/builtin/packages/r-rcolorbrewer/package.py new file mode 100644 index 0000000000..b81ec2561c --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rcolorbrewer/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 RRcolorbrewer(Package): + """Provides color schemes for maps (and other graphics) designed by Cynthia + Brewer as described at http://colorbrewer2.org""" + + homepage = "http://colorbrewer2.org" + url = "https://cran.r-project.org/src/contrib/RColorBrewer_1.1-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RColorBrewer" + + version('1.1-2', '66054d83eade4dff8a43ad4732691182') + + 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-rcpp/package.py b/var/spack/repos/builtin/packages/r-rcpp/package.py new file mode 100644 index 0000000000..94580a8700 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rcpp/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 RRcpp(Package): + """The 'Rcpp' package provides R functions as well as C++ classes which + offer a seamless integration of R and C++. Many R data types and objects + can be mapped back and forth to C++ equivalents which facilitates both + writing of new code as well as easier integration of third-party libraries. + Documentation about 'Rcpp' is provided by several vignettes included in + this package, via the 'Rcpp Gallery' site at <http://gallery.rcpp.org>, the + paper by Eddelbuettel and Francois (2011, JSS), and the book by + Eddelbuettel (2013, Springer); see 'citation("Rcpp")' for details on these + last two.""" + + homepage = "http://dirk.eddelbuettel.com/code/rcpp.html" + url = "https://cran.r-project.org/src/contrib/Rcpp_0.12.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/Rcpp" + + version('0.12.6', 'db4280fb0a79cd19be73a662c33b0a8b') + version('0.12.5', 'f03ec05b4e391cc46e7ce330e82ff5e2') + + 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-rcppeigen/package.py b/var/spack/repos/builtin/packages/r-rcppeigen/package.py new file mode 100644 index 0000000000..ecf9256ab3 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rcppeigen/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 RRcppeigen(Package): + """R and 'Eigen' integration using 'Rcpp'. 'Eigen' is a C++ template + library for linear algebra: matrices, vectors, numerical solvers and + related algorithms. It supports dense and sparse matrices on integer, + floating point and complex numbers, decompositions of such matrices, and + solutions of linear systems. Its performance on many algorithms is + comparable with some of the best implementations based on 'Lapack' and + level-3 'BLAS'. The 'RcppEigen' package includes the header files from the + 'Eigen' C++ template library (currently version 3.2.8). Thus users do not + need to install 'Eigen' itself in order to use 'RcppEigen'. Since version + 3.1.1, 'Eigen' is licensed under the Mozilla Public License (version 2); + earlier version were licensed under the GNU LGPL version 3 or later. + 'RcppEigen' (the 'Rcpp' bindings/bridge to 'Eigen') is licensed under the + GNU GPL version 2 or later, as is the rest of 'Rcpp'.""" + + homepage = "http://eigen.tuxfamily.org/" + url = "https://cran.r-project.org/src/contrib/RcppEigen_0.3.2.8.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RcppEigen" + + version('0.3.2.8.1', '4146e06e4fdf7f4d08db7839069d479f') + + extends('R') + + depends_on('r-matrix', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-registry/package.py b/var/spack/repos/builtin/packages/r-registry/package.py new file mode 100644 index 0000000000..119a84718a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-registry/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 RRegistry(Package): + """Provides a generic infrastructure for creating and using registries.""" + + homepage = "https://cran.r-project.org/web/packages/registry/index.html" + url = "https://cran.r-project.org/src/contrib/registry_0.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/registry" + + version('0.3', '85345b334ec81eb3da6edcbb27c5f421') + + 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-reshape2/package.py b/var/spack/repos/builtin/packages/r-reshape2/package.py new file mode 100644 index 0000000000..769e82aff9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-reshape2/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 RReshape2(Package): + """Flexibly restructure and aggregate data using just two functions: melt + and dcast (or acast).""" + + homepage = "https://github.com/hadley/reshape" + url = "https://cran.r-project.org/src/contrib/reshape2_1.4.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/reshape2" + + version('1.4.1', '41e9dffdf5c6fa830321ac9c8ebffe00') + + extends('R') + + depends_on('r-plyr', type=nolink) + depends_on('r-stringr', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-rgooglemaps/package.py b/var/spack/repos/builtin/packages/r-rgooglemaps/package.py new file mode 100644 index 0000000000..0d28b68b94 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rgooglemaps/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RRgooglemaps(Package): + """This package serves two purposes: (i) Provide a comfortable R interface + to query the Google server for static maps, and (ii) Use the map as a + background image to overlay plots within R. This requires proper coordinate + scaling.""" + + homepage = "https://cran.r-project.org/package=RgoogleMaps" + url = "https://cran.r-project.org/src/contrib/RgoogleMaps_1.2.0.7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RgoogleMaps" + + version('1.2.0.7', '2e1df804f0331b4122d841105f0c7ea5') + + extends('R') + + depends_on('r-png', type=nolink) + depends_on('r-rjsonio', type=nolink) + + 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..47804bd7fc --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rjava/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 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') + + depends_on('jdk') + + 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-rjson/package.py b/var/spack/repos/builtin/packages/r-rjson/package.py new file mode 100644 index 0000000000..94ca45f485 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rjson/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 RRjson(Package): + """Converts R object into JSON objects and vice-versa.""" + + homepage = "https://cran.r-project.org/package=rjson" + url = "https://cran.r-project.org/src/contrib/rjson_0.2.15.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rjson" + + version('0.2.15', '87d0e29bc179c6aeaf312b138089f8e9') + + 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-rjsonio/package.py b/var/spack/repos/builtin/packages/r-rjsonio/package.py new file mode 100644 index 0000000000..b56dfbe21d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rjsonio/package.py @@ -0,0 +1,55 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRjsonio(Package): + """This is a package that allows conversion to and from data in Javascript + object notation (JSON) format. This allows R objects to be inserted into + Javascript/ECMAScript/ActionScript code and allows R programmers to read + and convert JSON content to R objects. This is an alternative to rjson + package. Originally, that was too slow for converting large R objects to + JSON and was not extensible. rjson's performance is now similar to this + package, and perhaps slightly faster in some cases. This package uses + methods and is readily extensible by defining methods for different + classes, vectorized operations, and C code and callbacks to R functions for + deserializing JSON objects to R. The two packages intentionally share the + same basic interface. This package (RJSONIO) has many additional options to + allow customizing the generation and processing of JSON content. This + package uses libjson rather than implementing yet another JSON parser. The + aim is to support other general projects by building on their work, + providing feedback and benefit from their ongoing development.""" + + homepage = "https://cran.r-project.org/package=RJSONIO" + url = "https://cran.r-project.org/src/contrib/RJSONIO_1.3-0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RJSONIO" + + version('1.3-0', '72c395622ba8d1435ec43849fd32c830') + + 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..bc42c51ca9 --- /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', type=nolink) + 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-rngtools/package.py b/var/spack/repos/builtin/packages/r-rngtools/package.py new file mode 100644 index 0000000000..2f33cd9f88 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rngtools/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 RRngtools(Package): + """This package contains a set of functions for working with Random Number + Generators (RNGs). In particular, it defines a generic S4 framework for + getting/setting the current RNG, or RNG data that are embedded into objects + for reproducibility. Notably, convenient default methods greatly facilitate + the way current RNG settings can be changed.""" + + homepage = "https://renozao.github.io/rngtools" + url = "https://cran.r-project.org/src/contrib/rngtools_1.2.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rngtools" + + version('1.2.4', '715967f8b3af2848a76593a7c718c1cd') + + extends('R') + + depends_on('r-pkgmaker', type=nolink) + depends_on('r-stringr', type=nolink) + depends_on('r-digest', type=nolink) + + 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..11fe0ace56 --- /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-roxygen2/package.py b/var/spack/repos/builtin/packages/r-roxygen2/package.py new file mode 100644 index 0000000000..4f4b8dcafa --- /dev/null +++ b/var/spack/repos/builtin/packages/r-roxygen2/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 RRoxygen2(Package): + """A 'Doxygen'-like in-source documentation system for Rd, collation, and + 'NAMESPACE' files.""" + + homepage = "https://github.com/klutometis/roxygen" + url = "https://cran.r-project.org/src/contrib/roxygen2_5.0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/roxygen2" + + version('5.0.1', 'df5bdbc12fda372e427710ef1cd92ed7') + + extends('R') + + depends_on('r-stringr', type=nolink) + depends_on('r-stringi', type=nolink) + depends_on('r-brew', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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..999fb4a1b9 --- /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', type=nolink) + 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..c7d41f0fb3 --- /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', type=nolink) + + 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-rstan/package.py b/var/spack/repos/builtin/packages/r-rstan/package.py new file mode 100644 index 0000000000..1d0052563b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rstan/package.py @@ -0,0 +1,57 @@ +############################################################################## +# 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 RRstan(Package): + """User-facing R functions are provided to parse, compile, test, estimate, + and analyze Stan models by accessing the header-only Stan library provided + by the 'StanHeaders' package. The Stan project develops a probabilistic + programming language that implements full Bayesian statistical inference + via Markov Chain Monte Carlo, rough Bayesian inference via variational + approximation, and (optionally penalized) maximum likelihood estimation via + optimization. In all three cases, automatic differentiation is used to + quickly and accurately evaluate gradients without burdening the user with + the need to derive the partial derivatives.""" + + homepage = "http://mc-stan.org/" + url = "https://cran.r-project.org/src/contrib/rstan_2.10.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rstan" + + version('2.10.1', 'f5d212f6f8551bdb91fe713d05d4052a') + + extends('R') + + depends_on('r-ggplot2', type=nolink) + depends_on('r-stanheaders', type=nolink) + depends_on('r-inline', type=nolink) + depends_on('r-gridextra', type=nolink) + depends_on('r-rcpp', type=nolink) + depends_on('r-rcppeigen', type=nolink) + depends_on('r-bh', type=nolink) + + 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..bf9b35fe5b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rstudioapi/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 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.6', 'fdb13bf46aab02421557e713fceab66b') + 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-sandwich/package.py b/var/spack/repos/builtin/packages/r-sandwich/package.py new file mode 100644 index 0000000000..ffd62b1b14 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-sandwich/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 RSandwich(Package): + """Model-robust standard error estimators for cross-sectional, time series, + and longitudinal data.""" + + homepage = "https://cran.r-project.org/package=sandwich" + url = "https://cran.r-project.org/src/contrib/sandwich_2.3-4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/sandwich" + + version('2.3-4', 'a621dbd8a57b6e1e036496642aadc2e5') + + extends('R') + + depends_on('r-zoo', type=nolink) + + 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-scales/package.py b/var/spack/repos/builtin/packages/r-scales/package.py new file mode 100644 index 0000000000..44bd5a5a2a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-scales/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 RScales(Package): + """Graphical scales map data to aesthetics, and provide methods for + automatically determining breaks and labels for axes and legends.""" + + homepage = "https://github.com/hadley/scales" + url = "https://cran.r-project.org/src/contrib/scales_0.4.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/scales" + + version('0.4.0', '7b5602d9c55595901192248bca25c099') + + extends('R') + + depends_on('r-rcolorbrewer', type=nolink) + depends_on('r-dichromat', type=nolink) + depends_on('r-plyr', type=nolink) + depends_on('r-munsell', type=nolink) + depends_on('r-labeling', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-shiny/package.py b/var/spack/repos/builtin/packages/r-shiny/package.py new file mode 100644 index 0000000000..a80860f4a5 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-shiny/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 RShiny(Package): + """Makes it incredibly easy to build interactive web applications with R. + Automatic "reactive" binding between inputs and outputs and extensive + pre-built widgets make it possible to build beautiful, responsive, and + powerful applications with minimal effort.""" + + homepage = "http://shiny.rstudio.com/" + url = "https://cran.r-project.org/src/contrib/shiny_0.13.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/shiny" + + version('0.13.2', 'cb5bff7a28ad59ec2883cd0912ca9611') + + extends('R') + + depends_on('r-httpuv', type=nolink) + depends_on('r-mime', type=nolink) + depends_on('r-jsonlite', type=nolink) + depends_on('r-xtable', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-htmltools', type=nolink) + depends_on('r-R6', type=nolink) + + 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-sp/package.py b/var/spack/repos/builtin/packages/r-sp/package.py new file mode 100644 index 0000000000..bb7589d490 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-sp/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 RSp(Package): + """Classes and methods for spatial data; the classes document where the + spatial location information resides, for 2D or 3D data. Utility functions + are provided, e.g. for plotting data as maps, spatial selection, as well as + methods for retrieving coordinates, for subsetting, print, summary, etc.""" + + homepage = "https://github.com/edzer/sp/" + url = "https://cran.r-project.org/src/contrib/sp_1.2-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/sp" + + version('1.2-3', 'f0e24d993dec128642ee66b6b47b10c1') + + extends('R') + + depends_on('r-lattice', type=nolink) + + 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-sparsem/package.py b/var/spack/repos/builtin/packages/r-sparsem/package.py new file mode 100644 index 0000000000..c4dabf5c15 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-sparsem/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 RSparsem(Package): + """Some basic linear algebra functionality for sparse matrices is provided: + including Cholesky decomposition and backsolving as well as standard R + subsetting and Kronecker products.""" + + homepage = "http://www.econ.uiuc.edu/~roger/research/sparse/sparse.html" + url = "https://cran.r-project.org/src/contrib/SparseM_1.7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/SparseM" + + version('1.7', '7b5b0ab166a0929ef6dcfe1d97643601') + + 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-stanheaders/package.py b/var/spack/repos/builtin/packages/r-stanheaders/package.py new file mode 100644 index 0000000000..c77b5aa8b6 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-stanheaders/package.py @@ -0,0 +1,55 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RStanheaders(Package): + """The C++ header files of the Stan project are provided by this package, + but it contains no R code, vignettes, or function documentation. There is a + shared object containing part of the CVODES library, but it is not + accessible from R. StanHeaders is only useful for developers who want to + utilize the LinkingTo directive of their package's DESCRIPTION file to + build on the Stan library without incurring unnecessary dependencies. The + Stan project develops a probabilistic programming language that implements + full or approximate Bayesian statistical inference via Markov Chain Monte + Carlo or variational methods and implements (optionally penalized) maximum + likelihood estimation via optimization. The Stan library includes an + advanced automatic differentiation scheme, templated statistical and linear + algebra functions that can handle the automatically differentiable scalar + types (and doubles, ints, etc.), and a parser for the Stan language. The + 'rstan' package provides user-facing R functions to parse, compile, test, + estimate, and analyze Stan models.""" + + homepage = "http://mc-stan.org/" + url = "https://cran.r-project.org/src/contrib/StanHeaders_2.10.0-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/StanHeaders" + + version('2.10.0-2', '9d09b1e9278f08768f7a988ad9082d57') + + 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-stringi/package.py b/var/spack/repos/builtin/packages/r-stringi/package.py new file mode 100644 index 0000000000..22774dedec --- /dev/null +++ b/var/spack/repos/builtin/packages/r-stringi/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 RStringi(Package): + """Allows for fast, correct, consistent, portable, as well as convenient + character string/text processing in every locale and any native encoding. + Owing to the use of the ICU library, the package provides R users with + platform-independent functions known to Java, Perl, Python, PHP, and Ruby + programmers. Among available features there are: pattern searching (e.g., + with ICU Java-like regular expressions or the Unicode Collation Algorithm), + random string generation, case mapping, string transliteration, + concatenation, Unicode normalization, date-time formatting and parsing, + etc.""" + + homepage = "http://www.gagolewski.com/software/stringi/" + url = "https://cran.r-project.org/src/contrib/stringi_1.1.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/stringi" + + version('1.1.1', '32b919ee3fa8474530c4942962a6d8d9') + + extends('R') + + depends_on('icu') + + 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-stringr/package.py b/var/spack/repos/builtin/packages/r-stringr/package.py new file mode 100644 index 0000000000..08ded95833 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-stringr/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 RStringr(Package): + """A consistent, simple and easy to use set of wrappers around the + fantastic 'stringi' package. All function and argument names (and + positions) are consistent, all functions deal with "NA"'s and zero length + vectors in the same way, and the output from one function is easy to feed + into the input of another.""" + + homepage = "https://cran.r-project.org/web/packages/stringr/index.html" + url = "https://cran.r-project.org/src/contrib/stringr_1.0.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/stringr" + + version('1.0.0', '5ca977c90351f78b1b888b379114a7b4') + + extends('R') + + depends_on('r-stringi', type=nolink) + depends_on('r-magrittr', type=nolink) + + 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-survey/package.py b/var/spack/repos/builtin/packages/r-survey/package.py new file mode 100644 index 0000000000..646793f7a4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-survey/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RSurvey(Package): + """Summary statistics, two-sample tests, rank tests, generalised linear + models, cumulative link models, Cox models, loglinear models, and general + maximum pseudolikelihood estimation for multistage stratified, + cluster-sampled, unequally weighted survey samples. Variances by Taylor + series linearisation or replicate weights. Post-stratification, + calibration, and raking. Two-phase subsampling designs. Graphics. PPS + sampling without replacement. Principal components, factor analysis.""" + + homepage = "http://r-survey.r-forge.r-project.org/survey/" + url = "https://cran.r-project.org/src/contrib/survey_3.30-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/survey" + + version('3.30-3', 'c70cdae9cb43d35abddd11173d64cad0') + + 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-survival/package.py b/var/spack/repos/builtin/packages/r-survival/package.py new file mode 100644 index 0000000000..cfba9298fe --- /dev/null +++ b/var/spack/repos/builtin/packages/r-survival/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 RSurvival(Package): + """Contains the core survival analysis routines, including definition of + Surv objects, Kaplan-Meier and Aalen-Johansen (multi-state) curves, Cox + models, and parametric accelerated failure time models.""" + + homepage = "https://cran.r-project.org/package=survival" + url = "https://cran.r-project.org/src/contrib/survival_2.39-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/survival" + + version('2.39-5', 'a3cc6b5762e8c5c0bb9e64a276710be2') + + extends('R') + + depends_on('r-matrix', type=nolink) + + 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-tarifx/package.py b/var/spack/repos/builtin/packages/r-tarifx/package.py new file mode 100644 index 0000000000..a85aa8baef --- /dev/null +++ b/var/spack/repos/builtin/packages/r-tarifx/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 RTarifx(Package): + """A collection of various utility and convenience functions.""" + + homepage = "https://cran.r-project.org/package=taRifx" + url = "https://cran.r-project.org/src/contrib/taRifx_1.0.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/taRifx" + + version('1.0.6', '7e782e04bd69d929b29f91553382e6a2') + + extends('R') + + depends_on('r-reshape2', type=nolink) + depends_on('r-plyr', type=nolink) + + 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-testthat/package.py b/var/spack/repos/builtin/packages/r-testthat/package.py new file mode 100644 index 0000000000..60dfd2afcd --- /dev/null +++ b/var/spack/repos/builtin/packages/r-testthat/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 RTestthat(Package): + """A unit testing system designed to be fun, flexible and easy to set + up.""" + + homepage = "https://github.com/hadley/testthat" + url = "https://cran.r-project.org/src/contrib/testthat_1.0.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/testthat" + + version('1.0.2', '6c6a90c8db860292df5784a70e07b8dc') + + extends('R') + + depends_on('r-digest', type=nolink) + depends_on('r-crayon', type=nolink) + depends_on('r-praise', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-R6', type=nolink) + + 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-thdata/package.py b/var/spack/repos/builtin/packages/r-thdata/package.py new file mode 100644 index 0000000000..e1cf050181 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-thdata/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 RThdata(Package): + """Contains data sets used in other packages Torsten Hothorn maintains.""" + + homepage = "https://cran.r-project.org/package=TH.data" + url = "https://cran.r-project.org/src/contrib/TH.data_1.0-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/TH.data" + + version('1.0-7', '3e8b6b1a4699544f175215aed7039a94') + + extends('R') + + depends_on('r-survival', type=nolink) + depends_on('r-mass', type=nolink) + + 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-threejs/package.py b/var/spack/repos/builtin/packages/r-threejs/package.py new file mode 100644 index 0000000000..89ecce8bfc --- /dev/null +++ b/var/spack/repos/builtin/packages/r-threejs/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RThreejs(Package): + """Create interactive 3D scatter plots, network plots, and globes using the + 'three.js' visualization library ("http://threejs.org").""" + + homepage = "http://bwlewis.github.io/rthreejs" + url = "https://cran.r-project.org/src/contrib/threejs_0.2.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/threejs" + + version('0.2.2', '35c179b10813c5e4bd3e7827fae6627b') + + extends('R') + + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-base64enc', type=nolink) + depends_on('r-matrix', type=nolink) + depends_on('r-jsonlite', type=nolink) + + 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-tibble/package.py b/var/spack/repos/builtin/packages/r-tibble/package.py new file mode 100644 index 0000000000..c601de3c88 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-tibble/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 RTibble(Package): + """Provides a 'tbl_df' class that offers better checking and printing + capabilities than traditional data frames.""" + + homepage = "https://github.com/hadley/tibble" + url = "https://cran.r-project.org/src/contrib/tibble_1.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/tibble" + + version('1.1', '2fe9f806109d0b7fadafb1ffafea4cb8') + + extends('R') + + depends_on('r-assertthat', type=nolink) + depends_on('r-lazyeval', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-tidyr/package.py b/var/spack/repos/builtin/packages/r-tidyr/package.py new file mode 100644 index 0000000000..d82ae278fe --- /dev/null +++ b/var/spack/repos/builtin/packages/r-tidyr/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 RTidyr(Package): + """An evolution of 'reshape2'. It's designed specifically for data tidying + (not general reshaping or aggregating) and works well with 'dplyr' data + pipelines.""" + + homepage = "https://github.com/hadley/tidyr" + url = "https://cran.r-project.org/src/contrib/tidyr_0.5.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/tidyr" + + version('0.5.1', '3cadc869510c054ed93d374ab44120bd') + + extends('R') + depends_on('r-tibble', type=nolink) + depends_on('r-dplyr', type=nolink) + depends_on('r-stringi', type=nolink) + depends_on('r-lazyeval', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-rcpp', type=nolink) + + 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-ttr/package.py b/var/spack/repos/builtin/packages/r-ttr/package.py new file mode 100644 index 0000000000..c9b40a8262 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ttr/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 RTtr(Package): + """Functions and data to construct technical trading rules with R.""" + + homepage = "https://github.com/joshuaulrich/TTR" + url = "https://cran.r-project.org/src/contrib/TTR_0.23-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/TTR" + + version('0.23-1', '35f693ac0d97e8ec742ebea2da222986') + + extends('R') + + depends_on('r-xts', type=nolink) + depends_on('r-zoo', type=nolink) + + 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-vcd/package.py b/var/spack/repos/builtin/packages/r-vcd/package.py new file mode 100644 index 0000000000..06e609b1ef --- /dev/null +++ b/var/spack/repos/builtin/packages/r-vcd/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 RVcd(Package): + """Visualization techniques, data sets, summary and inference procedures + aimed particularly at categorical data. Special emphasis is given to highly + extensible grid graphics. The package was package was originally inspired + by the book "Visualizing Categorical Data" by Michael Friendly and is now + the main support package for a new book, "Discrete Data Analysis with R" by + Michael Friendly and David Meyer (2015).""" + + homepage = "https://cran.r-project.org/package=vcd" + url = "https://cran.r-project.org/src/contrib/vcd_1.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/vcd" + + version('1.4-1', '7db150a77f173f85b69a1f86f73f8f02') + + extends('R') + + depends_on('r-mass', type=nolink) + depends_on('r-colorspace', type=nolink) + depends_on('r-lmtest', type=nolink) + + 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-visnetwork/package.py b/var/spack/repos/builtin/packages/r-visnetwork/package.py new file mode 100644 index 0000000000..90d55bbb2f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-visnetwork/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RVisnetwork(Package): + """Provides an R interface to the 'vis.js' JavaScript charting library. It + allows an interactive visualization of networks.""" + + homepage = "https://github.com/datastorm-open/visNetwork" + url = "https://cran.r-project.org/src/contrib/visNetwork_1.0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/visNetwork" + + version('1.0.1', 'dfc9664a5165134d8dbdcd949ad73cf7') + + extends('R') + + depends_on('r-htmlwidgets', type=nolink) + depends_on('r-htmltools', type=nolink) + depends_on('r-jsonlite', type=nolink) + depends_on('r-magrittr', type=nolink) + + 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..332c80fb92 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xlconnect/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 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-12', '3340d05d259f0a41262eab4ed32617ad') + version('0.2-11', '9d1769a103cda05665df399cc335017d') + + extends('R') + + depends_on('r-xlconnectjars', type=nolink) + depends_on('r-rjava', type=nolink) + + 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..26e822d2b7 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xlconnectjars/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 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-12', '6984e5140cd1c887c017ef6f88cbba81') + version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb') + + extends('R') + + depends_on('r-rjava', type=nolink) + + 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..6fed09296d --- /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', type=nolink) + depends_on('r-xlsxjars', type=nolink) + + 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..19f0006ce9 --- /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', type=nolink) + + 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-xml/package.py b/var/spack/repos/builtin/packages/r-xml/package.py new file mode 100644 index 0000000000..591c887f32 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xml/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 RXml(Package): + """Many approaches for both reading and creating XML (and HTML) documents + (including DTDs), both local and accessible via HTTP or FTP. Also offers + access to an 'XPath' "interpreter".""" + + homepage = "http://www.omegahat.net/RSXML" + url = "https://cran.r-project.org/src/contrib/XML_3.98-1.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/XML" + + version('3.98-1', '1a7f3ce6f264eeb109bfa57bedb26c14') + + extends('R') + + depends_on('libxml2') + + 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-xtable/package.py b/var/spack/repos/builtin/packages/r-xtable/package.py new file mode 100644 index 0000000000..46434b4842 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xtable/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 RXtable(Package): + """Coerce data to LaTeX and HTML tables.""" + + homepage = "http://xtable.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/xtable_1.8-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/xtable" + + version('1.8-2', '239e4825cd046156a67efae3aac01d86') + + 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-xts/package.py b/var/spack/repos/builtin/packages/r-xts/package.py new file mode 100644 index 0000000000..d8a4b62d27 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xts/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 RXts(Package): + """Provide for uniform handling of R's different time-based data classes by + extending zoo, maximizing native format information preservation and + allowing for user level customization and extension, while simplifying + cross-class interoperability.""" + + homepage = "http://r-forge.r-project.org/projects/xts/" + url = "https://cran.r-project.org/src/contrib/xts_0.9-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/xts" + + version('0.9-7', 'a232e94aebfa654653a7d88a0503537b') + + extends('R') + + depends_on('r-zoo', type=nolink) + + 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-yaml/package.py b/var/spack/repos/builtin/packages/r-yaml/package.py new file mode 100644 index 0000000000..b68f26e9b8 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-yaml/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 RYaml(Package): + """This package implements the libyaml YAML 1.1 parser and emitter + (http://pyyaml.org/wiki/LibYAML) for R.""" + + homepage = "https://cran.r-project.org/web/packages/yaml/index.html" + url = "https://cran.r-project.org/src/contrib/yaml_2.1.13.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/yaml" + + version('2.1.13', 'f2203ea395adaff6bd09134666191d9a') + + 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-zoo/package.py b/var/spack/repos/builtin/packages/r-zoo/package.py new file mode 100644 index 0000000000..d889cacbee --- /dev/null +++ b/var/spack/repos/builtin/packages/r-zoo/package.py @@ -0,0 +1,47 @@ +############################################################################## +# 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 RZoo(Package): + """An S3 class with methods for totally ordered indexed observations. It is + particularly aimed at irregular time series of numeric vectors/matrices and + factors. zoo's key design goals are independence of a particular + index/date/time class and consistency with ts and base R by providing + methods to extend standard generics.""" + + homepage = "http://zoo.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/zoo_1.7-13.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/zoo" + + version('1.7-13', '99521dfa4c668e692720cefcc5a1bf30') + + extends('R') + + depends_on('r-lattice', type=nolink) + + 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/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index b6300a1dfa..e9db4b4fc8 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Raja(Package): """RAJA Parallel Framework.""" homepage = "http://software.llnl.gov/RAJA/" @@ -31,6 +32,6 @@ class Raja(Package): version('git', git='https://github.com/LLNL/RAJA.git', branch="master") def install(self, spec, prefix): - cmake('.',*std_cmake_args) - make() - make('install') + cmake('.', *std_cmake_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/ravel/package.py b/var/spack/repos/builtin/packages/ravel/package.py index 763ec1b9a2..4f4f2b2e10 100644 --- a/var/spack/repos/builtin/packages/ravel/package.py +++ b/var/spack/repos/builtin/packages/ravel/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Ravel(Package): """Ravel is a parallel communication trace visualization tool that orders events according to logical time.""" @@ -33,8 +34,7 @@ class Ravel(Package): version('1.0.0', 'b25fece58331c2adfcce76c5036485c2') - # TODO: make this a build dependency - depends_on('cmake@2.8.9:') + depends_on('cmake@2.8.9:', type='build') depends_on('muster@1.0.1:') depends_on('otf') diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index 039bf725eb..abb6ba04ce 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Readline(Package): """The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py index b8a65e8574..02b09f0126 100644 --- a/var/spack/repos/builtin/packages/rose/package.py +++ b/var/spack/repos/builtin/packages/rose/package.py @@ -22,12 +22,13 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -#------------------------------------------------------------------------------ +# ----------------------------------------------------------------------------- # Author: Justin Too <too1@llnl.gov> -#------------------------------------------------------------------------------ +# ----------------------------------------------------------------------------- from spack import * + class Rose(Package): """A compiler infrastructure to build source-to-source program transformation and analysis tools. @@ -36,13 +37,14 @@ class Rose(Package): homepage = "http://rosecompiler.org/" url = "https://github.com/rose-compiler/edg4x-rose" - version('master', branch='master', git='https://github.com/rose-compiler/edg4x-rose.git') + version('master', branch='master', + git='https://github.com/rose-compiler/edg4x-rose.git') patch('add_spack_compiler_recognition.patch') - depends_on("autoconf@2.69") - depends_on("automake@1.14") - depends_on("libtool@2.4") + depends_on("autoconf@2.69", type='build') + depends_on("automake@1.14", type='build') + depends_on("libtool@2.4", type='build') depends_on("boost@1.54.0") depends_on("jdk@8u25-linux-x64") @@ -60,4 +62,3 @@ class Rose(Package): "--with-boost=" + boost.prefix, "--disable-boost-version-check") make("install-core") - diff --git a/var/spack/repos/builtin/packages/rsync/package.py b/var/spack/repos/builtin/packages/rsync/package.py index a9f8d4cfda..4e741b255f 100644 --- a/var/spack/repos/builtin/packages/rsync/package.py +++ b/var/spack/repos/builtin/packages/rsync/package.py @@ -24,8 +24,9 @@ ############################################################################## from spack import * + class Rsync(Package): - """rsync is an open source utility that provides fast incremental file transfer.""" + """An open source utility that provides fast incremental file transfer.""" homepage = "https://rsync.samba.org" url = "https://download.samba.org/pub/rsync/rsync-3.1.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index dd71913fc9..8dc314c171 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -35,9 +35,20 @@ class Ruby(Package): extendable = True version('2.2.0', 'cd03b28fd0b555970f5c4fd481700852') + depends_on('libffi') + depends_on('zlib') + variant('openssl', default=False, description="Enable OpenSSL support") + depends_on('openssl', when='+openssl') + variant('readline', default=False, description="Enable Readline support") + depends_on('readline', when='+readline') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + options = ["--prefix=%s" % prefix] + if '+openssl' in spec: + options.append("--with-openssl-dir=%s" % spec['openssl'].prefix) + if '+readline' in spec: + options.append("--with-readline-dir=%s" % spec['readline'].prefix) + configure(*options) make() make("install") diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index 65f81ce534..629dfb4649 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -6,6 +6,7 @@ def get_submodules(): git = which('git') git('submodule', 'update', '--init', '--recursive') + class Rust(Package): """The rust programming language toolchain""" homepage = "http://www.rust-lang.org" diff --git a/var/spack/repos/builtin/packages/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py index f5c7f4431f..6b0b224785 100644 --- a/var/spack/repos/builtin/packages/samtools/package.py +++ b/var/spack/repos/builtin/packages/samtools/package.py @@ -24,19 +24,27 @@ ############################################################################## from spack import * + class Samtools(Package): - """SAM Tools provide various utilities for manipulating alignments in the SAM format, - including sorting, merging, indexing and generating + """SAM Tools provide various utilities for manipulating alignments in + the SAM format, including sorting, merging, indexing and generating alignments in a per-position format""" homepage = "www.htslib.org" - version('1.2','988ec4c3058a6ceda36503eebecd4122',url = "https://github.com/samtools/samtools/releases/download/1.2/samtools-1.2.tar.bz2") + url = "https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2" - depends_on("zlib") - depends_on("mpc") - parallel=False - patch("samtools1.2.patch",level=0) + version('1.3.1', 'a7471aa5a1eb7fc9cc4c6491d73c2d88') + version('1.2', '988ec4c3058a6ceda36503eebecd4122') - def install(self, spec, prefix): - make("prefix=%s" % prefix, "install") + depends_on("ncurses") + depends_on("htslib", when='@1.3.1:') # htslib became standalone + depends_on('zlib', when='@1.2') # needed for builtin htslib + def install(self, spec, prefix): + if self.spec.version >= Version('1.3.1'): + configure('--prefix={0}'.format(prefix), '--with-ncurses') + make() + make('install') + else: + make("prefix=%s" % prefix) + make("prefix=%s" % prefix, "install") diff --git a/var/spack/repos/builtin/packages/samtools/samtools1.2.patch b/var/spack/repos/builtin/packages/samtools/samtools1.2.patch deleted file mode 100644 index ead3ab4e2c..0000000000 --- a/var/spack/repos/builtin/packages/samtools/samtools1.2.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile 2015-02-03 08:27:34.000000000 -0800 -+++ Makefile.new 2015-07-21 10:38:27.881406892 -0700 -@@ -26,7 +26,7 @@ - CFLAGS = -g -Wall -O2 - LDFLAGS = - LDLIBS = --DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 -+DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=0 - LOBJS= bam_aux.o bam.o bam_import.o sam.o \ - sam_header.o bam_plbuf.o - AOBJS= bam_index.o bam_plcmd.o sam_view.o \ -@@ -37,7 +37,7 @@ - faidx.o stats.o stats_isize.o bam_flags.o bam_split.o \ - bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o - INCLUDES= -I. -I$(HTSDIR) --LIBCURSES= -lcurses # -lXCurses -+#LIBCURSES= -lcurses # -lXCurses - - prefix = /usr/local - exec_prefix = $(prefix) diff --git a/var/spack/repos/builtin/packages/scalasca/package.py b/var/spack/repos/builtin/packages/scalasca/package.py index 98e43ee75a..228d814aed 100644 --- a/var/spack/repos/builtin/packages/scalasca/package.py +++ b/var/spack/repos/builtin/packages/scalasca/package.py @@ -27,10 +27,12 @@ from spack import * class Scalasca(Package): - """ - Scalasca is a software tool that supports the performance optimization of parallel programs by measuring and - analyzing their runtime behavior. The analysis identifies potential performance bottlenecks - in particular those - concerning communication and synchronization - and offers guidance in exploring their causes. + """Scalasca is a software tool that supports the performance optimization + of parallel programs by measuring and analyzing their runtime + behavior. The analysis identifies potential performance + bottlenecks - in particular those concerning communication and + synchronization - and offers guidance in exploring their causes. + """ homepage = "http://www.scalasca.org" @@ -44,7 +46,8 @@ class Scalasca(Package): depends_on("mpi") ########## - # Hard-code dependencies for Scalasca according to what stated in the release page + # Hard-code dependencies for Scalasca according to what stated in the + # release page # The OTF2 library path should be detected automatically from SCOREP # SCALASCA 2.2.2 depends_on("scorep@1.4:", when='@2.2.2') @@ -60,4 +63,4 @@ class Scalasca(Package): "--enable-shared"] configure(*configure_args) make() - make("install")
\ No newline at end of file + make("install") diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py index 40ae4176dd..2c32bde4a1 100644 --- a/var/spack/repos/builtin/packages/scons/package.py +++ b/var/spack/repos/builtin/packages/scons/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Scons(Package): """SCons is a software construction tool""" homepage = "http://scons.org" diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index 633511a15a..d40e08740f 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -28,20 +28,28 @@ from spack import * class Scorep(Package): """ - The Score-P measurement infrastructure is a highly scalable and easy-to-use tool suite for profiling, event - tracing, and online analysis of HPC applications. + The Score-P measurement infrastructure is a highly scalable and easy-to-use + tool suite for profiling, event tracing, and online analysis of HPC + applications. """ homepage = "http://www.vi-hps.org/projects/score-p" url = "http://www.vi-hps.org/upload/packages/scorep/scorep-1.2.3.tar.gz" + version('2.0.2', '8f00e79e1b5b96e511c5ebecd10b2888', + url='http://www.vi-hps.org/upload/packages/scorep/scorep-2.0.2.tar.gz') version('1.4.2', '3b9a042b13bdd5836452354e6567f71e', url='http://www.vi-hps.org/upload/packages/scorep/scorep-1.4.2.tar.gz') version('1.3', '9db6f957b7f51fa01377a9537867a55c', url='http://www.vi-hps.org/upload/packages/scorep/scorep-1.3.tar.gz') ########## - # Dependencies for SCORE-P are quite tight. See the homepage for more information. + # Dependencies for SCORE-P are quite tight. See the homepage for more + # information. + # SCOREP 2.0.2 + depends_on('otf2@2.0', when='@2.0.2') + depends_on('opari2@2.0', when='@2.0.2') + depends_on('cube@4.3:4.4', when='@2.0.2') # SCOREP 1.4.2 depends_on('otf2@1.5:1.6', when='@1.4.2') depends_on('opari2@1.1.4', when='@1.4.2') @@ -56,17 +64,18 @@ class Scorep(Package): depends_on("papi") def install(self, spec, prefix): - configure = Executable( join_path(self.stage.source_path, 'configure') ) + configure = Executable(join_path(self.stage.source_path, 'configure')) with working_dir('spack-build', create=True): - configure_args = ["--prefix=%s" % prefix, - "--with-otf2=%s" % spec['otf2'].prefix.bin, - "--with-opari2=%s" % spec['opari2'].prefix.bin, - "--with-cube=%s" % spec['cube'].prefix.bin, - "--with-papi-header=%s" % spec['papi'].prefix.include, - "--with-papi-lib=%s" % spec['papi'].prefix.lib, - "--enable-shared", - "CFLAGS=-fPIC", - "CXXFLAGS=-fPIC"] + configure_args = [ + "--prefix=%s" % prefix, + "--with-otf2=%s" % spec['otf2'].prefix.bin, + "--with-opari2=%s" % spec['opari2'].prefix.bin, + "--with-cube=%s" % spec['cube'].prefix.bin, + "--with-papi-header=%s" % spec['papi'].prefix.include, + "--with-papi-lib=%s" % spec['papi'].prefix.lib, + "--enable-shared", + "CFLAGS=-fPIC", + "CXXFLAGS=-fPIC"] configure(*configure_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 3c2b4993ac..94a323ce90 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -39,14 +39,19 @@ class Scotch(Package): version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') - variant('mpi', default=False, description='Activate the compilation of parallel libraries') - variant('compression', default=True, description='Activate the posibility to use compressed files') - variant('esmumps', default=False, description='Activate the compilation of esmumps needed by mumps') - variant('shared', default=True, description='Build a shared version of the library') - variant('metis', default=True, description='Build metis and parmetis wrapper libraries') - - depends_on('flex') - depends_on('bison') + variant('mpi', default=False, + description='Activate the compilation of parallel libraries') + variant('compression', default=True, + description='Activate the posibility to use compressed files') + variant('esmumps', default=False, + description='Activate the compilation of esmumps needed by mumps') + variant('shared', default=True, + description='Build a shared version of the library') + variant('metis', default=True, + description='Build metis and parmetis wrapper libraries') + + depends_on('flex', type='build') + depends_on('bison', type='build') depends_on('mpi', when='+mpi') depends_on('zlib', when='+compression') @@ -171,15 +176,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 +190,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/scr/package.py b/var/spack/repos/builtin/packages/scr/package.py index b638688e7b..2b01c60b3e 100644 --- a/var/spack/repos/builtin/packages/scr/package.py +++ b/var/spack/repos/builtin/packages/scr/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Scr(Package): """SCR caches checkpoint data in storage on the compute nodes of a Linux cluster to provide a fast, scalable checkpoint/restart @@ -34,8 +35,10 @@ class Scr(Package): depends_on("mpi") # depends_on("dtcmp") - version('1.1-7', 'a5930e9ab27d1b7049447c2fd7734ebd', url='http://downloads.sourceforge.net/project/scalablecr/releases/scr-1.1-7.tar.gz') - version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e', url='https://github.com/hpc/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz') + version('1.1-7', 'a5930e9ab27d1b7049447c2fd7734ebd', + url='http://downloads.sourceforge.net/project/scalablecr/releases/scr-1.1-7.tar.gz') + version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e', + url='https://github.com/hpc/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz') def install(self, spec, prefix): configure("--prefix=" + prefix, diff --git a/var/spack/repos/builtin/packages/screen/package.py b/var/spack/repos/builtin/packages/screen/package.py new file mode 100644 index 0000000000..17335603e6 --- /dev/null +++ b/var/spack/repos/builtin/packages/screen/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 Screen(Package): + """ + Screen is a full-screen window manager that multiplexes a physical + terminal between several processes, typically interactive shells. + """ + + homepage = "https://www.gnu.org/software/screen/" + url = "http://ftp.gnu.org/gnu/screen/screen-4.3.1.tar.gz" + + version('4.3.1', '5bb3b0ff2674e29378c31ad3411170ad') + version('4.3.0', 'f76d28eadc4caaf6cdff00685ae6ad46') + version('4.2.1', '419a0594e2b25039239af8b90eda7d92') + version('4.2.0', 'e5199156a8ac863bbf92495a7638b612') + version('4.0.3', '8506fd205028a96c741e4037de6e3c42') + version('4.0.2', 'ed68ea9b43d9fba0972cb017a24940a1') + version('3.9.15', '0dff6fdc3fbbceabf25a43710fbfe75f') + version('3.9.11', '19572f92404995e7b2dea8117204dd67') + version('3.9.10', 'bbe271715d1dee038b3cd72d6d2f05fb') + version('3.9.9', '9a8b1d6c7438c64b884c4f7d7662afdc') + version('3.9.8', '8ddfebe32c2d45410ce89ea9779bb1cf') + version('3.9.4', '7de72cd18f7adcdf993ecc6764d0478a') + version('3.7.6', '9a353b828d79c3c143109265cae663a7') + version('3.7.4', 'c5ab40b068968075e41e25607dfce543') + version('3.7.2', '2d6db5de7fb0cf849cc5a6f94203f029') + version('3.7.1', '27cdd29318446561ef7c966041cbd2c9') + + depends_on('ncurses') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/seqtk/package.py b/var/spack/repos/builtin/packages/seqtk/package.py new file mode 100644 index 0000000000..ca168c176c --- /dev/null +++ b/var/spack/repos/builtin/packages/seqtk/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 Seqtk(Package): + """Toolkit for processing sequences in FASTA/Q formats.""" + + homepage = "https://github.com/lh3/seqtk" + url = "https://github.com/lh3/seqtk/archive/v1.1.tar.gz" + + version('1.2', '255ffe05bf2f073dc57abcff97f11a37') + version('1.1', 'ebf5cc57698a217150c2250494e039a2') + + depends_on('zlib') + + def install(self, spec, prefix): + make() + mkdirp(prefix.bin) + install('seqtk', prefix.bin) + set_executable(join_path(prefix.bin, 'seqtk')) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index 3b1d08889c..ebca74a3ab 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -24,28 +24,32 @@ ############################################################################## from spack import * + class Serf(Package): - """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library""" + """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') - depends_on('scons') + depends_on('scons', type='build') depends_on('expat') depends_on('openssl') + 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) options.append('OPENSSL=%s' % spec['openssl'].prefix) - options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix) - options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix) + options.append('LINKFLAGS=-L%s/lib -L%s/lib' % + (spec['expat'].prefix, spec['zlib'].prefix)) + options.append('CPPFLAGS=-I%s/include -I%s/include' % + (spec['expat'].prefix, spec['zlib'].prefix)) scons(*options) scons('install') diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 017a09977a..5113c88bdf 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -38,7 +38,8 @@ class Silo(Package): variant('fortran', default=True, description='Enable Fortran support') variant('shared', default=True, description='Build shared libraries') - variant('silex', default=False, description='Builds Silex, a GUI for viewing Silo files') + variant('silex', default=False, + description='Builds Silex, a GUI for viewing Silo files') depends_on('hdf5') depends_on('qt', when='+silex') @@ -55,8 +56,10 @@ class Silo(Package): configure( '--prefix=%s' % prefix, - '--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include, spec['hdf5'].prefix.lib), - '--with-zlib=%s,%s' % (spec['zlib'].prefix.include, spec['zlib'].prefix.lib), + '--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include, + spec['hdf5'].prefix.lib), + '--with-zlib=%s,%s' % (spec['zlib'].prefix.include, + spec['zlib'].prefix.lib), '--enable-install-lite-headers', *config_args) diff --git a/var/spack/repos/builtin/packages/slepc/install_name_371.patch b/var/spack/repos/builtin/packages/slepc/install_name_371.patch new file mode 100644 index 0000000000..d02ca88657 --- /dev/null +++ b/var/spack/repos/builtin/packages/slepc/install_name_371.patch @@ -0,0 +1,32 @@ +From 7489a3f3d569e2fbf5513ac9dcd769017d9f7eb7 Mon Sep 17 00:00:00 2001 +From: Lisandro Dalcin <dalcinl@gmail.com> +Date: Thu, 2 Jun 2016 21:57:38 +0300 +Subject: [PATCH] OS X: Fix library path in invocation of install_name_tool + +--- + config/install.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config/install.py b/config/install.py +index 09acd03..6ce98ae 100755 +--- a/config/install.py ++++ b/config/install.py +@@ -25,6 +25,7 @@ class Installer: + + def setupDirectories(self): + self.installDir = self.destDir ++ self.archDir = os.path.join(self.rootDir, self.arch) + self.rootIncludeDir = os.path.join(self.rootDir, 'include') + self.archIncludeDir = os.path.join(self.rootDir, self.arch, 'include') + self.rootConfDir = os.path.join(self.rootDir, 'lib','slepc','conf') +@@ -220,7 +221,7 @@ for dir in dirs: + if os.path.splitext(dst)[1] == '.dylib' and os.path.isfile('/usr/bin/install_name_tool'): + (result, output) = commands.getstatusoutput('otool -D '+src) + oldname = output[output.find("\n")+1:] +- installName = oldname.replace(self.destDir, self.installDir) ++ installName = oldname.replace(self.archDir, self.installDir) + (result, output) = commands.getstatusoutput('/usr/bin/install_name_tool -id ' + installName + ' ' + dst) + # preserve the original timestamps - so that the .a vs .so time order is preserved + shutil.copystat(src,dst) +-- +2.7.4.1.g5468f9e diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index c148a579ec..fd6c42d9fc 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -28,23 +28,30 @@ from spack import * class Slepc(Package): """ - Scalable Library for Eigenvalue Computations. + Scalable Library for Eigenvalue Problem Computations. """ 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') + + patch('install_name_371.patch', when='@3.7.1') def install(self, spec, prefix): # set SLEPC_DIR for installation - os.environ['SLEPC_DIR'] = self.stage.source_path + # Note that one should set the current (temporary) directory instead + # its symlink in spack/stage/ ! + os.environ['SLEPC_DIR'] = os.getcwd() options = [] @@ -64,9 +71,10 @@ class Slepc(Package): configure('--prefix=%s' % prefix, *options) make('MAKE_NP=%s' % make_jobs, parallel=False) - #FIXME: - # make('test') - make('install') + if self.run_tests: + make('test', parallel=False) + + make('install', parallel=False) def setup_dependent_environment(self, spack_env, run_env, dependent_spec): # set up SLEPC_DIR for everyone using SLEPc package diff --git a/var/spack/repos/builtin/packages/snappy/package.py b/var/spack/repos/builtin/packages/snappy/package.py index 836063f933..1e94980c92 100644 --- a/var/spack/repos/builtin/packages/snappy/package.py +++ b/var/spack/repos/builtin/packages/snappy/package.py @@ -22,9 +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 ############################################################################## -import os from spack import * + class Snappy(Package): """A fast compressor/decompressor: https://code.google.com/p/snappy""" diff --git a/var/spack/repos/builtin/packages/sparsehash/package.py b/var/spack/repos/builtin/packages/sparsehash/package.py index a72a5ce105..e5abd42ae6 100644 --- a/var/spack/repos/builtin/packages/sparsehash/package.py +++ b/var/spack/repos/builtin/packages/sparsehash/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Sparsehash(Package): """Sparse and dense hash-tables for C++ by Google""" homepage = "https://github.com/sparsehash/sparsehash" diff --git a/var/spack/repos/builtin/packages/spindle/package.py b/var/spack/repos/builtin/packages/spindle/package.py index bcdc7543a3..213d41e970 100644 --- a/var/spack/repos/builtin/packages/spindle/package.py +++ b/var/spack/repos/builtin/packages/spindle/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Spindle(Package): """Spindle improves the library-loading performance of dynamically linked HPC applications. Without Spindle large MPI jobs can diff --git a/var/spack/repos/builtin/packages/spot/package.py b/var/spack/repos/builtin/packages/spot/package.py index 59535dcc4c..096aa24c02 100644 --- a/var/spack/repos/builtin/packages/spot/package.py +++ b/var/spack/repos/builtin/packages/spot/package.py @@ -23,16 +23,17 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class Spot(Package): - """Spot is a C++11 library for omega-automata manipulation and model checking.""" + """Spot is a C++11 library for omega-automata manipulation and model + checking.""" homepage = "https://spot.lrde.epita.fr/index.html" url = "http://www.lrde.epita.fr/dload/spot/spot-1.99.3.tar.gz" version('1.99.3', 'd53adcb2d0fe7c69f45d4e595a58254e') - #depends_on("gcc@4.8:") + # depends_on("gcc@4.8:", type='build') depends_on("python@3.2:") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py index 5e7ae4fb8b..513f8ec6d4 100644 --- a/var/spack/repos/builtin/packages/sqlite/package.py +++ b/var/spack/repos/builtin/packages/sqlite/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Sqlite(Package): """SQLite3 is an SQL database engine in a C library. Programs that link the SQLite3 library can have SQL database access without diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py index 80d27e149f..ec2fae5e9b 100644 --- a/var/spack/repos/builtin/packages/stat/package.py +++ b/var/spack/repos/builtin/packages/stat/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Stat(Package): """Library to create, manipulate, and export graphs Graphlib.""" homepage = "http://paradyn.org/STAT/STAT.html" @@ -39,7 +40,7 @@ class Stat(Package): depends_on('libdwarf') depends_on('dyninst') depends_on('graphlib') - depends_on('graphviz') + depends_on('graphviz', type=alldeps) depends_on('launchmon') depends_on('mrnet') @@ -49,13 +50,14 @@ class Stat(Package): configure_args = [ "--enable-gui", "--prefix=%s" % prefix, - "--disable-examples", # Examples require MPI: avoid this dependency. + # Examples require MPI: avoid this dependency. + "--disable-examples", "--with-launchmon=%s" % spec['launchmon'].prefix, "--with-mrnet=%s" % spec['mrnet'].prefix, "--with-graphlib=%s" % spec['graphlib'].prefix, "--with-stackwalker=%s" % spec['dyninst'].prefix, "--with-libdwarf=%s" % spec['libdwarf'].prefix - ] + ] if '+dysect' in spec: configure_args.append('--enable-dysectapi') configure(*configure_args) diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 68ee397857..26d143e4aa 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -#import os + class Subversion(Package): """Apache Subversion - an open source version control system.""" @@ -41,39 +41,40 @@ class Subversion(Package): # Optional: We need swig if we want the Perl, Python or Ruby # bindings. - #depends_on('swig') - #depends_on('python') - #depends_on('perl') - #depends_on('ruby') + # depends_on('swig') + # depends_on('python') + # depends_on('perl') + # depends_on('ruby') def install(self, spec, prefix): # configure, build, install: - # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html + # Ref: + # http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html options = ['--prefix=%s' % prefix] options.append('--with-apr=%s' % spec['apr'].prefix) options.append('--with-apr-util=%s' % spec['apr-util'].prefix) options.append('--with-zlib=%s' % spec['zlib'].prefix) options.append('--with-sqlite=%s' % spec['sqlite'].prefix) options.append('--with-serf=%s' % spec['serf'].prefix) - #options.append('--with-swig=%s' % spec['swig'].prefix) + # options.append('--with-swig=%s' % spec['swig'].prefix) configure(*options) make() make('install') # python bindings - #make('swig-py', + # make('swig-py', # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', # 'swig_pydir_extra=/usr/lib/python2.7/site-packages/svn') - #make('install-swig-py', + # make('install-swig-py', # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', # 'swig_pydir_extra=/usr/lib/python2.7/site-packages/svn') # perl bindings - #make('swig-pl') - #make('install-swig-pl') + # make('swig-pl') + # make('install-swig-pl') # ruby bindings - #make('swig-rb') - #make('isntall-swig-rb') + # make('swig-rb') + # make('isntall-swig-rb') diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index dd0dfa3e23..a71bfd8bd4 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -32,56 +32,64 @@ class SuiteSparse(Package): homepage = 'http://faculty.cse.tamu.edu/davis/suitesparse.html' url = 'http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.1.tar.gz' + version('4.5.3', '8ec57324585df3c6483ad7f556afccbd') version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319') - # FIXME: (see below) - # variant('tbb', default=True, description='Build with Intel TBB') + variant('tbb', default=True, description='Build with Intel TBB') depends_on('blas') depends_on('lapack') - depends_on('metis@5.1.0', when='@4.5.1') - # FIXME: - # in @4.5.1. TBB support in SPQR seems to be broken as TBB-related linkng flags - # does not seem to be used, which leads to linking errors on Linux. - # Try re-enabling in future versions. - # depends_on('tbb', when='+tbb') + depends_on('metis@5.1.0', when='@4.5.1:') + # in @4.5.1. TBB support in SPQR seems to be broken as TBB-related linkng + # flags does not seem to be used, which leads to linking errors on Linux. + depends_on('tbb', when='@4.5.3:+tbb') + + patch('tbb_453.patch', when='@4.5.3') def install(self, spec, prefix): - # The build system of SuiteSparse is quite old-fashioned - # It's basically a plain Makefile which include an header (SuiteSparse_config/SuiteSparse_config.mk) - # with a lot of convoluted logic in it. - # Any kind of customization will need to go through filtering of that file + # The build system of SuiteSparse is quite old-fashioned. + # It's basically a plain Makefile which include an header + # (SuiteSparse_config/SuiteSparse_config.mk)with a lot of convoluted + # logic in it. Any kind of customization will need to go through + # filtering of that file make_args = ['INSTALL=%s' % prefix] # inject Spack compiler wrappers make_args.extend([ - 'AUTOCC=no', - 'CC=cc', - 'CXX=c++', - 'F77=f77', + 'AUTOCC=no', + 'CC=cc', + 'CXX=c++', + 'F77=f77', ]) # use Spack's metis in CHOLMOD/Partition module, # otherwise internal Metis will be compiled make_args.extend([ - 'MY_METIS_LIB=-L%s -lmetis' % spec['metis'].prefix.lib, - 'MY_METIS_INC=%s' % spec['metis'].prefix.include, + 'MY_METIS_LIB=-L%s -lmetis' % spec['metis'].prefix.lib, + 'MY_METIS_INC=%s' % spec['metis'].prefix.include, ]) # Intel TBB in SuiteSparseQR - if '+tbb' in spec: + if 'tbb' in spec: make_args.extend([ 'SPQR_CONFIG=-DHAVE_TBB', 'TBB=-L%s -ltbb' % spec['tbb'].prefix.lib, ]) - # BLAS arguments require path to libraries - # FIXME : (blas / lapack always provide libblas and liblapack as aliases) + # Make sure Spack's Blas/Lapack is used. Otherwise System's + # Blas/Lapack might be picked up. + blas = to_link_flags(spec['blas'].blas_shared_lib) + lapack = to_link_flags(spec['lapack'].lapack_shared_lib) + if '@4.5.1' in spec: + # adding -lstdc++ is clearly an ugly way to do this, but it follows + # with the TCOV path of SparseSuite 4.5.1's Suitesparse_config.mk + blas += ' -lstdc++' + make_args.extend([ - 'BLAS=-lblas', - 'LAPACK=-llapack' + 'BLAS=%s' % blas, + 'LAPACK=%s' % lapack ]) make('install', *make_args) diff --git a/var/spack/repos/builtin/packages/suite-sparse/tbb_453.patch b/var/spack/repos/builtin/packages/suite-sparse/tbb_453.patch new file mode 100644 index 0000000000..70241ed017 --- /dev/null +++ b/var/spack/repos/builtin/packages/suite-sparse/tbb_453.patch @@ -0,0 +1,13 @@ +diff --git a/SPQR/Lib/Makefile b/SPQR/Lib/Makefile +index eaade58..d0de852 100644 +--- a/SPQR/Lib/Makefile ++++ b/SPQR/Lib/Makefile +@@ -13,7 +13,7 @@ ccode: all + include ../../SuiteSparse_config/SuiteSparse_config.mk + + # SPQR depends on CHOLMOD, AMD, COLAMD, LAPACK, the BLAS and SuiteSparse_config +-LDLIBS += -lamd -lcolamd -lcholmod -lsuitesparseconfig $(LAPACK) $(BLAS) ++LDLIBS += -lamd -lcolamd -lcholmod -lsuitesparseconfig $(TBB) $(LAPACK) $(BLAS) + + # compile and install in SuiteSparse/lib + library: diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index ba2340f74c..7582954ab1 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -23,17 +23,156 @@ # 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('cmake', type='build') + 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..4b3354e379 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 '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..e849273e08 --- /dev/null +++ b/var/spack/repos/builtin/packages/superlu-mt/package.py @@ -0,0 +1,136 @@ +############################################################################## +# 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..636aa26bd2 --- /dev/null +++ b/var/spack/repos/builtin/packages/swiftsim/package.py @@ -0,0 +1,80 @@ +############################################################################## +# 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', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') + # 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', + '--with-metis={0}'.format(spec['metis'].prefix), + '--enable-optimization'] + configure(*options) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index f552621821..b43246dcee 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -22,9 +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 * + class Swig(Package): """SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby, @@ -38,6 +38,7 @@ class Swig(Package): homepage = "http://www.swig.org" url = "http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz" + version('3.0.10', 'bb4ab8047159469add7d00910e203124') version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') diff --git a/var/spack/repos/builtin/packages/szip/package.py b/var/spack/repos/builtin/packages/szip/package.py index fd3a2a209d..b2ca6f3995 100644 --- a/var/spack/repos/builtin/packages/szip/package.py +++ b/var/spack/repos/builtin/packages/szip/package.py @@ -24,10 +24,13 @@ ############################################################################## from spack import * + class Szip(Package): - """Szip is an implementation of the extended-Rice lossless compression algorithm. - It provides lossless compression of scientific data, and is provided with HDF - software products.""" + """An implementation of the extended-Rice lossless compression algorithm. + It provides lossless compression of scientific data, and is provided + with HDF software products. + + """ homepage = "https://www.hdfgroup.org/doc_resource/SZIP/" url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/tar/gnutar-configure-xattrs.patch b/var/spack/repos/builtin/packages/tar/gnutar-configure-xattrs.patch new file mode 100644 index 0000000000..e5c183b720 --- /dev/null +++ b/var/spack/repos/builtin/packages/tar/gnutar-configure-xattrs.patch @@ -0,0 +1,482 @@ +diff --git a/Makefile.in b/Makefile.in +index f9f1d1d..b403e46 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +@@ -1583,9 +1583,10 @@ distcheck: dist + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ +- && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ ++ --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ +diff --git a/aclocal.m4 b/aclocal.m4 +index 0e09589..804c0b3 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.14 -*- Autoconf -*- ++# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + + # Copyright (C) 1996-2013 Free Software Foundation, Inc. + +@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], + [am__api_version='1.14' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.14], [], ++m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.14])dnl ++[AM_AUTOMAKE_VERSION([1.14.1])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +diff --git a/config.h.in b/config.h.in +index 6646ea5..8571ef4 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -617,7 +617,7 @@ + */ + #undef HAVE_ALLOCA_H + +-/* define to 1 if we have <attr/xattr.h> header */ ++/* Define to 1 if you have the <attr/xattr.h> header file. */ + #undef HAVE_ATTR_XATTR_H + + /* Define to 1 if you have the <bp-sym.h> header file. */ +@@ -924,21 +924,12 @@ + /* Define to 1 if you have the <features.h> header file. */ + #undef HAVE_FEATURES_H + +-/* Define to 1 if you have the `fgetxattr' function. */ +-#undef HAVE_FGETXATTR +- +-/* Define to 1 if you have the `flistxattr' function. */ +-#undef HAVE_FLISTXATTR +- + /* Define to 1 if you have the `flockfile' function. */ + #undef HAVE_FLOCKFILE + + /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ + #undef HAVE_FSEEKO + +-/* Define to 1 if you have the `fsetxattr' function. */ +-#undef HAVE_FSETXATTR +- + /* Define to 1 if you have the `fstatat' function. */ + #undef HAVE_FSTATAT + +@@ -990,9 +981,6 @@ + /* Define to 1 if you have the `gettimeofday' function. */ + #undef HAVE_GETTIMEOFDAY + +-/* Define to 1 if you have the `getxattr' function. */ +-#undef HAVE_GETXATTR +- + /* Define to 1 if you have the `grantpt' function. */ + #undef HAVE_GRANTPT + +@@ -1045,12 +1033,6 @@ + /* Define to 1 if you have the `lchown' function. */ + #undef HAVE_LCHOWN + +-/* Define to 1 if you have the `lgetxattr' function. */ +-#undef HAVE_LGETXATTR +- +-/* Define to 1 if you have the `attr' library (-lattr). */ +-#undef HAVE_LIBATTR +- + /* Define to 1 if you have the <libgen.h> header file. */ + #undef HAVE_LIBGEN_H + +@@ -1069,12 +1051,6 @@ + /* Define to 1 if you have the <linux/fd.h> header file. */ + #undef HAVE_LINUX_FD_H + +-/* Define to 1 if you have the `listxattr' function. */ +-#undef HAVE_LISTXATTR +- +-/* Define to 1 if you have the `llistxattr' function. */ +-#undef HAVE_LLISTXATTR +- + /* Define to 1 if you have the <locale.h> header file. */ + #undef HAVE_LOCALE_H + +@@ -1087,9 +1063,6 @@ + /* Define to 1 if the system has the type 'long long int'. */ + #undef HAVE_LONG_LONG_INT + +-/* Define to 1 if you have the `lsetxattr' function. */ +-#undef HAVE_LSETXATTR +- + /* Define to 1 if you have the `lstat' function. */ + #undef HAVE_LSTAT + +@@ -1867,9 +1840,6 @@ + /* Define to 1 if you have the `setlocale' function. */ + #undef HAVE_SETLOCALE + +-/* Define to 1 if you have the `setxattr' function. */ +-#undef HAVE_SETXATTR +- + /* Define to 1 if you have the <sgtty.h> header file. */ + #undef HAVE_SGTTY_H + +@@ -2074,7 +2044,7 @@ + /* Define to 1 if you have the <sys/wait.h> header file. */ + #undef HAVE_SYS_WAIT_H + +-/* define to 1 if we have <sys/xattr.h> header */ ++/* Define to 1 if you have the <sys/xattr.h> header file. */ + #undef HAVE_SYS_XATTR_H + + /* Define if struct tm has the tm_gmtoff member. */ +diff --git a/configure b/configure +index cfdd721..8cf6e91 100755 +--- a/configure ++++ b/configure +@@ -663,8 +663,6 @@ RSH + LIBOBJS + TAR_COND_GRANTPT_FALSE + TAR_COND_GRANTPT_TRUE +-TAR_LIB_ATTR_FALSE +-TAR_LIB_ATTR_TRUE + TAR_COND_XATTR_H_FALSE + TAR_COND_XATTR_H_TRUE + GNULIB_TEST_WARN_CFLAGS +@@ -34994,41 +34992,6 @@ else + TAR_COND_XATTR_H_FALSE= + fi + +- if false; then +- TAR_LIB_ATTR_TRUE= +- TAR_LIB_ATTR_FALSE='#' +-else +- TAR_LIB_ATTR_TRUE='#' +- TAR_LIB_ATTR_FALSE= +-fi +- +- if test "$ac_cv_header_sys_xattr_h" = yes; then +- for ac_func in getxattr fgetxattr lgetxattr \ +- setxattr fsetxattr lsetxattr \ +- listxattr flistxattr llistxattr +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- # only when functions are present +- +-$as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h +- +- if test "$with_xattrs" != no; then +- +-$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h +- +- fi +- +-fi +-done +- +- fi +- +- # If <sys/xattr.h> is not found, then check for <attr/xattr.h> + if test "$ac_cv_header_sys_xattr_h" != yes; then + for ac_header in attr/xattr.h + do : +@@ -35050,13 +35013,20 @@ else + TAR_COND_XATTR_H_FALSE= + fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5 +-$as_echo_n "checking for fgetxattr in -lattr... " >&6; } +-if ${ac_cv_lib_attr_fgetxattr+:} false; then : ++ fi ++ ++ if test "$with_xattrs" != no; then ++ for i in getxattr fgetxattr lgetxattr \ ++ setxattr fsetxattr lsetxattr \ ++ listxattr flistxattr llistxattr ++ do ++ as_ac_Search=`$as_echo "ac_cv_search_$i" | $as_tr_sh` ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $i" >&5 ++$as_echo_n "checking for library containing $i... " >&6; } ++if eval \${$as_ac_Search+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lattr $LIBS" ++ ac_func_search_save_LIBS=$LIBS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -35066,67 +35036,56 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char fgetxattr (); ++char $i (); + int + main () + { +-return fgetxattr (); ++return $i (); + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_attr_fgetxattr=yes +-else +- ac_cv_lib_attr_fgetxattr=no ++for ac_lib in '' attr; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ eval "$as_ac_Search=\$ac_res" + fi + rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5 +-$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; } +-if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBATTR 1 +-_ACEOF +- +- LIBS="-lattr $LIBS" +- ++ conftest$ac_exeext ++ if eval \${$as_ac_Search+:} false; then : ++ break + fi ++done ++if eval \${$as_ac_Search+:} false; then : + +- if test "$ac_cv_lib_attr_fgetxattr" = yes; then +- TAR_LIB_ATTR_TRUE= +- TAR_LIB_ATTR_FALSE='#' + else +- TAR_LIB_ATTR_TRUE='#' +- TAR_LIB_ATTR_FALSE= ++ eval "$as_ac_Search=no" ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS + fi ++eval ac_res=\$$as_ac_Search ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++eval ac_res=\$$as_ac_Search ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +- if test "$ac_cv_header_attr_xattr_h" = yes; then +- for ac_func in getxattr fgetxattr lgetxattr \ +- setxattr fsetxattr lsetxattr \ +- listxattr flistxattr llistxattr +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- # only when functions are present ++fi + +-$as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h ++ eval found=\$ac_cv_search_$i ++ test "$found" = "no" && break ++ done + +- if test "$with_xattrs" != no; then ++ if test "$found" != no; then + + $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h + +- fi +- +-fi +-done +- + fi + fi + +@@ -38187,18 +38146,10 @@ if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; th + as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi +-if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then +- as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined. +-Usually this means the macro was only invoked conditionally." "$LINENO" 5 +-fi + if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then + as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi +-if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then +- as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined. +-Usually this means the macro was only invoked conditionally." "$LINENO" 5 +-fi + if test -z "${TAR_COND_GRANTPT_TRUE}" && test -z "${TAR_COND_GRANTPT_FALSE}"; then + as_fn_error $? "conditional \"TAR_COND_GRANTPT\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/doc/Makefile.in b/doc/Makefile.in +index ca44f1a..42a06b3 100644 +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +diff --git a/gnu/Makefile.in b/gnu/Makefile.in +index 03eed58..d908a03 100644 +--- a/gnu/Makefile.in ++++ b/gnu/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +diff --git a/lib/Makefile.in b/lib/Makefile.in +index 41a9aca..1254b8f 100644 +--- a/lib/Makefile.in ++++ b/lib/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +diff --git a/rmt/Makefile.in b/rmt/Makefile.in +index c3f2509..0f3dca4 100644 +--- a/rmt/Makefile.in ++++ b/rmt/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +diff --git a/scripts/Makefile.in b/scripts/Makefile.in +index 57c0d0d..bf344ed 100644 +--- a/scripts/Makefile.in ++++ b/scripts/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +diff --git a/src/Makefile.in b/src/Makefile.in +index 6f9a592..fc6fc87 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +@@ -99,7 +99,6 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + bin_PROGRAMS = tar$(EXEEXT) +-@TAR_LIB_ATTR_TRUE@am__append_1 = -lattr + subdir = src + DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp $(noinst_HEADERS) +@@ -254,7 +253,7 @@ am__DEPENDENCIES_2 = ../lib/libtar.a ../gnu/libgnu.a \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + tar_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ++ $(am__DEPENDENCIES_1) + AM_V_P = $(am__v_P_@AM_V@) + am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) + am__v_P_0 = false +@@ -1225,8 +1224,7 @@ tar_SOURCES = \ + AM_CPPFLAGS = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib + AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) + LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV) +-tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) \ +- $(LIB_SELINUX) $(am__append_1) ++tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) + all: all-am + + .SUFFIXES: +diff --git a/tests/Makefile.in b/tests/Makefile.in +index 6807509..50d7689 100644 +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +diff --git a/lib/xattr-at.c b/lib/xattr-at.c +index 443ccae..009bde5 100644 +--- a/lib/xattr-at.c ++++ b/lib/xattr-at.c +@@ -18,6 +18,11 @@ + + #include <config.h> + ++/* Temporarily don't build. We are unable to build on (probably not only) ++ darwin due to lack of l*xattr callbacks (XATTR_NOFOLLOW is alternative) and ++ different function definitions. */ ++#ifdef HAVE_XATTRS ++ + #include "xattr-at.h" + #include "openat.h" + +@@ -108,3 +113,5 @@ + #undef AT_FUNC_RESULT + #undef AT_FUNC_POST_FILE_PARAM_DECLS + #undef AT_FUNC_POST_FILE_ARGS ++ ++#endif +diff --git a/src/Makefile.am b/src/Makefile.am +index 82b2d46..42daaef 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,7 +52,3 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) + LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV) + + tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) +- +-if TAR_LIB_ATTR +-tar_LDADD += -lattr +-endif +-- +1.9.3
\ No newline at end of file diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py index c55b5165bf..f5995cb007 100644 --- a/var/spack/repos/builtin/packages/tar/package.py +++ b/var/spack/repos/builtin/packages/tar/package.py @@ -24,13 +24,21 @@ ############################################################################## from spack import * + class Tar(Package): - """GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation.""" + """GNU Tar provides the ability to create tar archives, as well as various + other kinds of manipulation.""" homepage = "https://www.gnu.org/software/tar/" - url = "http://ftp.gnu.org/gnu/tar/tar-1.28.tar.gz" + url = "https://ftp.gnu.org/gnu/tar/tar-1.28.tar.gz" + version('1.29', 'cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0') version('1.28', '6ea3dbea1f2b0409b234048e021a9fd7') + # see http://lists.gnu.org/archive/html/bug-tar/2014-08/msg00001.html and + # https://github.com/Homebrew/homebrew-core/commit/aef9a1792de4648d0322b4b04d32287532f046bb + # TODO: when=sys.platform=='darwin' ? + patch('gnutar-configure-xattrs.patch', when='@1.28') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py index dc52c4f9f6..785023fd03 100644 --- a/var/spack/repos/builtin/packages/task/package.py +++ b/var/spack/repos/builtin/packages/task/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Task(Package): """Feature-rich console based todo list manager""" homepage = "http://www.taskwarrior.org" @@ -31,6 +32,7 @@ class Task(Package): version('2.4.4', '517450c4a23a5842df3e9905b38801b3') + depends_on('cmake', type='build') depends_on("gnutls") depends_on("libuuid") # depends_on("gcc@4.8:") diff --git a/var/spack/repos/builtin/packages/taskd/package.py b/var/spack/repos/builtin/packages/taskd/package.py index 8a022b4fe9..d13f480374 100644 --- a/var/spack/repos/builtin/packages/taskd/package.py +++ b/var/spack/repos/builtin/packages/taskd/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Taskd(Package): """TaskWarrior task synchronization daemon""" # FIXME: add a proper url for your package's homepage here. @@ -32,6 +33,7 @@ class Taskd(Package): version('1.1.0', 'ac855828c16f199bdbc45fbc227388d0') + depends_on('cmake', type='build') depends_on("libuuid") depends_on("gnutls") diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index 3b181f3fa4..a77df8d37c 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -30,6 +30,7 @@ import os.path from llnl.util.filesystem import join_path + class Tau(Package): """ A portable profiling and tracing toolkit for performance @@ -45,15 +46,20 @@ class Tau(Package): version('2.23.1', '6593b47ae1e7a838e632652f0426fe72') # TODO : shmem variant missing - variant('download', default=False, description='Downloads and builds various dependencies') + variant('download', default=False, + description='Downloads and builds various dependencies') variant('scorep', default=False, description='Activates SCOREP support') variant('openmp', default=True, description='Use OpenMP threads') - variant('mpi', default=True, description='Specify use of TAU MPI wrapper library') + variant('mpi', default=True, + description='Specify use of TAU MPI wrapper library') variant('phase', default=True, description='Generate phase based profiles') - variant('comm', default=True, description=' Generate profiles with MPI communicator info') + variant('comm', default=True, + description=' Generate profiles with MPI communicator info') - # TODO : Try to build direct OTF2 support? Some parts of the OTF support library in TAU are non-conformant, - # TODO : and fail at compile-time. Further, SCOREP is compiled with OTF2 support. + # TODO : Try to build direct OTF2 support? Some parts of the OTF support + # TODO : library in TAU are non-conformant, + # TODO : and fail at compile-time. Further, SCOREP is compiled with OTF2 + # support. depends_on('pdt') # Required for TAU instrumentation depends_on('scorep', when='+scorep') depends_on('binutils', when='~download') @@ -65,13 +71,17 @@ class Tau(Package): ########## # Selecting a compiler with TAU configure is quite tricky: - # 1 - compilers are mapped to a given set of strings (and spack cc, cxx, etc. wrappers are not among them) + # 1 - compilers are mapped to a given set of strings + # (and spack cc, cxx, etc. wrappers are not among them) # 2 - absolute paths are not allowed - # 3 - the usual environment variables seems not to be checked ('CC', 'CXX' and 'FC') - # 4 - if no -cc=<compiler> -cxx=<compiler> is passed tau is built with system compiler silently + # 3 - the usual environment variables seems not to be checked + # ('CC', 'CXX' and 'FC') + # 4 - if no -cc=<compiler> -cxx=<compiler> is passed tau is built with + # system compiler silently # (regardless of what %<compiler> is used in the spec) # - # In the following we give TAU what he expects and put compilers into PATH + # In the following we give TAU what he expects and put compilers into + # PATH compiler_path = os.path.dirname(self.compiler.cc) os.environ['PATH'] = ':'.join([compiler_path, os.environ['PATH']]) compiler_options = ['-c++=%s' % self.compiler.cxx_names[0], @@ -80,7 +90,8 @@ class Tau(Package): compiler_options.append('-fortran=%s' % self.compiler.fc_names[0]) ########## - # Construct the string of custom compiler flags and append it to compiler related options + # Construct the string of custom compiler flags and append it to + # compiler related options useropt = ' '.join(useropt) useropt = "-useropt=%s" % useropt compiler_options.append(useropt) @@ -92,8 +103,9 @@ class Tau(Package): change_sed_delimiter('@', ';', 'utils/FixMakefile') change_sed_delimiter('@', ';', 'utils/FixMakefile.sed.default') - # TAU configure, despite the name , seems to be a manually written script (nothing related to autotools). - # As such it has a few #peculiarities# that make this build quite hackish. + # TAU configure, despite the name , seems to be a manually + # written script (nothing related to autotools). As such it has + # a few #peculiarities# that make this build quite hackish. options = ["-prefix=%s" % prefix, "-iowrapper", "-pdt=%s" % spec['pdt'].prefix] diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py index c88b170816..d13579b44d 100644 --- a/var/spack/repos/builtin/packages/tbb/package.py +++ b/var/spack/repos/builtin/packages/tbb/package.py @@ -35,8 +35,10 @@ class Tbb(Package): homepage = "http://www.threadingbuildingblocks.org/" # Only version-specific URL's work for TBB - version('4.4.4', 'd4cee5e4ca75cab5181834877738619c56afeb71', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160413oss_src.tgz') # NOQA: ignore=E501 - version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz') # NOQA: ignore=E501 + version('4.4.4', 'd4cee5e4ca75cab5181834877738619c56afeb71', + url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160413oss_src.tgz') + version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', + url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz') def coerce_to_spack(self, tbb_build_subdir): for compiler in ["icc", "gcc", "clang"]: diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index a4d8b515bb..16d896acc6 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Tcl(Package): """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, suitable for a very wide @@ -34,9 +35,6 @@ class Tcl(Package): extensible.""" homepage = "http://www.tcl.tk" - def url_for_version(self, version): - return 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' % version - version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326') version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304') version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f') @@ -44,8 +42,20 @@ class Tcl(Package): depends_on('zlib') + def url_for_version(self, version): + base_url = 'http://prdownloads.sourceforge.net/tcl' + return '{0}/tcl{1}-src.tar.gz'.format(base_url, version) + + def setup_environment(self, spack_env, env): + # When using Tkinter from within spack provided python+tk, python + # will not be able to find Tcl/Tk unless TCL_LIBRARY is set. + env.set('TCL_LIBRARY', join_path(self.prefix.lib, 'tcl{0}'.format( + self.spec.version.up_to(2)))) + def install(self, spec, prefix): with working_dir('unix'): - configure("--prefix=%s" % prefix) + configure("--prefix={0}".format(prefix)) make() make("install") + with working_dir(prefix.bin): + symlink('tclsh{0}'.format(self.version.up_to(2)), 'tclsh') diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py index c301a5b4e5..7ac55a6785 100644 --- a/var/spack/repos/builtin/packages/tetgen/package.py +++ b/var/spack/repos/builtin/packages/tetgen/package.py @@ -36,11 +36,10 @@ class Tetgen(Package): url = "http://www.tetgen.org/files/tetgen1.4.3.tar.gz" version('1.4.3', 'd6a4bcdde2ac804f7ec66c29dcb63c18') - version('1.5.0', '3b9fd9cdec121e52527b0308f7aad5c1', url='http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz') + version('1.5.0', '3b9fd9cdec121e52527b0308f7aad5c1', + url='http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz') - # TODO: Make this a build dependency once build dependencies are supported - # (see: https://github.com/LLNL/spack/pull/378). - depends_on('cmake@2.8.7:', when='@1.5.0:') + depends_on('cmake@2.8.7:', when='@1.5.0:', type='build') def install(self, spec, prefix): make('tetgen', 'tetlib') diff --git a/var/spack/repos/builtin/packages/texinfo/package.py b/var/spack/repos/builtin/packages/texinfo/package.py index 5c6fef0db6..ddb23e5d6f 100644 --- a/var/spack/repos/builtin/packages/texinfo/package.py +++ b/var/spack/repos/builtin/packages/texinfo/package.py @@ -27,10 +27,13 @@ from spack import * class Texinfo(Package): - """ - Texinfo is the official documentation format of the GNU project. It was invented by Richard Stallman and Bob - Chassell many years ago, loosely based on Brian Reid's Scribe and other formatting languages of the time. It is - used by many non-GNU projects as well.FIXME: put a proper description of your package here. + """Texinfo is the official documentation format of the GNU project. + + It was invented by Richard Stallman and Bob Chassell many years ago, + loosely based on Brian Reid's Scribe and other formatting languages + of the time. It is used by many non-GNU projects as well.FIXME: put a + proper description of your package here. + """ homepage = "https://www.gnu.org/software/texinfo/" url = "http://ftp.gnu.org/gnu/texinfo/texinfo-6.0.tar.gz" diff --git a/var/spack/repos/builtin/packages/texlive/package.py b/var/spack/repos/builtin/packages/texlive/package.py new file mode 100644 index 0000000000..9b947787d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/texlive/package.py @@ -0,0 +1,58 @@ +############################################################################## +# 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 Texlive(Package): + """TeX Live is a free software distribution for the TeX typesetting + system""" + + homepage = "http://www.tug.org/texlive" + + version('live', 'e671eea7f142c438959493cc42a2a59b', + url="http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz") + + # There does not seem to be a complete list of schemes. + # Examples include: + # full scheme (everything) + # medium scheme (small + more packages and languages) + # small scheme (basic + xetex, metapost, a few languages) + # basic scheme (plain and latex) + # minimal scheme (plain only) + # See: + # https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-25025r6 + variant('scheme', default="small", + description='Package subset to install (e.g. full, small, basic)') + + depends_on('perl', type='build') + + def install(self, spec, prefix): + env = os.environ + env['TEXLIVE_INSTALL_PREFIX'] = prefix + perl = which('perl') + scheme = spec.variants['scheme'].value + perl('./install-tl', '-scheme', scheme, + '-portable', '-profile', '/dev/null') diff --git a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py index 9c9a66cdef..0d2c2918c4 100644 --- a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py @@ -12,7 +12,7 @@ class ThePlatinumSearcher(Package): version('head', go=package) - extends("go") + extends("go", deptypes='build') def install(self, spec, prefix): env = os.environ diff --git a/var/spack/repos/builtin/packages/the_silver_searcher/package.py b/var/spack/repos/builtin/packages/the_silver_searcher/package.py index e289b6d783..c98e964efa 100644 --- a/var/spack/repos/builtin/packages/the_silver_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py @@ -24,16 +24,18 @@ ############################################################################## from spack import * + class TheSilverSearcher(Package): """Fast recursive grep alternative""" homepage = "http://geoff.greer.fm/ag/" - url = "http://geoff.greer.fm/ag/releases/the_silver_searcher-0.30.0.tar.gz" + url = "http://geoff.greer.fm/ag/releases/the_silver_searcher-0.32.0.tar.gz" + version('0.32.0', '3fdfd5836924246073d5344257a06823') version('0.30.0', '95e2e7859fab1156c835aff7413481db') depends_on('pcre') depends_on('xz') - depends_on('pkg-config') + depends_on('pkg-config', type='build') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py index 6d834c6321..755f7a80b9 100644 --- a/var/spack/repos/builtin/packages/thrift/package.py +++ b/var/spack/repos/builtin/packages/thrift/package.py @@ -24,12 +24,16 @@ ############################################################################## from spack import * + class Thrift(Package): - """The Apache Thrift software framework, for scalable cross-language services - development, combines a software stack with a code generation engine to build - services that work efficiently and seamlessly between C++, Java, Python, PHP, - Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml - and Delphi and other languages.""" + """Software framework for scalable cross-language services development. + + Thrift combines a software stack with a code generation engine to + build services that work efficiently and seamlessly between C++, + Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, + JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages. + + """ homepage = "http://thrift.apache.org" url = "http://apache.mirrors.ionfish.org/thrift/0.9.2/thrift-0.9.2.tar.gz" @@ -37,16 +41,18 @@ class Thrift(Package): version('0.9.2', '89f63cc4d0100912f4a1f8a9dee63678') # Currently only support for c-family and python - variant('c', default=True, description="Build support for C-family languages") - variant('python', default=True, description="Build support for python") + variant('c', default=True, + description="Build support for C-family languages") + variant('python', default=True, + description="Build support for python") depends_on('jdk') - depends_on('autoconf') - depends_on('automake') - depends_on('libtool') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') depends_on('boost@1.53:') - depends_on('bison') - depends_on('flex') + depends_on('bison', type='build') + depends_on('flex', type='build') depends_on('openssl') # Variant dependencies @@ -66,7 +72,8 @@ class Thrift(Package): options.append('--enable-tests=no') options.append('--with-c=%s' % ('yes' if '+c' in spec else 'no')) - options.append('--with-python=%s' % ('yes' if '+python' in spec else 'no')) + options.append('--with-python=%s' % + ('yes' if '+python' in spec else 'no')) options.append('--with-java=%s' % ('yes' if '+java' in spec else 'no')) options.append('--with-go=%s' % ('yes' if '+go' in spec else 'no')) options.append('--with-lua=%s' % ('yes' if '+lua' in spec else 'no')) diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 330e1c77f5..894d3af6cc 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Tk(Package): """Tk is a graphical user interface toolkit that takes developing desktop applications to a higher level than conventional @@ -33,16 +34,24 @@ class Tk(Package): and more.""" homepage = "http://www.tcl.tk" - def url_for_version(self, version): - return "http://prdownloads.sourceforge.net/tcl/tk%s-src.tar.gz" % version - + version('8.6.5', '11dbbd425c3e0201f20d6a51482ce6c4') version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221') depends_on("tcl") + def url_for_version(self, version): + base_url = "http://prdownloads.sourceforge.net/tcl" + return "{0}/tk{1}-src.tar.gz".format(base_url, version) + + def setup_environment(self, spack_env, env): + # When using Tkinter from within spack provided python+tk, python + # will not be able to find Tcl/Tk unless TK_LIBRARY is set. + env.set('TK_LIBRARY', join_path(self.prefix.lib, 'tk{0}'.format( + self.spec.version.up_to(2)))) + def install(self, spec, prefix): with working_dir('unix'): - configure("--prefix=%s" % prefix, - "--with-tcl=%s" % spec['tcl'].prefix.lib) + configure("--prefix={0}".format(prefix), + "--with-tcl={0}".format(spec['tcl'].prefix.lib)) make() make("install") diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py index c46425c0d3..573ee38a79 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -24,26 +24,33 @@ ############################################################################## from spack import * + class Tmux(Package): """tmux is a terminal multiplexer. What is a terminal multiplexer? It lets - you switch easily between several programs in one terminal, detach them (they - keep running in the background) and reattach them to a different terminal. And - do a lot more. + you switch easily between several programs in one terminal, detach them + (they keep running in the background) and reattach them to a different + terminal. And do a lot more. """ homepage = "http://tmux.github.io" - url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz" + url = "https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz" version('1.9a', 'b07601711f96f1d260b390513b509a2d') version('2.1', '74a2855695bccb51b6e301383ad4818c') + version('2.2', 'bd95ee7205e489c62c616bb7af040099') depends_on('libevent') depends_on('ncurses') def install(self, spec, prefix): + pkg_config_path = ':'.join([ + spec['libevent'].prefix, + spec['ncurses'].prefix + ]) + configure( "--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix)) + "PKG_CONFIG_PATH=%s" % pkg_config_path) make() make("install") diff --git a/var/spack/repos/builtin/packages/tmuxinator/package.py b/var/spack/repos/builtin/packages/tmuxinator/package.py index b9c92ea4db..66da4006f2 100644 --- a/var/spack/repos/builtin/packages/tmuxinator/package.py +++ b/var/spack/repos/builtin/packages/tmuxinator/package.py @@ -24,17 +24,18 @@ ############################################################################## from spack import * + class Tmuxinator(Package): """A session configuration creator and manager for tmux""" homepage = "https://github.com/tmuxinator/tmuxinator" url = "https://github.com/tmuxinator/tmuxinator" version('0.6.11', - git='https://github.com/tmuxinator/tmuxinator', - tag='v0.6.11') + git='https://github.com/tmuxinator/tmuxinator', + tag='v0.6.11') extends('ruby') def install(self, spec, prefix): - gem('build', 'tmuxinator.gemspec') - gem('install', 'tmuxinator-{0}.gem'.format(self.version)) + gem('build', 'tmuxinator.gemspec') + gem('install', 'tmuxinator-{0}.gem'.format(self.version)) diff --git a/var/spack/repos/builtin/packages/tree/package.py b/var/spack/repos/builtin/packages/tree/package.py new file mode 100644 index 0000000000..8e0e176c4c --- /dev/null +++ b/var/spack/repos/builtin/packages/tree/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 Tree(Package): + """Tree is a recursive directory listing command that produces a depth + indented listing of files, which is colorized ala dircolors if + the LS_COLORS environment variable is set and output is to + tty. Tree has been ported and reported to work under the + following operating systems: Linux, FreeBSD, OS X, Solaris, + HP/UX, Cygwin, HP Nonstop and OS/2.""" + + homepage = "http://mama.indstate.edu/users/ice/tree/" + url = "http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz" + + version('1.7.0', 'abe3e03e469c542d8e157cdd93f4d8a6') + + def install(self, spec, prefix): + filter_file(r'^prefix =.*', 'prefix = %s' % prefix, 'Makefile') + filter_file(r'^CFLAGS', '# use spack settings instead... CFLAGS', + 'Makefile') + make() + make('install') diff --git a/var/spack/repos/builtin/packages/triangle/package.py b/var/spack/repos/builtin/packages/triangle/package.py index bc8b0ec639..f4ee9ca1c9 100644 --- a/var/spack/repos/builtin/packages/triangle/package.py +++ b/var/spack/repos/builtin/packages/triangle/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Triangle(Package): """Triangle is a two-dimensional mesh generator and Delaunay triangulator. Triangle generates exact Delaunay triangulations, diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1eaec86405..d39e45f054 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -23,23 +23,31 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os, sys, glob +import os +import sys -# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: +# Trilinos is complicated to build, as an inspiration a couple of links to +# other repositories which build it: # https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 # https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package # https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh -# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb -# and some relevant documentation/examples: +# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb and some +# relevant documentation/examples: # https://github.com/trilinos/Trilinos/issues/175 + + class Trilinos(Package): - """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented - software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. + """The Trilinos Project is an effort to develop algorithms and enabling + technologies within an object-oriented software framework for the solution + of large-scale, complex multi-physics engineering and scientific problems. A unique design feature of Trilinos is its focus on packages. """ homepage = "https://trilinos.org/" url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" + version('12.6.4', 'db25056617c688f6f25092376a03200f') + 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') @@ -48,55 +56,67 @@ class Trilinos(Package): version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') - variant('metis', default=True, description='Compile with METIS and ParMETIS') - variant('mumps', default=True, description='Compile with support for MUMPS solvers') - variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') - variant('hypre', default=True, description='Compile with Hypre preconditioner') + variant('metis', default=True, + description='Compile with METIS and ParMETIS') + variant('mumps', default=True, + description='Compile with support for MUMPS solvers') + variant('superlu-dist', default=True, + description='Compile with SuperluDist solvers') + variant('hypre', default=True, + description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') - variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') - # not everyone has py-numpy activated, keep it disabled by default to avoid configure errors + variant('suite-sparse', default=True, + description='Compile with SuiteSparse solvers') + # not everyone has py-numpy activated, keep it disabled by default to avoid + # configure errors variant('python', default=False, description='Build python wrappers') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds a debug version of the libraries') + variant('boost', default=True, description='Compile with Boost') + + depends_on('cmake', type='build') # Everything should be compiled with -fpic depends_on('blas') depends_on('lapack') - depends_on('boost') + depends_on('boost', when='+boost') depends_on('matio') depends_on('glm') depends_on('swig') - depends_on('metis@5:',when='+metis') - depends_on('suite-sparse',when='+suite-sparse') + depends_on('metis@5:', when='+metis') + depends_on('suite-sparse', when='+suite-sparse') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') - depends_on('parmetis',when='+metis') - # Trilinos' Tribits config system is limited which makes it - # very tricky to link Amesos with static MUMPS, see + depends_on('parmetis', when='+metis') + # Trilinos' Tribits config system is limited which makes it very tricky to + # link Amesos with static MUMPS, see # https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html - # One could work it out by getting linking flags from mpif90 --showme:link (or alike) - # and adding results to -DTrilinos_EXTRA_LINK_FLAGS - # together with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and - # it may 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('hypre~internal-superlu',when='+hypre') - depends_on('hdf5+mpi',when='+hdf5') - - depends_on('python',when='+python') + # One could work it out by getting linking flags from mpif90 --showme:link + # (or alike) and adding results to -DTrilinos_EXTRA_LINK_FLAGS together + # with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and it may + # 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@: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') patch('umfpack_from_suitesparse.patch') # check that the combination of variants makes sense def variants_check(self): if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): - # For Trilinos v11 we need to force SuperLUDist=OFF, - # since only the deprecated SuperLUDist v3.3 together with an Amesos patch - # is working. - raise RuntimeError('The superlu-dist variant can only be used with Trilinos @12.0.1:') + # For Trilinos v11 we need to force SuperLUDist=OFF, since only the + # deprecated SuperLUDist v3.3 together with an Amesos patch is + # working. + raise RuntimeError('The superlu-dist variant can only be used' + + ' with Trilinos @12.0.1:') def install(self, spec, prefix): self.variants_check() @@ -106,54 +126,85 @@ class Trilinos(Package): options.extend(std_cmake_args) mpi_bin = spec['mpi'].prefix.bin - options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', - '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', - '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', - '-DTrilinos_ENABLE_TESTS:BOOL=OFF', - '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', - '-DCMAKE_BUILD_TYPE:STRING=%s' % ('DEBUG' if '+debug' in spec else 'RELEASE'), - '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), - '-DTPL_ENABLE_MPI:BOOL=ON', - '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, - '-DTPL_ENABLE_BLAS=ON', - '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names - '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, - '-DTPL_ENABLE_LAPACK=ON', - '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, - '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, - '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', - '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'), - '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), - ]) + # Note: -DXYZ_LIBRARY_NAMES= needs semicolon separated list of names + options.extend([ + '-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', + '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', + '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', + '-DTrilinos_ENABLE_TESTS:BOOL=OFF', + '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', + '-DCMAKE_BUILD_TYPE:STRING=%s' % ( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + '-DBUILD_SHARED_LIBS:BOOL=%s' % ( + 'ON' if '+shared' in spec else 'OFF'), + '-DTPL_ENABLE_MPI:BOOL=ON', + '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, + '-DTPL_ENABLE_BLAS=ON', + '-DBLAS_LIBRARY_NAMES=%s' % to_lib_name( + spec['blas'].blas_shared_lib), + '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, + '-DTPL_ENABLE_LAPACK=ON', + '-DLAPACK_LIBRARY_NAMES=%s' % to_lib_name( + spec['lapack'].lapack_shared_lib), + '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix.lib, + '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', + '-DTrilinos_ENABLE_CXX11:BOOL=ON', + '-DTPL_ENABLE_Netcdf:BOOL=ON', + '-DTPL_ENABLE_HYPRE:BOOL=%s' % ( + 'ON' if '+hypre' in spec else 'OFF') + ]) + + if '+hdf5' in spec: + options.extend([ + '-DTPL_ENABLE_HDF5:BOOL=ON', + '-DHDF5_INCLUDE_DIRS:PATH=%s' % spec['hdf5'].prefix.include, + '-DHDF5_LIBRARY_DIRS:PATH=%s' % spec['hdf5'].prefix.lib + ]) + else: + options.extend(['-DTPL_ENABLE_HDF5:BOOL=OFF']) + + if '+boost' in spec: + options.extend([ + '-DTPL_ENABLE_Boost:BOOL=ON', + '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib + ]) + else: + options.extend(['-DTPL_ENABLE_Boost:BOOL=OFF']) # Fortran lib - libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) + libgfortran = os.path.dirname(os.popen( + '%s --print-file-name libgfortran.a' % + join_path(mpi_bin, 'mpif90')).read()) options.extend([ - '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % ( + libgfortran), '-DTrilinos_ENABLE_Fortran=ON' ]) # for build-debug only: - #options.extend([ - # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - #]) + # options.extend([ + # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + # ]) # suite-sparse related if '+suite-sparse' in spec: options.extend([ - '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? - #'-DTPL_ENABLE_Cholmod:BOOL=ON', - #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + # FIXME: Trilinos seems to be looking for static libs only, + # patch CMake TPL file? + '-DTPL_ENABLE_Cholmod:BOOL=OFF', + # '-DTPL_ENABLE_Cholmod:BOOL=ON', + # '-DCholmod_LIBRARY_DIRS:PATH=%s' % ( + # spec['suite-sparse'].prefix.lib, + # '-DCholmod_INCLUDE_DIRS:PATH=%s' % ( + # spec['suite-sparse'].prefix.include, '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, - '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % ( + spec['suite-sparse'].prefix.lib), + '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % ( + spec['suite-sparse'].prefix.include), + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;' + + 'suitesparseconfig' ]) else: options.extend([ @@ -169,9 +220,11 @@ class Trilinos(Package): '-DMETIS_LIBRARY_NAMES=metis', '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, '-DTPL_ENABLE_ParMETIS:BOOL=ON', - '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_DIRS=%s;%s' % ( + spec['parmetis'].prefix.lib, spec['metis'].prefix.lib), '-DParMETIS_LIBRARY_NAMES=parmetis;metis', - '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % ( + spec['parmetis'].prefix.include) ]) else: options.extend([ @@ -184,11 +237,14 @@ class Trilinos(Package): options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, - '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', # order is important! + # order is important! + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', '-DTPL_ENABLE_SCALAPACK:BOOL=ON', - '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + '-DSCALAPACK_LIBRARY_NAMES=scalapack' ]) - # see https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS + # see + # https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS cxx_flags.extend([ '-DMUMPS_5_0' ]) @@ -201,16 +257,20 @@ class Trilinos(Package): # superlu-dist: if '+superlu-dist' in spec: # Amesos, conflicting types of double and complex SLU_D - # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html - # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + # see + # https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and + # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html options.extend([ '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include + '-DSuperLUDist_LIBRARY_DIRS=%s' % + spec['superlu-dist'].prefix.lib, + '-DSuperLUDist_INCLUDE_DIRS=%s' % + spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ @@ -221,7 +281,6 @@ class Trilinos(Package): '-DTPL_ENABLE_SuperLUDist:BOOL=OFF', ]) - # python if '+python' in spec: options.extend([ @@ -248,23 +307,26 @@ class Trilinos(Package): '-DTrilinos_ENABLE_FEI=OFF' ]) - with working_dir('spack-build', create=True): cmake('..', *options) make() make('install') - # When trilinos is built with Python, libpytrilinos is included through - # cmake configure files. Namely, Trilinos_LIBRARIES in TrilinosConfig.cmake - # contains pytrilinos. This leads to a run-time error: - # Symbol not found: _PyBool_Type - # and prevents Trilinos to be used in any C++ code, which links executable - # against the libraries listed in Trilinos_LIBRARIES. - # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 + # When trilinos is built with Python, libpytrilinos is included + # through cmake configure files. Namely, Trilinos_LIBRARIES in + # TrilinosConfig.cmake contains pytrilinos. This leads to a + # run-time error: Symbol not found: _PyBool_Type and prevents + # Trilinos to be used in any C++ code, which links executable + # against the libraries listed in Trilinos_LIBRARIES. See + # https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : if '+python' in self.spec: - filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) + filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', + (r'\1\3'), + '%s/cmake/Trilinos/TrilinosConfig.cmake' % + prefix.lib) - # The shared libraries are not installed correctly on Darwin; correct this + # The shared libraries are not installed correctly on Darwin; + # correct this if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/udunits2/package.py b/var/spack/repos/builtin/packages/udunits2/package.py index aed39668fd..bae6414c5b 100644 --- a/var/spack/repos/builtin/packages/udunits2/package.py +++ b/var/spack/repos/builtin/packages/udunits2/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Udunits2(Package): """Automated units conversion""" diff --git a/var/spack/repos/builtin/packages/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py index db96bc301e..c3182d0dc8 100644 --- a/var/spack/repos/builtin/packages/uncrustify/package.py +++ b/var/spack/repos/builtin/packages/uncrustify/package.py @@ -24,8 +24,9 @@ ############################################################################## from spack import * + class Uncrustify(Package): - """Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA""" + """Source Code Beautifier for C, C++, C#, ObjectiveC, Java, and others.""" homepage = "http://uncrustify.sourceforge.net/" url = "http://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz" diff --git a/var/spack/repos/builtin/packages/unibilium/package.py b/var/spack/repos/builtin/packages/unibilium/package.py index d9e0ad6bcb..943e4737e1 100644 --- a/var/spack/repos/builtin/packages/unibilium/package.py +++ b/var/spack/repos/builtin/packages/unibilium/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Unibilium(Package): """A terminfo parsing library""" homepage = "https://github.com/mauke/unibilium" @@ -32,5 +33,5 @@ class Unibilium(Package): version('1.2.0', '9b1c97839a880a373da6c097443b43c4') def install(self, spec, prefix): - make("PREFIX="+prefix) - make("install", "PREFIX="+prefix) + make("PREFIX=" + prefix) + make("install", "PREFIX=" + prefix) diff --git a/var/spack/repos/builtin/packages/unison/package.py b/var/spack/repos/builtin/packages/unison/package.py new file mode 100644 index 0000000000..181e1e6410 --- /dev/null +++ b/var/spack/repos/builtin/packages/unison/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 Unison(Package): + """Unison is a file-synchronization tool for OSX, Unix, and + Windows. It allows two replicas of a collection of files and + directories to be stored on different hosts (or different disks + on the same host), modified separately, and then brought up to + date by propagating the changes in each replica to the + other.""" + + homepage = "https://www.cis.upenn.edu/~bcpierce/unison/" + url = "https://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.48.3.tar.gz" + + version('2.48.4', '5334b78c7e68169df7de95f4c6c4b60f') + + depends_on('ocaml', type='build') + + parallel = False + + def install(self, spec, prefix): + make('./mkProjectInfo') + make('UISTYLE=text') + + mkdirp(prefix.bin) + install('unison', prefix.bin) + set_executable(join_path(prefix.bin, 'unison')) 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') diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py index bf6972683d..99af170ca1 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class UtilLinux(Package): """Util-linux is a suite of essential utilities for any Linux system.""" @@ -36,9 +36,9 @@ class UtilLinux(Package): depends_on("python@2.7:") def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s/pkgconfig" % spec['python'].prefix.lib, - "--disable-use-tty-group") + configure("--prefix=%s" % prefix, + "PKG_CONFIG_PATH=%s/pkgconfig" % spec['python'].prefix.lib, + "--disable-use-tty-group") make() make("install") diff --git a/var/spack/repos/builtin/packages/valgrind/package.py b/var/spack/repos/builtin/packages/valgrind/package.py index afd4cc6ad0..e7ae227c27 100644 --- a/var/spack/repos/builtin/packages/valgrind/package.py +++ b/var/spack/repos/builtin/packages/valgrind/package.py @@ -27,12 +27,15 @@ from spack import * class Valgrind(Package): - """ - Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can - automatically detect many memory management and threading bugs, and profile your programs in detail. You can also - use Valgrind to build new tools. + """An instrumentation framework for building dynamic analysis. + + There are Valgrind tools that can automatically detect many memory + management and threading bugs, and profile your programs in + detail. You can also use Valgrind to build new tools. + + Valgrind is Open Source / Free Software, and is freely available + under the GNU General Public License, version 2. - Valgrind is Open Source / Free Software, and is freely available under the GNU General Public License, version 2. """ homepage = "http://valgrind.org/" url = "http://valgrind.org/downloads/valgrind-3.11.0.tar.bz2" @@ -42,7 +45,8 @@ class Valgrind(Package): version('3.10.0', '7c311a72a20388aceced1aa5573ce970') variant('mpi', default=True, description='Activates MPI support for valgrind') - variant('boost', default=True, description='Activates boost support for valgrind') + variant('boost', default=True, + description='Activates boost support for valgrind') depends_on('mpi', when='+mpi') depends_on('boost', when='+boost') diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py index f66c20894b..01eccfab57 100644 --- a/var/spack/repos/builtin/packages/vim/package.py +++ b/var/spack/repos/builtin/packages/vim/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Vim(Package): """Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most @@ -51,7 +52,7 @@ class Vim(Package): feature_sets = ('huge', 'big', 'normal', 'small', 'tiny') for fs in feature_sets: - variant(fs, default=False, description="Use '%s' feature set" % fs) + variant(fs, default=False, description="Use '%s' feature set" % fs) variant('python', default=False, description="build with Python") depends_on('python', when='+python') @@ -60,48 +61,50 @@ class Vim(Package): depends_on('ruby', when='+ruby') variant('cscope', default=False, description="build with cscope support") - depends_on('cscope', when='+cscope') + depends_on('cscope', when='+cscope', type='run') variant('gui', default=False, description="build with gui (gvim)") # virtual dependency? def install(self, spec, prefix): - feature_set = None - for fs in self.feature_sets: - if "+" + fs in spec: - if feature_set is not None: - tty.error("Only one feature set allowed, both %s and %s specified" - % (feature_set, fs)) - feature_set = fs - if '+gui' in spec: - if feature_set is not None: - if feature_set is not 'huge': - tty.error("+gui variant requires 'huge' feature set, %s was specified" - % feature_set) - feature_set = 'huge' - if feature_set is None: - feature_set = 'normal' - - configure_args = [] - configure_args.append("--with-features=" + feature_set) - - if '+python' in spec: - configure_args.append("--enable-pythoninterp=yes") - else: - configure_args.append("--enable-pythoninterp=dynamic") - - if '+ruby' in spec: - configure_args.append("--enable-rubyinterp=yes") - else: - configure_args.append("--enable-rubyinterp=dynamic") - - if '+gui' in spec: - configure_args.append("--enable-gui=auto") - - if '+cscope' in spec: - configure_args.append("--enable-cscope") - - configure("--prefix=%s" % prefix, *configure_args) - - make() - make("install") + feature_set = None + for fs in self.feature_sets: + if "+" + fs in spec: + if feature_set is not None: + tty.error( + "Only one feature set allowed, specified %s and %s" + % (feature_set, fs)) + feature_set = fs + if '+gui' in spec: + if feature_set is not None: + if feature_set is not 'huge': + tty.error( + "+gui variant requires 'huge' feature set, " + "%s was specified" % feature_set) + feature_set = 'huge' + if feature_set is None: + feature_set = 'normal' + + configure_args = [] + configure_args.append("--with-features=" + feature_set) + + if '+python' in spec: + configure_args.append("--enable-pythoninterp=yes") + else: + configure_args.append("--enable-pythoninterp=dynamic") + + if '+ruby' in spec: + configure_args.append("--enable-rubyinterp=yes") + else: + configure_args.append("--enable-rubyinterp=dynamic") + + if '+gui' in spec: + configure_args.append("--enable-gui=auto") + + if '+cscope' in spec: + configure_args.append("--enable-cscope") + + configure("--prefix=%s" % prefix, *configure_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index ae19fd0450..d88caeb00a 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -26,7 +26,8 @@ from spack import * class Visit(Package): - """VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool.""" + """VisIt is an Open Source, interactive, scalable, visualization, + animation and analysis tool.""" homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/" url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz" @@ -42,12 +43,15 @@ class Visit(Package): with working_dir('spack-build', create=True): feature_args = std_cmake_args[:] - feature_args.extend(["-DVTK_MAJOR_VERSION=6", - "-DVTK_MINOR_VERSION=1", - "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, - "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, - "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, - "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix]) + feature_args.extend([ + "-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec[ + 'qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec[ + 'python'].prefix.bin, + "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, + "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix]) cmake('../src', *feature_args) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index d2296dbc26..087c0e93eb 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Vtk(Package): """The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image @@ -31,16 +32,20 @@ class Vtk(Package): homepage = "http://www.vtk.org" url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" - version("7.0.0", "5fe35312db5fb2341139b8e4955c367d", url="http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz") + version("7.0.0", "5fe35312db5fb2341139b8e4955c367d", + url="http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz") - version("6.3.0", '0231ca4840408e9dd60af48b314c5b6d', url="http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz") + version("6.3.0", '0231ca4840408e9dd60af48b314c5b6d', + url="http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz") version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d') + depends_on('cmake', type='build') depends_on("qt") # VTK7 defaults to OpenGL2 rendering backend - variant('opengl2', default=True, description='Build with OpenGL instead of OpenGL2 as rendering backend') + variant('opengl2', default=True, + description='Build with OpenGL instead of OpenGL2 backend') def install(self, spec, prefix): def feature_to_bool(feature, on='ON', off='OFF'): @@ -66,7 +71,7 @@ class Vtk(Package): "-DVTK_Group_Qt=OFF", "-DModule_vtkGUISupportQt:BOOL=ON", "-DModule_vtkGUISupportQtOpenGL:BOOL=ON" - ]) + ]) if spec['qt'].satisfies('@5'): cmake_args.append("-DVTK_QT_VERSION:STRING=5") @@ -75,7 +80,8 @@ class Vtk(Package): cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY") cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY") - cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) + cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % + feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) cmake(*cmake_args) make() diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py index 532cf332e9..aff771b723 100644 --- a/var/spack/repos/builtin/packages/wget/package.py +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Wget(Package): """GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It @@ -40,9 +41,11 @@ class Wget(Package): depends_on("openssl") def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-ssl=openssl", - "OPENSSL_CFLAGS=-I%s" % spec['openssl'].prefix.include, - "OPENSSL_LIBS=-L%s -lssl -lcrypto -lz" % spec['openssl'].prefix.lib) + configure( + "--prefix=%s" % prefix, + "--with-ssl=openssl", + "OPENSSL_CFLAGS=-I%s" % spec['openssl'].prefix.include, + "OPENSSL_LIBS=-L%s -lssl -lcrypto -lz" % spec[ + 'openssl'].prefix.lib) make() make("install") diff --git a/var/spack/repos/builtin/packages/wx/package.py b/var/spack/repos/builtin/packages/wx/package.py index c000824803..5a80ca1c1f 100644 --- a/var/spack/repos/builtin/packages/wx/package.py +++ b/var/spack/repos/builtin/packages/wx/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Wx(Package): """wxWidgets is a C++ library that lets developers create applications for Windows, Mac OS X, Linux and other platforms @@ -43,8 +44,8 @@ class Wx(Package): depends_on('gtkplus') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, "--enable-unicode", "--disable-precomp-headers") + configure("--prefix=%s" % prefix, "--enable-unicode", + "--disable-precomp-headers") make(parallel=False) make("install") - diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py index 2283e1acf1..cc9ff445d6 100644 --- a/var/spack/repos/builtin/packages/wxpropgrid/package.py +++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Wxpropgrid(Package): """wxPropertyGrid is a property sheet control for wxWidgets. In other words, it is a specialized two-column grid for editing @@ -37,8 +38,8 @@ class Wxpropgrid(Package): depends_on("wx") def install(self, spec, prefix): - configure("--prefix=%s" % prefix, "--with-wxdir=%s" % spec['wx'].prefix.bin, "--enable-unicode") + configure("--prefix=%s" % prefix, "--with-wxdir=%s" % + spec['wx'].prefix.bin, "--enable-unicode") make() make("install") - diff --git a/var/spack/repos/builtin/packages/xcb-proto/package.py b/var/spack/repos/builtin/packages/xcb-proto/package.py index efcbdf0aea..587983f6bd 100644 --- a/var/spack/repos/builtin/packages/xcb-proto/package.py +++ b/var/spack/repos/builtin/packages/xcb-proto/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class XcbProto(Package): """Protocol for libxcb""" diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index 2efccc3c08..d0c2d3d497 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -24,16 +24,18 @@ ############################################################################## from spack import * + class XercesC(Package): """ Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, - manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. + manipulating, and validating XML documents using the DOM, SAX, and SAX2 + APIs. """ homepage = "https://xerces.apache.org/xerces-c" - url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.3.tar.bz2" - version('3.1.3', '5e333b55cb43e6b025ddf0e5d0f0fb0d') + url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.4.tar.bz2" + version('3.1.4', 'd04ae9d8b2dee2157c6db95fa908abfd') def install(self, spec, prefix): configure("--prefix=%s" % prefix, @@ -41,4 +43,3 @@ class XercesC(Package): make("clean") make() make("install") - diff --git a/var/spack/repos/builtin/packages/xorg-util-macros/package.py b/var/spack/repos/builtin/packages/xorg-util-macros/package.py new file mode 100644 index 0000000000..cd50d46826 --- /dev/null +++ b/var/spack/repos/builtin/packages/xorg-util-macros/package.py @@ -0,0 +1,39 @@ +############################################################################## +# 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 XorgUtilMacros(Package): + """The m4 macros used by all of the Xorg packages.""" + + homepage = "http://www.example.com" + url = "http://ftp.x.org/pub/individual/util/util-macros-1.19.0.tar.bz2" + + version('1.19.0', '1cf984125e75f8204938d998a8b6c1e1') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py new file mode 100644 index 0000000000..dbceaa1575 --- /dev/null +++ b/var/spack/repos/builtin/packages/xproto/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 Xproto(Package): + """The Xorg protocol headers provide the header files required to + build the system, and to allow other applications to build against + the installed X Window system.""" + homepage = "http://www.x.org/" + url = "https://www.x.org/archive//individual/proto/xproto-7.0.29.tar.gz" + + version('7.0.29', '16a78dd2c5ad73011105c96235f6a0af') + + depends_on("xorg-util-macros") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py index b3ef7808aa..a8ab959a62 100644 --- a/var/spack/repos/builtin/packages/xz/package.py +++ b/var/spack/repos/builtin/packages/xz/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Xz(Package): """XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX-like @@ -39,4 +40,3 @@ class Xz(Package): configure("--prefix=%s" % prefix) make() make("install") - diff --git a/var/spack/repos/builtin/packages/yasm/package.py b/var/spack/repos/builtin/packages/yasm/package.py index e05160c8ea..f14bdbcee7 100644 --- a/var/spack/repos/builtin/packages/yasm/package.py +++ b/var/spack/repos/builtin/packages/yasm/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Yasm(Package): """Yasm is a complete rewrite of the NASM-2.11.06 assembler. It supports the x86 and AMD64 instruction sets, accepts NASM and diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py index 9bdd5861e0..6a657dc39c 100644 --- a/var/spack/repos/builtin/packages/zeromq/package.py +++ b/var/spack/repos/builtin/packages/zeromq/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Zeromq(Package): """ The ZMQ networking/concurrency library and core API """ homepage = "http://zguide.zeromq.org/" @@ -38,7 +39,7 @@ class Zeromq(Package): depends_on("libsodium") def install(self, spec, prefix): - configure("--with-libsodium","--prefix=%s" % prefix) + configure("--with-libsodium", "--prefix=%s" % prefix) make() make("install") diff --git a/var/spack/repos/builtin/packages/zfp/package.py b/var/spack/repos/builtin/packages/zfp/package.py index 878b65118f..a898ab03d3 100644 --- a/var/spack/repos/builtin/packages/zfp/package.py +++ b/var/spack/repos/builtin/packages/zfp/package.py @@ -24,12 +24,15 @@ ############################################################################## from spack import * + class Zfp(Package): - """zfp is an open source C library for compressed floating-point arrays that supports - very high throughput read and write random acces, target error bounds or bit rates. - Although bit-for-bit lossless compression is not always possible, zfp is usually - accurate to within machine epsilon in near-lossless mode, and is often orders of - magnitude more accurate than other lossy compressors. + """zfp is an open source C library for compressed floating-point arrays + that supports very high throughput read and write random acces, + target error bounds or bit rates. Although bit-for-bit lossless + compression is not always possible, zfp is usually accurate to + within machine epsilon in near-lossless mode, and is often orders + of magnitude more accurate than other lossy compressors. + """ homepage = "http://computation.llnl.gov/projects/floating-point-compression" diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index e1cbdc7e28..6d799fb05a 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -24,11 +24,10 @@ ############################################################################## from spack import * + class Zlib(Package): - """zlib is designed to be a free, general-purpose, legally unencumbered -- - that is, not covered by any patents -- lossless data-compression library for - use on virtually any computer hardware and operating system. - """ + """A free, general-purpose, legally unencumbered lossless + data-compression library.""" homepage = "http://zlib.net" url = "http://zlib.net/zlib-1.2.8.tar.gz" diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 841ff3f4a2..0094395968 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -22,16 +22,22 @@ # 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 re, os, glob +import re +import os +import glob from spack import * + class Zoltan(Package): - """The Zoltan library is a toolkit of parallel combinatorial algorithms for - parallel, unstructured, and/or adaptive scientific applications. Zoltan's - largest component is a suite of dynamic load-balancing and paritioning - algorithms that increase applications' parallel performance by reducing - idle time. Zoltan also has graph coloring and graph ordering algorithms, - which are useful in task schedulers and parallel preconditioners.""" + """The Zoltan library is a toolkit of parallel combinatorial algorithms + for parallel, unstructured, and/or adaptive scientific + applications. Zoltan's largest component is a suite of dynamic + load-balancing and paritioning algorithms that increase + applications' parallel performance by reducing idle time. Zoltan + also has graph coloring and graph ordering algorithms, which are + useful in task schedulers and parallel preconditioners. + + """ homepage = "http://www.cs.sandia.gov/zoltan" base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions" @@ -41,8 +47,10 @@ class Zoltan(Package): version('3.6', '9cce794f7241ecd8dbea36c3d7a880f9') version('3.3', '5eb8f00bda634b25ceefa0122bd18d65') - variant('debug', default=False, description='Builds a debug version of the library') - variant('shared', default=True, description='Builds a shared version of the library') + variant('debug', default=False, + description='Builds a debug version of the library') + variant('shared', default=True, + description='Builds a shared version of the library') variant('fortran', default=True, description='Enable Fortran support') variant('mpi', default=False, description='Enable MPI support') @@ -51,8 +59,11 @@ class Zoltan(Package): def install(self, spec, prefix): config_args = [ - '--enable-f90interface' if '+fortan' in spec else '--disable-f90interface', - '--enable-mpi' if '+mpi' in spec else '--disable-mpi', + '--enable-f90interface' + if '+fortan' in spec else '--disable-f90interface', + + '--enable-mpi' + if '+mpi' in spec else '--disable-mpi', ] config_cflags = [ '-O0' if '+debug' in spec else '-O3', @@ -68,7 +79,8 @@ class Zoltan(Package): config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin) config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin) config_args.append('--with-mpi=%s' % spec['mpi'].prefix) - config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) + config_args.append('--with-mpi-compilers=%s' % + spec['mpi'].prefix.bin) # NOTE: Early versions of Zoltan come packaged with a few embedded # library packages (e.g. ParMETIS, Scotch), which messes with Spack's @@ -89,13 +101,15 @@ class Zoltan(Package): make() make('install') - # NOTE: Unfortunately, Zoltan doesn't provide any configuration options for - # the extension of the output library files, so this script must change these - # extensions as a post-processing step. + # NOTE: Unfortunately, Zoltan doesn't provide any configuration + # options for the extension of the output library files, so this + # script must change these extensions as a post-processing step. if '+shared' in spec: for libpath in glob.glob('lib/*.a'): - libdir, libname = (os.path.dirname(libpath), os.path.basename(libpath)) - move(libpath, os.path.join(libdir, re.sub(r'\.a$', '.so', libname))) + libdir, libname = (os.path.dirname(libpath), + os.path.basename(libpath)) + move(libpath, os.path.join( + libdir, re.sub(r'\.a$', '.so', libname))) mkdirp(prefix) move('include', prefix) diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py index 2c9ed4c6e7..4c27cd3ec2 100644 --- a/var/spack/repos/builtin/packages/zsh/package.py +++ b/var/spack/repos/builtin/packages/zsh/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Zsh(Package): """ Zsh is a shell designed for interactive use, although it is also a powerful |