diff options
Diffstat (limited to 'var')
214 files changed, 6285 insertions, 819 deletions
diff --git a/var/spack/repos/builtin.mock/packages/conflict-parent/package.py b/var/spack/repos/builtin.mock/packages/conflict-parent/package.py new file mode 100644 index 0000000000..37805537a2 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/conflict-parent/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 ConflictParent(Package): + homepage = 'https://github.com/tgamblin/callpath' + url = 'http://github.com/tgamblin/callpath-1.0.tar.gz' + + version(0.8, 'foobarbaz') + version(0.9, 'foobarbaz') + version(1.0, 'foobarbaz') + + depends_on('conflict') + + conflicts('^conflict~foo', when='@0.9') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") + + def setup_environment(self, senv, renv): + renv.set('FOOBAR', self.name) diff --git a/var/spack/repos/builtin.mock/packages/conflict/package.py b/var/spack/repos/builtin.mock/packages/conflict/package.py new file mode 100644 index 0000000000..a6ba4b5c58 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/conflict/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 Conflict(Package): + homepage = 'https://github.com/tgamblin/callpath' + url = 'http://github.com/tgamblin/callpath-1.0.tar.gz' + + version(0.8, 'foobarbaz') + version(0.9, 'foobarbaz') + version(1.0, 'foobarbaz') + + variant('foo', default=True, description='') + + conflicts('%clang', when='+foo') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") + + def setup_environment(self, senv, renv): + renv.set('FOOBAR', self.name) diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py index 9e18d65cbb..c0e347bc93 100644 --- a/var/spack/repos/builtin.mock/packages/multimethod/package.py +++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py @@ -22,6 +22,8 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +from six import string_types + from spack import * import spack.architecture @@ -102,14 +104,14 @@ class Multimethod(MultimethodBase): # Make sure we can switch methods on different target # platform = spack.architecture.platform() - targets = platform.targets.values() + targets = list(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): + if isinstance(self.spec.architecture.target, string_types): return self.spec.architecture.target else: return self.spec.architecture.target.name diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py index 70249aebac..dd6685a829 100644 --- a/var/spack/repos/builtin/packages/ack/package.py +++ b/var/spack/repos/builtin/packages/ack/package.py @@ -35,6 +35,7 @@ class Ack(Package): homepage = "http://beyondgrep.com/" url = "http://beyondgrep.com/ack-2.14-single-file" + version('2.16', '7085b5a5c76fda43ff049410870c8535', expand=False) version('2.14', 'e74150a1609d28a70b450ef9cc2ed56b', expand=False) depends_on('perl') diff --git a/var/spack/repos/builtin/packages/ant/package.py b/var/spack/repos/builtin/packages/ant/package.py index 19f03e1e53..5267b4ee0d 100644 --- a/var/spack/repos/builtin/packages/ant/package.py +++ b/var/spack/repos/builtin/packages/ant/package.py @@ -36,6 +36,7 @@ class Ant(Package): # 1.10.0 requires newer Java, not yet tested.... # version('1.10.0', '2260301bb7734e34d8b96f1a5fd7979c') + version('1.9.9', '22c9d40dabafbec348aaada226581239') version('1.9.8', '16253d516d5c33c4af9ef8fafcf1004b') version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1') diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py index 31a1d498da..247743ed0d 100644 --- a/var/spack/repos/builtin/packages/archer/package.py +++ b/var/spack/repos/builtin/packages/archer/package.py @@ -30,12 +30,12 @@ class Archer(Package): """ARCHER, a data race detection tool for large OpenMP applications.""" homepage = "https://github.com/PRUNERS/ARCHER" + url = "https://github.com/PRUNERS/archer/archive/v1.0.0.tar.gz" - version('1.0.0b', git='https://github.com/PRUNERS/ARCHER.git', - commit='2cf7ead36358842871d5bd9c33d499f62bf8dd38') + version('1.0.0', '790bfaf00b9f57490eb609ecabfe954a') depends_on('cmake', type='build') - depends_on('llvm+clang~gold') + depends_on('llvm') depends_on('ninja', type='build') depends_on('llvm-openmp-ompt') diff --git a/var/spack/repos/builtin/packages/autogen/package.py b/var/spack/repos/builtin/packages/autogen/package.py index 0bfe6159c9..e79af636b5 100644 --- a/var/spack/repos/builtin/packages/autogen/package.py +++ b/var/spack/repos/builtin/packages/autogen/package.py @@ -34,7 +34,7 @@ class Autogen(AutotoolsPackage): homepage = "https://www.gnu.org/software/autogen/index.html" url = "https://ftp.gnu.org/gnu/autogen/rel5.18.12/autogen-5.18.12.tar.gz" list_url = "https://ftp.gnu.org/gnu/autogen" - list_depth = 2 + list_depth = 1 version('5.18.12', '551d15ccbf5b5fc5658da375d5003389') diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py index 8643f5d836..4f022e5cad 100644 --- a/var/spack/repos/builtin/packages/automake/package.py +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -29,7 +29,7 @@ class Automake(AutotoolsPackage): """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' + url = 'http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz' version('1.15', '716946a105ca228ab545fc37a70df3a3') version('1.14.1', 'd052a3e884631b9c7892f2efce542d75') diff --git a/var/spack/repos/builtin/packages/bats/package.py b/var/spack/repos/builtin/packages/bats/package.py new file mode 100644 index 0000000000..e68dd7a48d --- /dev/null +++ b/var/spack/repos/builtin/packages/bats/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 Bats(Package): + """Bats is a TAP-compliant testing framework for Bash.""" + + homepage = "https://github.com/sstephenson/bats" + url = "https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz" + + version('0.4.0', 'aeeddc0b36b8321930bf96fce6ec41ee') + + def install(self, spec, prefix): + bash = which("bash") + bash('install.sh', prefix) diff --git a/var/spack/repos/builtin/packages/bcftools/package.py b/var/spack/repos/builtin/packages/bcftools/package.py index a1b4a06dbb..b9954c328a 100644 --- a/var/spack/repos/builtin/packages/bcftools/package.py +++ b/var/spack/repos/builtin/packages/bcftools/package.py @@ -34,9 +34,11 @@ class Bcftools(Package): 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.4', '50ccf0a073bd70e99cdb3c8be830416e') version('1.3.1', '575001e9fca37cab0c7a7287ad4b1cdb') depends_on('zlib') + depends_on('bzip2', when="@1.4:") def install(self, spec, prefix): make("prefix=%s" % prefix, "all") diff --git a/var/spack/repos/builtin/packages/bib2xhtml/package.py b/var/spack/repos/builtin/packages/bib2xhtml/package.py index b356038180..56038eea18 100644 --- a/var/spack/repos/builtin/packages/bib2xhtml/package.py +++ b/var/spack/repos/builtin/packages/bib2xhtml/package.py @@ -33,9 +33,6 @@ class Bib2xhtml(Package): version('3.0-15-gf506', 'a26ba02fe0053bbbf2277bdf0acf8645') - def url_for_version(self, v): - return ('http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v%s.tar.gz' % v) - def install(self, spec, prefix): # Add the bst include files to the install directory bst_include = join_path(prefix.share, 'bib2xhtml') diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index e87c7da7ce..e9bfa32b39 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -31,9 +31,10 @@ class Bison(AutotoolsPackage): generalized LR (GLR) parser employing LALR(1) parser tables.""" homepage = "http://www.gnu.org/software/bison/" - url = "http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz" + url = "http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz" version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') + version('2.7', 'ded660799e76fb1667d594de1f7a0da9') depends_on('m4', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/blast-plus/blast-make-fix2.5.0.diff b/var/spack/repos/builtin/packages/blast-plus/blast-make-fix2.5.0.diff new file mode 100644 index 0000000000..5611a0e83b --- /dev/null +++ b/var/spack/repos/builtin/packages/blast-plus/blast-make-fix2.5.0.diff @@ -0,0 +1,22 @@ +--- ncbi-blast-2.5.0+-src/c++/src/build-system/Makefile.in.top 2014-11-12 17:41:55.000000000 +0100 ++++ MakeFile 2016-12-19 18:00:58.000000000 +0100 +@@ -1,4 +1,4 @@ +-# $Id: Makefile.in.top 451817 2014-11-12 16:41:55Z ucko $ ++# $Id$ + # Top-level meta-makefile that simplifies building even further. + + # include @builddir@/Makefile.mk +@@ -49,9 +49,10 @@ + for x in *.a; do \ + $(LN_S) "$$x" "`$(BASENAME) \"$$x\" .a`-static.a"; \ + done +- cd $(includedir0) && find * -name CVS -prune -o -print |\ +- cpio -pd $(pincludedir) +- $(INSTALL) -m 644 $(incdir)/* $(pincludedir) ++ #for d in $(includedir0) $(incdir); do \ ++ # cd $$d && find * -name .svn prune -o -print | \ ++ # cpio -pd $(pincludedir) ; \ ++ #done + ## set up appropriate build and status directories somewhere under $(libdir)? + + install-gbench: diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py new file mode 100644 index 0000000000..53f09c03a3 --- /dev/null +++ b/var/spack/repos/builtin/packages/blast-plus/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 +############################################################################## +# +# This is a based largely on the Homebrew science formula: +# https://github.com/Homebrew/homebrew-science/blob/master/blast.rb +# +# There s one tricky bit to be resolved: +# +# - HDF5 builds explode, blast's configure script tries to run a program that +# uses a variable called 'HOST' but some other bit defines a macro called +# HOST that's defined to a string. Hilarity ensues. +# +# +from spack import * + + +class BlastPlus(AutotoolsPackage): + """Basic Local Alignment Search Tool.""" + + homepage = "http://blast.ncbi.nlm.nih.gov/" + url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.6.0/ncbi-blast-2.6.0+-src.tar.gz" + + version('2.6.0', 'c8ce8055b10c4d774d995f88c7cc6225') + version('2.2.30', 'f8e9a5eb368173142fe6867208b73715') + + # homebrew sez: Fixed upstream in future version > 2.6 + # But this bug sez that it will be fixed in 2.6 + # https://github.com/Homebrew/homebrew-science/pull/4740 + # The 2.6.0 src still matches the "before" bit of the patch + # so it's probably still "needed". + # On the other hand, the `find` command is broken and there + # aren't any .svn dirs in the tree, so I've updated their patch + # to just comment out the block. + patch('blast-make-fix2.5.0.diff', when="@2.5.0:2.6.0") + + # See https://github.com/Homebrew/homebrew-science/issues/2337#issuecomment-170011511 + @when('@:2.2.31') + def patch(self): + filter_file("2.95* | 2.96* | 3.* | 4.* )", + "2.95* | 2.96* | 3.* | 4.* | 5.* )", + "c++/src/build-system/configure", + string=True) + + # No... + # depends_on :mysql => :optional + + variant('static', default=False, + description='Build with static linkage') + variant('jpeg', default=True, + description='Build with jpeg support') + variant('png', default=True, + description='Build with png support') + variant('freetype', default=True, + description='Build with freetype support') + # variant('hdf5', default=True, + # description='Build with hdf5 support') + variant('gnutls', default=True, + description='Build with gnutls support') + variant('openssl', default=True, + description='Build with openssl support') + variant('zlib', default=True, + description='Build with zlib support') + variant('bzip2', default=True, + description='Build with bzip2 support') + variant('lzo', default=True, + description='Build with lzo support') + variant('pcre', default=True, + description='Build with pcre support') + + depends_on('jpeg', when='+jpeg') + depends_on('libpng', when='+png') + depends_on('freetype', when='+freetype') + # depends_on('hdf5', when='+hdf5') + depends_on('gnutls', when='+gnutls') + depends_on('openssl', when='+openssl') + depends_on('zlib', when='+zlib') + depends_on('bzip2', when='+bzip2') + depends_on('lzo', when='+lzo') + depends_on('pcre', when='+pcre') + + depends_on('python') + + configure_directory = 'c++' + + def configure_args(self): + spec = self.spec + + config_args = [ + '--with-bin-release', + '--without-debug', + '--with-mt', + '--with-64', + '--without-boost', + ] + + if '+static' in spec: + config_args.append('--with-static') + # FIXME + # args << "--with-static-exe" unless OS.linux? + # args << "--with-dll" if build.with? "dll" + else: + config_args.extend([ + '--with-dll', + '--without-static', + '--without-static-exe' + ]) + + if '+jpeg' in spec: + config_args.append( + '--with-jpeg={0}'.format(self.spec['jpeg'].prefix) + ) + else: + config_args.append('--without-jpeg') + + if '+png' in spec: + config_args.append( + '--with-png={0}'.format(self.spec['libpng'].prefix) + ) + else: + config_args.append('--without-png') + + if '+freetype' in spec: + config_args.append( + '--with-freetype={0}'.format(self.spec['freetype'].prefix) + ) + else: + config_args.append('--without-freetype') + + config_args.append('--without-hdf5') + # if '+hdf5' in spec: + # # FIXME + # config_args.append( + # '--with-hdf5={0}'.format(self.spec['hdf5'].prefix) + # ) + # else: + # config_args.append('--without-hdf5') + + if '+zlib' in spec: + config_args.append( + '--with-z={0}'.format(self.spec['zlib'].prefix) + ) + else: + config_args.append('--without-z') + + if '+bzip2' in spec: + config_args.append( + '--with-bz2={0}'.format(self.spec['bzip2'].prefix) + ) + else: + config_args.append('--without-bz2') + + if '+lzo' in spec: + config_args.append( + '--with-lzo={0}'.format(self.spec['lzo'].prefix) + ) + else: + config_args.append('--without-lzo') + + if '+gnutls' in spec: + config_args.append( + '--with-gnutls={0}'.format(self.spec['gnutls'].prefix) + ) + else: + config_args.append('--without-gnutls') + + if '+openssl' in spec: + config_args.append( + '--with-openssl={0}'.format(self.spec['openssl'].prefix) + ) + else: + config_args.append('--without-openssl') + + if '+pcre' in spec: + config_args.append( + '--with-pcre={0}'.format(self.spec['pcre'].prefix) + ) + else: + config_args.append('--without-pcre') + + return config_args diff --git a/var/spack/repos/builtin/packages/blat/package.py b/var/spack/repos/builtin/packages/blat/package.py new file mode 100644 index 0000000000..8a9cce50c1 --- /dev/null +++ b/var/spack/repos/builtin/packages/blat/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 Blat(Package): + """BLAT (BLAST-like alignment tool) is a pairwise sequence + alignment algorithm.""" + + homepage = "https://genome.ucsc.edu/FAQ/FAQblat.html" + url = "https://users.soe.ucsc.edu/~kent/src/blatSrc35.zip" + + version('35', '16e546b8843b85e0b0f2fa603cd78724') + + depends_on('libpng') + + def setup_environment(self, spack_env, run_env): + spack_env.set('MACHTYPE', 'x86_64') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + make("BINDIR=%s" % prefix.bin) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 6f891de664..06df688ea1 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -40,7 +40,7 @@ class Boost(Package): homepage = "http://www.boost.org" url = "http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2" list_url = "http://sourceforge.net/projects/boost/files/boost/" - list_depth = 2 + list_depth = 1 version('1.63.0', '1c837ecd990bb022d07e7aab32b09847') version('1.62.0', '5fb94629535c19e48703bdb2b2e9490f') @@ -141,14 +141,8 @@ class Boost(Package): patch('xl_1_62_0_le.patch', when='@1.62.0%xl') def url_for_version(self, version): - """ - 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) + url = "http://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2" + return url.format(version.dotted, version.underscored) def determine_toolset(self, spec): if spec.satisfies("platform=darwin"): diff --git a/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.5.patch b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.2.5.patch index 290be39c73..290be39c73 100644 --- a/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.5.patch +++ b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.2.5.patch diff --git a/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.1.patch b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.1.patch new file mode 100644 index 0000000000..0f4a15b1a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.1.patch @@ -0,0 +1,16 @@ +--- Makefile.orig 2017-03-24 20:43:00.304532976 -0700 ++++ Makefile 2017-03-24 20:48:59.644532037 -0700 +@@ -26,10 +26,10 @@ + + INC = + LIBS = -lreadline -ltermcap -lz +-GCC_PREFIX = $(shell dirname `which gcc`) ++GCC_PREFIX = + GCC_SUFFIX = +-CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX) +-CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX) ++CC = cc ++CPP = c++ + CXX ?= $(CPP) + HEADERS = $(wildcard *.h) + BOWTIE_MM = 1 diff --git a/var/spack/repos/builtin/packages/bowtie2/package.py b/var/spack/repos/builtin/packages/bowtie2/package.py index a8a1a34ed4..dc850d817f 100644 --- a/var/spack/repos/builtin/packages/bowtie2/package.py +++ b/var/spack/repos/builtin/packages/bowtie2/package.py @@ -27,12 +27,19 @@ from glob import glob class Bowtie2(Package): - """Description""" + """Bowtie 2 is an ultrafast and memory-efficient tool for aligning + sequencing reads to long reference sequences""" + 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") + url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.3.1/bowtie2-2.3.1-source.zip" + + version('2.3.1', 'b4efa22612e98e0c23de3d2c9f2f2478') + version('2.2.5', '51fa97a862d248d7ee660efc1147c75f') + + depends_on('tbb', when='@2.3.1') - patch('bowtie2-2.5.patch', when='@2.2.5', level=0) + patch('bowtie2-2.2.5.patch', when='@2.2.5', level=0) + patch('bowtie2-2.3.1.patch', when='@2.3.1', level=0) def install(self, spec, prefix): make() diff --git a/var/spack/repos/builtin/packages/cddlib/package.py b/var/spack/repos/builtin/packages/cddlib/package.py index 50dc5ad472..002c302599 100644 --- a/var/spack/repos/builtin/packages/cddlib/package.py +++ b/var/spack/repos/builtin/packages/cddlib/package.py @@ -31,19 +31,9 @@ class Cddlib(AutotoolsPackage): Method of Motzkin et al. for generating all vertices (i.e. extreme points) and extreme rays of a general convex polyhedron in R^d given by a system of linear inequalities""" - homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/" - # This is the original download url. It is currently down [2016-08-23], - # but should be reinstated or updated once the issue is resolved. - # url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-094h.tar.gz" - url = "http://pkgs.fedoraproject.org/lookaside/pkgs/cddlib/cddlib-094h.tar.gz/1467d270860bbcb26d3ebae424690e7c/cddlib-094h.tar.gz" - def url_for_version(self, version): - # Since the commit id is part of the version, we can't - # auto-generate the string, and we need to explicitly list all - # known versions here. Currently, there is only one version. - if str(version) == '0.94h': - return "http://pkgs.fedoraproject.org/lookaside/pkgs/cddlib/cddlib-094h.tar.gz/1467d270860bbcb26d3ebae424690e7c/cddlib-094h.tar.gz" - raise InstallError("Unsupported version %s" % str(version)) + homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/" + url = "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-094h.tar.gz" version('0.94h', '1467d270860bbcb26d3ebae424690e7c') @@ -51,3 +41,7 @@ class Cddlib(AutotoolsPackage): depends_on("gmp") depends_on("libtool", type="build") + + def url_for_version(self, version): + url = "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-{0}.tar.gz" + return url.format(version.joined) diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py index 775dc31cf3..90039d4479 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -30,9 +30,13 @@ class Cdo(Package): Climate and NWP model Data. """ homepage = "https://code.zmaw.de/projects/cdo" + url = "https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz" + list_url = "https://code.zmaw.de/projects/cdo/files" - version('1.7.2', 'f08e4ce8739a4f2b63fc81a24db3ee31', url='https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz') - version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2', url='https://code.zmaw.de/attachments/download/10198/cdo-1.6.9.tar.gz') + version('1.7.2', 'f08e4ce8739a4f2b63fc81a24db3ee31', + url='https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz') + version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2', + url='https://code.zmaw.de/attachments/download/10198/cdo-1.6.9.tar.gz') variant('szip', default=True, description='Enable szip compression for GRIB1') variant('hdf5', default=False, description='Enable HDF5 support') @@ -54,7 +58,7 @@ class Cdo(Package): depends_on('proj', when='+proj') depends_on('curl', when='+curl') depends_on('fftw', when='+fftw') - depends_on('magics', when='+magics') + depends_on('magics', when='+magics') def install(self, spec, prefix): config_args = ["--prefix=" + prefix, diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index 811b3ca9bc..b382f87f5b 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -31,6 +31,7 @@ class Cfitsio(AutotoolsPackage): """ homepage = 'http://heasarc.gsfc.nasa.gov/fitsio/' + url = 'http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz' version('3.410', '8a4a66fcdd816aae41768baa0b025552') version('3.370', 'abebd2d02ba5b0503c633581e3bfa116') diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 4ff9615016..1dd480d675 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -31,7 +31,7 @@ class Cmake(Package): homepage = 'https://www.cmake.org' url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' list_url = 'https://cmake.org/files/' - list_depth = 2 + list_depth = 1 version('3.7.2', '79bd7e65cd81ea3aa2619484ad6ff25a') version('3.7.1', 'd031d5a06e9f1c5367cdfc56fbd2a1c8') diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 0909d8cb81..9bc1026ba9 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -37,6 +37,7 @@ class Cp2k(Package): homepage = 'https://www.cp2k.org' url = 'https://sourceforge.net/projects/cp2k/files/cp2k-3.0.tar.bz2' + version('4.1', 'b0534b530592de15ac89828b1541185e') version('3.0', 'c05bc47335f68597a310b1ed75601d35') variant('mpi', default=True, description='Enable MPI support') @@ -47,14 +48,18 @@ class Cp2k(Package): depends_on('lapack') depends_on('blas') depends_on('fftw') - depends_on('libint@:1.2', when='@3.0') + depends_on('libint@:1.2', when='@3.0,4.1') 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') - depends_on('pexsi', when='+mpi') - depends_on('wannier90', when='+mpi') + depends_on('pexsi+fortran', when='+mpi') + + # Apparently cp2k@4.1 needs an "experimental" version of libwannier.a + # which is only available contacting the developer directly. See INSTALL + # in the stage of cp2k@4.1 + depends_on('wannier90', when='@3.0+mpi') depends_on('elpa', when='+mpi') # TODO : add dependency on libsmm, libxsmm @@ -94,6 +99,8 @@ class Cp2k(Package): fcflags.append(spec['fftw'].cppflags) fftw = find_libraries('libfftw3', root=spec['fftw'].prefix.lib) ldflags = [fftw.search_flags] + if 'superlu-dist@4.3' in spec: + ldflags = ['-Wl,--allow-multiple-definition'] + ldflags libs = [ join_path(spec['libint'].prefix.lib, 'libint.so'), join_path(spec['libint'].prefix.lib, 'libderiv.so'), @@ -147,10 +154,12 @@ class Cp2k(Package): cppflags.extend([ '-D__parallel', '-D__LIBPEXSI', - '-D__WANNIER90', '-D__ELPA3', '-D__SCALAPACK' ]) + if 'wannier90' in spec: + cppflags.append('-D__WANNIER90') + fcflags.extend([ # spec['elpa:fortran'].cppflags '-I' + join_path( @@ -167,7 +176,6 @@ class Cp2k(Package): libs.extend([ join_path(spec['elpa'].prefix.lib, 'libelpa.{0}'.format(dso_suffix)), - join_path(spec['wannier90'].prefix.lib, 'libwannier.a'), join_path(spec['pexsi'].prefix.lib, 'libpexsi.a'), join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'), @@ -180,6 +188,13 @@ class Cp2k(Package): 'libmetis.{0}'.format(dso_suffix) ), ]) + + if 'wannier90' in spec: + wannier = join_path( + spec['wannier90'].prefix.lib, 'libwannier.a' + ) + libs.append(wannier) + libs.extend(scalapack) libs.extend(self.spec['mpi'].mpicxx_shared_libs) libs.extend(self.compiler.stdcxx_libs) diff --git a/var/spack/repos/builtin/packages/cppad/package.py b/var/spack/repos/builtin/packages/cppad/package.py index 1ec31bbeef..e17a070294 100644 --- a/var/spack/repos/builtin/packages/cppad/package.py +++ b/var/spack/repos/builtin/packages/cppad/package.py @@ -29,16 +29,13 @@ class Cppad(CMakePackage): """A Package for Differentiation of C++ Algorithms.""" homepage = "https://www.coin-or.org/CppAD/" + url = "http://www.coin-or.org/download/source/CppAD/cppad-20170114.gpl.tgz" version('20170114', '565a534dc813fa1289764222cd8c11ea') version('develop', git='https://github.com/coin-or/CppAD.git') depends_on('cmake', type='build') - def url_for_version(self, version): - """Handle version-based custom URLs.""" - return "http://www.coin-or.org/download/source/CppAD/cppad-%s.gpl.tgz" % (version) - def cmake_args(self): # This package does not obey CMAKE_INSTALL_PREFIX args = [ diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py index fd48fcb7e3..254674c7bf 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os +import shutil class Cppcheck(Package): @@ -30,11 +32,13 @@ class Cppcheck(Package): homepage = "http://cppcheck.sourceforge.net/" url = "http://downloads.sourceforge.net/project/cppcheck/cppcheck/1.68/cppcheck-1.68.tar.bz2" + version('1.72', '2bd36f91ae0191ef5273bb7f6dc0d72e') version('1.68', 'c015195f5d61a542f350269030150708') def install(self, spec, prefix): # cppcheck does not have a configure script - make() + make("CFGDIR=%s" % os.path.join(prefix, 'cfg')) # manually install the final cppcheck binary mkdirp(prefix.bin) install('cppcheck', prefix.bin) + shutil.copytree('cfg', os.path.join(prefix, 'cfg')) diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index c92f262a9a..142bd4f253 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -36,6 +36,7 @@ class Cryptopp(Package): """ homepage = "http://www.cryptopp.com" + url = "http://www.cryptopp.com/cryptopp563.zip" version('5.6.3', '3c5b70e2ec98b7a24988734446242d07') version('5.6.2', '7ed022585698df48e65ce9218f6c6a67') diff --git a/var/spack/repos/builtin/packages/cub/package.py b/var/spack/repos/builtin/packages/cub/package.py new file mode 100644 index 0000000000..9c0c7776bd --- /dev/null +++ b/var/spack/repos/builtin/packages/cub/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 * +from distutils.dir_util import copy_tree + + +class Cub(Package): + """CUB is a C++ header library of cooperative threadblock primitives + and other utilities for CUDA kernel programming.""" + + homepage = "https://nvlabs.github.com/cub" + url = "https://github.com/NVlabs/cub/archive/1.6.4.zip" + + version('1.6.4', '924fc12c0efb17264c3ad2d611ed1c51') + + def install(self, spec, prefix): + copy_tree('cub', prefix.include) diff --git a/var/spack/repos/builtin/packages/cvs/package.py b/var/spack/repos/builtin/packages/cvs/package.py new file mode 100644 index 0000000000..e84c1ed92f --- /dev/null +++ b/var/spack/repos/builtin/packages/cvs/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Cvs(AutotoolsPackage): + """CVS a very traditional source control system""" + homepage = "http://www.nongnu.org/cvs/" + url = "https://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2" + + version('1.12.13', '93a8dacc6ff0e723a130835713235863f1f5ada9') + + parallel = False diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py index e8f7d0889b..c40229f83b 100644 --- a/var/spack/repos/builtin/packages/dakota/package.py +++ b/var/spack/repos/builtin/packages/dakota/package.py @@ -46,7 +46,6 @@ class Dakota(Package): homepage = 'https://dakota.sandia.gov/' url = 'https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.3-public.src.tar.gz' - _url_str = 'https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-{version}-public.src.tar.gz' version('6.3', '05a58d209fae604af234c894c3f73f6d') @@ -64,9 +63,6 @@ class Dakota(Package): depends_on('boost') depends_on('cmake', type='build') - def url_for_version(self, version): - return Dakota._url_str.format(version=version) - def install(self, spec, prefix): options = [] options.extend(std_cmake_args) diff --git a/var/spack/repos/builtin/packages/datamash/package.py b/var/spack/repos/builtin/packages/datamash/package.py index 4cf7d24ef1..a11b156c46 100644 --- a/var/spack/repos/builtin/packages/datamash/package.py +++ b/var/spack/repos/builtin/packages/datamash/package.py @@ -37,3 +37,5 @@ class Datamash(AutotoolsPackage): version('1.0.7', '9f317bab07454032ba9c068e7f17b04b') version('1.0.6', 'ff26fdef0f343cb695cf1853e14a1a5b') version('1.0.5', '9a29549dc7feca49fdc5fab696614e11') + + build_directory = 'spack-build' diff --git a/var/spack/repos/builtin/packages/direnv/package.py b/var/spack/repos/builtin/packages/direnv/package.py new file mode 100644 index 0000000000..336ea9f907 --- /dev/null +++ b/var/spack/repos/builtin/packages/direnv/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 Direnv(Package): + """direnv is an environment switcher for the shell.""" + + homepage = "https://direnv.net/" + url = "https://github.com/direnv/direnv/archive/v2.11.3.tar.gz" + + version('2.11.3', '5b9728e2dabed232b4932849647fd6e5') + + depends_on('go', type='build') + + def install(self, spec, prefix): + make('install', "DESTDIR=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/double-conversion/package.py b/var/spack/repos/builtin/packages/double-conversion/package.py new file mode 100644 index 0000000000..1400996853 --- /dev/null +++ b/var/spack/repos/builtin/packages/double-conversion/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 DoubleConversion(CMakePackage): + """This project (double-conversion) provides binary-decimal and decimal-binary + routines for IEEE doubles. + + The library consists of efficient conversion routines that have been + extracted from the V8 JavaScript engine. The code has been refactored + and improved so that it can be used more easily in other projects. + + There is extensive documentation in src/double-conversion.h. Other examples + can be found in test/cctest/test-conversions.cc. + """ + + homepage = "https://github.com/google/double-conversion" + url = "https://github.com/google/double-conversion/archive/v2.0.1.zip" + + version('2.0.1', '5be77f780841af528e92986d46620b1e') + version('2.0.0', '045f7927246c368b57dcdb844ec61211') + version('1.1.5', 'ddf782373e2630c07b2691c31cee0b24') + version('1.1.4', '5df72704406d93cd54c73d73f02e2744') + version('1.1.3', 'b312152c8c66c80449d5e0325b94502e') diff --git a/var/spack/repos/builtin/packages/easybuild/package.py b/var/spack/repos/builtin/packages/easybuild/package.py new file mode 100644 index 0000000000..156601ed65 --- /dev/null +++ b/var/spack/repos/builtin/packages/easybuild/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2017, Kenneth Hoste +# +# This file is part of Spack. +# Created by Kenneth Hoste, kenneth.hoste@gmail.com +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Easybuild(PythonPackage): + """EasyBuild is a software build and installation framework + for (scientific) software on HPC systems. + """ + + homepage = 'http://hpcugent.github.io/easybuild/' + url = 'https://pypi.io/packages/source/e/easybuild/easybuild-3.1.2.tar.gz' + + version('3.1.2', 'c2d901c2a71f51b24890fa69c3a46383') + + depends_on('py-easybuild-framework@3.1.2', when='@3.1.2', type='run') + depends_on('py-easybuild-easyblocks@3.1.2', when='@3.1.2', type='run') + depends_on('py-easybuild-easyconfigs@3.1.2', when='@3.1.2', type='run') diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index 16c1f6d247..2594d73c37 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -37,10 +37,10 @@ class Elfutils(AutotoolsPackage): url = "https://sourceware.org/elfutils/ftp/0.168/elfutils-0.168.tar.bz2" list_url = "https://sourceware.org/elfutils/ftp" - list_depth = 2 + list_depth = 1 - version('0.168','52adfa40758d0d39e5d5c57689bf38d6') - version('0.163','77ce87f259987d2e54e4d87b86cbee41') + version('0.168', '52adfa40758d0d39e5d5c57689bf38d6') + version('0.163', '77ce87f259987d2e54e4d87b86cbee41', preferred=True) provides('elf@1') diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index fe249269c7..033cb1e36c 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -26,24 +26,15 @@ from spack import * -class Elpa(Package): - """ - Eigenvalue solvers for Petaflop-Applications (ELPA) - """ +class Elpa(AutotoolsPackage): + """Eigenvalue solvers for Petaflop-Applications (ELPA)""" homepage = 'http://elpa.mpcdf.mpg.de/' url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz' - version( - '2016.05.003', - '88a9f3f3bfb63e16509dd1be089dcf2c', - url='http://elpa.mpcdf.mpg.de/html/Releases/2016.05.003/elpa-2016.05.003.tar.gz' - ) - version( - '2015.11.001', - 'de0f35b7ee7c971fd0dca35c900b87e6', - url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz' - ) + version('2016.05.004', 'c0dd3a53055536fc3a2a221e78d8b376') + version('2016.05.003', '88a9f3f3bfb63e16509dd1be089dcf2c') + version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6') variant('openmp', default=False, description='Activates OpenMP support') @@ -52,30 +43,26 @@ class Elpa(Package): depends_on('lapack') depends_on('scalapack') - def install(self, spec, prefix): + def url_for_version(self, version): + t = 'http://elpa.mpcdf.mpg.de/html/Releases/{0}/elpa-{0}.tar.gz' + if version < Version('2016.05.003'): + t = 'http://elpa.mpcdf.mpg.de/elpa-{0}.tar.gz' + return t.format(str(version)) - options = [ - 'CC={0}'.format(self.spec['mpi'].mpicc), - 'FC={0}'.format(self.spec['mpi'].mpifc), - 'CXX={0}'.format(self.spec['mpi'].mpicxx), - 'FCFLAGS={0}'.format( - spec['lapack'].libs.joined() - ), - 'LDFLAGS={0}'.format( - spec['lapack'].libs.joined() - ), - 'SCALAPACK_FCFLAGS={0}'.format( - spec['scalapack'].libs.joined() - ), - 'SCALAPACK_LDFLAGS={0}'.format( - spec['scalapack'].libs.joined() - ), - '--prefix={0}'.format(self.prefix) - ] + def setup_environment(self, spack_env, run_env): - if '+openmp' in spec: - options.append("--enable-openmp") + spec = self.spec + + spack_env.set('CC', spec['mpi'].mpicc) + spack_env.set('FC', spec['mpi'].mpifc) + spack_env.set('CXX', spec['mpi'].mpicxx) - configure(*options) - make() - make("install") + spack_env.set('LDFLAGS', spec['lapack'].libs.search_flags) + spack_env.set('LIBS', spec['lapack'].libs.link_flags) + spack_env.set('SCALAPACK_LDFLAGS', spec['scalapack'].libs.joined()) + + def configure_args(self): + options = [] + if '+openmp' in self.spec: + options.append("--enable-openmp") + return options diff --git a/var/spack/repos/builtin/packages/exonerate/package.py b/var/spack/repos/builtin/packages/exonerate/package.py index 7921e64058..2615d859d6 100644 --- a/var/spack/repos/builtin/packages/exonerate/package.py +++ b/var/spack/repos/builtin/packages/exonerate/package.py @@ -29,7 +29,7 @@ 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" + url = "http://ftp.ebi.ac.uk/pub/software/vertebrategenomics/exonerate/exonerate-2.4.0.tar.gz" version('2.4.0', '126fbade003b80b663a1d530c56f1904') diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py index 15ddfcee16..4dcff54b8f 100644 --- a/var/spack/repos/builtin/packages/ferret/package.py +++ b/var/spack/repos/builtin/packages/ferret/package.py @@ -31,11 +31,10 @@ 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" + homepage = "http://ferret.pmel.noaa.gov/Ferret/home" + url = "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.v696.tar.gz" - version('6.96', '51722027c864369f41bab5751dfff8cc', - url="ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz") + version('6.96', '51722027c864369f41bab5751dfff8cc') depends_on("hdf5~mpi~fortran") depends_on("netcdf~mpi") @@ -43,6 +42,10 @@ class Ferret(Package): depends_on("readline") depends_on("zlib") + def url_for_version(self, version): + return "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.v{0}.tar.gz".format( + version.joined) + def patch(self): hdf5_prefix = self.spec['hdf5'].prefix netcdff_prefix = self.spec['netcdf-fortran'].prefix diff --git a/var/spack/repos/builtin/packages/fio/package.py b/var/spack/repos/builtin/packages/fio/package.py new file mode 100644 index 0000000000..09554968ef --- /dev/null +++ b/var/spack/repos/builtin/packages/fio/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 Fio(AutotoolsPackage): + """Flexible I/O Tester.""" + + homepage = "https://github.com/axboe/fio" + url = "https://github.com/axboe/fio/archive/fio-2.19.tar.gz" + + version('2.19', '67125b60210a4daa689a4626fc66c612') + + variant('gui', default=False, description='Enable building of gtk gfio') + variant('doc', default=False, description='Generate documentation') + + depends_on('gtkplus@2.18:', when='+gui') + depends_on('cairo', when='+gui') + + depends_on('py-sphinx', type='build', when='+doc') + + def configure_args(self): + config_args = [] + + if '+gui' in self.spec: + config_args.append('--enable-gfio') + + return config_args + + @run_after('build') + def build_docs(self): + if '+doc' in self.spec: + make('-C', 'doc', 'html') + make('-C', 'doc', 'man') diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py index e009d64f51..559cc45d7a 100644 --- a/var/spack/repos/builtin/packages/foam-extend/package.py +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -9,6 +9,8 @@ # For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # +# License +# ------- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (as # published by the Free Software Foundation) version 2.1, February 1999. @@ -21,17 +23,51 @@ # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Legal Notice +# ------------ +# OPENFOAM is a trademark owned by OpenCFD Ltd +# (producer and distributor of the OpenFOAM software via www.openfoam.com). +# The trademark information must remain visible and unadulterated in this +# file and via the "spack info" and comply with the term set by +# http://openfoam.com/legal/trademark-policy.php +# +# This file is not part of OpenFOAM, nor does it constitute a component of an +# OpenFOAM distribution. +# +############################################################################## +# +# Notes +# - mpi handling: WM_MPLIB=USER and provide wmake rules for special purpose +# 'USER and 'USERMPI' mpi implementations. +# The choice of 'USER' vs 'USERMPI' may change in the future. +# +# Changes +# 2017-03-28 Mark Olesen <mark.olesen@esi-group.com> +# - avoid installing intermediate targets. +# - reworked to mirror the openfoam-com package. +# If changes are needed here, consider if they need applying there too. +# ############################################################################## from spack import * from spack.environment import * import multiprocessing +import glob +import re +import shutil import os +from os.path import isdir, isfile +from spack.pkg.builtin.openfoam_com import * class FoamExtend(Package): - """The foam-extend project is a fork of the OpenFOAM open source library - for Computational Fluid Dynamics (CFD).""" + """The Extend Project is a fork of the OpenFOAM opensource library + for Computational Fluid Dynamics (CFD). + This offering is not approved or endorsed by OpenCFD Ltd, + producer and distributor of the OpenFOAM software via www.openfoam.com, + and owner of the OPENFOAM trademark. + """ homepage = "http://www.extend-project.de/" @@ -40,207 +76,235 @@ class FoamExtend(Package): 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'} - + # variant('int64', default=False, + # description='Compile with 64-bit labels') + variant('float32', default=False, + description='Compile with 32-bit scalar (single-precision)') + + variant('paraview', default=False, + description='Build paraview plugins (eg, paraFoam)') + variant('scotch', default=True, + description='With scotch for decomposition') + variant('ptscotch', default=True, + description='With ptscotch for decomposition') + variant('metis', default=True, + description='With metis for decomposition') + variant('parmetis', default=True, + description='With parmetis for decomposition') + variant('parmgridgen', default=True, + description='With parmgridgen support') + variant('source', default=True, + description='Install library/application sources and tutorials') + + #: Map spack compiler names to OpenFOAM compiler names + # By default, simply capitalize the first letter + compiler_mapping = {'intel': 'icc'} + + provides('openfoam') depends_on('mpi') depends_on('python') - depends_on('flex') depends_on('zlib') + depends_on('flex@:2.6.1') # <- restriction due to scotch 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) + 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@:5.0.1', when='+paraview') + + # Some user settings, to be adjusted manually or via variants + foam_cfg = { + 'WM_COMPILER': 'Gcc', # <- %compiler + 'WM_ARCH_OPTION': '64', # (32/64-bit on x86_64) + # FUTURE? 'WM_LABEL_SIZE': '32', # <- +int64 + 'WM_PRECISION_OPTION': 'DP', # <- +float32 + 'WM_COMPILE_OPTION': 'SPACKOpt', # Do not change + 'WM_MPLIB': 'USER', # USER | USERMPI + } + + # The system description is frequently needed + foam_sys = { + 'WM_ARCH': None, + 'WM_COMPILER': None, + 'WM_OPTIONS': None, + } + + # Content for etc/prefs.{csh,sh} + etc_prefs = {} + + # Content for etc/config.{csh,sh}/ files + etc_config = {} + + build_script = './spack-Allwmake' # <- Generated by patch() method. + # phases = ['configure', 'build', 'install'] + # build_system_class = 'OpenfoamCom' - def get_openfoam_environment(self): - return EnvironmentModifications.from_sourcing_files( - join_path(self.stage.source_path, - 'etc/bashrc')) + def setup_environment(self, spack_env, run_env): + run_env.set('FOAM_INST_DIR', self.prefix) + run_env.set('WM_PROJECT_DIR', self.projectdir) + + @property + def _canonical(self): + """Canonical name for this package and version""" + return 'foam-extend-{0}'.format(self.version.up_to(2)) + + @property + def projectdir(self): + """Absolute location of project directory: WM_PROJECT_DIR/""" + return join_path(self.prefix, self._canonical) # <- prefix/canonical + + @property + def etc(self): + """Absolute location of the OpenFOAM etc/ directory""" + return join_path(self.projectdir, 'etc') + + @property + def archbin(self): + """Relative location of architecture-specific executables""" + wm_options = self.set_openfoam() + return join_path('applications', 'bin', wm_options) + + @property + def archlib(self): + """Relative location of architecture-specific libraries""" + wm_options = self.set_openfoam() + return join_path('lib', wm_options) + + @property + def wm_options(self): + """The architecture+compiler+options for OpenFOAM""" + opts = self.set_openfoam() + return opts + + @property + def rpath_info(self): + """Define 'SPACKOpt' compiler optimization file to have wmake + use spack information with minimum modifications to OpenFOAM + """ + build_libpath = join_path(self.stage.source_path, self.archlib) + install_libpath = join_path(self.projectdir, self.archlib) + + # 'DBUG': rpaths + return '{0}{1} {2}{3}'.format( + self.compiler.cxx_rpath_arg, install_libpath, + self.compiler.cxx_rpath_arg, build_libpath) + + def openfoam_arch(self): + """Return an architecture value similar to what OpenFOAM does in + etc/config.sh/settings, but slightly more generous. + Uses and may adjust foam_cfg[WM_ARCH_OPTION] as a side-effect + """ + # spec.architecture.platform is like `uname -s`, but lower-case + platform = self.spec.architecture.platform + + # spec.architecture.target is like `uname -m` + target = self.spec.architecture.target + + if platform == 'linux': + if target == 'i686': + self.foam_cfg['WM_ARCH_OPTION'] = '32' # Force consistency + elif target == 'x86_64': + if self.foam_cfg['WM_ARCH_OPTION'] == '64': + platform += '64' + elif target == 'ia64': + platform += 'ia64' + elif target == 'armv7l': + platform += 'ARM7' + elif target == ppc64: + platform += 'PPC64' + elif target == ppc64le: + platform += 'PPC64le' + elif platform == 'darwin': + if target == 'x86_64': + platform += 'Intel' + if self.foam_cfg['WM_ARCH_OPTION'] == '64': + platform += '64' + # ... and others? + return platform + + def openfoam_compiler(self): + """Capitalized version of the compiler name, which usually corresponds + to how OpenFOAM will camel-case things. + Use compiler_mapping to handing special cases. + Also handle special compiler options (eg, KNL) + """ + comp = self.compiler.name + if comp in self.compiler_mapping: + comp = self.compiler_mapping[comp] + comp = comp.capitalize() + + if '+knl' in self.spec: + comp += 'KNL' + return comp + + # For foam-extend: does not yet support +int64 + def set_openfoam(self): + """Populate foam_cfg, foam_sys according to + variants, architecture, compiler. + Returns WM_OPTIONS. + """ + # Run once + opts = self.foam_sys['WM_OPTIONS'] + if opts: + return opts + + wm_arch = self.openfoam_arch() + wm_compiler = self.openfoam_compiler() + compileOpt = self.foam_cfg['WM_COMPILE_OPTION'] + + # Insist on a wmake rule for this architecture/compiler combination + archCompiler = wm_arch + wm_compiler + compiler_rule = join_path( + self.stage.source_path, 'wmake', 'rules', archCompiler) + + if not isdir(compiler_rule): + raise RuntimeError( + 'No wmake rule for {0}'.format(archCompiler)) + if not re.match(r'.+Opt$', compileOpt): + raise RuntimeError( + "WM_COMPILE_OPTION={0} is not type '*Opt'".format(compileOpt)) + + # Adjust for variants + # FUTURE? self.foam_cfg['WM_LABEL_SIZE'] = ( + # FUTURE? '64' if '+int64' in self.spec else '32' + # FUTURE? ) + self.foam_cfg['WM_PRECISION_OPTION'] = ( + 'SP' if '+float32' in self.spec else 'DP' + ) + + # ---- + # WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION + # ---- + self.foam_sys['WM_ARCH'] = wm_arch + self.foam_sys['WM_COMPILER'] = wm_compiler + self.foam_cfg['WM_COMPILER'] = wm_compiler # For bashrc,cshrc too + self.foam_sys['WM_OPTIONS'] = ''.join([ + wm_arch, + wm_compiler, + self.foam_cfg['WM_PRECISION_OPTION'], + # FUTURE? 'Int', self.foam_cfg['WM_LABEL_SIZE'], # Int32/Int64 + compileOpt + ]) + return self.foam_sys['WM_OPTIONS'] 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: E501 - - # 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) + """Adjust OpenFOAM build for spack. Where needed, apply filter as an + alternative to normal patching. + """ + self.set_openfoam() # May need foam_cfg/foam_sys information + + # Adjust ParMGridGen - this is still a mess + files = [ + 'src/dbns/Make/options', + 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options' # noqa: E501 ] + for f in files: + filter_file(r'-lMGridGen', r'-lmgrid', f, backup=False) - 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)) - - _files_to_patch = [ + # Adjust for flex version check + files = [ 'src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L', # noqa: E501 'src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L', # noqa: E501 'src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L', # noqa: E501 @@ -251,40 +315,198 @@ class FoamExtend(Package): 'applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L', # noqa: E501 'applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L' # noqa: E501 ] - for _file in _files_to_patch: - filter_file(r'#if YY_FLEX_SUBMINOR_VERSION < 34', - r'#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 34', # noqa: E501 - _file) + for f in files: + filter_file( + r'#if YY_FLEX_SUBMINOR_VERSION < 34', + r'#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 34', # noqa: E501 + f, backup=False + ) + + # Build wrapper script + with open(self.build_script, 'w') as out: + out.write( + """#!/bin/bash +export FOAM_INST_DIR=$(cd .. && pwd -L) +. $PWD/etc/bashrc '' # No arguments +mkdir -p $FOAM_APPBIN $FOAM_LIBBIN 2>/dev/null # Allow interrupt +echo Build openfoam with SPACK +echo WM_PROJECT_DIR = $WM_PROJECT_DIR +./Allwmake # No arguments +# +""") + set_executable(self.build_script) + self.configure(self.spec, self.prefix) # Should be a separate phase + + def configure(self, spec, prefix): + """Make adjustments to the OpenFOAM configuration files in their various + locations: etc/bashrc, etc/config.sh/FEATURE and customizations that + don't properly fit get placed in the etc/prefs.sh file (similiarly for + csh). + """ + self.set_openfoam() # Need foam_cfg/foam_sys information + + # Content for etc/prefs.{csh,sh} + self.etc_prefs = { + '000': { # Sort first + 'compilerInstall': 'System', + }, + '001': {}, + 'cmake': { + 'CMAKE_DIR': spec['cmake'].prefix, + 'CMAKE_BIN_DIR': spec['cmake'].prefix.bin, + }, + 'python': { + 'PYTHON_DIR': spec['python'].prefix, + 'PYTHON_BIN_DIR': spec['python'].prefix.bin, + }, + 'flex': { + 'FLEX_SYSTEM': 1, + 'FLEX_DIR': spec['flex'].prefix, + }, + 'bison': { + 'BISON_SYSTEM': 1, + 'BISON_DIR': spec['flex'].prefix, + }, + 'zlib': { + 'ZLIB_SYSTEM': 1, + 'ZLIB_DIR': spec['zlib'].prefix, + }, + } + # Adjust configuration via prefs - sort second + self.etc_prefs['001'].update(self.foam_cfg) + + if '+scotch' in spec or '+ptscotch' in spec: + pkg = spec['scotch'].prefix + self.etc_prefs['scotch'] = { + 'SCOTCH_SYSTEM': 1, + 'SCOTCH_DIR': pkg, + 'SCOTCH_BIN_DIR': pkg.bin, + 'SCOTCH_LIB_DIR': pkg.lib, + 'SCOTCH_INCLUDE_DIR': pkg.include, + } + + if '+metis' in spec: + pkg = spec['metis'].prefix + self.etc_prefs['metis'] = { + 'METIS_SYSTEM': 1, + 'METIS_DIR': pkg, + 'METIS_BIN_DIR': pkg.bin, + 'METIS_LIB_DIR': pkg.lib, + 'METIS_INCLUDE_DIR': pkg.include, + } + + if '+parmetis' in spec: + pkg = spec['parmetis'].prefix + self.etc_prefs['parametis'] = { + 'PARMETIS_SYSTEM': 1, + 'PARMETIS_DIR': pkg, + 'PARMETIS_BIN_DIR': pkg.bin, + 'PARMETIS_LIB_DIR': pkg.lib, + 'PARMETIS_INCLUDE_DIR': pkg.include, + } + + if '+parmgridgen' in spec: + pkg = spec['parmgridgen'].prefix + self.etc_prefs['parmgridgen'] = { + 'PARMGRIDGEN_SYSTEM': 1, + 'PARMGRIDGEN_DIR': pkg, + 'PARMGRIDGEN_BIN_DIR': pkg.bin, + 'PARMGRIDGEN_LIB_DIR': pkg.lib, + 'PARMGRIDGEN_INCLUDE_DIR': pkg.include, + } - def setup_environment(self, spack_env, run_env): - with working_dir(self.stage.path): - spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) + if '+paraview' in self.spec: + self.etc_prefs['paraview'] = { + 'PARAVIEW_SYSTEM': 1, + 'PARAVIEW_DIR': spec['paraview'].prefix, + 'PARAVIEW_BIN_DIR': spec['paraview'].prefix.bin, + } + self.etc_prefs['qt'] = { + 'QT_SYSTEM': 1, + 'QT_DIR': spec['qt'].prefix, + 'QT_BIN_DIR': spec['qt'].prefix.bin, + } + + # Write prefs files according to the configuration. + # Only need prefs.sh for building, but install both for end-users + write_environ( + self.etc_prefs, + posix=join_path('etc', 'prefs.sh'), + cshell=join_path('etc', 'prefs.csh')) + + archCompiler = self.foam_sys['WM_ARCH'] + self.foam_sys['WM_COMPILER'] + compileOpt = self.foam_cfg['WM_COMPILE_OPTION'] + # general_rule = join_path('wmake', 'rules', 'General') + compiler_rule = join_path('wmake', 'rules', archCompiler) + generate_mplib_rules(compiler_rule, self.spec) + generate_compiler_rules(compiler_rule, compileOpt, self.rpath_info) + # Record the spack spec information + with open("log.spack-spec", 'w') as outfile: + outfile.write(spec.tree()) + + def build(self, spec, prefix): + """Build using the OpenFOAM Allwmake script, with a wrapper to source + its environment first. + """ + self.set_openfoam() # Force proper population of foam_cfg/foam_sys + args = [] + if self.parallel: # Build in parallel? - pass via the environment + os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ + if self.make_jobs else str(multiprocessing.cpu_count()) + builder = Executable(self.build_script) + builder(*args) - (arch, foam_compiler) = self.set_arch() + def install(self, spec, prefix): + """Install under the projectdir (== prefix/name-version)""" + self.build(spec, prefix) # Should be a separate phase + opts = self.wm_options - run_env.set('FOAM_INST_DIR', self.prefix) + # Fairly ugly since intermediate targets are scattered inside sources + appdir = 'applications' + mkdirp(self.projectdir, join_path(self.projectdir, appdir)) - def install(self, spec, prefix): - env_openfoam = self.get_openfoam_environment() - env_openfoam.apply_modifications() + # Retain build log file + out = "spack-build.out" + if isfile(out): + install(out, join_path(self.projectdir, "log." + opts)) - if self.parallel: - os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ - if self.make_jobs else str(multiprocessing.cpu_count()) + # All top-level files, except spack build info and possibly Allwmake + if '+source' in spec: + ignored = re.compile(r'^spack-.*') + else: + ignored = re.compile(r'^(Allclean|Allwmake|spack-).*') - allwmake = Executable('./Allwmake') - allwmake() + files = [ + f for f in glob.glob("*") if isfile(f) and not ignored.search(f) + ] + for f in files: + install(f, self.projectdir) - install_path = \ - join_path(self.prefix, - 'foam-extend-{0}'.format(self.version.up_to(2))) + # Install directories. install applications/bin directly + for d in ['bin', 'etc', 'wmake', 'lib', join_path(appdir, 'bin')]: + install_tree( + d, + join_path(self.projectdir, d)) if '+source' in spec: - install_tree('src', join_path(install_path, 'src')) - install_tree('tutorials', join_path(install_path, 'tutorials')) - - 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')) + subitem = join_path(appdir, 'Allwmake') + install(subitem, join_path(self.projectdir, subitem)) + + ignored = [opts] # Intermediate targets + for d in ['src', 'tutorials']: + install_tree( + d, + join_path(self.projectdir, d), + ignore=shutil.ignore_patterns(*ignored)) + + for d in ['solvers', 'utilities']: + install_tree( + join_path(appdir, d), + join_path(self.projectdir, appdir, d), + ignore=shutil.ignore_patterns(*ignored)) + + def install_links(self): + """Add symlinks into bin/, lib/ (eg, for other applications)""" + return + +# ----------------------------------------------------------------------------- diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 1fddb77299..ffb85ec15e 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -37,7 +37,7 @@ class Gcc(AutotoolsPackage): url = "http://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2" list_url = 'http://ftp.gnu.org/gnu/gcc/' - list_depth = 2 + list_depth = 1 version('6.3.0', '677a7623c7ef6ab99881bc4e048debb6') version('6.2.0', '9768625159663b300ae4de2f4745fcc4') diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index b52b1f1038..dc58cc8993 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -38,7 +38,7 @@ class Gdal(Package): homepage = "http://www.gdal.org/" url = "http://download.osgeo.org/gdal/2.1.2/gdal-2.1.2.tar.xz" list_url = "http://download.osgeo.org/gdal/" - list_depth = 2 + list_depth = 1 version('2.1.2', 'ae85b78888514c75e813d658cac9478e') version('2.0.2', '940208e737c87d31a90eaae43d0efd65') diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py index 1159744721..2f3a0b0bd7 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -32,7 +32,9 @@ class GdkPixbuf(AutotoolsPackage): GTK+ 2 but it was split off into a separate package in preparation for the change to GTK+ 3.""" homepage = "https://developer.gnome.org/gdk-pixbuf/" - url = "http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.31/gdk-pixbuf-2.31.1.tar.xz" + url = "http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.31/gdk-pixbuf-2.31.2.tar.xz" + list_url = "http://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/" + list_depth = 2 version('2.31.2', '6be6bbc4f356d4b79ab4226860ab8523') diff --git a/var/spack/repos/builtin/packages/glog/package.py b/var/spack/repos/builtin/packages/glog/package.py index 11d679c7ff..3ea17d2f0c 100644 --- a/var/spack/repos/builtin/packages/glog/package.py +++ b/var/spack/repos/builtin/packages/glog/package.py @@ -29,6 +29,9 @@ class Glog(AutotoolsPackage): """C++ implementation of the Google logging module.""" homepage = "https://github.com/google/glog" - url = "https://github.com/google/glog/archive/v0.3.3.tar.gz" + url = "https://github.com/google/glog/archive/v0.3.4.tar.gz" + version('0.3.4', 'df92e05c9d02504fb96674bc776a41cb') version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0') + + depends_on('gflags') diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py index 638ef7e30c..46fee8d260 100644 --- a/var/spack/repos/builtin/packages/gnutls/package.py +++ b/var/spack/repos/builtin/packages/gnutls/package.py @@ -35,8 +35,28 @@ class Gnutls(AutotoolsPackage): with focus on security and interoperability.""" homepage = "http://www.gnutls.org" - url = "http://www.ring.gr.jp/pub/net/gnupg/gnutls/v3.3/gnutls-3.3.9.tar.xz" + url = "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-3.5.10.tar.xz" - version('3.3.9', 'ff61b77e39d09f1140ab5a9cf52c58b6') + version('3.5.10', '336c03a71ba90184ffd0388075dde504') + version('3.5.9', '0ab25eb6a1509345dd085bc21a387951') + version('3.3.9', 'ff61b77e39d09f1140ab5a9cf52c58b6') - depends_on("nettle") + # Note that version 3.3.9 of gnutls doesn't support nettle 3.0. + depends_on("nettle@:2.9", when='@3.3.9') + depends_on("nettle", when='@3.5:') + depends_on("zlib", when='@3.5:') + + build_directory = 'spack-build' + + def url_for_version(self, version): + url = "https://www.gnupg.org/ftp/gcrypt/gnutls/v{0}/gnutls-{1}.tar.xz" + return url.format(version.up_to(2), version) + + def configure_args(self): + args = [] + if self.spec.satisfies('@3.5:'): + # use shipped libraries, might be turned into variants + args.append('--with-included-libtasn1') + args.append('--with-included-unistring') + args.append('--without-p11-kit') # p11-kit@0.23.1: ... + return args diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 6559e90496..c095140c68 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -89,13 +89,6 @@ class Go(Package): r'# \1\2\3', ) - @when('@1.5.0:') - def patch(self): - pass - - def url_for_version(self, version): - return "https://storage.googleapis.com/golang/go{0}.src.tar.gz".format(version) - def install(self, spec, prefix): bash = which('bash') with working_dir('src'): diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index 14ceb6ea49..44a96bc170 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -25,7 +25,7 @@ from spack import * -class Googletest(Package): +class Googletest(CMakePackage): """Google test framework for C++. Also called gtest.""" homepage = "https://github.com/google/googletest" url = "https://github.com/google/googletest/tarball/release-1.7.0" @@ -34,17 +34,25 @@ class Googletest(Package): version('1.7.0', '5eaf03ed925a47b37c8e1d559eb19bc4') version('1.6.0', '90407321648ab25b067fcd798caf8c78') - depends_on("cmake", type='build') - + def cmake_args(self): + spec = self.spec + if '@1.8.0:' in spec: + # New style (contains both Google Mock and Google Test) + options = ['-DBUILD_GMOCK=OFF', '-DBUILD_GTEST=ON'] + else: + # Old style (contains only GTest) + options = [] + return options + + @when('@:1.7.0') def install(self, spec, prefix): - which('cmake')('.', *std_cmake_args) - - make() - - # Google Test doesn't have a make install - # We have to do our own install here. - install_tree('include', prefix.include) - - mkdirp(prefix.lib) - install('./libgtest.a', '%s' % prefix.lib) - install('./libgtest_main.a', '%s' % prefix.lib) + """Make the install targets""" + with working_dir(self.build_directory): + # Google Test doesn't have a make install + # We have to do our own install here. + install_tree(join_path(self.stage.source_path, 'include'), + prefix.include) + + mkdirp(prefix.lib) + install('libgtest.a', prefix.lib) + install('libgtest_main.a', prefix.lib) diff --git a/var/spack/repos/builtin/packages/gource/package.py b/var/spack/repos/builtin/packages/gource/package.py index 21994ad42c..7d12697d63 100644 --- a/var/spack/repos/builtin/packages/gource/package.py +++ b/var/spack/repos/builtin/packages/gource/package.py @@ -52,10 +52,6 @@ class Gource(AutotoolsPackage): parallel = False force_autoreconf = True - def url_for_version(self, version): - tmp = 'https://github.com/acaudwell/Gource/releases/download/gource-{0}/gource-{0}.tar.gz' # NOQA: ignore=E501 - return tmp.format(version.dotted) - def configure_args(self): spec = self.spec return [ diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py index 4afce02f70..eb63d08dfd 100644 --- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py +++ b/var/spack/repos/builtin/packages/hdf5-blosc/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 __future__ import print_function import os import shutil import sys @@ -115,7 +115,7 @@ class Hdf5Blosc(Package): def check_install(self, spec): "Build and run a small program to test the installed HDF5 Blosc plugin" - print "Checking HDF5-Blosc plugin..." + print("Checking HDF5-Blosc plugin...") checkdir = "spack-check" with working_dir(checkdir, create=True): source = r"""\ @@ -188,16 +188,16 @@ Done. 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:" + 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") diff --git a/var/spack/repos/builtin/packages/htslib/package.py b/var/spack/repos/builtin/packages/htslib/package.py index 77829e71b9..20db1c918b 100644 --- a/var/spack/repos/builtin/packages/htslib/package.py +++ b/var/spack/repos/builtin/packages/htslib/package.py @@ -31,6 +31,8 @@ class Htslib(AutotoolsPackage): 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.4', '2a22ff382654c033c40e4ec3ea880050') version('1.3.1', '16d78f90b72f29971b042e8da8be6843') depends_on('zlib') + depends_on('bzip2', when="@1.4:") diff --git a/var/spack/repos/builtin/packages/httpie/package.py b/var/spack/repos/builtin/packages/httpie/package.py new file mode 100644 index 0000000000..0981dc2d3d --- /dev/null +++ b/var/spack/repos/builtin/packages/httpie/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 Httpie(PythonPackage): + """Modern command line HTTP client.""" + + homepage = "https://httpie.org/" + url = "https://pypi.io/packages/source/h/httpie/httpie-0.9.8.tar.gz" + + version('0.9.8', 'e0d1af07d0959a2e081e7954797ce260') + + variant('socks', default=True, + description='Enable SOCKS proxy support') + + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-pygments@2.1.3:', type=('build', 'run')) + depends_on('py-requests@2.11.0:', type=('build', 'run')) + depends_on('py-pysocks', type=('build', 'run'), when="+socks") + # Concretization problem breaks this. Unconditional for now... + # https://github.com/LLNL/spack/issues/3628 + # depends_on('py-argparse@1.2.1:', type=('build', 'run'), + # when='^python@:2.6,3.0:3.1') + depends_on('py-argparse@1.2.1:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 0030d5ffde..6efa2dfbd9 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -42,7 +42,7 @@ class Hwloc(AutotoolsPackage): homepage = "http://www.open-mpi.org/projects/hwloc/" url = "http://www.open-mpi.org/software/hwloc/v1.9/downloads/hwloc-1.9.tar.gz" list_url = "http://www.open-mpi.org/software/hwloc/" - list_depth = 3 + list_depth = 2 version('1.11.6', 'b4e95eadd2fbdb6d40bbd96be6f03c84') version('1.11.5', '8f5fe6a9be2eb478409ad5e640b2d3ba') diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py index 4461adae2e..fd894b68ee 100644 --- a/var/spack/repos/builtin/packages/hydra/package.py +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -34,6 +34,6 @@ class Hydra(AutotoolsPackage): homepage = "http://www.mpich.org" url = "http://www.mpich.org/static/downloads/3.2/hydra-3.2.tar.gz" list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 + list_depth = 1 version('3.2', '4d670916695bf7e3a869cc336a881b39') diff --git a/var/spack/repos/builtin/packages/ibmisc/package.py b/var/spack/repos/builtin/packages/ibmisc/package.py index f325205507..181ae6d92b 100644 --- a/var/spack/repos/builtin/packages/ibmisc/package.py +++ b/var/spack/repos/builtin/packages/ibmisc/package.py @@ -29,9 +29,9 @@ class Ibmisc(CMakePackage): """Misc. reusable utilities used by IceBin.""" homepage = "https://github.com/citibeth/ibmisc" - url = "https://github.com/citibeth/ibmisc/tarball/123" + url = "https://github.com/citibeth/ibmisc/archive/v0.1.0.tar.gz" - version('0.1.0', '12f2a32432a11db48e00217df18e59fa') + version('0.1.0', '18c63db3e466c5a6fc2db3f903d06ecb') variant('everytrace', default=False, description='Report errors through Everytrace') diff --git a/var/spack/repos/builtin/packages/icet/package.py b/var/spack/repos/builtin/packages/icet/package.py index f8260f1951..ca3251ac40 100644 --- a/var/spack/repos/builtin/packages/icet/package.py +++ b/var/spack/repos/builtin/packages/icet/package.py @@ -30,7 +30,7 @@ class Icet(CMakePackage): sort-last parallel rendering library.""" homepage = "http://icet.sandia.gov" - url = "https://example.com/icet-1.2.3.tar.gz" + url = "https://gitlab.kitware.com/icet/icet/repository/archive.tar.bz2?ref=IceT-2.1.1" version('develop', branch='master', git='https://gitlab.kitware.com/icet/icet.git') @@ -38,9 +38,5 @@ class Icet(CMakePackage): depends_on('mpi') - def url_for_version(self, version): - return ("https://gitlab.kitware.com/icet/icet/repository/" - "archive.tar.bz2?ref=IceT-{0}".format(version.dotted)) - def cmake_args(self): return ['-DICET_USE_OPENGL:BOOL=OFF'] diff --git a/var/spack/repos/builtin/packages/image-magick/package.py b/var/spack/repos/builtin/packages/image-magick/package.py index 9efb0cd368..e32f1967e2 100644 --- a/var/spack/repos/builtin/packages/image-magick/package.py +++ b/var/spack/repos/builtin/packages/image-magick/package.py @@ -45,9 +45,6 @@ class ImageMagick(Package): depends_on('ghostscript') depends_on('ghostscript-fonts') - def url_for_version(self, version): - return "https://github.com/ImageMagick/ImageMagick/archive/{0}.tar.gz".format(version) - def install(self, spec, prefix): gs_font_dir = join_path(spec['ghostscript-fonts'].prefix.share, "font") configure('--prefix={0}'.format(prefix), diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/intel-daal/package.py index 18ecfed7c2..011dec158e 100644 --- a/var/spack/repos/builtin/packages/daal/package.py +++ b/var/spack/repos/builtin/packages/intel-daal/package.py @@ -28,7 +28,7 @@ import os from spack.pkg.builtin.intel import IntelInstaller -class Daal(IntelInstaller): +class IntelDaal(IntelInstaller): """Intel Data Analytics Acceleration Library. Note: You will have to add the download file to a @@ -44,6 +44,8 @@ class Daal(IntelInstaller): version('2016.3.210', 'ad747c0dd97dace4cad03cf2266cad28', url="file://%s/l_daal_2016.3.210.tgz" % os.getcwd()) + provides('daal') + def install(self, spec, prefix): self.intel_prefix = os.path.join(prefix, "pkg") diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/intel-ipp/package.py index a9765e1a0a..3c37b2342f 100644 --- a/var/spack/repos/builtin/packages/ipp/package.py +++ b/var/spack/repos/builtin/packages/intel-ipp/package.py @@ -28,7 +28,7 @@ import os from spack.pkg.builtin.intel import IntelInstaller -class Ipp(IntelInstaller): +class IntelIpp(IntelInstaller): """Intel Integrated Performance Primitives. Note: You will have to add the download file to a @@ -42,6 +42,8 @@ class Ipp(IntelInstaller): version('9.0.3.210', '0e1520dd3de7f811a6ef6ebc7aa429a3', url="file://%s/l_ipp_9.0.3.210.tgz" % os.getcwd()) + provides('ipp') + def install(self, spec, prefix): self.intel_prefix = os.path.join(prefix, "pkg") diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py index 5e108a0867..59b66d63ad 100644 --- a/var/spack/repos/builtin/packages/intel-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl/package.py @@ -29,26 +29,18 @@ from spack.pkg.builtin.intel import IntelInstaller class IntelMkl(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://spack.readthedocs.io/en/latest/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. - """ + """Intel Math Kernel Library.""" homepage = "https://software.intel.com/en-us/intel-mkl" + version('2017.2.174', 'ef39a12dcbffe5f4a0ef141b8759208c', + url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11306/l_mkl_2017.2.174.tgz") version('2017.0.098', '3cdcb739ab5ab1e047eb130b9ffdd8d0', - url="file://%s/l_mkl_2017.0.098.tgz" % os.getcwd()) - version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65', - url="file://%s/l_mkl_11.3.2.181.tgz" % os.getcwd()) + url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9662/l_mkl_2017.0.098.tgz") version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34', - url="file://%s/l_mkl_11.3.3.210.tgz" % os.getcwd()) + url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9068/l_mkl_11.3.3.210.tgz") + version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65', + url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8711/l_mkl_11.3.2.181.tgz") variant('shared', default=True, description='Builds shared library') variant('ilp64', default=False, description='64 bit integers') diff --git a/var/spack/repos/builtin/packages/iozone/package.py b/var/spack/repos/builtin/packages/iozone/package.py new file mode 100644 index 0000000000..530c609f0d --- /dev/null +++ b/var/spack/repos/builtin/packages/iozone/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 Iozone(MakefilePackage): + """IOzone is a filesystem benchmark tool. The benchmark generates and + measures a variety of file operations. Iozone has been ported to many + machines and runs under many operating systems.""" + + homepage = "http://www.iozone.org/" + url = "http://www.iozone.org/src/current/iozone3_465.tar" + + version('3_465', 'c924e5e46fb1cf8145f420e8e57eb954') + + # TODO: Add support for other architectures as necessary + build_targets = ['linux-AMD64'] + + build_directory = 'src/current' + + def edit(self, spec, prefix): + with working_dir(self.build_directory): + filter_file(r'^CC\t= cc', + r'CC\t= {0}'.format(spack_cc), + 'makefile') + + def install(self, spec, prefix): + install_tree('docs', join_path(prefix, 'docs')) + + with working_dir(self.build_directory): + install_tree('.', prefix.bin) diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index 518a469435..8df01f4b67 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -45,10 +45,10 @@ class Jdk(Package): '-H', # specify required License Agreement cookie 'Cookie: oraclelicense=accept-securebackup-cookie'] - version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf', + version('8u66', '88f31f3d642c3287134297b8c10e61bf', url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz", curl_options=curl_options) - version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4', + version('8u92', '65a1cc17ea362453a6e0eb4f13be76e4', url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz", curl_options=curl_options) diff --git a/var/spack/repos/builtin/packages/jq/package.py b/var/spack/repos/builtin/packages/jq/package.py new file mode 100644 index 0000000000..28e1c4dcfb --- /dev/null +++ b/var/spack/repos/builtin/packages/jq/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Jq(AutotoolsPackage): + """jq is a lightweight and flexible command-line JSON processor.""" + + homepage = "https://stedolan.github.io/jq/" + url = "https://github.com/stedolan/jq/archive/jq-1.5.tar.gz" + + version('1.5', 'c8070bd6ec275404f77db3d2e568c9a3') + + depends_on('oniguruma') + depends_on('bison@3.0:', type='build') diff --git a/var/spack/repos/builtin/packages/kaldi/package.py b/var/spack/repos/builtin/packages/kaldi/package.py new file mode 100644 index 0000000000..3cf25df46b --- /dev/null +++ b/var/spack/repos/builtin/packages/kaldi/package.py @@ -0,0 +1,107 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +from distutils.dir_util import copy_tree +from os.path import join +from fnmatch import fnmatch +import os + + +class Kaldi(Package): # Does not use Autotools + """Kaldi is a toolkit for speech recognition written + in C++ and licensed under the Apache License v2.0. + Kaldi is intended for use by speech recognition researchers.""" + + homepage = "https://github.com/kaldi-asr/kaldi" + url = "https://github.com/kaldi-asr/kaldi/archive/master.zip" + + version('master', git='https://github.com/kaldi-asr/kaldi.git') + + variant('shared', default=True, + description='build shared libraries') + variant('double', default=False, + description='build with double precision floats') + variant('cuda', default=False, + description='build with CUDA') + + depends_on('blas') + depends_on('speex') + depends_on('openfst@1.6:') + depends_on('cuda', when='+cuda') + depends_on('sph2pipe', type='run') + depends_on('sctk', type='run') + + def install(self, spec, prefix): + configure_args = [ + '--threaded-math', + '--speex-root=' + spec['speex'].prefix, + '--fst-root=' + spec['openfst'].prefix, + '--fst-version=' + str(spec['openfst'].version) + ] + + if '~shared' in spec: + configure_args.append('--static') + else: + configure_args.append('--shared') + + if '^openblas' in spec: + configure_args.append('--mathlib=OPENBLAS') + configure_args.append('--openblas-root=' + spec['blas'].prefix) + if '+openmp' in spec['blas'].variants: + configure_args.append('--threaded-math') + elif '^atlas' in spec: + configure_args.append('--mathlib=ATLAS') + configure_args.append('--atlas-root=' + spec['blas'].prefix) + if '+pthread' in spec['blas'].variants: + configure_args.append('--threaded-atlas') + elif '^intel-parallel-studio' in spec or '^intel-mkl' in spec: + configure_args.append('--mathlib=MKL') + configure_args.append('--mkl-root=' + spec['blas'].prefix) + if '+openmp' in spec['blas'].variants: + configure_args.append('--mkl-threading=iomp') + + if '+cuda' in spec: + configure_args.append('--use-cuda=yes') + configure_args.append('--cudatk-dir=' + spec['cuda'].prefix) + + with working_dir("src"): + configure(*configure_args) + make() + + mkdirp(prefix.bin) + for root, dirs, files in os.walk('bin'): + for name in files: + if os.access(join(root, name), os.X_OK): + install(join(root, name), prefix.bin) + + mkdir(prefix.lib) + copy_tree('lib', prefix.lib) + + for root, dirs, files in os.walk('.'): + for name in files: + if fnmatch(name, '*.h'): + mkdirp(join(prefix.include, root.strip("./"))) + install(join(root, name), + join(prefix.include, root.strip("./"))) diff --git a/var/spack/repos/builtin/packages/libedit/package.py b/var/spack/repos/builtin/packages/libedit/package.py index 5dcee61cab..6887d67101 100644 --- a/var/spack/repos/builtin/packages/libedit/package.py +++ b/var/spack/repos/builtin/packages/libedit/package.py @@ -30,7 +30,11 @@ class Libedit(AutotoolsPackage): 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-20160903', '0467d27684c453a351fbcefebbcb16a3') + version('3.1-20150325', '43cdb5df3061d78b5e9d59109871b4f6') depends_on('ncurses') + + def url_for_version(self, version): + url = "http://thrysoee.dk/editline/libedit-{0}-{1}.tar.gz" + return url.format(version[-1], version.up_to(-1)) diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py index adce0b7515..c70d8b56fd 100644 --- a/var/spack/repos/builtin/packages/libgd/package.py +++ b/var/spack/repos/builtin/packages/libgd/package.py @@ -56,7 +56,3 @@ class Libgd(AutotoolsPackage): depends_on('libpng') depends_on('libtiff') depends_on('fontconfig') - - def url_for_version(self, version): - url = "https://github.com/libgd/libgd/releases/download/gd-{0}/libgd-{0}.tar.gz" - return url.format(version) diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py index 2ad5e93191..569aa68b68 100644 --- a/var/spack/repos/builtin/packages/libint/package.py +++ b/var/spack/repos/builtin/packages/libint/package.py @@ -25,25 +25,27 @@ from spack import * -class Libint(Package): +class Libint(AutotoolsPackage): """Libint is a high-performance library for computing - Gaussian integrals in quantum mechanics.""" + Gaussian integrals in quantum mechanics. + """ homepage = "https://github.com/evaleev/libint" - url = "https://github.com/evaleev/libint/archive/v2.1.0.tar.gz" + url = "https://github.com/evaleev/libint/archive/v2.1.0.tar.gz" + version('2.2.0', 'da37dab862fb0b97a7ed7d007695ef47') version('2.1.0', 'd0dcb985fe32ddebc78fe571ce37e2d6') version('1.1.6', '990f67b55f49ecc18f32c58da9240684') version('1.1.5', '379b7d0718ff398715d6898807adf628') # Build dependencies depends_on('autoconf@2.52:', type='build') - depends_on('automake', type='build') - depends_on('libtool', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') # Libint 2 dependencies depends_on('boost', when='@2:') - depends_on('gmp', when='@2:') + depends_on('gmp', when='@2:') def url_for_version(self, version): base_url = "https://github.com/evaleev/libint/archive" @@ -54,16 +56,14 @@ class Libint(Package): else: return "{0}/v{1}.tar.gz".format(base_url, version) - def install(self, spec, prefix): - # Generate configure + def autoreconf(self, spec, prefix): libtoolize() aclocal('-I', 'lib/autoconf') autoconf() - config_args = [ - '--prefix={0}'.format(prefix), - '--enable-shared' - ] + def configure_args(self): + + config_args = ['--enable-shared'] # Optimizations for the Intel compiler, suggested by CP2K optflags = '-O2' @@ -93,12 +93,4 @@ class Libint(Package): '--with-libint-max-am=5', '--with-libderiv-max-am1=4' ]) - - configure(*config_args) - make() - - # Testing suite was added in libint 2 - if self.version >= Version('2.0.0'): - make('check') - - make('install') + return config_args diff --git a/var/spack/repos/builtin/packages/libpfm4/package.py b/var/spack/repos/builtin/packages/libpfm4/package.py new file mode 100644 index 0000000000..c7463afeeb --- /dev/null +++ b/var/spack/repos/builtin/packages/libpfm4/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 Libpfm4(MakefilePackage): + """libpfm4 is a userspace library to help + setup performance events for use with + the perf_events Linux kernel interface.""" + + homepage = "http://perfmon2.sourceforge.net" + url = "https://downloads.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.8.0.tar.gz" + + version('4.8.0', '730383896db92e12fb2cc10f2d41dd43') + + # Fails to build libpfm4 with intel compiler version 16 and 17 + conflicts('%intel@16:17') + + @property + def install_targets(self): + return ['DESTDIR={0}'.format(self.prefix), + 'LIBDIR=/lib', + 'INCDIR=/include', + 'MANDIR=/man', + 'LDCONFIG=true', + 'install'] diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py index a7e3ab10ae..6d21d65345 100644 --- a/var/spack/repos/builtin/packages/libsodium/package.py +++ b/var/spack/repos/builtin/packages/libsodium/package.py @@ -30,6 +30,7 @@ class Libsodium(AutotoolsPackage): decryption, signatures, password hashing and more.""" homepage = "https://download.libsodium.org/doc/" url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.11.tar.gz" + list_url = "https://download.libsodium.org/libsodium/releases/old" version('1.0.11', 'b58928d035064b2a46fb564937b83540') version('1.0.10', 'ea89dcbbda0b2b6ff6a1c476231870dd') diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py index abc5dc5cde..8552d3c2f0 100644 --- a/var/spack/repos/builtin/packages/libxsmm/package.py +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -32,10 +32,11 @@ class Libxsmm(Package): and small convolutions.''' homepage = 'https://github.com/hfp/libxsmm' - url = 'https://github.com/hfp/libxsmm/archive/1.7.1.tar.gz' + url = 'https://github.com/hfp/libxsmm/archive/1.8.tar.gz' version('develop', git='https://github.com/hfp/libxsmm.git') + version('1.8', '2d513afbdad99e5d04c6c4ab4c9bb25b') version('1.7.1', 'a938335b1c2c90616dc72c2c1a5824ab') version('1.7', 'cb3aff6d123ba70bd3d4daf575767d14') version('1.6.6', '8b45ae022f36b8c212f579a0952b5034') diff --git a/var/spack/repos/builtin/packages/libxstream/package.py b/var/spack/repos/builtin/packages/libxstream/package.py index 3201b58620..0996e6b9e8 100644 --- a/var/spack/repos/builtin/packages/libxstream/package.py +++ b/var/spack/repos/builtin/packages/libxstream/package.py @@ -31,9 +31,9 @@ class Libxstream(Package): conditions.''' homepage = 'https://github.com/hfp/libxstream' - url = 'https://github.com/hfp/libxstream.git' + url = 'https://github.com/hfp/libxstream/archive/0.9.0.tar.gz' - version('0.9.0', git='https://github.com/hfp/libxstream.git') + version('0.9.0', 'fd74b7cf5f145ff4925d91be2809571c') def patch(self): kwargs = {'ignore_absent': False, 'backup': True, 'string': True} diff --git a/var/spack/repos/builtin/packages/libzip/package.py b/var/spack/repos/builtin/packages/libzip/package.py new file mode 100644 index 0000000000..e3dc9ab2bb --- /dev/null +++ b/var/spack/repos/builtin/packages/libzip/package.py @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Libzip(AutotoolsPackage): + """libzip is a C library for reading, creating, + and modifying zip archives.""" + + homepage = "https://nih.at/libzip/index.html" + url = "https://nih.at/libzip/libzip-1.2.0.tar.gz" + + version('1.2.0', '5c3372ab3a7897295bfefb27f745cf69') diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py index 8b83f216b6..7cc42e0f28 100644 --- a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py +++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py @@ -33,13 +33,17 @@ class LlvmOpenmpOmpt(Package): homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" + # tr4-stable branch + version('3.9.2b2', + git='https://github.com/OpenMPToolsInterface/LLVM-openmp.git', + commit='5cdca5dd3c0c336d42a335ca7cff622e270c9d47') # align-to-tr-rebased branch version('3.9.2b', git='https://github.com/OpenMPToolsInterface/LLVM-openmp.git', commit='982a08bcf3df9fb5afc04ac3bada47f19cc4e3d3') depends_on('cmake', type='build') - depends_on('llvm+clang~gold') + depends_on('llvm') depends_on('ninja', type='build') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index 7b17d5db5f..b2624bb362 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -38,6 +38,7 @@ class Lmod(AutotoolsPackage): homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' url = 'https://github.com/TACC/Lmod/archive/7.3.tar.gz' + version('7.4.1', '59b2558ee50877f2cf49ed37d7b09fea') version('7.3', '70180ec2ea1fae53aa83350523f6b2b3') version('6.4.5', '14f6c58dbc0a5a75574d795eac2c1e3c') version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4') diff --git a/var/spack/repos/builtin/packages/meep/package.py b/var/spack/repos/builtin/packages/meep/package.py index 2c1018e711..00b9c4ea09 100644 --- a/var/spack/repos/builtin/packages/meep/package.py +++ b/var/spack/repos/builtin/packages/meep/package.py @@ -30,6 +30,8 @@ class Meep(Package): software package developed at MIT to model electromagnetic systems.""" homepage = "http://ab-initio.mit.edu/wiki/index.php/Meep" + url = "http://ab-initio.mit.edu/meep/meep-1.3.tar.gz" + list_url = "http://ab-initio.mit.edu/meep/old" version('1.3', '18a5b9e18008627a0411087e0bb60db5') version('1.2.1', '9be2e743c3a832ae922de9d955d016c5') diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index f15d544b7b..c927c22a1b 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -37,7 +37,8 @@ class Metis(Package): partitioning schemes.""" homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" - base_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis" + url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" + list_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD" version('5.1.0', '5465e67079419a69e0116de24fce58fe') version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5') @@ -55,12 +56,11 @@ class Metis(Package): patch('install_gklib_defs_rename.patch', when='@5:') def url_for_version(self, version): - verdir = 'OLD/' if version < Version('4.0.3') else '' - return '%s/%smetis-%s.tar.gz' % (Metis.base_url, verdir, version) - - @when('@:4') - def patch(self): - pass + url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis" + if version < Version('4.0.3'): + url += "/OLD" + url += "/metis-{0}.tar.gz".format(version) + return url @when('@5:') def patch(self): @@ -84,7 +84,7 @@ class Metis(Package): filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_path, 'GKlib', 'error.c')) - @when('@:4') + @when('@:4') # noqa: F811 def install(self, spec, prefix): # Process library spec and options if any('+{0}'.format(v) in spec for v in ['gdb', 'int64', 'real64']): @@ -175,7 +175,7 @@ class Metis(Package): Executable(test_bin('mesh2dual'))(test_graph('metis.mesh')) """ - @when('@5:') + @when('@5:') # noqa: F811 def install(self, spec, prefix): source_directory = self.stage.source_path build_directory = join_path(source_directory, 'build') @@ -187,7 +187,7 @@ class Metis(Package): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') else: - # Remove all RPATH options + # Remove all RPATH options # (RPATHxxx options somehow trigger cmake to link dynamically) rpath_options = [] for o in options: diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index a25583e164..b3fe5197a0 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -31,15 +31,32 @@ class Mfem(Package): homepage = 'http://www.mfem.org' url = 'https://github.com/mfem/mfem' + # mfem is downloaded from a URL shortener at request of upstream + # author Tzanio Kolev <tzanio@llnl.gov>. See here: + # https://github.com/mfem/mfem/issues/53 + # + # The following procedure should be used to verify security when a + # new verison is added: + # + # 1. Verify that no checksums on old versions have changed. + # + # 2. Verify that the shortened URL for the new version is listed at: + # http://mfem.org/download/ + # + # 3. Use http://getlinkinfo.com or similar to verify that the + # underling download link for the latest version comes has the + # prefix: http://mfem.github.io/releases + # + # If this quick verification procedure fails, additional discussion + # will be required to verify the new version. + version('3.2', '2938c3deed4ec4f7fd5b5f5cfe656845282e86e2dcd477d292390058b7b94340', - url='http://goo.gl/Y9T75B', preferred=True, extension='.tar.gz') + url='http://goo.gl/Y9T75B', extension='.tar.gz') version('3.1', '841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57', url='http://goo.gl/xrScXn', extension='.tar.gz') -# 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') diff --git a/var/spack/repos/builtin/packages/miniconda2/package.py b/var/spack/repos/builtin/packages/miniconda2/package.py new file mode 100644 index 0000000000..d23ab080b0 --- /dev/null +++ b/var/spack/repos/builtin/packages/miniconda2/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 * +from six.moves.urllib.parse import urlparse +from os.path import split + + +class Miniconda2(Package): + """The minimalist bootstrap toolset for conda and Python2.""" + + homepage = "https://conda.io/miniconda.html" + url = "https://repo.continuum.io/miniconda/Miniconda2-4.3.11-Linux-x86_64.sh" + + version('4.3.11', 'd573980fe3b5cdf80485add2466463f5', expand=False) + + def install(self, spec, prefix): + # peel the name of the script out of the url + result = urlparse(self.url) + dir, script = split(result.path) + bash = which('bash') + bash(script, '-b', '-f', '-p', self.prefix) diff --git a/var/spack/repos/builtin/packages/miniconda3/package.py b/var/spack/repos/builtin/packages/miniconda3/package.py new file mode 100644 index 0000000000..8184c10d88 --- /dev/null +++ b/var/spack/repos/builtin/packages/miniconda3/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 * +from six.moves.urllib.parse import urlparse +from os.path import split + + +class Miniconda3(Package): + """The minimalist bootstrap toolset for conda and Python3.""" + + homepage = "https://conda.io/miniconda.html" + url = "https://repo.continuum.io/miniconda/Miniconda3-4.3.11-Linux-x86_64.sh" + + version('4.3.11', '1924c8d9ec0abf09005aa03425e9ab1a', expand=False) + + def install(self, spec, prefix): + # peel the name of the script out of the url + result = urlparse(self.url) + dir, script = split(result.path) + bash = which('bash') + bash(script, '-b', '-f', '-p', self.prefix) diff --git a/var/spack/repos/builtin/packages/mitos/package.py b/var/spack/repos/builtin/packages/mitos/package.py index d577a1b285..4ccddb3592 100644 --- a/var/spack/repos/builtin/packages/mitos/package.py +++ b/var/spack/repos/builtin/packages/mitos/package.py @@ -30,13 +30,12 @@ class Mitos(Package): performance data to view with MemAxes""" homepage = "https://github.com/llnl/Mitos" - url = "https://github.com/llnl/Mitos" + url = "https://github.com/LLNL/Mitos/archive/v0.9.1.tar.gz" version('0.9.2', git='https://github.com/llnl/Mitos.git', commit='8cb143a2e8c00353ff531a781a9ca0992b0aaa3d') - - version('0.9.1', git='https://github.com/llnl/Mitos.git', tag='v0.9.1') + version('0.9.1', 'c6cb57f3cae54f5157affd97ef7ef79e') depends_on('dyninst@8.2.1:') depends_on('hwloc') diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py index b783d7b81b..14925cfd3e 100644 --- a/var/spack/repos/builtin/packages/moab/package.py +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -35,7 +35,7 @@ class Moab(Package): mesh in chunks rather than through individual entities, while also versatile enough to support individual entity access.""" homepage = "https://bitbucket.org/fathomteam/moab" - url = "http://ftp.mcs.anl.gov/pub/fathom/moab-4.6.3.tar.gz" + url = "http://ftp.mcs.anl.gov/pub/fathom/moab-4.9.1.tar.gz" version('4.9.1', '19cc2189fa266181ad9109b18d0b2ab8') version('4.9.0', '40695d0a159040683cfa05586ad4a7c2') diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 09fc683874..819fc95d5b 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -32,7 +32,7 @@ class Mpich(AutotoolsPackage): 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/" - list_depth = 2 + list_depth = 1 version('3.2', 'f414cfa77099cd1fa1a5ae4e22db508a') version('3.1.4', '2ab544607986486562e076b83937bba2') diff --git a/var/spack/repos/builtin/packages/mummer/package.py b/var/spack/repos/builtin/packages/mummer/package.py new file mode 100644 index 0000000000..49533ed95e --- /dev/null +++ b/var/spack/repos/builtin/packages/mummer/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 Mummer(Package): + """MUMmer is a system for rapidly aligning entire genomes.""" + + homepage = "http://mummer.sourceforge.net/" + url = "https://sourceforge.net/projects/mummer/files/mummer/3.23/MUMmer3.23.tar.gz/download" + + version('3.23', 'f2422b3d2638dba4baedb71b1acdffa2') + + depends_on('gnuplot') + + def install(self, spec, prefix): + if self.run_tests: + make('check') + make('install') + mkdirp(prefix.bin) + + bins = ["show-tiling", "show-snps", "show-coords", "show-aligns", + "show-diff", "delta-filter", "combineMUMs", "mummer", + "repeat-match", "annotate", "mgaps", "gaps", "dnadiff", + "nucmer2xfig", "run-mummer3", "mummerplot", "promer", + "run-mummer1", "nucmer", "mapview", "exact-tandems"] + aux_bins = ["aux_bin/postnuc", "aux_bin/postpro", + "aux_bin/prenuc", "aux_bin/prepro"] + + for b in bins: + install(b, join_path(prefix.bin, b)) + for b in aux_bins: + install(b, join_path(prefix.bin, b[8:])) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 55b593f623..7c10287729 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -30,8 +30,13 @@ class Mvapich2(Package): """MVAPICH2 is an MPI implementation for Infiniband networks.""" homepage = "http://mvapich.cse.ohio-state.edu/" url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2.tar.gz" + list_url = "http://mvapich.cse.ohio-state.edu/downloads/" - version('2.2', '939b65ebe5b89a5bc822cdab0f31f96e') + # Newer alpha release + version('2.3a', '87c3fbf8a755b53806fa9ecb21453445') + + # Prefer the latest stable release + version('2.2', '939b65ebe5b89a5bc822cdab0f31f96e', preferred=True) version('2.1', '0095ceecb19bbb7fb262131cb9c2cdd6') version('2.0', '9fbb68a4111a8b6338e476dc657388b4') version('1.9', '5dc58ed08fd3142c260b70fe297e127c') diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py index fcb7959678..435fd748b3 100644 --- a/var/spack/repos/builtin/packages/mxml/package.py +++ b/var/spack/repos/builtin/packages/mxml/package.py @@ -31,8 +31,8 @@ class Mxml(AutotoolsPackage): non-standard libraries. """ - homepage = "http://www.msweet.org" - url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" + homepage = "http://michaelrsweet.github.io/mxml/" + url = "https://github.com/michaelrsweet/mxml/releases/download/release-2.10/mxml-2.10.tar.gz" version('2.10', '8804c961a24500a95690ef287d150abe') version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19') diff --git a/var/spack/repos/builtin/packages/nccl/package.py b/var/spack/repos/builtin/packages/nccl/package.py index b68d3429d1..52be43aa25 100644 --- a/var/spack/repos/builtin/packages/nccl/package.py +++ b/var/spack/repos/builtin/packages/nccl/package.py @@ -37,5 +37,9 @@ class Nccl(MakefilePackage): depends_on('cuda') @property + def build_targets(self): + return ['CUDA_HOME={0}'.format(self.spec['cuda'].prefix)] + + @property def install_targets(self): return ['PREFIX={0}'.format(self.prefix), 'install'] diff --git a/var/spack/repos/builtin/packages/ncftp/package.py b/var/spack/repos/builtin/packages/ncftp/package.py new file mode 100644 index 0000000000..8b515af242 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncftp/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Ncftp(AutotoolsPackage): + """NcFTP Client is a set of application programs implementing the + File Transfer Protocol.""" + + homepage = "http://www.ncftp.com/" + url = "ftp://ftp.ncftp.com/ncftp/ncftp-3.2.6-src.tar.gz" + + version('3.2.6', 'e7cce57ef6274d4c7433ffe28ffe0a71') + + depends_on('ncurses') diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index 9f834eee3b..b7394cff32 100644 --- a/var/spack/repos/builtin/packages/ncl/package.py +++ b/var/spack/repos/builtin/packages/ncl/package.py @@ -229,6 +229,6 @@ class Ncl(Package): if os.path.exists(filename): try: os.remove(filename) - except OSError, e: + except OSError as e: raise InstallError('Failed to delete file %s: %s' % ( e.filename, e.strerror)) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 6a97180328..e860926f96 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -26,7 +26,7 @@ from spack import * import sys -class NetlibScalapack(Package): +class NetlibScalapack(CMakePackage): """ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines """ @@ -60,12 +60,16 @@ class NetlibScalapack(Package): @property def scalapack_libs(self): + # Note that the default will be to search + # for 'libnetlib-scalapack.<suffix>' shared = True if '+shared' in self.spec else False return find_libraries( 'libscalapack', root=self.prefix, shared=shared, recurse=True ) - def install(self, spec, prefix): + def cmake_args(self): + spec = self.spec + options = [ "-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else 'OFF'), @@ -89,13 +93,10 @@ class NetlibScalapack(Package): "-DCMAKE_Fortran_FLAGS=-fPIC" ]) - options.extend(std_cmake_args) - - with working_dir('spack-build', create=True): - cmake('..', *options) - make() - make("install") + return options + @run_after('install') + def fix_darwin_install(self): # The shared libraries are not installed correctly on Darwin: - if (sys.platform == 'darwin') and ('+shared' in spec): - fix_darwin_install_name(prefix.lib) + if (sys.platform == 'darwin') and ('+shared' in self.spec): + fix_darwin_install_name(self.spec.prefix.lib) diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py index 2b6693a18c..e9df8489c9 100644 --- a/var/spack/repos/builtin/packages/nettle/package.py +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -30,7 +30,7 @@ class Nettle(AutotoolsPackage): that is designed to fit easily in many contexts.""" homepage = "https://www.lysator.liu.se/~nisse/nettle/" - url = "http://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz" + url = "http://ftp.gnu.org/gnu/nettle/nettle-3.2.tar.gz" version('3.2', 'afb15b4764ebf1b4e6d06c62bd4d29e4') version('2.7.1', '003d5147911317931dd453520eb234a5') diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py index 54f3dbf915..05f21f70b7 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -29,9 +29,13 @@ class Nextflow(Package): """Data-driven computational pipelines""" homepage = "http://www.nextflow.io" + url = "https://github.com/nextflow-io/nextflow/releases/download/v0.24.1/nextflow" + version('0.24.1', '80ec8c4fe8e766e0bdd1371a50410d1d', + expand=False) + version('0.23.3', '71fb69275b6788af1c6f1165f40d362e', + expand=False) version('0.20.1', '0e4e0e3eca1c2c97f9b4bffd944b923a', - url='https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow', expand=False) depends_on('jdk') diff --git a/var/spack/repos/builtin/packages/nwchem/package.py b/var/spack/repos/builtin/packages/nwchem/package.py index f39d8ad0c7..3a8be3f56e 100644 --- a/var/spack/repos/builtin/packages/nwchem/package.py +++ b/var/spack/repos/builtin/packages/nwchem/package.py @@ -68,7 +68,7 @@ class Nwchem(Package): ] } # Iterate over patches - for condition, urls in urls_for_patches.iteritems(): + for condition, urls in urls_for_patches.items(): for url, md5 in urls: patch(url, when=condition, level=0, md5=md5) diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index c3488c137a..950621da40 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -32,6 +32,7 @@ class Oce(Package): Open CASCADE library. """ homepage = "https://github.com/tpaviot/oce" + url = "https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz" version('0.18', '226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993') version('0.17.2', 'bf2226be4cd192606af677cf178088e5') @@ -46,10 +47,6 @@ class Oce(Package): depends_on('cmake@2.8:', type='build') depends_on('tbb', when='+tbb') - def url_for_version(self, version): - return 'https://github.com/tpaviot/oce/archive/OCE-%s.tar.gz' % ( - version.dotted) - # There is a bug in OCE which appears with Clang (version?) or GCC 6.0 # and has to do with compiler optimization, see # https://github.com/tpaviot/oce/issues/576 diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py index 88350f50bc..8999b081e3 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -30,17 +30,11 @@ class Octopus(Package): theory code.""" homepage = "http://www.tddft.org/programs/octopus/" - base_url = "http://www.tddft.org/programs/octopus/down.php?file=" + url = "http://www.tddft.org/programs/octopus/down.php?file=6.0/octopus-6.0.tar.gz" version('6.0', '5d1168c2a8d7fd9cb9492eaebaa7182e') version('5.0.1', '2b6392ab67b843f9d4ca7413fc07e822') - # Sample url is: - # "http://www.tddft.org/programs/octopus/down.php?file=5.0.1/octopus-5.0.1.tar.gz" - def url_for_version(self, version): - return '{0}/{1}/octopus-{1}.tar.gz'.format(Octopus.base_url, - version.dotted) - variant('scalapack', default=False, description='Compile with Scalapack') variant('metis', default=True, diff --git a/var/spack/repos/builtin/packages/oniguruma/package.py b/var/spack/repos/builtin/packages/oniguruma/package.py new file mode 100644 index 0000000000..8a5b8005b6 --- /dev/null +++ b/var/spack/repos/builtin/packages/oniguruma/package.py @@ -0,0 +1,34 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Oniguruma(AutotoolsPackage): + """Regular expression library.""" + + homepage = "https://github.com/kkos/oniguruma" + url = "https://github.com/kkos/oniguruma/releases/download/v6.1.3/onig-6.1.3.tar.gz" + + version('6.1.3', '2d105d352c3f852d662414f639e7e859') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index b6a81c2055..6e16174563 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -59,6 +59,8 @@ class Openblas(MakefilePackage): parallel = False + conflicts('%intel@16', when='@0.2.15:0.2.19') + @run_before('edit') def check_compilers(self): # As of 06/2016 there is no mechanism to specify that packages which @@ -76,6 +78,12 @@ class Openblas(MakefilePackage): 'OpenBLAS does not support OpenMP with clang!' ) + spec = self.spec + if spec.satisfies('%clang@8.1.0:') and spec.satisfies('@:0.2.19'): + raise InstallError( + 'OpenBLAS @:0.2.19 does not build with Apple clang@8.1.0:' + ) + @property def make_defs(self): # Configure fails to pick up fortran from FC=/abs/path/to/f77, but diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch new file mode 100644 index 0000000000..b9e87a7ec8 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch @@ -0,0 +1,503 @@ +--- OpenFOAM-v1612+.orig/bin/foamEtcFile 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/bin/foamEtcFile 2017-03-23 10:08:37.296887070 +0100 +@@ -4,7 +4,7 @@ + # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + # \\ / O peration | + # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation +-# \\/ M anipulation | ++# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. + #------------------------------------------------------------------------------- + # License + # This file is part of OpenFOAM. +@@ -26,7 +26,7 @@ + # foamEtcFile + # + # Description +-# Locate user/group/shipped file with semantics similar to the ++# Locate user/group/other files with semantics similar to the + # ~OpenFOAM/fileName expansion. + # + # The -mode option can be used to allow chaining from +@@ -34,40 +34,53 @@ + # + # For example, within the user ~/.OpenFOAM/<VER>/prefs.sh: + # \code +-# foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile -m go prefs.sh` \ +-# && _foamSource $foamPrefs ++# eval $(foamEtcFile -sh -mode=go prefs.sh) + # \endcode + # ++# Environment ++# - WM_PROJECT: (unset defaults to OpenFOAM) ++# - WM_PROJECT_SITE: (unset defaults to PREFIX/site) ++# - WM_PROJECT_VERSION: (unset defaults to detect from path) ++# + # Note +-# This script must exist in $FOAM_INST_DIR/OpenFOAM-<VERSION>/bin/ +-# or $FOAM_INST_DIR/openfoam<VERSION>/bin/ (for the debian version) ++# This script must exist in one of these locations: ++# - $WM_PROJECT_INST_DIR/OpenFOAM-<VERSION>/bin ++# - $WM_PROJECT_INST_DIR/openfoam-<VERSION>/bin ++# - $WM_PROJECT_INST_DIR/OpenFOAM+<VERSION>/bin ++# - $WM_PROJECT_INST_DIR/openfoam+<VERSION>/bin ++# - $WM_PROJECT_INST_DIR/openfoam<VERSION>/bin (debian version) + # + #------------------------------------------------------------------------------- ++unset optQuiet optSilent + usage() { + [ "${optQuiet:-$optSilent}" = true ] && exit 1 +- + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<<USAGE + +-Usage: ${0##*/} [OPTION] fileName +- ${0##*/} [OPTION] -list ++Usage: foamEtcFile [OPTION] fileName ++ foamEtcFile [OPTION] [-list|-list-test] [fileName] + options: +- -all return all files (otherwise stop after the first match) +- -list list the directories to be searched +- -mode <mode> any combination of u(user), g(group), o(other) +- -prefix <dir> specify an alternative installation prefix +- -quiet suppress all normal output +- -silent suppress all stderr output +- -version <ver> specify an alternative OpenFOAM version +- in the form Maj.Min.Rev (eg, 1.7.0) +- -help print the usage ++ -a, -all Return all files (otherwise stop after the first match) ++ -l, -list List directories or files to be checked ++ -list-test List (existing) directories or files to be checked ++ -mode=MODE Any combination of u(user), g(group), o(other) ++ -prefix=DIR Specify an alternative installation prefix ++ -version=VER Specify alternative OpenFOAM version (eg, 3.0, 1612, ...) ++ -csh | -sh Produce output suitable for a csh or sh 'eval' ++ -csh-verbose | -sh-verbose ++ As per -csh | -sh, with additional verbosity ++ -q, -quiet Suppress all normal output ++ -s, -silent Suppress stderr, except -csh-verbose, -sh-verbose output ++ -help Print the usage + +- Locate user/group/shipped file with semantics similar to the ++ Locate user/group/other file with semantics similar to the + ~OpenFOAM/fileName expansion. + +- The options can also be specified as a single character +- (eg, '-q' instead of '-quiet'), but must not be grouped. ++ Single character options must not be grouped. Equivalent options: ++ -mode=MODE, -mode MODE, -m MODE ++ -prefix=DIR, -prefix DIR, -p DIR ++ -version=VER, -version VER, -v VER + + Exit status + 0 when the file is found. Print resolved path to stdout. +@@ -78,61 +91,117 @@ + exit 1 + } + +-#------------------------------------------------------------------------------- ++# Report error and exit ++die() ++{ ++ [ "${optQuiet:-$optSilent}" = true ] && exit 1 ++ exec 1>&2 ++ echo ++ echo "Error encountered:" ++ while [ "$#" -ge 1 ]; do echo " $1"; shift; done ++ echo ++ echo "See 'foamEtcFile -help' for usage" ++ echo ++ exit 1 ++} + +-# the bin dir: +-binDir="${0%/*}" ++#------------------------------------------------------------------------------- ++binDir="${0%/*}" # The bin dir ++projectDir="${binDir%/bin}" # The project dir ++prefixDir="${projectDir%/*}" # The prefix dir (same as $WM_PROJECT_INST_DIR) + +-# the project dir: ++# Could not resolve projectDir, prefixDir? (eg, called as ./bin/foamEtcFile) ++if [ "$prefixDir" = "$projectDir" ] ++then ++ binDir="$(cd $binDir && pwd -L)" + projectDir="${binDir%/bin}" +- +-# the prefix dir (same as $FOAM_INST_DIR): + prefixDir="${projectDir%/*}" ++fi ++projectDirName="${projectDir##*/}" # The project directory name + +-# the name used for the project directory +-projectDirName="${projectDir##*/}" ++projectName="${WM_PROJECT:-OpenFOAM}" # The project name ++projectVersion="$WM_PROJECT_VERSION" # Empty? - will be treated later + +-# version number used for debian packaging +-unset versionNum + ++#------------------------------------------------------------------------------- ++ ++# Guess project version or simply get the stem part of the projectDirName. ++# Handle standard and debian naming conventions. + # +-# handle standard and debian naming convention ++# - projectVersion: update unless already set + # +-case "$projectDirName" in +-OpenFOAM-*) # standard naming convention OpenFOAM-<VERSION> +- version="${projectDirName##OpenFOAM-}" +- ;; ++# Helper variables: ++# - dirBase (for reassembling name) == projectDirName without the version ++# - versionNum (debian packaging) ++unset dirBase versionNum ++guessVersion() ++{ ++ local version + +-openfoam[0-9]* | openfoam-dev) # debian naming convention 'openfoam<VERSION>' +- versionNum="${projectDirName##openfoam}" +- case "$versionNum" in +- ??) # convert 2 digit version number to decimal delineated +- version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)@\1.\2@') +- ;; +- ???) # convert 3 digit version number to decimal delineated +- version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)@\1.\2.\3@') +- ;; +- ????) # convert 4 digit version number to decimal delineated +- version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)\(.\)@\1.\2.\3.\4@') +- ;; +- *) # failback - use current environment setting +- version="$WM_PROJECT_VERSION" ++ case "$projectDirName" in ++ (OpenFOAM-* | openfoam-*) ++ # Standard naming: OpenFOAM-<VERSION> or openfoam-<VERSION> ++ dirBase="${projectDirName%%-*}-" ++ version="${projectDirName#*-}" ++ version="${version%%*-}" # Extra safety, eg openfoam-version-packager ++ ;; ++ ++ (OpenFOAM+* | openfoam+*) ++ # Alternative naming: OpenFOAM+<VERSION> or openfoam+<VERSION> ++ dirBase="${projectDirName%%+*}+" ++ version="${projectDirName#*+}" ++ version="${version%%*-}" # Extra safety, eg openfoam-version-packager ++ ;; ++ ++ (openfoam[0-9]*) ++ # Debian naming: openfoam<VERSION> ++ dirBase="openfoam" ++ version="${projectDirName#openfoam}" ++ versionNum="$version" ++ ++ # Convert digits version number to decimal delineated ++ case "${#versionNum}" in (2|3|4) ++ version=$(echo "$versionNum" | sed -e 's@\([0-9]\)@\1.@g') ++ version="${version%.}" + ;; + esac ++ ++ # Ignore special treatment if no decimals were inserted. ++ [ "${#version}" -gt "${#versionNum}" ] || unset versionNum + ;; + +-*) +- echo "Error : unknown/unsupported naming convention" +- exit 1 ++ (*) ++ die "unknown/unsupported naming convention for '$projectDirName'" + ;; + esac + ++ # Set projectVersion if required ++ : ${projectVersion:=$version} ++} ++ ++ ++# Set projectVersion and update versionNum, projectDirName accordingly ++setVersion() ++{ ++ projectVersion="$1" ++ ++ # Need dirBase when reassembling projectDirName ++ [ -n "$dirBase" ] || guessVersion ++ ++ # Debian: update x.y.z -> xyz version ++ if [ -n "$versionNum" ] ++ then ++ versionNum=$(echo "$projectVersion" | sed -e 's@\.@@g') ++ fi ++ ++ projectDirName="$dirBase${versionNum:-$projectVersion}" ++} ++ + +-# default mode is 'ugo' +-mode=ugo +-unset optAll optList optQuiet optSilent ++optMode=ugo # Default mode is always 'ugo' ++unset optAll optList optShell optVersion + +-# parse options ++# Parse options + while [ "$#" -gt 0 ] + do + case "$1" in +@@ -141,27 +210,45 @@ + ;; + -a | -all) + optAll=true ++ unset optShell + ;; + -l | -list) + optList=true ++ unset optShell ++ ;; ++ -list-test) ++ optList='test' ++ unset optShell ++ ;; ++ -csh | -sh | -csh-verbose | -sh-verbose) ++ optShell="${1#-}" ++ unset optAll ++ ;; ++ -mode=[ugo]*) ++ optMode="${1#*=}" ++ ;; ++ -prefix=/*) ++ prefixDir="${1#*=}" ++ prefixDir="${prefixDir%/}" ++ ;; ++ -version=*) ++ optVersion="${1#*=}" + ;; + -m | -mode) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- mode="$2" +- +- # sanity check: +- case "$mode" in +- *u* | *g* | *o* ) ++ optMode="$2" ++ shift ++ # Sanity check. Handles missing argument too. ++ case "$optMode" in ++ ([ugo]*) + ;; +- *) +- usage "'$1' option with invalid mode '$mode'" ++ (*) ++ die "invalid mode '$optMode'" + ;; + esac +- shift + ;; + -p | -prefix) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- prefixDir="$2" ++ [ "$#" -ge 2 ] || die "'$1' option requires an argument" ++ prefixDir="${2%/}" + shift + ;; + -q | -quiet) +@@ -171,13 +258,8 @@ + optSilent=true + ;; + -v | -version) +- [ "$#" -ge 2 ] || usage "'$1' option requires an argument" +- version="$2" +- # convert x.y.z -> xyz version (if installation looked like debian) +- if [ -n "$versionNum" ] +- then +- versionNum=$(echo "$version" | sed -e 's@\.@@g') +- fi ++ [ "$#" -ge 2 ] || die "'$1' option requires an argument" ++ optVersion="$2" + shift + ;; + --) +@@ -185,7 +267,7 @@ + break + ;; + -*) +- usage "unknown option: '$*'" ++ die "unknown option: '$1'" + ;; + *) + break +@@ -195,11 +277,28 @@ + done + + +-# debugging: +-# echo "Installed locations:" +-# for i in projectDir prefixDir projectDirName version versionNum ++#------------------------------------------------------------------------------- ++ ++if [ -n "$optVersion" ] ++then ++ setVersion $optVersion ++elif [ -z "$projectVersion" ] ++then ++ guessVersion ++fi ++ ++# Updates: ++# - projectDir for changes via -prefix or -version ++# - projectSite for changes via -prefix ++projectDir="$prefixDir/$projectDirName" ++projectSite="${WM_PROJECT_SITE:-$prefixDir/site}" ++ ++ ++# Debugging: ++# echo "Installed locations:" 1>&2 ++# for i in projectDir prefixDir projectDirName projectVersion + # do +-# eval echo "$i=\$$i" ++# eval echo "$i=\$$i" 1>&2 + # done + + +@@ -210,30 +309,18 @@ + + # Define the various places to be searched: + unset dirList +-case "$mode" in +-*u*) # user +- userDir="$HOME/.${WM_PROJECT:-OpenFOAM}" +- dirList="$dirList $userDir/$version $userDir" ++case "$optMode" in (*u*) # (U)ser ++ dirList="$dirList $HOME/.$projectName/$projectVersion $HOME/.$projectName" + ;; + esac + +-case "$mode" in +-*g*) # group (site) +- siteDir="${WM_PROJECT_SITE:-$prefixDir/site}" +- dirList="$dirList $siteDir/$version $siteDir" ++case "$optMode" in (*g*) # (G)roup == site ++ dirList="$dirList $projectSite/$projectVersion $projectSite" + ;; + esac + +-case "$mode" in +-*o*) # other (shipped) +- if [ -n "$versionNum" ] +- then +- # debian packaging +- dirList="$dirList $prefixDir/openfoam$versionNum/etc" +- else +- # standard packaging +- dirList="$dirList $prefixDir/${WM_PROJECT:-OpenFOAM}-$version/etc" +- fi ++case "$optMode" in (*o*) # (O)ther == shipped ++ dirList="$dirList $projectDir/etc" + ;; + esac + set -- $dirList +@@ -244,50 +331,87 @@ + # + + exitCode=0 +-if [ "$optList" = true ] ++if [ -n "$optList" ] + then + +- # list directories, or potential file locations +- [ "$nArgs" -le 1 ] || usage ++ # List directories, or potential file locations ++ [ "$nArgs" -le 1 ] || \ ++ die "-list expects 0 or 1 filename, but $nArgs provided" ++ ++ # A silly combination, but -quiet does have precedence ++ [ -n "$optQuiet" ] && exit 0 + +- # a silly combination, but -quiet does have precedence +- [ "$optQuiet" = true ] && exit 0 ++ # Test for directory or file too? ++ if [ "$optList" = "test" ] ++ then ++ exitCode=2 # Fallback to a general error (file not found) + ++ if [ "$nArgs" -eq 1 ] ++ then + for dir + do +- if [ "$nArgs" -eq 1 ] ++ resolved="$dir/$fileName" ++ if [ -f "$resolved" ] + then +- echo "$dir/$fileName" ++ echo "$resolved" ++ exitCode=0 # OK ++ fi ++ done + else ++ for dir ++ do ++ if [ -d "$dir" ] ++ then + echo "$dir" ++ exitCode=0 # OK + fi + done ++ fi ++ else ++ for dir ++ do ++ echo "$dir${fileName:+/}$fileName" ++ done ++ fi + + else + +- [ "$nArgs" -eq 1 ] || usage ++ [ "$nArgs" -eq 1 ] || die "One filename expected - $nArgs provided" + +- # general error, eg file not found +- exitCode=2 ++ exitCode=2 # Fallback to a general error (file not found) + + for dir + do + if [ -f "$dir/$fileName" ] + then + exitCode=0 +- if [ "$optQuiet" = true ] +- then ++ [ -n "$optQuiet" ] && break ++ ++ case "$optShell" in ++ (*verbose) ++ echo "Using: $dir/$fileName" 1>&2 ++ ;; ++ esac ++ ++ case "$optShell" in ++ csh*) ++ echo "source $dir/$fileName" + break +- else ++ ;; ++ sh*) ++ echo ". $dir/$fileName" ++ break ++ ;; ++ *) + echo "$dir/$fileName" +- [ "$optAll" = true ] || break +- fi ++ [ -n "$optAll" ] || break ++ ;; ++ esac + fi + done + + fi + +- + exit $exitCode + + #------------------------------------------------------------------------------ diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch new file mode 100644 index 0000000000..26e2d8f085 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch @@ -0,0 +1,17 @@ +--- OpenFOAM-v1612+.orig/Allwmake 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/Allwmake 2017-03-29 09:08:15.503865203 +0200 +@@ -17,6 +17,14 @@ + exit 1 + } + ++#------------------------------------------------------------------------------ ++echo "========================================" ++date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown" ++echo "Starting ${WM_PROJECT_DIR##*/} ${0##*}" ++echo " $WM_COMPILER $WM_COMPILER_TYPE compiler" ++echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}" ++echo ++ + # Compile wmake support applications + (cd wmake/src && make) + diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch new file mode 100644 index 0000000000..dd8146e953 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch @@ -0,0 +1,41 @@ +--- OpenFOAM-v1612+.orig/etc/bashrc 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/bashrc 2017-03-22 16:05:05.751237072 +0100 +@@ -42,7 +42,8 @@ + # + # Please set to the appropriate path if the default is not correct. + # +-[ $BASH_SOURCE ] && FOAM_INST_DIR=$(\cd ${BASH_SOURCE%/*/*/*} && \pwd -P) || \ ++rc="${BASH_SOURCE:-${ZSH_NAME:+$0}}" ++[ -n "$rc" ] && FOAM_INST_DIR=$(\cd $(dirname $rc)/../.. && \pwd -L) || \ + FOAM_INST_DIR=$HOME/$WM_PROJECT + # FOAM_INST_DIR=~$WM_PROJECT + # FOAM_INST_DIR=/opt/$WM_PROJECT +@@ -135,8 +136,10 @@ + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + . $WM_PROJECT_DIR/etc/config.sh/functions + +-# Add in preset user or site preferences: +-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` ++# Override definitions via prefs, with 'other' first so the sys-admin ++# can provide base values independent of WM_PROJECT_SITE ++_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -mode o prefs.sh` ++_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -mode ug prefs.sh` + + # Evaluate command-line parameters and record settings for later + # these can be used to set/unset values, or specify alternative pref files +diff -uw OpenFOAM-v1612+.orig/etc/cshrc OpenFOAM-v1612+/etc/cshrc +--- OpenFOAM-v1612+.orig/etc/cshrc 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/cshrc 2017-03-22 16:04:51.839291067 +0100 +@@ -148,8 +148,10 @@ + # Source files, possibly with some verbosity + alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* != "") source \!*' + +-# Add in preset user or site preferences: +-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh` ++# Override definitions via prefs, with 'other' first so the sys-admin ++# can provide base values independent of WM_PROJECT_SITE ++_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -mode o prefs.csh` ++_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -mode ug prefs.csh` + + # Evaluate command-line parameters and record settings for later + # these can be used to set/unset values, or specify alternative pref files diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch new file mode 100644 index 0000000000..b3663b0a49 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch @@ -0,0 +1,36 @@ +--- OpenFOAM-v1612+.orig/etc/config.sh/mpi 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/config.sh/mpi 2017-03-29 13:55:57.507980699 +0200 +@@ -75,8 +75,15 @@ + _foamAddMan $MPI_ARCH_PATH/share/man + ;; + ++USERMPI) ++ # Use an arbitrary, user-specified mpi implementation ++ export FOAM_MPI=mpi-user ++ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi-user` ++ ;; ++ + SYSTEMMPI) + export FOAM_MPI=mpi-system ++ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi-system` + + if [ -z "$MPI_ROOT" ] + then +--- OpenFOAM-v1612+.orig/etc/config.csh/mpi 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/config.csh/mpi 2017-03-29 13:56:36.347835938 +0200 +@@ -71,8 +71,15 @@ + _foamAddMan $MPI_ARCH_PATH/share/man + breaksw + ++case USERMPI: ++ # Use an arbitrary, user-specified mpi implementation ++ setenv FOAM_MPI mpi-user ++ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/mpi-user` ++ breaksw ++ + case SYSTEMMPI: + setenv FOAM_MPI mpi-system ++ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/mpi-system` + + if ( ! ($?MPI_ROOT) ) then + echo diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch new file mode 100644 index 0000000000..6631025788 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch @@ -0,0 +1,42 @@ +diff -uw OpenFOAM-v1612+.orig/etc/config.sh/settings OpenFOAM-v1612+/etc/config.sh/settings +--- OpenFOAM-v1612+.orig/etc/config.sh/settings 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/config.sh/settings 2017-03-23 12:22:52.002101020 +0100 +@@ -141,7 +141,7 @@ + #------------------------------------------------------------------------------ + + # Location of the jobControl directory +-export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl ++export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl #SPACK: non-central location + + # wmake configuration + export WM_DIR=$WM_PROJECT_DIR/wmake +@@ -157,7 +157,7 @@ + export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib + + # Site-specific directory +-siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}" ++siteDir="${WM_PROJECT_SITE:-$WM_PROJECT/site}" #SPACK: not in parent directory + + # Shared site executables/libraries + # Similar naming convention as ~OpenFOAM expansion +diff -uw OpenFOAM-v1612+.orig/etc/config.csh/settings OpenFOAM-v1612+/etc/config.csh/settings +--- OpenFOAM-v1612+.orig/etc/config.csh/settings 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/config.csh/settings 2017-03-23 12:23:52.737891912 +0100 +@@ -137,7 +137,7 @@ + #------------------------------------------------------------------------------ + + # Location of the jobControl directory +-setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl ++setenv FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl #SPACK: non-central location + + # wmake configuration + setenv WM_DIR $WM_PROJECT_DIR/wmake +@@ -156,7 +156,7 @@ + if ( $?WM_PROJECT_SITE ) then + set siteDir=$WM_PROJECT_SITE + else +- set siteDir=$WM_PROJECT_INST_DIR/site ++ set siteDir=$WM_PROJECT_DIR/site #SPACK: not in parent directory + endif + + # Shared site executables/libraries diff --git a/var/spack/repos/builtin/packages/openfoam-com/package.py b/var/spack/repos/builtin/packages/openfoam-com/package.py new file mode 100644 index 0000000000..fcd33eadcb --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/package.py @@ -0,0 +1,722 @@ +############################################################################## +# Copyright (c) 2017 Mark Olesen, OpenCFD Ltd. +# +# This file was authored by Mark Olesen <mark.olesen@esi-group.com> +# and is released as part of spack under the LGPL license. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for the LLNL notice and the LGPL. +# +# License +# ------- +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Legal Notice +# ------------ +# OPENFOAM is a trademark owned by OpenCFD Ltd +# (producer and distributor of the OpenFOAM software via www.openfoam.com). +# The trademark information must remain visible and unadulterated in this +# file and via the "spack info" and comply with the term set by +# http://openfoam.com/legal/trademark-policy.php +# +# This file is not part of OpenFOAM, nor does it constitute a component of an +# OpenFOAM distribution. +# +############################################################################## +# +# Notes +# - mpi handling: WM_MPLIB=USERMPI and use spack to populate an appropriate +# configuration and generate wmake rules for 'USER' and 'USERMPI' +# mpi implementations. +# +# - Resolution of flex, zlib needs more attention (within OpenFOAM) +# - +paraview: +# depends_on should just be 'paraview+plugins' but that resolves poorly. +# Workaround: use preferred variants "+plugins +qt" +# packages: +# paraview: +# variants: +plugins +qt +# in ~/.spack/packages.yaml +# +# - Combining +zoltan with +int64 has not been tested, but probably won't work. +# +############################################################################## +from spack import * +from spack.environment import * + +import glob +import re +import shutil +import os +from os.path import isdir, isfile + +# Not the nice way of doing things, but is a start for refactoring +__all__ = [ + 'format_export', + 'format_setenv', + 'write_environ', + 'rewrite_environ_files', + 'mplib_content', + 'generate_mplib_rules', + 'generate_compiler_rules', +] + + +def format_export(key, value): + """Format key,value pair as 'export' with newline for POSIX shell.""" + return 'export {0}={1}\n'.format(key, value) + + +def format_setenv(key, value): + """Format key,value pair as 'setenv' with newline for C-shell.""" + return 'setenv {0} {1}\n'.format(key, value) + + +def _write_environ_entries(outfile, environ, formatter): + """Write environment settings as 'export' or 'setenv'. + If environ is a dict, write in sorted order. + If environ is a list, write pair-wise. + Also descends into sub-dict and sub-list, but drops the key. + """ + if isinstance(environ, dict): + for key in sorted(environ): + entry = environ[key] + if isinstance(entry, dict): + _write_environ_entries(outfile, entry, formatter) + elif isinstance(entry, list): + _write_environ_entries(outfile, entry, formatter) + else: + outfile.write(formatter(key, entry)) + elif isinstance(environ, list): + for item in environ: + outfile.write(formatter(item[0], item[1])) + + +def _write_environ_file(output, environ, formatter): + """Write environment settings as 'export' or 'setenv'. + If environ is a dict, write in sorted order. + If environ is a list, write pair-wise. + Also descends into sub-dict and sub-list, but drops the key. + """ + with open(output, 'w') as outfile: + outfile.write('# SPACK settings\n\n') + _write_environ_entries(outfile, environ, formatter) + + +def write_environ(environ, **kwargs): + """Write environment settings as 'export' or 'setenv'. + If environ is a dict, write in sorted order. + If environ is a list, write pair-wise. + + Keyword Options: + posix[=None] If set, the name of the POSIX file to rewrite. + cshell[=None] If set, the name of the C-shell file to rewrite. + """ + posix = kwargs.get('posix', None) + if posix: + _write_environ_file(posix, environ, format_export) + cshell = kwargs.get('cshell', None) + if cshell: + _write_environ_file(cshell, environ, format_setenv) + + +def rewrite_environ_files(environ, **kwargs): + """Use filter_file to rewrite (existing) POSIX shell or C-shell files. + Keyword Options: + posix[=None] If set, the name of the POSIX file to rewrite. + cshell[=None] If set, the name of the C-shell file to rewrite. + """ + posix = kwargs.get('posix', None) + if posix and isfile(posix): + for k, v in environ.iteritems(): + filter_file( + r'^(\s*export\s+%s)=.*$' % k, + r'\1=%s' % v, + posix, + backup=False) + cshell = kwargs.get('cshell', None) + if cshell and isfile(cshell): + for k, v in environ.iteritems(): + filter_file( + r'^(\s*setenv\s+%s)\s+.*$' % k, + r'\1 %s' % v, + cshell, + backup=False) + + +def pkglib(package): + """Get lib64 or lib from package prefix""" + libdir = package.prefix.lib64 + if isdir(libdir): + return libdir + return package.prefix.lib + + +def mplib_content(spec, pre=None): + """The mpi settings to have wmake + use spack information with minimum modifications to OpenFOAM. + + Optional parameter 'pre' to provid alternative prefix + """ + mpi_spec = spec['mpi'] + bin = mpi_spec.prefix.bin + inc = mpi_spec.prefix.include + lib = pkglib(mpi_spec) + if pre: + bin = join_path(pre, os.path.basename(bin)) + inc = join_path(pre, os.path.basename(inc)) + lib = join_path(pre, os.path.basename(lib)) + else: + pre = mpi_spec.prefix + + info = { + 'name': '{0}-{1}'.format(mpi_spec.name, mpi_spec.version), + 'prefix': pre, + 'include': inc, + 'bindir': bin, + 'libdir': lib, + 'FLAGS': '-DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', + 'PINC': '-I{0}'.format(inc), + 'PLIBS': '-L{0} -lmpi'.format(lib), + } + return info + + +def generate_mplib_rules(directory, spec): + """ Create mplibUSER,mplibUSERMPI rules in the specified directory""" + content = mplib_content(spec) + with working_dir(directory): + for mplib in ['mplibUSER', 'mplibUSERMPI']: + with open(mplib, 'w') as out: + out.write("""# Use mpi from spack ({name})\n +PFLAGS = {FLAGS} +PINC = {PINC} +PLIBS = {PLIBS} +""".format(**content)) + + +def generate_compiler_rules(directory, compOpt, value): + """ Create cSPACKOpt,c++SPACKOpt rules in the specified directory. + The file content is copied and filtered from the corresponding + cOpt,c++Opt rules""" + # Compiler options for SPACK - eg, wmake/rules/linux64Gcc/ + # Copy from existing cOpt, c++Opt and modify DBUG value + with working_dir(directory): + for lang in ['c', 'c++']: + src = '{0}Opt'.format(lang) + dst = '{0}{1}'.format(lang, compOpt) + shutil.copyfile(src, dst) # src -> dst + filter_file( + r'^(\S+DBUG\s*)=.*$', + r'\1= %s' % value, + dst, + backup=False) + + +class OpenfoamCom(Package): + """OpenFOAM is a GPL-opensource C++ CFD-toolbox. + This offering is supported by OpenCFD Ltd, + producer and distributor of the OpenFOAM software via www.openfoam.com, + and owner of the OPENFOAM trademark. + OpenCFD Ltd has been developing and releasing OpenFOAM since its debut + in 2004. + """ + + homepage = "http://www.openfoam.com/" + baseurl = "https://sourceforge.net/projects/openfoamplus/files" + + version('1612', 'ca02c491369150ab127cbb88ec60fbdf', + url=baseurl + '/v1612+/OpenFOAM-v1612+.tgz') + + variant('int64', default=False, + description='Compile with 64-bit labels') + variant('float32', default=False, + description='Compile with 32-bit scalar (single-precision)') + variant('knl', default=False, + description='Use KNL compiler settings') + + variant('scotch', default=True, + description='With scotch/ptscotch for decomposition') + variant('metis', default=False, + description='With metis for decomposition') + variant('zoltan', default=False, + description='With zoltan renumbering') + # TODO?# variant('parmgridgen', default=True, + # TODO?# description='With parmgridgen support') + variant('source', default=True, + description='Install library/application sources and tutorials') + + variant('paraview', default=True, + description='Build paraview plugins and runtime post-processing') + + #: Map spack compiler names to OpenFOAM compiler names + # By default, simply capitalize the first letter + compiler_mapping = {'intel': 'icc'} + + provides('openfoam') + depends_on('mpi') + depends_on('zlib') + depends_on('fftw') + depends_on('boost') + depends_on('cgal') + depends_on('flex@:2.6.1') # <- restriction due to scotch + depends_on('cmake', type='build') + + # Require scotch with ptscotch - corresponds to standard OpenFOAM setup + depends_on('scotch~int64+mpi', when='+scotch~int64') + depends_on('scotch+int64+mpi', when='+scotch+int64') + depends_on('metis@5:', when='+metis') + depends_on('metis+int64', when='+metis+int64') + depends_on('parmgridgen', when='+parmgridgen') + depends_on('zoltan', when='+zoltan') + + # For OpenFOAM plugins and run-time post-processing this should just be + # 'paraview+plugins' but that resolves poorly. + # Workaround: use preferred variants "+plugins +qt" in + # ~/.spack/packages.yaml + + # 1612 plugins need older paraview + # The native reader in paraview 5.2 is broken, so start after that + depends_on('paraview@:5.0.1', when='@:1612+paraview') + depends_on('paraview@5.3:', when='@1706:+paraview') + + # General patches + patch('openfoam-site.patch') + + # Version-specific patches + patch('openfoam-bin-1612.patch', when='@1612') + patch('openfoam-etc-1612.patch', when='@1612') + patch('openfoam-mpi-1612.patch', when='@1612') + patch('openfoam-build-1612.patch', when='@1612') + patch('scotch-metis-lib-1612.patch', when='@1612') + patch('zoltan-lib-1612.patch', when='@1612') + + # Some user settings, to be adjusted manually or via variants + foam_cfg = { + 'WM_COMPILER': 'Gcc', # <- %compiler + 'WM_ARCH_OPTION': '64', # (32/64-bit on x86_64) + 'WM_LABEL_SIZE': '32', # <- +int64 + 'WM_PRECISION_OPTION': 'DP', # <- +float32 + 'WM_COMPILE_OPTION': 'SPACKOpt', # Do not change + 'WM_MPLIB': 'USERMPI', # Use user mpi for spack + } + + # The system description is frequently needed + foam_sys = { + 'WM_ARCH': None, + 'WM_COMPILER': None, + 'WM_OPTIONS': None, + } + + # Content for etc/prefs.{csh,sh} + etc_prefs = {} + + # Content for etc/config.{csh,sh}/ files + etc_config = {} + + build_script = './spack-Allwmake' # <- Generated by patch() method. + # phases = ['configure', 'build', 'install'] + # build_system_class = 'OpenfoamCom' + + # Add symlinks into bin/, lib/ (eg, for other applications) + extra_symlinks = False + + # Quickly enable/disable testing with the current develop branch + if False: + version( + 'plus', + branch='develop', + git='file://{0}/{1}' + .format(os.path.expanduser("~"), 'openfoam/OpenFOAM-plus/.git')) + + def setup_environment(self, spack_env, run_env): + run_env.set('WM_PROJECT_DIR', self.projectdir) + + @property + def projectdir(self): + """Absolute location of project directory: WM_PROJECT_DIR/""" + return self.prefix # <- install directly under prefix + + @property + def etc(self): + """Absolute location of the OpenFOAM etc/ directory""" + return join_path(self.projectdir, 'etc') + + @property + def archbin(self): + """Relative location of architecture-specific executables""" + return join_path('platforms', self.wm_options, 'bin') + + @property + def archlib(self): + """Relative location of architecture-specific libraries""" + return join_path('platforms', self.wm_options, 'lib') + + @property + def wm_options(self): + """The architecture+compiler+options for OpenFOAM""" + opts = self.set_openfoam() + return opts + + @property + def rpath_info(self): + """Define 'SPACKOpt' compiler optimization file to have wmake + use spack information with minimum modifications to OpenFOAM + """ + build_libpath = join_path(self.stage.source_path, self.archlib) + install_libpath = join_path(self.projectdir, self.archlib) + + # 'DBUG': rpaths + return '{0}{1} {2}{3}'.format( + self.compiler.cxx_rpath_arg, install_libpath, + self.compiler.cxx_rpath_arg, build_libpath) + + def openfoam_arch(self): + """Return an architecture value similar to what OpenFOAM does in + etc/config.sh/settings, but slightly more generous. + Uses and may adjust foam_cfg[WM_ARCH_OPTION] as a side-effect + """ + # spec.architecture.platform is like `uname -s`, but lower-case + platform = self.spec.architecture.platform + + # spec.architecture.target is like `uname -m` + target = self.spec.architecture.target + + if platform == 'linux': + if target == 'i686': + self.foam_cfg['WM_ARCH_OPTION'] = '32' # Force consistency + elif target == 'x86_64': + if self.foam_cfg['WM_ARCH_OPTION'] == '64': + platform += '64' + elif target == 'ia64': + platform += 'ia64' + elif target == 'armv7l': + platform += 'ARM7' + elif target == ppc64: + platform += 'PPC64' + elif target == ppc64le: + platform += 'PPC64le' + elif platform == 'darwin': + if target == 'x86_64': + platform += 'Intel' + if self.foam_cfg['WM_ARCH_OPTION'] == '64': + platform += '64' + # ... and others? + return platform + + def openfoam_compiler(self): + """Capitalized version of the compiler name, which usually corresponds + to how OpenFOAM will camel-case things. + Use compiler_mapping to handing special cases. + Also handle special compiler options (eg, KNL) + """ + comp = self.compiler.name + if comp in self.compiler_mapping: + comp = self.compiler_mapping[comp] + comp = comp.capitalize() + + if '+knl' in self.spec: + comp += 'KNL' + return comp + + def set_openfoam(self): + """Populate foam_cfg, foam_sys according to + variants, architecture, compiler. + Returns WM_OPTIONS. + """ + # Run once + opts = self.foam_sys['WM_OPTIONS'] + if opts: + return opts + + wm_arch = self.openfoam_arch() + wm_compiler = self.openfoam_compiler() + compileOpt = self.foam_cfg['WM_COMPILE_OPTION'] + + # Insist on a wmake rule for this architecture/compiler combination + archCompiler = wm_arch + wm_compiler + compiler_rule = join_path( + self.stage.source_path, 'wmake', 'rules', archCompiler) + + if not isdir(compiler_rule): + raise RuntimeError( + 'No wmake rule for {0}'.format(archCompiler)) + if not re.match(r'.+Opt$', compileOpt): + raise RuntimeError( + "WM_COMPILE_OPTION={0} is not type '*Opt'".format(compileOpt)) + + # Adjust for variants + self.foam_cfg['WM_LABEL_SIZE'] = ( + '64' if '+int64' in self.spec else '32' + ) + self.foam_cfg['WM_PRECISION_OPTION'] = ( + 'SP' if '+float32' in self.spec else 'DP' + ) + + # ---- + # WM_LABEL_OPTION=Int$WM_LABEL_SIZE + # WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION + # ---- + self.foam_sys['WM_ARCH'] = wm_arch + self.foam_sys['WM_COMPILER'] = wm_compiler + self.foam_cfg['WM_COMPILER'] = wm_compiler # For bashrc,cshrc too + self.foam_sys['WM_OPTIONS'] = ''.join([ + wm_arch, + wm_compiler, + self.foam_cfg['WM_PRECISION_OPTION'], + 'Int', self.foam_cfg['WM_LABEL_SIZE'], # Int32/Int64 + compileOpt + ]) + return self.foam_sys['WM_OPTIONS'] + + def patch(self): + """Adjust OpenFOAM build for spack. Where needed, apply filter as an + alternative to normal patching. + """ + self.set_openfoam() # May need foam_cfg/foam_sys information + + # Avoid WM_PROJECT_INST_DIR for ThirdParty, site or jobControl. + # Use openfoam-site.patch to handle jobControl, site. + # + # Filter (not patch) bashrc,cshrc for additional flexibility + wm_setting = { + 'WM_THIRD_PARTY_DIR': + r'$WM_PROJECT_DIR/ThirdParty #SPACK: No separate third-party', + } + + rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc + wm_setting, + posix=join_path('etc', 'bashrc'), + cshell=join_path('etc', 'cshrc')) + + # Adjust ParMGridGen - this is still a mess. + # We also have no assurances about sizes (int/long, float/double) etc. + # + # Need to adjust src/fvAgglomerationMethods/Allwmake + # "export ParMGridGen=%s" % spec['parmgridgen'].prefix + # + # and src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options + # "-I=%s" % spec['parmgridgen'].include + # "-L=%s -lmgrid" % spec['parmgridgen'].lib + + # Build wrapper script + with open(self.build_script, 'w') as out: + out.write( + """#!/bin/bash +. $PWD/etc/bashrc '' # No arguments +mkdir -p $FOAM_APPBIN $FOAM_LIBBIN 2>/dev/null # Allow interrupt +echo Build openfoam with SPACK +echo WM_PROJECT_DIR = $WM_PROJECT_DIR +./Allwmake $@ +# +""") + set_executable(self.build_script) + self.configure(self.spec, self.prefix) # Should be a separate phase + + def configure(self, spec, prefix): + """Make adjustments to the OpenFOAM configuration files in their various + locations: etc/bashrc, etc/config.sh/FEATURE and customizations that + don't properly fit get placed in the etc/prefs.sh file (similiarly for + csh). + """ + self.set_openfoam() # Need foam_cfg/foam_sys information + + # Some settings for filtering bashrc, cshrc + wm_setting = {} + wm_setting.update(self.foam_cfg) + + rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc + wm_setting, + posix=join_path('etc', 'bashrc'), + cshell=join_path('etc', 'cshrc')) + + # Content for etc/prefs.{csh,sh} + self.etc_prefs = { + # TODO + # 'CMAKE_ARCH_PATH': spec['cmake'].prefix, + # 'FLEX_ARCH_PATH': spec['flex'].prefix, + # 'ZLIB_ARCH_PATH': spec['zlib'].prefix, + } + + # MPI content, using MPI_ARCH_PATH + content = mplib_content(spec, '${MPI_ARCH_PATH}') + + # Content for etc/config.{csh,sh}/ files + self.etc_config = { + 'CGAL': { + 'BOOST_ARCH_PATH': spec['boost'].prefix, + 'CGAL_ARCH_PATH': spec['cgal'].prefix, + }, + 'FFTW': { + 'FFTW_ARCH_PATH': spec['fftw'].prefix, + }, + # User-defined MPI + 'mpi-user': [ + ('MPI_ARCH_PATH', spec['mpi'].prefix), # Absolute + ('LD_LIBRARY_PATH', + '"%s:${LD_LIBRARY_PATH}"' % content['libdir']), + ('PATH', '"%s:${PATH}"' % content['bindir']), + ], + 'scotch': {}, + 'metis': {}, + 'paraview': [], + } + + if '+scotch' in spec: + self.etc_config['scotch'] = { + 'SCOTCH_ARCH_PATH': spec['scotch'].prefix, + # For src/parallel/decompose/Allwmake + 'SCOTCH_VERSION': 'scotch-{0}'.format(spec['scotch'].version), + } + + if '+metis' in spec: + self.etc_config['metis'] = { + 'METIS_ARCH_PATH': spec['metis'].prefix, + } + + if '+paraview' in spec: + pvMajor = 'paraview-{0}'.format(spec['paraview'].version.up_to(2)) + self.etc_config['paraview'] = [ + ('ParaView_DIR', spec['paraview'].prefix), + ('ParaView_INCLUDE_DIR', '$ParaView_DIR/include/' + pvMajor), + ('PV_PLUGIN_PATH', '$FOAM_LIBBIN/' + pvMajor), + ('PATH', '"${ParaView_DIR}/bin:${PATH}"'), + ] + + # Not normally included as etc/config file + if '+parmgridgen' in spec: + self.etc_config['parmgridgen'] = { + 'PARMGRIDGEN_ARCH_PATH': spec['parmgridgen'].prefix + } + + # Optional + if '+zoltan' in spec: + self.etc_config['zoltan'] = { + 'ZOLTAN_ARCH_PATH': spec['zoltan'].prefix + } + + # Write prefs files according to the configuration. + # Only need prefs.sh for building, but install both for end-users + if self.etc_prefs: + write_environ( + self.etc_prefs, + posix=join_path('etc', 'prefs.sh'), + cshell=join_path('etc', 'prefs.csh')) + + # Adjust components to use SPACK variants + for component, subdict in self.etc_config.iteritems(): + write_environ( + subdict, + posix=join_path('etc', 'config.sh', component), + cshell=join_path('etc', 'config.csh', component)) + + archCompiler = self.foam_sys['WM_ARCH'] + self.foam_sys['WM_COMPILER'] + compileOpt = self.foam_cfg['WM_COMPILE_OPTION'] + general_rule = join_path('wmake', 'rules', 'General') + compiler_rule = join_path('wmake', 'rules', archCompiler) + generate_mplib_rules(general_rule, self.spec) + generate_compiler_rules(compiler_rule, compileOpt, self.rpath_info) + # Record the spack spec information + with open("log.spack-spec", 'w') as outfile: + outfile.write(spec.tree()) + + def build(self, spec, prefix): + """Build using the OpenFOAM Allwmake script, with a wrapper to source + its environment first. + """ + self.set_openfoam() # Force proper population of foam_cfg/foam_sys + args = ['-silent'] + if self.parallel: # Build in parallel? - pass as an argument + args.append( + '-j{0}'.format(str(self.make_jobs) if self.make_jobs else '')) + builder = Executable(self.build_script) + builder(*args) + + def install(self, spec, prefix): + """Install under the projectdir (== prefix)""" + self.build(spec, prefix) # Should be a separate phase + opts = self.wm_options + + mkdirp(self.projectdir) + projdir = os.path.basename(self.projectdir) + wm_setting = { + 'WM_PROJECT_INST_DIR': os.path.dirname(self.projectdir), + 'WM_PROJECT_DIR': join_path('$WM_PROJECT_INST_DIR', projdir), + } + + # Retain build log file + out = "spack-build.out" + if isfile(out): + install(out, join_path(self.projectdir, "log." + opts)) + + # All top-level files, except spack build info and possibly Allwmake + if '+source' in spec: + ignored = re.compile(r'^spack-.*') + else: + ignored = re.compile(r'^(Allwmake|spack-).*') + + files = [ + f for f in glob.glob("*") if isfile(f) and not ignored.search(f) + ] + for f in files: + install(f, self.projectdir) + + # Having wmake without sources is actually somewhat pointless... + dirs = ['bin', 'etc', 'wmake'] + if '+source' in spec: + dirs.extend(['applications', 'src', 'tutorials']) + + for d in dirs: + install_tree( + d, + join_path(self.projectdir, d)) + + dirs = ['platforms'] + if '+source' in spec: + dirs.extend(['doc']) + + # Install platforms (and doc) skipping intermediate targets + ignored = ['src', 'applications', 'html', 'Guides'] + for d in dirs: + install_tree( + d, + join_path(self.projectdir, d), + ignore=shutil.ignore_patterns(*ignored)) + + rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc + wm_setting, + posix=join_path(self.etc, 'bashrc'), + cshell=join_path(self.etc, 'cshrc')) + self.install_links() + + def install_links(self): + """Add symlinks into bin/, lib/ (eg, for other applications)""" + if not self.extra_symlinks: + return + + # ln -s platforms/linux64GccXXX/lib lib + with working_dir(self.projectdir): + if isdir(self.archlib): + os.symlink(self.archlib, 'lib') + + # (cd bin && ln -s ../platforms/linux64GccXXX/bin/* .) + with working_dir(join_path(self.projectdir, 'bin')): + for f in [ + f for f in glob.glob(join_path('..', self.archbin, "*")) + if isfile(f) + ]: + os.symlink(f, os.path.basename(f)) + +# ----------------------------------------------------------------------------- diff --git a/var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch new file mode 100644 index 0000000000..b7530e6320 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch @@ -0,0 +1,48 @@ +--- OpenFOAM-v1612+.orig/src/parallel/decompose/Allwmake 2017-03-21 16:34:44.599021283 +0100 ++++ OpenFOAM-v1612+/src/parallel/decompose/Allwmake 2017-03-21 16:28:57.243969660 +0100 +@@ -36,6 +36,7 @@ + + # Library + [ -r $FOAM_EXT_LIBBIN/libmetis.so ] || \ ++ [ -r $METIS_ARCH_PATH/lib/libmetis.so ] || \ + [ -r $METIS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmetis.so ] || \ + [ "${METIS_ARCH_PATH##*-}" = system ] || { + echo "$warning (missing library)" +@@ -90,6 +91,7 @@ + + # Library + [ -r $FOAM_EXT_LIBBIN/libscotch.so ] || \ ++ [ -r $SCOTCH_ARCH_PATH/lib/libscotch.so ] || \ + [ -r $SCOTCH_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libscotch.so ] || \ + [ "${SCOTCH_ARCH_PATH##*-}" = system ] || { + echo "$warning (missing library)" +--- OpenFOAM-v1612+.orig/src/parallel/decompose/metisDecomp/Make/options 2017-03-21 16:34:25.383075328 +0100 ++++ OpenFOAM-v1612+/src/parallel/decompose/metisDecomp/Make/options 2017-03-21 16:30:15.727758338 +0100 +@@ -8,6 +8,7 @@ + * to support central, non-thirdparty installations + */ + LIB_LIBS = \ ++ -L$(METIS_ARCH_PATH)/lib \ + -L$(METIS_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \ + -L$(FOAM_EXT_LIBBIN) \ + -lmetis +--- OpenFOAM-v1612+.orig/src/parallel/decompose/ptscotchDecomp/Make/options 2017-03-21 16:34:34.607049385 +0100 ++++ OpenFOAM-v1612+/src/parallel/decompose/ptscotchDecomp/Make/options 2017-03-21 16:30:00.479799399 +0100 +@@ -16,6 +16,7 @@ + * to support central, non-thirdparty installations + */ + LIB_LIBS = \ ++ -L$(SCOTCH_ARCH_PATH)/lib \ + -L$(SCOTCH_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \ + -L$(FOAM_EXT_LIBBIN) \ + -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) \ +--- OpenFOAM-v1612+.orig/src/parallel/decompose/scotchDecomp/Make/options 2017-03-21 16:34:39.159036582 +0100 ++++ OpenFOAM-v1612+/src/parallel/decompose/scotchDecomp/Make/options 2017-03-21 16:29:46.719836452 +0100 +@@ -16,6 +16,7 @@ + * to support central, non-thirdparty installations + */ + LIB_LIBS = \ ++ -L$(SCOTCH_ARCH_PATH)/lib \ + -L$(SCOTCH_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \ + -L$(FOAM_EXT_LIBBIN) \ + -lscotch \ diff --git a/var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch new file mode 100644 index 0000000000..712e6a7dfd --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch @@ -0,0 +1,84 @@ +--- OpenFOAM-v1612+.orig/applications/utilities/mesh/manipulation/renumberMesh/Allwmake 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/applications/utilities/mesh/manipulation/renumberMesh/Allwmake 2017-03-28 11:13:35.222727218 +0200 +@@ -4,20 +4,35 @@ + # Parse arguments for compilation (at least for error catching) + . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +-export COMPILE_FLAGS='' +-export LINK_FLAGS='' ++unset COMP_FLAGS LINK_FLAGS + + if [ -f "${FOAM_LIBBIN}/libSloanRenumber.so" ] + then +- echo "Found libSloanRenumber.so -- enabling Sloan renumbering support." ++ echo " found libSloanRenumber -- enabling sloan renumbering support." + export LINK_FLAGS="${LINK_FLAGS} -lSloanRenumber" + fi + +-if [ -f "${ZOLTAN_ARCH_PATH}/lib/libzoltan.a" -a -f "${FOAM_LIBBIN}/libzoltanRenumber.so" ] ++if [ -f "${FOAM_LIBBIN}/libzoltanRenumber.so" ] + then +- echo "Found libzoltanRenumber.so -- enabling zoltan renumbering support." +- export COMPILE_FLAGS="-DFOAM_USE_ZOLTAN" +- export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan" ++ if [ -z "$ZOLTAN_ARCH_PATH" ] ++ then ++ # Optional: get ZOLTAN_ARCH_PATH ++ if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan) ++ then ++ . $settings ++ fi ++ fi ++ ++ for libdir in lib "lib${WM_COMPILER_LIB_ARCH}" ++ do ++ if [ -f "$ZOLTAN_ARCH_PATH/$libdir/libzoltan.a" ] ++ then ++ echo " found libzoltanRenumber -- enabling zoltan renumbering support." ++ export COMP_FLAGS="-DFOAM_USE_ZOLTAN" ++ export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L$ZOLTAN_ARCH_PATH/$libdir -lzoltan" ++ break ++ fi ++ done + fi + + wmake $targetType +--- OpenFOAM-v1612+.orig/src/renumber/Allwmake 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/src/renumber/Allwmake 2017-03-28 11:10:22.195543610 +0200 +@@ -5,14 +5,11 @@ + targetType=libso + . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +-## Get ZOLTAN_ARCH_PATH +-#if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan) +-#then +-# . $settings +-# echo "using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH" +-#else +-# echo "Error: no config.sh/zoltan settings" +-#fi ++# Optional: get ZOLTAN_ARCH_PATH ++if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan) ++then ++ . $settings ++fi + + wmake $targetType renumberMethods + +--- OpenFOAM-v1612+.orig/src/renumber/zoltanRenumber/Make/options 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/src/renumber/zoltanRenumber/Make/options 2017-03-28 11:50:46.484343848 +0200 +@@ -4,10 +4,13 @@ + EXE_INC = \ + /* -DFULLDEBUG -g -O0 */ \ + $(PFLAGS) $(PINC) \ ++ ${c++LESSWARN} \ + -I$(FOAM_SRC)/renumber/renumberMethods/lnInclude \ + -I$(ZOLTAN_ARCH_PATH)/include/ \ + -I$(LIB_SRC)/meshTools/lnInclude + + LIB_LIBS = \ +- /* -L$(ZOLTAN_ARCH_PATH)/lib -lzoltan */ \ ++ -L$(ZOLTAN_ARCH_PATH)/lib \ ++ -L$(ZOLTAN_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \ ++ -lzoltan \ + -lmeshTools diff --git a/var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch b/var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch new file mode 100644 index 0000000000..6fe3b7b4d3 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch @@ -0,0 +1,25 @@ +--- OpenFOAM-4.x.orig/etc/bashrc 2016-10-16 16:11:45.000000000 +0200 ++++ OpenFOAM-4.x/etc/bashrc 2017-03-24 12:41:25.233267894 +0100 +@@ -43,17 +43,17 @@ + # Please set to the appropriate path if the default is not correct. + # + [ $BASH_SOURCE ] && \ +-export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \ +-export FOAM_INST_DIR=$HOME/$WM_PROJECT +-# export FOAM_INST_DIR=~$WM_PROJECT +-# export FOAM_INST_DIR=/opt/$WM_PROJECT +-# export FOAM_INST_DIR=/usr/local/$WM_PROJECT ++FOAM_INST_DIR=$(\cd $(dirname $BASH_SOURCE)/../.. && \pwd -P) || \ ++FOAM_INST_DIR=$HOME/$WM_PROJECT ++# FOAM_INST_DIR=/opt/$WM_PROJECT ++# FOAM_INST_DIR=/usr/local/$WM_PROJECT + # + # Build foamyHexMesh + export FOAMY_HEX_MESH=yes + # + # END OF (NORMAL) USER EDITABLE PART + ################################################################################ ++export FOAM_INST_DIR + + # The default environment variables below can be overridden in a prefs.sh file + # located in ~/.OpenFOAM/$WM_PROJECT_VERSION, ~/.OpenFOAM, diff --git a/var/spack/repos/builtin/packages/openfoam-org/openfoam-site.patch b/var/spack/repos/builtin/packages/openfoam-org/openfoam-site.patch new file mode 100644 index 0000000000..6631025788 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-org/openfoam-site.patch @@ -0,0 +1,42 @@ +diff -uw OpenFOAM-v1612+.orig/etc/config.sh/settings OpenFOAM-v1612+/etc/config.sh/settings +--- OpenFOAM-v1612+.orig/etc/config.sh/settings 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/config.sh/settings 2017-03-23 12:22:52.002101020 +0100 +@@ -141,7 +141,7 @@ + #------------------------------------------------------------------------------ + + # Location of the jobControl directory +-export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl ++export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl #SPACK: non-central location + + # wmake configuration + export WM_DIR=$WM_PROJECT_DIR/wmake +@@ -157,7 +157,7 @@ + export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib + + # Site-specific directory +-siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}" ++siteDir="${WM_PROJECT_SITE:-$WM_PROJECT/site}" #SPACK: not in parent directory + + # Shared site executables/libraries + # Similar naming convention as ~OpenFOAM expansion +diff -uw OpenFOAM-v1612+.orig/etc/config.csh/settings OpenFOAM-v1612+/etc/config.csh/settings +--- OpenFOAM-v1612+.orig/etc/config.csh/settings 2016-12-23 15:22:59.000000000 +0100 ++++ OpenFOAM-v1612+/etc/config.csh/settings 2017-03-23 12:23:52.737891912 +0100 +@@ -137,7 +137,7 @@ + #------------------------------------------------------------------------------ + + # Location of the jobControl directory +-setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl ++setenv FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl #SPACK: non-central location + + # wmake configuration + setenv WM_DIR $WM_PROJECT_DIR/wmake +@@ -156,7 +156,7 @@ + if ( $?WM_PROJECT_SITE ) then + set siteDir=$WM_PROJECT_SITE + else +- set siteDir=$WM_PROJECT_INST_DIR/site ++ set siteDir=$WM_PROJECT_DIR/site #SPACK: not in parent directory + endif + + # Shared site executables/libraries diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py new file mode 100644 index 0000000000..19ffd40507 --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-org/package.py @@ -0,0 +1,492 @@ +############################################################################## +# Copyright (c) 2017 Mark Olesen, OpenCFD Ltd. +# +# This file was authored by Mark Olesen <mark.olesen@esi-group.com> +# and is released as part of spack under the LGPL license. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for the LLNL notice and the LGPL. +# +# License +# ------- +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Legal Notice +# ------------ +# OPENFOAM is a trademark owned by OpenCFD Ltd +# (producer and distributor of the OpenFOAM software via www.openfoam.com). +# The trademark information must remain visible and unadulterated in this +# file and via the "spack info" and comply with the term set by +# http://openfoam.com/legal/trademark-policy.php +# +# This file is not part of OpenFOAM, nor does it constitute a component of an +# OpenFOAM distribution. +# +############################################################################## +# +# Notes +# - The openfoam-org package is a modified version of the openfoam-com package. +# If changes are needed here, consider if they should also be applied there. +# +# - Building with boost/cgal is not included, since some of the logic is not +# entirely clear and thus untested. +# - Resolution of flex, zlib needs more attention (within OpenFOAM) +# +# - mpi handling: WM_MPLIB=SYSTEMMPI and use spack to populate the prefs.sh +# for it. +# Also provide wmake rules for special purpose 'USER' and 'USERMPI' +# mpi implementations, in case these are required. +# +############################################################################## +from spack import * +from spack.environment import * +import llnl.util.tty as tty + +import multiprocessing +import glob +import re +import shutil +import os +from os.path import isdir, isfile +from spack.pkg.builtin.openfoam_com import * + + +class OpenfoamOrg(Package): + """OpenFOAM is a GPL-opensource C++ CFD-toolbox. + The openfoam.org release is managed by the OpenFOAM Foundation Ltd as + a licensee of the OPENFOAM trademark. + This offering is not approved or endorsed by OpenCFD Ltd, + producer and distributor of the OpenFOAM software via www.openfoam.com, + and owner of the OPENFOAM trademark. + """ + + homepage = "http://www.openfoam.org/" + baseurl = "https://github.com/OpenFOAM" + url = "https://github.com/OpenFOAM/OpenFOAM-4.x/archive/version-4.1.tar.gz" + + version('4.1', '318a446c4ae6366c7296b61184acd37c', + url=baseurl + '/OpenFOAM-4.x/archive/version-4.1.tar.gz') + + variant('int64', default=False, + description='Compile with 64-bit labels') + variant('float32', default=False, + description='Compile with 32-bit scalar (single-precision)') + + variant('source', default=True, + description='Install library/application sources and tutorials') + + #: Map spack compiler names to OpenFOAM compiler names + # By default, simply capitalize the first letter + compiler_mapping = {'intel': 'icc'} + + provides('openfoam') + depends_on('mpi') + depends_on('zlib') + depends_on('flex@:2.6.1') # <- restriction due to scotch + depends_on('cmake', type='build') + + # Require scotch with ptscotch - corresponds to standard OpenFOAM setup + depends_on('scotch~int64+mpi', when='~int64') + depends_on('scotch+int64+mpi', when='+int64') + + # General patches + patch('openfoam-site.patch') + + # Version-specific patches + patch('openfoam-etc-41.patch') + + # Some user settings, to be adjusted manually or via variants + foam_cfg = { + 'WM_COMPILER': 'Gcc', # <- %compiler + 'WM_ARCH_OPTION': '64', # (32/64-bit on x86_64) + 'WM_LABEL_SIZE': '32', # <- +int64 + 'WM_PRECISION_OPTION': 'DP', # <- +float32 + 'WM_COMPILE_OPTION': 'SPACKOpt', # Do not change + 'WM_MPLIB': 'SYSTEMMPI', # Use system mpi for spack + } + + # The system description is frequently needed + foam_sys = { + 'WM_ARCH': None, + 'WM_COMPILER': None, + 'WM_OPTIONS': None, + } + + # Content for etc/prefs.{csh,sh} + etc_prefs = {} + + # Content for etc/config.{csh,sh}/ files + etc_config = {} + + build_script = './spack-Allwmake' # <- Generated by patch() method. + # phases = ['configure', 'build', 'install'] + # build_system_class = 'OpenfoamCom' + + # Add symlinks into bin/, lib/ (eg, for other applications) + extra_symlinks = False + + def setup_environment(self, spack_env, run_env): + run_env.set('WM_PROJECT_DIR', self.projectdir) + + @property + def _canonical(self): + """Canonical name for this package and version""" + return 'OpenFOAM-{0}'.format(self.version) + + @property + def projectdir(self): + """Absolute location of project directory: WM_PROJECT_DIR/""" + return join_path(self.prefix, self._canonical) # <- prefix/canonical + + @property + def etc(self): + """Absolute location of the OpenFOAM etc/ directory""" + return join_path(self.projectdir, 'etc') + + @property + def archbin(self): + """Relative location of architecture-specific executables""" + return join_path('platforms', self.wm_options, 'bin') + + @property + def archlib(self): + """Relative location of architecture-specific libraries""" + return join_path('platforms', self.wm_options, 'lib') + + @property + def wm_options(self): + """The architecture+compiler+options for OpenFOAM""" + opts = self.set_openfoam() + return opts + + @property + def rpath_info(self): + """Define 'SPACKOpt' compiler optimization file to have wmake + use spack information with minimum modifications to OpenFOAM + """ + build_libpath = join_path(self.stage.source_path, self.archlib) + install_libpath = join_path(self.projectdir, self.archlib) + + # 'DBUG': rpaths + return '{0}{1} {2}{3}'.format( + self.compiler.cxx_rpath_arg, install_libpath, + self.compiler.cxx_rpath_arg, build_libpath) + + def openfoam_arch(self): + """Return an architecture value similar to what OpenFOAM does in + etc/config.sh/settings, but slightly more generous. + Uses and may adjust foam_cfg[WM_ARCH_OPTION] as a side-effect + """ + # spec.architecture.platform is like `uname -s`, but lower-case + platform = self.spec.architecture.platform + + # spec.architecture.target is like `uname -m` + target = self.spec.architecture.target + + if platform == 'linux': + if target == 'i686': + self.foam_cfg['WM_ARCH_OPTION'] = '32' # Force consistency + elif target == 'x86_64': + if self.foam_cfg['WM_ARCH_OPTION'] == '64': + platform += '64' + elif target == 'ia64': + platform += 'ia64' + elif target == 'armv7l': + platform += 'ARM7' + elif target == ppc64: + platform += 'PPC64' + elif target == ppc64le: + platform += 'PPC64le' + elif platform == 'darwin': + if target == 'x86_64': + platform += 'Intel' + if self.foam_cfg['WM_ARCH_OPTION'] == '64': + platform += '64' + # ... and others? + return platform + + def openfoam_compiler(self): + """Capitalized version of the compiler name, which usually corresponds + to how OpenFOAM will camel-case things. + Use compiler_mapping to handing special cases. + Also handle special compiler options (eg, KNL) + """ + comp = self.compiler.name + if comp in self.compiler_mapping: + comp = self.compiler_mapping[comp] + comp = comp.capitalize() + + if '+knl' in self.spec: + comp += 'KNL' + return comp + + def set_openfoam(self): + """Populate foam_cfg, foam_sys according to + variants, architecture, compiler. + Returns WM_OPTIONS. + """ + # Run once + opts = self.foam_sys['WM_OPTIONS'] + if opts: + return opts + + wm_arch = self.openfoam_arch() + wm_compiler = self.openfoam_compiler() + compileOpt = self.foam_cfg['WM_COMPILE_OPTION'] + + # Insist on a wmake rule for this architecture/compiler combination + archCompiler = wm_arch + wm_compiler + compiler_rule = join_path( + self.stage.source_path, 'wmake', 'rules', archCompiler) + + if not isdir(compiler_rule): + raise RuntimeError( + 'No wmake rule for {0}'.format(archCompiler)) + if not re.match(r'.+Opt$', compileOpt): + raise RuntimeError( + "WM_COMPILE_OPTION={0} is not type '*Opt'".format(compileOpt)) + + # Adjust for variants + self.foam_cfg['WM_LABEL_SIZE'] = ( + '64' if '+int64' in self.spec else '32' + ) + self.foam_cfg['WM_PRECISION_OPTION'] = ( + 'SP' if '+float32' in self.spec else 'DP' + ) + + # ---- + # WM_LABEL_OPTION=Int$WM_LABEL_SIZE + # WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION + # ---- + self.foam_sys['WM_ARCH'] = wm_arch + self.foam_sys['WM_COMPILER'] = wm_compiler + self.foam_cfg['WM_COMPILER'] = wm_compiler # For bashrc,cshrc too + self.foam_sys['WM_OPTIONS'] = ''.join([ + wm_arch, + wm_compiler, + self.foam_cfg['WM_PRECISION_OPTION'], + 'Int', self.foam_cfg['WM_LABEL_SIZE'], # Int32/Int64 + compileOpt + ]) + return self.foam_sys['WM_OPTIONS'] + + def patch(self): + """Adjust OpenFOAM build for spack. Where needed, apply filter as an + alternative to normal patching. + """ + self.set_openfoam() # May need foam_cfg/foam_sys information + + # This is fairly horrible. + # The github tarfiles have weird names that do not correspond to the + # canonical name. We need to rename these, but leave a symlink for + # spack to work with. + # + # Note that this particular OpenFOAM release requires absolute + # directories to build correctly! + parent = os.path.dirname(self.stage.source_path) + original = os.path.basename(self.stage.source_path) + target = self._canonical + with working_dir(parent): + if original != target and not os.path.lexists(target): + os.rename(original, target) + os.symlink(target, original) + tty.info('renamed {0} -> {1}'.format(original, target)) + + # Avoid WM_PROJECT_INST_DIR for ThirdParty, site or jobControl. + # Use openfoam-site.patch to handle jobControl, site. + # + # Filter (not patch) bashrc,cshrc for additional flexibility + wm_setting = { + 'WM_THIRD_PARTY_DIR': + r'$WM_PROJECT_DIR/ThirdParty #SPACK: No separate third-party', + 'WM_VERSION': self.version, # consistency + 'FOAMY_HEX_MESH': '', # This is horrible (unset variable?) + } + + rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc + wm_setting, + posix=join_path('etc', 'bashrc'), + cshell=join_path('etc', 'cshrc')) + + # Build wrapper script + with open(self.build_script, 'w') as out: + out.write( + """#!/bin/bash +. $PWD/etc/bashrc '' # No arguments +mkdir -p $FOAM_APPBIN $FOAM_LIBBIN 2>/dev/null # Allow interrupt +echo Build openfoam with SPACK +echo WM_PROJECT_DIR = $WM_PROJECT_DIR +./Allwmake $@ +# +""") + set_executable(self.build_script) + self.configure(self.spec, self.prefix) # Should be a separate phase + + def configure(self, spec, prefix): + """Make adjustments to the OpenFOAM configuration files in their various + locations: etc/bashrc, etc/config.sh/FEATURE and customizations that + don't properly fit get placed in the etc/prefs.sh file (similiarly for + csh). + """ + self.set_openfoam() # Need foam_cfg/foam_sys information + + # Some settings for filtering bashrc, cshrc + wm_setting = {} + wm_setting.update(self.foam_cfg) + + rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc + wm_setting, + posix=join_path('etc', 'bashrc'), + cshell=join_path('etc', 'cshrc')) + + # MPI content, with absolute paths + content = mplib_content(spec) + + # Content for etc/prefs.{csh,sh} + self.etc_prefs = { + r'MPI_ROOT': spec['mpi'].prefix, # Absolute + r'MPI_ARCH_FLAGS': '"%s"' % content['FLAGS'], + r'MPI_ARCH_INC': '"%s"' % content['PINC'], + r'MPI_ARCH_LIBS': '"%s"' % content['PLIBS'], + } + + # Content for etc/config.{csh,sh}/ files + self.etc_config = { + 'CGAL': {}, + 'scotch': {}, + 'metis': {}, + 'paraview': [], + } + + if True: + self.etc_config['scotch'] = { + 'SCOTCH_ARCH_PATH': spec['scotch'].prefix, + # For src/parallel/decompose/Allwmake + 'SCOTCH_VERSION': 'scotch-{0}'.format(spec['scotch'].version), + } + + # Write prefs files according to the configuration. + # Only need prefs.sh for building, but install both for end-users + if self.etc_prefs: + write_environ( + self.etc_prefs, + posix=join_path('etc', 'prefs.sh'), + cshell=join_path('etc', 'prefs.csh')) + + # Adjust components to use SPACK variants + for component, subdict in self.etc_config.iteritems(): + write_environ( + subdict, + posix=join_path('etc', 'config.sh', component), + cshell=join_path('etc', 'config.csh', component)) + + archCompiler = self.foam_sys['WM_ARCH'] + self.foam_sys['WM_COMPILER'] + compileOpt = self.foam_cfg['WM_COMPILE_OPTION'] + general_rule = join_path('wmake', 'rules', 'General') + compiler_rule = join_path('wmake', 'rules', archCompiler) + generate_mplib_rules(general_rule, self.spec) + generate_compiler_rules(compiler_rule, compileOpt, self.rpath_info) + # Record the spack spec information + with open("log.spack-spec", 'w') as outfile: + outfile.write(spec.tree()) + + def build(self, spec, prefix): + """Build using the OpenFOAM Allwmake script, with a wrapper to source + its environment first. + """ + self.set_openfoam() # Force proper population of foam_cfg/foam_sys + args = [] + if self.parallel: # Build in parallel? - pass via the environment + os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ + if self.make_jobs else str(multiprocessing.cpu_count()) + builder = Executable(self.build_script) + builder(*args) + + def install(self, spec, prefix): + """Install under the projectdir (== prefix/name-version)""" + self.build(spec, prefix) # Should be a separate phase + opts = self.wm_options + + mkdirp(self.projectdir) + projdir = os.path.basename(self.projectdir) + wm_setting = { + 'WM_PROJECT_INST_DIR': os.path.dirname(self.projectdir), + 'WM_PROJECT_DIR': join_path('$WM_PROJECT_INST_DIR', projdir), + } + + # Retain build log file + out = "spack-build.out" + if isfile(out): + install(out, join_path(self.projectdir, "log." + opts)) + + # All top-level files, except spack build info and possibly Allwmake + if '+source' in spec: + ignored = re.compile(r'^spack-.*') + else: + ignored = re.compile(r'^(Allwmake|spack-).*') + + files = [ + f for f in glob.glob("*") if isfile(f) and not ignored.search(f) + ] + for f in files: + install(f, self.projectdir) + + # Having wmake without sources is actually somewhat pointless... + dirs = ['bin', 'etc', 'wmake'] + if '+source' in spec: + dirs.extend(['applications', 'src', 'tutorials']) + + for d in dirs: + install_tree( + d, + join_path(self.projectdir, d)) + + dirs = ['platforms'] + if '+source' in spec: + dirs.extend(['doc']) + + # Install platforms (and doc) skipping intermediate targets + ignored = ['src', 'applications', 'html', 'Guides'] + for d in dirs: + install_tree( + d, + join_path(self.projectdir, d), + ignore=shutil.ignore_patterns(*ignored)) + + rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc + wm_setting, + posix=join_path(self.etc, 'bashrc'), + cshell=join_path(self.etc, 'cshrc')) + self.install_links() + + def install_links(self): + """Add symlinks into bin/, lib/ (eg, for other applications)""" + if not self.extra_symlinks: + return + + # ln -s platforms/linux64GccXXX/lib lib + with working_dir(self.projectdir): + if isdir(self.archlib): + os.symlink(self.archlib, 'lib') + + # (cd bin && ln -s ../platforms/linux64GccXXX/bin/* .) + with working_dir(join_path(self.projectdir, 'bin')): + for f in [ + f for f in glob.glob(join_path('..', self.archbin, "*")) + if isfile(f) + ]: + os.symlink(f, os.path.basename(f)) + +# ----------------------------------------------------------------------------- diff --git a/var/spack/repos/builtin/packages/openfst/package.py b/var/spack/repos/builtin/packages/openfst/package.py index e96575798b..9711605462 100644 --- a/var/spack/repos/builtin/packages/openfst/package.py +++ b/var/spack/repos/builtin/packages/openfst/package.py @@ -26,9 +26,9 @@ from spack import * class Openfst(AutotoolsPackage): - """OpenFst is a library for constructing, combining, optimizing, - and searching weighted finite-state transducers (FSTs). Weighted - finite-state transducers are automata where each transition has + """OpenFst is a library for constructing, combining, optimizing, + and searching weighted finite-state transducers (FSTs). Weighted + finite-state transducers are automata where each transition has an input label, an output label, and a weight.""" homepage = "http://www.openfst.org" @@ -45,10 +45,5 @@ class Openfst(AutotoolsPackage): version('1.4.1', 'ca8f1730b9b9b281e515611fa9ae23c0') version('1.4.0', '662367ec91084ffab48ee9b5716de39c') - @run_before('autoreconf') - def check_compilers(self): - # Fails to built openfst with %gcc@6: or %intel@16 - if self.spec.satisfies('%intel@16:') or self.spec.satisfies('gcc@6:'): - raise InstallError( - 'openfst does not support Intel compiler >= 16 and gcc >= 6 ' - ) + conflicts('%intel@16:') + conflicts('%gcc@6:') diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py index 9790c52e7d..b22de4452a 100644 --- a/var/spack/repos/builtin/packages/openjpeg/package.py +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -43,7 +43,3 @@ class Openjpeg(CMakePackage): version('2.0', 'cdf266530fee8af87454f15feb619609') version('1.5.2', '545f98923430369a6b046ef3632ef95c') version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') - - def url_for_version(self, version): - fmt = 'https://github.com/uclouvain/openjpeg/archive/version.{0}.tar.gz' - return fmt.format(version.dotted) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3480311aed..7c07c515fa 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -61,7 +61,7 @@ class Openmpi(AutotoolsPackage): homepage = "http://www.open-mpi.org" url = "https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.0.tar.bz2" list_url = "http://www.open-mpi.org/software/ompi/" - list_depth = 3 + list_depth = 2 version('2.1.0', '4838a5973115c44e14442c01d3f21d52') version('2.0.2', 'ecd99aa436a1ca69ce936a96d6a3fa48') diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 1432ac76fc..53e94ed445 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -37,7 +37,7 @@ class Openssl(Package): # URL must remain http:// so Spack can bootstrap curl url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" list_url = "https://www.openssl.org/source/old/" - list_depth = 2 + list_depth = 1 version('1.1.0e', '51c42d152122e474754aea96f66928c6') version('1.1.0d', '711ce3cd5f53a99c0e12a7d5804f0f63') diff --git a/var/spack/repos/builtin/packages/panda/package.py b/var/spack/repos/builtin/packages/panda/package.py index e30c2c869d..fb14bd5643 100644 --- a/var/spack/repos/builtin/packages/panda/package.py +++ b/var/spack/repos/builtin/packages/panda/package.py @@ -29,9 +29,9 @@ from spack import * class Panda(Package): """PANDA: Parallel AdjaceNcy Decomposition Algorithm""" homepage = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/index.html" - url = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/downloads/current_panda.tar" + url = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/downloads/panda-2016-03-07.tar" - version('current', 'b06dc312ee56e13eefea9c915b70fcef') + version('2016-03-07', 'b06dc312ee56e13eefea9c915b70fcef') # Note: Panda can also be built without MPI support diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index 0f082527b9..cc6565dae3 100644 --- a/var/spack/repos/builtin/packages/pango/package.py +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -33,7 +33,7 @@ class Pango(AutotoolsPackage): homepage = "http://www.pango.org" url = "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-1.40.3.tar.xz" list_url = "http://ftp.gnome.org/pub/gnome/sources/pango/" - list_depth = 2 + list_depth = 1 version('1.40.3', 'abba8b5ce728520c3a0f1535eab19eac3c14aeef7faa5aded90017ceac2711d3') version('1.40.1', 'e27af54172c72b3ac6be53c9a4c67053e16c905e02addcf3a603ceb2005c1a40') diff --git a/var/spack/repos/builtin/packages/parallel/package.py b/var/spack/repos/builtin/packages/parallel/package.py index 32c3b3f5cd..11e9497288 100644 --- a/var/spack/repos/builtin/packages/parallel/package.py +++ b/var/spack/repos/builtin/packages/parallel/package.py @@ -34,6 +34,7 @@ class Parallel(AutotoolsPackage): homepage = "http://www.gnu.org/software/parallel/" url = "http://ftp.gnu.org/gnu/parallel/parallel-20170122.tar.bz2" + version('20170322', '4fe1b8d2e3974d26c77f0b514988214d') version('20170122', 'c9f0ec01463dc75dbbf292fd8be5f1eb') version('20160422', '24621f684130472694333709bd4454cb') version('20160322', '4e81e0d36902ab4c4e969ee6f35e6e57') diff --git a/var/spack/repos/builtin/packages/paraview/gcc-compiler-pv501.patch b/var/spack/repos/builtin/packages/paraview/gcc-compiler-pv501.patch new file mode 100644 index 0000000000..bb3be1832f --- /dev/null +++ b/var/spack/repos/builtin/packages/paraview/gcc-compiler-pv501.patch @@ -0,0 +1,22 @@ +--- ParaView-5.0.1.orig/VTK/CMake/vtkCompilerExtras.cmake 2016-03-28 17:07:10.000000000 +0200 ++++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -32,7 +32,7 @@ + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) + +- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" ++ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + if(NOT _gcc_version) + string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" +--- ParaView-5.0.1.orig/VTK/CMake/GenerateExportHeader.cmake 2016-03-28 17:07:10.000000000 +0200 ++++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -166,7 +166,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 252f58247f..d21b700e09 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -25,32 +25,36 @@ from spack import * -class Paraview(Package): +class Paraview(CMakePackage): + """ParaView is an open-source, multi-platform data analysis and + visualization application.""" + homepage = 'http://www.paraview.org' - url = 'http://www.paraview.org/files/v5.0/ParaView-v' - _url_str = 'http://www.paraview.org/files/v%s/ParaView-v%s-source.tar.gz' + url = "http://www.paraview.org/files/v5.3/ParaView-v5.3.0.tar.gz" + _urlfmt = 'http://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.gz' + version('5.3.0', '68fbbbe733aa607ec13d1db1ab5eba71') + version('5.2.0', '4570d1a2a183026adb65b73c7125b8b0') + version('5.1.2', '44fb32fc8988fcdfbc216c9e40c3e925') + version('5.0.1', 'fdf206113369746e2276b95b257d2c9b') version('4.4.0', 'fa1569857dd680ebb4d7ff89c2227378') - version('5.0.0', '4598f0b421460c8bbc635c9a1c3bdbee') + variant('plugins', default=True, + description='Install include files for plugins support') variant('python', default=False, description='Enable Python support') - - variant('tcl', default=False, description='Enable TCL support') - variant('mpi', default=True, description='Enable MPI support') - variant('osmesa', default=False, description='Enable OSMesa support') - variant('qt', default=False, description='Enable Qt support') - variant('opengl2', default=False, description='Enable OpenGL2 backend') + variant('qt', default=False, description='Enable Qt (gui) support') + variant('opengl2', default=True, description='Enable OpenGL2 backend') depends_on('python@2:2.7', 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') + # TODO# depends_on('qt@:4', when='@:5.2.0+qt') + # TODO# depends_on('qt@5', when='@5.3.0:+qt') - depends_on('cmake', type='build') depends_on('bzip2') depends_on('freetype') # depends_on('hdf5+mpi', when='+mpi') @@ -65,61 +69,71 @@ class Paraview(Package): # depends_on('sqlite') # external version not supported depends_on('zlib') + patch('stl-reader-pv440.patch', when='@4.4.0') + + # Broken gcc-detection - improved in 5.1.0, redundant later + patch('gcc-compiler-pv501.patch', when='@:5.0.1') + + # Broken installation (ui_pqExportStateWizard.h) - fixed in 5.2.0 + patch('ui_pqExportStateWizard.patch', when='@:5.1.2') + 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'): - if feature in spec: - return on - return off - - def nfeature_to_bool(feature): - 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')) - 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')) - 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.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') - - 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) - make() - make('install') + if version < Version('5.1.0'): + return self._urlfmt.format(version.up_to(2), version, '-source') + else: + return self._urlfmt.format(version.up_to(2), version, '') + + def cmake_args(self): + """Populate cmake arguments for ParaView.""" + spec = self.spec + + def variant_bool(feature, on='ON', off='OFF'): + """Ternary for spec variant to ON/OFF string""" + if feature in spec: + return on + return off + + def nvariant_bool(feature): + """Negated ternary for spec variant to OFF/ON string""" + return variant_bool(feature, on='OFF', off='ON') + + rendering = variant_bool('+opengl2', 'OpenGL2', 'OpenGL') + includes = variant_bool('+plugins') + + cmake_args = [ + '-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % variant_bool('+qt'), + '-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % variant_bool('+osmesa'), + '-DVTK_USE_X:BOOL=%s' % nvariant_bool('+osmesa'), + '-DVTK_RENDERING_BACKEND:STRING=%s' % rendering, + '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=%s' % includes, + '-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', + ] + + if '+python' in spec: + cmake_args.extend([ + '-DPARAVIEW_ENABLE_PYTHON:BOOL=ON', + '-DPYTHON_EXECUTABLE:FILEPATH=%s/bin/python' + % spec['python'].prefix + ]) + + if '+mpi' in spec: + cmake_args.extend([ + '-DPARAVIEW_USE_MPI:BOOL=ON', + '-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix + ]) + + if 'darwin' in self.spec.architecture: + cmake_args.extend([ + '-DVTK_USE_X:BOOL=OFF', + '-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON', + ]) + + return cmake_args diff --git a/var/spack/repos/builtin/packages/paraview/stl-reader-pv440.patch b/var/spack/repos/builtin/packages/paraview/stl-reader-pv440.patch new file mode 100644 index 0000000000..06907fd895 --- /dev/null +++ b/var/spack/repos/builtin/packages/paraview/stl-reader-pv440.patch @@ -0,0 +1,11 @@ +--- ParaView-4.4.0.orig/VTK/IO/Geometry/vtkSTLReader.cxx 2015-09-11 19:59:24.000000000 +0200 ++++ ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx 2016-06-19 12:59:50.769770143 +0200 +@@ -448,7 +448,7 @@ + done = done || (fscanf(fp,"%s", line)==EOF); + } + } +- if (!done) ++ else if (!done) + { + done = (fgets(line, 255, fp) == 0); + lineCount++; diff --git a/var/spack/repos/builtin/packages/paraview/ui_pqExportStateWizard.patch b/var/spack/repos/builtin/packages/paraview/ui_pqExportStateWizard.patch new file mode 100644 index 0000000000..2983af56ef --- /dev/null +++ b/var/spack/repos/builtin/packages/paraview/ui_pqExportStateWizard.patch @@ -0,0 +1,11 @@ +--- ParaView-5.0.1.orig/Qt/Components/CMakeLists.txt 2016-03-28 17:07:03.000000000 +0200 ++++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100 +@@ -656,7 +656,7 @@ + #the pqSGExportStateWizard has subclasses that directly access + #the UI file, and currently we don't have a clean way to break this hard + #dependency, so for no we install this ui file. +-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) ++if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" + DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") + endif() diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 0e6cd5390a..b07c796dd7 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -33,7 +33,8 @@ class Parmetis(Package): computing fill-reducing orderings of sparse matrices.""" homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' - base_url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis' + url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz' + list_url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD' version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce') @@ -54,8 +55,11 @@ class Parmetis(Package): patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') def url_for_version(self, version): - verdir = 'OLD/' if version < Version('3.2.0') else '' - return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, verdir, version) + url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis' + if version < Version('3.2.0'): + url += '/OLD' + url += '/parmetis-{0}.tar.gz'.format(version) + return url def install(self, spec, prefix): source_directory = self.stage.source_path @@ -72,7 +76,7 @@ class Parmetis(Package): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') else: - # Remove all RPATH options + # Remove all RPATH options # (RPATHxxx options somehow trigger cmake to link dynamically) rpath_options = [] for o in options: diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py index 1d429361b6..d36366f557 100644 --- a/var/spack/repos/builtin/packages/patchelf/package.py +++ b/var/spack/repos/builtin/packages/patchelf/package.py @@ -33,7 +33,7 @@ class Patchelf(AutotoolsPackage): url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz" list_url = "http://nixos.org/releases/patchelf/" - list_depth = 2 + list_depth = 1 version('0.9', '3c265508526760f233620f35d79c79fc') version('0.8', '407b229e6a681ffb0e2cdd5915cb2d01') diff --git a/var/spack/repos/builtin/packages/perl-dbi/package.py b/var/spack/repos/builtin/packages/perl-dbi/package.py new file mode 100644 index 0000000000..d1c6a11fb4 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-dbi/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PerlDbi(PerlPackage): + """The DBI is the standard database interface module for Perl. It defines + a set of methods, variables and conventions that provide a consistent + database interface independent of the actual database being used.""" + + homepage = "https://dbi.perl.org/" + url = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.636.tar.gz" + + version('1.636', '60f291e5f015550dde71d1858dfe93ba') diff --git a/var/spack/repos/builtin/packages/perl-module-build/package.py b/var/spack/repos/builtin/packages/perl-module-build/package.py new file mode 100644 index 0000000000..cccc5d7b5a --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-module-build/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 PerlModuleBuild(PerlPackage): + """Module::Build is a system for building, testing, and installing Perl + modules. It is meant to be an alternative to ExtUtils::MakeMaker. + Developers may alter the behavior of the module through subclassing in a + much more straightforward way than with MakeMaker. It also does not + require a make on your system - most of the Module::Build code is + pure-perl and written in a very cross-platform way. + """ + + homepage = "http://search.cpan.org/perldoc/Module::Build" + url = "http://search.cpan.org/CPAN/authors/id/L/LE/LEONT/Module-Build-0.4220.tar.gz" + + version('0.4220', '9df204e188462a4410d496f316c2c531') diff --git a/var/spack/repos/builtin/packages/perl-term-readkey/package.py b/var/spack/repos/builtin/packages/perl-term-readkey/package.py new file mode 100644 index 0000000000..2b1f93cbc0 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-term-readkey/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 PerlTermReadkey(PerlPackage): + """Term::ReadKey is a compiled perl module dedicated to providing simple + control over terminal driver modes (cbreak, raw, cooked, etc.,) support + for non-blocking reads, if the architecture allows, and some generalized + handy functions for working with terminals. One of the main goals is to + have the functions as portable as possible, so you can just plug in + "use Term::ReadKey" on any architecture and have a good likelihood of it + working.""" + + homepage = "http://search.cpan.org/perldoc/Term::ReadKey" + url = "http://www.cpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz" + list_url = "http://www.cpan.org/authors/id/J/JS/JSTOWE" + + version('2.37', 'e8ea15c16333ac4f8d146d702e83cc0c') diff --git a/var/spack/repos/builtin/packages/perl-xml-parser/package.py b/var/spack/repos/builtin/packages/perl-xml-parser/package.py new file mode 100644 index 0000000000..5ceb380473 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-xml-parser/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +# +from spack import * + + +class PerlXmlParser(PerlPackage): + """XML::Parser - A perl module for parsing XML documents""" + + homepage = "http://search.cpan.org/perldoc/XML::Parser" + url = "http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz" + + version('2.44', 'af4813fe3952362451201ced6fbce379') + + depends_on('expat') diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 4bacad427b..4ae140454d 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## # +# Author: Milton Woods <milton.woods@bom.gov.au> +# Date: March 22, 2017 # Author: George Hartzell <hartzell@alerce.com> # Date: July 21, 2016 # Author: Justin Too <justin@doubleotoo.com> @@ -34,17 +36,27 @@ from spack import * class Perl(Package): # Perl doesn't use Autotools, it should subclass Package """Perl 5 is a highly capable, feature-rich programming language with over 27 years of development.""" + homepage = "http://www.perl.org" # URL must remain http:// so Spack can bootstrap curl - url = "http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz" + url = "http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz" + + # Development releases + version('5.25.11', '37a398682c36cd85992b34b5c1c25dc1') - version('5.24.1', '765ef511b5b87a164e2531403ee16b3c') - version('5.24.0', 'c5bf7f3285439a2d3b6a488e14503701') + # Maintenance releases (recommended) + version('5.24.1', '765ef511b5b87a164e2531403ee16b3c', preferred=True) + version('5.22.3', 'aa4f236dc2fc6f88b871436b8d0fda95') + + # Misc releases that people need version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b') + + # End of life releases 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') + version('5.18.4', '1f9334ff730adc05acd3dd7130d295db') + version('5.16.3', 'eb5c40f2575df6c155bc99e3fe0a9d82') + + extendable = True # Installing cpanm alongside the core makes it safe and simple for # people/projects to install their own sets of perl modules. Not @@ -61,18 +73,42 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package placement="cpanm" ) - def install(self, spec, prefix): - configure = Executable('./Configure') - configure_args = ["-des", "-Dprefix=" + prefix] + phases = ['configure', 'build', 'install'] + + def configure_args(self): + spec = self.spec + prefix = self.prefix + + config_args = [ + '-des', + '-Dprefix={0}'.format(prefix) + ] + # Discussion of -fPIC for Intel at: # https://github.com/LLNL/spack/pull/3081 if spec.satisfies('%intel'): - configure_args.append("-Accflags=" + self.compiler.pic_flag) - configure(*configure_args) + config_args.append('-Accflags={0}'.format(self.compiler.pic_flag)) + + return config_args + + def configure(self, spec, prefix): + configure = Executable('./Configure') + configure(*self.configure_args()) + + def build(self, spec, prefix): make() - if self.run_tests: - make("test") - make("install") + + @on_package_attributes(run_tests=True) + def test(self): + make('test') + + def install(self, spec, prefix): + make('install') + + @run_after('install') + def install_cpanm(self): + spec = self.spec + prefix = self.prefix if '+cpanm' in spec: with working_dir(join_path('cpanm', 'cpanm')): @@ -80,3 +116,42 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package perl('Makefile.PL') make() make('install') + + def setup_environment(self, spack_env, run_env): + """Set PERL5LIB to support activation of Perl packages""" + run_env.set('PERL5LIB', join_path(self.prefix, 'lib', 'perl5')) + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + """Set PATH and PERL5LIB to include the extension and + any other perl extensions it depends on, + assuming they were installed with INSTALL_BASE defined.""" + perl_lib_dirs = [] + perl_bin_dirs = [] + for d in dependent_spec.traverse( + deptype=('build', 'run'), deptype_query='run'): + if d.package.extends(self.spec): + perl_lib_dirs.append(join_path(d.prefix, 'lib', 'perl5')) + perl_bin_dirs.append(join_path(d.prefix, 'bin')) + perl_bin_path = ':'.join(perl_bin_dirs) + perl_lib_path = ':'.join(perl_lib_dirs) + spack_env.prepend_path('PATH', perl_bin_path) + spack_env.prepend_path('PERL5LIB', perl_lib_path) + run_env.prepend_path('PATH', perl_bin_path) + run_env.prepend_path('PERL5LIB', perl_lib_path) + + def setup_dependent_package(self, module, dependent_spec): + """Called before perl modules' install() methods. + In most cases, extensions will only need to have one line: + perl('Makefile.PL','INSTALL_BASE=%s' % self.prefix) + """ + + # perl extension builds can have a global perl executable function + module.perl = Executable(join_path(self.spec.prefix.bin, 'perl')) + + # Add variables for library directory + module.perl_lib_dir = join_path(dependent_spec.prefix, 'lib', 'perl5') + + # Make the site packages directory for extensions, + # if it does not exist already. + if dependent_spec.package.is_extension: + mkdirp(module.perl_lib_dir) diff --git a/var/spack/repos/builtin/packages/petsc/macos-clang-8.1.0.diff b/var/spack/repos/builtin/packages/petsc/macos-clang-8.1.0.diff new file mode 100644 index 0000000000..b4384d3ac3 --- /dev/null +++ b/var/spack/repos/builtin/packages/petsc/macos-clang-8.1.0.diff @@ -0,0 +1,18 @@ +diff --git a/config/BuildSystem/config/libraries.py b/config/BuildSystem/config/libraries.py +index 0af92f0..8644b55 100644 +--- a/config/BuildSystem/config/libraries.py ++++ b/config/BuildSystem/config/libraries.py +@@ -50,12 +50,7 @@ class Configure(config.base.Configure): + flagName = self.language[-1]+'SharedLinkerFlag' + flagSubst = self.language[-1].upper()+'_LINKER_SLFLAG' + dirname = os.path.dirname(library).replace('\\ ',' ').replace(' ', '\\ ').replace('\\(','(').replace('(', '\\(').replace('\\)',')').replace(')', '\\)') +- if hasattr(self.setCompilers, flagName) and not getattr(self.setCompilers, flagName) is None: +- return [getattr(self.setCompilers, flagName)+dirname,'-L'+dirname,'-l'+name] +- if flagSubst in self.argDB: +- return [self.argDB[flagSubst]+dirname,'-L'+dirname,'-l'+name] +- else: +- return ['-L'+dirname,' -l'+name] ++ return ['-L'+dirname,' -l'+name] + else: + return ['-l'+name] + if os.path.splitext(library)[1] == '.so': diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 3e670cba63..b63172135e 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -74,6 +74,13 @@ class Petsc(Package): variant('int64', default=False, description='Compile with 64bit indices') + # temporary workaround Clang 8.1.0 with XCode 8.3 on macOS, see + # https://bitbucket.org/petsc/petsc/commits/4f290403fdd060d09d5cb07345cbfd52670e3cbc + # the patch is an adaptation of the original commit to 3.7.5 + if sys.platform == "darwin": + patch('macos-clang-8.1.0.diff', + when='@3.7.5%clang@8.1.0:') + # Virtual dependencies # Git repository needs sowing to build Fortran interface depends_on('sowing', when='@develop') diff --git a/var/spack/repos/builtin/packages/pexsi/make.inc b/var/spack/repos/builtin/packages/pexsi/make.inc index c97b09b424..ec619a7dba 100644 --- a/var/spack/repos/builtin/packages/pexsi/make.inc +++ b/var/spack/repos/builtin/packages/pexsi/make.inc @@ -63,7 +63,7 @@ CXXFLAGS = ${COMPILE_FLAG} ${CPPFLAG} ${PROFILE_FLAG} ${INCLUDES} CCDEFS = ${COMPILE_DEF} CPPDEFS = ${COMPILE_DEF} LOADOPTS = ${PROFILE_FLAG} ${LIBS} -FLOADOPTS = ${PROFILE_FLAG} ${LIBS} ${CPP_LIB} +FLOADOPTS = @FLDFLAGS ${PROFILE_FLAG} ${LIBS} ${CPP_LIB} # Generate auto-dependencies %.d: %.c diff --git a/var/spack/repos/builtin/packages/pexsi/package.py b/var/spack/repos/builtin/packages/pexsi/package.py index 989e2ebf6e..04d22c4da8 100644 --- a/var/spack/repos/builtin/packages/pexsi/package.py +++ b/var/spack/repos/builtin/packages/pexsi/package.py @@ -30,7 +30,7 @@ import shutil from spack import * -class Pexsi(Package): +class Pexsi(MakefilePackage): """The PEXSI library is written in C++, and uses message passing interface (MPI) to parallelize the computation on distributed memory computing systems and achieve scalability on more than 10,000 processors. @@ -46,14 +46,20 @@ class Pexsi(Package): homepage = 'https://math.berkeley.edu/~linlin/pexsi/index.html' url = 'https://math.berkeley.edu/~linlin/pexsi/download/pexsi_v0.9.0.tar.gz' + version('0.9.2', '0ce491a3a922d271c4edf9b20aa93076') version('0.9.0', '0c1a2de891ba1445dfc184b2fa270ed8') depends_on('parmetis') depends_on('superlu-dist@3.3', when='@0.9.0') + depends_on('superlu-dist@4.3', when='@0.9.2') + + variant( + 'fortran', default=False, description='Builds the Fortran interface' + ) parallel = False - def install(self, spec, prefix): + def edit(self, spec, prefix): substitutions = { '@MPICC': self.spec['mpi'].mpicc, @@ -70,9 +76,13 @@ class Pexsi(Package): '@LAPACK_LIBS': self.spec['lapack'].libs.joined(), '@BLAS_LIBS': self.spec['blas'].libs.joined(), # FIXME : what to do with compiler provided libraries ? - '@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs) + '@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs), + '@FLDFLAGS': '' } + if '@0.9.2' in self.spec: + substitutions['@FLDFLAGS'] = '-Wl,--allow-multiple-definition' + template = join_path( os.path.dirname(inspect.getmodule(self).__file__), 'make.inc' @@ -85,20 +95,29 @@ class Pexsi(Package): for key, value in substitutions.items(): filter_file(key, value, makefile) - make() + def build(self, spec, prefix): + super(Pexsi, self).build(spec, prefix) + if '+fortran' in self.spec: + make('-C', 'fortran') + + def install(self, spec, prefix): + # 'make install' does not exist, despite what documentation says mkdirp(self.prefix.lib) + install( join_path(self.stage.source_path, 'src', 'libpexsi_linux.a'), join_path(self.prefix.lib, 'libpexsi.a') ) + install_tree( join_path(self.stage.source_path, 'include'), self.prefix.include ) + # fortran "interface" - make('-C', 'fortran') - install_tree( - join_path(self.stage.source_path, 'fortran'), - join_path(self.prefix, 'fortran') - ) + if '+fortran' in self.spec: + install_tree( + join_path(self.stage.source_path, 'fortran'), + join_path(self.prefix, 'fortran') + ) diff --git a/var/spack/repos/builtin/packages/pigz/package.py b/var/spack/repos/builtin/packages/pigz/package.py new file mode 100644 index 0000000000..7ba120417a --- /dev/null +++ b/var/spack/repos/builtin/packages/pigz/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 Pigz(MakefilePackage): + """A parallel implementation of gzip for modern multi-processor, + multi-core machines.""" + + homepage = "http://zlib.net/pigz/" + url = "http://zlib.net/pigz/pigz-2.3.4.tar.gz" + + version('2.3.4', '08e6b2e682bbf65ccf12c8966d633fc6') + + depends_on('zlib') + + def build(self, spec, prefix): + make() + + def install(self, spec, prefix): + mkdirp(prefix.bin) + mkdirp(prefix.man1) + install('pigz', "%s/pigz" % prefix.bin) + install('pigz.1', "%s/pigz.1" % prefix.man1) diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py index 4d677172c4..50b517f6d0 100644 --- a/var/spack/repos/builtin/packages/pkg-config/package.py +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -25,40 +25,40 @@ from spack import * -class PkgConfig(Package): +class PkgConfig(AutotoolsPackage): """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" + url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz" + version('0.29.2', 'f6e931e319531b736fadc017f470e68a') version('0.29.1', 'f739a28cae4e0ca291f82d1d41ef107d') version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') - parallel = False variant('internal_glib', default=True, description='Builds with internal glib') # The following patch is needed for gcc-6.1 - patch('g_date_strftime.patch') + patch('g_date_strftime.patch', when='@:0.29.1') + + parallel = False - @when("platform=cray") - def setup_dependent_environment(self, spack_env, run_env, dep_spec): + @when('platform=cray') + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """spack built pkg-config on cray's requires adding /usr/local/ and /usr/lib64/ to PKG_CONFIG_PATH in order to access cray '.pc' files.""" - spack_env.prepend_path("PKG_CONFIG_PATH", "/usr/lib64/pkgconfig") - spack_env.prepend_path("PKG_CONFIG_PATH", "/usr/local/lib64/pkgconfig") + spack_env.prepend_path('PKG_CONFIG_PATH', '/usr/lib64/pkgconfig') + spack_env.prepend_path('PKG_CONFIG_PATH', '/usr/local/lib64/pkgconfig') + + def configure_args(self): + config_args = ['--enable-shared'] - def install(self, spec, prefix): - args = ["--prefix={0}".format(prefix), - "--enable-shared"] - if "+internal_glib" in spec: + if '+internal_glib' in self.spec: # There's a bootstrapping problem here; # glib uses pkg-config as well, so break # the cycle by using the internal glib. - args.append("--with-internal-glib") - configure(*args) + config_args.append('--with-internal-glib') - make() - make("install") + return config_args diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py index 80cc1aa66a..60443cbcc6 100644 --- a/var/spack/repos/builtin/packages/plumed/package.py +++ b/var/spack/repos/builtin/packages/plumed/package.py @@ -43,17 +43,16 @@ class Plumed(AutotoolsPackage): homepage = 'http://www.plumed.org/' url = 'https://github.com/plumed/plumed2/archive/v2.2.3.tar.gz' + version('2.3.0', 'a9b5728f115dca8f0519111f1f5a6fa5') + version('2.2.4', 'afb00da25a3fbd47acf377e53342059d') version('2.2.3', 'a6e3863e40aac07eb8cf739cbd14ecf8') # Variants. PLUMED by default builds a number of optional modules. # The ones listed here are not built by default for various reasons, # such as stability, lack of testing, or lack of demand. - variant('crystallization', default=False, - description='Build support for optional crystallization module.') - variant('imd', default=False, - description='Build support for optional imd module.') - variant('manyrestraints', default=False, - description='Build support for optional manyrestraints module.') + # FIXME: This needs to be an optional + variant('optional_modules', default='all', + description='String that is used to build optional modules') variant('shared', default=True, description='Builds shared libraries') variant('mpi', default=True, description='Activates MPI support') variant('gsl', default=True, description='Activates GSL support') @@ -73,6 +72,28 @@ class Plumed(AutotoolsPackage): # Dictionary mapping PLUMED versions to the patches it provides # interactively plumed_patches = { + '2.3.0': { + 'amber-14': '1', + 'gromacs-2016.1': '2', + 'gromacs-4.5.7': '3', + 'gromacs-5.0.7': '4', + 'gromacs-5.1.4': '5', + 'lammps-6Apr13': '6', + 'namd-2.8': '7', + 'namd-2.9': '8', + 'espresso-5.0.2': '9' + }, + '2.2.4': { + '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' + }, '2.2.3': { 'amber-14': '1', 'gromacs-4.5.7': '2', @@ -132,7 +153,7 @@ class Plumed(AutotoolsPackage): # If the MPI dependency is provided by the intel-mpi package then # the following additional argument is required to allow it to # build. - if spec.satisfies('^intel-mpi'): + if 'intel-mpi' in spec: configure_opts.extend([ 'STATIC_LIBS=-mt_mpi' ]) @@ -144,19 +165,16 @@ class Plumed(AutotoolsPackage): ]) # Construct list of optional modules - module_opts = [] - module_opts.extend([ - '+crystallization' if ( - '+crystallization' in spec) else '-crystallization', - '+imd' if '+imd' in spec else '-imd', - '+manyrestraints' if ( - '+manyrestraints' in spec) else '-manyrestraints' - ]) # If we have specified any optional modules then add the argument to # enable or disable them. - if module_opts: - configure_opts.extend([ - '--enable-modules={0}'.format("".join(module_opts))]) + optional_modules = self.spec.variants['optional_modules'].value + if optional_modules: + # From 'configure --help' @2.3: + # all/none/reset or : separated list such as + # +crystallization:-bias default: reset + configure_opts.append( + '--enable-modules={0}'.format(optional_modules) + ) return configure_opts diff --git a/var/spack/repos/builtin/packages/prank/package.py b/var/spack/repos/builtin/packages/prank/package.py index d627e8a0b6..09b73e795f 100644 --- a/var/spack/repos/builtin/packages/prank/package.py +++ b/var/spack/repos/builtin/packages/prank/package.py @@ -29,7 +29,7 @@ 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" + url = "http://wasabiapp.org/download/prank/prank.source.150803.tgz" version('150803', '71ac2659e91c385c96473712c0a23e8a') diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index 34d167b28c..e8010a496b 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -29,12 +29,14 @@ class Protobuf(AutotoolsPackage): """Google's data interchange format.""" homepage = "https://developers.google.com/protocol-buffers" - url = "https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2" + url = "https://github.com/google/protobuf/archive/v3.2.0.tar.gz" - version('3.0.2', '845b39e4b7681a2ddfd8c7f528299fbb', url='https://github.com/google/protobuf/archive/v3.0.2.tar.gz') - version('2.5.0', 'a72001a9067a4c2c4e0e836d0f92ece4') + version('3.2.0', '61d899b8369781f6dd1e62370813392d') + version('3.1.0', '14a532a7538551d5def317bfca41dace') + version('3.0.2', '845b39e4b7681a2ddfd8c7f528299fbb') + version('2.5.0', '9c21577a03adc1879aba5b52d06e25cf') - depends_on('m4', when='@3.0.2:') - depends_on('autoconf', when='@3.0.2:') - depends_on('automake', when='@3.0.2:') - depends_on('libtool', when='@3.0.2:') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') diff --git a/var/spack/repos/builtin/packages/pruners-ninja/package.py b/var/spack/repos/builtin/packages/pruners-ninja/package.py new file mode 100644 index 0000000000..effbd979c3 --- /dev/null +++ b/var/spack/repos/builtin/packages/pruners-ninja/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 PrunersNinja(AutotoolsPackage): + """NINJA: Noise Inject agent tool to expose subtle and unintended message + races.""" + homepage = "https://github.com/PRUNERS/NINJA" + url = "https://github.com/PRUNERS/NINJA/releases/download/v1.0.0/NINJA-1.0.0.tar.gz" + + version("1.0.0", "fee53c4712ac521ebec3cd8692e5185a") + + depends_on("mpi") + depends_on("autoconf", type='build') + depends_on("automake", type='build') + depends_on("libtool", type='build') diff --git a/var/spack/repos/builtin/packages/py-abipy/package.py b/var/spack/repos/builtin/packages/py-abipy/package.py new file mode 100644 index 0000000000..d113512f50 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-abipy/package.py @@ -0,0 +1,77 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyAbipy(PythonPackage): + """Python package to automate ABINIT calculations and analyze + the results.""" + + homepage = "https://github.com/abinit/abipy" + url = "https://pypi.io/packages/source/a/abipy/abipy-0.2.0.tar.gz" + + version('0.2.0', 'af9bc5cf7d5ca1a56ff73e2a65c5bcbd') + + variant('gui', default=False, description='Build the GUI') + variant('ipython', default=False, description='Build IPython support') + + extends('python', ignore='bin/(feff_.*|gaussian_analyzer|get_environment|html2text|nc3tonc4|nc4tonc3|ncinfo|pmg|pydii|tabulate|tqdm)') + + depends_on('python@2.7:') + + depends_on('py-setuptools', type='build') + depends_on('py-cython', type='build') + + depends_on('py-six', type=('build', 'run')) + depends_on('py-prettytable', type=('build', 'run')) + depends_on('py-tabulate', type=('build', 'run')) + depends_on('py-apscheduler@2.1.0', type=('build', 'run')) + depends_on('py-pydispatcher@2.0.5:', type=('build', 'run')) + depends_on('py-tqdm', type=('build', 'run')) + depends_on('py-html2text', type=('build', 'run')) + depends_on('py-pyyaml@3.11:', type=('build', 'run')) + depends_on('py-pandas', type=('build', 'run')) + depends_on('py-numpy@1.9:', type=('build', 'run')) + depends_on('py-scipy@0.14:', type=('build', 'run')) + depends_on('py-spglib', type=('build', 'run')) + depends_on('py-pymatgen@4.7.2:', type=('build', 'run')) + depends_on('py-netcdf4', type=('build', 'run')) + depends_on('py-matplotlib@1.5:', type=('build', 'run')) + depends_on('py-seaborn', type=('build', 'run')) + + depends_on('py-wxpython', type=('build', 'run'), when='+gui') + depends_on('py-wxmplot', type=('build', 'run'), when='+gui') + + depends_on('py-ipython', type=('build', 'run'), when='+ipython') + depends_on('py-jupyter', type=('build', 'run'), when='+ipython') + depends_on('py-nbformat', type=('build', 'run'), when='+ipython') + + def build_args(self, spec, prefix): + args = [] + + if '+ipython' in spec: + args.append('--with-ipython') + + return args diff --git a/var/spack/repos/builtin/packages/py-apscheduler/package.py b/var/spack/repos/builtin/packages/py-apscheduler/package.py new file mode 100644 index 0000000000..96b3e0d474 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-apscheduler/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 PyApscheduler(PythonPackage): + """In-process task scheduler with Cron-like capabilities.""" + + homepage = "https://github.com/agronholm/apscheduler" + url = "https://pypi.io/packages/source/A/APScheduler/APScheduler-3.3.1.tar.gz" + + version('3.3.1', '6342b3b78b41920a8aa54fd3cd4a299d') + version('2.1.0', 'b837d23822fc46651862dd2186ec361a') + + depends_on('py-setuptools@0.7:', type='build') + + depends_on('py-six@1.4.0:', type=('build', 'run')) + depends_on('py-pytz', type=('build', 'run')) + depends_on('py-tzlocal@1.2:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-autopep8/package.py b/var/spack/repos/builtin/packages/py-autopep8/package.py index c892e2979c..6c92def415 100644 --- a/var/spack/repos/builtin/packages/py-autopep8/package.py +++ b/var/spack/repos/builtin/packages/py-autopep8/package.py @@ -30,10 +30,10 @@ class PyAutopep8(PythonPackage): PEP 8 style guide.""" homepage = "https://github.com/hhatto/autopep8" - url = "https://github.com/hhatto/autopep8/archive/v1.2.4.tar.gz" + url = "https://pypi.io/packages/source/a/autopep8/autopep8-1.2.4.tar.gz" - version('1.2.4', '0458db85159a9e1b45f3e71ce6c158da') - version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1') + version('1.2.4', 'fcea19c0c5e505b425e2a78afb771f5c') + version('1.2.2', '3d97f9c89d14a0975bffd32a2c61c36c') extends('python', ignore='bin/pep8') depends_on('python@2.6:2.7,3.2:') @@ -41,10 +41,3 @@ class PyAutopep8(PythonPackage): depends_on('py-pycodestyle@1.5.7:1.7.0', type=('build', 'run')) depends_on('py-setuptools', type='build') - - def url_for_version(self, version): - url = "https://github.com/hhatto/autopep8/archive/{0}{1}.tar.gz" - if version >= Version('1.2.3'): - return url.format('v', version) - else: - return url.format('ver', version) diff --git a/var/spack/repos/builtin/packages/py-bokeh/package.py b/var/spack/repos/builtin/packages/py-bokeh/package.py new file mode 100644 index 0000000000..2394b376d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bokeh/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 PyBokeh(PythonPackage): + """Statistical and novel interactive HTML plots for Python""" + + homepage = "http://github.com/bokeh/bokeh" + url = "https://pypi.io/packages/source/b/bokeh/bokeh-0.12.2.tar.gz" + + version('0.12.2', '2d1621bffe6e2ab9d42efbf733861c4f') + + depends_on('python@2.6:') + depends_on('py-six@1.5.2:', type=('build', 'run')) + depends_on('py-requests@1.2.3:', type=('build', 'run')) + depends_on('py-pyyaml@3.10:', type=('build', 'run')) + depends_on('py-dateutil@2.1:', type=('build', 'run')) + depends_on('py-jinja2@2.7:', type=('build', 'run')) + depends_on('py-numpy@1.7.1:', type=('build', 'run')) + depends_on('py-tornado@4.3:', type=('build', 'run')) + depends_on('py-futures@3.0.3:', type=('build', 'run'), + when='^python@2.7:2.8') diff --git a/var/spack/repos/builtin/packages/py-brian2/package.py b/var/spack/repos/builtin/packages/py-brian2/package.py new file mode 100644 index 0000000000..28d1005432 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-brian2/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 PyBrian2(PythonPackage): + """A clock-driven simulator for spiking neural networks""" + + homepage = "http://www.briansimulator.org" + url = "https://pypi.io/packages/source/B/Brian2/Brian2-2.0.1.tar.gz" + + version('2.0.1', 'df5990e9a71f7344887bc02f54dfd0f0') + version('2.0rc3', '3100c5e4eb9eb83a06ff0413a7d43152') + + variant('docs', default=False) + + # depends on py-setuptools@6: for windows, if spack targets windows, + # this will need to be added here + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.8.2:', type=('build', 'run')) + depends_on('py-sympy@0.7.6:', type=('build', 'run')) + depends_on('py-pyparsing', type=('build', 'run')) + depends_on('py-jinja2@2.7:', type=('build', 'run')) + depends_on('py-cpuinfo@0.1.6:', type=('build', 'run')) + + # depends_on('py-nosetests@1.0:', type=('build', 'run')) # extra test + depends_on('py-nosetests@1.0:', type=('build', 'run'), when='+docs') + depends_on('py-sphinx@1.4.2:', type=('build', 'run'), when='+docs') diff --git a/var/spack/repos/builtin/packages/py-cdo/package.py b/var/spack/repos/builtin/packages/py-cdo/package.py index 5eb8f414a8..2bf4a2623c 100644 --- a/var/spack/repos/builtin/packages/py-cdo/package.py +++ b/var/spack/repos/builtin/packages/py-cdo/package.py @@ -30,13 +30,12 @@ class PyCdo(PythonPackage): Operators from Python.""" homepage = "https://pypi.python.org/pypi/cdo" - url = "https://pypi.python.org/packages/sources/c/cdo/cdo-1.3.2.tar.gz" + url = "https://pypi.io/packages/source/c/cdo/cdo-1.3.2.tar.gz" - version('1.3.2', '4b3686ec1b9b891f166c1c466c6db745', - url="https://pypi.python.org/packages/d6/13/908e7c1451e1f5fb68405f341cdcb3196a16952ebfe1f172cb788f864aa9/cdo-1.3.2.tar.gz") + version('1.3.2', '4b3686ec1b9b891f166c1c466c6db745') depends_on('cdo') depends_on('py-setuptools', type='build') depends_on('py-scipy', type=('build', 'run')) - depends_on('py-netcdf', type=('build', 'run')) + depends_on('py-netcdf4', type=('build', 'run')) diff --git a/var/spack/repos/builtin/py-dev/__init__.py.patch b/var/spack/repos/builtin/packages/py-dev/__init__.py.patch index 1c783b82c8..1c783b82c8 100644 --- a/var/spack/repos/builtin/py-dev/__init__.py.patch +++ b/var/spack/repos/builtin/packages/py-dev/__init__.py.patch diff --git a/var/spack/repos/builtin/py-dev/package.py b/var/spack/repos/builtin/packages/py-dev/package.py index 449ed7dd80..449ed7dd80 100644 --- a/var/spack/repos/builtin/py-dev/package.py +++ b/var/spack/repos/builtin/packages/py-dev/package.py diff --git a/var/spack/repos/builtin/packages/py-easybuild-easyblocks/package.py b/var/spack/repos/builtin/packages/py-easybuild-easyblocks/package.py new file mode 100644 index 0000000000..0f1aa923ec --- /dev/null +++ b/var/spack/repos/builtin/packages/py-easybuild-easyblocks/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2017, Kenneth Hoste +# +# This file is part of Spack. +# Created by Kenneth Hoste, kenneth.hoste@gmail.com +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyEasybuildEasyblocks(PythonPackage): + """Collection of easyblocks for EasyBuild, a software build and + installation framework for (scientific) software on HPC systems. + """ + + homepage = 'http://hpcugent.github.io/easybuild/' + url = 'https://pypi.io/packages/source/e/easybuild-easyblocks/easybuild-easyblocks-3.1.2.tar.gz' + + version('3.1.2', 'be08da30c07e67ed3e136e8d38905fbc') + + depends_on('py-easybuild-framework@3.1:', when='@3.1:', type='run') diff --git a/var/spack/repos/builtin/packages/py-easybuild-easyconfigs/package.py b/var/spack/repos/builtin/packages/py-easybuild-easyconfigs/package.py new file mode 100644 index 0000000000..1631557731 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-easybuild-easyconfigs/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2017, Kenneth Hoste +# +# This file is part of Spack. +# Created by Kenneth Hoste, kenneth.hoste@gmail.com +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyEasybuildEasyconfigs(PythonPackage): + """Collection of easyconfig files for EasyBuild, a software build and + installation framework for (scientific) software on HPC systems. + """ + + homepage = 'http://hpcugent.github.io/easybuild/' + url = 'https://pypi.io/packages/source/e/easybuild-easyconfigs/easybuild-easyconfigs-3.1.2.tar.gz' + + version('3.1.2', '13a4a97fe8a5b9a94f885661cf497d13') + + depends_on('py-easybuild-framework@3.1:', when='@3.1:', type='run') + depends_on('py-easybuild-easyblocks@3.1.2:', when='@3.1.2', type='run') diff --git a/var/spack/repos/builtin/packages/py-easybuild-framework/package.py b/var/spack/repos/builtin/packages/py-easybuild-framework/package.py new file mode 100644 index 0000000000..c8d89992c9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-easybuild-framework/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2017, Kenneth Hoste +# +# This file is part of Spack. +# Created by Kenneth Hoste, kenneth.hoste@gmail.com +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyEasybuildFramework(PythonPackage): + """The core of EasyBuild, a software build and installation framework + for (scientific) software on HPC systems. + """ + + homepage = 'http://hpcugent.github.io/easybuild/' + url = 'https://pypi.io/packages/source/e/easybuild-framework/easybuild-framework-3.1.2.tar.gz' + + version('3.1.2', '283bc5f6bdcb90016b32986d52fd04a8') + + depends_on('python@2.6:2.9', type='run') + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-vsc-base@2.5.4:', when='@2.9:', type='run') + depends_on('py-vsc-install', type='run') # only required for tests (python -O -m test.framework.suite) diff --git a/var/spack/repos/builtin/packages/py-html2text/package.py b/var/spack/repos/builtin/packages/py-html2text/package.py new file mode 100644 index 0000000000..32341f328a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-html2text/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyHtml2text(PythonPackage): + """Turn HTML into equivalent Markdown-structured text.""" + + homepage = "https://github.com/Alir3z4/html2text/" + url = "https://pypi.io/packages/source/h/html2text/html2text-2016.9.19.tar.gz" + + version('2016.9.19', 'd6b07e32ed21f186496f012691e02dd5') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-markdown/package.py b/var/spack/repos/builtin/packages/py-markdown/package.py index 23c8167021..af10f1c5d3 100644 --- a/var/spack/repos/builtin/packages/py-markdown/package.py +++ b/var/spack/repos/builtin/packages/py-markdown/package.py @@ -50,7 +50,3 @@ class PyMarkdown(PythonPackage): depends_on('py-setuptools', type='build') depends_on('python@2.7:2.8,3.2:3.4') - - def url_for_version(self, version): - base_url = "https://github.com/waylan/Python-Markdown/archive" - return "{0}/{1}-final.tar.gz".format(base_url, version) diff --git a/var/spack/repos/builtin/packages/py-mongo/package.py b/var/spack/repos/builtin/packages/py-mongo/package.py new file mode 100644 index 0000000000..e5f1debbd0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mongo/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 PyMongo(PythonPackage): + """Python driver for MongoDB <http://www.mongodb.org>""" + + homepage = "http://github.com/mongodb/mongo-python-driver" + url = "https://pypi.io/packages/source/p/pymongo/pymongo-3.3.0.tar.gz" + + version('3.3.0', '42cd12a5014fb7d3e1987ca04f5c651f') + + depends_on('python@2.6:2.8,3.3:') + + depends_on('setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-monty/package.py b/var/spack/repos/builtin/packages/py-monty/package.py new file mode 100644 index 0000000000..19057d51d3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-monty/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyMonty(PythonPackage): + """Monty is the missing complement to Python.""" + + homepage = "https://github.com/materialsvirtuallab/monty" + url = "https://pypi.io/packages/source/m/monty/monty-0.9.6.tar.gz" + + version('0.9.6', '406ea69fdd112feacfdf208624d56903') + + depends_on('py-setuptools', type='build') + depends_on('py-six', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-netcdf4/package.py b/var/spack/repos/builtin/packages/py-netcdf4/package.py new file mode 100644 index 0000000000..e49cc5410b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-netcdf4/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 PyNetcdf4(PythonPackage): + """Python interface to the netCDF Library.""" + + homepage = "https://github.com/Unidata/netcdf4-python" + url = "https://pypi.io/packages/source/n/netCDF4/netCDF4-1.2.7.tar.gz" + + version('1.2.7', '77b357d78f9658dd973dee901f6d86f8') + version('1.2.3.1', '24fc0101c7c441709c230e76af611d53') + + depends_on('py-setuptools', type='build') + depends_on('py-cython@0.19:', type='build') + + depends_on('py-numpy@1.7:', type=('build', 'run')) + + depends_on('netcdf') + depends_on('hdf5@1.8.0:') diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py index c78c52647a..f3f08029a4 100644 --- a/var/spack/repos/builtin/packages/py-nose/package.py +++ b/var/spack/repos/builtin/packages/py-nose/package.py @@ -31,8 +31,10 @@ class PyNose(PythonPackage): homepage = "https://pypi.python.org/pypi/nose" url = "https://pypi.io/packages/source/n/nose/nose-1.3.4.tar.gz" - list_url = "https://pypi.python.org/pypi/nose/" - list_depth = 2 + + import_modules = [ + 'nose', 'nose.ext', 'nose.plugins', 'nose.sphinx', 'nose.tools' + ] version('1.3.7', '4d3ad0ff07b61373d2cefc89c5d0b20b') version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16') diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 3ed0d0bdb5..3b590fbd24 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -36,6 +36,18 @@ class PyNumpy(PythonPackage): homepage = "http://www.numpy.org/" url = "https://pypi.io/packages/source/n/numpy/numpy-1.9.1.tar.gz" + install_time_test_callbacks = ['install_test', 'import_module_test'] + + import_modules = [ + 'numpy', 'numpy.compat', 'numpy.core', 'numpy.distutils', 'numpy.doc', + 'numpy.f2py', 'numpy.fft', 'numpy.lib', 'numpy.linalg', 'numpy.ma', + 'numpy.matrixlib', 'numpy.polynomial', 'numpy.random', 'numpy.testing', + 'numpy.distutils.command', 'numpy.distutils.fcompiler' + ] + + # FIXME: numpy._build_utils and numpy.core.code_generators failed to import + # FIXME: Is this expected? + version('1.12.0', '33e5a84579f31829bbbba084fe0a4300', url="https://pypi.io/packages/source/n/numpy/numpy-1.12.0.zip") version('1.11.2', '03bd7927c314c43780271bf1ab795ebc') @@ -53,6 +65,10 @@ class PyNumpy(PythonPackage): depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') + # Tests require: + # TODO: Add a 'test' deptype + # depends_on('py-nose@1.0.0:', type='test') + def setup_dependent_package(self, module, dependent_spec): python_version = self.spec['python'].version.up_to(2) arch = '{0}-{1}'.format(platform.system().lower(), platform.machine()) @@ -132,3 +148,22 @@ class PyNumpy(PythonPackage): args = ['-j', str(make_jobs)] return args + + def test(self): + # `setup.py test` is not supported. Use one of the following + # instead: + # + # - `python runtests.py` (to build and test) + # - `python runtests.py --no-build` (to test installed numpy) + # - `>>> numpy.test()` (run tests for installed numpy + # from within an interpreter) + pass + + def install_test(self): + # Change directories due to the following error: + # + # ImportError: Error importing numpy: you should not try to import + # numpy from its source directory; please exit the numpy + # source tree, and relaunch your python interpreter from there. + with working_dir('..'): + python('-c', 'import numpy; numpy.test("full", verbose=2)') diff --git a/var/spack/repos/builtin/packages/py-palettable/package.py b/var/spack/repos/builtin/packages/py-palettable/package.py new file mode 100644 index 0000000000..b432d4ee28 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-palettable/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyPalettable(PythonPackage): + """Color palettes for Python.""" + + homepage = "https://jiffyclub.github.io/palettable/" + url = "https://pypi.io/packages/source/p/palettable/palettable-3.0.0.tar.gz" + + version('3.0.0', '6e430319fe01386c81dbbc62534e3cc4') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-proj/package.py b/var/spack/repos/builtin/packages/py-proj/package.py index 949aab88c3..cf230eb49f 100644 --- a/var/spack/repos/builtin/packages/py-proj/package.py +++ b/var/spack/repos/builtin/packages/py-proj/package.py @@ -32,9 +32,8 @@ class PyProj(PythonPackage): # This is not a tagged release of pyproj. # The changes in this "version" fix some bugs, especially with Python3 use. - version('1.9.5.1.1', 'd035e4bc704d136db79b43ab371b27d2', - url='https://www.github.com/jswhit/pyproj/tarball/0be612cc9f972e38b50a90c946a9b353e2ab140f') - + version('1.9.5.1.1', git='https://www.github.com/jswhit/pyproj.git', + commit='0be612cc9f972e38b50a90c946a9b353e2ab140f') version('1.9.5.1', 'a4b80d7170fc82aee363d7f980279835') depends_on('py-cython', type='build') diff --git a/var/spack/repos/builtin/packages/py-py2cairo/package.py b/var/spack/repos/builtin/packages/py-py2cairo/package.py index bb404c61f0..5626784e34 100644 --- a/var/spack/repos/builtin/packages/py-py2cairo/package.py +++ b/var/spack/repos/builtin/packages/py-py2cairo/package.py @@ -35,7 +35,7 @@ class PyPy2cairo(Package): extends('python') - depends_on('cairo+X') + depends_on('cairo') depends_on('pixman') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-pydispatcher/package.py b/var/spack/repos/builtin/packages/py-pydispatcher/package.py new file mode 100644 index 0000000000..198f6319ac --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydispatcher/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyPydispatcher(PythonPackage): + """Multi-producer-multi-consumer signal dispatching mechanism.""" + + homepage = "http://pydispatcher.sourceforge.net/" + url = "https://pypi.io/packages/source/P/PyDispatcher/PyDispatcher-2.0.5.tar.gz" + + version('2.0.5', '1b9c2ca33580c2770577add7130b0b28') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-pymatgen/package.py b/var/spack/repos/builtin/packages/py-pymatgen/package.py new file mode 100644 index 0000000000..0ea4907b1b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pymatgen/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 PyPymatgen(PythonPackage): + """Python Materials Genomics is a robust materials analysis code that + defines core object representations for structures and molecules with + support for many electronic structure codes. It is currently the core + analysis code powering the Materials Project.""" + + homepage = "http://www.pymatgen.org/" + url = "https://pypi.io/packages/source/p/pymatgen/pymatgen-4.7.2.tar.gz" + + version('4.7.2', '9c3a6e8608671c216e4ef89778646fd6') + version('4.6.2', '508f77fdc3e783587348e93e4dfed1b8') + + extends('python', ignore='bin/tabulate') + + depends_on('py-setuptools@18.0:', type='build') + + depends_on('py-numpy@1.9:', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-requests', type=('build', 'run')) + depends_on('py-pyyaml@3.11:', type=('build', 'run')) + depends_on('py-monty@0.9.6:', type=('build', 'run')) + depends_on('py-scipy@0.14:', type=('build', 'run')) + depends_on('py-pydispatcher@2.0.5:', type=('build', 'run')) + depends_on('py-tabulate', type=('build', 'run')) + depends_on('py-spglib@1.9.8.7:', type=('build', 'run')) + depends_on('py-matplotlib@1.5:', type=('build', 'run')) + depends_on('py-palettable@2.1.1:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-pympler/package.py b/var/spack/repos/builtin/packages/py-pympler/package.py new file mode 100644 index 0000000000..51c77f117d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pympler/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 PyPympler(PythonPackage): + """Development tool to measure, monitor and analyze the memory behavior + of Python objects in a running Python application. + """ + + homepage = "https://github.com/pympler/pympler" + url = "https://pypi.io/packages/source/P/Pympler/Pympler-0.4.3.tar.gz" + + version('0.4.3', 'bbb4239126e9c99e2effc83b02bf8755') + version('0.4.2', '6bdfd913ad4c94036e8a2b358e49abd7') + version('0.4.1', '2d54032a6da91ff438f48d5f36b719a6') + version('0.4', '68e4a8aa4a268996fa6a321b664918af') + version('0.3.1', '906ce437f46fb30991007671a59d4319') + + depends_on('python@2.5:') diff --git a/var/spack/repos/builtin/packages/py-pynn/package.py b/var/spack/repos/builtin/packages/py-pynn/package.py new file mode 100644 index 0000000000..2e7aae6ec9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pynn/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 PyPynn(PythonPackage): + """A Python package for simulator-independent specification of neuronal + network models + """ + + homepage = "http://neuralensemble.org/PyNN/" + url = "https://pypi.io/packages/source/P/PyNN/PyNN-0.8.3.tar.gz" + + version('0.8.3', '28c63f898093806a57198e9271ed7b82') + version('0.8beta', git='https://github.com/NeuralEnsemble/PyNN.git', + commit='ffb0cb1661f2b0f2778db8f71865978fe7a7a6a4') + version('0.8.1', '7fb165ed5af35a115cb9c60991645ae6') + version('0.7.5', 'd8280544e4c9b34b40fd372b16342841') + + depends_on('python@2.6:2.8,3.3:') + depends_on('py-lazyarray@0.2.9:', type=('build', 'run')) + depends_on('py-neo@:0.3', type=('build', 'run')) + depends_on('py-numpy@:1.5', type=('build', 'run')) + depends_on('py-jinja2@:2.6', type=('build', 'run')) + depends_on('py-quantities@:0.10', type=('build', 'run')) + depends_on('py-lazyarray@:0.2.9', type=('build', 'run')) + depends_on('py-neo@:0.3', type=('build', 'run')) + depends_on('py-numpy@1.5:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py index 6ba999c063..c95698d83d 100644 --- a/var/spack/repos/builtin/packages/py-pypar/package.py +++ b/var/spack/repos/builtin/packages/py-pypar/package.py @@ -38,6 +38,3 @@ class PyPypar(PythonPackage): depends_on('py-numpy', type=('build', 'run')) build_directory = 'source' - - def url_for_version(self, version): - return "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pypar/pypar-%s.tgz" % version diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py index 7a905f9f98..db97520fba 100644 --- a/var/spack/repos/builtin/packages/py-pytz/package.py +++ b/var/spack/repos/builtin/packages/py-pytz/package.py @@ -29,12 +29,12 @@ class PyPytz(PythonPackage): """World timezone definitions, modern and historical.""" homepage = "https://pypi.python.org/pypi/pytz" - url = "https://pypi.python.org/packages/source/p/pytz/pytz-2014.10.tar.gz" + url = "https://pypi.io/packages/source/p/pytz/pytz-2016.10.tar.gz" - version('2016.6.1', 'b6c28a3b968bc1d8badfb61b93874e03', - url="https://pypi.python.org/packages/5d/8e/6635d8f3f9f48c03bb925fab543383089858271f9cfd1216b83247e8df94/pytz-2016.6.1.tar.gz") - version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') - version('2015.4', '417a47b1c432d90333e42084a605d3d8') - version('2016.3', 'abae92c3301b27bd8a9f56b14f52cb29') + version('2016.10', 'cc9f16ba436efabdcef3c4d32ae4919c') + version('2016.6.1', 'b6c28a3b968bc1d8badfb61b93874e03') + version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') + version('2015.4', '417a47b1c432d90333e42084a605d3d8') + version('2016.3', 'abae92c3301b27bd8a9f56b14f52cb29') depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-rtree/package.py b/var/spack/repos/builtin/packages/py-rtree/package.py index 55f98ad19e..a3604b467d 100644 --- a/var/spack/repos/builtin/packages/py-rtree/package.py +++ b/var/spack/repos/builtin/packages/py-rtree/package.py @@ -28,22 +28,9 @@ from spack import * class PyRtree(PythonPackage): """Python interface to the RTREE.4 Library.""" homepage = "http://toblerity.org/rtree/" - url = "https://github.com/Toblerity/rtree/tarball/0.8.2" + url = "https://pypi.io/packages/source/R/Rtree/Rtree-0.8.3.tar.gz" - # Not an official release yet. But changes in here are required - # to work with Spack. As it does with all packages, Spack - # installs libspatialindex in a non-system location. Without the - # changes in this fork, py-rtree requires an environment variables - # to be set *at runtime*, in order to find libspatialindex. That - # is not feasible within the Spack worldview. - version('0.8.2.2', 'b1fe96a73153db49ea6ce45a063d82cb', - url='https://github.com/citibeth/rtree/tarball/95a678cc7350857a1bb631bc41254efcd1fc0a0d') - - version('0.8.2.1', '394696ca849dd9f3a5ef24fb02a41ef4', - url='https://github.com/citibeth/rtree/tarball/3a87d86f66a3955676b2507d3bf424ade938a22b') - - # Does not work with Spack - # version('0.8.2', '593c7ac6babc397b8ba58f1636c1e0a0') + version('0.8.3', 'a27cb05a85eed0a3605c45ebccc432f8') depends_on('py-setuptools', type='build') depends_on('libspatialindex') 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 e61a90f352..844453944a 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -30,8 +30,6 @@ class PyScikitLearn(PythonPackage): homepage = "https://pypi.python.org/pypi/scikit-learn" url = "https://pypi.io/packages/source/s/scikit-learn/scikit-learn-0.18.1.tar.gz" - list_url = "https://pypi.python.org/pypi/scikit-learn" - list_depth = 2 version('0.18.1', '6b0ff1eaa5010043895dd63d1e3c60c9') version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d') diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index c506d4747d..c3ca24291f 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -33,6 +33,22 @@ class PyScipy(PythonPackage): homepage = "http://www.scipy.org/" url = "https://pypi.io/packages/source/s/scipy/scipy-0.18.1.tar.gz" + install_time_test_callbacks = ['install_test', 'import_module_test'] + + import_modules = [ + 'scipy', 'scipy._build_utils', 'scipy._lib', 'scipy.cluster', + 'scipy.constants', 'scipy.fftpack', 'scipy.integrate', + 'scipy.interpolate', 'scipy.io', 'scipy.linalg', 'scipy.misc', + 'scipy.ndimage', 'scipy.odr', 'scipy.optimize', 'scipy.signal', + 'scipy.sparse', 'scipy.spatial', 'scipy.special', 'scipy.stats', + 'scipy.weave', 'scipy.io.arff', 'scipy.io.harwell_boeing', + 'scipy.io.matlab', 'scipy.optimize._lsq', 'scipy.sparse.csgraph', + 'scipy.sparse.linalg', 'scipy.sparse.linalg.dsolve', + 'scipy.sparse.linalg.eigen', 'scipy.sparse.linalg.isolve', + 'scipy.sparse.linalg.eigen.arpack', 'scipy.sparse.linalg.eigen.lobpcg', + 'scipy.special._precompute' + ] + version('0.19.0', '91b8396231eec780222a57703d3ec550', url="https://pypi.io/packages/source/s/scipy/scipy-0.19.0.zip") version('0.18.1', '5fb5fb7ccb113ab3a039702b6c2f3327') @@ -49,6 +65,10 @@ class PyScipy(PythonPackage): depends_on('blas') depends_on('lapack') + # Tests require: + # TODO: Add a 'test' deptype + # depends_on('py-nose', type='test') + def build_args(self, spec, prefix): args = [] @@ -59,3 +79,22 @@ class PyScipy(PythonPackage): args.extend(['-j', str(make_jobs)]) return args + + def test(self): + # `setup.py test` is not supported. Use one of the following + # instead: + # + # - `python runtests.py` (to build and test) + # - `python runtests.py --no-build` (to test installed scipy) + # - `>>> scipy.test()` (run tests for installed scipy + # from within an interpreter) + pass + + def install_test(self): + # Change directories due to the following error: + # + # ImportError: Error importing scipy: you should not try to import + # scipy from its source directory; please exit the scipy + # source tree, and relaunch your python interpreter from there. + with working_dir('..'): + python('-c', 'import scipy; scipy.test("full", verbose=2)') diff --git a/var/spack/repos/builtin/packages/py-seaborn/package.py b/var/spack/repos/builtin/packages/py-seaborn/package.py new file mode 100644 index 0000000000..3171ed2e21 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-seaborn/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 PySeaborn(PythonPackage): + """Seaborn: statistical data visualization. + + Seaborn is a library for making attractive and informative statistical + graphics in Python. It is built on top of matplotlib and tightly + integrated with the PyData stack, including support for numpy and pandas + data structures and statistical routines from scipy and statsmodels.""" + + homepage = "http://seaborn.pydata.org/" + url = "https://pypi.io/packages/source/s/seaborn/seaborn-0.7.1.tar.gz" + + version('0.7.1', 'ef07e29e0f8a1f2726abe506c1a36e93') + + depends_on('py-setuptools', type='build') + + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-matplotlib', type=('build', 'run')) + depends_on('py-pandas', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index af1ea9bf06..94ee8a7fc4 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -32,6 +32,12 @@ class PySetuptools(PythonPackage): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.io/packages/source/s/setuptools/setuptools-25.2.0.tar.gz" + import_modules = [ + 'pkg_resources', 'setuptools', 'pkg_resources.extern', + 'pkg_resources._vendor', 'pkg_resources._vendor.packaging', + 'setuptools.extern', 'setuptools.command' + ] + version('34.2.0', '41b630da4ea6cfa5894d9eb3142922be', url="https://pypi.io/packages/source/s/setuptools/setuptools-34.2.0.zip") version('25.2.0', 'a0dbb65889c46214c691f6c516cf959c') @@ -53,3 +59,11 @@ class PySetuptools(PythonPackage): depends_on('py-packaging@16.8:', when='@34.0.0:', type=('build', 'run')) depends_on('py-six@1.6.0:', when='@34.0.0:', type=('build', 'run')) depends_on('py-appdirs@1.4.0:', when='@34.0.0:', type=('build', 'run')) + + # Tests require: + # TODO: Add a 'test' deptype + # FIXME: All of these depend on setuptools, creating a dependency loop + # FIXME: Is there any way around this problem? + # depends_on('py-pytest-flake8', type='test') + # depends_on('pytest@2.8:', type='test') + # depends_on('py-mock', when='^python@:3.2', type='test') diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-spglib/package.py index 2d35320ca0..19380b745b 100644 --- a/var/spack/repos/builtin/packages/py-netcdf/package.py +++ b/var/spack/repos/builtin/packages/py-spglib/package.py @@ -25,14 +25,14 @@ from spack import * -class PyNetcdf(PythonPackage): - """Python interface to the netCDF Library.""" - homepage = "http://unidata.github.io/netcdf4-python" - url = "https://github.com/Unidata/netcdf4-python/tarball/v1.2.3.1rel" +class PySpglib(PythonPackage): + """Python bindings for C library for finding and handling + crystal symmetries.""" - version('1.2.3.1', '4fc4320d4f2a77b894ebf8da1c9895af') + homepage = "http://atztogo.github.io/spglib/" + url = "https://pypi.io/packages/source/s/spglib/spglib-1.9.9.18.tar.gz" + version('1.9.9.18', 'b8b46268d3aeada7b9b201b11882548f') + + depends_on('py-setuptools@18.0:', type='build') depends_on('py-numpy', type=('build', 'run')) - depends_on('py-cython', type=('build', 'run')) - depends_on('py-setuptools', type=('build', 'run')) - depends_on('netcdf') diff --git a/var/spack/repos/builtin/packages/py-spykeutils/package.py b/var/spack/repos/builtin/packages/py-spykeutils/package.py new file mode 100644 index 0000000000..2aa0cabe46 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-spykeutils/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 PySpykeutils(PythonPackage): + """Utilities for analyzing electrophysiological data""" + + homepage = "https://github.com/rproepp/spykeutils" + url = "https://pypi.io/packages/source/s/spykeutils/spykeutils-0.4.3.tar.gz" + + version('0.4.3', 'cefe4c48ebfdb9bac7a6cbfaf49dd485') + + depends_on('py-setuptools', type='build') + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-quantities', type=('build', 'run')) + depends_on('py-neo@0.2.1:0.3.99', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-tzlocal/package.py b/var/spack/repos/builtin/packages/py-tzlocal/package.py new file mode 100644 index 0000000000..d17fd62a52 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tzlocal/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 PyTzlocal(PythonPackage): + """tzinfo object for the local timezone.""" + + homepage = "https://github.com/regebro/tzlocal" + url = "https://pypi.io/packages/source/t/tzlocal/tzlocal-1.3.tar.gz" + + version('1.3', '3cb544b3975b59f91a793850a072d4a8') + + depends_on('py-setuptools', type='build') + + depends_on('py-pytz', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-vsc-base/package.py b/var/spack/repos/builtin/packages/py-vsc-base/package.py new file mode 100644 index 0000000000..e5e23b0015 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-vsc-base/package.py @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2017, Kenneth Hoste +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyVscBase(PythonPackage): + """Common Python libraries tools created by HPC-UGent""" + + homepage = 'https://github.com/hpcugent/vsc-base/' + url = 'https://pypi.io/packages/source/v/vsc-base/vsc-base-2.5.8.tar.gz' + + version('2.5.8', '57f3f49eab7aa15a96be76e6c89a72d8') + + depends_on('py-setuptools', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-vsc-install/package.py b/var/spack/repos/builtin/packages/py-vsc-install/package.py new file mode 100644 index 0000000000..452bf97992 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-vsc-install/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2017, Kenneth Hoste +# +# This file is part of Spack. +# Created by Kenneth Hoste, kenneth.hoste@gmail.com +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyVscInstall(PythonPackage): + """Shared setuptools functions and classes + for Python libraries developed by HPC-UGent. + """ + + homepage = 'https://github.com/hpcugent/vsc-install/' + url = 'https://pypi.io/packages/source/v/vsc-install/vsc-install-0.10.25.tar.gz' + + version('0.10.25', 'd1b9453a75cb56dba0deb7a878047b51') + + depends_on('py-setuptools', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-wrapt/package.py b/var/spack/repos/builtin/packages/py-wrapt/package.py new file mode 100644 index 0000000000..65d0f3fc11 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wrapt/package.py @@ -0,0 +1,34 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyWrapt(PythonPackage): + """Module for decorators, wrappers and monkey patching.""" + + homepage = "https://github.com/GrahamDumpleton/wrapt" + url = "https://pypi.io/packages/source/w/wrapt/wrapt-1.10.10.tar.gz" + + version('1.10.10', '97365e906afa8b431f266866ec4e2e18') diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 15f7f4f987..6e0b5b8dc8 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -42,7 +42,7 @@ class Python(Package): homepage = "http://www.python.org" url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz" list_url = "https://www.python.org/downloads/" - list_depth = 2 + list_depth = 1 version('3.6.0', '3f7062ccf8be76491884d0e47ac8b251') version('3.5.2', '3fe8434643a78630c61c6464fe2e7e72') @@ -99,11 +99,6 @@ class Python(Package): r'\1setup.py\2 --no-user-cfg \3\6' ) - @when('@:2.6,3.0:3.3') - def patch(self): - # See https://github.com/LLNL/spack/issues/1490 - pass - 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 @@ -470,19 +465,14 @@ class Python(Package): else: with closing(open(main_pth, 'w')) as f: - f.write(""" -import sys -sys.__plen = len(sys.path) -""") + f.write("import sys; sys.__plen = len(sys.path)\n") for path in paths: 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) -""") + 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") def activate(self, ext_pkg, **args): ignore = self.python_ignore(ext_pkg, args) diff --git a/var/spack/repos/builtin/packages/qbank/package.py b/var/spack/repos/builtin/packages/qbank/package.py new file mode 100644 index 0000000000..976bda8fbd --- /dev/null +++ b/var/spack/repos/builtin/packages/qbank/package.py @@ -0,0 +1,87 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with 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 Qbank(Package): + """QBank is a unique dynamic reservation-based allocation management system + that manages the utilization of computational resources in a multi-project + environment. It is used in conjunction with a resource management system + allowing an organization to guarantee greater fairness and enforce mission + priorities by associating a charge with the use of computational resources + and allocating resource credits which limit how much of the resources may + be used at what time and by whom. It tracks resource utilization and allows + for insightful planning.""" + + # QBank is so old that it no longer has (never had?) a homepage + # but it was developed at Pacific Northwest National Laboratory + # by Scott Jackson <Scott.Jackson@pnl.gov> + homepage = "http://www.pnnl.gov/" + url = "file://{0}/qbank-2.10.4.tar.gz".format(os.getcwd()) + + version('2.10.4', '0820587353e63d32ddb49689dd4289e7') + + variant('doc', default=False, description='Build documentation') + + depends_on('openssl') + + depends_on('perl@5.6:5.16', type=('build', 'run')) + depends_on('perl-dbi@1.00:', type=('build', 'run')) + + phases = ['configure', 'build', 'install'] + + def configure_args(self): + prefix = self.prefix + + config_args = [ + '--prefix', prefix, + '--logdir', join_path(prefix, 'var', 'log', 'qbank') + ] + + return config_args + + def configure(self, spec, prefix): + perl = which('perl') + perl('configure', *self.configure_args()) + + def build(self, spec, prefix): + make() + + if '+doc' in spec: + make('docs') + + def install(self, spec, prefix): + make('install') + + if '+doc' in spec: + install_tree('doc', join_path(prefix, 'doc')) + + def setup_environment(self, spack_env, run_env): + spec = self.spec + prefix = self.prefix + + if '+doc' in spec: + run_env.prepend_path('MANPATH', join_path(prefix, 'doc')) diff --git a/var/spack/repos/builtin/packages/qt-creator/package.py b/var/spack/repos/builtin/packages/qt-creator/package.py index 347cf4d6ee..abd619530f 100644 --- a/var/spack/repos/builtin/packages/qt-creator/package.py +++ b/var/spack/repos/builtin/packages/qt-creator/package.py @@ -32,7 +32,7 @@ class QtCreator(Package): url = 'http://download.qt.io/official_releases/qtcreator/4.1/4.1.0/qt-creator-opensource-src-4.1.0.tar.gz' list_url = 'http://download.qt.io/official_releases/qtcreator/' - list_depth = 3 + list_depth = 2 version('4.1.0', '657727e4209befa4bf5889dff62d9e0a') diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 60c5f15ece..b27bc3fe07 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -33,7 +33,7 @@ class Qt(Package): homepage = 'http://qt.io' url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz' list_url = 'http://download.qt.io/archive/qt/' - list_depth = 4 + list_depth = 3 version('5.7.1', '031fb3fd0c3cc0f1082644492683f18d') version('5.7.0', '9a46cce61fc64c20c3ac0a0e0fa41b42') @@ -251,7 +251,7 @@ class Qt(Package): # Don't disable all the database drivers, but should # really get them into spack at some point. - @when('@3') + @when('@3') # noqa: F811 def configure(self): # A user reported that this was necessary to link Qt3 on ubuntu. # However, if LD_LIBRARY_PATH is not set the qt build fails, check @@ -268,7 +268,7 @@ class Qt(Package): '-release', '-fast') - @when('@4') + @when('@4') # noqa: F811 def configure(self): configure('-fast', '-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'), @@ -276,7 +276,7 @@ class Qt(Package): '-arch', str(self.spec.architecture.target), *self.common_config_args) - @when('@5.0:5.6') + @when('@5.0:5.6') # noqa: F811 def configure(self): webkit_args = [] if '+webkit' in self.spec else ['-skip', 'qtwebkit'] configure('-no-eglfs', @@ -284,7 +284,7 @@ class Qt(Package): '-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'), *(webkit_args + self.common_config_args)) - @when('@5.7:') + @when('@5.7:') # noqa: F811 def configure(self): config_args = self.common_config_args diff --git a/var/spack/repos/builtin/packages/r-lava/package.py b/var/spack/repos/builtin/packages/r-lava/package.py index c38f9003ea..263e859c48 100644 --- a/var/spack/repos/builtin/packages/r-lava/package.py +++ b/var/spack/repos/builtin/packages/r-lava/package.py @@ -29,7 +29,7 @@ class RLava(RPackage): """Estimation and simulation of latent variable models.""" homepage = "https://cran.r-project.org/package=lava" - url = "https://cran.r-project.org/src/contrib/lava_1.4.6.tar.gz" + url = "https://cran.r-project.org/src/contrib/lava_1.4.7.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/lava" version('1.4.7', '28039248a7039ba9281d172e4dbf9543') diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index 726a6640e8..ff66ddaf39 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -33,4 +33,5 @@ class RPackrat(RPackage): 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.8-1', '14e82feba55fcda923396282fc490038') version('0.4.7-1', '80c2413269b292ade163a70ba5053e84') diff --git a/var/spack/repos/builtin/packages/rempi/package.py b/var/spack/repos/builtin/packages/rempi/package.py new file mode 100644 index 0000000000..d93dbfa722 --- /dev/null +++ b/var/spack/repos/builtin/packages/rempi/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 Rempi(AutotoolsPackage): + """ReMPI is a record-and-replay tool for MPI applications.""" + homepage = "https://github.com/PRUNERS/ReMPI" + url = "https://github.com/PRUNERS/ReMPI/releases/download/v1.0.0/ReMPI-1.0.0.tar.gz" + + version("1.0.0", "32c780a6a74627b5796bea161d4c4733") + + depends_on("mpi") + depends_on("zlib") + depends_on("autoconf", type='build') + depends_on("automake", type='build') + depends_on("libtool", type='build') diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index a96d7f6bbc..a5939ace8f 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -30,7 +30,7 @@ import sys class Root(Package): """ROOT is a data analysis framework.""" homepage = "https://root.cern.ch" - url = "https://root.cern.ch/download/root_v6.07.02.source.tar.gz" + url = "https://root.cern.ch/download/root_v6.06.06.source.tar.gz" version('6.06.06', '4308449892210c8d36e36924261fea26') version('6.06.04', '55a2f98dd4cea79c9c4e32407c2d6d17') @@ -83,7 +83,3 @@ class Root(Package): spack_env.set('ROOTSYS', self.prefix) spack_env.set('ROOT_VERSION', 'v6') spack_env.prepend_path('PYTHONPATH', self.prefix.lib) - - def url_for_version(self, version): - """Handle ROOT's unusual version string.""" - return "https://root.cern.ch/download/root_v%s.source.tar.gz" % version diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py index 02b09f0126..5f0d12427c 100644 --- a/var/spack/repos/builtin/packages/rose/package.py +++ b/var/spack/repos/builtin/packages/rose/package.py @@ -35,10 +35,11 @@ class Rose(Package): (Developed at Lawrence Livermore National Lab)""" homepage = "http://rosecompiler.org/" - url = "https://github.com/rose-compiler/edg4x-rose" + url = "https://github.com/rose-compiler/rose/archive/v0.9.7.tar.gz" + version('0.9.7', 'e14ce5250078df4b09f4f40559d46c75') version('master', branch='master', - git='https://github.com/rose-compiler/edg4x-rose.git') + git='https://github.com/rose-compiler/rose.git') patch('add_spack_compiler_recognition.patch') @@ -46,7 +47,7 @@ class Rose(Package): 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") + depends_on("jdk@8u25") def install(self, spec, prefix): # Bootstrap with autotools diff --git a/var/spack/repos/builtin/packages/rust-bindgen/package.py b/var/spack/repos/builtin/packages/rust-bindgen/package.py index c411bc15d1..00ccbb71cf 100644 --- a/var/spack/repos/builtin/packages/rust-bindgen/package.py +++ b/var/spack/repos/builtin/packages/rust-bindgen/package.py @@ -29,9 +29,9 @@ import os class RustBindgen(Package): """The rust programming language toolchain""" homepage = "http://www.rust-lang.org" - url = "https://github.com/crabtw/rust-bindgen" + url = "https://github.com/servo/rust-bindgen/archive/v0.20.5.tar.gz" - version('0.16', tag='0.16', git='https://github.com/crabtw/rust-bindgen') + version('0.20.5', '3e4d70a5bec540324fdd95bc9e82bebc') extends("rust") depends_on("llvm") diff --git a/var/spack/repos/builtin/packages/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py index b82a7e55d6..a616725068 100644 --- a/var/spack/repos/builtin/packages/samtools/package.py +++ b/var/spack/repos/builtin/packages/samtools/package.py @@ -33,11 +33,14 @@ class Samtools(Package): homepage = "www.htslib.org" url = "https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2" + version('1.4', '8cbd7d2a0ec16d834babcd6c6d85d691') version('1.3.1', 'a7471aa5a1eb7fc9cc4c6491d73c2d88') version('1.2', '988ec4c3058a6ceda36503eebecd4122') depends_on("ncurses") - depends_on("htslib", when='@1.3.1:') # htslib became standalone + # htslib became standalone @1.3.1, must use corresponding version + depends_on("htslib@1.4", when='@1.4') + depends_on("htslib@1.3.1", when='@1.3.1') depends_on('zlib', when='@1.2') # needed for builtin htslib def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index 6b3345d83b..1a5a591c3f 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -32,14 +32,11 @@ class Scorep(Package): """ homepage = "http://www.vi-hps.org/projects/score-p" - url = "http://www.vi-hps.org/upload/packages/scorep/scorep-1.2.3.tar.gz" + url = "http://www.vi-hps.org/upload/packages/scorep/scorep-2.0.2.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') + version('2.0.2', '8f00e79e1b5b96e511c5ebecd10b2888') + version('1.4.2', '3b9a042b13bdd5836452354e6567f71e') + version('1.3', '9db6f957b7f51fa01377a9537867a55c') ########## # Dependencies for SCORE-P are quite tight. See the homepage for more diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index b878349485..8efb629487 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -31,8 +31,7 @@ class Scotch(Package): partitioning, graph clustering, and sparse matrix ordering.""" homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" # noqa: E501 - base_url = "http://gforge.inria.fr/frs/download.php/latestfile/298" + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz" list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.4', 'd58b825eb95e1db77efe8c6ff42d329f') @@ -71,12 +70,10 @@ class Scotch(Package): # from the Scotch hosting site. These alternative archives include a # superset of the behavior in their default counterparts, so we choose to # always grab these versions for older Scotch versions for simplicity. - def url_for_version(self, version): - return super(Scotch, self).url_for_version(version) - @when('@:6.0.0') def url_for_version(self, version): - return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_{0}_esmumps.tar.gz" + return url.format(version) def patch(self): self.configure() diff --git a/var/spack/repos/builtin/packages/shiny-server/package.py b/var/spack/repos/builtin/packages/shiny-server/package.py new file mode 100644 index 0000000000..941921c795 --- /dev/null +++ b/var/spack/repos/builtin/packages/shiny-server/package.py @@ -0,0 +1,77 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class ShinyServer(CMakePackage): + """Shiny server lets you put shiny web applications and interactive + documents online. Take your shiny apps and share them with your + organization or the world.""" + + # + # HEADS UP: + # 1. The shiny server installation step will download various node + # and npm bits from the net. They seem to have them well + # constrained ("npm shrinkwrap"?), but this package is not + # "air gappable". + # 2. Docs say that it requires 'gcc'. depends_on() won't do the + # right thing, it's Up To You. + # + homepage = "https://www.rstudio.com/products/shiny/shiny-server/" + url = "https://github.com/rstudio/shiny-server/archive/v1.5.3.838.tar.gz" + + version('1.5.3.838', '96f20fdcdd94c9e9bb851baccb82b97f') + + depends_on('python@:2.9.99') # docs say: "Really. 3.x will not work" + depends_on('cmake@2.8.10:') + depends_on('git') + depends_on('r+X') + depends_on('openssl') + + def cmake_args(self): + spec = self.spec + options = [] + + options.extend([ + "-DPYTHON=%s" % join_path(spec['python'].prefix.bin, 'python'), + ]) + + return options + + # Recompile the npm modules included in the project + @run_after('build') + def build_node(self): + bash = which('bash') + mkdirp('build') + bash('-c', 'bin/npm --python="$PYTHON" install') + bash('-c', 'bin/node ./ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" rebuild') # noqa: E501 + + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('PATH', + join_path(self.prefix, 'shiny-server', 'bin')) + # shiny comes with its own pandoc; hook it up... + run_env.prepend_path('PATH', + join_path(self.prefix, 'shiny-server', + 'ext', 'pandoc', 'static')) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 6a9326517b..eca5d1a605 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -30,7 +30,7 @@ class Silo(Package): data to binary, disk files.""" homepage = "http://wci.llnl.gov/simulation/computer-codes/silo" - base_url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo" + url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.10.2/silo-4.10.2.tar.gz" version('4.10.2', '9ceac777a2f2469ac8cef40f4fab49c8') version('4.9', 'a83eda4f06761a86726e918fc55e782a') @@ -67,6 +67,3 @@ class Silo(Package): make() make('install') - - def url_for_version(self, version): - return '%s/silo-%s/silo-%s.tar.gz' % (Silo.base_url, version, version) diff --git a/var/spack/repos/builtin/packages/snakemake/package.py b/var/spack/repos/builtin/packages/snakemake/package.py new file mode 100644 index 0000000000..0970b88f9c --- /dev/null +++ b/var/spack/repos/builtin/packages/snakemake/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 Snakemake(PythonPackage): + """Snakemake is an MIT-licensed workflow management system.""" + + homepage = "https://snakemake.readthedocs.io/en/stable/" + url = "https://pypi.io/packages/source/s/snakemake/snakemake-3.11.2.tar.gz" + + version('3.11.2', '6bf834526078522b38d271fdf73e6b22') + + depends_on('python@3.3:') + depends_on('py-requests', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-wrapt', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/speex/package.py b/var/spack/repos/builtin/packages/speex/package.py new file mode 100644 index 0000000000..b8850e801f --- /dev/null +++ b/var/spack/repos/builtin/packages/speex/package.py @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Speex(AutotoolsPackage): + """Speex is an Open Source/Free Software patent-free + audio compression format designed for speech.""" + + homepage = "https://speex.org" + url = "http://downloads.us.xiph.org/releases/speex/speex-1.2.0.tar.gz" + + version('1.2.0', '8ab7bb2589110dfaf0ed7fa7757dc49c') diff --git a/var/spack/repos/builtin/packages/sph2pipe/cmake.patch b/var/spack/repos/builtin/packages/sph2pipe/cmake.patch new file mode 100644 index 0000000000..e5ff6dfc0c --- /dev/null +++ b/var/spack/repos/builtin/packages/sph2pipe/cmake.patch @@ -0,0 +1,10 @@ +diff -ruN sph2pipe_v2.5.ori/CMakeLists.txt sph2pipe_v2.5/CMakeLists.txt +--- sph2pipe_v2.5.ori/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 ++++ sph2pipe_v2.5/CMakeLists.txt 2017-03-27 17:33:27.000000000 +0800 +@@ -0,0 +1,6 @@ ++PROJECT (SPH2PIPE) ++SET(SRC_LIST file_headers.c shorten_x.c sph2pipe.c) ++ADD_EXECUTABLE(sph2pipe ${SRC_LIST}) ++TARGET_LINK_LIBRARIES(sph2pipe m) ++INSTALL(TARGETS sph2pipe ++ RUNTIME DESTINATION bin) diff --git a/var/spack/repos/builtin/packages/sph2pipe/package.py b/var/spack/repos/builtin/packages/sph2pipe/package.py new file mode 100644 index 0000000000..445f284902 --- /dev/null +++ b/var/spack/repos/builtin/packages/sph2pipe/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Sph2pipe(CMakePackage): + """Sph2pipe is a portable tool for + converting SPHERE files to other formats.""" + + homepage = "https://www.ldc.upenn.edu/language-resources/tools/sphere-conversion-tools" + url = "https://www.ldc.upenn.edu/sites/www.ldc.upenn.edu/files/ctools/sph2pipe_v2.5.tar.gz" + + version('2.5', '771d9143e9aec0a22c6a14e138974be2') + + patch('cmake.patch') diff --git a/var/spack/repos/builtin/packages/sst-dumpi/package.py b/var/spack/repos/builtin/packages/sst-dumpi/package.py new file mode 100644 index 0000000000..edb1858809 --- /dev/null +++ b/var/spack/repos/builtin/packages/sst-dumpi/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 +############################################################################## +# +# Author: Samuel Knight <sknigh@sandia.gov> +# Date: Feb 3, 2017 +# +from spack import * + + +class SstDumpi(AutotoolsPackage): + """The DUMPI package provides libraries to collect and read traces of MPI + applications. Traces are created by linking an application with a library + that uses the PMPI interface to intercept MPI calls. DUMPI records + signatures of all MPI-1 and MPI-2 subroutine calls, return values, request + information, and PAPI counters. + """ + + homepage = "http://sst.sandia.gov/about_dumpi.html" + url = "https://github.com/sstsimulator/sst-dumpi/archive/6.1.0.tar.gz" + + depends_on('autoconf@1.68:', type='build') + depends_on('automake@1.11.1:', type='build') + depends_on('libtool@1.2.4:', type='build') + depends_on('m4', type='build') + + version('master', + git='https://github.com/sstsimulator/sst-dumpi.git', + branch='master') + + version('6.1.0', '31c3f40a697dc85bf23dd34270982319') diff --git a/var/spack/repos/builtin/packages/sst-macro/package.py b/var/spack/repos/builtin/packages/sst-macro/package.py new file mode 100644 index 0000000000..1fb927b599 --- /dev/null +++ b/var/spack/repos/builtin/packages/sst-macro/package.py @@ -0,0 +1,64 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# 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: Samuel Knight <sknigh@sandia.gov> +# Date: Feb 3, 2017 +# +from spack import * + + +class SstMacro(AutotoolsPackage): + """The SST/macro software package provides a simulator for large-scale + parallel computer architectures for the coarse-grained study of + distributed-memory applications. The simulator is driven from either a + trace file or skeleton application. SST/macro's modular architecture can + be extended with additional network models, trace file formats, + software services, and processor models. + """ + + homepage = "http://sst.sandia.gov/about_sstmacro.html" + url = "https://github.com/sstsimulator/sst-macro/releases/download/v6.1.0_Final/sstmacro-6.1.0.tar.gz" + + depends_on('boost@1.59:') + depends_on('autoconf@1.68:', type='build', when='@master') + depends_on('automake@1.11.1:', type='build', when='@master') + depends_on('libtool@1.2.4:', type='build', when='@master') + depends_on('m4', type='build', when='@master') + + version('master', + git='https://github.com/sstsimulator/sst-macro.git', + branch='master') + + version('6.1.0', '98b737be6326b8bd711de832ccd94d14', + url='https://github.com/sstsimulator/sst-macro/releases/download/v6.1.0_Final/sstmacro-6.1.0.tar.gz') + + @run_before('autoreconf') + def bootstrap(self): + if '@master' in self.spec: + Executable('./bootstrap.sh')() + + def configure_args(self): + args = ['--disable-regex'] + return args diff --git a/var/spack/repos/builtin/packages/staden-io-lib/package.py b/var/spack/repos/builtin/packages/staden-io-lib/package.py new file mode 100644 index 0000000000..31f9693e28 --- /dev/null +++ b/var/spack/repos/builtin/packages/staden-io-lib/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class StadenIoLib(AutotoolsPackage): + """Io_lib is a library for reading/writing various bioinformatics + file formats.""" + + homepage = "http://staden.sourceforge.net/" + url = "https://sourceforge.net/projects/staden/files/io_lib/1.14.8/io_lib-1.14.8.tar.gz/download" + + version('1.14.8', 'fe5ee6aaec8111a5bc3ac584a0c0c0c7') + + depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/star-ccm-plus/package.py b/var/spack/repos/builtin/packages/star-ccm-plus/package.py index ba1516b62a..4197aec339 100644 --- a/var/spack/repos/builtin/packages/star-ccm-plus/package.py +++ b/var/spack/repos/builtin/packages/star-ccm-plus/package.py @@ -31,6 +31,7 @@ class StarCcmPlus(Package): """STAR-CCM+ (Computational Continuum Mechanics) CFD solver.""" homepage = "http://mdx.plm.automation.siemens.com/star-ccm-plus" + url = "file://{0}/STAR-CCM+11.06.010_02_linux-x86_64.tar.gz".format(os.getcwd()) version('11.06.010_02', 'd349c6ac8293d8e6e7a53533d695588f') @@ -40,10 +41,6 @@ class StarCcmPlus(Package): license_required = True license_vars = ['CDLMD_LICENSE_FILE', 'LM_LICENSE_FILE'] - def url_for_version(self, version): - return "file://{0}/STAR-CCM+{1}_linux-x86_64.tar.gz".format( - os.getcwd(), version) - def install(self, spec, prefix): # There is a known issue with the LaunchAnywhere application. # Specifically, it cannot handle long prompts or prompts diff --git a/var/spack/repos/builtin/packages/stream/package.py b/var/spack/repos/builtin/packages/stream/package.py index 8b3f32af8a..7e24071356 100644 --- a/var/spack/repos/builtin/packages/stream/package.py +++ b/var/spack/repos/builtin/packages/stream/package.py @@ -25,7 +25,7 @@ from spack import * -class Stream(Package): +class Stream(MakefilePackage): """The STREAM benchmark is a simple synthetic benchmark program that measures sustainable memory bandwidth (in MB/s) and the corresponding computation rate for simple vector kernels.""" @@ -36,7 +36,7 @@ class Stream(Package): variant('openmp', default=False, description='Build with OpenMP support') - def patch(self): + def edit(self, spec, prefix): makefile = FileFilter('Makefile') # Use the Spack compiler wrappers @@ -54,8 +54,6 @@ class Stream(Package): makefile.filter('FFLAGS = .*', 'FFLAGS = {0}'.format(fflags)) def install(self, spec, prefix): - make() - # Manual installation mkdir(prefix.bin) install('stream_c.exe', prefix.bin) diff --git a/var/spack/repos/builtin/packages/stress/package.py b/var/spack/repos/builtin/packages/stress/package.py new file mode 100644 index 0000000000..81bf2bd9a4 --- /dev/null +++ b/var/spack/repos/builtin/packages/stress/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Stress(AutotoolsPackage): + """stress is a deliberately simple workload generator for POSIX systems. + It imposes a configurable amount of CPU, memory, I/O, and disk stress on + the system. It is written in C, and is free software licensed under the + GPLv2.""" + + homepage = "https://people.seas.harvard.edu/~apw/stress/" + url = "https://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz" + + version('1.0.4', '890a4236dd1656792f3ef9a190cf99ef') diff --git a/var/spack/repos/builtin/packages/sublime-text/package.py b/var/spack/repos/builtin/packages/sublime-text/package.py index 81d8690db8..1cfb117a05 100644 --- a/var/spack/repos/builtin/packages/sublime-text/package.py +++ b/var/spack/repos/builtin/packages/sublime-text/package.py @@ -33,8 +33,8 @@ class SublimeText(Package): homepage = "http://www.sublimetext.com/" url = "https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2" - version('3126', 'acc34252b0ea7dff1f581c5db1564dcb') - version('2.0.2', '699cd26d7fe0bada29eb1b2cd7b50e4b') + version('3_build_3126', 'acc34252b0ea7dff1f581c5db1564dcb') + version('2.0.2', '699cd26d7fe0bada29eb1b2cd7b50e4b') # Sublime text comes as a pre-compiled binary. # Since we can't link to Spack packages, we'll just have to diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 02b7d96378..7752528b43 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -27,18 +27,24 @@ from spack import * class Subversion(Package): """Apache Subversion - an open source version control system.""" - homepage = 'https://subversion.apache.org/' - url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' + homepage = 'https://subversion.apache.org/' + url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') + variant('perl', default=False, description='Build with Perl bindings') + depends_on('apr') depends_on('apr-util') depends_on('zlib') depends_on('sqlite') depends_on('serf') + extends('perl', when='+perl') + depends_on('swig@1.3.24:3.0.0', when='+perl') + depends_on('perl-term-readkey', when='+perl') + # Optional: We need swig if we want the Perl, Python or Ruby # bindings. # depends_on('swig') @@ -60,12 +66,30 @@ class Subversion(Package): 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) + + if spec.satisfies('^swig'): + options.append('--with-swig=%s' % spec['swig'].prefix) + if spec.satisfies('+perl'): + options.append( + 'PERL=%s' % join_path(spec['perl'].prefix.bin, 'perl')) configure(*options) make() + if self.run_tests: + make('check') make('install') + if spec.satisfies('+perl'): + make('swig-pl') + if self.run_tests: + make('check-swig-pl') + make('install-swig-pl-lib') + with working_dir(join_path( + 'subversion', 'bindings', 'swig', 'perl', 'native')): + perl = which('perl') + perl('Makefile.PL', 'INSTALL_BASE=%s' % prefix) + make('install') + # python bindings # make('swig-py', # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', @@ -74,10 +98,6 @@ class Subversion(Package): # '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') - # ruby bindings # make('swig-rb') # make('isntall-swig-rb') diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py index e3c00f849a..136575e48c 100644 --- a/var/spack/repos/builtin/packages/symengine/package.py +++ b/var/spack/repos/builtin/packages/symengine/package.py @@ -40,16 +40,18 @@ class Symengine(CMakePackage): description='Compile with Boost multi-precision integer library') variant('flint', default=False, description='Compile with Flint integer library') + variant('llvm', default=False, + description='Compile with LLVM JIT compiler support') variant('mpc', default=True, description='Compile with MPC library') variant('mpfr', default=True, description='Compile with MPFR library') + variant('openmp', default=False, + description='Enable OpenMP support') variant('piranha', default=False, description='Compile with Piranha integer library') variant('thread_safe', default=True, description='Enable thread safety option') - variant('openmp', default=False, - description='Enable OpenMP support') variant('shared', default=True, description='Enables the build of shared libraries') @@ -61,6 +63,7 @@ class Symengine(CMakePackage): # NOTE: [mpc,mpfr,flint,piranha] could also be built against mpir depends_on('boost', when='+boostmp') depends_on('gmp', when='~boostmp') + depends_on('llvm', when='+llvm') depends_on('mpc', when='+mpc~boostmp') depends_on('mpfr', when='+mpfr~boostmp') depends_on('flint', when='+flint~boostmp') @@ -84,6 +87,8 @@ class Symengine(CMakePackage): '-DBUILD_TESTS:BOOL=%s' % ( 'ON' if self.run_tests else 'OFF'), '-DBUILD_BENCHMARKS:BOOL=ON', + '-DWITH_LLVM:BOOL=%s' % ( + 'ON' if '+llvm' in spec else 'OFF'), '-DWITH_OPENMP:BOOL=%s' % ( 'ON' if '+openmp' in spec else 'OFF'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ( diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index 79d4bc7544..8ddfc903b3 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -34,6 +34,7 @@ class Tcl(AutotoolsPackage): that is truly cross platform, easily deployed and highly extensible.""" homepage = "http://www.tcl.tk" + url = "http://prdownloads.sourceforge.net/tcl/tcl8.6.5-src.tar.gz" version('8.6.6', '5193aea8107839a79df8ac709552ecb7') version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326') @@ -45,10 +46,6 @@ class Tcl(AutotoolsPackage): configure_directory = 'unix' - 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, run_env): # When using Tkinter from within spack provided python+tk, python # will not be able to find Tcl/Tk unless TCL_LIBRARY is set. diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py index 6e5ed79c36..2ccc9504e2 100644 --- a/var/spack/repos/builtin/packages/tetgen/package.py +++ b/var/spack/repos/builtin/packages/tetgen/package.py @@ -34,7 +34,7 @@ class Tetgen(Package): boundary conforming Delaunay meshes, and Voronoi paritions. """ - homepage = "http://www.tetgen.org" + homepage = "http://wias-berlin.de/software/tetgen/" version('1.5.0', '3b9fd9cdec121e52527b0308f7aad5c1', url='http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz') version('1.4.3', 'd6a4bcdde2ac804f7ec66c29dcb63c18', url='http://www.tetgen.org/files/tetgen1.4.3.tar.gz') diff --git a/var/spack/repos/builtin/packages/tinyxml/package.py b/var/spack/repos/builtin/packages/tinyxml/package.py index 1789d9022e..45970ca4f8 100644 --- a/var/spack/repos/builtin/packages/tinyxml/package.py +++ b/var/spack/repos/builtin/packages/tinyxml/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +from shutil import copyfile import os.path @@ -30,10 +31,14 @@ class Tinyxml(CMakePackage): """Simple, small, efficient, C++ XML parser""" homepage = "http://grinninglizard.com/tinyxml/" - url = "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" + url = "https://downloads.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" version('2.6.2', 'cba3f50dd657cb1434674a03b21394df9913d764') + def url_for_version(self, version): + url = "https://sourceforge.net/projects/tinyxml/files/tinyxml/{0}/tinyxml_{1}.tar.gz" + return url.format(version.dotted, version.underscored) + def patch(self): copyfile(join_path(os.path.dirname(__file__), "CMakeLists.txt"), "CMakeLists.txt") diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 4d9651315a..fdcb29a785 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -33,6 +33,7 @@ class Tk(AutotoolsPackage): applications that run unchanged across Windows, Mac OS X, Linux and more.""" homepage = "http://www.tcl.tk" + url = "http://prdownloads.sourceforge.net/tcl/tk8.6.5-src.tar.gz" version('8.6.6', 'dd7dbb3a6523c42d05f6ab6e86096e99') version('8.6.5', '11dbbd425c3e0201f20d6a51482ce6c4') @@ -43,10 +44,6 @@ class Tk(AutotoolsPackage): configure_directory = 'unix' - 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, run_env): # When using Tkinter from within spack provided python+tk, python # will not be able to find Tcl/Tk unless TK_LIBRARY is set. diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3de72ea6c8..0e0d86fa3c 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -44,7 +44,7 @@ class Trilinos(CMakePackage): A unique design feature of Trilinos is its focus on packages. """ homepage = "https://trilinos.org/" - base_url = "https://github.com/trilinos/Trilinos/archive" + url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-12-10-1.tar.gz" version('develop', git='https://github.com/trilinos/Trilinos.git', tag='develop') @@ -63,10 +63,6 @@ class Trilinos(CMakePackage): version('11.14.2', 'e7c3cdbbfe3279a8a68838b873ad6d51') version('11.14.1', 'b7760b142eef66c79ed13de7c9560f81') - def url_for_version(self, version): - return '%s/trilinos-release-%s.tar.gz' % \ - (Trilinos.base_url, version.dashed) - variant('xsdkflags', default=False, description='Compile using the default xSDK configuration') variant('metis', default=True, @@ -125,6 +121,10 @@ class Trilinos(CMakePackage): patch('umfpack_from_suitesparse.patch', when='@:12.8.1') + def url_for_version(self, version): + url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-{0}.tar.gz" + return url.format(version.dashed) + # 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'): diff --git a/var/spack/repos/builtin/packages/unison/package.py b/var/spack/repos/builtin/packages/unison/package.py index 181e1e6410..aa890ea869 100644 --- a/var/spack/repos/builtin/packages/unison/package.py +++ b/var/spack/repos/builtin/packages/unison/package.py @@ -34,7 +34,7 @@ class Unison(Package): 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" + url = "https://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.48.4.tar.gz" version('2.48.4', '5334b78c7e68169df7de95f4c6c4b60f') diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py index 5bbaa995f8..2fc413a98e 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -31,7 +31,7 @@ class UtilLinux(AutotoolsPackage): homepage = "http://freecode.com/projects/util-linux" url = "https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-2.29.1.tar.gz" list_url = "https://www.kernel.org/pub/linux/utils/util-linux" - list_depth = 2 + list_depth = 1 version('2.29.1', 'c7d5c111ef6bc5df65659e0b523ac9d9') version('2.25', 'f6d7fc6952ec69c4dc62c8d7c59c1d57') diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py index 1ac0ce5186..4c5035e3ae 100644 --- a/var/spack/repos/builtin/packages/vim/package.py +++ b/var/spack/repos/builtin/packages/vim/package.py @@ -37,6 +37,7 @@ class Vim(AutotoolsPackage): homepage = "http://www.vim.org" url = "https://github.com/vim/vim/archive/v8.0.0134.tar.gz" + version('8.0.0503', '82b77bd5cb38b70514bed47cfe033b8c') version('8.0.0454', '4030bf677bdfbd14efb588e4d9a24128') version('8.0.0134', 'c74668d25c2acc85d655430dd60886cd') version('7.4.2367', 'a0a7bc394f7ab1d95571fe6ab05da3ea') diff --git a/var/spack/repos/builtin/packages/voropp/package.py b/var/spack/repos/builtin/packages/voropp/package.py index 0e39769927..0fc84ef252 100644 --- a/var/spack/repos/builtin/packages/voropp/package.py +++ b/var/spack/repos/builtin/packages/voropp/package.py @@ -31,19 +31,10 @@ class Voropp(MakefilePackage): scientific fields.""" homepage = "http://math.lbl.gov/voro++/about.html" - - # This url is wrong but it passes the test the ++ make the url parser fail, - # the correct url is constructed by url_for_version that has to be used in - # any case due to the difference between the package name and the url - url = "http://math.lbl.gov/voropp/download/dir/voropp-0.4.6.tar.gz" + url = "http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz" version('0.4.6', '2338b824c3b7b25590e18e8df5d68af9') - def url_for_version(self, version): - url = "http://math.lbl.gov/voro++/download/dir/voro++-{0}.tar.gz".format( # noqa: E501 - str(version)) - return url - def edit(self, spec, prefix): filter_file(r'CC=g\+\+', 'CC={0}'.format(self.compiler.cxx), diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index c577949c3a..dafeae6dbb 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -33,6 +33,7 @@ class Vtk(CMakePackage): homepage = "http://www.vtk.org" url = "http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz" + list_url = "http://www.vtk.org/download/" version('7.1.0', 'a7e814c1db503d896af72458c2d0228f') version('7.0.0', '5fe35312db5fb2341139b8e4955c367d') diff --git a/var/spack/repos/builtin/packages/wannier90/package.py b/var/spack/repos/builtin/packages/wannier90/package.py index ad61860d73..25d238dd64 100644 --- a/var/spack/repos/builtin/packages/wannier90/package.py +++ b/var/spack/repos/builtin/packages/wannier90/package.py @@ -29,7 +29,7 @@ import shutil from spack import * -class Wannier90(Package): +class Wannier90(MakefilePackage): """Wannier90 calculates maximally-localised Wannier functions (MLWFs). Wannier90 is released under the GNU General Public License. @@ -37,6 +37,7 @@ class Wannier90(Package): homepage = 'http://wannier.org' url = 'http://wannier.org/code/wannier90-2.0.1.tar.gz' + version('2.1.0', '07a81c002b41d6d0f97857e55c57d769') version('2.0.1', '4edd742506eaba93317249d33261fb22') depends_on('mpi') @@ -45,7 +46,23 @@ class Wannier90(Package): parallel = False - def install(self, spec, prefix): + build_targets = [ + 'wannier', 'post', 'lib', 'w90chk2chk', 'w90vdw', 'w90pov' + ] + + @property + def makefile_name(self): + # Older versions use 'make.sys' + filename = 'make.sys' + + # While newer search for 'make.inc' + if self.spec.satisfies('@2.1.0:'): + filename = 'make.inc' + + abspath = join_path(self.stage.source_path, filename) + return abspath + + def edit(self, spec, prefix): lapack = self.spec['lapack'].libs blas = self.spec['blas'].libs @@ -54,57 +71,46 @@ class Wannier90(Package): '@MPIF90': self.spec['mpi'].mpifc, '@LIBS': (lapack + blas).joined() } - ####### - # TODO : this part is replicated in PEXSI - # TODO : and may be a common pattern for Editable Makefiles - # TODO : see #1186 + template = join_path( os.path.dirname(inspect.getmodule(self).__file__), 'make.sys' ) - makefile = join_path( - self.stage.source_path, - 'make.sys' - ) - shutil.copy(template, makefile) + shutil.copy(template, self.makefile_name) for key, value in substitutions.items(): - filter_file(key, value, makefile) - ###### + filter_file(key, value, self.makefile_name) + + def install(self, spec, prefix): - make('wannier') mkdirp(self.prefix.bin) + mkdirp(self.prefix.lib) + install( join_path(self.stage.source_path, 'wannier90.x'), join_path(self.prefix.bin, 'wannier90.x') ) - make('post') install( join_path(self.stage.source_path, 'postw90.x'), join_path(self.prefix.bin, 'postw90.x') ) - make('lib') - mkdirp(self.prefix.lib) install( join_path(self.stage.source_path, 'libwannier.a'), join_path(self.prefix.lib, 'libwannier.a') ) - make('w90chk2chk') install( join_path(self.stage.source_path, 'w90chk2chk.x'), join_path(self.prefix.bin, 'w90chk2chk.x') ) - make('w90vdw') install( join_path(self.stage.source_path, 'utility', 'w90vdw', 'w90vdw.x'), join_path(self.prefix.bin, 'w90vdw.x') ) - make('w90pov') install( join_path(self.stage.source_path, 'utility', 'w90pov', 'w90pov'), join_path(self.prefix.bin, 'w90pov') diff --git a/var/spack/repos/builtin/packages/xsdktrilinos/package.py b/var/spack/repos/builtin/packages/xsdktrilinos/package.py index ea49054435..7e88b2f9eb 100644 --- a/var/spack/repos/builtin/packages/xsdktrilinos/package.py +++ b/var/spack/repos/builtin/packages/xsdktrilinos/package.py @@ -32,16 +32,12 @@ class Xsdktrilinos(CMakePackage): Trilinos. """ homepage = "https://trilinos.org/" - base_url = "https://github.com/trilinos/xSDKTrilinos/archive" + url = "https://github.com/trilinos/xSDKTrilinos/archive/trilinos-release-12-8-1.tar.gz" version('develop', git='https://github.com/trilinos/xSDKTrilinos.git', tag='master') version('12.8.1', '9cc338ded17d1e10ea6c0dc18b22dcd4') version('12.6.4', '44c4c54ccbac73bb8939f68797b9454a') - def url_for_version(self, version): - return '%s/trilinos-release-%s.tar.gz' % \ - (Xsdktrilinos.base_url, version.dashed) - variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('petsc', default=True, @@ -59,6 +55,10 @@ class Xsdktrilinos(CMakePackage): depends_on('trilinos@12.8.1', when='@12.8.1') depends_on('trilinos@develop', when='@develop') + def url_for_version(self, version): + url = "https://github.com/trilinos/xSDKTrilinos/archive/trilinos-release-{0}.tar.gz" + return url.format(version.dashed) + def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/yorick/package.py b/var/spack/repos/builtin/packages/yorick/package.py index 52a4d8787d..9cbd417e4e 100644 --- a/var/spack/repos/builtin/packages/yorick/package.py +++ b/var/spack/repos/builtin/packages/yorick/package.py @@ -31,7 +31,7 @@ import glob class Yorick(Package): """Yorick is an interpreted programming language for scientific simulations or calculations, postprocessing or steering large simulation codes, - interactive scientific graphics, and reading, writing, or translating + interactive scientific graphics, and reading, writing, or translating files of numbers. Yorick includes an interactive graphics package, and a binary file package capable of translating to and from the raw numeric formats of all modern computers. Yorick is written in ANSI C and runs on @@ -39,9 +39,9 @@ class Yorick(Package): """ homepage = "http://dhmunro.github.io/yorick-doc/" - url = "https://github.com/dhmunro/yorick/archive/y_2_2_04.tar.gz" + url = "https://github.com/dhmunro/yorick/archive/y_2_2_04.tar.gz" - version('2.2.04', md5='1b5b0da6ad81b2d9dba64d991ec17939') + version('2.2.04', '1b5b0da6ad81b2d9dba64d991ec17939') version('master', branch='master', git='https://github.com/dhmunro/yorick.git') version('f90-plugin', branch='f90-plugin', @@ -51,6 +51,10 @@ class Yorick(Package): depends_on('libx11', when='+X') + def url_for_version(self, version): + url = "https://github.com/dhmunro/yorick/archive/y_{0}.tar.gz" + return url.format(version.underscored) + def install(self, spec, prefix): os.environ['FORTRAN_LINKAGE'] = '-Df_linkage' diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 21c90a05e4..b6720b7b1e 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -41,7 +41,7 @@ class Zoltan(Package): """ homepage = "http://www.cs.sandia.gov/zoltan" - base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions" + url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.83.tar.gz" version('3.83', '1ff1bc93f91e12f2c533ddb01f2c095f') version('3.8', '9d8fba8a990896881b85351d4327c4a9') @@ -56,9 +56,6 @@ class Zoltan(Package): depends_on('mpi', when='+mpi') - def url_for_version(self, version): - return '%s/zoltan_distrib_v%s.tar.gz' % (Zoltan.base_url, version) - def install(self, spec, prefix): # FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers # because of some complicated generic type problem. |