From c7b8d09c7f180da5922801450fe0ae6a0f802377 Mon Sep 17 00:00:00 2001 From: Matthew LeGendre Date: Mon, 20 Apr 2015 10:38:18 -0700 Subject: Add packagerepos to spack, allowing for creating multiple package repositories. --- var/spack/packages/reponame | 1 + 1 file changed, 1 insertion(+) create mode 100644 var/spack/packages/reponame (limited to 'var') diff --git a/var/spack/packages/reponame b/var/spack/packages/reponame new file mode 100644 index 0000000000..4b48deed3a --- /dev/null +++ b/var/spack/packages/reponame @@ -0,0 +1 @@ +original -- cgit v1.2.3-70-g09d2 From a2f2e6a4ff60882d8a93754ee10e8e75245cf430 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 19 Jul 2015 21:55:27 -0700 Subject: Save changes to external repo integration --- lib/spack/spack/__init__.py | 16 +-- lib/spack/spack/cmd/packagerepo.py | 124 ---------------------- lib/spack/spack/cmd/repo.py | 129 +++++++++++++++++++++++ lib/spack/spack/config.py | 206 +++++++++++++++++++++++-------------- lib/spack/spack/packages.py | 117 +++++++++++++-------- lib/spack/spack/repo_loader.py | 35 +++++-- lib/spack/spack/test/config.py | 82 +++++++++++---- var/spack/mock_packages/repo.yaml | 2 + var/spack/packages/repo.yaml | 2 + var/spack/packages/reponame | 1 - 10 files changed, 430 insertions(+), 284 deletions(-) delete mode 100644 lib/spack/spack/cmd/packagerepo.py create mode 100644 lib/spack/spack/cmd/repo.py create mode 100644 var/spack/mock_packages/repo.yaml create mode 100644 var/spack/packages/repo.yaml delete mode 100644 var/spack/packages/reponame (limited to 'var') diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 1d67b45341..09bc9ca52a 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -47,11 +47,17 @@ install_path = join_path(opt_path, "spack") share_path = join_path(prefix, "share", "spack") # -# Set up the packages database. +# Setup the spack.repos namespace +# +from spack.repo_loader import RepoNamespace +repos = RepoNamespace() + +# +# Set up the default packages database. # from spack.packages import PackageDB packages_path = join_path(var_path, "packages") -db = PackageDB(packages_path) +db = PackageDB() # # Paths to mock files for testing. @@ -62,12 +68,6 @@ mock_config_path = join_path(var_path, "mock_configs") mock_site_config = join_path(mock_config_path, "site_spackconfig") mock_user_config = join_path(mock_config_path, "user_spackconfig") -# -# Setup the spack.repos namespace -# -from spack.repo_loader import RepoNamespace -repos = RepoNamespace() - # # This controls how spack lays out install prefixes and # stage directories. diff --git a/lib/spack/spack/cmd/packagerepo.py b/lib/spack/spack/cmd/packagerepo.py deleted file mode 100644 index 2819d0f980..0000000000 --- a/lib/spack/spack/cmd/packagerepo.py +++ /dev/null @@ -1,124 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from external import argparse -import llnl.util.tty as tty -from llnl.util.tty.color import colorize -from llnl.util.tty.colify import colify -from llnl.util.lang import index_by -from llnl.util.filesystem import join_path, mkdirp - -import spack.spec -import spack.config -from spack.util.environment import get_path -from spack.packages import packagerepo_filename - -import os -import exceptions -from contextlib import closing - -description = "Manage package sources" - -def setup_parser(subparser): - sp = subparser.add_subparsers( - metavar='SUBCOMMAND', dest='packagerepo_command') - - add_parser = sp.add_parser('add', help=packagerepo_add.__doc__) - add_parser.add_argument('directory', help="Directory containing the packages.") - - create_parser = sp.add_parser('create', help=packagerepo_create.__doc__) - create_parser.add_argument('directory', help="Directory containing the packages.") - create_parser.add_argument('name', help="Name of new package repository.") - - remove_parser = sp.add_parser('remove', help=packagerepo_remove.__doc__) - remove_parser.add_argument('name') - - list_parser = sp.add_parser('list', help=packagerepo_list.__doc__) - - -def add_to_config(dir): - config = spack.config.get_config() - user_config = spack.config.get_config('user') - orig = None - if config.has_value('packagerepo', '', 'directories'): - orig = config.get_value('packagerepo', '', 'directories') - if orig and dir in orig.split(':'): - return False - - newsetting = orig + ':' + dir if orig else dir - user_config.set_value('packagerepo', '', 'directories', newsetting) - user_config.write() - return True - - -def packagerepo_add(args): - """Add package sources to the Spack configuration.""" - if not add_to_config(args.directory): - tty.die('Repo directory %s already exists in the repo list' % dir) - - -def packagerepo_create(args): - """Create a new package repo at a directory and name""" - dir = args.directory - name = args.name - - if os.path.exists(dir) and not os.path.isdir(dir): - tty.die('File %s already exists and is not a directory' % dir) - if not os.path.exists(dir): - try: - mkdirp(dir) - except exceptions.OSError, e: - tty.die('Failed to create new directory %s' % dir) - path = os.path.join(dir, packagerepo_filename) - try: - with closing(open(path, 'w')) as repofile: - repofile.write(name + '\n') - except exceptions.IOError, e: - tty.die('Could not create new file %s' % path) - - if not add_to_config(args.directory): - tty.warn('Repo directory %s already exists in the repo list' % dir) - - -def packagerepo_remove(args): - """Remove a package source from the Spack configuration""" - pass - - -def packagerepo_list(args): - """List package sources and their mnemoics""" - root_names = spack.db.repos - max_len = max(len(s[0]) for s in root_names) - fmt = "%%-%ds%%s" % (max_len + 4) - for root in root_names: - print fmt % (root[0], root[1]) - - - -def packagerepo(parser, args): - action = { 'add' : packagerepo_add, - 'create' : packagerepo_create, - 'remove' : packagerepo_remove, - 'list' : packagerepo_list } - action[args.packagerepo_command](args) diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py new file mode 100644 index 0000000000..1261c7ada9 --- /dev/null +++ b/lib/spack/spack/cmd/repo.py @@ -0,0 +1,129 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from external import argparse +import llnl.util.tty as tty +from llnl.util.tty.color import colorize +from llnl.util.tty.colify import colify +from llnl.util.lang import index_by +from llnl.util.filesystem import join_path, mkdirp + +import spack.spec +import spack.config +from spack.util.environment import get_path +from spack.packages import repo_config + +import os +import exceptions +from contextlib import closing + +description = "Manage package sources" + +def setup_parser(subparser): + sp = subparser.add_subparsers( + metavar='SUBCOMMAND', dest='repo_command') + + add_parser = sp.add_parser('add', help=repo_add.__doc__) + add_parser.add_argument('directory', help="Directory containing the packages.") + + create_parser = sp.add_parser('create', help=repo_create.__doc__) + create_parser.add_argument('directory', help="Directory containing the packages.") + create_parser.add_argument('name', help="Name of new package repository.") +<<<<<<< HEAD:lib/spack/spack/cmd/packagerepo.py + + remove_parser = sp.add_parser('remove', help=packagerepo_remove.__doc__) +======= + + remove_parser = sp.add_parser('remove', help=repo_remove.__doc__) +>>>>>>> Save changes to external repo integration:lib/spack/spack/cmd/repo.py + remove_parser.add_argument('name') + + list_parser = sp.add_parser('list', help=repo_list.__doc__) + + +def add_to_config(dir): + config = spack.config.get_config() + user_config = spack.config.get_config('user') + orig = None + if config.has_value('repo', '', 'directories'): + orig = config.get_value('repo', '', 'directories') + if orig and dir in orig.split(':'): + return False + + newsetting = orig + ':' + dir if orig else dir + user_config.set_value('repo', '', 'directories', newsetting) + user_config.write() + return True + + +def repo_add(args): + """Add package sources to the Spack configuration.""" + if not add_to_config(args.directory): + tty.die('Repo directory %s already exists in the repo list' % dir) + + +def repo_create(args): + """Create a new package repo at a directory and name""" + dir = args.directory + name = args.name + + if os.path.exists(dir) and not os.path.isdir(dir): + tty.die('File %s already exists and is not a directory' % dir) + if not os.path.exists(dir): + try: + mkdirp(dir) + except exceptions.OSError, e: + tty.die('Failed to create new directory %s' % dir) + path = os.path.join(dir, repo_config) + try: + with closing(open(path, 'w')) as repofile: + repofile.write(name + '\n') + except exceptions.IOError, e: + tty.die('Could not create new file %s' % path) + + if not add_to_config(args.directory): + tty.warn('Repo directory %s already exists in the repo list' % dir) + + +def repo_remove(args): + """Remove a package source from the Spack configuration""" + pass + + +def repo_list(args): + """List package sources and their mnemoics""" + root_names = spack.db.repos + max_len = max(len(s[0]) for s in root_names) + fmt = "%%-%ds%%s" % (max_len + 4) + for root in root_names: + print fmt % (root[0], root[1]) + + + +def repo(parser, args): + action = { 'add' : repo_add, + 'create' : repo_create, + 'remove' : repo_remove, + 'list' : repo_list } + action[args.repo_command](args) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 3e91958c2c..dc59f9a5a3 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -45,11 +45,11 @@ several configuration files, such as compilers.yaml or mirrors.yaml. Configuration file format =============================== -Configuration files are formatted using YAML syntax. -This format is implemented by Python's -yaml class, and it's easy to read and versatile. +Configuration files are formatted using YAML syntax. This format is +implemented by libyaml (included with Spack as an external module), +and it's easy to read and versatile. -The config files are structured as trees, like this ``compiler`` section:: +Config files are structured as trees, like this ``compiler`` section:: compilers: chaos_5_x86_64_ib: @@ -83,62 +83,73 @@ would looks like: } } -Some routines, like get_mirrors_config and get_compilers_config may strip -off the top-levels of the tree and return subtrees. +Some convenience functions, like get_mirrors_config and +``get_compilers_config`` may strip off the top-levels of the tree and +return subtrees. + """ import os -import exceptions import sys - -from external.ordereddict import OrderedDict -from llnl.util.lang import memoized -import spack.error - +import copy from external import yaml from external.yaml.error import MarkedYAMLError + import llnl.util.tty as tty from llnl.util.filesystem import mkdirp +from llnl.util.lang import memoized + +import spack + _config_sections = {} class _ConfigCategory: name = None filename = None merge = True - def __init__(self, n, f, m): - self.name = n - self.filename = f - self.merge = m + def __init__(self, name, filename, merge, strip): + self.name = name + self.filename = filename + self.merge = merge + self.strip = strip self.files_read_from = [] self.result_dict = {} - _config_sections[n] = self + _config_sections[name] = self -_ConfigCategory('compilers', 'compilers.yaml', True) -_ConfigCategory('mirrors', 'mirrors.yaml', True) -_ConfigCategory('view', 'views.yaml', True) -_ConfigCategory('order', 'orders.yaml', True) +_ConfigCategory('config', 'config.yaml', True, False) +_ConfigCategory('compilers', 'compilers.yaml', True, True) +_ConfigCategory('mirrors', 'mirrors.yaml', True, True) +_ConfigCategory('view', 'views.yaml', True, True) +_ConfigCategory('order', 'orders.yaml', True, True) """Names of scopes and their corresponding configuration files.""" config_scopes = [('site', os.path.join(spack.etc_path, 'spack')), ('user', os.path.expanduser('~/.spack'))] _compiler_by_arch = {} -_read_config_file_result = {} + +@memoized def _read_config_file(filename): - """Read a given YAML configuration file""" - global _read_config_file_result - if filename in _read_config_file_result: - return _read_config_file_result[filename] + """Read a YAML configuration file""" + + # Ignore nonexisting files. + if not os.path.exists(filename): + return None + + elif not os.path.isfile(filename): + tty.die("Invlaid configuration. %s exists but is not a file." % filename) + + elif not os.access(filename, os.R_OK): + tty.die("Configuration file %s is not readable." % filename) try: with open(filename) as f: - ydict = yaml.load(f) + return yaml.load(f) + except MarkedYAMLError, e: tty.die("Error parsing yaml%s: %s" % (str(e.context_mark), e.problem)) - except exceptions.IOError, e: - _read_config_file_result[filename] = None - return None - _read_config_file_result[filename] = ydict - return ydict + + except IOError, e: + tty.die("Error reading configuration file %s: %s" % (filename, str(e))) def clear_config_caches(): @@ -147,41 +158,66 @@ def clear_config_caches(): for key,s in _config_sections.iteritems(): s.files_read_from = [] s.result_dict = {} - spack.config._read_config_file_result = {} + + _read_config_file.clear() spack.config._compiler_by_arch = {} spack.compilers._cached_default_compiler = None -def _merge_dicts(d1, d2): - """Recursively merges two configuration trees, with entries - in d2 taking precedence over d1""" - if not d1: - return d2.copy() - if not d2: - return d1 +def _merge_yaml(dest, source): + """Merges source into dest; entries in source take precedence over dest. - for key2, val2 in d2.iteritems(): - if not key2 in d1: - d1[key2] = val2 - continue - val1 = d1[key2] - if isinstance(val1, dict) and isinstance(val2, dict): - d1[key2] = _merge_dicts(val1, val2) - continue - if isinstance(val1, list) and isinstance(val2, list): - val1.extend(val2) - seen = set() - d1[key2] = [ x for x in val1 if not (x in seen or seen.add(x)) ] - continue - d1[key2] = val2 - return d1 + Config file authors can optionally end any attribute in a dict + with `::` instead of `:`, and the key will override that of the + parent instead of merging. + """ + def they_are(t): + return isinstance(dest, t) and isinstance(source, t) + # If both are None, handle specially and return None. + if source is None and dest is None: + return None -def get_config(category_name): - """Get the confguration tree for the names category. Strips off the - top-level category entry from the dict""" - global config_scopes - category = _config_sections[category_name] + # If source is None, overwrite with source. + elif source is None: + return None + + # Source list is prepended (for precedence) + if they_are(list): + seen = set(source) + dest[:] = source + [x for x in dest if x not in seen] + return dest + + # Source dict is merged into dest. Extra ':' means overwrite. + elif they_are(dict): + for sk, sv in source.iteritems(): + # allow total override with, e.g., repos:: + override = sk.endswith(':') + if override: + sk = sk.rstrip(':') + + if override or not sk in dest: + dest[sk] = copy.copy(sv) + else: + dest[sk] = _merge_yaml(dest[sk], source[sk]) + return dest + + # In any other case, overwrite with a copy of the source value. + else: + return copy.copy(source) + + +def substitute_spack_prefix(path): + """Replaces instances of $spack with Spack's prefix.""" + return path.replace('$spack', spack.prefix) + + +def get_config(category='config'): + """Get the confguration tree for a category. + + Strips off the top-level category entry from the dict + """ + category = _config_sections[category] if category.result_dict: return category.result_dict @@ -191,14 +227,18 @@ def get_config(category_name): result = _read_config_file(path) if not result: continue - if not category_name in result: - continue + + if category.strip: + if not category.name in result: + continue + result = result[category.name] + category.files_read_from.insert(0, path) - result = result[category_name] if category.merge: - category.result_dict = _merge_dicts(category.result_dict, result) + category.result_dict = _merge_yaml(category.result_dict, result) else: category.result_dict = result + return category.result_dict @@ -215,7 +255,7 @@ def get_compilers_config(arch=None): cc_config = get_config('compilers') if arch in cc_config and 'all' in cc_config: arch_compiler = dict(cc_config[arch]) - _compiler_by_arch[arch] = _merge_dict(arch_compiler, cc_config['all']) + _compiler_by_arch[arch] = _merge_yaml(arch_compiler, cc_config['all']) elif arch in cc_config: _compiler_by_arch[arch] = cc_config[arch] elif 'all' in cc_config: @@ -225,6 +265,13 @@ def get_compilers_config(arch=None): return _compiler_by_arch[arch] +def get_repos_config(): + config = get_config() + if 'repos' not in config: + return [] + return config['repos'] + + def get_mirror_config(): """Get the mirror configuration from config files""" return get_config('mirrors') @@ -232,7 +279,6 @@ def get_mirror_config(): def get_config_scope_dirname(scope): """For a scope return the config directory""" - global config_scopes for s,p in config_scopes: if s == scope: return p @@ -251,16 +297,16 @@ def get_config_scope_filename(scope, category_name): def add_to_config(category_name, addition_dict, scope=None): """Merge a new dict into a configuration tree and write the new configuration to disk""" - global _read_config_file_result get_config(category_name) category = _config_sections[category_name] - #If scope is specified, use it. Otherwise use the last config scope that - #we successfully parsed data from. + # If scope is specified, use it. Otherwise use the last config scope that + # we successfully parsed data from. file = None path = None if not scope and not category.files_read_from: scope = 'user' + if scope: try: dir = get_config_scope_dirname(scope) @@ -268,32 +314,37 @@ def add_to_config(category_name, addition_dict, scope=None): mkdirp(dir) path = os.path.join(dir, category.filename) file = open(path, 'w') - except exceptions.IOError, e: + except IOError, e: pass else: for p in category.files_read_from: try: file = open(p, 'w') - except exceptions.IOError, e: + except IOError, e: pass if file: path = p break; + if not file: tty.die('Unable to write to config file %s' % path) - #Merge the new information into the existing file info, then write to disk - new_dict = _read_config_file_result[path] + # Merge the new information into the existing file info, then write to disk + new_dict = _read_config_file(path) + if new_dict and category_name in new_dict: new_dict = new_dict[category_name] - new_dict = _merge_dicts(new_dict, addition_dict) + + new_dict = _merge_yaml(new_dict, addition_dict) new_dict = { category_name : new_dict } - _read_config_file_result[path] = new_dict + + # Install new dict as memoized value, and dump to disk + _read_config_file.cache[path] = new_dict yaml.dump(new_dict, stream=file, default_flow_style=False) file.close() - #Merge the new information into the cached results - category.result_dict = _merge_dicts(category.result_dict, addition_dict) + # Merge the new information into the cached results + category.result_dict = _merge_yaml(category.result_dict, addition_dict) def add_to_mirror_config(addition_dict, scope=None): @@ -311,7 +362,6 @@ def add_to_compiler_config(addition_dict, scope=None, arch=None): def remove_from_config(category_name, key_to_rm, scope=None): """Remove a configuration key and write a new configuration to disk""" - global config_scopes get_config(category_name) scopes_to_rm_from = [scope] if scope else [s for s,p in config_scopes] category = _config_sections[category_name] diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index 3b9d74dd6e..c414234386 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -30,7 +30,9 @@ import glob import imp import spack.config import re -from contextlib import closing +import itertools +import traceback +from external import yaml import llnl.util.tty as tty from llnl.util.filesystem import join_path @@ -44,7 +46,7 @@ from sets import Set from spack.repo_loader import RepoLoader, imported_packages_module, package_file_name # Filename for package repo names -packagerepo_filename = 'reponame' +repo_config = 'repo.yaml' def _autospec(function): """Decorator that automatically converts the argument of a single-arg @@ -56,56 +58,85 @@ def _autospec(function): return converter +def sliding_window(seq, n): + it = iter(seq) + result = tuple(itertools.islice(it, n)) + if len(result) == n: + yield result + for elem in it: + result = result[1:] + (elem,) + yield result + + class PackageDB(object): - def __init__(self, default_root): - """Construct a new package database from a root directory.""" - - #Collect the repos from the config file and read their names from the file system - repo_dirs = self._repo_list_from_config() - repo_dirs.append(default_root) - self.repos = [(self._read_reponame_from_directory(dir), dir) for dir in repo_dirs] - - # Check for duplicate repo names - s = set() - dups = set(r for r in self.repos if r[0] in s or s.add(r[0])) - if dups: - reponame = list(dups)[0][0] - dir1 = list(dups)[0][1] - dir2 = dict(s)[reponame] - tty.die("Package repo %s in directory %s has the same name as the " - "repo in directory %s" % - (reponame, dir1, dir2)) + def __init__(self, *repo_dirs): + """Construct a new package database from a list of directories. + + Args: + repo_dirs List of directories containing packages. + + If ``repo_dirs`` is empty, gets repository list from Spack configuration. + """ + if not repo_dirs: + repo_dirs = spack.config.get_repos_config() + if not repo_dirs: + tty.die("Spack configuration contains no package repositories.") + + # Collect the repos from the config file and read their names + # from the file system + repo_dirs = [spack.config.substitute_spack_prefix(rd) for rd in repo_dirs] + + self.repos = [] + for rdir in repo_dirs: + rname = self._read_reponame_from_directory(rdir) + if rname: + self.repos.append((self._read_reponame_from_directory(rdir), rdir)) + + + by_path = sorted(self.repos, key=lambda r:r[1]) + by_name = sorted(self.repos, key=lambda r:r[0]) + + for r1, r2 in by_path: + if r1[1] == r2[1]: + tty.die("Package repos are the same:", + " %20s %s" % r1, " %20s %s" % r2) + + for r1, r2 in by_name: + if r1[0] == r2[0]: + tty.die("Package repos cannot have the same name:", + " %20s %s" % r1, " %20s %s" % r2) # For each repo, create a RepoLoader - self.repo_loaders = dict([(r[0], RepoLoader(r[0], r[1])) for r in self.repos]) + self.repo_loaders = dict((name, RepoLoader(name, path)) + for name, path in self.repos) self.instances = {} self.provider_index = None def _read_reponame_from_directory(self, dir): - """For a packagerepo directory, read the repo name from the dir/reponame file""" - path = os.path.join(dir, packagerepo_filename) + """For a packagerepo directory, read the repo name from the + $root/repo.yaml file""" + path = os.path.join(dir, repo_config) try: - with closing(open(path, 'r')) as reponame_file: - name = reponame_file.read().lstrip().rstrip() - if not re.match(r'[a-zA-Z][a-zA-Z0-9]+', name): - tty.die("Package repo name '%s', read from %s, is an invalid name. " - "Repo names must began with a letter and only contain letters " - "and numbers." % (name, path)) + with open(path) as reponame_file: + yaml_data = yaml.load(reponame_file) + + if (not yaml_data or + 'repo' not in yaml_data or + 'namespace' not in yaml_data['repo']): + tty.die("Invalid %s in %s" % (repo_config, dir)) + + name = yaml_data['repo']['namespace'] + if not re.match(r'[a-zA-Z][a-zA-Z0-9_.]+', name): + tty.die( + "Package repo name '%s', read from %s, is an invalid name. " + "Repo names must began with a letter and only contain " + "letters and numbers." % (name, path)) return name except exceptions.IOError, e: - tty.die("Could not read from package repo name file %s" % path) - - - - def _repo_list_from_config(self): - """Read through the spackconfig and return the list of packagerepo directories""" - config = spack.config.get_config() - if not config.has_option('packagerepo', 'directories'): return [] - dir_string = config.get('packagerepo', 'directories') - return dir_string.split(':') + tty.die("Error reading %s when opening %s" % (repo_config, dir)) @_autospec @@ -125,7 +156,7 @@ class PackageDB(object): except Exception, e: if spack.debug: sys.excepthook(*sys.exc_info()) - raise FailedConstructorError(spec.name, e) + raise FailedConstructorError(spec.name, *sys.exc_info()) return self.instances[spec] @@ -304,8 +335,10 @@ class UnknownPackageError(spack.error.SpackError): class FailedConstructorError(spack.error.SpackError): """Raised when a package's class constructor fails.""" - def __init__(self, name, reason): + def __init__(self, name, exc_type, exc_obj, exc_tb): super(FailedConstructorError, self).__init__( "Class constructor failed for package '%s'." % name, - str(reason)) + '\nCaused by:\n' + + ('%s: %s\n' % (exc_type.__name__, exc_obj)) + + ''.join(traceback.format_tb(exc_tb))) self.name = name diff --git a/lib/spack/spack/repo_loader.py b/lib/spack/spack/repo_loader.py index 6eaa1eead2..92da1cf709 100644 --- a/lib/spack/spack/repo_loader.py +++ b/lib/spack/spack/repo_loader.py @@ -1,8 +1,10 @@ -import spack -import spack.repos import re +import sys import types +import traceback + from llnl.util.lang import * +import spack # Name of module under which packages are imported imported_packages_module = 'spack.repos' @@ -13,14 +15,30 @@ package_file_name = 'package.py' import sys class LazyLoader: """The LazyLoader handles cases when repo modules or classes - are imported. It watches for 'spack.repos.*' loads, then + are imported. It watches for 'spack.repos.*' loads, then redirects the load to the appropriate module.""" def find_module(self, fullname, pathname): if not fullname.startswith(imported_packages_module): return None + + print "HERE ===" + print + for line in traceback.format_stack(): + print " ", line.strip() + print + print "full: ", fullname + print "path: ", pathname + print + partial_name = fullname[len(imported_packages_module)+1:] - repo = partial_name.split('.')[0] - module = partial_name.split('.')[1] + + print "partial: ", partial_name + print + + last_dot = partial_name.rfind('.') + repo = partial_name[:last_dot] + module = partial_name[last_dot+1:] + repo_loader = spack.db.repo_loaders.get(repo) if repo_loader: try: @@ -43,7 +61,7 @@ class RepoNamespace(types.ModuleType): def __init__(self): import sys sys.modules[imported_packages_module] = self - + def __getattr__(self, name): if name in _reponames: return _reponames[name] @@ -62,7 +80,7 @@ class RepoLoader(types.ModuleType): """Each RepoLoader is associated with a repository, and the RepoLoader is responsible for loading packages out of that repository. For example, a RepoLoader may be responsible for spack.repos.original, and when someone - references spack.repos.original.libelf that RepoLoader will load the + references spack.repos.original.libelf that RepoLoader will load the libelf package.""" def __init__(self, reponame, repopath): self.path = repopath @@ -70,7 +88,6 @@ class RepoLoader(types.ModuleType): self.module_name = imported_packages_module + '.' + reponame if not reponame in _reponames: _reponames[reponame] = self - spack.repos.add_repo(reponame, self) import sys sys.modules[self.module_name] = self @@ -111,5 +128,3 @@ class RepoLoader(types.ModuleType): pkg_name, file_path, e.message)) return module - - diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 790b22f3b0..eed182a257 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -30,45 +30,85 @@ import spack from spack.packages import PackageDB from spack.test.mock_packages_test import * +# Some sample compiler config data +a_comps = { + "gcc@4.7.3" : { + "cc" : "/gcc473", + "cxx" : "/g++473", + "f77" : None, + "f90" : None }, + "gcc@4.5.0" : { + "cc" : "/gcc450", + "cxx" : "/g++450", + "f77" : "/gfortran", + "f90" : "/gfortran" }, + "clang@3.3" : { + "cc" : "", + "cxx" : "", + "f77" : "", + "f90" : "" } +} + +b_comps = { + "icc@10.0" : { + "cc" : "/icc100", + "cxx" : "/icc100", + "f77" : None, + "f90" : None }, + "icc@11.1" : { + "cc" : "/icc111", + "cxx" : "/icp111", + "f77" : "/ifort", + "f90" : "/ifort" }, + "clang@3.3" : { + "cc" : "/clang", + "cxx" : "/clang++", + "f77" : None, + "f90" : None} +} + class ConfigTest(MockPackagesTest): def setUp(self): - self.initmock() + super(ConfigTest, self).setUp() self.tmp_dir = mkdtemp('.tmp', 'spack-config-test-') - spack.config.config_scopes = [('test_low_priority', os.path.join(self.tmp_dir, 'low')), - ('test_high_priority', os.path.join(self.tmp_dir, 'high'))] + spack.config.config_scopes = [ + ('test_low_priority', os.path.join(self.tmp_dir, 'low')), + ('test_high_priority', os.path.join(self.tmp_dir, 'high'))] + def tearDown(self): - self.cleanmock() + super(ConfigTest, self).tearDown() shutil.rmtree(self.tmp_dir, True) - def check_config(self, comps): + + def check_config(self, comps, *compiler_names): + """Check that named compilers in comps match Spack's config.""" config = spack.config.get_compilers_config() compiler_list = ['cc', 'cxx', 'f77', 'f90'] - for key in comps: + for key in compiler_names: for c in compiler_list: - if comps[key][c] == '/bad': - continue self.assertEqual(comps[key][c], config[key][c]) - def test_write_key(self): - a_comps = {"gcc@4.7.3" : { "cc" : "/gcc473", "cxx" : "/g++473", "f77" : None, "f90" : None }, - "gcc@4.5.0" : { "cc" : "/gcc450", "cxx" : "/g++450", "f77" : "/gfortran", "f90" : "/gfortran" }, - "clang@3.3" : { "cc" : "/bad", "cxx" : "/bad", "f77" : "/bad", "f90" : "/bad" }} + def test_write_key_in_memory(self): + # Write b_comps "on top of" a_comps. + spack.config.add_to_compiler_config(a_comps, 'test_low_priority') + spack.config.add_to_compiler_config(b_comps, 'test_high_priority') + + # Make sure the config looks how we expect. + self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0') + self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3') - b_comps = {"icc@10.0" : { "cc" : "/icc100", "cxx" : "/icc100", "f77" : None, "f90" : None }, - "icc@11.1" : { "cc" : "/icc111", "cxx" : "/icp111", "f77" : "/ifort", "f90" : "/ifort" }, - "clang@3.3" : { "cc" : "/clang", "cxx" : "/clang++", "f77" : None, "f90" : None}} + def test_write_key_to_disk(self): + # Write b_comps "on top of" a_comps. spack.config.add_to_compiler_config(a_comps, 'test_low_priority') spack.config.add_to_compiler_config(b_comps, 'test_high_priority') - self.check_config(a_comps) - self.check_config(b_comps) - + # Clear caches so we're forced to read from disk. spack.config.clear_config_caches() - self.check_config(a_comps) - self.check_config(b_comps) - + # Same check again, to ensure consistency. + self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0') + self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3') diff --git a/var/spack/mock_packages/repo.yaml b/var/spack/mock_packages/repo.yaml new file mode 100644 index 0000000000..d065896006 --- /dev/null +++ b/var/spack/mock_packages/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: mock diff --git a/var/spack/packages/repo.yaml b/var/spack/packages/repo.yaml new file mode 100644 index 0000000000..4a371e1cad --- /dev/null +++ b/var/spack/packages/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: gov.llnl.spack diff --git a/var/spack/packages/reponame b/var/spack/packages/reponame deleted file mode 100644 index 4b48deed3a..0000000000 --- a/var/spack/packages/reponame +++ /dev/null @@ -1 +0,0 @@ -original -- cgit v1.2.3-70-g09d2 From 360b307f683e146151a65e1d788ce1d154c47ace Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 24 Aug 2015 09:14:16 -0700 Subject: Save progress. import gov.llnl.spack.mpich works. --- lib/spack/llnl/util/tty/colify.py | 7 + lib/spack/spack/__init__.py | 12 +- lib/spack/spack/cmd/repo.py | 17 +- lib/spack/spack/config.py | 4 +- lib/spack/spack/packages.py | 530 +++++++++++++++++++---------- lib/spack/spack/repo_loader.py | 22 +- lib/spack/spack/spec.py | 2 +- lib/spack/spack/test/directory_layout.py | 9 +- lib/spack/spack/test/mock_packages_test.py | 12 +- lib/spack/spack/test/package_sanity.py | 6 +- lib/spack/spack/test/packages.py | 6 +- lib/spack/spack/util/naming.py | 31 ++ var/spack/mock_packages/_repo.yaml | 2 + var/spack/mock_packages/repo.yaml | 2 - var/spack/packages/_repo.yaml | 2 + var/spack/packages/repo.yaml | 2 - 16 files changed, 435 insertions(+), 231 deletions(-) create mode 100644 var/spack/mock_packages/_repo.yaml delete mode 100644 var/spack/mock_packages/repo.yaml create mode 100644 var/spack/packages/_repo.yaml delete mode 100644 var/spack/packages/repo.yaml (limited to 'var') diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index 66c52c3968..acf64c1e13 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -220,6 +220,13 @@ def colify(elts, **options): def colify_table(table, **options): + """Version of colify() for data expressed in rows, (list of lists). + + Same as regular colify but takes a list of lists, where each + sub-list must be the same length, and each is interpreted as a + row in a table. Regular colify displays a sequential list of + values in columns. + """ if table is None: raise TypeError("Can't call colify_table on NoneType") elif not table or not table[0]: diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 09bc9ca52a..71e3ac3715 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -23,8 +23,10 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os +import sys import tempfile from llnl.util.filesystem import * +import llnl.util.tty as tty # This lives in $prefix/lib/spack/spack/__file__ prefix = ancestor(__file__, 4) @@ -42,6 +44,7 @@ test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") var_path = join_path(prefix, "var", "spack") stage_path = join_path(var_path, "stage") +packages_path = join_path(var_path, "packages") opt_path = join_path(prefix, "opt") install_path = join_path(opt_path, "spack") share_path = join_path(prefix, "share", "spack") @@ -55,9 +58,12 @@ repos = RepoNamespace() # # Set up the default packages database. # -from spack.packages import PackageDB -packages_path = join_path(var_path, "packages") -db = PackageDB() +import spack.packages +_repo_paths = spack.config.get_repos_config() +if not _repo_paths: + tty.die("Spack configuration contains no package repositories.") +db = spack.packages.PackageFinder(*_repo_paths) +sys.meta_path.append(db) # # Paths to mock files for testing. diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 1261c7ada9..e290f60b7b 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -32,7 +32,7 @@ from llnl.util.filesystem import join_path, mkdirp import spack.spec import spack.config from spack.util.environment import get_path -from spack.packages import repo_config +from spack.packages import repo_config_filename import os import exceptions @@ -50,13 +50,8 @@ def setup_parser(subparser): create_parser = sp.add_parser('create', help=repo_create.__doc__) create_parser.add_argument('directory', help="Directory containing the packages.") create_parser.add_argument('name', help="Name of new package repository.") -<<<<<<< HEAD:lib/spack/spack/cmd/packagerepo.py - - remove_parser = sp.add_parser('remove', help=packagerepo_remove.__doc__) -======= remove_parser = sp.add_parser('remove', help=repo_remove.__doc__) ->>>>>>> Save changes to external repo integration:lib/spack/spack/cmd/repo.py remove_parser.add_argument('name') list_parser = sp.add_parser('list', help=repo_list.__doc__) @@ -81,7 +76,7 @@ def repo_add(args): """Add package sources to the Spack configuration.""" if not add_to_config(args.directory): tty.die('Repo directory %s already exists in the repo list' % dir) - + def repo_create(args): """Create a new package repo at a directory and name""" @@ -95,13 +90,13 @@ def repo_create(args): mkdirp(dir) except exceptions.OSError, e: tty.die('Failed to create new directory %s' % dir) - path = os.path.join(dir, repo_config) + path = os.path.join(dir, repo_config_filename) try: with closing(open(path, 'w')) as repofile: repofile.write(name + '\n') except exceptions.IOError, e: tty.die('Could not create new file %s' % path) - + if not add_to_config(args.directory): tty.warn('Repo directory %s already exists in the repo list' % dir) @@ -118,8 +113,8 @@ def repo_list(args): fmt = "%%-%ds%%s" % (max_len + 4) for root in root_names: print fmt % (root[0], root[1]) - - + + def repo(parser, args): action = { 'add' : repo_add, diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index dc59f9a5a3..66da91f629 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -269,7 +269,9 @@ def get_repos_config(): config = get_config() if 'repos' not in config: return [] - return config['repos'] + + repo_list = config['repos'] + return [substitute_spack_prefix(repo) for repo in repo_list] def get_mirror_config(): diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index c414234386..df54b12324 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -28,7 +28,6 @@ import sys import inspect import glob import imp -import spack.config import re import itertools import traceback @@ -41,149 +40,327 @@ from llnl.util.lang import * import spack.error import spack.spec from spack.virtual import ProviderIndex -from spack.util.naming import mod_to_class, validate_module_name -from sets import Set -from spack.repo_loader import RepoLoader, imported_packages_module, package_file_name +from spack.util.naming import * # Filename for package repo names -repo_config = 'repo.yaml' +repo_config_filename = '_repo.yaml' + +# Filename for packages in repos. +package_file_name = 'package.py' def _autospec(function): """Decorator that automatically converts the argument of a single-arg function to a Spec.""" - def converter(self, spec_like, **kwargs): + def converter(self, spec_like, *args, **kwargs): if not isinstance(spec_like, spack.spec.Spec): spec_like = spack.spec.Spec(spec_like) - return function(self, spec_like, **kwargs) + return function(self, spec_like, *args, **kwargs) return converter -def sliding_window(seq, n): - it = iter(seq) - result = tuple(itertools.islice(it, n)) - if len(result) == n: - yield result - for elem in it: - result = result[1:] + (elem,) - yield result +class NamespaceTrie(object): + def __init__(self): + self._elements = {} -class PackageDB(object): + def __setitem__(self, namespace, repo): + parts = namespace.split('.') + cur = self._elements + for p in parts[:-1]: + if p not in cur: + cur[p] = {} + cur = cur[p] + + cur[parts[-1]] = repo + + + def __getitem__(self, namespace): + parts = namespace.split('.') + cur = self._elements + for p in parts: + if p not in cur: + raise KeyError("Can't find namespace %s in trie" % namespace) + cur = cur[p] + return cur + + + def __contains__(self, namespace): + parts = namespace.split('.') + cur = self._elements + for p in parts: + if not isinstance(cur, dict): + return False + if p not in cur: + return False + cur = cur[p] + return True + + + +class PackageFinder(object): + """A PackageFinder is a wrapper around a list of PackageDBs. + + It functions exactly like a PackageDB, but it operates on the + combined results of the PackageDBs in its list instead of on a + single package repository. + """ def __init__(self, *repo_dirs): - """Construct a new package database from a list of directories. + self.repos = [] + self.by_namespace = NamespaceTrie() + self.by_path = {} + + for root in repo_dirs: + repo = PackageDB(root) + self.put_last(repo) + + + def _check_repo(self, repo): + if repo.root in self.by_path: + raise DuplicateRepoError("Package repos are the same", + repo, self.by_path[repo.root]) + + if repo.namespace in self.by_namespace: + tty.error("Package repos cannot have the same name", + repo, self.by_namespace[repo.namespace]) + + + def _add(self, repo): + self._check_repo(repo) + self.by_namespace[repo.namespace] = repo + self.by_path[repo.root] = repo + + + def put_first(self, repo): + self._add(repo) + self.repos.insert(0, repo) + + + def put_last(self, repo): + self._add(repo) + self.repos.append(repo) + - Args: - repo_dirs List of directories containing packages. + def remove(self, repo): + if repo in self.repos: + self.repos.remove(repo) - If ``repo_dirs`` is empty, gets repository list from Spack configuration. + + def swap(self, other): + repos = self.repos + by_namespace = self.by_namespace + by_path = self.by_path + + self.repos = other.repos + self.by_namespace = other.by_namespace + self.by_pah = other.by_path + + other.repos = repos + other.by_namespace = by_namespace + other.by_path = by_path + + + def all_package_names(self): + all_pkgs = set() + for repo in self.repos: + all_pkgs.update(set(repo.all_package_names())) + return all_pkgs + + + def all_packages(self): + for name in self.all_package_names(): + yield self.get(name) + + + def providers_for(self, vpkg_name): + # TODO: USE MORE THAN FIRST REPO + return self.repos[0].providers_for(vpkg_name) + + + def _get_spack_pkg_name(self, repo, py_module_name): + """Allow users to import Spack packages using legal Python identifiers. + + A python identifier might map to many different Spack package + names due to hyphen/underscore ambiguity. + + Easy example: + num3proxy -> 3proxy + + Ambiguous: + foo_bar -> foo_bar, foo-bar + + More ambiguous: + foo_bar_baz -> foo_bar_baz, foo-bar-baz, foo_bar-baz, foo-bar_baz """ - if not repo_dirs: - repo_dirs = spack.config.get_repos_config() - if not repo_dirs: - tty.die("Spack configuration contains no package repositories.") + if py_module_name in repo: + return py_module_name - # Collect the repos from the config file and read their names - # from the file system - repo_dirs = [spack.config.substitute_spack_prefix(rd) for rd in repo_dirs] + options = possible_spack_module_names(py_module_name) + options.remove(py_module_name) + for name in options: + if name in repo: + return name - self.repos = [] - for rdir in repo_dirs: - rname = self._read_reponame_from_directory(rdir) - if rname: - self.repos.append((self._read_reponame_from_directory(rdir), rdir)) + return None - by_path = sorted(self.repos, key=lambda r:r[1]) - by_name = sorted(self.repos, key=lambda r:r[0]) + def find_module(self, fullname, path=None): + if fullname in self.by_namespace: + return self - for r1, r2 in by_path: - if r1[1] == r2[1]: - tty.die("Package repos are the same:", - " %20s %s" % r1, " %20s %s" % r2) + namespace, dot, module_name = fullname.rpartition('.') + if namespace not in self.by_namespace: + return None - for r1, r2 in by_name: - if r1[0] == r2[0]: - tty.die("Package repos cannot have the same name:", - " %20s %s" % r1, " %20s %s" % r2) + repo = self.by_namespace[namespace] + name = self._get_spack_pkg_name(repo, module_name) + if not name: + return None - # For each repo, create a RepoLoader - self.repo_loaders = dict((name, RepoLoader(name, path)) - for name, path in self.repos) + return self - self.instances = {} - self.provider_index = None + def load_module(self, fullname): + if fullname in sys.modules: + return sys.modules[fullname] - def _read_reponame_from_directory(self, dir): - """For a packagerepo directory, read the repo name from the - $root/repo.yaml file""" - path = os.path.join(dir, repo_config) + if fullname in self.by_namespace: + ns = self.by_namespace[fullname] + module = imp.new_module(fullname) + module.__file__ = "" + module.__path__ = [] + module.__package__ = fullname + else: + namespace, dot, module_name = fullname.rpartition('.') + if namespace not in self.by_namespace: + raise ImportError( + "No Spack repository with namespace %s" % namespace) + + repo = self.by_namespace[namespace] + name = self._get_spack_pkg_name(repo, module_name) + if not name: + raise ImportError( + "No module %s in Spack repository %s" % (module_name, repo)) + + fullname = namespace + '.' + name + file_path = os.path.join(repo.root, name, package_file_name) + module = imp.load_source(fullname, file_path) + module.__package__ = namespace + + module.__loader__ = self + sys.modules[fullname] = module + return module + + + @_autospec + def get(self, spec, new=False): + for repo in self.repos: + if spec.name in repo: + return repo.get(spec, new) + raise UnknownPackageError(spec.name) + + + def get_repo(self, namespace): + if namespace in self.by_namespace: + repo = self.by_namespace[namespace] + if isinstance(repo, PackageDB): + return repo + return None + + + def exists(self, pkg_name): + return any(repo.exists(pkg_name) for repo in self.repos) + + + def __contains__(self, pkg_name): + return self.exists(pkg_name) + + + +class PackageDB(object): + """Class representing a package repository in the filesystem. + + Each package repository must have a top-level configuration file + called `_repo.yaml`. + + Currently, `_repo.yaml` this must define: + + `namespace`: + A Python namespace where the repository's packages should live. + + """ + def __init__(self, root): + """Instantiate a package repository from a filesystem path.""" + # Root directory, containing _repo.yaml and package dirs + self.root = root + + # Config file in /_repo.yaml + self.config_file = os.path.join(self.root, repo_config_filename) + + # Read configuration from _repo.yaml + config = self._read_config() + if not 'namespace' in config: + tty.die('Package repo in %s must define a namespace in %s.' + % (self.root, repo_config_filename)) + + # Check namespace in the repository configuration. + self.namespace = config['namespace'] + if not re.match(r'[a-zA-Z][a-zA-Z0-9_.]+', self.namespace): + tty.die(("Invalid namespace '%s' in '%s'. Namespaces must be " + "valid python identifiers separated by '.'") + % (self.namespace, self.root)) + + # These are internal cache variables. + self._instances = {} + self._provider_index = None + + + def _read_config(self): + """Check for a YAML config file in this db's root directory.""" try: - with open(path) as reponame_file: + with open(self.config_file) as reponame_file: yaml_data = yaml.load(reponame_file) - if (not yaml_data or - 'repo' not in yaml_data or - 'namespace' not in yaml_data['repo']): - tty.die("Invalid %s in %s" % (repo_config, dir)) - - name = yaml_data['repo']['namespace'] - if not re.match(r'[a-zA-Z][a-zA-Z0-9_.]+', name): - tty.die( - "Package repo name '%s', read from %s, is an invalid name. " - "Repo names must began with a letter and only contain " - "letters and numbers." % (name, path)) - return name + if (not yaml_data or 'repo' not in yaml_data or + not isinstance(yaml_data['repo'], dict)): + tty.die("Invalid %s in repository %s" + % (repo_config_filename, self.root)) + + return yaml_data['repo'] + except exceptions.IOError, e: - tty.die("Error reading %s when opening %s" % (repo_config, dir)) + tty.die("Error reading %s when opening %s" + % (self.config_file, self.root)) @_autospec - def get(self, spec, **kwargs): + def get(self, spec, new=False): if spec.virtual: raise UnknownPackageError(spec.name) - if kwargs.get('new', False): - if spec in self.instances: - del self.instances[spec] + if new: + if spec in self._instances: + del self._instances[spec] - if not spec in self.instances: + if not spec in self._instances: package_class = self.get_class_for_package_name(spec.name, spec.repo) try: copy = spec.copy() - self.instances[copy] = package_class(copy) + self._instances[copy] = package_class(copy) except Exception, e: if spack.debug: sys.excepthook(*sys.exc_info()) raise FailedConstructorError(spec.name, *sys.exc_info()) - return self.instances[spec] - - - @_autospec - def delete(self, spec): - """Force a package to be recreated.""" - del self.instances[spec] - - - def purge(self): - """Clear entire package instance cache.""" - self.instances.clear() - - - @_autospec - def get_installed(self, spec): - """Get all the installed specs that satisfy the provided spec constraint.""" - return [s for s in self.installed_package_specs() if s.satisfies(spec)] + return self._instances[spec] @_autospec def providers_for(self, vpkg_spec): - if self.provider_index is None: - self.provider_index = ProviderIndex(self.all_package_names()) + if self._provider_index is None: + self._provider_index = ProviderIndex(self.all_package_names()) - providers = self.provider_index.providers_for(vpkg_spec) + providers = self._provider_index.providers_for(vpkg_spec) if not providers: raise UnknownPackageError(vpkg_spec.name) return providers @@ -194,46 +371,13 @@ class PackageDB(object): return [p for p in self.all_packages() if p.extends(extendee_spec)] - @_autospec - def installed_extensions_for(self, extendee_spec): - for s in self.installed_package_specs(): - try: - if s.package.extends(extendee_spec): - yield s.package - except UnknownPackageError, e: - # Skip packages we know nothing about - continue - # TODO: add some conditional way to do this instead of - # catching exceptions. - - - def repo_for_package_name(self, pkg_name, packagerepo_name=None): - """Find the dirname for a package and the packagerepo it came from - if packagerepo_name is not None, then search for the package in the - specified packagerepo""" - #Look for an existing package under any matching packagerepos - roots = [pkgrepo for pkgrepo in self.repos - if not packagerepo_name or packagerepo_name == pkgrepo[0]] - - if not roots: - tty.die("Package repo %s does not exist" % packagerepo_name) - - for pkgrepo in roots: - path = join_path(pkgrepo[1], pkg_name) - if os.path.exists(path): - return (pkgrepo[0], path) - - repo_to_add_to = roots[-1] - return (repo_to_add_to[0], join_path(repo_to_add_to[1], pkg_name)) - - - def dirname_for_package_name(self, pkg_name, packagerepo_name=None): + def dirname_for_package_name(self, pkg_name): """Get the directory name for a particular package. This is the directory that contains its package.py file.""" - return self.repo_for_package_name(pkg_name, packagerepo_name)[1] + return join_path(self.root, pkg_name) - def filename_for_package_name(self, pkg_name, packagerepo_name=None): + def filename_for_package_name(self, pkg_name): """Get the filename for the module we should load for a particular package. Packages for a pacakge DB live in ``$root//package.py`` @@ -241,57 +385,25 @@ class PackageDB(object): This will return a proper package.py path even if the package doesn't exist yet, so callers will need to ensure the package exists before importing. - - If a packagerepo is specified, then return existing - or new paths in the specified packagerepo directory. If no - package repo is supplied, return an existing path from any - package repo, and new paths in the default package repo. """ validate_module_name(pkg_name) - pkg_dir = self.dirname_for_package_name(pkg_name, packagerepo_name) + pkg_dir = self.dirname_for_package_name(pkg_name) return join_path(pkg_dir, package_file_name) - def installed_package_specs(self): - """Read installed package names straight from the install directory - layout. - """ - # Get specs from the directory layout but ensure that they're - # all normalized properly. - installed = [] - for spec in spack.install_layout.all_specs(): - spec.normalize() - installed.append(spec) - return installed - - - def installed_known_package_specs(self): - """Read installed package names straight from the install - directory layout, but return only specs for which the - package is known to this version of spack. - """ - for spec in spack.install_layout.all_specs(): - if self.exists(spec.name): - yield spec - - @memoized def all_package_names(self): """Generator function for all packages. This looks for ``/package.py`` files within the repo direcotories""" - all_packages = Set() - for repo in self.repos: - dir = repo[1] - if not os.path.isdir(dir): - continue - for pkg_name in os.listdir(dir): - pkg_dir = join_path(dir, pkg_name) - pkg_file = join_path(pkg_dir, package_file_name) - if os.path.isfile(pkg_file): - all_packages.add(pkg_name) - all_package_names = list(all_packages) - all_package_names.sort() - return all_package_names + all_package_names = [] + + for pkg_name in os.listdir(self.root): + pkg_dir = join_path(self.root, pkg_name) + pkg_file = join_path(pkg_dir, package_file_name) + if os.path.isfile(pkg_file): + all_package_names.append(pkg_name) + + return sorted(all_package_names) def all_packages(self): @@ -301,19 +413,25 @@ class PackageDB(object): @memoized def exists(self, pkg_name): - """Whether a package with the supplied name exists .""" + """Whether a package with the supplied name exists.""" return os.path.exists(self.filename_for_package_name(pkg_name)) @memoized def get_class_for_package_name(self, pkg_name, reponame = None): """Get an instance of the class for a particular package.""" - (reponame, repodir) = self.repo_for_package_name(pkg_name, reponame) - module_name = imported_packages_module + '.' + reponame + '.' + pkg_name + file_path = self.filename_for_package_name(pkg_name) - module = self.repo_loaders[reponame].get_module(pkg_name) + if os.path.exists(file_path): + if not os.path.isfile(file_path): + tty.die("Something's wrong. '%s' is not a file!" % file_path) + if not os.access(file_path, os.R_OK): + tty.die("Cannot read '%s'!" % file_path) + else: + raise UnknownPackageError(pkg_name, self.namespace) class_name = mod_to_class(pkg_name) + module = __import__(self.namespace + '.' + pkg_name, fromlist=[class_name]) cls = getattr(module, class_name) if not inspect.isclass(cls): tty.die("%s.%s is not a class" % (pkg_name, class_name)) @@ -321,6 +439,63 @@ class PackageDB(object): return cls + def __str__(self): + return "" % (self.namespace, self.root) + + + def __repr__(self): + return self.__str__() + + + def __contains__(self, pkg_name): + return self.exists(pkg_name) + + + # + # Below functions deal with installed packages, and should be + # moved to some other part of Spack (conbine with + # directory_layout?) + # + @_autospec + def get_installed(self, spec): + """Get all the installed specs that satisfy the provided spec constraint.""" + return [s for s in self.installed_package_specs() if s.satisfies(spec)] + + + @_autospec + def installed_extensions_for(self, extendee_spec): + for s in self.installed_package_specs(): + try: + if s.package.extends(extendee_spec): + yield s.package + except UnknownPackageError, e: + # Skip packages we know nothing about + continue + + + def installed_package_specs(self): + """Read installed package names straight from the install directory + layout. + """ + # Get specs from the directory layout but ensure that they're + # all normalized properly. + installed = [] + for spec in spack.install_layout.all_specs(): + spec.normalize() + installed.append(spec) + return installed + + + def installed_known_package_specs(self): + """Read installed package names straight from the install + directory layout, but return only specs for which the + package is known to this version of spack. + """ + for spec in spack.install_layout.all_specs(): + if self.exists(spec.name): + yield spec + + class UnknownPackageError(spack.error.SpackError): """Raised when we encounter a package spack doesn't have.""" def __init__(self, name, repo=None): @@ -333,6 +508,13 @@ class UnknownPackageError(spack.error.SpackError): self.name = name +class DuplicateRepoError(spack.error.SpackError): + """Raised when duplicate repos are added to a PackageFinder.""" + def __init__(self, msg, repo1, repo2): + super(UnknownPackageError, self).__init__( + "%s: %s, %s" % (msg, repo1, repo2)) + + class FailedConstructorError(spack.error.SpackError): """Raised when a package's class constructor fails.""" def __init__(self, name, exc_type, exc_obj, exc_tb): diff --git a/lib/spack/spack/repo_loader.py b/lib/spack/spack/repo_loader.py index 92da1cf709..441011cf98 100644 --- a/lib/spack/spack/repo_loader.py +++ b/lib/spack/spack/repo_loader.py @@ -12,7 +12,6 @@ imported_packages_module = 'spack.repos' # Name of the package file inside a package directory package_file_name = 'package.py' -import sys class LazyLoader: """The LazyLoader handles cases when repo modules or classes are imported. It watches for 'spack.repos.*' loads, then @@ -21,15 +20,6 @@ class LazyLoader: if not fullname.startswith(imported_packages_module): return None - print "HERE ===" - print - for line in traceback.format_stack(): - print " ", line.strip() - print - print "full: ", fullname - print "path: ", pathname - print - partial_name = fullname[len(imported_packages_module)+1:] print "partial: ", partial_name @@ -50,7 +40,7 @@ class LazyLoader: def load_module(self, fullname): return self.mod -sys.meta_path.append(LazyLoader()) +#sys.meta_path.append(LazyLoader()) _reponames = {} class RepoNamespace(types.ModuleType): @@ -59,7 +49,6 @@ class RepoNamespace(types.ModuleType): this class will use __getattr__ to translate the 'original' into one of spack's known repositories""" def __init__(self): - import sys sys.modules[imported_packages_module] = self def __getattr__(self, name): @@ -89,7 +78,6 @@ class RepoLoader(types.ModuleType): if not reponame in _reponames: _reponames[reponame] = self - import sys sys.modules[self.module_name] = self @@ -110,14 +98,6 @@ class RepoLoader(types.ModuleType): import imp import llnl.util.tty as tty - file_path = os.path.join(self.path, pkg_name, package_file_name) - if os.path.exists(file_path): - if not os.path.isfile(file_path): - tty.die("Something's wrong. '%s' is not a file!" % file_path) - if not os.access(file_path, os.R_OK): - tty.die("Cannot read '%s'!" % file_path) - else: - raise spack.packages.UnknownPackageError(pkg_name, self.reponame if self.reponame != 'original' else None) try: module_name = imported_packages_module + '.' + self.reponame + '.' + pkg_name diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 972ba9ccbb..1666457502 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1714,7 +1714,7 @@ class SpecParser(spack.parse.Parser): spec_repo = lst[-2] else: spec_name = self.token.value - (spec_repo, repodir) = spack.db.repo_for_package_name(spec_name) + spec_repo = 'gov.llnl.spack' self.check_identifier(spec_name) diff --git a/lib/spack/spack/test/directory_layout.py b/lib/spack/spack/test/directory_layout.py index b3ad8efec4..55b3f0b18f 100644 --- a/lib/spack/spack/test/directory_layout.py +++ b/lib/spack/spack/test/directory_layout.py @@ -34,7 +34,7 @@ from llnl.util.filesystem import * import spack from spack.spec import Spec -from spack.packages import PackageDB +from spack.packages import PackageFinder from spack.directory_layout import YamlDirectoryLayout # number of packages to test (to reduce test time) @@ -123,7 +123,7 @@ class DirectoryLayoutTest(unittest.TestCase): information about installed packages' specs to uninstall or query them again if the package goes away. """ - mock_db = PackageDB(spack.mock_packages_path) + mock_db = PackageFinder(spack.mock_packages_path) not_in_mock = set.difference( set(spack.db.all_package_names()), @@ -145,8 +145,7 @@ class DirectoryLayoutTest(unittest.TestCase): self.layout.create_install_directory(spec) installed_specs[spec] = self.layout.path_for_spec(spec) - tmp = spack.db - spack.db = mock_db + spack.db.swap(mock_db) # Now check that even without the package files, we know # enough to read a spec from the spec file. @@ -161,7 +160,7 @@ class DirectoryLayoutTest(unittest.TestCase): self.assertTrue(spec.eq_dag(spec_from_file)) self.assertEqual(spec.dag_hash(), spec_from_file.dag_hash()) - spack.db = tmp + spack.db.swap(mock_db) def test_find(self): diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 00f81114af..1f46d65790 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -22,11 +22,12 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +import sys import unittest import spack import spack.config -from spack.packages import PackageDB +from spack.packages import PackageFinder from spack.spec import Spec @@ -43,8 +44,8 @@ class MockPackagesTest(unittest.TestCase): # Use the mock packages database for these tests. This allows # us to set up contrived packages that don't interfere with # real ones. - self.real_db = spack.db - spack.db = PackageDB(spack.mock_packages_path) + self.db = PackageFinder(spack.mock_packages_path) + spack.db.swap(self.db) spack.config.clear_config_caches() self.real_scopes = spack.config.config_scopes @@ -55,7 +56,8 @@ class MockPackagesTest(unittest.TestCase): def cleanmock(self): """Restore the real packages path after any test.""" - spack.db = self.real_db + spack.db.swap(self.db) + spack.config.config_scopes = self.real_scopes spack.config.clear_config_caches() @@ -66,5 +68,3 @@ class MockPackagesTest(unittest.TestCase): def tearDown(self): self.cleanmock() - - diff --git a/lib/spack/spack/test/package_sanity.py b/lib/spack/spack/test/package_sanity.py index 6222e7b5f8..70b5d6a478 100644 --- a/lib/spack/spack/test/package_sanity.py +++ b/lib/spack/spack/test/package_sanity.py @@ -47,10 +47,10 @@ class PackageSanityTest(unittest.TestCase): def test_get_all_mock_packages(self): """Get the mock packages once each too.""" - tmp = spack.db - spack.db = PackageDB(spack.mock_packages_path) + db = PackageFinder(spack.mock_packages_path) + spack.db.swap(db) self.check_db() - spack.db = tmp + spack.db.swap(db) def test_url_versions(self): diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py index a8183cf6a6..42bd91ec5c 100644 --- a/lib/spack/spack/test/packages.py +++ b/lib/spack/spack/test/packages.py @@ -44,7 +44,8 @@ class PackagesTest(MockPackagesTest): def test_package_filename(self): - filename = spack.db.filename_for_package_name('mpich') + repo = spack.db.get_repo('gov.llnl.spack.mock') + filename = repo.filename_for_package_name('mpich') self.assertEqual(filename, join_path(spack.mock_packages_path, 'mpich', 'package.py')) @@ -54,7 +55,8 @@ class PackagesTest(MockPackagesTest): def test_nonexisting_package_filename(self): - filename = spack.db.filename_for_package_name('some-nonexisting-package') + repo = spack.db.get_repo('gov.llnl.spack.mock') + filename = repo.filename_for_package_name('some-nonexisting-package') self.assertEqual(filename, join_path(spack.mock_packages_path, 'some-nonexisting-package', 'package.py')) diff --git a/lib/spack/spack/util/naming.py b/lib/spack/spack/util/naming.py index 782afbd4bb..a7b6e2b436 100644 --- a/lib/spack/spack/util/naming.py +++ b/lib/spack/spack/util/naming.py @@ -1,10 +1,14 @@ # Need this because of spack.util.string from __future__ import absolute_import import string +import itertools import re import spack +__all__ = ['mod_to_class', 'spack_module_to_python_module', 'valid_module_name', + 'validate_module_name', 'possible_spack_module_names'] + # Valid module names can contain '-' but can't start with it. _valid_module_re = r'^\w[\w-]*$' @@ -42,6 +46,33 @@ def mod_to_class(mod_name): return class_name +def spack_module_to_python_module(mod_name): + """Given a Spack module name, returns the name by which it can be + imported in Python. + """ + if re.match(r'[0-9]', mod_name): + mod_name = 'num' + mod_name + + return mod_name.replace('-', '_') + + +def possible_spack_module_names(python_mod_name): + """Given a Python module name, return a list of all possible spack module + names that could correspond to it.""" + mod_name = re.sub(r'^num(\d)', r'\1', python_mod_name) + + parts = re.split(r'(_)', mod_name) + options = [['_', '-']] * mod_name.count('_') + + results = [] + for subs in itertools.product(*options): + s = list(parts) + s[1::2] = subs + results.append(''.join(s)) + + return results + + def valid_module_name(mod_name): """Return whether the mod_name is valid for use in Spack.""" return bool(re.match(_valid_module_re, mod_name)) diff --git a/var/spack/mock_packages/_repo.yaml b/var/spack/mock_packages/_repo.yaml new file mode 100644 index 0000000000..b97b978de3 --- /dev/null +++ b/var/spack/mock_packages/_repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: gov.llnl.spack.mock diff --git a/var/spack/mock_packages/repo.yaml b/var/spack/mock_packages/repo.yaml deleted file mode 100644 index d065896006..0000000000 --- a/var/spack/mock_packages/repo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -repo: - namespace: mock diff --git a/var/spack/packages/_repo.yaml b/var/spack/packages/_repo.yaml new file mode 100644 index 0000000000..4a371e1cad --- /dev/null +++ b/var/spack/packages/_repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: gov.llnl.spack diff --git a/var/spack/packages/repo.yaml b/var/spack/packages/repo.yaml deleted file mode 100644 index 4a371e1cad..0000000000 --- a/var/spack/packages/repo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -repo: - namespace: gov.llnl.spack -- cgit v1.2.3-70-g09d2 From 89d5127900dda96b2a583c4c1a9bdac8e51c1c15 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 26 Nov 2015 14:19:27 -0800 Subject: New, cleaner package repository structure. Package repositories now look like this: top-level-dir/ repo.yaml packages/ libelf/ package.py mpich/ package.py ... This leaves room at the top level for additional metadata, source, per-repo configs, indexes, etc., and it makes it easy to see that something is a spack repo (just look for repo.yaml and packages). --- lib/spack/spack/__init__.py | 15 +- lib/spack/spack/cmd/repo.py | 2 +- lib/spack/spack/repository.py | 178 ++- var/spack/mock_packages/_repo.yaml | 2 - var/spack/mock_packages/a/package.py | 12 - var/spack/mock_packages/b/package.py | 12 - var/spack/mock_packages/c/package.py | 12 - var/spack/mock_packages/callpath/package.py | 41 - var/spack/mock_packages/direct_mpich/package.py | 36 - var/spack/mock_packages/dyninst/package.py | 44 - var/spack/mock_packages/e/package.py | 12 - var/spack/mock_packages/fake/package.py | 34 - var/spack/mock_packages/git-test/package.py | 10 - var/spack/mock_packages/hg-test/package.py | 10 - var/spack/mock_packages/indirect_mpich/package.py | 41 - var/spack/mock_packages/libdwarf/package.py | 44 - var/spack/mock_packages/libelf/package.py | 43 - var/spack/mock_packages/mpich/package.py | 46 - var/spack/mock_packages/mpich2/package.py | 47 - var/spack/mock_packages/mpileaks/package.py | 43 - var/spack/mock_packages/multimethod/package.py | 143 -- .../mock_packages/optional-dep-test-2/package.py | 18 - .../mock_packages/optional-dep-test-3/package.py | 17 - .../mock_packages/optional-dep-test/package.py | 29 - var/spack/mock_packages/svn-test/package.py | 10 - .../trivial_install_test_package/package.py | 38 - var/spack/mock_packages/zmpi/package.py | 39 - var/spack/packages/ImageMagick/package.py | 37 - var/spack/packages/Mitos/package.py | 19 - var/spack/packages/R/package.py | 33 - var/spack/packages/SAMRAI/no-tool-build.patch | 20 - var/spack/packages/SAMRAI/package.py | 53 - var/spack/packages/_repo.yaml | 2 - var/spack/packages/activeharmony/package.py | 15 - var/spack/packages/adept-utils/package.py | 42 - var/spack/packages/apex/package.py | 34 - var/spack/packages/arpack/package.py | 41 - var/spack/packages/asciidoc/package.py | 18 - var/spack/packages/atk/package.py | 18 - var/spack/packages/atlas/package.py | 60 - var/spack/packages/autoconf/package.py | 14 - var/spack/packages/automaded/package.py | 51 - var/spack/packages/automake/package.py | 16 - var/spack/packages/bear/package.py | 17 - var/spack/packages/bib2xhtml/package.py | 27 - var/spack/packages/binutils/package.py | 30 - var/spack/packages/bison/package.py | 17 - var/spack/packages/boost/package.py | 66 - var/spack/packages/bowtie2/bowtie2-2.5.patch | 16 - var/spack/packages/bowtie2/package.py | 24 - var/spack/packages/boxlib/package.py | 25 - var/spack/packages/bzip2/package.py | 36 - var/spack/packages/cairo/package.py | 19 - var/spack/packages/callpath/package.py | 47 - var/spack/packages/cblas/package.py | 35 - var/spack/packages/cgm/package.py | 30 - var/spack/packages/clang/package.py | 51 - var/spack/packages/cloog/package.py | 26 - var/spack/packages/cmake/package.py | 45 - var/spack/packages/coreutils/package.py | 17 - var/spack/packages/cppcheck/package.py | 15 - var/spack/packages/cram/package.py | 15 - var/spack/packages/cscope/package.py | 17 - var/spack/packages/cube/package.py | 55 - var/spack/packages/czmq/package.py | 19 - var/spack/packages/dbus/package.py | 31 - var/spack/packages/docbook-xml/package.py | 19 - var/spack/packages/doxygen/package.py | 25 - var/spack/packages/dri2proto/package.py | 14 - var/spack/packages/dtcmp/package.py | 20 - var/spack/packages/dyninst/package.py | 68 - var/spack/packages/elfutils/package.py | 26 - var/spack/packages/extrae/package.py | 46 - var/spack/packages/exuberant-ctags/package.py | 14 - var/spack/packages/fish/package.py | 18 - var/spack/packages/flex/package.py | 15 - var/spack/packages/flux/package.py | 36 - var/spack/packages/fontconfig/package.py | 16 - var/spack/packages/freetype/package.py | 16 - var/spack/packages/gasnet/package.py | 35 - var/spack/packages/gcc/package.py | 122 -- var/spack/packages/gdk-pixbuf/package.py | 22 - var/spack/packages/geos/package.py | 31 - var/spack/packages/gflags/package.py | 21 - var/spack/packages/ghostscript/package.py | 17 - var/spack/packages/git/package.py | 27 - var/spack/packages/glib/package.py | 18 - var/spack/packages/glm/package.py | 19 - var/spack/packages/global/package.py | 24 - var/spack/packages/glog/package.py | 15 - var/spack/packages/gmp/package.py | 40 - var/spack/packages/gnutls/package.py | 22 - var/spack/packages/gperf/package.py | 19 - var/spack/packages/gperftools/package.py | 38 - var/spack/packages/graphlib/package.py | 14 - var/spack/packages/graphviz/package.py | 21 - var/spack/packages/gtkplus/package.py | 22 - var/spack/packages/harfbuzz/package.py | 20 - var/spack/packages/hdf5/package.py | 42 - var/spack/packages/hwloc/package.py | 25 - var/spack/packages/hypre/package.py | 32 - var/spack/packages/icu/package.py | 25 - var/spack/packages/icu4c/package.py | 17 - var/spack/packages/isl/package.py | 17 - var/spack/packages/jdk/package.py | 46 - var/spack/packages/jpeg/package.py | 14 - var/spack/packages/launchmon/package.py | 47 - .../packages/launchmon/patch.lmon_install_dir | 147 -- var/spack/packages/lcms/package.py | 19 - var/spack/packages/leveldb/package.py | 29 - var/spack/packages/libNBC/package.py | 43 - var/spack/packages/libarchive/package.py | 16 - var/spack/packages/libcircle/package.py | 18 - var/spack/packages/libdrm/package.py | 18 - var/spack/packages/libdwarf/package.py | 81 - var/spack/packages/libelf/package.py | 49 - var/spack/packages/libevent/package.py | 30 - var/spack/packages/libffi/package.py | 17 - var/spack/packages/libgcrypt/package.py | 19 - var/spack/packages/libgpg-error/package.py | 17 - var/spack/packages/libjpeg-turbo/package.py | 20 - var/spack/packages/libjson-c/package.py | 14 - var/spack/packages/libmng/package.py | 23 - var/spack/packages/libmonitor/package.py | 36 - var/spack/packages/libpciaccess/package.py | 21 - var/spack/packages/libpng/package.py | 15 - var/spack/packages/libsodium/package.py | 19 - var/spack/packages/libtiff/package.py | 18 - var/spack/packages/libtool/package.py | 14 - var/spack/packages/libunwind/package.py | 38 - var/spack/packages/libuuid/package.py | 16 - var/spack/packages/libxcb/package.py | 21 - var/spack/packages/libxml2/package.py | 20 - var/spack/packages/libxshmfence/package.py | 16 - var/spack/packages/libxslt/package.py | 24 - var/spack/packages/llvm-lld/package.py | 46 - var/spack/packages/llvm/package.py | 53 - var/spack/packages/lmdb/package.py | 39 - var/spack/packages/lua/package.py | 26 - var/spack/packages/lwgrp/package.py | 18 - var/spack/packages/lwm2/package.py | 18 - var/spack/packages/matio/package.py | 15 - var/spack/packages/memaxes/package.py | 19 - var/spack/packages/mesa/package.py | 34 - var/spack/packages/metis/package.py | 27 - var/spack/packages/mpc/package.py | 42 - var/spack/packages/mpe2/mpe2.patch | 12 - var/spack/packages/mpe2/package.py | 28 - var/spack/packages/mpfr/package.py | 41 - var/spack/packages/mpibash/mpibash-4.3.patch | 1565 -------------------- var/spack/packages/mpibash/package.py | 32 - var/spack/packages/mpich/package.py | 92 -- var/spack/packages/mpileaks/package.py | 44 - var/spack/packages/mrnet/package.py | 20 - var/spack/packages/munge/package.py | 20 - var/spack/packages/muster/package.py | 22 - .../mvapich2/ad_lustre_rwcontig_open_source.patch | 11 - var/spack/packages/mvapich2/package.py | 104 -- var/spack/packages/nasm/package.py | 14 - var/spack/packages/ncdu/package.py | 28 - var/spack/packages/ncurses/package.py | 33 - var/spack/packages/netcdf/netcdf-4.3.3-mpi.patch | 25 - var/spack/packages/netcdf/package.py | 27 - var/spack/packages/netgauge/package.py | 43 - var/spack/packages/netlib-blas/package.py | 46 - var/spack/packages/netlib-lapack/package.py | 59 - var/spack/packages/nettle/package.py | 17 - var/spack/packages/ompss/package.py | 50 - var/spack/packages/ompt-openmp/package.py | 23 - var/spack/packages/opari2/package.py | 65 - .../openmpi/ad_lustre_rwcontig_open_source.patch | 11 - var/spack/packages/openmpi/llnl-platforms.patch | 151 -- var/spack/packages/openmpi/package.py | 109 -- var/spack/packages/openssl/package.py | 26 - var/spack/packages/otf/package.py | 21 - var/spack/packages/otf2/package.py | 74 - var/spack/packages/pango/package.py | 19 - var/spack/packages/papi/package.py | 35 - var/spack/packages/paraver/package.py | 41 - var/spack/packages/paraview/package.py | 72 - var/spack/packages/parmetis/package.py | 26 - var/spack/packages/parpack/package.py | 43 - var/spack/packages/pcre/package.py | 15 - var/spack/packages/petsc/package.py | 40 - var/spack/packages/pidx/package.py | 21 - var/spack/packages/pixman/package.py | 18 - var/spack/packages/pkg-config/package.py | 17 - var/spack/packages/pmgr_collective/package.py | 37 - var/spack/packages/postgresql/package.py | 20 - var/spack/packages/ppl/package.py | 28 - var/spack/packages/protobuf/package.py | 16 - var/spack/packages/py-basemap/package.py | 20 - var/spack/packages/py-biopython/package.py | 15 - var/spack/packages/py-cffi/package.py | 17 - var/spack/packages/py-cython/package.py | 14 - var/spack/packages/py-dateutil/package.py | 16 - var/spack/packages/py-epydoc/package.py | 13 - var/spack/packages/py-genders/package.py | 15 - var/spack/packages/py-gnuplot/package.py | 14 - var/spack/packages/py-h5py/package.py | 19 - var/spack/packages/py-ipython/package.py | 16 - var/spack/packages/py-libxml2/package.py | 15 - var/spack/packages/py-lockfile/package.py | 23 - var/spack/packages/py-mako/package.py | 16 - var/spack/packages/py-matplotlib/package.py | 47 - var/spack/packages/py-mock/package.py | 17 - var/spack/packages/py-mpi4py/package.py | 14 - var/spack/packages/py-mx/package.py | 13 - var/spack/packages/py-nose/package.py | 17 - var/spack/packages/py-numpy/package.py | 28 - var/spack/packages/py-pandas/package.py | 25 - var/spack/packages/py-pexpect/package.py | 13 - var/spack/packages/py-pil/package.py | 14 - var/spack/packages/py-pmw/package.py | 13 - var/spack/packages/py-pychecker/package.py | 13 - var/spack/packages/py-pycparser/package.py | 15 - var/spack/packages/py-pyelftools/package.py | 13 - var/spack/packages/py-pygments/package.py | 15 - var/spack/packages/py-pylint/package.py | 17 - var/spack/packages/py-pypar/package.py | 14 - var/spack/packages/py-pyparsing/package.py | 13 - var/spack/packages/py-pyqt/package.py | 24 - var/spack/packages/py-pyside/package.py | 45 - var/spack/packages/py-python-daemon/package.py | 26 - var/spack/packages/py-pytz/package.py | 14 - var/spack/packages/py-rpy2/package.py | 17 - var/spack/packages/py-scientificpython/package.py | 16 - var/spack/packages/py-scikit-learn/package.py | 14 - var/spack/packages/py-scipy/package.py | 18 - var/spack/packages/py-setuptools/package.py | 15 - var/spack/packages/py-shiboken/package.py | 45 - var/spack/packages/py-sip/package.py | 21 - var/spack/packages/py-six/package.py | 14 - var/spack/packages/py-sphinx/package.py | 13 - var/spack/packages/py-sympy/package.py | 13 - var/spack/packages/py-virtualenv/package.py | 16 - var/spack/packages/py-yapf/package.py | 15 - var/spack/packages/python/package.py | 160 -- var/spack/packages/qhull/package.py | 27 - var/spack/packages/qt/package.py | 109 -- var/spack/packages/qthreads/package.py | 22 - var/spack/packages/ravel/package.py | 23 - var/spack/packages/readline/package.py | 21 - .../rose/add_spack_compiler_recognition.patch | 13 - var/spack/packages/rose/package.py | 39 - var/spack/packages/ruby/package.py | 41 - var/spack/packages/samtools/package.py | 18 - var/spack/packages/samtools/samtools1.2.patch | 20 - var/spack/packages/scalasca/package.py | 65 - var/spack/packages/scorep/package.py | 74 - var/spack/packages/scotch/package.py | 40 - var/spack/packages/scr/package.py | 44 - var/spack/packages/silo/package.py | 19 - var/spack/packages/snappy/package.py | 15 - var/spack/packages/spindle/package.py | 44 - var/spack/packages/sqlite/package.py | 40 - var/spack/packages/stat/configure_mpicxx.patch | 19 - var/spack/packages/stat/package.py | 40 - var/spack/packages/sundials/package.py | 39 - var/spack/packages/swig/package.py | 46 - var/spack/packages/task/package.py | 20 - var/spack/packages/taskd/package.py | 20 - var/spack/packages/tau/package.py | 36 - var/spack/packages/tcl/package.py | 22 - var/spack/packages/the_silver_searcher/package.py | 17 - var/spack/packages/thrift/package.py | 44 - var/spack/packages/tk/package.py | 22 - var/spack/packages/tmux/package.py | 24 - var/spack/packages/tmuxinator/package.py | 17 - var/spack/packages/trilinos/package.py | 50 - var/spack/packages/uncrustify/package.py | 14 - var/spack/packages/util-linux/package.py | 20 - var/spack/packages/vim/package.py | 83 -- var/spack/packages/vtk/package.py | 40 - var/spack/packages/wget/package.py | 21 - var/spack/packages/wx/package.py | 24 - var/spack/packages/wxpropgrid/package.py | 20 - var/spack/packages/xcb-proto/package.py | 15 - var/spack/packages/xz/package.py | 20 - var/spack/packages/yasm/package.py | 16 - var/spack/packages/zeromq/package.py | 20 - var/spack/packages/zlib/package.py | 18 - var/spack/packages/zsh/package.py | 16 - var/spack/repos/builtin.mock/packages/a/package.py | 12 + var/spack/repos/builtin.mock/packages/b/package.py | 12 + var/spack/repos/builtin.mock/packages/c/package.py | 12 + .../builtin.mock/packages/callpath/package.py | 41 + .../builtin.mock/packages/direct_mpich/package.py | 36 + .../repos/builtin.mock/packages/dyninst/package.py | 44 + var/spack/repos/builtin.mock/packages/e/package.py | 12 + .../repos/builtin.mock/packages/fake/package.py | 34 + .../builtin.mock/packages/git-test/package.py | 10 + .../repos/builtin.mock/packages/hg-test/package.py | 10 + .../packages/indirect_mpich/package.py | 41 + .../builtin.mock/packages/libdwarf/package.py | 44 + .../repos/builtin.mock/packages/libelf/package.py | 43 + .../repos/builtin.mock/packages/mpich/package.py | 46 + .../repos/builtin.mock/packages/mpich2/package.py | 47 + .../builtin.mock/packages/mpileaks/package.py | 43 + .../builtin.mock/packages/multimethod/package.py | 143 ++ .../packages/optional-dep-test-2/package.py | 18 + .../packages/optional-dep-test-3/package.py | 17 + .../packages/optional-dep-test/package.py | 29 + .../builtin.mock/packages/svn-test/package.py | 10 + .../trivial_install_test_package/package.py | 38 + .../repos/builtin.mock/packages/zmpi/package.py | 39 + var/spack/repos/builtin.mock/repo.yaml | 2 + .../repos/builtin/packages/ImageMagick/package.py | 37 + var/spack/repos/builtin/packages/Mitos/package.py | 19 + var/spack/repos/builtin/packages/R/package.py | 33 + .../builtin/packages/SAMRAI/no-tool-build.patch | 20 + var/spack/repos/builtin/packages/SAMRAI/package.py | 53 + .../builtin/packages/activeharmony/package.py | 15 + .../repos/builtin/packages/adept-utils/package.py | 42 + var/spack/repos/builtin/packages/apex/package.py | 34 + var/spack/repos/builtin/packages/arpack/package.py | 41 + .../repos/builtin/packages/asciidoc/package.py | 18 + var/spack/repos/builtin/packages/atk/package.py | 18 + var/spack/repos/builtin/packages/atlas/package.py | 60 + .../repos/builtin/packages/autoconf/package.py | 14 + .../repos/builtin/packages/automaded/package.py | 51 + .../repos/builtin/packages/automake/package.py | 16 + var/spack/repos/builtin/packages/bear/package.py | 17 + .../repos/builtin/packages/bib2xhtml/package.py | 27 + .../repos/builtin/packages/binutils/package.py | 30 + var/spack/repos/builtin/packages/bison/package.py | 17 + var/spack/repos/builtin/packages/boost/package.py | 66 + .../builtin/packages/bowtie2/bowtie2-2.5.patch | 16 + .../repos/builtin/packages/bowtie2/package.py | 24 + var/spack/repos/builtin/packages/boxlib/package.py | 25 + var/spack/repos/builtin/packages/bzip2/package.py | 36 + var/spack/repos/builtin/packages/cairo/package.py | 19 + .../repos/builtin/packages/callpath/package.py | 47 + var/spack/repos/builtin/packages/cblas/package.py | 35 + var/spack/repos/builtin/packages/cgm/package.py | 30 + var/spack/repos/builtin/packages/clang/package.py | 51 + var/spack/repos/builtin/packages/cloog/package.py | 26 + var/spack/repos/builtin/packages/cmake/package.py | 45 + .../repos/builtin/packages/coreutils/package.py | 17 + .../repos/builtin/packages/cppcheck/package.py | 15 + var/spack/repos/builtin/packages/cram/package.py | 15 + var/spack/repos/builtin/packages/cscope/package.py | 17 + var/spack/repos/builtin/packages/cube/package.py | 55 + var/spack/repos/builtin/packages/czmq/package.py | 19 + var/spack/repos/builtin/packages/dbus/package.py | 31 + .../repos/builtin/packages/docbook-xml/package.py | 19 + .../repos/builtin/packages/doxygen/package.py | 25 + .../repos/builtin/packages/dri2proto/package.py | 14 + var/spack/repos/builtin/packages/dtcmp/package.py | 20 + .../repos/builtin/packages/dyninst/package.py | 68 + .../repos/builtin/packages/elfutils/package.py | 26 + var/spack/repos/builtin/packages/extrae/package.py | 46 + .../builtin/packages/exuberant-ctags/package.py | 14 + var/spack/repos/builtin/packages/fish/package.py | 18 + var/spack/repos/builtin/packages/flex/package.py | 15 + var/spack/repos/builtin/packages/flux/package.py | 36 + .../repos/builtin/packages/fontconfig/package.py | 16 + .../repos/builtin/packages/freetype/package.py | 16 + var/spack/repos/builtin/packages/gasnet/package.py | 35 + var/spack/repos/builtin/packages/gcc/package.py | 122 ++ .../repos/builtin/packages/gdk-pixbuf/package.py | 22 + var/spack/repos/builtin/packages/geos/package.py | 31 + var/spack/repos/builtin/packages/gflags/package.py | 21 + .../repos/builtin/packages/ghostscript/package.py | 17 + var/spack/repos/builtin/packages/git/package.py | 27 + var/spack/repos/builtin/packages/glib/package.py | 18 + var/spack/repos/builtin/packages/glm/package.py | 19 + var/spack/repos/builtin/packages/global/package.py | 24 + var/spack/repos/builtin/packages/glog/package.py | 15 + var/spack/repos/builtin/packages/gmp/package.py | 40 + var/spack/repos/builtin/packages/gnutls/package.py | 22 + var/spack/repos/builtin/packages/gperf/package.py | 19 + .../repos/builtin/packages/gperftools/package.py | 38 + .../repos/builtin/packages/graphlib/package.py | 14 + .../repos/builtin/packages/graphviz/package.py | 21 + .../repos/builtin/packages/gtkplus/package.py | 22 + .../repos/builtin/packages/harfbuzz/package.py | 20 + var/spack/repos/builtin/packages/hdf5/package.py | 42 + var/spack/repos/builtin/packages/hwloc/package.py | 25 + var/spack/repos/builtin/packages/hypre/package.py | 32 + var/spack/repos/builtin/packages/icu/package.py | 25 + var/spack/repos/builtin/packages/icu4c/package.py | 17 + var/spack/repos/builtin/packages/isl/package.py | 17 + var/spack/repos/builtin/packages/jdk/package.py | 46 + var/spack/repos/builtin/packages/jpeg/package.py | 14 + .../repos/builtin/packages/launchmon/package.py | 47 + .../packages/launchmon/patch.lmon_install_dir | 147 ++ var/spack/repos/builtin/packages/lcms/package.py | 19 + .../repos/builtin/packages/leveldb/package.py | 29 + var/spack/repos/builtin/packages/libNBC/package.py | 43 + .../repos/builtin/packages/libarchive/package.py | 16 + .../repos/builtin/packages/libcircle/package.py | 18 + var/spack/repos/builtin/packages/libdrm/package.py | 18 + .../repos/builtin/packages/libdwarf/package.py | 81 + var/spack/repos/builtin/packages/libelf/package.py | 49 + .../repos/builtin/packages/libevent/package.py | 30 + var/spack/repos/builtin/packages/libffi/package.py | 17 + .../repos/builtin/packages/libgcrypt/package.py | 19 + .../repos/builtin/packages/libgpg-error/package.py | 17 + .../builtin/packages/libjpeg-turbo/package.py | 20 + .../repos/builtin/packages/libjson-c/package.py | 14 + var/spack/repos/builtin/packages/libmng/package.py | 23 + .../repos/builtin/packages/libmonitor/package.py | 36 + .../repos/builtin/packages/libpciaccess/package.py | 21 + var/spack/repos/builtin/packages/libpng/package.py | 15 + .../repos/builtin/packages/libsodium/package.py | 19 + .../repos/builtin/packages/libtiff/package.py | 18 + .../repos/builtin/packages/libtool/package.py | 14 + .../repos/builtin/packages/libunwind/package.py | 38 + .../repos/builtin/packages/libuuid/package.py | 16 + var/spack/repos/builtin/packages/libxcb/package.py | 21 + .../repos/builtin/packages/libxml2/package.py | 20 + .../repos/builtin/packages/libxshmfence/package.py | 16 + .../repos/builtin/packages/libxslt/package.py | 24 + .../repos/builtin/packages/llvm-lld/package.py | 46 + var/spack/repos/builtin/packages/llvm/package.py | 53 + var/spack/repos/builtin/packages/lmdb/package.py | 39 + var/spack/repos/builtin/packages/lua/package.py | 26 + var/spack/repos/builtin/packages/lwgrp/package.py | 18 + var/spack/repos/builtin/packages/lwm2/package.py | 18 + var/spack/repos/builtin/packages/matio/package.py | 15 + .../repos/builtin/packages/memaxes/package.py | 19 + var/spack/repos/builtin/packages/mesa/package.py | 34 + var/spack/repos/builtin/packages/metis/package.py | 27 + var/spack/repos/builtin/packages/mpc/package.py | 42 + var/spack/repos/builtin/packages/mpe2/mpe2.patch | 12 + var/spack/repos/builtin/packages/mpe2/package.py | 28 + var/spack/repos/builtin/packages/mpfr/package.py | 41 + .../builtin/packages/mpibash/mpibash-4.3.patch | 1565 ++++++++++++++++++++ .../repos/builtin/packages/mpibash/package.py | 32 + var/spack/repos/builtin/packages/mpich/package.py | 92 ++ .../repos/builtin/packages/mpileaks/package.py | 44 + var/spack/repos/builtin/packages/mrnet/package.py | 20 + var/spack/repos/builtin/packages/munge/package.py | 20 + var/spack/repos/builtin/packages/muster/package.py | 22 + .../mvapich2/ad_lustre_rwcontig_open_source.patch | 11 + .../repos/builtin/packages/mvapich2/package.py | 104 ++ var/spack/repos/builtin/packages/nasm/package.py | 14 + var/spack/repos/builtin/packages/ncdu/package.py | 28 + .../repos/builtin/packages/ncurses/package.py | 33 + .../builtin/packages/netcdf/netcdf-4.3.3-mpi.patch | 25 + var/spack/repos/builtin/packages/netcdf/package.py | 27 + .../repos/builtin/packages/netgauge/package.py | 43 + .../repos/builtin/packages/netlib-blas/package.py | 46 + .../builtin/packages/netlib-lapack/package.py | 59 + var/spack/repos/builtin/packages/nettle/package.py | 17 + var/spack/repos/builtin/packages/ompss/package.py | 50 + .../repos/builtin/packages/ompt-openmp/package.py | 23 + var/spack/repos/builtin/packages/opari2/package.py | 65 + .../openmpi/ad_lustre_rwcontig_open_source.patch | 11 + .../builtin/packages/openmpi/llnl-platforms.patch | 151 ++ .../repos/builtin/packages/openmpi/package.py | 109 ++ .../repos/builtin/packages/openssl/package.py | 26 + var/spack/repos/builtin/packages/otf/package.py | 21 + var/spack/repos/builtin/packages/otf2/package.py | 74 + var/spack/repos/builtin/packages/pango/package.py | 19 + var/spack/repos/builtin/packages/papi/package.py | 35 + .../repos/builtin/packages/paraver/package.py | 41 + .../repos/builtin/packages/paraview/package.py | 72 + .../repos/builtin/packages/parmetis/package.py | 26 + .../repos/builtin/packages/parpack/package.py | 43 + var/spack/repos/builtin/packages/pcre/package.py | 15 + var/spack/repos/builtin/packages/petsc/package.py | 40 + var/spack/repos/builtin/packages/pidx/package.py | 21 + var/spack/repos/builtin/packages/pixman/package.py | 18 + .../repos/builtin/packages/pkg-config/package.py | 17 + .../builtin/packages/pmgr_collective/package.py | 37 + .../repos/builtin/packages/postgresql/package.py | 20 + var/spack/repos/builtin/packages/ppl/package.py | 28 + .../repos/builtin/packages/protobuf/package.py | 16 + .../repos/builtin/packages/py-basemap/package.py | 20 + .../repos/builtin/packages/py-biopython/package.py | 15 + .../repos/builtin/packages/py-cffi/package.py | 17 + .../repos/builtin/packages/py-cython/package.py | 14 + .../repos/builtin/packages/py-dateutil/package.py | 16 + .../repos/builtin/packages/py-epydoc/package.py | 13 + .../repos/builtin/packages/py-genders/package.py | 15 + .../repos/builtin/packages/py-gnuplot/package.py | 14 + .../repos/builtin/packages/py-h5py/package.py | 19 + .../repos/builtin/packages/py-ipython/package.py | 16 + .../repos/builtin/packages/py-libxml2/package.py | 15 + .../repos/builtin/packages/py-lockfile/package.py | 23 + .../repos/builtin/packages/py-mako/package.py | 16 + .../builtin/packages/py-matplotlib/package.py | 47 + .../repos/builtin/packages/py-mock/package.py | 17 + .../repos/builtin/packages/py-mpi4py/package.py | 14 + var/spack/repos/builtin/packages/py-mx/package.py | 13 + .../repos/builtin/packages/py-nose/package.py | 17 + .../repos/builtin/packages/py-numpy/package.py | 28 + .../repos/builtin/packages/py-pandas/package.py | 25 + .../repos/builtin/packages/py-pexpect/package.py | 13 + var/spack/repos/builtin/packages/py-pil/package.py | 14 + var/spack/repos/builtin/packages/py-pmw/package.py | 13 + .../repos/builtin/packages/py-pychecker/package.py | 13 + .../repos/builtin/packages/py-pycparser/package.py | 15 + .../builtin/packages/py-pyelftools/package.py | 13 + .../repos/builtin/packages/py-pygments/package.py | 15 + .../repos/builtin/packages/py-pylint/package.py | 17 + .../repos/builtin/packages/py-pypar/package.py | 14 + .../repos/builtin/packages/py-pyparsing/package.py | 13 + .../repos/builtin/packages/py-pyqt/package.py | 24 + .../repos/builtin/packages/py-pyside/package.py | 45 + .../builtin/packages/py-python-daemon/package.py | 26 + .../repos/builtin/packages/py-pytz/package.py | 14 + .../repos/builtin/packages/py-rpy2/package.py | 17 + .../packages/py-scientificpython/package.py | 16 + .../builtin/packages/py-scikit-learn/package.py | 14 + .../repos/builtin/packages/py-scipy/package.py | 18 + .../builtin/packages/py-setuptools/package.py | 15 + .../repos/builtin/packages/py-shiboken/package.py | 45 + var/spack/repos/builtin/packages/py-sip/package.py | 21 + var/spack/repos/builtin/packages/py-six/package.py | 14 + .../repos/builtin/packages/py-sphinx/package.py | 13 + .../repos/builtin/packages/py-sympy/package.py | 13 + .../builtin/packages/py-virtualenv/package.py | 16 + .../repos/builtin/packages/py-yapf/package.py | 15 + var/spack/repos/builtin/packages/python/package.py | 160 ++ var/spack/repos/builtin/packages/qhull/package.py | 27 + var/spack/repos/builtin/packages/qt/package.py | 109 ++ .../repos/builtin/packages/qthreads/package.py | 22 + var/spack/repos/builtin/packages/ravel/package.py | 23 + .../repos/builtin/packages/readline/package.py | 21 + .../rose/add_spack_compiler_recognition.patch | 13 + var/spack/repos/builtin/packages/rose/package.py | 39 + var/spack/repos/builtin/packages/ruby/package.py | 41 + .../repos/builtin/packages/samtools/package.py | 18 + .../builtin/packages/samtools/samtools1.2.patch | 20 + .../repos/builtin/packages/scalasca/package.py | 65 + var/spack/repos/builtin/packages/scorep/package.py | 74 + var/spack/repos/builtin/packages/scotch/package.py | 40 + var/spack/repos/builtin/packages/scr/package.py | 44 + var/spack/repos/builtin/packages/silo/package.py | 19 + var/spack/repos/builtin/packages/snappy/package.py | 15 + .../repos/builtin/packages/spindle/package.py | 44 + var/spack/repos/builtin/packages/sqlite/package.py | 40 + .../builtin/packages/stat/configure_mpicxx.patch | 19 + var/spack/repos/builtin/packages/stat/package.py | 40 + .../repos/builtin/packages/sundials/package.py | 39 + var/spack/repos/builtin/packages/swig/package.py | 46 + var/spack/repos/builtin/packages/task/package.py | 20 + var/spack/repos/builtin/packages/taskd/package.py | 20 + var/spack/repos/builtin/packages/tau/package.py | 36 + var/spack/repos/builtin/packages/tcl/package.py | 22 + .../packages/the_silver_searcher/package.py | 17 + var/spack/repos/builtin/packages/thrift/package.py | 44 + var/spack/repos/builtin/packages/tk/package.py | 22 + var/spack/repos/builtin/packages/tmux/package.py | 24 + .../repos/builtin/packages/tmuxinator/package.py | 17 + .../repos/builtin/packages/trilinos/package.py | 50 + .../repos/builtin/packages/uncrustify/package.py | 14 + .../repos/builtin/packages/util-linux/package.py | 20 + var/spack/repos/builtin/packages/vim/package.py | 83 ++ var/spack/repos/builtin/packages/vtk/package.py | 40 + var/spack/repos/builtin/packages/wget/package.py | 21 + var/spack/repos/builtin/packages/wx/package.py | 24 + .../repos/builtin/packages/wxpropgrid/package.py | 20 + .../repos/builtin/packages/xcb-proto/package.py | 15 + var/spack/repos/builtin/packages/xz/package.py | 20 + var/spack/repos/builtin/packages/yasm/package.py | 16 + var/spack/repos/builtin/packages/zeromq/package.py | 20 + var/spack/repos/builtin/packages/zlib/package.py | 18 + var/spack/repos/builtin/packages/zsh/package.py | 16 + var/spack/repos/builtin/repo.yaml | 2 + 563 files changed, 10048 insertions(+), 9975 deletions(-) delete mode 100644 var/spack/mock_packages/_repo.yaml delete mode 100644 var/spack/mock_packages/a/package.py delete mode 100644 var/spack/mock_packages/b/package.py delete mode 100644 var/spack/mock_packages/c/package.py delete mode 100644 var/spack/mock_packages/callpath/package.py delete mode 100644 var/spack/mock_packages/direct_mpich/package.py delete mode 100644 var/spack/mock_packages/dyninst/package.py delete mode 100644 var/spack/mock_packages/e/package.py delete mode 100644 var/spack/mock_packages/fake/package.py delete mode 100644 var/spack/mock_packages/git-test/package.py delete mode 100644 var/spack/mock_packages/hg-test/package.py delete mode 100644 var/spack/mock_packages/indirect_mpich/package.py delete mode 100644 var/spack/mock_packages/libdwarf/package.py delete mode 100644 var/spack/mock_packages/libelf/package.py delete mode 100644 var/spack/mock_packages/mpich/package.py delete mode 100644 var/spack/mock_packages/mpich2/package.py delete mode 100644 var/spack/mock_packages/mpileaks/package.py delete mode 100644 var/spack/mock_packages/multimethod/package.py delete mode 100644 var/spack/mock_packages/optional-dep-test-2/package.py delete mode 100644 var/spack/mock_packages/optional-dep-test-3/package.py delete mode 100644 var/spack/mock_packages/optional-dep-test/package.py delete mode 100644 var/spack/mock_packages/svn-test/package.py delete mode 100644 var/spack/mock_packages/trivial_install_test_package/package.py delete mode 100644 var/spack/mock_packages/zmpi/package.py delete mode 100644 var/spack/packages/ImageMagick/package.py delete mode 100644 var/spack/packages/Mitos/package.py delete mode 100644 var/spack/packages/R/package.py delete mode 100644 var/spack/packages/SAMRAI/no-tool-build.patch delete mode 100644 var/spack/packages/SAMRAI/package.py delete mode 100644 var/spack/packages/_repo.yaml delete mode 100644 var/spack/packages/activeharmony/package.py delete mode 100644 var/spack/packages/adept-utils/package.py delete mode 100644 var/spack/packages/apex/package.py delete mode 100644 var/spack/packages/arpack/package.py delete mode 100644 var/spack/packages/asciidoc/package.py delete mode 100644 var/spack/packages/atk/package.py delete mode 100644 var/spack/packages/atlas/package.py delete mode 100644 var/spack/packages/autoconf/package.py delete mode 100644 var/spack/packages/automaded/package.py delete mode 100644 var/spack/packages/automake/package.py delete mode 100644 var/spack/packages/bear/package.py delete mode 100644 var/spack/packages/bib2xhtml/package.py delete mode 100644 var/spack/packages/binutils/package.py delete mode 100644 var/spack/packages/bison/package.py delete mode 100644 var/spack/packages/boost/package.py delete mode 100644 var/spack/packages/bowtie2/bowtie2-2.5.patch delete mode 100644 var/spack/packages/bowtie2/package.py delete mode 100644 var/spack/packages/boxlib/package.py delete mode 100644 var/spack/packages/bzip2/package.py delete mode 100644 var/spack/packages/cairo/package.py delete mode 100644 var/spack/packages/callpath/package.py delete mode 100644 var/spack/packages/cblas/package.py delete mode 100644 var/spack/packages/cgm/package.py delete mode 100644 var/spack/packages/clang/package.py delete mode 100644 var/spack/packages/cloog/package.py delete mode 100644 var/spack/packages/cmake/package.py delete mode 100644 var/spack/packages/coreutils/package.py delete mode 100644 var/spack/packages/cppcheck/package.py delete mode 100644 var/spack/packages/cram/package.py delete mode 100644 var/spack/packages/cscope/package.py delete mode 100644 var/spack/packages/cube/package.py delete mode 100644 var/spack/packages/czmq/package.py delete mode 100644 var/spack/packages/dbus/package.py delete mode 100644 var/spack/packages/docbook-xml/package.py delete mode 100644 var/spack/packages/doxygen/package.py delete mode 100644 var/spack/packages/dri2proto/package.py delete mode 100644 var/spack/packages/dtcmp/package.py delete mode 100644 var/spack/packages/dyninst/package.py delete mode 100644 var/spack/packages/elfutils/package.py delete mode 100644 var/spack/packages/extrae/package.py delete mode 100644 var/spack/packages/exuberant-ctags/package.py delete mode 100644 var/spack/packages/fish/package.py delete mode 100644 var/spack/packages/flex/package.py delete mode 100644 var/spack/packages/flux/package.py delete mode 100644 var/spack/packages/fontconfig/package.py delete mode 100644 var/spack/packages/freetype/package.py delete mode 100644 var/spack/packages/gasnet/package.py delete mode 100644 var/spack/packages/gcc/package.py delete mode 100644 var/spack/packages/gdk-pixbuf/package.py delete mode 100644 var/spack/packages/geos/package.py delete mode 100644 var/spack/packages/gflags/package.py delete mode 100644 var/spack/packages/ghostscript/package.py delete mode 100644 var/spack/packages/git/package.py delete mode 100644 var/spack/packages/glib/package.py delete mode 100644 var/spack/packages/glm/package.py delete mode 100644 var/spack/packages/global/package.py delete mode 100644 var/spack/packages/glog/package.py delete mode 100644 var/spack/packages/gmp/package.py delete mode 100644 var/spack/packages/gnutls/package.py delete mode 100644 var/spack/packages/gperf/package.py delete mode 100644 var/spack/packages/gperftools/package.py delete mode 100644 var/spack/packages/graphlib/package.py delete mode 100644 var/spack/packages/graphviz/package.py delete mode 100644 var/spack/packages/gtkplus/package.py delete mode 100644 var/spack/packages/harfbuzz/package.py delete mode 100644 var/spack/packages/hdf5/package.py delete mode 100644 var/spack/packages/hwloc/package.py delete mode 100644 var/spack/packages/hypre/package.py delete mode 100644 var/spack/packages/icu/package.py delete mode 100644 var/spack/packages/icu4c/package.py delete mode 100644 var/spack/packages/isl/package.py delete mode 100644 var/spack/packages/jdk/package.py delete mode 100644 var/spack/packages/jpeg/package.py delete mode 100644 var/spack/packages/launchmon/package.py delete mode 100644 var/spack/packages/launchmon/patch.lmon_install_dir delete mode 100644 var/spack/packages/lcms/package.py delete mode 100644 var/spack/packages/leveldb/package.py delete mode 100644 var/spack/packages/libNBC/package.py delete mode 100644 var/spack/packages/libarchive/package.py delete mode 100644 var/spack/packages/libcircle/package.py delete mode 100644 var/spack/packages/libdrm/package.py delete mode 100644 var/spack/packages/libdwarf/package.py delete mode 100644 var/spack/packages/libelf/package.py delete mode 100644 var/spack/packages/libevent/package.py delete mode 100644 var/spack/packages/libffi/package.py delete mode 100644 var/spack/packages/libgcrypt/package.py delete mode 100644 var/spack/packages/libgpg-error/package.py delete mode 100644 var/spack/packages/libjpeg-turbo/package.py delete mode 100644 var/spack/packages/libjson-c/package.py delete mode 100644 var/spack/packages/libmng/package.py delete mode 100644 var/spack/packages/libmonitor/package.py delete mode 100644 var/spack/packages/libpciaccess/package.py delete mode 100644 var/spack/packages/libpng/package.py delete mode 100644 var/spack/packages/libsodium/package.py delete mode 100644 var/spack/packages/libtiff/package.py delete mode 100644 var/spack/packages/libtool/package.py delete mode 100644 var/spack/packages/libunwind/package.py delete mode 100644 var/spack/packages/libuuid/package.py delete mode 100644 var/spack/packages/libxcb/package.py delete mode 100644 var/spack/packages/libxml2/package.py delete mode 100644 var/spack/packages/libxshmfence/package.py delete mode 100644 var/spack/packages/libxslt/package.py delete mode 100644 var/spack/packages/llvm-lld/package.py delete mode 100644 var/spack/packages/llvm/package.py delete mode 100644 var/spack/packages/lmdb/package.py delete mode 100644 var/spack/packages/lua/package.py delete mode 100644 var/spack/packages/lwgrp/package.py delete mode 100644 var/spack/packages/lwm2/package.py delete mode 100644 var/spack/packages/matio/package.py delete mode 100644 var/spack/packages/memaxes/package.py delete mode 100644 var/spack/packages/mesa/package.py delete mode 100644 var/spack/packages/metis/package.py delete mode 100644 var/spack/packages/mpc/package.py delete mode 100644 var/spack/packages/mpe2/mpe2.patch delete mode 100644 var/spack/packages/mpe2/package.py delete mode 100644 var/spack/packages/mpfr/package.py delete mode 100644 var/spack/packages/mpibash/mpibash-4.3.patch delete mode 100644 var/spack/packages/mpibash/package.py delete mode 100644 var/spack/packages/mpich/package.py delete mode 100644 var/spack/packages/mpileaks/package.py delete mode 100644 var/spack/packages/mrnet/package.py delete mode 100644 var/spack/packages/munge/package.py delete mode 100644 var/spack/packages/muster/package.py delete mode 100644 var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch delete mode 100644 var/spack/packages/mvapich2/package.py delete mode 100644 var/spack/packages/nasm/package.py delete mode 100644 var/spack/packages/ncdu/package.py delete mode 100644 var/spack/packages/ncurses/package.py delete mode 100644 var/spack/packages/netcdf/netcdf-4.3.3-mpi.patch delete mode 100644 var/spack/packages/netcdf/package.py delete mode 100644 var/spack/packages/netgauge/package.py delete mode 100644 var/spack/packages/netlib-blas/package.py delete mode 100644 var/spack/packages/netlib-lapack/package.py delete mode 100644 var/spack/packages/nettle/package.py delete mode 100644 var/spack/packages/ompss/package.py delete mode 100644 var/spack/packages/ompt-openmp/package.py delete mode 100644 var/spack/packages/opari2/package.py delete mode 100644 var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch delete mode 100644 var/spack/packages/openmpi/llnl-platforms.patch delete mode 100644 var/spack/packages/openmpi/package.py delete mode 100644 var/spack/packages/openssl/package.py delete mode 100644 var/spack/packages/otf/package.py delete mode 100644 var/spack/packages/otf2/package.py delete mode 100644 var/spack/packages/pango/package.py delete mode 100644 var/spack/packages/papi/package.py delete mode 100644 var/spack/packages/paraver/package.py delete mode 100644 var/spack/packages/paraview/package.py delete mode 100644 var/spack/packages/parmetis/package.py delete mode 100644 var/spack/packages/parpack/package.py delete mode 100644 var/spack/packages/pcre/package.py delete mode 100644 var/spack/packages/petsc/package.py delete mode 100644 var/spack/packages/pidx/package.py delete mode 100644 var/spack/packages/pixman/package.py delete mode 100644 var/spack/packages/pkg-config/package.py delete mode 100644 var/spack/packages/pmgr_collective/package.py delete mode 100644 var/spack/packages/postgresql/package.py delete mode 100644 var/spack/packages/ppl/package.py delete mode 100644 var/spack/packages/protobuf/package.py delete mode 100644 var/spack/packages/py-basemap/package.py delete mode 100644 var/spack/packages/py-biopython/package.py delete mode 100644 var/spack/packages/py-cffi/package.py delete mode 100644 var/spack/packages/py-cython/package.py delete mode 100644 var/spack/packages/py-dateutil/package.py delete mode 100644 var/spack/packages/py-epydoc/package.py delete mode 100644 var/spack/packages/py-genders/package.py delete mode 100644 var/spack/packages/py-gnuplot/package.py delete mode 100644 var/spack/packages/py-h5py/package.py delete mode 100644 var/spack/packages/py-ipython/package.py delete mode 100644 var/spack/packages/py-libxml2/package.py delete mode 100644 var/spack/packages/py-lockfile/package.py delete mode 100644 var/spack/packages/py-mako/package.py delete mode 100644 var/spack/packages/py-matplotlib/package.py delete mode 100644 var/spack/packages/py-mock/package.py delete mode 100644 var/spack/packages/py-mpi4py/package.py delete mode 100644 var/spack/packages/py-mx/package.py delete mode 100644 var/spack/packages/py-nose/package.py delete mode 100644 var/spack/packages/py-numpy/package.py delete mode 100644 var/spack/packages/py-pandas/package.py delete mode 100644 var/spack/packages/py-pexpect/package.py delete mode 100644 var/spack/packages/py-pil/package.py delete mode 100644 var/spack/packages/py-pmw/package.py delete mode 100644 var/spack/packages/py-pychecker/package.py delete mode 100644 var/spack/packages/py-pycparser/package.py delete mode 100644 var/spack/packages/py-pyelftools/package.py delete mode 100644 var/spack/packages/py-pygments/package.py delete mode 100644 var/spack/packages/py-pylint/package.py delete mode 100644 var/spack/packages/py-pypar/package.py delete mode 100644 var/spack/packages/py-pyparsing/package.py delete mode 100644 var/spack/packages/py-pyqt/package.py delete mode 100644 var/spack/packages/py-pyside/package.py delete mode 100644 var/spack/packages/py-python-daemon/package.py delete mode 100644 var/spack/packages/py-pytz/package.py delete mode 100644 var/spack/packages/py-rpy2/package.py delete mode 100644 var/spack/packages/py-scientificpython/package.py delete mode 100644 var/spack/packages/py-scikit-learn/package.py delete mode 100644 var/spack/packages/py-scipy/package.py delete mode 100644 var/spack/packages/py-setuptools/package.py delete mode 100644 var/spack/packages/py-shiboken/package.py delete mode 100644 var/spack/packages/py-sip/package.py delete mode 100644 var/spack/packages/py-six/package.py delete mode 100644 var/spack/packages/py-sphinx/package.py delete mode 100644 var/spack/packages/py-sympy/package.py delete mode 100644 var/spack/packages/py-virtualenv/package.py delete mode 100644 var/spack/packages/py-yapf/package.py delete mode 100644 var/spack/packages/python/package.py delete mode 100644 var/spack/packages/qhull/package.py delete mode 100644 var/spack/packages/qt/package.py delete mode 100644 var/spack/packages/qthreads/package.py delete mode 100644 var/spack/packages/ravel/package.py delete mode 100644 var/spack/packages/readline/package.py delete mode 100644 var/spack/packages/rose/add_spack_compiler_recognition.patch delete mode 100644 var/spack/packages/rose/package.py delete mode 100644 var/spack/packages/ruby/package.py delete mode 100644 var/spack/packages/samtools/package.py delete mode 100644 var/spack/packages/samtools/samtools1.2.patch delete mode 100644 var/spack/packages/scalasca/package.py delete mode 100644 var/spack/packages/scorep/package.py delete mode 100644 var/spack/packages/scotch/package.py delete mode 100644 var/spack/packages/scr/package.py delete mode 100644 var/spack/packages/silo/package.py delete mode 100644 var/spack/packages/snappy/package.py delete mode 100644 var/spack/packages/spindle/package.py delete mode 100644 var/spack/packages/sqlite/package.py delete mode 100644 var/spack/packages/stat/configure_mpicxx.patch delete mode 100644 var/spack/packages/stat/package.py delete mode 100644 var/spack/packages/sundials/package.py delete mode 100644 var/spack/packages/swig/package.py delete mode 100644 var/spack/packages/task/package.py delete mode 100644 var/spack/packages/taskd/package.py delete mode 100644 var/spack/packages/tau/package.py delete mode 100644 var/spack/packages/tcl/package.py delete mode 100644 var/spack/packages/the_silver_searcher/package.py delete mode 100644 var/spack/packages/thrift/package.py delete mode 100644 var/spack/packages/tk/package.py delete mode 100644 var/spack/packages/tmux/package.py delete mode 100644 var/spack/packages/tmuxinator/package.py delete mode 100644 var/spack/packages/trilinos/package.py delete mode 100644 var/spack/packages/uncrustify/package.py delete mode 100644 var/spack/packages/util-linux/package.py delete mode 100644 var/spack/packages/vim/package.py delete mode 100644 var/spack/packages/vtk/package.py delete mode 100644 var/spack/packages/wget/package.py delete mode 100644 var/spack/packages/wx/package.py delete mode 100644 var/spack/packages/wxpropgrid/package.py delete mode 100644 var/spack/packages/xcb-proto/package.py delete mode 100644 var/spack/packages/xz/package.py delete mode 100644 var/spack/packages/yasm/package.py delete mode 100644 var/spack/packages/zeromq/package.py delete mode 100644 var/spack/packages/zlib/package.py delete mode 100644 var/spack/packages/zsh/package.py create mode 100644 var/spack/repos/builtin.mock/packages/a/package.py create mode 100644 var/spack/repos/builtin.mock/packages/b/package.py create mode 100644 var/spack/repos/builtin.mock/packages/c/package.py create mode 100644 var/spack/repos/builtin.mock/packages/callpath/package.py create mode 100644 var/spack/repos/builtin.mock/packages/direct_mpich/package.py create mode 100644 var/spack/repos/builtin.mock/packages/dyninst/package.py create mode 100644 var/spack/repos/builtin.mock/packages/e/package.py create mode 100644 var/spack/repos/builtin.mock/packages/fake/package.py create mode 100644 var/spack/repos/builtin.mock/packages/git-test/package.py create mode 100644 var/spack/repos/builtin.mock/packages/hg-test/package.py create mode 100644 var/spack/repos/builtin.mock/packages/indirect_mpich/package.py create mode 100644 var/spack/repos/builtin.mock/packages/libdwarf/package.py create mode 100644 var/spack/repos/builtin.mock/packages/libelf/package.py create mode 100644 var/spack/repos/builtin.mock/packages/mpich/package.py create mode 100644 var/spack/repos/builtin.mock/packages/mpich2/package.py create mode 100644 var/spack/repos/builtin.mock/packages/mpileaks/package.py create mode 100644 var/spack/repos/builtin.mock/packages/multimethod/package.py create mode 100644 var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py create mode 100644 var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py create mode 100644 var/spack/repos/builtin.mock/packages/optional-dep-test/package.py create mode 100644 var/spack/repos/builtin.mock/packages/svn-test/package.py create mode 100644 var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py create mode 100644 var/spack/repos/builtin.mock/packages/zmpi/package.py create mode 100644 var/spack/repos/builtin.mock/repo.yaml create mode 100644 var/spack/repos/builtin/packages/ImageMagick/package.py create mode 100644 var/spack/repos/builtin/packages/Mitos/package.py create mode 100644 var/spack/repos/builtin/packages/R/package.py create mode 100644 var/spack/repos/builtin/packages/SAMRAI/no-tool-build.patch create mode 100644 var/spack/repos/builtin/packages/SAMRAI/package.py create mode 100644 var/spack/repos/builtin/packages/activeharmony/package.py create mode 100644 var/spack/repos/builtin/packages/adept-utils/package.py create mode 100644 var/spack/repos/builtin/packages/apex/package.py create mode 100644 var/spack/repos/builtin/packages/arpack/package.py create mode 100644 var/spack/repos/builtin/packages/asciidoc/package.py create mode 100644 var/spack/repos/builtin/packages/atk/package.py create mode 100644 var/spack/repos/builtin/packages/atlas/package.py create mode 100644 var/spack/repos/builtin/packages/autoconf/package.py create mode 100644 var/spack/repos/builtin/packages/automaded/package.py create mode 100644 var/spack/repos/builtin/packages/automake/package.py create mode 100644 var/spack/repos/builtin/packages/bear/package.py create mode 100644 var/spack/repos/builtin/packages/bib2xhtml/package.py create mode 100644 var/spack/repos/builtin/packages/binutils/package.py create mode 100644 var/spack/repos/builtin/packages/bison/package.py create mode 100644 var/spack/repos/builtin/packages/boost/package.py create mode 100644 var/spack/repos/builtin/packages/bowtie2/bowtie2-2.5.patch create mode 100644 var/spack/repos/builtin/packages/bowtie2/package.py create mode 100644 var/spack/repos/builtin/packages/boxlib/package.py create mode 100644 var/spack/repos/builtin/packages/bzip2/package.py create mode 100644 var/spack/repos/builtin/packages/cairo/package.py create mode 100644 var/spack/repos/builtin/packages/callpath/package.py create mode 100644 var/spack/repos/builtin/packages/cblas/package.py create mode 100644 var/spack/repos/builtin/packages/cgm/package.py create mode 100644 var/spack/repos/builtin/packages/clang/package.py create mode 100644 var/spack/repos/builtin/packages/cloog/package.py create mode 100644 var/spack/repos/builtin/packages/cmake/package.py create mode 100644 var/spack/repos/builtin/packages/coreutils/package.py create mode 100644 var/spack/repos/builtin/packages/cppcheck/package.py create mode 100644 var/spack/repos/builtin/packages/cram/package.py create mode 100644 var/spack/repos/builtin/packages/cscope/package.py create mode 100644 var/spack/repos/builtin/packages/cube/package.py create mode 100644 var/spack/repos/builtin/packages/czmq/package.py create mode 100644 var/spack/repos/builtin/packages/dbus/package.py create mode 100644 var/spack/repos/builtin/packages/docbook-xml/package.py create mode 100644 var/spack/repos/builtin/packages/doxygen/package.py create mode 100644 var/spack/repos/builtin/packages/dri2proto/package.py create mode 100644 var/spack/repos/builtin/packages/dtcmp/package.py create mode 100644 var/spack/repos/builtin/packages/dyninst/package.py create mode 100644 var/spack/repos/builtin/packages/elfutils/package.py create mode 100644 var/spack/repos/builtin/packages/extrae/package.py create mode 100644 var/spack/repos/builtin/packages/exuberant-ctags/package.py create mode 100644 var/spack/repos/builtin/packages/fish/package.py create mode 100644 var/spack/repos/builtin/packages/flex/package.py create mode 100644 var/spack/repos/builtin/packages/flux/package.py create mode 100644 var/spack/repos/builtin/packages/fontconfig/package.py create mode 100644 var/spack/repos/builtin/packages/freetype/package.py create mode 100644 var/spack/repos/builtin/packages/gasnet/package.py create mode 100644 var/spack/repos/builtin/packages/gcc/package.py create mode 100644 var/spack/repos/builtin/packages/gdk-pixbuf/package.py create mode 100644 var/spack/repos/builtin/packages/geos/package.py create mode 100644 var/spack/repos/builtin/packages/gflags/package.py create mode 100644 var/spack/repos/builtin/packages/ghostscript/package.py create mode 100644 var/spack/repos/builtin/packages/git/package.py create mode 100644 var/spack/repos/builtin/packages/glib/package.py create mode 100644 var/spack/repos/builtin/packages/glm/package.py create mode 100644 var/spack/repos/builtin/packages/global/package.py create mode 100644 var/spack/repos/builtin/packages/glog/package.py create mode 100644 var/spack/repos/builtin/packages/gmp/package.py create mode 100644 var/spack/repos/builtin/packages/gnutls/package.py create mode 100644 var/spack/repos/builtin/packages/gperf/package.py create mode 100644 var/spack/repos/builtin/packages/gperftools/package.py create mode 100644 var/spack/repos/builtin/packages/graphlib/package.py create mode 100644 var/spack/repos/builtin/packages/graphviz/package.py create mode 100644 var/spack/repos/builtin/packages/gtkplus/package.py create mode 100644 var/spack/repos/builtin/packages/harfbuzz/package.py create mode 100644 var/spack/repos/builtin/packages/hdf5/package.py create mode 100644 var/spack/repos/builtin/packages/hwloc/package.py create mode 100644 var/spack/repos/builtin/packages/hypre/package.py create mode 100644 var/spack/repos/builtin/packages/icu/package.py create mode 100644 var/spack/repos/builtin/packages/icu4c/package.py create mode 100644 var/spack/repos/builtin/packages/isl/package.py create mode 100644 var/spack/repos/builtin/packages/jdk/package.py create mode 100644 var/spack/repos/builtin/packages/jpeg/package.py create mode 100644 var/spack/repos/builtin/packages/launchmon/package.py create mode 100644 var/spack/repos/builtin/packages/launchmon/patch.lmon_install_dir create mode 100644 var/spack/repos/builtin/packages/lcms/package.py create mode 100644 var/spack/repos/builtin/packages/leveldb/package.py create mode 100644 var/spack/repos/builtin/packages/libNBC/package.py create mode 100644 var/spack/repos/builtin/packages/libarchive/package.py create mode 100644 var/spack/repos/builtin/packages/libcircle/package.py create mode 100644 var/spack/repos/builtin/packages/libdrm/package.py create mode 100644 var/spack/repos/builtin/packages/libdwarf/package.py create mode 100644 var/spack/repos/builtin/packages/libelf/package.py create mode 100644 var/spack/repos/builtin/packages/libevent/package.py create mode 100644 var/spack/repos/builtin/packages/libffi/package.py create mode 100644 var/spack/repos/builtin/packages/libgcrypt/package.py create mode 100644 var/spack/repos/builtin/packages/libgpg-error/package.py create mode 100644 var/spack/repos/builtin/packages/libjpeg-turbo/package.py create mode 100644 var/spack/repos/builtin/packages/libjson-c/package.py create mode 100644 var/spack/repos/builtin/packages/libmng/package.py create mode 100644 var/spack/repos/builtin/packages/libmonitor/package.py create mode 100644 var/spack/repos/builtin/packages/libpciaccess/package.py create mode 100644 var/spack/repos/builtin/packages/libpng/package.py create mode 100644 var/spack/repos/builtin/packages/libsodium/package.py create mode 100644 var/spack/repos/builtin/packages/libtiff/package.py create mode 100644 var/spack/repos/builtin/packages/libtool/package.py create mode 100644 var/spack/repos/builtin/packages/libunwind/package.py create mode 100644 var/spack/repos/builtin/packages/libuuid/package.py create mode 100644 var/spack/repos/builtin/packages/libxcb/package.py create mode 100644 var/spack/repos/builtin/packages/libxml2/package.py create mode 100644 var/spack/repos/builtin/packages/libxshmfence/package.py create mode 100644 var/spack/repos/builtin/packages/libxslt/package.py create mode 100644 var/spack/repos/builtin/packages/llvm-lld/package.py create mode 100644 var/spack/repos/builtin/packages/llvm/package.py create mode 100644 var/spack/repos/builtin/packages/lmdb/package.py create mode 100644 var/spack/repos/builtin/packages/lua/package.py create mode 100644 var/spack/repos/builtin/packages/lwgrp/package.py create mode 100644 var/spack/repos/builtin/packages/lwm2/package.py create mode 100644 var/spack/repos/builtin/packages/matio/package.py create mode 100644 var/spack/repos/builtin/packages/memaxes/package.py create mode 100644 var/spack/repos/builtin/packages/mesa/package.py create mode 100644 var/spack/repos/builtin/packages/metis/package.py create mode 100644 var/spack/repos/builtin/packages/mpc/package.py create mode 100644 var/spack/repos/builtin/packages/mpe2/mpe2.patch create mode 100644 var/spack/repos/builtin/packages/mpe2/package.py create mode 100644 var/spack/repos/builtin/packages/mpfr/package.py create mode 100644 var/spack/repos/builtin/packages/mpibash/mpibash-4.3.patch create mode 100644 var/spack/repos/builtin/packages/mpibash/package.py create mode 100644 var/spack/repos/builtin/packages/mpich/package.py create mode 100644 var/spack/repos/builtin/packages/mpileaks/package.py create mode 100644 var/spack/repos/builtin/packages/mrnet/package.py create mode 100644 var/spack/repos/builtin/packages/munge/package.py create mode 100644 var/spack/repos/builtin/packages/muster/package.py create mode 100644 var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch create mode 100644 var/spack/repos/builtin/packages/mvapich2/package.py create mode 100644 var/spack/repos/builtin/packages/nasm/package.py create mode 100644 var/spack/repos/builtin/packages/ncdu/package.py create mode 100644 var/spack/repos/builtin/packages/ncurses/package.py create mode 100644 var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch create mode 100644 var/spack/repos/builtin/packages/netcdf/package.py create mode 100644 var/spack/repos/builtin/packages/netgauge/package.py create mode 100644 var/spack/repos/builtin/packages/netlib-blas/package.py create mode 100644 var/spack/repos/builtin/packages/netlib-lapack/package.py create mode 100644 var/spack/repos/builtin/packages/nettle/package.py create mode 100644 var/spack/repos/builtin/packages/ompss/package.py create mode 100644 var/spack/repos/builtin/packages/ompt-openmp/package.py create mode 100644 var/spack/repos/builtin/packages/opari2/package.py create mode 100644 var/spack/repos/builtin/packages/openmpi/ad_lustre_rwcontig_open_source.patch create mode 100644 var/spack/repos/builtin/packages/openmpi/llnl-platforms.patch create mode 100644 var/spack/repos/builtin/packages/openmpi/package.py create mode 100644 var/spack/repos/builtin/packages/openssl/package.py create mode 100644 var/spack/repos/builtin/packages/otf/package.py create mode 100644 var/spack/repos/builtin/packages/otf2/package.py create mode 100644 var/spack/repos/builtin/packages/pango/package.py create mode 100644 var/spack/repos/builtin/packages/papi/package.py create mode 100644 var/spack/repos/builtin/packages/paraver/package.py create mode 100644 var/spack/repos/builtin/packages/paraview/package.py create mode 100644 var/spack/repos/builtin/packages/parmetis/package.py create mode 100644 var/spack/repos/builtin/packages/parpack/package.py create mode 100644 var/spack/repos/builtin/packages/pcre/package.py create mode 100644 var/spack/repos/builtin/packages/petsc/package.py create mode 100644 var/spack/repos/builtin/packages/pidx/package.py create mode 100644 var/spack/repos/builtin/packages/pixman/package.py create mode 100644 var/spack/repos/builtin/packages/pkg-config/package.py create mode 100644 var/spack/repos/builtin/packages/pmgr_collective/package.py create mode 100644 var/spack/repos/builtin/packages/postgresql/package.py create mode 100644 var/spack/repos/builtin/packages/ppl/package.py create mode 100644 var/spack/repos/builtin/packages/protobuf/package.py create mode 100644 var/spack/repos/builtin/packages/py-basemap/package.py create mode 100644 var/spack/repos/builtin/packages/py-biopython/package.py create mode 100644 var/spack/repos/builtin/packages/py-cffi/package.py create mode 100644 var/spack/repos/builtin/packages/py-cython/package.py create mode 100644 var/spack/repos/builtin/packages/py-dateutil/package.py create mode 100644 var/spack/repos/builtin/packages/py-epydoc/package.py create mode 100644 var/spack/repos/builtin/packages/py-genders/package.py create mode 100644 var/spack/repos/builtin/packages/py-gnuplot/package.py create mode 100644 var/spack/repos/builtin/packages/py-h5py/package.py create mode 100644 var/spack/repos/builtin/packages/py-ipython/package.py create mode 100644 var/spack/repos/builtin/packages/py-libxml2/package.py create mode 100644 var/spack/repos/builtin/packages/py-lockfile/package.py create mode 100644 var/spack/repos/builtin/packages/py-mako/package.py create mode 100644 var/spack/repos/builtin/packages/py-matplotlib/package.py create mode 100644 var/spack/repos/builtin/packages/py-mock/package.py create mode 100644 var/spack/repos/builtin/packages/py-mpi4py/package.py create mode 100644 var/spack/repos/builtin/packages/py-mx/package.py create mode 100644 var/spack/repos/builtin/packages/py-nose/package.py create mode 100644 var/spack/repos/builtin/packages/py-numpy/package.py create mode 100644 var/spack/repos/builtin/packages/py-pandas/package.py create mode 100644 var/spack/repos/builtin/packages/py-pexpect/package.py create mode 100644 var/spack/repos/builtin/packages/py-pil/package.py create mode 100644 var/spack/repos/builtin/packages/py-pmw/package.py create mode 100644 var/spack/repos/builtin/packages/py-pychecker/package.py create mode 100644 var/spack/repos/builtin/packages/py-pycparser/package.py create mode 100644 var/spack/repos/builtin/packages/py-pyelftools/package.py create mode 100644 var/spack/repos/builtin/packages/py-pygments/package.py create mode 100644 var/spack/repos/builtin/packages/py-pylint/package.py create mode 100644 var/spack/repos/builtin/packages/py-pypar/package.py create mode 100644 var/spack/repos/builtin/packages/py-pyparsing/package.py create mode 100644 var/spack/repos/builtin/packages/py-pyqt/package.py create mode 100644 var/spack/repos/builtin/packages/py-pyside/package.py create mode 100644 var/spack/repos/builtin/packages/py-python-daemon/package.py create mode 100644 var/spack/repos/builtin/packages/py-pytz/package.py create mode 100644 var/spack/repos/builtin/packages/py-rpy2/package.py create mode 100644 var/spack/repos/builtin/packages/py-scientificpython/package.py create mode 100644 var/spack/repos/builtin/packages/py-scikit-learn/package.py create mode 100644 var/spack/repos/builtin/packages/py-scipy/package.py create mode 100644 var/spack/repos/builtin/packages/py-setuptools/package.py create mode 100644 var/spack/repos/builtin/packages/py-shiboken/package.py create mode 100644 var/spack/repos/builtin/packages/py-sip/package.py create mode 100644 var/spack/repos/builtin/packages/py-six/package.py create mode 100644 var/spack/repos/builtin/packages/py-sphinx/package.py create mode 100644 var/spack/repos/builtin/packages/py-sympy/package.py create mode 100644 var/spack/repos/builtin/packages/py-virtualenv/package.py create mode 100644 var/spack/repos/builtin/packages/py-yapf/package.py create mode 100644 var/spack/repos/builtin/packages/python/package.py create mode 100644 var/spack/repos/builtin/packages/qhull/package.py create mode 100644 var/spack/repos/builtin/packages/qt/package.py create mode 100644 var/spack/repos/builtin/packages/qthreads/package.py create mode 100644 var/spack/repos/builtin/packages/ravel/package.py create mode 100644 var/spack/repos/builtin/packages/readline/package.py create mode 100644 var/spack/repos/builtin/packages/rose/add_spack_compiler_recognition.patch create mode 100644 var/spack/repos/builtin/packages/rose/package.py create mode 100644 var/spack/repos/builtin/packages/ruby/package.py create mode 100644 var/spack/repos/builtin/packages/samtools/package.py create mode 100644 var/spack/repos/builtin/packages/samtools/samtools1.2.patch create mode 100644 var/spack/repos/builtin/packages/scalasca/package.py create mode 100644 var/spack/repos/builtin/packages/scorep/package.py create mode 100644 var/spack/repos/builtin/packages/scotch/package.py create mode 100644 var/spack/repos/builtin/packages/scr/package.py create mode 100644 var/spack/repos/builtin/packages/silo/package.py create mode 100644 var/spack/repos/builtin/packages/snappy/package.py create mode 100644 var/spack/repos/builtin/packages/spindle/package.py create mode 100644 var/spack/repos/builtin/packages/sqlite/package.py create mode 100644 var/spack/repos/builtin/packages/stat/configure_mpicxx.patch create mode 100644 var/spack/repos/builtin/packages/stat/package.py create mode 100644 var/spack/repos/builtin/packages/sundials/package.py create mode 100644 var/spack/repos/builtin/packages/swig/package.py create mode 100644 var/spack/repos/builtin/packages/task/package.py create mode 100644 var/spack/repos/builtin/packages/taskd/package.py create mode 100644 var/spack/repos/builtin/packages/tau/package.py create mode 100644 var/spack/repos/builtin/packages/tcl/package.py create mode 100644 var/spack/repos/builtin/packages/the_silver_searcher/package.py create mode 100644 var/spack/repos/builtin/packages/thrift/package.py create mode 100644 var/spack/repos/builtin/packages/tk/package.py create mode 100644 var/spack/repos/builtin/packages/tmux/package.py create mode 100644 var/spack/repos/builtin/packages/tmuxinator/package.py create mode 100644 var/spack/repos/builtin/packages/trilinos/package.py create mode 100644 var/spack/repos/builtin/packages/uncrustify/package.py create mode 100644 var/spack/repos/builtin/packages/util-linux/package.py create mode 100644 var/spack/repos/builtin/packages/vim/package.py create mode 100644 var/spack/repos/builtin/packages/vtk/package.py create mode 100644 var/spack/repos/builtin/packages/wget/package.py create mode 100644 var/spack/repos/builtin/packages/wx/package.py create mode 100644 var/spack/repos/builtin/packages/wxpropgrid/package.py create mode 100644 var/spack/repos/builtin/packages/xcb-proto/package.py create mode 100644 var/spack/repos/builtin/packages/xz/package.py create mode 100644 var/spack/repos/builtin/packages/yasm/package.py create mode 100644 var/spack/repos/builtin/packages/zeromq/package.py create mode 100644 var/spack/repos/builtin/packages/zlib/package.py create mode 100644 var/spack/repos/builtin/packages/zsh/package.py create mode 100644 var/spack/repos/builtin/repo.yaml (limited to 'var') diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 4f481ce937..aab20cb260 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -43,7 +43,7 @@ test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") var_path = join_path(spack_root, "var", "spack") stage_path = join_path(var_path, "stage") -packages_path = join_path(var_path, "packages") +repos_path = join_path(var_path, "repos") share_path = join_path(spack_root, "share", "spack") prefix = spack_root @@ -58,8 +58,12 @@ import spack.repository _repo_paths = spack.config.get_repos_config() if not _repo_paths: tty.die("Spack configuration contains no package repositories.") -repo = spack.repository.RepoPath(*_repo_paths) -sys.meta_path.append(repo) + +try: + repo = spack.repository.RepoPath(*_repo_paths) + sys.meta_path.append(repo) +except spack.repository.BadRepoError, e: + tty.die('Bad repository. %s' % e.message) # # Set up the installed packages database @@ -68,9 +72,10 @@ from spack.database import Database installed_db = Database(install_path) # -# Paths to mock files for testing. +# Paths to built-in Spack repositories. # -mock_packages_path = join_path(var_path, "mock_packages") +packages_path = join_path(repos_path, "builtin") +mock_packages_path = join_path(repos_path, "builtin.mock") mock_config_path = join_path(var_path, "mock_configs") mock_site_config = join_path(mock_config_path, "site_spackconfig") diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 85cc83730c..395aa90bed 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -32,7 +32,7 @@ from llnl.util.filesystem import join_path, mkdirp import spack.spec import spack.config from spack.util.environment import get_path -from spack.repository import repo_config_filename +from spack.repository import repo_config_name import os import exceptions diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py index c1545b3654..a2c0bbe147 100644 --- a/lib/spack/spack/repository.py +++ b/lib/spack/spack/repository.py @@ -26,28 +26,32 @@ import os import exceptions import sys import inspect -import glob import imp import re -import itertools import traceback from bisect import bisect_left from external import yaml import llnl.util.tty as tty from llnl.util.filesystem import join_path -from llnl.util.lang import * import spack.error import spack.spec from spack.virtual import ProviderIndex from spack.util.naming import * -# Filename for package repo names -repo_config_filename = '_repo.yaml' +# +# Super-namespace for all packages. +# Package modules are imported as spack.pkg... +# +repo_namespace = 'spack.pkg' -# Filename for packages in repos. -package_file_name = 'package.py' +# +# These names describe how repos should be laid out in the filesystem. +# +repo_config_name = 'repo.yaml' # Top-level filename for repo config. +packages_dir_name = 'packages' # Top-level repo directory containing pkgs. +package_file_name = 'package.py' # Filename for packages in a repository. def _autospec(function): """Decorator that automatically converts the argument of a single-arg @@ -74,7 +78,10 @@ class RepoPath(object): combined results of the Repos in its list instead of on a single package repository. """ - def __init__(self, *repo_dirs): + def __init__(self, *repo_dirs, **kwargs): + # super-namespace for all packages in the RepoPath + self.super_namespace = kwargs.get('namespace', repo_namespace) + self.repos = [] self.by_namespace = NamespaceTrie() self.by_path = {} @@ -82,11 +89,9 @@ class RepoPath(object): self._all_package_names = [] self._provider_index = None + # Add each repo to this path. for root in repo_dirs: - # Try to make it a repo if it's not one. - if not isinstance(root, Repo): - repo = Repo(root) - # Add the repo to the path. + repo = Repo(root, self.super_namespace) self.put_last(repo) @@ -120,11 +125,11 @@ class RepoPath(object): repo, self.by_path[repo.root]) if repo.namespace in self.by_namespace: - raise DuplicateRepoError("Package repos cannot have the same name", + raise DuplicateRepoError("Package repos cannot provide the same namespace", repo, self.by_namespace[repo.namespace]) # Add repo to the pkg indexes - self.by_namespace[repo.namespace] = repo + self.by_namespace[repo.full_namespace] = repo self.by_path[repo.root] = repo # add names to the cached name list @@ -185,10 +190,10 @@ class RepoPath(object): # If it's a module in some repo, or if it is the repo's # namespace, let the repo handle it. for repo in self.repos: - if namespace == repo.namespace: + if namespace == repo.full_namespace: if repo.real_name(module_name): return repo - elif fullname == repo.namespace: + elif fullname == repo.full_namespace: return repo # No repo provides the namespace, but it is a valid prefix of @@ -200,13 +205,14 @@ class RepoPath(object): def load_module(self, fullname): - """Loads containing namespaces when necessary. + """Handles loading container namespaces when necessary. See ``Repo`` for how actual package modules are loaded. """ if fullname in sys.modules: return sys.modules[fullname] + # partition fullname into prefix and module name. namespace, dot, module_name = fullname.rpartition('.') @@ -252,41 +258,67 @@ class Repo(object): """Class representing a package repository in the filesystem. Each package repository must have a top-level configuration file - called `_repo.yaml`. + called `repo.yaml`. - Currently, `_repo.yaml` this must define: + Currently, `repo.yaml` this must define: `namespace`: A Python namespace where the repository's packages should live. """ - def __init__(self, root): - """Instantiate a package repository from a filesystem path.""" + def __init__(self, root, namespace=repo_namespace): + """Instantiate a package repository from a filesystem path. + + Arguments: + root The root directory of the repository. + + namespace A super-namespace that will contain the repo-defined + namespace (this is generally jsut `spack.pkg`). The + super-namespace is Spack's way of separating repositories + from other python namespaces. + + """ # Root directory, containing _repo.yaml and package dirs self.root = root - # Config file in /_repo.yaml - self.config_file = os.path.join(self.root, repo_config_filename) + # super-namespace for all packages in the Repo + self.super_namespace = namespace - # Read configuration from _repo.yaml + # check and raise BadRepoError on fail. + def check(condition, msg): + if not condition: raise BadRepoError(msg) + + # Validate repository layout. + self.config_file = join_path(self.root, repo_config_name) + check(os.path.isfile(self.config_file), + "No %s found in '%s'" % (repo_config_name, root)) + self.packages_path = join_path(self.root, packages_dir_name) + check(os.path.isdir(self.packages_path), + "No directory '%s' found in '%s'" % (repo_config_name, root)) + + # Read configuration and validate namespace config = self._read_config() - if not 'namespace' in config: - tty.die('Package repo in %s must define a namespace in %s.' - % (self.root, repo_config_filename)) + check('namespace' in config, '%s must define a namespace.' + % join_path(self.root, repo_config_name)) - # Check namespace in the repository configuration. self.namespace = config['namespace'] - if not re.match(r'[a-zA-Z][a-zA-Z0-9_.]+', self.namespace): - tty.die(("Invalid namespace '%s' in '%s'. Namespaces must be " - "valid python identifiers separated by '.'") - % (self.namespace, self.root)) - self._names = self.namespace.split('.') + check(re.match(r'[a-zA-Z][a-zA-Z0-9_.]+', self.namespace), + ("Invalid namespace '%s' in repo '%s'. " % (self.namespace, self.root)) + + "Namespaces must be valid python identifiers separated by '.'") + + # Set up 'full_namespace' to include the super-namespace + if self.super_namespace: + self.full_namespace = "%s.%s" % (self.super_namespace, self.namespace) + else: + self.full_namespace = self.namespace + + # Keep name components around for checking prefixes. + self._names = self.full_namespace.split('.') # These are internal cache variables. self._modules = {} self._classes = {} self._instances = {} - self._provider_index = None self._all_package_names = None @@ -301,11 +333,27 @@ class Repo(object): we don't get runtime warnings from Python's module system. """ + parent = None for l in range(1, len(self._names)+1): ns = '.'.join(self._names[:l]) if not ns in sys.modules: - sys.modules[ns] = _make_namespace_module(ns) - sys.modules[ns].__loader__ = self + module = _make_namespace_module(ns) + module.__loader__ = self + sys.modules[ns] = module + + # Ensure the namespace is an atrribute of its parent, + # if it has not been set by something else already. + # + # This ensures that we can do things like: + # import spack.pkg.builtin.mpich as mpich + if parent: + modname = self._names[l-1] + if not hasattr(parent, modname): + setattr(parent, modname, module) + else: + # no need to set up a module, but keep track of the parent. + module = sys.modules[ns] + parent = module def real_name(self, import_name): @@ -349,7 +397,7 @@ class Repo(object): return self namespace, dot, module_name = fullname.rpartition('.') - if namespace == self.namespace: + if namespace == self.full_namespace: if self.real_name(module_name): return self @@ -369,14 +417,14 @@ class Repo(object): if self.is_prefix(fullname): module = _make_namespace_module(fullname) - elif namespace == self.namespace: + elif namespace == self.full_namespace: real_name = self.real_name(module_name) if not real_name: - raise ImportError("No module %s in repo %s" % (module_name, namespace)) + raise ImportError("No module %s in %s" % (module_name, self)) module = self._get_pkg_module(real_name) else: - raise ImportError("No module %s in repo %s" % (fullname, self.namespace)) + raise ImportError("No module %s in %s" % (fullname, self)) module.__loader__ = self sys.modules[fullname] = module @@ -392,7 +440,7 @@ class Repo(object): if (not yaml_data or 'repo' not in yaml_data or not isinstance(yaml_data['repo'], dict)): tty.die("Invalid %s in repository %s" - % (repo_config_filename, self.root)) + % (repo_config_name, self.root)) return yaml_data['repo'] @@ -446,7 +494,7 @@ class Repo(object): def dirname_for_package_name(self, pkg_name): """Get the directory name for a particular package. This is the directory that contains its package.py file.""" - return join_path(self.root, pkg_name) + return join_path(self.packages_path, pkg_name) def filename_for_package_name(self, pkg_name): @@ -460,7 +508,6 @@ class Repo(object): """ validate_module_name(pkg_name) pkg_dir = self.dirname_for_package_name(pkg_name) - return join_path(pkg_dir, package_file_name) @@ -469,12 +516,25 @@ class Repo(object): if self._all_package_names is None: self._all_package_names = [] - for pkg_name in os.listdir(self.root): - pkg_dir = join_path(self.root, pkg_name) - pkg_file = join_path(pkg_dir, package_file_name) - if os.path.isfile(pkg_file): - self._all_package_names.append(pkg_name) - + for pkg_name in os.listdir(self.packages_path): + # Skip non-directories in the package root. + pkg_dir = join_path(self.packages_path, pkg_name) + if not os.path.isdir(pkg_dir): + continue + + # Skip directories without a package.py in them. + pkg_file = join_path(self.packages_path, pkg_name, package_file_name) + if not os.path.isfile(pkg_file): + continue + + # Warn about invalid names that look like packages. + if not valid_module_name(pkg_name): + tty.warn("Skipping package at %s. '%s' is not a valid Spack module name." + % (pkg_dir, pkg_name)) + continue + + # All checks passed. Add it to the list. + self._all_package_names.append(pkg_name) self._all_package_names.sort() return self._all_package_names @@ -489,7 +549,8 @@ class Repo(object): """Whether a package with the supplied name exists.""" # This does a binary search in the sorted list. idx = bisect_left(self.all_package_names(), pkg_name) - return self._all_package_names[idx] == pkg_name + return (idx < len(self._all_package_names) and + self._all_package_names[idx] == pkg_name) def _get_pkg_module(self, pkg_name): @@ -505,7 +566,7 @@ class Repo(object): file_path = self.filename_for_package_name(pkg_name) if not os.path.exists(file_path): - raise UnknownPackageError(pkg_name, self.namespace) + raise UnknownPackageError(pkg_name, self) if not os.path.isfile(file_path): tty.die("Something's wrong. '%s' is not a file!" % file_path) @@ -513,10 +574,11 @@ class Repo(object): if not os.access(file_path, os.R_OK): tty.die("Cannot read '%s'!" % file_path) - fullname = "%s.%s" % (self.namespace, pkg_name) + # e.g., spack.pkg.builtin.mpich + fullname = "%s.%s" % (self.full_namespace, pkg_name) module = imp.load_source(fullname, file_path) - module.__package__ = self.namespace + module.__package__ = self.full_namespace module.__loader__ = self self._modules[pkg_name] = module @@ -541,7 +603,7 @@ class Repo(object): def __str__(self): - return "" % (self.namespace, self.root) + return "[Repo '%s' at '%s']" % (self.namespace, self.root) def __repr__(self): @@ -597,12 +659,18 @@ class Repo(object): yield spec +class BadRepoError(spack.error.SpackError): + """Raised when repo layout is invalid.""" + def __init__(self, msg): + super(BadRepoError, self).__init__(msg) + + class UnknownPackageError(spack.error.SpackError): """Raised when we encounter a package spack doesn't have.""" def __init__(self, name, repo=None): msg = None if repo: - msg = "Package %s not found in packagerepo %s." % (name, repo) + msg = "Package %s not found in repository %s." % (name, repo) else: msg = "Package %s not found." % name super(UnknownPackageError, self).__init__(msg) diff --git a/var/spack/mock_packages/_repo.yaml b/var/spack/mock_packages/_repo.yaml deleted file mode 100644 index b97b978de3..0000000000 --- a/var/spack/mock_packages/_repo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -repo: - namespace: gov.llnl.spack.mock diff --git a/var/spack/mock_packages/a/package.py b/var/spack/mock_packages/a/package.py deleted file mode 100644 index fa63c08df0..0000000000 --- a/var/spack/mock_packages/a/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class A(Package): - """Simple package with no dependencies""" - - homepage = "http://www.example.com" - url = "http://www.example.com/a-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/b/package.py b/var/spack/mock_packages/b/package.py deleted file mode 100644 index cb88aa2157..0000000000 --- a/var/spack/mock_packages/b/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class B(Package): - """Simple package with no dependencies""" - - homepage = "http://www.example.com" - url = "http://www.example.com/b-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/c/package.py b/var/spack/mock_packages/c/package.py deleted file mode 100644 index f51b913fa9..0000000000 --- a/var/spack/mock_packages/c/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class C(Package): - """Simple package with no dependencies""" - - homepage = "http://www.example.com" - url = "http://www.example.com/c-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/callpath/package.py b/var/spack/mock_packages/callpath/package.py deleted file mode 100644 index 5b6b70ba2a..0000000000 --- a/var/spack/mock_packages/callpath/package.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Callpath(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("dyninst") - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/mock_packages/direct_mpich/package.py b/var/spack/mock_packages/direct_mpich/package.py deleted file mode 100644 index 2ced82521b..0000000000 --- a/var/spack/mock_packages/direct_mpich/package.py +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class DirectMpich(Package): - homepage = "http://www.example.com" - url = "http://www.example.com/direct_mpich-1.0.tar.gz" - - version('1.0', 'foobarbaz') - - depends_on('mpich') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/dyninst/package.py b/var/spack/mock_packages/dyninst/package.py deleted file mode 100644 index 7998578da1..0000000000 --- a/var/spack/mock_packages/dyninst/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Dyninst(Package): - homepage = "https://paradyn.org" - url = "http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz" - - version('8.2', 'cxyzab', - url='http://www.paradyn.org/release8.2/DyninstAPI-8.2.tgz') - version('8.1.2', 'bcxyza', - url='http://www.paradyn.org/release8.1.2/DyninstAPI-8.1.2.tgz') - version('8.1.1', 'abcxyz', - url='http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz') - - depends_on("libelf") - depends_on("libdwarf") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/mock_packages/e/package.py b/var/spack/mock_packages/e/package.py deleted file mode 100644 index 76c6b64c7f..0000000000 --- a/var/spack/mock_packages/e/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class E(Package): - """Simple package with no dependencies""" - - homepage = "http://www.example.com" - url = "http://www.example.com/e-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/fake/package.py b/var/spack/mock_packages/fake/package.py deleted file mode 100644 index fb3c2bdd2e..0000000000 --- a/var/spack/mock_packages/fake/package.py +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Fake(Package): - homepage = "http://www.fake-spack-example.org" - url = "http://www.fake-spack-example.org/downloads/fake-1.0.tar.gz" - - version('1.0', 'foobarbaz') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/git-test/package.py b/var/spack/mock_packages/git-test/package.py deleted file mode 100644 index 689185463c..0000000000 --- a/var/spack/mock_packages/git-test/package.py +++ /dev/null @@ -1,10 +0,0 @@ -from spack import * - -class GitTest(Package): - """Mock package that uses git for fetching.""" - homepage = "http://www.git-fetch-example.com" - - version('git', git='to-be-filled-in-by-test') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/hg-test/package.py b/var/spack/mock_packages/hg-test/package.py deleted file mode 100644 index 462f1e4c3a..0000000000 --- a/var/spack/mock_packages/hg-test/package.py +++ /dev/null @@ -1,10 +0,0 @@ -from spack import * - -class HgTest(Package): - """Test package that does fetching with mercurial.""" - homepage = "http://www.hg-fetch-example.com" - - version('hg', hg='to-be-filled-in-by-test') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/indirect_mpich/package.py b/var/spack/mock_packages/indirect_mpich/package.py deleted file mode 100644 index daf8b4b166..0000000000 --- a/var/spack/mock_packages/indirect_mpich/package.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class IndirectMpich(Package): - """Test case for a package that depends on MPI and one of its - dependencies requires a *particular version* of MPI. - """ - - homepage = "http://www.example.com" - url = "http://www.example.com/indirect_mpich-1.0.tar.gz" - - version(1.0, 'foobarbaz') - - depends_on('mpi') - depends_on('direct_mpich') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/libdwarf/package.py b/var/spack/mock_packages/libdwarf/package.py deleted file mode 100644 index 0b8df04cfb..0000000000 --- a/var/spack/mock_packages/libdwarf/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with 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 - -# Only build certain parts of dwarf because the other ones break. -dwarf_dirs = ['libdwarf', 'dwarfdump2'] - -class Libdwarf(Package): - homepage = "http://www.prevanders.net/dwarf.html" - url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" - list_url = homepage - - version(20130729, "64b42692e947d5180e162e46c689dfbf") - version(20130207, 'foobarbaz') - version(20111030, 'foobarbaz') - version(20070703, 'foobarbaz') - - depends_on("libelf") - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/libelf/package.py b/var/spack/mock_packages/libelf/package.py deleted file mode 100644 index 94c8f942cd..0000000000 --- a/var/spack/mock_packages/libelf/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libelf(Package): - homepage = "http://www.mr511.de/software/english.html" - url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" - - version('0.8.13', '4136d7b4c04df68b686570afa26988ac') - version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') - version('0.8.10', '9db4d36c283d9790d8fa7df1f4d7b4d9') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-shared", - "--disable-dependency-tracking", - "--disable-debug") - make() - - # The mkdir commands in libelf's intsall can fail in parallel - make("install", parallel=False) diff --git a/var/spack/mock_packages/mpich/package.py b/var/spack/mock_packages/mpich/package.py deleted file mode 100644 index f77d3efc5d..0000000000 --- a/var/spack/mock_packages/mpich/package.py +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpich(Package): - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - - variant('debug', default=False, - description="Compile MPICH with debug flags.") - - version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') - version('3.0.3', 'foobarbaz') - version('3.0.2', 'foobarbaz') - version('3.0.1', 'foobarbaz') - version('3.0', 'foobarbaz') - - provides('mpi@:3', when='@3:') - provides('mpi@:1', when='@:1') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/mpich2/package.py b/var/spack/mock_packages/mpich2/package.py deleted file mode 100644 index 827b94c8a4..0000000000 --- a/var/spack/mock_packages/mpich2/package.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpich2(Package): - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/1.5/mpich2-1.5.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - - version('1.5', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') - version('1.4', 'foobarbaz') - version('1.3', 'foobarbaz') - version('1.2', 'foobarbaz') - version('1.1', 'foobarbaz') - version('1.0', 'foobarbaz') - - provides('mpi@:2.0') - provides('mpi@:2.1', when='@1.1:') - provides('mpi@:2.2', when='@1.2:') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/mock_packages/mpileaks/package.py b/var/spack/mock_packages/mpileaks/package.py deleted file mode 100644 index 3989f1b452..0000000000 --- a/var/spack/mock_packages/mpileaks/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpileaks(Package): - homepage = "http://www.llnl.gov" - url = "http://www.llnl.gov/mpileaks-1.0.tar.gz" - - version(1.0, 'foobarbaz') - version(2.1, 'foobarbaz') - version(2.2, 'foobarbaz') - version(2.3, 'foobarbaz') - - variant('debug', default=False, description='Debug variant') - variant('opt', default=False, description='Optimized variant') - - depends_on("mpi") - depends_on("callpath") - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py deleted file mode 100644 index 75b1606ffc..0000000000 --- a/var/spack/mock_packages/multimethod/package.py +++ /dev/null @@ -1,143 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - - -class Multimethod(Package): - """This package is designed for use with Spack's multimethod test. - It has a bunch of test cases for the @when decorator that the - test uses. - """ - - homepage = 'http://www.example.com/' - url = 'http://www.example.com/example-1.0.tar.gz' - - # - # These functions are only valid for versions 1, 2, and 3. - # - @when('@1.0') - def no_version_2(self): - return 1 - - @when('@3.0') - def no_version_2(self): - return 3 - - @when('@4.0') - def no_version_2(self): - return 4 - - - # - # These functions overlap, so there is ambiguity, but we'll take - # the first one. - # - @when('@:4') - def version_overlap(self): - return 1 - - @when('@2:') - def version_overlap(self): - return 2 - - - # - # More complicated case with cascading versions. - # - def mpi_version(self): - return 0 - - @when('^mpi@3:') - def mpi_version(self): - return 3 - - @when('^mpi@2:') - def mpi_version(self): - return 2 - - @when('^mpi@1:') - def mpi_version(self): - return 1 - - - # - # Use these to test whether the default method is called when no - # match is found. This also tests whether we can switch methods - # on compilers - # - def has_a_default(self): - return 'default' - - @when('%gcc') - def has_a_default(self): - return 'gcc' - - @when('%intel') - def has_a_default(self): - return 'intel' - - - - # - # Make sure we can switch methods on different architectures - # - @when('=x86_64') - def different_by_architecture(self): - return 'x86_64' - - @when('=ppc64') - def different_by_architecture(self): - return 'ppc64' - - @when('=ppc32') - def different_by_architecture(self): - return 'ppc32' - - @when('=arm64') - def different_by_architecture(self): - return 'arm64' - - - # - # Make sure we can switch methods on different dependencies - # - @when('^mpich') - def different_by_dep(self): - return 'mpich' - - @when('^zmpi') - def different_by_dep(self): - return 'zmpi' - - - # - # Make sure we can switch on virtual dependencies - # - def different_by_virtual_dep(self): - return 1 - - @when('^mpi@2:') - def different_by_virtual_dep(self): - return 2 diff --git a/var/spack/mock_packages/optional-dep-test-2/package.py b/var/spack/mock_packages/optional-dep-test-2/package.py deleted file mode 100644 index ef0587588e..0000000000 --- a/var/spack/mock_packages/optional-dep-test-2/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class OptionalDepTest2(Package): - """Depends on the optional-dep-test package""" - - homepage = "http://www.example.com" - url = "http://www.example.com/optional-dep-test-2-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - - variant('odt', default=False) - variant('mpi', default=False) - - depends_on('optional-dep-test', when='+odt') - depends_on('optional-dep-test+mpi', when='+mpi') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/optional-dep-test-3/package.py b/var/spack/mock_packages/optional-dep-test-3/package.py deleted file mode 100644 index e6cb3bd6e7..0000000000 --- a/var/spack/mock_packages/optional-dep-test-3/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class OptionalDepTest3(Package): - """Depends on the optional-dep-test package""" - - homepage = "http://www.example.com" - url = "http://www.example.com/optional-dep-test-3-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - - variant('var', default=False) - - depends_on('a', when='~var') - depends_on('b', when='+var') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/optional-dep-test/package.py b/var/spack/mock_packages/optional-dep-test/package.py deleted file mode 100644 index bb57576ca9..0000000000 --- a/var/spack/mock_packages/optional-dep-test/package.py +++ /dev/null @@ -1,29 +0,0 @@ -from spack import * - -class OptionalDepTest(Package): - """Description""" - - homepage = "http://www.example.com" - url = "http://www.example.com/optional_dep_test-1.0.tar.gz" - - version('1.0', '0123456789abcdef0123456789abcdef') - version('1.1', '0123456789abcdef0123456789abcdef') - - variant('a', default=False) - variant('f', default=False) - variant('mpi', default=False) - - depends_on('a', when='+a') - depends_on('b', when='@1.1') - depends_on('c', when='%intel') - depends_on('d', when='%intel@64.1') - depends_on('e', when='%clang@34:40') - - depends_on('f', when='+f') - depends_on('g', when='^f') - depends_on('mpi', when='^g') - - depends_on('mpi', when='+mpi') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/svn-test/package.py b/var/spack/mock_packages/svn-test/package.py deleted file mode 100644 index ba4d5522b4..0000000000 --- a/var/spack/mock_packages/svn-test/package.py +++ /dev/null @@ -1,10 +0,0 @@ -from spack import * - -class SvnTest(Package): - """Mock package that uses svn for fetching.""" - url = "http://www.example.com/svn-test-1.0.tar.gz" - - version('svn', 'to-be-filled-in-by-test') - - def install(self, spec, prefix): - pass diff --git a/var/spack/mock_packages/trivial_install_test_package/package.py b/var/spack/mock_packages/trivial_install_test_package/package.py deleted file mode 100644 index c4db9f5f07..0000000000 --- a/var/spack/mock_packages/trivial_install_test_package/package.py +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class TrivialInstallTestPackage(Package): - """This package is a stub with a trivial install method. It allows us - to test the install and uninstall logic of spack.""" - homepage = "http://www.example.com/trivial_install" - url = "http://www.unit-test-should-replace-this-url/trivial_install-1.0.tar.gz" - - version('1.0', 'foobarbaz') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make('install') diff --git a/var/spack/mock_packages/zmpi/package.py b/var/spack/mock_packages/zmpi/package.py deleted file mode 100644 index 8c6ceda6d3..0000000000 --- a/var/spack/mock_packages/zmpi/package.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Zmpi(Package): - """This is a fake MPI package used to demonstrate virtual package providers - with dependencies.""" - homepage = "http://www.spack-fake-zmpi.org" - url = "http://www.spack-fake-zmpi.org/downloads/zmpi-1.0.tar.gz" - - version('1.0', 'foobarbaz') - - provides('mpi@:10.0') - depends_on('fake') - - def install(self, spec, prefix): - pass diff --git a/var/spack/packages/ImageMagick/package.py b/var/spack/packages/ImageMagick/package.py deleted file mode 100644 index 753ea80ca6..0000000000 --- a/var/spack/packages/ImageMagick/package.py +++ /dev/null @@ -1,37 +0,0 @@ -from spack import * - -class Imagemagick(Package): - """ImageMagick is a image processing library""" - homepage = "http://www.imagemagic.org" - - #------------------------------------------------------------------------- - # ImageMagick does not keep around anything but *-10 versions, so - # this URL may change. If you want the bleeding edge, you can - # uncomment it and see if it works but you may need to try to - # fetch a newer version (-6, -7, -8, -9, etc.) or you can stick - # wtih the older, stable, archived -10 versions below. - # - # TODO: would be nice if spack had a way to recommend avoiding a - # TODO: bleeding edge version, but not comment it out. - # ------------------------------------------------------------------------- - # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', - # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") - - #------------------------------------------------------------------------- - # *-10 versions are archived, so these versions should fetch reliably. - # ------------------------------------------------------------------------- - version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', - url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") - - depends_on('libtool') - depends_on('jpeg') - depends_on('libpng') - depends_on('freetype') - depends_on('fontconfig') - depends_on('libtiff') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/Mitos/package.py b/var/spack/packages/Mitos/package.py deleted file mode 100644 index e312da3ffc..0000000000 --- a/var/spack/packages/Mitos/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Mitos(Package): - """Mitos is a library and a tool for collecting sampled memory - performance data to view with MemAxes""" - - homepage = "https://github.com/scalability-llnl/Mitos" - url = "https://github.com/scalability-llnl/Mitos" - - version('0.9.1', 'c6cb57f3cae54f5157affd97ef7ef79e', git='https://github.com/scalability-llnl/Mitos.git', tag='v0.9.1') - - depends_on('dyninst@8.2.1:') - depends_on('hwloc') - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/R/package.py b/var/spack/packages/R/package.py deleted file mode 100644 index 2e6f65a742..0000000000 --- a/var/spack/packages/R/package.py +++ /dev/null @@ -1,33 +0,0 @@ -from spack import * - -class R(Package): - """R is 'GNU S', a freely available language and environment for - statistical computing and graphics which provides a wide va - riety of statistical and graphical techniques: linear and - nonlinear modelling, statistical tests, time series analysis, - classification, clustering, etc. Please consult the R project - homepage for further information.""" - homepage = "http://www.example.com" - url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" - - version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74') - - depends_on("readline") - depends_on("ncurses") - depends_on("icu") - depends_on("glib") - depends_on("zlib") - depends_on("libtiff") - depends_on("jpeg") - depends_on("cairo") - depends_on("pango") - depends_on("freetype") - depends_on("tcl") - depends_on("tk") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-R-shlib", - "--enable-BLAS-shlib") - make() - make("install") diff --git a/var/spack/packages/SAMRAI/no-tool-build.patch b/var/spack/packages/SAMRAI/no-tool-build.patch deleted file mode 100644 index 1adf0cf721..0000000000 --- a/var/spack/packages/SAMRAI/no-tool-build.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- SAMRAI/Makefile.in 2013-05-31 11:04:32.000000000 -0700 -+++ SAMRAI/Makefile.in.notools 2014-05-30 10:31:15.135979900 -0700 -@@ -8,7 +8,7 @@ - ## - ######################################################################### - --default: library tools -+default: library - - SAMRAI = @top_srcdir@ - SUBDIR = . -@@ -135,7 +135,7 @@ - done - $(MAKE) archive_remove_obj_names - --install: library tools -+install: library - $(INSTALL) -d -m 755 $(INSTDIR)/config - $(INSTALL) -d -m 755 $(INSTDIR)/lib - $(INSTALL) -d -m 755 $(INSTDIR)/bin diff --git a/var/spack/packages/SAMRAI/package.py b/var/spack/packages/SAMRAI/package.py deleted file mode 100644 index eef041f0d5..0000000000 --- a/var/spack/packages/SAMRAI/package.py +++ /dev/null @@ -1,53 +0,0 @@ -from spack import * - -class Samrai(Package): - """SAMRAI (Structured Adaptive Mesh Refinement Application Infrastructure) - is an object-oriented C++ software library enables exploration of numerical, - algorithmic, parallel computing, and software issues associated with applying - structured adaptive mesh refinement (SAMR) technology in large-scale parallel - application development. - """ - homepage = "https://computation.llnl.gov/project/SAMRAI/" - url = "https://computation.llnl.gov/project/SAMRAI/download/SAMRAI-v3.9.1.tar.gz" - list_url = homepage - - version('3.9.1', '232d04d0c995f5abf20d94350befd0b2') - version('3.7.3', '12d574eacadf8c9a70f1bb4cd1a69df6') - version('3.7.2', 'f6a716f171c9fdbf3cb12f71fa6e2737') - version('3.6.3-beta', 'ef0510bf2893042daedaca434e5ec6ce') - version('3.5.2-beta', 'd072d9d681eeb9ada15ce91bea784274') - version('3.5.0-beta', '1ad18a319fc573e12e2b1fbb6f6b0a19') - version('3.4.1-beta', '00814cbee2cb76bf8302aff56bbb385b') - version('3.3.3-beta', '1db3241d3e1cab913dc310d736c34388') - version('3.3.2-beta', 'e598a085dab979498fcb6c110c4dd26c') - version('2.4.4', '04fb048ed0efe7c531ac10c81cc5f6ac') - - depends_on("mpi") - depends_on("zlib") - depends_on("hdf5") - depends_on("boost") - - # don't build tools with gcc - patch('no-tool-build.patch', when='%gcc') - - # TODO: currently hard-coded to use openmpi - be careful! - def install(self, spec, prefix): - mpi = next(m for m in ('openmpi', 'mpich', 'mvapich') - if m in spec) - - configure( - "--prefix=%s" % prefix, - "--with-CXX=%s" % spec[mpi].prefix.bin + "/mpic++", - "--with-CC=%s" % spec[mpi].prefix.bin + "/mpicc", - "--with-hdf5=%s" % spec['hdf5'].prefix, - "--with-boost=%s" % spec['boost'].prefix, - "--with-zlib=%s" % spec['zlib'].prefix, - "--without-blas", - "--without-lapack", - "--with-hypre=no", - "--with-petsc=no", - "--enable-opt", - "--disable-debug") - - make() - make("install") diff --git a/var/spack/packages/_repo.yaml b/var/spack/packages/_repo.yaml deleted file mode 100644 index 4a371e1cad..0000000000 --- a/var/spack/packages/_repo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -repo: - namespace: gov.llnl.spack diff --git a/var/spack/packages/activeharmony/package.py b/var/spack/packages/activeharmony/package.py deleted file mode 100644 index 45dcc7c0e8..0000000000 --- a/var/spack/packages/activeharmony/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Activeharmony(Package): - """Active Harmony: a framework for auto-tuning (the automated search for values to improve the performance of a target application).""" - homepage = "http://www.dyninst.org/harmony" - url = "http://www.dyninst.org/sites/default/files/downloads/harmony/ah-4.5.tar.gz" - - version('4.5', 'caee5b864716d376e2c25d739251b2a9') - - def install(self, spec, prefix): - make("CFLAGS=-O3") - make("install", 'PREFIX=%s' % prefix) - -from spack import * - diff --git a/var/spack/packages/adept-utils/package.py b/var/spack/packages/adept-utils/package.py deleted file mode 100644 index e4a2e1523f..0000000000 --- a/var/spack/packages/adept-utils/package.py +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class AdeptUtils(Package): - """Utility libraries for LLNL performance tools.""" - - homepage = "https://github.com/scalability-llnl/adept-utils" - url = "https://github.com/scalability-llnl/adept-utils/archive/v1.0.tar.gz" - - version('1.0.1', '731a310717adcb004d9d195130efee7d') - version('1.0', '5c6cd9badce56c945ac8551e34804397') - - depends_on("boost") - depends_on("mpi") - - def install(self, spec, prefix): - cmake(*std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/apex/package.py b/var/spack/packages/apex/package.py deleted file mode 100644 index 6404d5208a..0000000000 --- a/var/spack/packages/apex/package.py +++ /dev/null @@ -1,34 +0,0 @@ -from spack import * -from spack.util.environment import * - -class Apex(Package): - homepage = "http://github.com/khuck/xpress-apex" - #url = "http://github.com/khuck/xpress-apex/archive/v0.1-release-candidate.tar.gz" - url = "http://github.com/khuck/xpress-apex" - - #version('0.1', '6e039c224387348296739f6bf360d081') - #version('master', branch='master', git='https://github.com/khuck/xpress-apex.git') - version('2015-10-21', git='https://github.com/khuck/xpress-apex.git', commit='d2e66ddde689120472fc57fc546d8cd80aab745c') - - depends_on("binutils+libiberty") - depends_on("boost@1.54:") - depends_on("cmake@2.8.12:") - depends_on("activeharmony@4.5:") - depends_on("ompt-openmp") - - def install(self, spec, prefix): - - path=get_path("PATH") - path.remove(spec["binutils"].prefix.bin) - path_set("PATH", path) - with working_dir("build", create=True): - cmake('-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DUSE_BFD=TRUE', - '-DBFD_ROOT=%s' % spec['binutils'].prefix, - '-DUSE_ACTIVEHARMONY=TRUE', - '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix, - '-DUSE_OMPT=TRUE', - '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix, - '..', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/arpack/package.py b/var/spack/packages/arpack/package.py deleted file mode 100644 index 8c67c536f3..0000000000 --- a/var/spack/packages/arpack/package.py +++ /dev/null @@ -1,41 +0,0 @@ -from spack import * -import os -import shutil - -class Arpack(Package): - """A collection of Fortran77 subroutines designed to solve large scale - eigenvalue problems. - """ - homepage = "http://www.caam.rice.edu/software/ARPACK/" - url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz" - - version('96', 'fffaa970198b285676f4156cebc8626e') - - depends_on('blas') - depends_on('lapack') - - def patch(self): - # Filter the cray makefile to make a spack one. - shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc') - makefile = FileFilter('ARmake.inc') - - # Be sure to use Spack F77 wrapper - makefile.filter('^FC.*', 'FC = f77') - makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g') - - # Set up some variables. - makefile.filter('^PLAT.*', 'PLAT = ') - makefile.filter('^home.*', 'home = %s' % os.getcwd()) - makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) - makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) - - # build the library in our own prefix. - makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd()) - - - def install(self, spec, prefix): - with working_dir('SRC'): - make('all') - - mkdirp(prefix.lib) - install('libarpack.a', prefix.lib) diff --git a/var/spack/packages/asciidoc/package.py b/var/spack/packages/asciidoc/package.py deleted file mode 100644 index 828f3b3f4f..0000000000 --- a/var/spack/packages/asciidoc/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Asciidoc(Package): - """ A presentable text document format for writing articles, UNIX man - pages and other small to medium sized documents.""" - homepage = "http://asciidoc.org" - url = "http://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz" - - version('8.6.9', 'c59018f105be8d022714b826b0be130a') - - depends_on('libxml2') - depends_on('libxslt') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/atk/package.py b/var/spack/packages/atk/package.py deleted file mode 100644 index 769805b227..0000000000 --- a/var/spack/packages/atk/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Atk(Package): - """ATK provides the set of accessibility interfaces that are - implemented by other toolkits and applications. Using the ATK - interfaces, accessibility tools have full access to view and - control running applications.""" - homepage = "https://developer.gnome.org/atk/" - url = "http://ftp.gnome.org/pub/gnome/sources/atk/2.14/atk-2.14.0.tar.xz" - - version('2.14.0', 'ecb7ca8469a5650581b1227d78051b8b') - - depends_on("glib") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/atlas/package.py b/var/spack/packages/atlas/package.py deleted file mode 100644 index fc683363a7..0000000000 --- a/var/spack/packages/atlas/package.py +++ /dev/null @@ -1,60 +0,0 @@ -from spack import * -from spack.util.executable import Executable -import os - -class Atlas(Package): - """ - Automatically Tuned Linear Algebra Software, generic shared - ATLAS is an approach for the automatic generation and optimization of - numerical software. Currently ATLAS supplies optimized versions for the - complete set of linear algebra kernels known as the Basic Linear Algebra - Subroutines (BLAS), and a subset of the linear algebra routines in the - LAPACK library. - """ - homepage = "http://math-atlas.sourceforge.net/" - - version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', - url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') - version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da', - url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2') - - # TODO: make this provide BLAS once it works better. Create a way - # TODO: to mark "beta" packages and require explicit invocation. - - # provides('blas') - - - def patch(self): - # Disable thraed check. LLNL's environment does not allow - # disabling of CPU throttling in a way that ATLAS actually - # understands. - filter_file(r'^\s+if \(thrchk\) exit\(1\);', 'if (0) exit(1);', - 'CONFIG/src/config.c') - # TODO: investigate a better way to add the check back in - # TODO: using, say, MSRs. Or move this to a variant. - - @when('@:3.10') - def install(self, spec, prefix): - with working_dir('ATLAS-Build', create=True): - configure = Executable('../configure') - configure('--prefix=%s' % prefix, '-C', 'ic', 'cc', '-C', 'if', 'f77', "--dylibs") - make() - make('check') - make('ptcheck') - make('time') - make("install") - - - def install(self, spec, prefix): - with working_dir('ATLAS-Build', create=True): - configure = Executable('../configure') - configure('--incdir=%s' % prefix.include, - '--libdir=%s' % prefix.lib, - '--cc=cc', - "--shared") - - make() - make('check') - make('ptcheck') - make('time') - make("install") diff --git a/var/spack/packages/autoconf/package.py b/var/spack/packages/autoconf/package.py deleted file mode 100644 index 5189faf054..0000000000 --- a/var/spack/packages/autoconf/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Autoconf(Package): - """Autoconf -- system configuration part of autotools""" - homepage = "https://www.gnu.org/software/autoconf/" - url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz" - - version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/automaded/package.py b/var/spack/packages/automaded/package.py deleted file mode 100644 index 9fbd93e3b3..0000000000 --- a/var/spack/packages/automaded/package.py +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Automaded(Package): - """AutomaDeD (Automata-based Debugging for Dissimilar parallel - tasks) is a tool for automatic diagnosis of performance and - correctness problems in MPI applications. It creates - control-flow models of each MPI process and, when a failure - occurs, these models are leveraged to find the origin of - problems automatically. MPI calls are intercepted (using - wrappers) to create the models. When an MPI application hangs, - AutomaDeD creates a progress-dependence graph that helps - finding the process (or group of processes) that caused the hang. - """ - - homepage = "https://github.com/scalability-llnl/AutomaDeD" - url = "https://github.com/scalability-llnl/AutomaDeD/archive/v1.0.tar.gz" - - version('1.0', '16a3d4def2c4c77d0bc4b21de8b3ab03') - - depends_on('mpi') - depends_on('boost') - depends_on('callpath') - - def install(self, spec, prefix): - cmake("-DSTATE_TRACKER_WITH_CALLPATH=ON", *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/automake/package.py b/var/spack/packages/automake/package.py deleted file mode 100644 index 9115822730..0000000000 --- a/var/spack/packages/automake/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Automake(Package): - """Automake -- make file builder part of autotools""" - homepage = "http://www.gnu.org/software/automake/" - url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz" - - version('1.14.1', 'd052a3e884631b9c7892f2efce542d75') - - depends_on('autoconf') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/bear/package.py b/var/spack/packages/bear/package.py deleted file mode 100644 index 0d4436fccc..0000000000 --- a/var/spack/packages/bear/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Bear(Package): - """Bear is a tool that generates a compilation database for clang tooling from non-cmake build systems.""" - homepage = "https://github.com/rizsotto/Bear" - url = "https://github.com/rizsotto/Bear/archive/2.0.4.tar.gz" - - version('2.0.4', 'fd8afb5e8e18f8737ba06f90bd77d011') - - depends_on("cmake") - depends_on("python") - - def install(self, spec, prefix): - cmake('.', *std_cmake_args) - - make("all") - make("install") diff --git a/var/spack/packages/bib2xhtml/package.py b/var/spack/packages/bib2xhtml/package.py deleted file mode 100644 index 7f8e0cfe5a..0000000000 --- a/var/spack/packages/bib2xhtml/package.py +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * -from glob import glob - -class Bib2xhtml(Package): - """bib2xhtml is a program that converts BibTeX files into HTML.""" - homepage = "http://www.spinellis.gr/sw/textproc/bib2xhtml/" - url='http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v3.0-15-gf506.tar.gz' - - 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') - mkdirp(bst_include) - for bstfile in glob('html-*bst'): - install(bstfile, bst_include) - - # Install the script and point it at the user's favorite perl - # and the bst include directory. - mkdirp(prefix.bin) - install('bib2xhtml', prefix.bin) - filter_file(r'#!/usr/bin/perl', - '#!/usr/bin/env BSTINPUTS=%s perl' % bst_include, - join_path(prefix.bin, 'bib2xhtml')) diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py deleted file mode 100644 index cac0a0407f..0000000000 --- a/var/spack/packages/binutils/package.py +++ /dev/null @@ -1,30 +0,0 @@ -from spack import * - -class Binutils(Package): - """GNU binutils, which contain the linker, assembler, objdump and others""" - homepage = "http://www.gnu.org/software/binutils/" - url = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" - - version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66') - version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b') - version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') - version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') - - variant('libiberty', default=False, description='Also install libiberty.') - - def install(self, spec, prefix): - configure_args = [ - '--prefix=%s' % prefix, - '--disable-dependency-tracking', - '--enable-interwork', - '--enable-multilib', - '--enable-shared', - '--enable-64-bit-bfd', - '--enable-targets=all'] - - if '+libiberty' in spec: - configure_args.append('--enable-install-libiberty') - - configure(*configure_args) - make() - make("install") diff --git a/var/spack/packages/bison/package.py b/var/spack/packages/bison/package.py deleted file mode 100644 index 7c526fb958..0000000000 --- a/var/spack/packages/bison/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Bison(Package): - """Bison is a general-purpose parser generator that converts - an annotated context-free grammar into a deterministic LR or - 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" - - version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py deleted file mode 100644 index 35824d53a2..0000000000 --- a/var/spack/packages/boost/package.py +++ /dev/null @@ -1,66 +0,0 @@ -from spack import * - -class Boost(Package): - """Boost provides free peer-reviewed portable C++ source - libraries, emphasizing libraries that work well with the C++ - Standard Library. - - Boost libraries are intended to be widely useful, and usable - across a broad spectrum of applications. The Boost license - encourages both commercial and non-commercial use. - """ - 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 - - version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87') - version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546') - version('1.57.0', '1be49befbdd9a5ce9def2983ba3e7b76') - version('1.56.0', 'a744cf167b05d72335f27c88115f211d') - version('1.55.0', 'd6eef4b4cacb2183f2bf265a5a03a354') - version('1.54.0', '15cb8c0803064faef0c4ddf5bc5ca279') - version('1.53.0', 'a00d22605d5dbcfb4c9936a9b35bc4c2') - version('1.52.0', '3a855e0f919107e0ca4de4d84ad3f750') - version('1.51.0', '4b6bd483b692fd138aef84ed2c8eb679') - version('1.50.0', '52dd00be775e689f55a987baebccc462') - version('1.49.0', '0d202cb811f934282dea64856a175698') - version('1.48.0', 'd1e9a7a7f532bb031a3c175d86688d95') - version('1.47.0', 'a2dc343f7bc7f83f8941e47ed4a18200') - version('1.46.1', '7375679575f4c8db605d426fc721d506') - version('1.46.0', '37b12f1702319b73876b0097982087e0') - version('1.45.0', 'd405c606354789d0426bc07bea617e58') - version('1.44.0', 'f02578f5218f217a9f20e9c30e119c6a') - version('1.43.0', 'dd49767bfb726b0c774f7db0cef91ed1') - version('1.42.0', '7bf3b4eb841b62ffb0ade2b82218ebe6') - version('1.41.0', '8bb65e133907db727a2a825c5400d0a6') - version('1.40.0', 'ec3875caeac8c52c7c129802a8483bd7') - version('1.39.0', 'a17281fd88c48e0d866e1a12deecbcc0') - version('1.38.0', '5eca2116d39d61382b8f8235915cb267') - version('1.37.0', '8d9f990bfb7e83769fa5f1d6f065bc92') - version('1.36.0', '328bfec66c312150e4c2a78dcecb504b') - version('1.35.0', 'dce952a7214e72d6597516bcac84048b') - version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') - version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') - - - 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) - - - def install(self, spec, prefix): - bootstrap = Executable('./bootstrap.sh') - bootstrap() - - # b2 used to be called bjam, before 1.47 (sigh) - b2name = './b2' if spec.satisfies('@1.47:') else './bjam' - - b2 = Executable(b2name) - b2('install', - '-j %s' % make_jobs, - '--prefix=%s' % prefix) diff --git a/var/spack/packages/bowtie2/bowtie2-2.5.patch b/var/spack/packages/bowtie2/bowtie2-2.5.patch deleted file mode 100644 index 290be39c73..0000000000 --- a/var/spack/packages/bowtie2/bowtie2-2.5.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- Makefile 2015-02-26 10:50:00.000000000 -0800 -+++ Makefile.new 2015-07-29 18:03:59.891357399 -0700 -@@ -22,10 +22,10 @@ - # - - INC = --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/packages/bowtie2/package.py b/var/spack/packages/bowtie2/package.py deleted file mode 100644 index 339aab6598..0000000000 --- a/var/spack/packages/bowtie2/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * -from glob import glob -class Bowtie2(Package): - """Description""" - homepage = "bowtie-bio.sourceforge.net/bowtie2/index.shtml" - version('2.2.5','51fa97a862d248d7ee660efc1147c75f', url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip") - - patch('bowtie2-2.5.patch',when='@2.2.5', level=0) - - def install(self, spec, prefix): - make() - mkdirp(prefix.bin) - for bow in glob("bowtie2*"): - install(bow, prefix.bin) - # install('bowtie2',prefix.bin) - # install('bowtie2-align-l',prefix.bin) - # install('bowtie2-align-s',prefix.bin) - # install('bowtie2-build',prefix.bin) - # install('bowtie2-build-l',prefix.bin) - # install('bowtie2-build-s',prefix.bin) - # install('bowtie2-inspect',prefix.bin) - # install('bowtie2-inspect-l',prefix.bin) - # install('bowtie2-inspect-s',prefix.bin) - diff --git a/var/spack/packages/boxlib/package.py b/var/spack/packages/boxlib/package.py deleted file mode 100644 index 4f1b71132f..0000000000 --- a/var/spack/packages/boxlib/package.py +++ /dev/null @@ -1,25 +0,0 @@ -from spack import * - -class Boxlib(Package): - """BoxLib, a software framework for massively parallel - block-structured adaptive mesh refinement (AMR) codes.""" - - homepage = "https://ccse.lbl.gov/BoxLib/" - url = "https://ccse.lbl.gov/pub/Downloads/BoxLib.git"; - - # TODO: figure out how best to version this. No tags in the repo! - version('master', git='https://ccse.lbl.gov/pub/Downloads/BoxLib.git') - - depends_on('mpi') - - def install(self, spec, prefix): - args = std_cmake_args - args += ['-DCCSE_ENABLE_MPI=1', - '-DCMAKE_C_COMPILER=%s' % which('mpicc'), - '-DCMAKE_CXX_COMPILER=%s' % which('mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % which('mpif90')] - - cmake('.', *args) - make() - make("install") - diff --git a/var/spack/packages/bzip2/package.py b/var/spack/packages/bzip2/package.py deleted file mode 100644 index d88336664d..0000000000 --- a/var/spack/packages/bzip2/package.py +++ /dev/null @@ -1,36 +0,0 @@ -from spack import * -from glob import glob - -class Bzip2(Package): - """bzip2 is a freely available, patent free high-quality data - compressor. It typically compresses files to within 10% to 15% - of the best available techniques (the PPM family of statistical - compressors), whilst being around twice as fast at compression - and six times faster at decompression.""" - homepage = "http://www.bzip.org" - url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" - - version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b') - - def install(self, spec, prefix): - # No configure system -- have to filter the makefile for this package. - filter_file(r'CC=gcc', 'CC=cc', 'Makefile', string=True) - - make('-f', 'Makefile-libbz2_so') - make('clean') - make("install", "PREFIX=%s" % prefix) - - bzip2_exe = join_path(prefix.bin, 'bzip2') - install('bzip2-shared', bzip2_exe) - for i, libfile in enumerate(glob('libbz2.so*')): - install(libfile, prefix.lib) - if i == 0: - symlink(join_path(prefix.lib, libfile), join_path(prefix.lib, 'libbz2.so')) - - bunzip2 = join_path(prefix.bin, 'bunzip2') - remove(bunzip2) - symlink(bzip2_exe, bunzip2) - - bzcat = join_path(prefix.bin, 'bzcat') - remove(bzcat) - symlink(bzip2_exe, bzcat) diff --git a/var/spack/packages/cairo/package.py b/var/spack/packages/cairo/package.py deleted file mode 100644 index e1ac8aaa7d..0000000000 --- a/var/spack/packages/cairo/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Cairo(Package): - """Cairo is a 2D graphics library with support for multiple output devices.""" - homepage = "http://cairographics.org" - url = "http://cairographics.org/releases/cairo-1.14.0.tar.xz" - - version('1.14.0', 'fc3a5edeba703f906f2241b394f0cced') - - depends_on("libpng") - depends_on("glib") - depends_on("pixman") - depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig. - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-tee") - make() - make("install") diff --git a/var/spack/packages/callpath/package.py b/var/spack/packages/callpath/package.py deleted file mode 100644 index f8a1eab9f7..0000000000 --- a/var/spack/packages/callpath/package.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Callpath(Package): - """Library for representing callpaths consistently in - distributed-memory performance tools.""" - - homepage = "https://github.com/scalability-llnl/callpath" - url = "https://github.com/scalability-llnl/callpath/archive/v1.0.1.tar.gz" - - version('1.0.2', 'b1994d5ee7c7db9d27586fc2dcf8f373') - version('1.0.1', '0047983d2a52c5c335f8ba7f5bab2325') - - depends_on("libelf") - depends_on("libdwarf") - depends_on("dyninst") - depends_on("adept-utils") - depends_on("mpi") - - def install(self, spec, prefix): - # TODO: offer options for the walker used. - cmake('.', "-DCALLPATH_WALKER=dyninst", *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/cblas/package.py b/var/spack/packages/cblas/package.py deleted file mode 100644 index 3cfe5ee588..0000000000 --- a/var/spack/packages/cblas/package.py +++ /dev/null @@ -1,35 +0,0 @@ -from spack import * -import os - -class Cblas(Package): - """The BLAS (Basic Linear Algebra Subprograms) are routines that - provide standard building blocks for performing basic vector and - matrix operations.""" - - homepage = "http://www.netlib.org/blas/_cblas/" - - # tarball has no version, but on the date below, this MD5 was correct. - version('2015-06-06', '1e8830f622d2112239a4a8a83b84209a', - url='http://www.netlib.org/blas/blast-forum/cblas.tgz') - - depends_on('blas') - parallel = False - - def patch(self): - mf = FileFilter('Makefile.in') - - mf.filter('^BLLIB =.*', 'BLLIB = %s/libblas.a' % self.spec['blas'].prefix.lib) - mf.filter('^CC =.*', 'CC = cc') - mf.filter('^FC =.*', 'FC = f90') - - - def install(self, spec, prefix): - make('all') - mkdirp(prefix.lib) - mkdirp(prefix.include) - - # Rename the generated lib file to libcblas.a - install('./lib/cblas_LINUX.a', '%s/libcblas.a' % prefix.lib) - install('./include/cblas.h','%s' % prefix.include) - install('./include/cblas_f77.h','%s' % prefix.include) - diff --git a/var/spack/packages/cgm/package.py b/var/spack/packages/cgm/package.py deleted file mode 100644 index 05d6395c5a..0000000000 --- a/var/spack/packages/cgm/package.py +++ /dev/null @@ -1,30 +0,0 @@ -from spack import * - -class Cgm(Package): - """The Common Geometry Module, Argonne (CGMA) is a code library - which provides geometry functionality used for mesh generation and - other applications.""" - homepage = "http://trac.mcs.anl.gov/projects/ITAPS/wiki/CGM" - url = "http://ftp.mcs.anl.gov/pub/fathom/cgm13.1.1.tar.gz" - - version('13.1.1', '4e8dbc4ba8f65767b29f985f7a23b01f') - version('13.1.0', 'a6c7b22660f164ce893fb974f9cb2028') - version('13.1' , '95f724bda04919fc76818a5b7bc0b4ed') - - depends_on("mpi") - - def patch(self): - filter_file('^(#include "CGMParallelConventions.h")', - '//\1', - 'geom/parallel/CGMReadParallel.cpp') - - - def install(self, spec, prefix): - configure("--with-mpi", - "--prefix=%s" % prefix, - "CFLAGS=-static", - "CXXFLAGS=-static", - "FCFLAGS=-static") - - make() - make("install") diff --git a/var/spack/packages/clang/package.py b/var/spack/packages/clang/package.py deleted file mode 100644 index 4f977bf9a4..0000000000 --- a/var/spack/packages/clang/package.py +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Clang(Package): - """The goal of the Clang project is to create a new C, C++, - Objective C and Objective C++ front-end for the LLVM compiler. - """ - homepage = 'http://clang.llvm.org' - url = 'http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz' - - depends_on('llvm@3.7.0', when='@3.7.0') - depends_on('llvm@3.6.2', when='@3.6.2') - depends_on('llvm@3.5.1', when='@3.5.1') - - version('3.7.0', '8f9d27335e7331cf0a4711e952f21f01', url='http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz') - version('3.6.2', 'ff862793682f714bb7862325b9c06e20', url='http://llvm.org/releases/3.6.2/cfe-3.6.2.src.tar.xz') - version('3.5.1', '93f9532f8f7e6f1d8e5c1116907051cb', url='http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz') - - def install(self, spec, prefix): - env['CXXFLAGS'] = self.compiler.cxx11_flag - - with working_dir('spack-build', create=True): - cmake('..', - '-DCLANG_PATH_TO_LLVM_BUILD=%s' % spec['llvm'].prefix, - '-DLLVM_MAIN_SRC_DIR=%s' % spec['llvm'].prefix, - *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/cloog/package.py b/var/spack/packages/cloog/package.py deleted file mode 100644 index 814a33c76c..0000000000 --- a/var/spack/packages/cloog/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * - -class Cloog(Package): - """CLooG is a free software and library to generate code for - scanning Z-polyhedra. That is, it finds a code (e.g. in C, - FORTRAN...) that reaches each integral point of one or more - parameterized polyhedra.""" - - homepage = "http://www.cloog.org" - url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.1.tar.gz" - list_url = "http://www.bastoul.net/cloog/pages/download" - - version('0.18.1', 'e34fca0540d840e5d0f6427e98c92252') - version('0.18.0', 'be78a47bd82523250eb3e91646db5b3d') - version('0.17.0', '0aa3302c81f65ca62c114e5264f8a802') - - depends_on("gmp") - depends_on("isl") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-osl=no", - "--with-isl=%s" % spec['isl'].prefix, - "--with-gmp=%s" % spec['gmp'].prefix) - make() - make("install") diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py deleted file mode 100644 index 9efa370c8b..0000000000 --- a/var/spack/packages/cmake/package.py +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Cmake(Package): - """A cross-platform, open-source build system. CMake is a family of - tools designed to build, test and package software.""" - homepage = 'https://www.cmake.org' - - version('2.8.10.2', '097278785da7182ec0aea8769d06860c', - url = 'http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz') - - version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f', - url = 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz') - -# version('3.0.1', 'e2e05d84cb44a42f1371d9995631dcf5') -# version('3.0.0', '21a1c85e1a3b803c4b48e7ff915a863e') - - def install(self, spec, prefix): - configure('--prefix=' + prefix, - '--parallel=' + str(make_jobs)) - make() - make('install') diff --git a/var/spack/packages/coreutils/package.py b/var/spack/packages/coreutils/package.py deleted file mode 100644 index 78c608d8eb..0000000000 --- a/var/spack/packages/coreutils/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Coreutils(Package): - """The GNU Core Utilities are the basic file, shell and text - manipulation utilities of the GNU operating system. These are - the core utilities which are expected to exist on every - operating system. - """ - homepage = "http://www.gnu.org/software/coreutils/" - url = "http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz" - - version('8.23', 'abed135279f87ad6762ce57ff6d89c41') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/cppcheck/package.py b/var/spack/packages/cppcheck/package.py deleted file mode 100644 index 8e98f457ee..0000000000 --- a/var/spack/packages/cppcheck/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Cppcheck(Package): - """A tool for static C/C++ code analysis.""" - homepage = "http://cppcheck.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/cppcheck/cppcheck/1.68/cppcheck-1.68.tar.bz2" - - version('1.68', 'c015195f5d61a542f350269030150708') - - def install(self, spec, prefix): - # cppcheck does not have a configure script - make() - # manually install the final cppcheck binary - mkdirp(prefix.bin) - install('cppcheck', prefix.bin) diff --git a/var/spack/packages/cram/package.py b/var/spack/packages/cram/package.py deleted file mode 100644 index 4b8ec56f25..0000000000 --- a/var/spack/packages/cram/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Cram(Package): - """Cram runs many small MPI jobs inside one large MPI job.""" - homepage = "https://github.com/scalability-llnl/cram" - url = "http://github.com/scalability-llnl/cram/archive/v1.0.1.tar.gz" - - version('1.0.1', 'c73711e945cf5dc603e44395f6647f5e') - - depends_on("mpi") - - def install(self, spec, prefix): - cmake(".", *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/cscope/package.py b/var/spack/packages/cscope/package.py deleted file mode 100644 index 9aac0f7304..0000000000 --- a/var/spack/packages/cscope/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Cscope(Package): - """Cscope is a developer's tool for browsing source code.""" - homepage = "http://http://cscope.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz" - - version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176') - - # Can be configured to use flex (not necessary) - # ./configure --with-flex - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py deleted file mode 100644 index d97cd25636..0000000000 --- a/var/spack/packages/cube/package.py +++ /dev/null @@ -1,55 +0,0 @@ -# FIXME: Add copyright statement -# -from spack import * -from contextlib import closing - -class Cube(Package): - """Cube the profile viewer for Score-P and Scalasca profiles. It - displays a multi-dimensional performance space consisting - of the dimensions (i) performance metric, (ii) call path, - and (iii) system resource.""" - - homepage = "http://www.scalasca.org/software/cube-4.x/download.html" - url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz" - - version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20') - - version('4.3TP1', 'a2090fbc7b2ba394bd5c09ba971e237f', - url = 'http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3-TP1.tar.gz') - - # Using CC as C++ compiler provides quirky workaround for a Score-P build system attempt - # to guess a matching C compiler when configuring scorep-score - backend_user_provided = """\ -CC=cc -CXX=CC -F77=f77 -FC=f90 -#CFLAGS=-fPIC -#CXXFLAGS=-fPIC -""" - frontend_user_provided = """\ -CC_FOR_BUILD=cc -CXX_FOR_BUILD=CC -F77_FOR_BUILD=f70 -FC_FOR_BUILD=f90 -""" - - def install(self, spec, prefix): - # Use a custom compiler configuration, otherwise the score-p - # build system messes with spack's compiler settings. - # Create these three files in the build directory - - with closing(open("vendor/common/build-config/platforms/platform-backend-user-provided", "w")) as backend_file: - backend_file.write(self.backend_user_provided) - with closing(open("vendor/common/build-config/platforms/platform-frontend-user-provided", "w")) as frontend_file: - frontend_file.write(self.frontend_user_provided) - - configure_args = ["--prefix=%s" % prefix, - "--with-custom-compilers", - "--without-paraver", - "--without-gui"] - - configure(*configure_args) - - make(parallel=False) - make("install", parallel=False) diff --git a/var/spack/packages/czmq/package.py b/var/spack/packages/czmq/package.py deleted file mode 100644 index a2f1947554..0000000000 --- a/var/spack/packages/czmq/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Czmq(Package): - """ A C interface to the ZMQ library """ - homepage = "http://czmq.zeromq.org" - url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz" - - version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz') - - depends_on('zeromq') - - def install(self, spec, prefix): - bash = which("bash") - bash("./autogen.sh") - configure("--prefix=%s" % prefix) - - make() - make("install") - diff --git a/var/spack/packages/dbus/package.py b/var/spack/packages/dbus/package.py deleted file mode 100644 index f7c302d611..0000000000 --- a/var/spack/packages/dbus/package.py +++ /dev/null @@ -1,31 +0,0 @@ -from spack import * - -class Dbus(Package): - """D-Bus is a message bus system, a simple way for applications to - talk to one another. D-Bus supplies both a system daemon (for - events such new hardware device printer queue ) and a - per-user-login-session daemon (for general IPC needs among user - applications). Also, the message bus is built on top of a - general one-to-one message passing framework, which can be used - by any two applications to communicate directly (without going - through the message bus daemon).""" - - homepage = "http://dbus.freedesktop.org/" - url = "http://dbus.freedesktop.org/releases/dbus/dbus-1.8.8.tar.gz" - - version('1.9.0', 'ec6895a4d5c0637b01f0d0e7689e2b36') - version('1.8.8', 'b9f4a18ee3faa1e07c04aa1d83239c43') - version('1.8.6', '6a08ba555d340e9dfe2d623b83c0eea8') - version('1.8.4', '4717cb8ab5b80978fcadf2b4f2f72e1b') - version('1.8.2', 'd6f709bbec0a022a1847c7caec9d6068') - - def install(self, spec, prefix): - configure( - "--prefix=%s" % prefix, - "--disable-systemd") - make() - make("install") - - # dbus needs a machine id generated after install - dbus_uuidgen = Executable(join_path(prefix.bin, 'dbus-uuidgen')) - dbus_uuidgen('--ensure') diff --git a/var/spack/packages/docbook-xml/package.py b/var/spack/packages/docbook-xml/package.py deleted file mode 100644 index fce1de7deb..0000000000 --- a/var/spack/packages/docbook-xml/package.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import glob -from spack import * - - -class DocbookXml(Package): - """Docbook DTD XML files.""" - homepage = "http://www.oasis-open.org/docbook" - url = "http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip" - - version('4.5', '03083e288e87a7e829e437358da7ef9e') - - def install(self, spec, prefix): - cp = which('cp') - - install_args = ['-a', '-t', prefix] - install_args.extend(glob.glob('*')) - - cp(*install_args) diff --git a/var/spack/packages/doxygen/package.py b/var/spack/packages/doxygen/package.py deleted file mode 100644 index 3d4a4e47a7..0000000000 --- a/var/spack/packages/doxygen/package.py +++ /dev/null @@ -1,25 +0,0 @@ -#------------------------------------------------------------------------------ -# Author: Justin Too -# Date: September 11, 2015 -#------------------------------------------------------------------------------ - -from spack import * - -class Doxygen(Package): - """Doxygen is the de facto standard tool for generating documentation - from annotated C++ sources, but it also supports other popular programming - languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, - Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.. - """ - homepage = "http://www.stack.nl/~dimitri/doxygen/" - url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz" - - version('1.8.10', '79767ccd986f12a0f949015efb5f058f') - - depends_on("cmake@2.8.12:") - - def install(self, spec, prefix): - cmake('.', *std_cmake_args) - - make() - make("install") diff --git a/var/spack/packages/dri2proto/package.py b/var/spack/packages/dri2proto/package.py deleted file mode 100644 index 11dfa568e2..0000000000 --- a/var/spack/packages/dri2proto/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Dri2proto(Package): - """DRI2 Protocol Headers.""" - homepage = "http://http://cgit.freedesktop.org/xorg/proto/dri2proto/" - url = "http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.8.tar.gz" - - version('2.8', '19ea18f63d8ae8053c9fa84b60365b77') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/dtcmp/package.py b/var/spack/packages/dtcmp/package.py deleted file mode 100644 index 9d940583c1..0000000000 --- a/var/spack/packages/dtcmp/package.py +++ /dev/null @@ -1,20 +0,0 @@ -import os -from spack import * - -class Dtcmp(Package): - """The Datatype Comparison Library provides comparison operations and - parallel sort algorithms for MPI applications.""" - - homepage = "https://github.com/hpc/dtcmp" - url = "https://github.com/hpc/dtcmp/releases/download/v1.0.3/dtcmp-1.0.3.tar.gz" - - version('1.0.3', 'cdd8ccf71e8ff67de2558594a7fcd317') - - depends_on('mpi') - depends_on('lwgrp') - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--with-lwgrp=" + spec['lwgrp'].prefix) - make() - make("install") diff --git a/var/spack/packages/dyninst/package.py b/var/spack/packages/dyninst/package.py deleted file mode 100644 index 41ec57dd2f..0000000000 --- a/var/spack/packages/dyninst/package.py +++ /dev/null @@ -1,68 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Dyninst(Package): - """API for dynamic binary instrumentation. Modify programs while they - are executing without recompiling, re-linking, or re-executing.""" - homepage = "https://paradyn.org" - url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" - list_url = "http://www.dyninst.org/downloads/dyninst-8.x" - - version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7', - url="http://www.paradyn.org/release8.2/DyninstAPI-8.2.1.tgz") - version('8.1.2', 'bf03b33375afa66fe0efa46ce3f4b17a', - url="http://www.paradyn.org/release8.1.2/DyninstAPI-8.1.2.tgz") - version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac', - url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz") - - depends_on("libelf") - depends_on("libdwarf") - depends_on("boost@1.42:") - - # new version uses cmake - def install(self, spec, prefix): - libelf = spec['libelf'].prefix - libdwarf = spec['libdwarf'].prefix - - with working_dir('spack-build', create=True): - cmake('..', - '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), - '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), - '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), - *std_cmake_args) - make() - make("install") - - - @when('@:8.1') - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/elfutils/package.py b/var/spack/packages/elfutils/package.py deleted file mode 100644 index 926d234584..0000000000 --- a/var/spack/packages/elfutils/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * - -class Elfutils(Package): - """elfutils is a collection of various binary tools such as - eu-objdump, eu-readelf, and other utilities that allow you to - inspect and manipulate ELF files. Refer to Table 5.Tools Included - in elfutils for Red Hat Developer for a complete list of binary - tools that are distributed with the Red Hat Developer Toolset - version of elfutils.""" - - homepage = "https://fedorahosted.org/elfutils/" - - version('0.163', - git='git://git.fedorahosted.org/git/elfutils.git', - tag='elfutils-0.163') - - provides('elf') - - def install(self, spec, prefix): - autoreconf = which('autoreconf') - autoreconf('-if') - - configure('--prefix=%s' % prefix, '--enable-maintainer-mode') - make() - make("install") - diff --git a/var/spack/packages/extrae/package.py b/var/spack/packages/extrae/package.py deleted file mode 100644 index 3ad4cbaf86..0000000000 --- a/var/spack/packages/extrae/package.py +++ /dev/null @@ -1,46 +0,0 @@ -from spack import * - -# typical working line with extrae 3.0.1 -# ./configure --prefix=/usr/local --with-mpi=/usr/lib64/mpi/gcc/openmpi --with-unwind=/usr/local --with-papi=/usr --with-dwarf=/usr --with-elf=/usr --with-dyninst=/usr --with-binutils=/usr --with-xml-prefix=/usr --enable-openmp --enable-nanos --enable-pthread --disable-parallel-merge LDFLAGS=-pthread - -class Extrae(Package): - """Extrae is the package devoted to generate tracefiles which can - be analyzed later by Paraver. Extrae is a tool that uses - different interposition mechanisms to inject probes into the - target application so as to gather information regarding the - application performance. The Extrae instrumentation package can - instrument the MPI programin model, and the following parallel - programming models either alone or in conjunction with MPI : - OpenMP, CUDA, OpenCL, pthread, OmpSs""" - homepage = "http://www.bsc.es/computer-sciences/extrae" - url = "http://www.bsc.es/ssl/apps/performanceTools/files/extrae-3.0.1.tar.bz2" - version('3.0.1', 'a6a8ca96cd877723cd8cc5df6bdb922b') - - depends_on("mpi") - depends_on("dyninst") - depends_on("libunwind") - depends_on("boost") - depends_on("libdwarf") - depends_on("papi") - - def install(self, spec, prefix): - if 'openmpi' in spec: - mpi = spec['openmpi'] - elif 'mpich' in spec: - mpi = spec['mpich'] - elif 'mvapich2' in spec: - mpi = spec['mvapich2'] - - configure("--prefix=%s" % prefix, - "--with-mpi=%s" % mpi.prefix, - "--with-unwind=%s" % spec['libunwind'].prefix, - "--with-dyninst=%s" % spec['dyninst'].prefix, - "--with-boost=%s" % spec['boost'].prefix, - "--with-dwarf=%s" % spec['libdwarf'].prefix, - "--with-papi=%s" % spec['papi'].prefix, - "--with-dyninst-headers=%s" % spec['dyninst'].prefix.include, - "--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib) - - make() - make("install", parallel=False) - diff --git a/var/spack/packages/exuberant-ctags/package.py b/var/spack/packages/exuberant-ctags/package.py deleted file mode 100644 index efd2b541b2..0000000000 --- a/var/spack/packages/exuberant-ctags/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class ExuberantCtags(Package): - """The canonical ctags generator""" - homepage = "ctags.sourceforge.net" - url = "http://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz" - - version('5.8', 'c00f82ecdcc357434731913e5b48630d') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/fish/package.py b/var/spack/packages/fish/package.py deleted file mode 100644 index 1225558705..0000000000 --- a/var/spack/packages/fish/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Fish(Package): - """fish is a smart and user-friendly command line shell for OS X, Linux, and - the rest of the family. - """ - - homepage = "http://fishshell.com/" - url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz" - list_url = homepage - - version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/flex/package.py b/var/spack/packages/flex/package.py deleted file mode 100644 index b065904912..0000000000 --- a/var/spack/packages/flex/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Flex(Package): - """Flex is a tool for generating scanners.""" - - homepage = "http://flex.sourceforge.net/" - url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" - - version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/flux/package.py b/var/spack/packages/flux/package.py deleted file mode 100644 index c128f46be8..0000000000 --- a/var/spack/packages/flux/package.py +++ /dev/null @@ -1,36 +0,0 @@ -from spack import * -import os - -class Flux(Package): - """ A next-generation resource manager (pre-alpha) """ - - homepage = "https://github.com/flux-framework/flux-core" - url = "https://github.com/flux-framework/flux-core" - - version('master', branch='master', git='https://github.com/flux-framework/flux-core') - - # Also needs autotools, but should use the system version if available - depends_on("zeromq@4.0.4:") - depends_on("czmq@2.2:") - depends_on("lua@5.1:5.1.99") - depends_on("munge") - depends_on("libjson-c") - depends_on("libxslt") - # TODO: This provides a catalog, hacked with environment below for now - depends_on("docbook-xml") - depends_on("asciidoc") - depends_on("python") - depends_on("py-cffi") - - def install(self, spec, prefix): - # Bootstrap with autotools - bash = which('bash') - bash('./autogen.sh') - - # Fix asciidoc dependency on xml style sheets and whatnot - os.environ['XML_CATALOG_FILES'] = os.path.join(spec['docbook-xml'].prefix, - 'catalog.xml') - # Configure, compile & install - configure("--prefix=" + prefix) - make("install", "V=1") - diff --git a/var/spack/packages/fontconfig/package.py b/var/spack/packages/fontconfig/package.py deleted file mode 100644 index 89b13604e8..0000000000 --- a/var/spack/packages/fontconfig/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Fontconfig(Package): - """Fontconfig customizing font access""" - homepage = "http://www.freedesktop.org/wiki/Software/fontconfig/" - url = "http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz" - - version('2.11.1' , 'e75e303b4f7756c2b16203a57ac87eba') - - depends_on('freetype') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/freetype/package.py b/var/spack/packages/freetype/package.py deleted file mode 100644 index 0309b858a1..0000000000 --- a/var/spack/packages/freetype/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Freetype(Package): - """Font package""" - homepage = "http://http://www.freetype.org" - url = "http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz" - - version('2.5.3' , 'cafe9f210e45360279c730d27bf071e9') - - depends_on('libpng') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/gasnet/package.py b/var/spack/packages/gasnet/package.py deleted file mode 100644 index 705961d1de..0000000000 --- a/var/spack/packages/gasnet/package.py +++ /dev/null @@ -1,35 +0,0 @@ -from spack import * - -class Gasnet(Package): - """GASNet is a language-independent, low-level networking layer - that provides network-independent, high-performance communication - primitives tailored for implementing parallel global address space - SPMD languages and libraries such as UPC, Co-Array Fortran, SHMEM, - Cray Chapel, and Titanium. - """ - homepage = "http://gasnet.lbl.gov" - url = "http://gasnet.lbl.gov/GASNet-1.24.0.tar.gz" - - version('1.24.0', 'c8afdf48381e8b5a7340bdb32ca0f41a') - - - def install(self, spec, prefix): - # TODO: don't use paths with @ in them. - change_sed_delimiter('@', ';', 'configure') - - configure("--prefix=%s" % prefix, - # TODO: factor IB suport out into architecture description. - "--enable-ibv", - "--enable-udp", - "--disable-mpi", - "--enable-par", - "--enable-mpi-compat", - "--enable-segment-fast", - "--disable-aligned-segments", - # TODO: make an option so that Legion can request builds with/without this. - # See the Legion webpage for details on when to/not to use. - "--disable-pshm", - "--with-segment-mmap-max=64MB") - - make() - make("install") diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py deleted file mode 100644 index a49a1348aa..0000000000 --- a/var/spack/packages/gcc/package.py +++ /dev/null @@ -1,122 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with 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 contextlib import closing -from glob import glob - -class Gcc(Package): - """The GNU Compiler Collection includes front ends for C, C++, - Objective-C, Fortran, and Java.""" - homepage = "https://gcc.gnu.org" - - url = "http://open-source-box.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2" - list_url = 'http://open-source-box.org/gcc/' - list_depth = 2 - - DEPENDS_ON_ISL_PREDICATE = '@5.0:' - - version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467') - version('4.9.3', '6f831b4d251872736e8e9cc09746f327') - version('4.9.2', '4df8ee253b7f3863ad0b86359cd39c43') - version('4.9.1', 'fddf71348546af523353bd43d34919c1') - version('4.8.5', '80d2c2982a3392bb0b89673ff136e223') - version('4.8.4', '5a84a30839b2aca22a2d723de2a626ec') - version('4.7.4', '4c696da46297de6ae77a82797d2abe28') - version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') - version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - - depends_on("mpfr") - depends_on("gmp") - depends_on("mpc") # when @4.5: - depends_on("binutils~libiberty") - - # Save these until we can do optional deps. - depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) - #depends_on("ppl") - #depends_on("cloog") - - def install(self, spec, prefix): - # libjava/configure needs a minor fix to install into spack paths. - filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) - - enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) - if spec.satisfies("@4.7.1:"): - enabled_languages.add('go') - - # Generic options to compile GCC - options = ["--prefix=%s" % prefix, - "--libdir=%s/lib64" % prefix, - "--disable-multilib", - "--enable-languages=" + ','.join(enabled_languages), - "--with-mpc=%s" % spec['mpc'].prefix, - "--with-mpfr=%s" % spec['mpfr'].prefix, - "--with-gmp=%s" % spec['gmp'].prefix, - "--enable-lto", - "--with-gnu-ld", - "--with-gnu-as", - "--with-quad"] - # Binutils - binutils_options = ["--with-stage1-ldflags=%s" % self.rpath_args, - "--with-boot-ldflags=%s" % self.rpath_args, - "--with-ld=%s/bin/ld" % spec['binutils'].prefix, - "--with-as=%s/bin/as" % spec['binutils'].prefix] - options.extend(binutils_options) - # Isl - if spec.satisfies(Gcc.DEPENDS_ON_ISL_PREDICATE): - isl_options = ["--with-isl=%s" % spec['isl'].prefix] - options.extend(isl_options) - - # Rest of install is straightforward. - configure(*options) - make() - make("install") - - self.write_rpath_specs() - - - @property - def spec_dir(self): - # e.g. lib64/gcc/x86_64-unknown-linux-gnu/4.9.2 - spec_dir = glob("%s/lib64/gcc/*/*" % self.prefix) - return spec_dir[0] if spec_dir else None - - - def write_rpath_specs(self): - """Generate a spec file so the linker adds a rpath to the libs - the compiler used to build the executable.""" - if not self.spec_dir: - tty.warn("Could not install specs for %s." % self.spec.format('$_$@')) - return - - gcc = Executable(join_path(self.prefix.bin, 'gcc')) - lines = gcc('-dumpspecs', return_output=True).strip().split("\n") - specs_file = join_path(self.spec_dir, 'specs') - with closing(open(specs_file, 'w')) as out: - for line in lines: - out.write(line + "\n") - if line.startswith("*link:"): - out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix)) - set_install_permissions(specs_file) diff --git a/var/spack/packages/gdk-pixbuf/package.py b/var/spack/packages/gdk-pixbuf/package.py deleted file mode 100644 index 14a5569984..0000000000 --- a/var/spack/packages/gdk-pixbuf/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class GdkPixbuf(Package): - """The Gdk Pixbuf is a toolkit for image loading and pixel buffer - manipulation. It is used by GTK+ 2 and GTK+ 3 to load and - manipulate images. In the past it was distributed as part of - 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" - - version('2.31.2', '6be6bbc4f356d4b79ab4226860ab8523') - - depends_on("glib") - depends_on("jpeg") - depends_on("libpng") - depends_on("libtiff") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/geos/package.py b/var/spack/packages/geos/package.py deleted file mode 100644 index 4a2657e32f..0000000000 --- a/var/spack/packages/geos/package.py +++ /dev/null @@ -1,31 +0,0 @@ -from spack import * - -class Geos(Package): - """GEOS (Geometry Engine - Open Source) is a C++ port of the Java - Topology Suite (JTS). As such, it aims to contain the complete - functionality of JTS in C++. This includes all the OpenGIS - Simple Features for SQL spatial predicate functions and spatial - operators, as well as specific JTS enhanced topology functions.""" - - homepage = "http://trac.osgeo.org/geos/" - url = "http://download.osgeo.org/geos/geos-3.4.2.tar.bz2" - - version('3.4.2', 'fc5df2d926eb7e67f988a43a92683bae') - version('3.4.1', '4c930dec44c45c49cd71f3e0931ded7e') - version('3.4.0', 'e41318fc76b5dc764a69d43ac6b18488') - version('3.3.9', '4794c20f07721d5011c93efc6ccb8e4e') - version('3.3.8', '75be476d0831a2d14958fed76ca266de') - version('3.3.7', '95ab996d22672b067d92c7dee2170460') - version('3.3.6', '6fadfb941541875f4976f75fb0bbc800') - version('3.3.5', '2ba61afb7fe2c5ddf642d82d7b16e75b') - version('3.3.4', '1bb9f14d57ef06ffa41cb1d67acb55a1') - version('3.3.3', '8454e653d7ecca475153cc88fd1daa26') - - extends('python') - depends_on('swig') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-python") - make() - make("install") diff --git a/var/spack/packages/gflags/package.py b/var/spack/packages/gflags/package.py deleted file mode 100644 index 62dd80a094..0000000000 --- a/var/spack/packages/gflags/package.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -from spack import * - -class Gflags(Package): - """The gflags package contains a C++ library that implements - commandline flags processing. It includes built-in support for - standard types such as string and the ability to define flags - in the source file in which they are used. Online documentation - available at: https://gflags.github.io/gflags/""" - - homepage = "https://gflags.github.io/gflags" - url = "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz" - - version('2.1.2', 'ac432de923f9de1e9780b5254884599f') - - def install(self, spec, prefix): - cmake("-DCMAKE_INSTALL_PREFIX=" + prefix, - "-DBUILD_SHARED_LIBS=ON") - make() - make("test") - make("install") diff --git a/var/spack/packages/ghostscript/package.py b/var/spack/packages/ghostscript/package.py deleted file mode 100644 index 0ab49d425f..0000000000 --- a/var/spack/packages/ghostscript/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Ghostscript(Package): - """an interpreter for the PostScript language and for PDF. """ - homepage = "http://ghostscript.com/" - url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz" - - version('9.16', '829319325bbdb83f5c81379a8f86f38f') - - parallel = False - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") - - make() - make("install") - diff --git a/var/spack/packages/git/package.py b/var/spack/packages/git/package.py deleted file mode 100644 index 0f1a3ba05b..0000000000 --- a/var/spack/packages/git/package.py +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class Git(Package): - """Git is a free and open source distributed version control - system designed to handle everything from small to very large - projects with speed and efficiency.""" - homepage = "http://git-scm.com" - url = "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.xz" - - version('2.2.1', '43e01f9d96ba8c11611e0eef0d9f9f28') - - # Use system openssl. - # depends_on("openssl") - - # Use system perl for now. - # depends_on("perl") - # depends_on("pcre") - - depends_on("zlib") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--without-pcre", - "--without-python") - - make() - make("install") diff --git a/var/spack/packages/glib/package.py b/var/spack/packages/glib/package.py deleted file mode 100644 index 178f0b9df5..0000000000 --- a/var/spack/packages/glib/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Glib(Package): - """The GLib package contains a low-level libraries useful for - providing data structure handling for C, portability wrappers - and interfaces for such runtime functionality as an event loop, - threads, dynamic loading and an object system.""" - homepage = "https://developer.gnome.org/glib/" - url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" - - version('2.42.1', '89c4119e50e767d3532158605ee9121a') - - depends_on("libffi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/glm/package.py b/var/spack/packages/glm/package.py deleted file mode 100644 index d00c301b4c..0000000000 --- a/var/spack/packages/glm/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - - -class Glm(Package): - """ - OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on - the OpenGL Shading Language (GLSL) specification. - """ - - homepage = "https://github.com/g-truc/glm" - url = "https://github.com/g-truc/glm/archive/0.9.7.1.tar.gz" - - version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8') - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/global/package.py b/var/spack/packages/global/package.py deleted file mode 100644 index a77b1bdc09..0000000000 --- a/var/spack/packages/global/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * -import os - - -class Global(Package): - """ The Gnu Global tagging system """ - # FIXME: add a proper url for your package's homepage here. - homepage = "http://www.gnu.org/software/global" - url = "http://tamacom.com/global/global-6.5.tar.gz" - - version('6.5', 'dfec818b4f53d91721e247cf7b218078') - - depends_on('exuberant-ctags') - - def install(self, spec, prefix): - config_args = ['--prefix={}'.format(prefix)] - - config_args.append('--with-exuberant-ctags={}'.format( - os.path.join(spec['exuberant-ctags'].prefix.bin, 'ctags'))) - - configure(*config_args) - - make() - make("install") diff --git a/var/spack/packages/glog/package.py b/var/spack/packages/glog/package.py deleted file mode 100644 index d73386b394..0000000000 --- a/var/spack/packages/glog/package.py +++ /dev/null @@ -1,15 +0,0 @@ -import os -from spack import * - -class Glog(Package): - """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" - - version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/gmp/package.py b/var/spack/packages/gmp/package.py deleted file mode 100644 index d6af821b34..0000000000 --- a/var/spack/packages/gmp/package.py +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Gmp(Package): - """GMP is a free library for arbitrary precision arithmetic, - operating on signed integers, rational numbers, and - floating-point numbers.""" - homepage = "https://gmplib.org" - url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2" - - version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470') - version('6.0.0' , '6ef5869ae735db9995619135bd856b84') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/gnutls/package.py b/var/spack/packages/gnutls/package.py deleted file mode 100644 index cf57a24a6d..0000000000 --- a/var/spack/packages/gnutls/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class Gnutls(Package): - """GnuTLS is a secure communications library implementing the SSL, - TLS and DTLS protocols and technologies around them. It - provides a simple C language application programming interface - (API) to access the secure communications protocols as well as - APIs to parse and write X.509, PKCS #12, OpenPGP and other - required structures. It is aimed to be portable and efficient - with focus on security and interoperability.""" - - homepage = "http://www.gnutls.org" - url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-3.3.9.tar.xz" - - version('3.3.9', 'ff61b77e39d09f1140ab5a9cf52c58b6') - - depends_on("nettle") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/gperf/package.py b/var/spack/packages/gperf/package.py deleted file mode 100644 index 32551b67b4..0000000000 --- a/var/spack/packages/gperf/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Gperf(Package): - """GNU gperf is a perfect hash function generator. For a given - list of strings, it produces a hash function and hash table, in - form of C or C++ code, for looking up a value depending on the - input string. The hash function is perfect, which means that the - hash table has no collisions, and the hash table lookup needs a - single string comparison only.""" - - homepage = "https://www.gnu.org/software/gperf/" - url = "http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz" - - version('3.0.4', 'c1f1db32fb6598d6a93e6e88796a8632') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/gperftools/package.py b/var/spack/packages/gperftools/package.py deleted file mode 100644 index 8900462324..0000000000 --- a/var/spack/packages/gperftools/package.py +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Gperftools(Package): - """Google's fast malloc/free implementation, especially for multi-threaded applications. - Contains tcmalloc, heap-checker, heap-profiler, and cpu-profiler.""" - homepage = "https://code.google.com/p/gperftools" - url = "https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz" - - version('2.3', 'f54dd119f0e46ac1f13264f8d97adf90', url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/graphlib/package.py b/var/spack/packages/graphlib/package.py deleted file mode 100644 index ddac0b2b66..0000000000 --- a/var/spack/packages/graphlib/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Graphlib(Package): - """Library to create, manipulate, and export graphs Graphlib.""" - homepage = "http://https://github.com/lee218llnl/graphlib" - url = "https://github.com/lee218llnl/graphlib/archive/v2.0.0.tar.gz" - - version('2.0.0', '43c6df84f1d38ba5a5dce0ae19371a70') - - def install(self, spec, prefix): - cmake(".", *std_cmake_args) - - make() - make("install") diff --git a/var/spack/packages/graphviz/package.py b/var/spack/packages/graphviz/package.py deleted file mode 100644 index 7af7da1881..0000000000 --- a/var/spack/packages/graphviz/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Graphviz(Package): - """Graph Visualization Software""" - homepage = "http://www.graphviz.org" - url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz" - - version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') - - parallel = False - - depends_on("swig") - depends_on("python") - depends_on("ghostscript") - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix) - - make() - make("install") - diff --git a/var/spack/packages/gtkplus/package.py b/var/spack/packages/gtkplus/package.py deleted file mode 100644 index 0ebc7100de..0000000000 --- a/var/spack/packages/gtkplus/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class Gtkplus(Package): - """The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications.""" - homepage = "http://www.gtk.org" - - version('2.24.25', '612350704dd3aacb95355a4981930c6f', - url="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.25.tar.xz") - - depends_on("atk") - depends_on("gdk-pixbuf") - depends_on("pango") - - def patch(self): - # remove disable deprecated flag. - filter_file(r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"', - '', 'configure', string=True) - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/harfbuzz/package.py b/var/spack/packages/harfbuzz/package.py deleted file mode 100644 index ed7c42a909..0000000000 --- a/var/spack/packages/harfbuzz/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Harfbuzz(Package): - """The Harfbuzz package contains an OpenType text shaping engine.""" - homepage = "http://www.freedesktop.org/wiki/Software/HarfBuzz/" - url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.37.tar.bz2" - - version('0.9.37', 'bfe733250e34629a188d82e3b971bc1e') - - depends_on("glib") - depends_on("icu") - depends_on("freetype") - - def patch(self): - change_sed_delimiter('@', ';', 'src/Makefile.in') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py deleted file mode 100644 index 15e0ef9338..0000000000 --- a/var/spack/packages/hdf5/package.py +++ /dev/null @@ -1,42 +0,0 @@ -from spack import * - -class Hdf5(Package): - """HDF5 is a data model, library, and file format for storing and managing - data. It supports an unlimited variety of datatypes, and is designed for - flexible and efficient I/O and for high volume and complex data. - """ - - homepage = "http://www.hdfgroup.org/HDF5/" - url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz" - list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" - list_depth = 3 - - version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') - version('1.8.13', 'c03426e9e77d7766944654280b467289') - - depends_on("mpi") - depends_on("zlib") - - # TODO: currently hard-coded to use OpenMPI - def install(self, spec, prefix): - - configure( - "--prefix=%s" % prefix, - "--with-zlib=%s" % spec['zlib'].prefix, - "--enable-parallel", - "--enable-shared", - "CC=%s" % spec['mpich'].prefix.bin + "/mpicc", - "CXX=%s" % spec['mpich'].prefix.bin + "/mpic++") - - make() - make("install") - - def url_for_version(self, version): - v = str(version) - - if version == Version("1.2.2"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" - elif version < Version("1.7"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" - else: - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" diff --git a/var/spack/packages/hwloc/package.py b/var/spack/packages/hwloc/package.py deleted file mode 100644 index 31a31f376a..0000000000 --- a/var/spack/packages/hwloc/package.py +++ /dev/null @@ -1,25 +0,0 @@ -from spack import * - -class Hwloc(Package): - """The Portable Hardware Locality (hwloc) software package - provides a portable abstraction (across OS, versions, - architectures, ...) of the hierarchical topology of modern - architectures, including NUMA memory nodes, sockets, shared - caches, cores and simultaneous multithreading. It also gathers - various system attributes such as cache and memory information - as well as the locality of I/O devices such as network - interfaces, InfiniBand HCAs or GPUs. It primarily aims at - helping applications with gathering information about modern - computing hardware so as to exploit it accordingly and - efficiently.""" - homepage = "http://www.open-mpi.org/projects/hwloc/" - url = "http://www.open-mpi.org/software/hwloc/v1.9/downloads/hwloc-1.9.tar.gz" - - version('1.9', '1f9f9155682fe8946a97c08896109508') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") - diff --git a/var/spack/packages/hypre/package.py b/var/spack/packages/hypre/package.py deleted file mode 100644 index 198b3f00dc..0000000000 --- a/var/spack/packages/hypre/package.py +++ /dev/null @@ -1,32 +0,0 @@ -from spack import * - -class Hypre(Package): - """Hypre is a library of high performance preconditioners that - features parallel multigrid methods for both structured and - unstructured grid problems.""" - - homepage = "https://computation.llnl.gov/project/linear_solvers/software.php" - url = "https://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz" - - version('2.10.0b', '768be38793a35bb5d055905b271f5b8e') - - depends_on("mpi") - depends_on("blas") - depends_on("lapack") - - def install(self, spec, prefix): - blas_dir = spec['blas'].prefix - lapack_dir = spec['lapack'].prefix - - # Hypre's source is staged under ./src so we'll have to manually - # cd into it. - with working_dir("src"): - configure( - "--prefix=%s" % prefix, - "--with-blas-libs=blas", - "--with-blas-lib-dirs=%s/lib" % blas_dir, - "--with-lapack-libs=\"lapack blas\"", - "--with-lapack-lib-dirs=%s/lib" % lapack_dir, - "--with-MPI") - make() - make("install") diff --git a/var/spack/packages/icu/package.py b/var/spack/packages/icu/package.py deleted file mode 100644 index f256ec5712..0000000000 --- a/var/spack/packages/icu/package.py +++ /dev/null @@ -1,25 +0,0 @@ -from spack import * - -class Icu(Package): - """The International Components for Unicode (ICU) package is a - mature, widely used set of C/C++ libraries providing Unicode and - Globalization support for software applications. ICU is widely - portable and gives applications the same results on all - platforms.""" - # FIXME: add a proper url for your package's homepage here. - homepage = "http://www.example.com" - url = "http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz" - - version('54.1', 'e844caed8f2ca24c088505b0d6271bc0') - - - def url_for_version(self, version): - return "http://download.icu-project.org/files/icu4c/%s/icu4c-%s-src.tgz" % ( - version, str(version).replace('.', '_')) - - - def install(self, spec, prefix): - with working_dir("source"): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/icu4c/package.py b/var/spack/packages/icu4c/package.py deleted file mode 100644 index 55b44463b2..0000000000 --- a/var/spack/packages/icu4c/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Icu4c(Package): - """ICU is a mature, widely used set of C/C++ and Java libraries - providing Unicode and Globalization support for software applications.""" - - homepage = "http://site.icu-project.org/" - url = "http://downloads.sourceforge.net/project/icu/ICU4C/54.1/icu4c-54_1-src.tgz" - - version('54_1', 'e844caed8f2ca24c088505b0d6271bc0') - - def install(self, spec, prefix): - cd("source") - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/isl/package.py b/var/spack/packages/isl/package.py deleted file mode 100644 index 836ef3ea40..0000000000 --- a/var/spack/packages/isl/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Isl(Package): - """isl is a thread-safe C library for manipulating sets and - relations of integer points bounded by affine constraints.""" - homepage = "http://isl.gforge.inria.fr" - url = "http://isl.gforge.inria.fr/isl-0.14.tar.bz2" - - version('0.14', 'acd347243fca5609e3df37dba47fd0bb') - - depends_on("gmp") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-gmp-prefix=%s" % spec['gmp'].prefix) - make() - make("install") diff --git a/var/spack/packages/jdk/package.py b/var/spack/packages/jdk/package.py deleted file mode 100644 index 8f8076dd14..0000000000 --- a/var/spack/packages/jdk/package.py +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# Author: Justin Too -#------------------------------------------------------------------------------ -import distutils -from distutils import dir_util -from subprocess import call - -import spack -from spack import * -import llnl.util.tty as tty - -class Jdk(Package): - """The Java Development Kit (JDK) released by Oracle Corporation - in the form of a binary product aimed at Java developers.""" - homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html" - - version('8u25-linux-x64', 'e145c03a7edc845215092786bcfba77e', - url="http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz") - - # Oracle requires that you accept their License Agreement in order - # to access the Java packages in download.oracle.com. In order to - # automate this process, we need to utilize these additional curl - # commandline options. - # - # See http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux - curl_options=[ - '-j', # junk cookies - '-H', # specify required License Agreement cookie - 'Cookie: oraclelicense=accept-securebackup-cookie'] - - def do_fetch(self): - # Add our custom curl commandline options - tty.msg( - "[Jdk] Adding required commandline options to curl " + - "before performing fetch: %s" % - (self.curl_options)) - - for option in self.curl_options: - spack.curl.add_default_arg(option) - - # Now perform the actual fetch - super(Jdk, self).do_fetch() - - - def install(self, spec, prefix): - distutils.dir_util.copy_tree(".", prefix) diff --git a/var/spack/packages/jpeg/package.py b/var/spack/packages/jpeg/package.py deleted file mode 100644 index 87820467db..0000000000 --- a/var/spack/packages/jpeg/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Jpeg(Package): - """jpeg library""" - homepage = "http://www.ijg.org" - url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz" - - version('9a', '3353992aecaee1805ef4109aadd433e7') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/launchmon/package.py b/var/spack/packages/launchmon/package.py deleted file mode 100644 index 6fbe6a68d0..0000000000 --- a/var/spack/packages/launchmon/package.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Launchmon(Package): - """Software infrastructure that enables HPC run-time tools to - co-locate tool daemons with a parallel job.""" - homepage = "http://sourceforge.net/projects/launchmon" - url = "http://downloads.sourceforge.net/project/launchmon/launchmon/1.0.1%20release/launchmon-1.0.1.tar.gz" - - version('1.0.1', '2f12465803409fd07f91174a4389eb2b') - version('1.0.1-2', git='https://github.com/scalability-llnl/launchmon.git', commit='ff7e22424b8f375318951eb1c9282fcbbfa8aadf') - - depends_on('autoconf') - depends_on('automake') - depends_on('libtool') - - def install(self, spec, prefix): - configure( - "--prefix=" + prefix, - "--with-bootfabric=cobo", - "--with-rm=slurm") - - make() - make("install") diff --git a/var/spack/packages/launchmon/patch.lmon_install_dir b/var/spack/packages/launchmon/patch.lmon_install_dir deleted file mode 100644 index 8a1d93fdc9..0000000000 --- a/var/spack/packages/launchmon/patch.lmon_install_dir +++ /dev/null @@ -1,147 +0,0 @@ -Index: launchmon/src/linux/lmon_api/Makefile.am -=================================================================== ---- launchmon/src/linux/lmon_api/Makefile.am (revision 481) -+++ launchmon/src/linux/lmon_api/Makefile.am (working copy) -@@ -80,13 +80,10 @@ - libmonfeapi_la_CFLAGS = $(AM_CFLAGS) - libmonfeapi_la_CXXFLAGS = $(AM_CXXFLAGS) - --libmonfeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ -- -L$(top_srcdir)/@GCRYPTLOC@ \ -- -L$(top_srcdir)/@GPGERRLOC@ \ -- $(AM_LDFLAGS) \ -- -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ -+libmonfeapi_la_LDFLAGS = $(AM_LDFLAGS) \ -+ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ - --libmonfeapi_la_LIBADD = @LIBPTHREAD@ @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ @LIBRT@ -+libmonfeapi_la_LIBADD = @LIBPTHREAD@ $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ @LIBRT@ - - libmonbeapi_la_SOURCES = lmon_be.cxx \ - lmon_daemon_internal.cxx \ -@@ -113,13 +110,10 @@ - libmonbeapi_la_CFLAGS = $(AM_CFLAGS) - libmonbeapi_la_CXXFLAGS = $(AM_CXXFLAGS) - --libmonbeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ -- -L$(top_srcdir)/@GCRYPTLOC@ \ -- -L$(top_srcdir)/@GPGERRLOC@ \ -- $(AM_LDFLAGS) \ -+libmonbeapi_la_LDFLAGS = $(AM_LDFLAGS) \ - -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ - --libmonbeapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ -+libmonbeapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ - - - # -@@ -146,10 +140,8 @@ - - libmonmwapi_la_CXXFLAGS = $(AM_CXXFLAGS) - --libmonmwapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ -- -L$(top_srcdir)/@GCRYPTLOC@ \ -- -L$(top_srcdir)/@GPGERRLOC@ \ -- $(AM_LDFLAGS) \ -+libmonmwapi_la_LDFLAGS = $(AM_LDFLAGS) \ - -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ - --libmonmwapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ -+ -+libmonmwapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ -Index: tools/cobo/test/Makefile.am -=================================================================== ---- tools/cobo/test/Makefile.am (revision 481) -+++ tools/cobo/test/Makefile.am (working copy) -@@ -37,12 +37,12 @@ - - client_SOURCES = client.c - --client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+client_LDFLAGS = - --client_LDADD = @LIBCOMM@ -+client_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ - - server_rsh_SOURCES = server_rsh.c - --server_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+server_rsh_LDFLAGS = - --server_rsh_LDADD = @LIBCOMM@ -+server_rsh_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ -Index: tools/pmgr_collective/test/Makefile.am -=================================================================== ---- tools/pmgr_collective/test/Makefile.am (revision 481) -+++ tools/pmgr_collective/test/Makefile.am (working copy) -@@ -31,18 +31,18 @@ - ## Jun 10 2008 DHA: Copied from the old Makefile. - ## - --INCLUDES = -I$(top_srcdir)/@COMMLOC@ -+INCLUDES = - - noinst_PROGRAMS = client mpirun_rsh - - client_SOURCES = client.c - --client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+client_LDFLAGS = - --client_LDADD = @LIBCOMM@ -+client_LDADD = @COMMLOC@/@LIBCOMM@ - - mpirun_rsh_SOURCES = mpirun_rsh.c - --mpirun_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ -+mpirun_rsh_LDFLAGS = - --mpirun_rsh_LDADD = @LIBCOMM@ -+mpirun_rsh_LDADD = @COMMLOC@/@LIBCOMM@ -Index: config/x_ac_bootfabric.m4 -=================================================================== ---- config/x_ac_bootfabric.m4 (revision 481) -+++ config/x_ac_bootfabric.m4 (working copy) -@@ -63,7 +63,7 @@ - #AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) - #AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) - #AC_SUBST(COMMLOC, tools/pmgr_collective/src) -- #AC_SUBST(LIBCOMM, -lpmgr_collective) -+ #AC_SUBST(LIBCOMM, libcobo.la) - #else - commfab_found="no" - AC_MSG_ERROR([--with-bootfabric=pmgr is given, but pmgr_collective has been deprecated]) -@@ -87,7 +87,7 @@ - AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) - AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) - AC_SUBST(COMMLOC, tools/cobo/src) -- AC_SUBST(LIBCOMM, -lcobo) -+ AC_SUBST(LIBCOMM, libcobo.la) - - if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then - AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) -@@ -117,7 +117,7 @@ - AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) - AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) - AC_SUBST(COMMLOC, tools/cobo/src) -- AC_SUBST(LIBCOMM, -lcobo) -+ AC_SUBST(LIBCOMM, libcobo.la) - - if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then - AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) -Index: config/x_ac_gcrpyt.m4 -=================================================================== ---- config/x_ac_gcrypt.m4 2011-10-22 00:50:38.000000000 -0700 -+++ config/x_ac_gcrypt.patched.m4 2014-03-14 11:33:59.189220000 -0700 -@@ -55,8 +55,8 @@ - AC_CONFIG_SUBDIRS([tools/libgpg-error]) - AC_SUBST(GPGERRLOC, [tools/libgpg-error/src]) - AC_SUBST(GCRYPTLOC, [tools/libgcrypt/src]) -- AC_SUBST(LIBGCRYPT, [-lgcrypt]) -- AC_SUBST(LIBGPGERR, [-lgpg-error]) -+ AC_SUBST(LIBGCRYPT, [libgcrypt.la]) -+ AC_SUBST(LIBGPGERR, [libgpg-error.la]) - gcrypt_configured="yes" - else - AC_MSG_ERROR([tools/libgpg-error or tools/libgcrypt not found]) - diff --git a/var/spack/packages/lcms/package.py b/var/spack/packages/lcms/package.py deleted file mode 100644 index a53c2f997a..0000000000 --- a/var/spack/packages/lcms/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Lcms(Package): - """Little cms is a color management library. Implements fast - transforms between ICC profiles. It is focused on speed, and is - portable across several platforms (MIT license).""" - homepage = "http://www.littlecms.com" - url = "http://downloads.sourceforge.net/project/lcms/lcms/2.6/lcms2-2.6.tar.gz" - - version('2.6', 'f4c08d38ceade4a664ebff7228910a33') - - depends_on("jpeg") - depends_on("libtiff") - depends_on("zlib") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/leveldb/package.py b/var/spack/packages/leveldb/package.py deleted file mode 100644 index da68a9cbcb..0000000000 --- a/var/spack/packages/leveldb/package.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -import glob -from spack import * - -class Leveldb(Package): - """LevelDB is a fast key-value storage library written at Google - that provides an ordered mapping from string keys to string values.""" - - homepage = "https://github.com/google/leveldb" - url = "https://github.com/google/leveldb/archive/v1.18.tar.gz" - - version('1.18', '73770de34a2a5ab34498d2e05b2b7fa0') - - depends_on("snappy") - - def install(self, spec, prefix): - make() - - mkdirp(prefix.include) - mkdirp(prefix.lib) - - cp = which('cp') - - # cp --preserve=links libleveldb.* prefix/lib - args = glob.glob('libleveldb.*') - args.append(prefix + '/lib') - cp('--preserve=links', *args) - - cp('-r', 'include/leveldb', prefix + '/include') diff --git a/var/spack/packages/libNBC/package.py b/var/spack/packages/libNBC/package.py deleted file mode 100644 index 6d08f3219c..0000000000 --- a/var/spack/packages/libNBC/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libnbc(Package): - """LibNBC is a prototypic implementation of a nonblocking - interface for MPI collective operations. Based on ANSI C and - MPI-1, it supports all MPI-1 collective operations in a - nonblocking manner. LibNBC is distributed under the BSD license. - """ - homepage = "http://unixer.de/research/nbcoll/libnbc/" - url = "http://unixer.de/research/nbcoll/libnbc/libNBC-1.1.1.tar.gz" - - version('1.1.1', 'ece5c94992591a9fa934a90e5dbe50ce') - - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libarchive/package.py b/var/spack/packages/libarchive/package.py deleted file mode 100644 index cbd4b89cd0..0000000000 --- a/var/spack/packages/libarchive/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Libarchive(Package): - """libarchive: C library and command-line tools for reading and - writing tar, cpio, zip, ISO, and other archive formats.""" - homepage = "http://www.libarchive.org" - url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz" - - version('3.1.2', 'efad5a503f66329bb9d2f4308b5de98a') - version('3.1.1', '1f3d883daf7161a0065e42a15bbf168f') - version('3.1.0', '095a287bb1fd687ab50c85955692bf3a') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libcircle/package.py b/var/spack/packages/libcircle/package.py deleted file mode 100644 index 3f7c996fb0..0000000000 --- a/var/spack/packages/libcircle/package.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -from spack import * - -class Libcircle(Package): - """libcircle provides an efficient distributed queue on a cluster, - using self-stabilizing work stealing.""" - - homepage = "https://github.com/hpc/libcircle" - - version('0.2.1-rc.1', '2b1369a5736457239f908abf88143ec2', - url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz') - - depends_on('mpi') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/libdrm/package.py b/var/spack/packages/libdrm/package.py deleted file mode 100644 index 00736b7811..0000000000 --- a/var/spack/packages/libdrm/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Libdrm(Package): - """A userspace library for accessing the DRM, direct - rendering manager, on Linux, BSD and other operating - systems that support the ioctl interface.""" - - homepage = "http://dri.freedesktop.org/libdrm/" # no real website... - url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz" - - version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') - version('2.4.33', '86e4e3debe7087d5404461e0032231c8') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libdwarf/package.py b/var/spack/packages/libdwarf/package.py deleted file mode 100644 index 099a974e93..0000000000 --- a/var/spack/packages/libdwarf/package.py +++ /dev/null @@ -1,81 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with 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 - -# Only build certain parts of dwarf because the other ones break. -dwarf_dirs = ['libdwarf', 'dwarfdump2'] - -class Libdwarf(Package): - """The DWARF Debugging Information Format is of interest to - programmers working on compilers and debuggers (and any one - interested in reading or writing DWARF information). It was - developed by a committee (known as the PLSIG at the time) - starting around 1991. Starting around 1991 SGI developed the - libdwarf and dwarfdump tools for internal use and as part of - SGI IRIX developer tools. Since that time dwarfdump and - libdwarf have been shipped (as an executable and archive - respectively, not source) with every release of the SGI - MIPS/IRIX C compiler.""" - - homepage = "http://www.prevanders.net/dwarf.html" - url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" - list_url = homepage - - version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d') - version('20130207', '64b42692e947d5180e162e46c689dfbf') - version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db') - - depends_on("libelf") - - parallel = False - - - def install(self, spec, prefix): - # dwarf build does not set arguments for ar properly - make.add_default_arg('ARFLAGS=rcs') - - # Dwarf doesn't provide an install, so we have to do it. - mkdirp(prefix.bin, prefix.include, prefix.lib, prefix.man1) - - with working_dir('libdwarf'): - configure("--prefix=" + prefix, "--enable-shared") - make() - - install('libdwarf.a', prefix.lib) - install('libdwarf.so', prefix.lib) - install('libdwarf.h', prefix.include) - install('dwarf.h', prefix.include) - - with working_dir('dwarfdump2'): - configure("--prefix=" + prefix) - - # This makefile has strings of copy commands that - # cause a race in parallel - make(parallel=False) - - install('dwarfdump', prefix.bin) - install('dwarfdump.conf', prefix.lib) - install('dwarfdump.1', prefix.man1) diff --git a/var/spack/packages/libelf/package.py b/var/spack/packages/libelf/package.py deleted file mode 100644 index 9338b8f393..0000000000 --- a/var/spack/packages/libelf/package.py +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libelf(Package): - """libelf lets you read, modify or create ELF object files in an - architecture-independent way. The library takes care of size - and endian issues, e.g. you can process a file for SPARC - processors on an Intel-based system.""" - - homepage = "http://www.mr511.de/software/english.html" - url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" - - version('0.8.13', '4136d7b4c04df68b686570afa26988ac') - version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') - - provides('elf') - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--enable-shared", - "--disable-dependency-tracking", - "--disable-debug") - make() - - # The mkdir commands in libelf's install can fail in parallel - make("install", parallel=False) diff --git a/var/spack/packages/libevent/package.py b/var/spack/packages/libevent/package.py deleted file mode 100644 index 11b1083d67..0000000000 --- a/var/spack/packages/libevent/package.py +++ /dev/null @@ -1,30 +0,0 @@ -from spack import * - -class Libevent(Package): - """The libevent API provides a mechanism to execute a callback function - when a specific event occurs on a file descriptor or after a timeout has been - reached. Furthermore, libevent also support callbacks due to signals or regular - timeouts. - """ - - homepage = "http://libevent.org" - url = "https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" - list_url = "http://libevent.org/old-releases.html" - - version('2.0.21', 'b2405cc9ebf264aa47ff615d9de527a2') - version('2.0.20', '94270cdee32c0cd0aa9f4ee6ede27e8e') - version('2.0.19', '91111579769f46055b0a438f5cc59572') - version('2.0.18', 'aa1ce9bc0dee7b8084f6855765f2c86a') - version('2.0.17', 'dad64aaaaff16b5fbec25160c06fee9a') - version('2.0.16', '899efcffccdb3d5111419df76e7dc8df') - version('2.0.15', '2643abe7ba242df15c08b2cc14ec8759') - version('2.0.14', 'cac0f379da35d3b98f83ac16fcfe1df4') - version('2.0.13', 'af786b4b3f790c9d3279792edf7867fc') - version('2.0.12', '42986228baf95e325778ed328a93e070') - - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libffi/package.py b/var/spack/packages/libffi/package.py deleted file mode 100644 index acec031717..0000000000 --- a/var/spack/packages/libffi/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Libffi(Package): - """The libffi library provides a portable, high level programming - interface to various calling conventions. This allows a programmer - to call any function specified by a call interface description at - run time.""" - homepage = "https://sourceware.org/libffi/" - - version('3.2.1','83b89587607e3eb65c70d361f13bab43',url = "ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") - #version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug $(lib64) instead of ${lib64} in libffi.pc - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") - diff --git a/var/spack/packages/libgcrypt/package.py b/var/spack/packages/libgcrypt/package.py deleted file mode 100644 index 1d0a57f317..0000000000 --- a/var/spack/packages/libgcrypt/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Libgcrypt(Package): - """Libgcrypt is a general purpose cryptographic library based on - the code from GnuPG. It provides functions for all cryptographic - building blocks: symmetric ciphers, hash algorithms, MACs, public - key algorithms, large integer functions, random numbers and a lot - of supporting functions. """ - homepage = "http://www.gnu.org/software/libgcrypt/" - url = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.2.tar.bz2" - - version('1.6.2', 'b54395a93cb1e57619943c082da09d5f') - - depends_on("libgpg-error") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libgpg-error/package.py b/var/spack/packages/libgpg-error/package.py deleted file mode 100644 index 6c1d1a10a7..0000000000 --- a/var/spack/packages/libgpg-error/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class LibgpgError(Package): - """Libgpg-error is a small library that defines common error - values for all GnuPG components. Among these are GPG, GPGSM, - GPGME, GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, - SmartCard Daemon and possibly more in the future. """ - - homepage = "https://www.gnupg.org/related_software/libgpg-error" - url = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.18.tar.bz2" - - version('1.18', '12312802d2065774b787cbfc22cc04e9') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libjpeg-turbo/package.py b/var/spack/packages/libjpeg-turbo/package.py deleted file mode 100644 index 07ee183947..0000000000 --- a/var/spack/packages/libjpeg-turbo/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class LibjpegTurbo(Package): - """libjpeg-turbo is a fork of the original IJG libjpeg which uses - SIMD to accelerate baseline JPEG compression and - decompression. libjpeg is a library that implements JPEG image - encoding, decoding and transcoding.""" - homepage = "http://libjpeg-turbo.virtualgl.org" - url = "http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.3.1.tar.gz" - - version('1.3.1', '2c3a68129dac443a72815ff5bb374b05') - - # Can use either of these. - depends_on("yasm") - depends_on("nasm") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libjson-c/package.py b/var/spack/packages/libjson-c/package.py deleted file mode 100644 index c0801cce9c..0000000000 --- a/var/spack/packages/libjson-c/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class LibjsonC(Package): - """ A JSON implementation in C """ - homepage = "https://github.com/json-c/json-c/wiki" - url = "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.11.tar.gz" - - version('0.11', 'aa02367d2f7a830bf1e3376f77881e98') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/libmng/package.py b/var/spack/packages/libmng/package.py deleted file mode 100644 index e5336ea2c2..0000000000 --- a/var/spack/packages/libmng/package.py +++ /dev/null @@ -1,23 +0,0 @@ -from spack import * - -class Libmng(Package): - """libmng -THE reference library for reading, displaying, writing - and examining Multiple-Image Network Graphics. MNG is the animation - extension to the popular PNG image-format.""" - homepage = "http://sourceforge.net/projects/libmng/" - url = "http://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.2/libmng-2.0.2.tar.gz" - - version('2.0.2', '1ffefaed4aac98475ee6267422cbca55') - - depends_on("jpeg") - depends_on("zlib") - depends_on("lcms") - - def patch(self): - # jpeg requires stdio to beincluded before its headrs. - filter_file(r'^(\#include \)', '#include\n\\1', 'libmng_types.h') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libmonitor/package.py b/var/spack/packages/libmonitor/package.py deleted file mode 100644 index 3b95b86ddf..0000000000 --- a/var/spack/packages/libmonitor/package.py +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libmonitor(Package): - """Libmonitor is a library for process and thread control.""" - homepage = "http://hpctoolkit.org" - - version('20130218', svn='http://libmonitor.googlecode.com/svn/trunk/', revision=146) - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/libpciaccess/package.py b/var/spack/packages/libpciaccess/package.py deleted file mode 100644 index 6022fc34a3..0000000000 --- a/var/spack/packages/libpciaccess/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Libpciaccess(Package): - """Generic PCI access library.""" - - homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - url = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - - version('0.13.4', git='http://anongit.freedesktop.org/git/xorg/lib/libpciaccess.git', - tag='libpciaccess-0.13.4') - - depends_on('autoconf') - depends_on('libtool') - - def install(self, spec, prefix): - from subprocess import call - call(["./autogen.sh"]) - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libpng/package.py b/var/spack/packages/libpng/package.py deleted file mode 100644 index e02b08663e..0000000000 --- a/var/spack/packages/libpng/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Libpng(Package): - """libpng graphics file format""" - homepage = "http://www.libpng.org/pub/png/libpng.html" - url = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz" - - version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d') - version('1.6.15', '829a256f3de9307731d4f52dc071916d') - version('1.6.14', '2101b3de1d5f348925990f9aa8405660') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/libsodium/package.py b/var/spack/packages/libsodium/package.py deleted file mode 100644 index 1c8a16d998..0000000000 --- a/var/spack/packages/libsodium/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Libsodium(Package): - """Sodium is a modern, easy-to-use software library for encryption, - decryption, signatures, password hashing and more.""" - homepage = "https://download.libsodium.org/doc/" - url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz" - - version('1.0.3', 'b3bcc98e34d3250f55ae196822307fab') - version('1.0.2', 'dc40eb23e293448c6fc908757738003f') - version('1.0.1', '9a221b49fba7281ceaaf5e278d0f4430') - version('1.0.0', '3093dabe4e038d09f0d150cef064b2f7') - version('0.7.1', 'c224fe3923d1dcfe418c65c8a7246316') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libtiff/package.py b/var/spack/packages/libtiff/package.py deleted file mode 100644 index 63c6704cb8..0000000000 --- a/var/spack/packages/libtiff/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Libtiff(Package): - """libtiff graphics format library""" - homepage = "http://www.remotesensing.org/libtiff/" - url = "http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz" - - version('4.0.3', '051c1068e6a0627f461948c365290410') - - depends_on('jpeg') - depends_on('zlib') - depends_on('xz') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libtool/package.py b/var/spack/packages/libtool/package.py deleted file mode 100644 index a07daf9781..0000000000 --- a/var/spack/packages/libtool/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Libtool(Package): - """libtool -- library building part of autotools""" - homepage = "https://www.gnu.org/software/libtool/" - url = "http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz" - - version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libunwind/package.py b/var/spack/packages/libunwind/package.py deleted file mode 100644 index 239fcbcfd5..0000000000 --- a/var/spack/packages/libunwind/package.py +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Libunwind(Package): - """A portable and efficient C programming interface (API) to determine - the call-chain of a program.""" - homepage = "http://www.nongnu.org/libunwind/" - url = "http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz" - - version('1.1', 'fb4ea2f6fbbe45bf032cd36e586883ce') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/libuuid/package.py b/var/spack/packages/libuuid/package.py deleted file mode 100644 index 373c5bfcac..0000000000 --- a/var/spack/packages/libuuid/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Libuuid(Package): - """Portable uuid C library""" - # FIXME: add a proper url for your package's homepage here. - homepage = "http://sourceforge.net/projects/libuuid/" - url = "http://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibuuid%2F&ts=1433881396&use_mirror=iweb" - - version('1.0.3', 'd44d866d06286c08ba0846aba1086d68') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - # FIXME: Add logic to build and install here - make() - make("install") diff --git a/var/spack/packages/libxcb/package.py b/var/spack/packages/libxcb/package.py deleted file mode 100644 index 16a5525c0d..0000000000 --- a/var/spack/packages/libxcb/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Libxcb(Package): - """The X protocol C-language Binding (XCB) is a replacement - for Xlib featuring a small footprint, latency hiding, direct - access to the protocol, improved threading support, and - extensibility.""" - - homepage = "http://xcb.freedesktop.org/" - url = "http://xcb.freedesktop.org/dist/libxcb-1.11.tar.gz" - - version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb') - version('1.11.1', '118623c15a96b08622603a71d8789bf3') - depends_on("python") - depends_on("xcb-proto") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py deleted file mode 100644 index 3a0af6b368..0000000000 --- a/var/spack/packages/libxml2/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Libxml2(Package): - """Libxml2 is the XML C parser and toolkit developed for the Gnome - project (but usable outside of the Gnome platform), it is free - software available under the MIT License.""" - homepage = "http://xmlsoft.org" - url = "http://xmlsoft.org/sources/libxml2-2.9.2.tar.gz" - - version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788') - - extends('python') - depends_on('zlib') - depends_on('xz') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libxshmfence/package.py b/var/spack/packages/libxshmfence/package.py deleted file mode 100644 index 3aa2448b46..0000000000 --- a/var/spack/packages/libxshmfence/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Libxshmfence(Package): - """This is a tiny library that exposes a event API on top of Linux - futexes.""" - - homepage = "http://keithp.com/blogs/dri3_extension/" # not really... - url = "http://xorg.freedesktop.org/archive/individual/lib/libxshmfence-1.2.tar.gz" - - version('1.2', 'f0b30c0fc568b22ec524859ee28556f1') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libxslt/package.py b/var/spack/packages/libxslt/package.py deleted file mode 100644 index f97332d020..0000000000 --- a/var/spack/packages/libxslt/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * - -class Libxslt(Package): - """Libxslt is the XSLT C library developed for the GNOME - project. XSLT itself is a an XML language to define - transformation for XML. Libxslt is based on libxml2 the XML C - library developed for the GNOME project. It also implements - most of the EXSLT set of processor-portable extensions - functions and some of Saxon's evaluate and expressions - extensions.""" - homepage = "http://www.xmlsoft.org/XSLT/index.html" - url = "http://xmlsoft.org/sources/libxslt-1.1.28.tar.gz" - - version('1.1.28', '9667bf6f9310b957254fdcf6596600b7') - - depends_on("libxml2") - depends_on("xz") - depends_on("zlib") - depends_on("libgcrypt") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/llvm-lld/package.py b/var/spack/packages/llvm-lld/package.py deleted file mode 100644 index f229211396..0000000000 --- a/var/spack/packages/llvm-lld/package.py +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class LlvmLld(Package): - """lld - The LLVM Linker - lld is a new set of modular code for creating linker tools.""" - homepage = "http://lld.llvm.org" - url = "http://llvm.org/releases/3.4/lld-3.4.src.tar.gz" - - depends_on('llvm') - - version('3.4', '3b6a17e58c8416c869c14dd37682f78e') - - def install(self, spec, prefix): - env['CXXFLAGS'] = self.compier.cxx11_flag - - with working_dir('spack-build', create=True): - cmake('..', - '-DLLD_PATH_TO_LLVM_BUILD=%s' % spec['llvm'].prefix, - '-DLLVM_MAIN_SRC_DIR=%s' % spec['llvm'].prefix, - *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py deleted file mode 100644 index a6759c3033..0000000000 --- a/var/spack/packages/llvm/package.py +++ /dev/null @@ -1,53 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by David Beckingsale, david@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - - -class Llvm(Package): - """The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines, though it does provide helpful libraries - that can be used to build them. The name "LLVM" itself is not an acronym; - it is the full name of the project. - """ - homepage = 'http://llvm.org/' - url = 'http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz' - - version('3.7.0', 'b98b9495e5655a672d6cb83e1a180f8e', url='http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz') - version('3.6.2', '0c1ee3597d75280dee603bae9cbf5cc2', url='http://llvm.org/releases/3.6.2/llvm-3.6.2.src.tar.xz') - version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz') - - depends_on('python@2.7:') - - def install(self, spec, prefix): - env['CXXFLAGS'] = self.compiler.cxx11_flag - - with working_dir('spack-build', create=True): - cmake('..', - '-DLLVM_REQUIRES_RTTI=1', - '-DPYTHON_EXECUTABLE=%s/bin/python' % spec['python'].prefix, - *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/lmdb/package.py b/var/spack/packages/lmdb/package.py deleted file mode 100644 index 875b8100c5..0000000000 --- a/var/spack/packages/lmdb/package.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -from spack import * - -class Lmdb(Package): - """Read-only mirror of official repo on openldap.org. Issues and - pull requests here are ignored. Use OpenLDAP ITS for issues. - http://www.openldap.org/software/repo.html""" - - - homepage = "http://www.openldap.org/software/repo.html" - url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.16.tar.gz" - - version('0.9.16', '0de89730b8f3f5711c2b3a4ba517b648') - - def install(self, spec, prefix): - os.chdir('libraries/liblmdb') - - make() - - mkdirp(prefix.bin) - mkdirp(prefix + '/man/man1') - mkdirp(prefix.lib) - mkdirp(prefix.include) - - bins = ['mdb_stat', 'mdb_copy', 'mdb_dump', 'mdb_load'] - for f in bins: - install(f, prefix.bin) - - mans = ['mdb_stat.1', 'mdb_copy.1', 'mdb_dump.1', 'mdb_load.1'] - for f in mans: - install(f, prefix + '/man/man1') - - libs = ['liblmdb.a', 'liblmdb.so'] - for f in libs: - install(f, prefix.lib) - - includes = ['lmdb.h'] - for f in includes: - install(f, prefix.include) diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py deleted file mode 100644 index 57c443cc2d..0000000000 --- a/var/spack/packages/lua/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * -import os - -class Lua(Package): - """ The Lua programming language interpreter and library """ - homepage = "http://www.lua.org" - url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" - - version('5.3.1', '797adacada8d85761c079390ff1d9961') - version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8af') - version('5.2.4', '913fdb32207046b273fdb17aad70be13') - version('5.2.3', 'dc7f94ec6ff15c985d2d6ad0f1b35654') - version('5.2.2', 'efbb645e897eae37cad4344ce8b0a614') - version('5.2.1', 'ae08f641b45d737d12d30291a5e5f6e3') - version('5.2.0', 'f1ea831f397214bae8a265995ab1a93e') - version('5.1.5', '2e115fe26e435e33b0d5c022e4490567') - version('5.1.4', 'd0870f2de55d59c1c8419f36e8fac150') - version('5.1.3', 'a70a8dfaa150e047866dc01a46272599') - - depends_on('ncurses') - - def install(self, spec, prefix): - make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS=-L%s/lib' % spec['ncurses'].prefix, - 'linux', - 'install') diff --git a/var/spack/packages/lwgrp/package.py b/var/spack/packages/lwgrp/package.py deleted file mode 100644 index 5963382b92..0000000000 --- a/var/spack/packages/lwgrp/package.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -from spack import * - -class Lwgrp(Package): - """Thie light-weight group library provides process group - representations using O(log N) space and time.""" - - homepage = "https://github.com/hpc/lwgrp" - url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz" - - version('1.0.2', 'ab7ba3bdd8534a651da5076f47f27d8a') - - depends_on('mpi') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/lwm2/package.py b/var/spack/packages/lwm2/package.py deleted file mode 100644 index 31afff8816..0000000000 --- a/var/spack/packages/lwm2/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Lwm2(Package): - """LWM2: Light Weight Measurement Module. This is a PMPI module - that can collect a number of time-sliced MPI and POSIX I/O - measurements from a program. - """ - homepage = "https://jay.grs.rwth-aachen.de/redmine/projects/lwm2" - - version('torus', hg='https://jay.grs.rwth-aachen.de/hg/lwm2', revision='torus') - - depends_on("papi") - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/matio/package.py b/var/spack/packages/matio/package.py deleted file mode 100644 index 12cfb80926..0000000000 --- a/var/spack/packages/matio/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - - -class Matio(Package): - """matio is an C library for reading and writing Matlab MAT files""" - homepage = "http://sourceforge.net/projects/matio/" - url = "http://downloads.sourceforge.net/project/matio/matio/1.5.2/matio-1.5.2.tar.gz" - - version('1.5.2', '85b007b99916c63791f28398f6a4c6f1') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/memaxes/package.py b/var/spack/packages/memaxes/package.py deleted file mode 100644 index 76d5d3f831..0000000000 --- a/var/spack/packages/memaxes/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Memaxes(Package): - """MemAxes is a visualizer for sampled memory trace data.""" - - homepage = "https://github.com/scalability-llnl/MemAxes" - - version('0.5', '5874f3fda9fd2d313c0ff9684f915ab5', - url='https://github.com/scalability-llnl/MemAxes/archive/v0.5.tar.gz') - - depends_on("cmake@2.8.9:") - depends_on("qt@5:") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") - diff --git a/var/spack/packages/mesa/package.py b/var/spack/packages/mesa/package.py deleted file mode 100644 index 2a04a8fd51..0000000000 --- a/var/spack/packages/mesa/package.py +++ /dev/null @@ -1,34 +0,0 @@ -from spack import * - -class Mesa(Package): - """Mesa is an open-source implementation of the OpenGL - specification - a system for rendering interactive 3D graphics.""" - - homepage = "http://www.mesa3d.org" - url = "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/8.0.5/MesaLib-8.0.5.tar.gz" - # url = "ftp://ftp.freedesktop.org/pub/mesa/10.4.4/MesaLib-10.4.4.tar.gz" - - # version('10.4.4', '8d863a3c209bf5116b2babfccccc68ce') - version('8.0.5', 'cda5d101f43b8784fa60bdeaca4056f2') - - # mesa 7.x, 8.x, 9.x - depends_on("libdrm@2.4.33") - depends_on("llvm@3.0") - depends_on("libxml2") - - # patch("llvm-fixes.patch") # using newer llvm - - # mesa 10.x - # depends_on("py-mako") - # depends_on("flex") - # depends_on("bison") - # depends_on("dri2proto") - # depends_on("libxcb") - # depends_on("libxshmfence") - - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/metis/package.py b/var/spack/packages/metis/package.py deleted file mode 100644 index 7ce5ae1925..0000000000 --- a/var/spack/packages/metis/package.py +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class Metis(Package): - """METIS is a set of serial programs for partitioning graphs, - partitioning finite element meshes, and producing fill reducing - orderings for sparse matrices. The algorithms implemented in - METIS are based on the multilevel recursive-bisection, - multilevel k-way, and multi-constraint partitioning schemes.""" - - homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" - - version('5.1.0', '5465e67079419a69e0116de24fce58fe') - - depends_on('mpi') - - def install(self, spec, prefix): - cmake(".", - '-DGKLIB_PATH=%s/GKlib' % pwd(), - '-DSHARED=1', - '-DCMAKE_C_COMPILER=mpicc', - '-DCMAKE_CXX_COMPILER=mpicxx', - '-DSHARED=1', - *std_cmake_args) - - make() - make("install") diff --git a/var/spack/packages/mpc/package.py b/var/spack/packages/mpc/package.py deleted file mode 100644 index 6fbfca3007..0000000000 --- a/var/spack/packages/mpc/package.py +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpc(Package): - """Gnu Mpc is a C library for the arithmetic of complex numbers - with arbitrarily high precision and correct rounding of the - result.""" - homepage = "http://www.multiprecision.org" - url = "ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz" - - version('1.0.2', '68fadff3358fb3e7976c7a398a0af4c3') - - depends_on("gmp") - depends_on("mpfr") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/mpe2/mpe2.patch b/var/spack/packages/mpe2/mpe2.patch deleted file mode 100644 index 3ade1f04f4..0000000000 --- a/var/spack/packages/mpe2/mpe2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN mpe2-1.3.0/src/graphics/src/mpe_graphics.c mpe2-1.3.0.new/src/graphics/src/mpe_graphics.c ---- mpe2-1.3.0/src/graphics/src/mpe_graphics.c 2009-06-15 10:36:22.000000000 -0600 -+++ mpe2-1.3.0.new/src/graphics/src/mpe_graphics.c 2014-10-25 00:11:22.000000000 -0600 -@@ -982,7 +982,7 @@ char *string; - return MPE_ERR_BAD_ARGS; - } - -- printf("color = %d, string = %s\n",(int) color, string); -+//printf("color = %d, string = %s\n",(int) color, string); - - XBSetPixVal( graph->xwin, graph->xwin->cmapping[color] ); - returnVal = XDrawString( graph->xwin->disp, XBDrawable(graph->xwin), diff --git a/var/spack/packages/mpe2/package.py b/var/spack/packages/mpe2/package.py deleted file mode 100644 index 27295172cc..0000000000 --- a/var/spack/packages/mpe2/package.py +++ /dev/null @@ -1,28 +0,0 @@ -from spack import * - -class Mpe2(Package): - """Message Passing Extensions (MPE) -- Parallel, shared X window graphics""" - - homepage = "http://www.mcs.anl.gov/research/projects/perfvis/software/MPE/" - url = "ftp://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-1.3.0.tar.gz" - - version('1.3.0', '67bf0c7b2e573df3ba0d2059a96c2f7b') - - patch('mpe2.patch') - - depends_on("mpi") - - provides("mpe") - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--x-includes=/usr/X11R6/include", - "--x-libraries=/usr/X11R6/lib", - "--enable-mpe_graphics=yes", - "--disable-f77", - "--enable-viewers=no", - "--enable-slog2=no", - "--with-mpicc=mpicc") - - make() - make("install") diff --git a/var/spack/packages/mpfr/package.py b/var/spack/packages/mpfr/package.py deleted file mode 100644 index 9c744a22df..0000000000 --- a/var/spack/packages/mpfr/package.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpfr(Package): - """The MPFR library is a C library for multiple-precision - floating-point computations with correct rounding.""" - homepage = "http://www.mpfr.org" - url = "http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.bz2" - - version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138') - # version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') - - depends_on('gmp') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/mpibash/mpibash-4.3.patch b/var/spack/packages/mpibash/mpibash-4.3.patch deleted file mode 100644 index 17e285b0bf..0000000000 --- a/var/spack/packages/mpibash/mpibash-4.3.patch +++ /dev/null @@ -1,1565 +0,0 @@ -diff -Naur bash-4.3/builtins/circle.def mpibash-4.3/builtins/circle.def ---- bash-4.3/builtins/circle.def 1969-12-31 17:00:00.000000000 -0700 -+++ mpibash-4.3/builtins/circle.def 2014-05-13 11:27:37.314100671 -0600 -@@ -0,0 +1,620 @@ -+This file is circle.def, from which is created circle.c. -+It implements all of the "circle_*" builtins in Bash. -+ -+$PRODUCES circle.c -+ -+#include -+ -+#include -+#if defined (HAVE_UNISTD_H) -+# ifdef _MINIX -+# include -+# endif -+# include -+#endif -+ -+#include "../bashintl.h" -+#include "../shell.h" -+#include "common.h" -+#include "bashgetopt.h" -+#include -+ -+extern int running_trap, trap_saved_exit_value; -+ -+static int circle_rank; /* Rank in the Libcircle job */ -+static SHELL_VAR *create_func = NULL; /* User-defined callback function for CIRCLE_cb_create. */ -+static SHELL_VAR *process_func = NULL; /* User-defined callback function for CIRCLE_cb_process. */ -+static SHELL_VAR *reduce_init_func = NULL; /* User-defined callback function for CIRCLE_cb_reduce_init. */ -+static SHELL_VAR *reduce_fini_func = NULL; /* User-defined callback function for CIRCLE_cb_reduce_fini. */ -+static SHELL_VAR *reduce_op_func = NULL; /* User-defined callback function for CIRCLE_cb_reduce_op. */ -+static CIRCLE_handle *current_handle = NULL; /* Active handle within a callback or NULL if not within a callback */ -+static int within_reduction = 0; /* 1=within a reduction callback; 0=not */ -+ -+/* Return with a usage message if no arguments remain. */ -+#define YES_ARGS(LIST) \ -+ if ((LIST) == 0) \ -+ { \ -+ builtin_usage (); \ -+ return (EX_USAGE); \ -+ } -+ -+/* Perform the same operation as bind_variable, but with VALUE being a -+ * number, not a string. */ -+static SHELL_VAR * -+bind_variable_number (name, value, flags) -+ const char *name; -+ long value; -+ int flags; -+{ -+ char numstr[25]; /* String version of VALUE */ -+ -+ sprintf (numstr, "%ld", value); -+ return bind_variable (name, numstr, flags); -+} -+ -+/* Invoke the user-defined creation-callback function (create_func). */ -+static void -+internal_create_func (handle) -+ CIRCLE_handle *handle; -+{ -+ WORD_LIST *funcargs; -+ -+ if (create_func == NULL) -+ return; -+ current_handle = handle; -+ funcargs = make_word_list (make_word ("cb_create"), NULL); -+ execute_shell_function (create_func, funcargs); -+ dispose_words (funcargs); -+ current_handle = NULL; -+} -+ -+/* Invoke the user-defined process-callback function (process_func). */ -+static void -+internal_process_func (handle) -+ CIRCLE_handle *handle; -+{ -+ WORD_LIST *funcargs; -+ -+ if (process_func == NULL) -+ return; -+ current_handle = handle; -+ funcargs = make_word_list (make_word ("cb_process"), NULL); -+ execute_shell_function (process_func, funcargs); -+ dispose_words (funcargs); -+ current_handle = NULL; -+} -+ -+/* Invoke the user-defined reduction-initiation callback function -+ * (reduce_init_func). */ -+static void -+internal_reduce_init_func (void) -+{ -+ WORD_LIST *funcargs; -+ -+ if (reduce_init_func == NULL) -+ return; -+ within_reduction = 1; -+ funcargs = make_word_list (make_word ("cb_reduce_init"), NULL); -+ execute_shell_function (reduce_init_func, funcargs); -+ dispose_words (funcargs); -+ within_reduction = 0; -+} -+ -+/* Invoke the user-defined reduction callback function -+ * (reduce_op_func). */ -+static void -+internal_reduce_op_func (buf1, size1, buf2, size2) -+ const void* buf1; -+ size_t size1; -+ const void* buf2; -+ size_t size2; -+{ -+ WORD_LIST *funcargs; -+ -+ if (reduce_op_func == NULL) -+ return; -+ within_reduction = 1; -+ funcargs = make_word_list (make_word (buf2), NULL); -+ funcargs = make_word_list (make_word (buf1), funcargs); -+ funcargs = make_word_list (make_word ("cb_reduce_op"), funcargs); -+ execute_shell_function (reduce_op_func, funcargs); -+ dispose_words (funcargs); -+ within_reduction = 0; -+} -+ -+/* Invoke the user-defined reduction-finalization callback function -+ * (reduce_fini_func). */ -+static void -+internal_reduce_fini_func (buf, size) -+ const void* buf; -+ size_t size; -+{ -+ WORD_LIST *funcargs; -+ -+ if (reduce_fini_func == NULL) -+ return; -+ funcargs = make_word_list (make_word (buf), NULL); -+ funcargs = make_word_list (make_word ("cb_reduce_fini"), funcargs); -+ execute_shell_function (reduce_fini_func, funcargs); -+ dispose_words (funcargs); -+} -+ -+/* Look up a user-provided callback function. */ -+static int -+find_callback_function (list, user_func) -+ WORD_LIST *list; -+ SHELL_VAR **user_func; -+{ -+ char *funcname; /* Name of the user-defined function. */ -+ -+ /* If no argument was provided, nullify the callback function. */ -+ if (list == NULL) -+ { -+ *user_func = NULL; -+ return EXECUTION_SUCCESS; -+ } -+ -+ /* Get the callback function. */ -+ funcname = list->word->word; -+ list = list->next; -+ no_args (list); -+ *user_func = find_function (funcname); -+ if (*user_func == NULL) -+ { -+ builtin_error (_("function %s not found"), funcname); -+ return EXECUTION_FAILURE; -+ } -+ return EXECUTION_SUCCESS; -+} -+ -+/* Initialize Libcircle. */ -+void -+initialize_libcircle (argc, argv) -+ int argc; -+ char **argv; -+{ -+ circle_rank = CIRCLE_init (argc, argv, CIRCLE_DEFAULT_FLAGS); -+ bind_variable_number ("circle_rank", circle_rank, 0); -+ CIRCLE_enable_logging (CIRCLE_LOG_WARN); -+ CIRCLE_cb_create (internal_create_func); -+ CIRCLE_cb_process (internal_process_func); -+ CIRCLE_cb_reduce_init (internal_reduce_init_func); -+ CIRCLE_cb_reduce_op (internal_reduce_op_func); -+ CIRCLE_cb_reduce_fini (internal_reduce_fini_func); -+} -+ -+/* Finalize Libcircle. */ -+void -+finalize_libcircle (void) -+{ -+ CIRCLE_finalize (); -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+$BUILTIN circle_set_options -+$FUNCTION circle_set_options_builtin -+$SHORT_DOC circle_set_options [flag]... -+Change Libcircle's run-time behavior. -+ -+Arguments: -+ FLAG "split_random", "split_equal", or "create_global" -+ -+Multiple flags can be provided. If no flags are provided, Libcircle -+reverts to its default options. -+ -+Exit Status: -+Returns 0 unless an invalid option is given. -+$END -+/*'*/ -+ -+/* Here is the circle_set_options builtin. */ -+int -+circle_set_options_builtin (list) -+ WORD_LIST *list; -+{ -+ char *word; /* One argument */ -+ int flags = 0; /* Flags to pass to CIRCLE_set_options */ -+ -+ if (list == NULL) -+ flags = CIRCLE_DEFAULT_FLAGS; -+ else -+ while (list != NULL) -+ { -+ word = list->word->word; -+ if (!strcmp (word, "split_random")) -+ flags |= CIRCLE_SPLIT_RANDOM; -+ else if (!strcmp (word, "split_equal")) -+ flags |= CIRCLE_SPLIT_EQUAL; -+ else if (!strcmp (word, "create_global")) -+ flags |= CIRCLE_CREATE_GLOBAL; -+ else -+ { -+ builtin_error (_("invalid flag \"%s\""), word); -+ return (EXECUTION_FAILURE); -+ } -+ list = list->next; -+ } -+ CIRCLE_set_options (flags); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_cb_create -+$FUNCTION circle_cb_create_builtin -+$SHORT_DOC circle_cb_create [func] -+Register a function that will create work when asked. -+ -+Arguments: -+ FUNC User-defined callback function that will invoke -+ circle_enqueue when called -+ -+If FUNC is omitted, no function will be associated with work creation. -+This can be used to nullify a previous circle_cb_create invocation. -+ -+Exit Status: -+Returns 0 unless an invalid function is given or an error occurs. -+$END -+ -+/* Here is the circle_cb_create builtin. */ -+int -+circle_cb_create_builtin (list) -+ WORD_LIST *list; -+{ -+ return find_callback_function (list, &create_func); -+} -+ -+$BUILTIN circle_cb_process -+$FUNCTION circle_cb_process_builtin -+$SHORT_DOC circle_cb_process [func] -+Register a function that will process work when asked. -+ -+Arguments: -+ FUNC User-defined callback function that will invoke -+ circle_enqueue when called -+ -+If FUNC is omitted, no function will be associated with work processing. -+This can be used to nullify a previous circle_cb_process invocation. -+ -+Exit Status: -+Returns 0 unless an invalid function is given or an error occurs. -+$END -+ -+/* Here is the circle_cb_process builtin. */ -+int -+circle_cb_process_builtin (list) -+ WORD_LIST *list; -+{ -+ return find_callback_function (list, &process_func); -+} -+ -+$BUILTIN circle_begin -+$FUNCTION circle_begin_builtin -+$SHORT_DOC circle_begin -+Begin creation and processing of the distributed work queue. -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+ -+/* Here is the circle_begin builtin. */ -+int -+circle_begin_builtin (list) -+ WORD_LIST *list; -+{ -+ no_args (list); -+ CIRCLE_begin (); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_enqueue -+$FUNCTION circle_enqueue_builtin -+$SHORT_DOC circle_enqueue work -+Enqueue work onto the distributed queue. -+ -+Arguments: -+ WORK "Work" as represented by an arbitrary string of limited -+ size (generally around 4KB) -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+ -+/* Here is the circle_enqueue builtin. */ -+int -+circle_enqueue_builtin (list) -+ WORD_LIST *list; -+{ -+ char *work; /* Work to perform */ -+ -+ /* Extract the work argument. */ -+ YES_ARGS (list); -+ work = list->word->word; -+ list = list->next; -+ no_args (list); -+ -+ /* Complain if we're not within a proper callback function. */ -+ if (current_handle == NULL) -+ { -+ builtin_error (_("not within a Libcircle \"create\" or \"process\" callback function")); -+ return EXECUTION_FAILURE; -+ } -+ -+ /* Enqueue the work. */ -+ if (current_handle->enqueue (work) == -1) -+ return EXECUTION_FAILURE; -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_dequeue -+$FUNCTION circle_dequeue_builtin -+$SHORT_DOC circle_dequeue var -+Dequeue work from the distributed queue into a variable. -+ -+Arguments: -+ VAR Variable in which to receive previously enqueued "work" -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+ -+/* Here is the circle_dequeue builtin. */ -+int -+circle_dequeue_builtin (list) -+ WORD_LIST *list; -+{ -+ char *varname; /* Variable in which to store the work string */ -+ char work[CIRCLE_MAX_STRING_LEN+1]; /* Work to perform */ -+ -+ /* Extract the variable-name argument. */ -+ YES_ARGS (list); -+ varname = list->word->word; -+ list = list->next; -+ no_args (list); -+ -+ /* Complain if we're not within a callback function. */ -+ if (current_handle == NULL) -+ { -+ builtin_error (_("not within a Libcircle callback function")); -+ return EXECUTION_FAILURE; -+ } -+ -+ /* Dequeue the work and bind it to the given variable. */ -+ if (current_handle->dequeue (work) == -1) -+ return EXECUTION_FAILURE; -+ bind_variable (varname, work, 0); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_enable_logging -+$FUNCTION circle_enable_logging_builtin -+$SHORT_DOC circle_enable_logging log_level -+Change Libcircle's logging verbosity -+ -+Arguments: -+ LOG_LEVEL "fatal", "error", "warning", "info", or "debug" -+ -+Exit Status: -+Returns 0 unless an invalid option is given. -+$END -+/*'*/ -+ -+/* Here is the circle_enable_logging builtin. */ -+int -+circle_enable_logging_builtin (list) -+ WORD_LIST *list; -+{ -+ char *word; /* One argument */ -+ CIRCLE_loglevel loglevel; /* Level to set */ -+ -+ /* Parse the log level. */ -+ YES_ARGS (list); -+ word = list->word->word; -+ if (!strcmp (word, "fatal")) -+ loglevel = CIRCLE_LOG_FATAL; -+ else if (!strcmp (word, "error")) -+ loglevel = CIRCLE_LOG_ERR; -+ else if (!strcmp (word, "warning")) -+ loglevel = CIRCLE_LOG_WARN; -+ else if (!strcmp (word, "info")) -+ loglevel = CIRCLE_LOG_INFO; -+ else if (!strcmp (word, "debug")) -+ loglevel = CIRCLE_LOG_DBG; -+ else -+ { -+ builtin_error (_("invalid log level \"%s\""), word); -+ return (EXECUTION_FAILURE); -+ } -+ -+ /* Set the log level. */ -+ CIRCLE_enable_logging (loglevel); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_abort -+$FUNCTION circle_abort_builtin -+$SHORT_DOC circle_abort -+Terminate queue processing. -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+ -+/* Here is the circle_abort builtin. */ -+int -+circle_abort_builtin (list) -+ WORD_LIST *list; -+{ -+ no_args (list); -+ CIRCLE_abort (); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_checkpoint -+$FUNCTION circle_checkpoint_builtin -+$SHORT_DOC circle_checkpoint -+Checkpoint a work queue to disk. -+ -+Write a file called circle${circle_rank}.txt containing the current -+queue state of rank ${circle_rank}. On a later run, a worker can -+invoke circle_read_restarts to repopulate its queue from such a -+checkpoint file. -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+/*'*/ -+ -+/* Here is the circle_checkpoint builtin. */ -+int -+circle_checkpoint_builtin (list) -+ WORD_LIST *list; -+{ -+ no_args (list); -+ CIRCLE_checkpoint (); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_read_restarts -+$FUNCTION circle_read_restarts_builtin -+$SHORT_DOC circle_read_restarts -+Repopulate a work queue from a disk checkpoint. -+ -+Read queue contents from a file called circle${circle_rank}.txt, which -+was previously produced by circle_checkpoint. -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+/*'*/ -+ -+/* Here is the circle_read_restarts builtin. */ -+int -+circle_read_restarts_builtin (list) -+ WORD_LIST *list; -+{ -+ no_args (list); -+ CIRCLE_read_restarts (); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN circle_cb_reduce_init -+$FUNCTION circle_cb_reduce_init_builtin -+$SHORT_DOC circle_cb_reduce_init [func] -+Register a function that will initiate a reduction operation. -+ -+Arguments: -+ FUNC User-defined callback function that will invoke -+ circle_reduce when called -+ -+FUNC will be invoked on all ranks. -+ -+If FUNC is omitted, no function will be associated with reduction -+initialization. This can be used to nullify a previous -+circle_cb_reduce_init invocation. -+ -+Exit Status: -+Returns 0 unless an invalid function is given or an error occurs. -+$END -+ -+/* Here is the circle_cb_reduce_init builtin. */ -+int -+circle_cb_reduce_init_builtin (list) -+ WORD_LIST *list; -+{ -+ return find_callback_function (list, &reduce_init_func); -+} -+ -+$BUILTIN circle_cb_reduce_op -+$FUNCTION circle_cb_reduce_op_builtin -+$SHORT_DOC circle_cb_reduce_op [func] -+Register a function that will complete a reduction operation. -+ -+Arguments: -+ FUNC User-defined callback function that will receive -+ two items to reduce and invoke circle_reduce on -+ the reduced value -+ -+If FUNC is omitted, no function will be associated with reduction -+execution. This can be used to nullify a previous circle_cb_reduce_op -+invocation. -+ -+Exit Status: -+Returns 0 unless an invalid function is given or an error occurs. -+$END -+ -+/* Here is the circle_cb_reduce_op builtin. */ -+int -+circle_cb_reduce_op_builtin (list) -+ WORD_LIST *list; -+{ -+ return find_callback_function (list, &reduce_op_func); -+} -+ -+$BUILTIN circle_cb_reduce_fini -+$FUNCTION circle_cb_reduce_fini_builtin -+$SHORT_DOC circle_cb_reduce_fini [func] -+Register a function that will complete a reduction operation. -+ -+Arguments: -+ FUNC User-defined callback function that will receive -+ the final reduced data -+ -+If FUNC is omitted, no function will be associated with reduction -+completion. This can be used to nullify a previous -+circle_cb_reduce_fini invocation. -+ -+Libcircle guarantees that FUNC will be invoked only on rank 0. -+ -+Exit Status: -+Returns 0 unless an invalid function is given or an error occurs. -+$END -+ -+/* Here is the circle_cb_reduce_fini builtin. */ -+int -+circle_cb_reduce_fini_builtin (list) -+ WORD_LIST *list; -+{ -+ return find_callback_function (list, &reduce_fini_func); -+} -+ -+$BUILTIN circle_reduce -+$FUNCTION circle_reduce_builtin -+$SHORT_DOC circle_reduce work -+Seed the next phase of a reduction operation -+ -+Arguments: -+ WORK "Work" as represented by an arbitrary string of limited -+ size (generally around 4KB) -+ -+This function should be called both by the callback function -+registered with circle_reduce_init and the callback function -+registered with circle_reduce_op. -+ -+Exit Status: -+Returns 0 unless an error occurs. -+$END -+ -+/* Here is the circle_reduce builtin. */ -+int -+circle_reduce_builtin (list) -+ WORD_LIST *list; -+{ -+ char *work; /* Work to perform */ -+ -+ /* Extract the work argument. */ -+ YES_ARGS (list); -+ work = list->word->word; -+ list = list->next; -+ no_args (list); -+ -+ /* Complain if we're not within a proper callback function. */ -+ if (!within_reduction) -+ { -+ builtin_error (_("not within a Libcircle \"reduce_init\" or \"reduce_op\" callback function")); -+ return EXECUTION_FAILURE; -+ } -+ -+ /* Reduce the work. */ -+ CIRCLE_reduce (work, strlen (work)); -+ return EXECUTION_SUCCESS; -+} -diff -Naur bash-4.3/builtins/Makefile.in mpibash-4.3/builtins/Makefile.in ---- bash-4.3/builtins/Makefile.in 2012-05-25 07:29:19.000000000 -0600 -+++ mpibash-4.3/builtins/Makefile.in 2014-05-13 11:27:37.314100671 -0600 -@@ -141,7 +141,9 @@ - $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \ - $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \ - $(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \ -- $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def -+ $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def \ -+ $(srcdir)/mpi.def \ -+@CIRCLE@ $(srcdir)/circle.def - - STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \ - getopt.h -@@ -153,7 +155,9 @@ - jobs.o kill.o let.o mapfile.o \ - pushd.o read.o return.o set.o setattr.o shift.o source.o \ - suspend.o test.o times.o trap.o type.o ulimit.o umask.o \ -- wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o -+ wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o \ -+ mpi.o \ -+@CIRCLE@ circle.o - - CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h tmpbuiltins.c \ - tmpbuiltins.h -@@ -317,6 +321,8 @@ - getopts.o: getopts.def - reserved.o: reserved.def - complete.o: complete.def -+@CIRCLE@ circle.o: circle.def -+mpi.o: mpi.def - - # C files - bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h -@@ -644,6 +650,19 @@ - mapfile.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h - mapfile.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/variables.h $(topdir)/conftypes.h - mapfile.o: $(topdir)/arrayfunc.h ../pathnames.h -+@CIRCLE@ circle.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -+@CIRCLE@ circle.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h -+@CIRCLE@ circle.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -+@CIRCLE@ circle.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -+@CIRCLE@ circle.o: $(BASHINCDIR)/maxpath.h ../pathnames.h -+mpi.o: ../config.h ../config-top.h ../config-bot.h ../bashintl.h -+mpi.o: ../include/gettext.h ../shell.h ../config.h ../bashjmp.h -+mpi.o: ../include/posixjmp.h ../command.h ../syntax.h ../general.h -+mpi.o: ../bashtypes.h ../include/chartypes.h ../xmalloc.h ../bashansi.h -+mpi.o: ../error.h ../variables.h ../array.h ../assoc.h ../hashlib.h -+mpi.o: ../conftypes.h ../arrayfunc.h ../quit.h ../sig.h ../include/maxpath.h -+mpi.o: ../unwind_prot.h ../dispose_cmd.h ../make_cmd.h ../include/ocache.h -+mpi.o: ../subst.h ../pathnames.h ../externs.h common.h bashgetopt.h - - #bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h - -diff -Naur bash-4.3/builtins/mpi.def mpibash-4.3/builtins/mpi.def ---- bash-4.3/builtins/mpi.def 1969-12-31 17:00:00.000000000 -0700 -+++ mpibash-4.3/builtins/mpi.def 2014-05-13 11:27:37.314100671 -0600 -@@ -0,0 +1,744 @@ -+This file is mpi.def, from which is created mpi.c. -+It implements all of the "mpi_*" builtins in Bash. -+ -+$PRODUCES mpi.c -+ -+#include -+ -+#include -+#if defined (HAVE_UNISTD_H) -+# ifdef _MINIX -+# include -+# endif -+# include -+#endif -+ -+#include "../bashintl.h" -+#include "../shell.h" -+#include "common.h" -+#include "bashgetopt.h" -+#include -+ -+extern int running_trap, trap_saved_exit_value; -+ -+/* Keep track of who we are within MPI_COMM_WORLD. */ -+static int mpi_rank; -+static int mpi_num_ranks; -+ -+/* Try an MPI operation. Return with an error message on failure. */ -+#define MPI_TRY(STMT) \ -+ do \ -+ { \ -+ int mpierr; \ -+ mpierr = STMT; \ -+ if (mpierr != MPI_SUCCESS) \ -+ return report_mpi_error (mpierr); \ -+ } \ -+ while (0) -+ -+/* Return with a usage message if no arguments remain. */ -+#define YES_ARGS(LIST) \ -+ if ((LIST) == 0) \ -+ { \ -+ builtin_usage (); \ -+ return (EX_USAGE); \ -+ } -+ -+/* Return with an error message if a given variable is read-only or if -+ * we can't write to it for any other reason (e.g., it's defined as a -+ * function). */ -+#define REQUIRE_WRITABLE(NAME) \ -+ do \ -+ { \ -+ SHELL_VAR *bindvar = find_shell_variable (NAME); \ -+ if (bindvar) \ -+ { \ -+ if (readonly_p (bindvar)) \ -+ { \ -+ err_readonly (NAME); \ -+ return (EXECUTION_FAILURE); \ -+ } \ -+ if (unbind_variable (NAME) == -1) \ -+ { \ -+ builtin_error ("Failed to write to variable %s", NAME); \ -+ return (EXECUTION_FAILURE); \ -+ } \ -+ } \ -+ } \ -+ while (0) -+ -+/* Initialize MPI. */ -+void -+initialize_mpi (argc, argv) -+ int argc; -+ char **argv; -+{ -+ int init_done; -+ -+ MPI_Initialized (&init_done); -+ if (!init_done) -+ MPI_Init (&argc, &argv); -+ MPI_Errhandler_set (MPI_COMM_WORLD, MPI_ERRORS_RETURN); -+ MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank); -+ MPI_Comm_size (MPI_COMM_WORLD, &mpi_num_ranks); -+} -+ -+/* Finalize MPI. */ -+void -+finalize_mpi () -+{ -+ MPI_Finalize (); -+} -+ -+/* Parse an operation name into an MPI_Op. Return 1 on success, 0 on -+ * failure. */ -+static int -+parse_operation (char *name, MPI_Op *op) -+{ -+ /* Define a mapping from operator names to MPI_Op values. */ -+ typedef struct { -+ char *name; /* Operation name (e.g., "sum") */ -+ MPI_Op value; /* Operation value (e.g., MPI_SUM) */ -+ } opname2value_t; -+ static opname2value_t oplist[] = { -+ {"max", MPI_MAX}, -+ {"min", MPI_MIN}, -+ {"sum", MPI_SUM}, -+ {"prod", MPI_PROD}, -+ {"land", MPI_LAND}, -+ {"band", MPI_BAND}, -+ {"lor", MPI_LOR}, -+ {"bor", MPI_BOR}, -+ {"lxor", MPI_LXOR}, -+ {"bxor", MPI_BXOR}, -+ {"maxloc", MPI_MAXLOC}, -+ {"minloc", MPI_MINLOC} -+ }; -+ size_t i; -+ -+ for (i = 0; i < sizeof(oplist)/sizeof(opname2value_t); i++) -+ if (!strcmp(name, oplist[i].name)) -+ { -+ *op = oplist[i].value; -+ if (i > 0) -+ { -+ /* As a performance optimization, bubble up the value we -+ * just found. */ -+ opname2value_t prev = oplist[i - 1]; -+ oplist[i - 1] = oplist[i]; -+ oplist[i] = prev; -+ } -+ return 1; -+ } -+ return 0; -+} -+ -+/* Report an error to the user and return EXECUTION_FAILURE. */ -+static int -+report_mpi_error (mpierr) -+ int mpierr; -+{ -+ char errstr[MPI_MAX_ERROR_STRING]; -+ int errstrlen; -+ -+ MPI_Error_string (mpierr, errstr, &errstrlen); -+ builtin_error ("%s", errstr); -+ return EXECUTION_FAILURE; -+} -+ -+/* Perform the same operation as bind_variable, but with VALUE being a -+ * number, not a string. */ -+static SHELL_VAR * -+bind_variable_number (name, value, flags) -+ const char *name; -+ long value; -+ int flags; -+{ -+ char numstr[25]; /* String version of VALUE */ -+ -+ sprintf (numstr, "%ld", value); -+ return bind_variable (name, numstr, flags); -+} -+ -+/* Perform the same operation as bind_array_variable, but with VALUE -+ * being a number, not a string. */ -+static SHELL_VAR * -+bind_array_variable_number (name, ind, value, flags) -+ char *name; -+ arrayind_t ind; -+ long value; -+ int flags; -+{ -+ char numstr[25]; /* String version of VALUE */ -+ -+ sprintf (numstr, "%ld", value); -+ return bind_array_variable (name, ind, numstr, flags); -+} -+ -+/* Define a reduction-type function (allreduce, scan, exscan, etc.). */ -+typedef int (*reduction_func_t)(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm); -+ -+/* Perform any reduction-type operation (allreduce, scan, exscan, etc.). */ -+static int -+reduction_like (list, funcname, func) -+ WORD_LIST *list; -+ char *funcname; -+ reduction_func_t func; -+{ -+ char *word; /* One argument */ -+ struct { -+ long int value; /* Reduced value */ -+ int rank; /* Rank associated with the above */ -+ } number, result; -+ MPI_Op operation = MPI_SUM; /* Operation to perform */ -+ char *varname; /* Name of the variable to bind the results to */ -+ intmax_t n; -+ int i; -+ -+ /* Parse "-O OPERATION" (optional), where OPERATION is a reduction -+ * operation. */ -+ YES_ARGS (list); -+ word = list->word->word; -+ if (ISOPTION (word, 'O')) -+ { -+ list = list->next; -+ if (list == 0) -+ { -+ sh_needarg (funcname); -+ return (EX_USAGE); -+ } -+ word = list->word->word; -+ if (!parse_operation (word, &operation)) -+ { -+ sh_invalidopt ("-O"); -+ return (EX_USAGE); -+ } -+ list = list->next; -+ } -+ -+ /* Parse the argument, which must be a number. */ -+ YES_ARGS (list); -+ word = list->word->word; -+ if (!legal_number (word, &n)) -+ { -+ sh_neednumarg (funcname); -+ return (EX_USAGE); -+ } -+ number.value = (long int) n; -+ number.rank = mpi_rank; -+ list = list->next; -+ -+ /* Parse the target variable, which must not be read-only. */ -+ YES_ARGS (list); -+ varname = list->word->word; -+ if (mpi_rank != 0 || func != MPI_Exscan) -+ REQUIRE_WRITABLE (varname); -+ list = list->next; -+ no_args (list); -+ -+ /* Perform the reduction operation. Bind the given array variable -+ * to the result and, for minloc/maxloc, the associated rank. */ -+ if (mpi_rank != 0 || func != MPI_Exscan) { -+ bind_array_variable (varname, 0, "", 0); -+ bind_array_variable (varname, 1, "", 0); -+ } -+ if (operation == MPI_MINLOC || operation == MPI_MAXLOC) -+ { -+ MPI_TRY (func (&number, &result, 1, MPI_LONG_INT, operation, MPI_COMM_WORLD)); -+ if (mpi_rank != 0 || func != MPI_Exscan) -+ bind_array_variable_number (varname, 1, result.rank, 0); -+ } -+ else -+ MPI_TRY (func (&number.value, &result.value, 1, MPI_LONG, operation, MPI_COMM_WORLD)); -+ if (mpi_rank != 0 || func != MPI_Exscan) -+ bind_array_variable_number (varname, 0, result.value, 0); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN mpi_comm_rank -+$FUNCTION mpi_comm_rank_builtin -+$SHORT_DOC mpi_comm_rank name -+Return the process's rank in the MPI job. -+ -+Arguments: -+ NAME Scalar variable in which to receive the rank -+ -+Exit Status: -+Returns 0 unless an invalid option is given. -+$END -+/*'*/ -+ -+/* Here is the mpi_comm_rank builtin. */ -+int -+mpi_comm_rank_builtin (list) -+ WORD_LIST *list; -+{ -+ char *varname; /* Name of the variable to bind the results to */ -+ -+ YES_ARGS (list); -+ varname = list->word->word; -+ REQUIRE_WRITABLE (varname); -+ list = list->next; -+ no_args (list); -+ bind_variable_number (varname, mpi_rank, 0); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN mpi_comm_size -+$FUNCTION mpi_comm_size_builtin -+$SHORT_DOC mpi_comm_size name -+Return the total number of ranks in the MPI job. -+ -+Arguments: -+ NAME Scalar variable in which to receive the number of ranks -+ -+Exit Status: -+Returns 0 unless an invalid option is given. -+$END -+ -+/* Here is the mpi_comm_size builtin. */ -+int -+mpi_comm_size_builtin (list) -+ WORD_LIST *list; -+{ -+ char *varname; /* Name of the variable to bind the results to */ -+ -+ YES_ARGS (list); -+ varname = list->word->word; -+ REQUIRE_WRITABLE (varname); -+ list = list->next; -+ no_args (list); -+ bind_variable_number (varname, mpi_num_ranks, 0); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN mpi_abort -+$FUNCTION mpi_abort_builtin -+$SHORT_DOC mpi_abort [n] -+Abort all processes in the MPI job and exit the shell. -+ -+Exits not only the caller's shell (with a status of N) but also all -+remote shells that are part of the same MPI job. If N is omitted, the -+exit status is that of the last command executed. -+ -+This command should be used only in extreme circumstances. It is -+better for each process to exit normally on its own. -+$END -+/*'*/ -+ -+/* Here is the mpi_abort builtin. */ -+int -+mpi_abort_builtin (list) -+ WORD_LIST *list; -+{ -+ int exit_value; -+ -+ exit_value = (running_trap == 1 && list == 0) ? trap_saved_exit_value : get_exitstat (list); /* Copied from exit.def */ -+ MPI_TRY (MPI_Abort (MPI_COMM_WORLD, exit_value)); -+ return EXECUTION_FAILURE; -+} -+ -+$BUILTIN mpi_send -+$FUNCTION mpi_send_builtin -+$SHORT_DOC mpi_send [-t tag] rank message -+Send a message to a remote process in the same MPI job. -+ -+Options: -+ -t TAG Send the message using tag TAG (default: 0). TAG must -+ be a nonnegative integer. -+ -+Arguments: -+ RANK Whom to send the message to. RANK must be an integer in -+ the range [0, $(mpi_comm_size)-1]. -+ -+ MESSAGE String to send to rank RANK. -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_send builtin. */ -+int -+mpi_send_builtin (list) -+ WORD_LIST *list; -+{ -+ char *word; /* One argument */ -+ intmax_t target_rank; /* MPI target rank */ -+ char *message; /* Message to send to rank target_rank */ -+ intmax_t tag = 0; /* Message tag to use */ -+ -+ /* Parse "-t TAG" (optional), where TAG is a number or "any". */ -+ YES_ARGS (list); -+ word = list->word->word; -+ if (ISOPTION (word, 't')) -+ { -+ list = list->next; -+ if (list == 0) -+ { -+ sh_needarg ("mpi_recv"); -+ return (EX_USAGE); -+ } -+ word = list->word->word; -+ if (!legal_number (word, &tag)) -+ { -+ sh_neednumarg ("-t"); -+ return (EX_USAGE); -+ } -+ list = list->next; -+ } -+ else if (*word == '-') -+ { -+ sh_invalidopt (word); -+ builtin_usage (); -+ return (EX_USAGE); -+ } -+ -+ /* Parse the target rank, which must be a number. */ -+ YES_ARGS (list); -+ word = list->word->word; -+ if (!legal_number (word, &target_rank)) -+ { -+ builtin_error (_("mpi_send: numeric rank required")); -+ return (EX_USAGE); -+ } -+ list = list->next; -+ -+ /* Parse the message to send. */ -+ YES_ARGS (list); -+ message = list->word->word; -+ list = list->next; -+ no_args (list); -+ -+ /* Send the message. */ -+ MPI_TRY (MPI_Send (message, strlen(message)+1, MPI_BYTE, (int)target_rank, (int)tag, MPI_COMM_WORLD)); -+ return EXECUTION_SUCCESS; -+} -+ -+ -+$BUILTIN mpi_recv -+$FUNCTION mpi_recv_builtin -+$SHORT_DOC mpi_recv [-t tag] rank name -+Receive a message from a remote process in the same MPI job. -+ -+Options: -+ -t TAG Receive only messages sent using tag TAG (default: 0). -+ TAG must be either a nonnegative integer or the string -+ "any" to receive messages sent using any tag. -+ -+Arguments: -+ RANK Receive only messages sent from sender RANK. RANK -+ must either be in the range [0, $(mpi_comm_size)-1] or -+ be the string "any" to receive messages from any sender. -+ -+ NAME Array variable in which to receive the message, sender -+ rank, and tag. -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_recv builtin. */ -+int -+mpi_recv_builtin (list) -+ WORD_LIST *list; -+{ -+ char *word; /* One argument */ -+ intmax_t source_rank; /* MPI source rank */ -+ char *endptr; /* Used for parsing strings into numbers */ -+ MPI_Status status; /* Status of an MPI operation */ -+ int count; /* Message length in bytes */ -+ intmax_t tag = 0; /* Message tag to use */ -+ char *varname; /* Name of the variable to bind the results to */ -+ static char *message = NULL; /* Message received from MPI */ -+ static size_t alloced = 0; /* Number of bytes allocated for the above */ -+ int opt; /* Parsed option */ -+ -+ /* Parse any options provided. */ -+ reset_internal_getopt (); -+ while ((opt = internal_getopt (list, "t:")) != -1) -+ { -+ switch (opt) -+ { -+ case 't': -+ if (!strcmp (list_optarg, "any")) -+ tag = MPI_ANY_TAG; -+ else if (!legal_number (list_optarg, &tag)) -+ { -+ builtin_error (_("-t: numeric argument or \"any\" required")); -+ return (EX_USAGE); -+ } -+ break; -+ -+ default: -+ sh_invalidopt (word); -+ builtin_usage (); -+ return (EX_USAGE); -+ } -+ } -+ list = loptend; -+ -+ /* Parse the source rank, which must be a number or "any". */ -+ YES_ARGS (list); -+ word = list->word->word; -+ if (!legal_number (word, &source_rank)) -+ { -+ if (!strcmp (word, "any")) -+ source_rank = MPI_ANY_SOURCE; -+ else -+ { -+ builtin_error (_("mpi_recv: numeric rank or \"any\" required")); -+ return (EX_USAGE); -+ } -+ } -+ list = list->next; -+ -+ /* Parse the target variable, which must not be read-only. */ -+ YES_ARGS (list); -+ varname = list->word->word; -+ REQUIRE_WRITABLE (varname); -+ list = list->next; -+ no_args (list); -+ -+ /* Receive a message. Because we don't know long the message will -+ * be, we first probe to get the length. */ -+ MPI_TRY (MPI_Probe ((int)source_rank, (int)tag, MPI_COMM_WORLD, &status)); -+ MPI_TRY (MPI_Get_count (&status, MPI_BYTE, &count)); -+ if (alloced < count) -+ { -+ message = xrealloc (message, count); -+ alloced = count; -+ } -+ MPI_TRY (MPI_Recv (message, count, MPI_BYTE, status.MPI_SOURCE, status.MPI_TAG, MPI_COMM_WORLD, &status)); -+ bind_array_variable (varname, 0, message, 0); -+ bind_array_variable_number (varname, 1, status.MPI_SOURCE, 0); -+ bind_array_variable_number (varname, 2, status.MPI_TAG, 0); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN mpi_barrier -+$FUNCTION mpi_barrier_builtin -+$SHORT_DOC mpi_barrier -+Synchronizes all of the processes in the MPI job. -+ -+No process will return from mpi_barrier until all processes have -+called mpi_barrier. -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_barrier builtin. */ -+int -+mpi_barrier_builtin (list) -+ WORD_LIST *list; -+{ -+ no_args (list); -+ MPI_TRY (MPI_Barrier (MPI_COMM_WORLD)); -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN mpi_bcast -+$FUNCTION mpi_bcast_builtin -+$SHORT_DOC mpi_bcast [message] name -+Broadcast a message to all processes in the same MPI job. -+ -+Arguments: -+ MESSAGE String to broadcast from one process to all the others. -+ -+ NAME Scalar variable in which to receive the broadcast message. -+ -+Exactly one process in the MPI job must specify a message to -+broadcast. No process will return from mpi_bcast until all processes -+have called mpi_bcast. -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_bcast builtin. */ -+int -+mpi_bcast_builtin (list) -+ WORD_LIST *list; -+{ -+ char *word; /* One argument */ -+ int root; /* MPI root rank */ -+ char *root_message; /* Message to broadcast */ -+ int msglen; /* Length in bytes of the above (including the NULL byte) */ -+ char *varname; /* Name of the variable to bind the results to */ -+ static int *all_lengths = NULL; /* List of every rank's msglen */ -+ static char *message = NULL; /* Message received from the root */ -+ static int alloced = 0; /* Bytes allocated for the above */ -+ int i; -+ -+ /* Parse the optional message and target variable, which must not be -+ * read-only. */ -+ YES_ARGS (list); -+ if (list->next == NULL) -+ { -+ /* Non-root */ -+ root_message = NULL; -+ msglen = -1; -+ } -+ else -+ { -+ /* Root */ -+ root_message = list->word->word; -+ msglen = (int) strlen(root_message) + 1; -+ list = list->next; -+ } -+ varname = list->word->word; -+ REQUIRE_WRITABLE (varname); -+ list = list->next; -+ no_args (list); -+ -+ /* Acquire global agreement on the root and the message size. */ -+ if (all_lengths == NULL) -+ all_lengths = xmalloc (mpi_num_ranks*sizeof(int)); -+ MPI_TRY (MPI_Allgather (&msglen, 1, MPI_INT, all_lengths, 1, MPI_INT, MPI_COMM_WORLD)); -+ root = -1; -+ for (i = 0; i < mpi_num_ranks; i++) -+ { -+ if (all_lengths[i] == -1) -+ continue; -+ if (root != -1) -+ { -+ builtin_error (_("mpi_bcast: more than one process specified a message")); -+ return (EXECUTION_FAILURE); -+ } -+ root = i; -+ msglen = all_lengths[i]; -+ } -+ if (root == -1) -+ { -+ builtin_error (_("mpi_bcast: no process specified a message")); -+ return (EXECUTION_FAILURE); -+ } -+ -+ /* Broadcast the message. */ -+ if (mpi_rank == root) -+ { -+ MPI_TRY (MPI_Bcast (root_message, msglen, MPI_BYTE, root, MPI_COMM_WORLD)); -+ bind_variable (varname, root_message, 0); -+ } -+ else -+ { -+ if (alloced < msglen) -+ { -+ message = xrealloc (message, msglen); -+ alloced = msglen; -+ } -+ MPI_TRY (MPI_Bcast (message, msglen, MPI_BYTE, root, MPI_COMM_WORLD)); -+ bind_variable (varname, message, 0); -+ } -+ return EXECUTION_SUCCESS; -+} -+ -+$BUILTIN mpi_scan -+$FUNCTION mpi_scan_builtin -+$SHORT_DOC mpi_scan number name -+Perform an inclusive scan across all processes in the same MPI job. -+ -+ -O OPERATION Operation to perform. Must be one of "max", "min", -+ "sum", "prod", "land", "band", "lor", "bor", "lxor", -+ "bxor", "maxloc", or "minloc" (default: "sum"). -+ -+Arguments: -+ NUMBER Integer to use in the scan operation. -+ -+ NAME Array variable in which to receive the result and, in -+ the case of maxloc and minloc, the associated rank. -+ -+In an inclusive-scan operation, each process i presents a number, -+a[i]. Once all processes in the MPI job have presented their number, -+the command returns a[0] to rank 0, a[0]+a[1] to rank 1, -+a[0]+a[1]+a[2] to rank 2, and so forth. The -O option enables "+" to -+be replaced with other operations. -+ -+Inclusive scans can be useful for assigning a unique index to each -+process in the MPI job. -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_scan builtin. */ -+int -+mpi_scan_builtin (list) -+ WORD_LIST *list; -+{ -+ return reduction_like (list, "mpi_scan", MPI_Scan); -+} -+ -+$BUILTIN mpi_exscan -+$FUNCTION mpi_exscan_builtin -+$SHORT_DOC mpi_exscan number name -+Perform an exclusive scan across all processes in the same MPI job. -+ -+ -O OPERATION Operation to perform. Must be one of "max", "min", -+ "sum", "prod", "land", "band", "lor", "bor", "lxor", -+ "bxor", "maxloc", or "minloc" (default: "sum"). -+ -+Arguments: -+ NUMBER Integer to use in the scan operation. -+ -+ NAME Array variable in which to receive the result and, in -+ the case of maxloc and minloc, the associated rank. -+ -+In a exclusive-scan operation, each process i presents a number, a[i]. -+Once all processes in the MPI job have presented their number, the -+command assigns a[0] to NAME on rank 1, a[0]+a[1] to NAME on rank 2, -+a[0]+a[1]+a[2] to NAME on rank 3, and so forth. No assignment is -+performed on rank 0. The -O option enables "+" to be replaced with -+other operations. -+ -+Exclusive scans can be useful for assigning a unique index to each -+process in the MPI job. -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_exscan builtin. */ -+int -+mpi_exscan_builtin (list) -+ WORD_LIST *list; -+{ -+ return reduction_like (list, "mpi_exscan", MPI_Exscan); -+} -+ -+$BUILTIN mpi_allreduce -+$FUNCTION mpi_allreduce_builtin -+$SHORT_DOC mpi_allreduce number name -+Reduce numbers from all processes in an MPI job to a single number. -+ -+Options: -+ -+ -O OPERATION Operation to perform. Must be one of "max", "min", -+ "sum", "prod", "land", "band", "lor", "bor", "lxor", -+ "bxor", "maxloc", or "minloc" (default: "sum"). -+ -+Arguments: -+ NUMBER Integer to use in the allreduce operation. -+ -+ NAME Array variable in which to receive the result and, in -+ the case of maxloc and minloc, the associated rank. -+ -+In an all-reduce operation, each process i presents a number, a[i]. -+Once all processes in the MPI job have presented their number, the -+command returns a[0]+a[1]+...+a[n-1] to all ranks. The -O option -+enables "+" to be replaced with other operations. -+ -+All-reduces can be useful for reaching global agreement (e.g., of a -+termination condition). -+ -+Exit Status: -+Returns 0 unless an invalid option is given or an error occurs. -+$END -+ -+/* Here is the mpi_allreduce builtin. */ -+int -+mpi_allreduce_builtin (list) -+ WORD_LIST *list; -+{ -+ return reduction_like (list, "mpi_allreduce", MPI_Allreduce); -+} -diff -Naur bash-4.3/config.h.in mpibash-4.3/config.h.in ---- bash-4.3/config.h.in 2013-06-29 15:35:33.000000000 -0600 -+++ mpibash-4.3/config.h.in 2014-05-13 11:27:37.314100671 -0600 -@@ -1147,6 +1147,12 @@ - /* Define if you have the `__argz_stringify' function. */ - #undef HAVE___ARGZ_STRINGIFY - -+/* Define if you have both the header file and the libcircle library. */ -+#undef HAVE_LIBCIRCLE -+ -+/* Define if you have the `CIRCLE_cb_reduce_op' function. */ -+#undef HAVE_CIRCLE_CB_REDUCE_OP -+ - /* End additions for lib/intl */ - - #include "config-bot.h" -diff -Naur bash-4.3/configure.ac mpibash-4.3/configure.ac ---- bash-4.3/configure.ac 2014-02-11 08:37:53.000000000 -0700 -+++ mpibash-4.3/configure.ac 2014-05-13 11:27:37.302100179 -0600 -@@ -24,7 +24,7 @@ - AC_REVISION([for Bash 4.3, version 4.063])dnl - - define(bashvers, 4.3) --define(relstatus, release) -+define(relstatus, MPI) - - AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org]) - -@@ -813,6 +813,21 @@ - fi - ]) - -+dnl Ensure that we can find an MPI library. -+AC_CHECK_FUNCS([MPI_Init], [], [ -+ AC_MSG_ERROR([Cannot continue without MPI. Consider specifying CC=mpicc.])]) -+ -+dnl If we have Libcircle, use it, too. -+AC_SEARCH_LIBS([CIRCLE_cb_create], [circle], [AC_CHECK_HEADERS([libcircle.h])]) -+if test "x$ac_cv_header_libcircle_h" = xyes; then -+ libcircle_make_prefix="" -+ AC_DEFINE([HAVE_LIBCIRCLE], [1], [Define if you have the Libcircle header and library.]) -+ AC_CHECK_FUNCS([CIRCLE_cb_reduce_op]) -+else -+ libcircle_make_prefix="#" -+fi -+AC_SUBST([CIRCLE], [$libcircle_make_prefix]) -+ - BASH_CHECK_DECL(strtoimax) - BASH_CHECK_DECL(strtol) - BASH_CHECK_DECL(strtoll) -diff -Naur bash-4.3/Makefile.in mpibash-4.3/Makefile.in ---- bash-4.3/Makefile.in 2014-01-25 14:27:30.000000000 -0700 -+++ mpibash-4.3/Makefile.in 2014-05-13 11:27:37.314100671 -0600 -@@ -104,7 +104,7 @@ - VERSPROG = bashversion$(EXEEXT) - VERSOBJ = bashversion.$(OBJEXT) - --Program = bash$(EXEEXT) -+Program = mpibash$(EXEEXT) - Version = @BASHVERS@ - PatchLevel = `$(BUILD_DIR)/$(VERSPROG) -p` - RELSTATUS = @RELSTATUS@ -diff -Naur bash-4.3/shell.c mpibash-4.3/shell.c ---- bash-4.3/shell.c 2014-01-14 06:04:32.000000000 -0700 -+++ mpibash-4.3/shell.c 2014-05-13 11:27:37.314100671 -0600 -@@ -107,6 +107,13 @@ - extern char *primary_prompt, *secondary_prompt; - extern char *this_command_name; - -+extern void initialize_mpi __P((int, char **)); -+extern void finalize_mpi __P((void)); -+#ifdef HAVE_LIBCIRCLE -+extern void initialize_libcircle __P((int, char **)); -+extern void finalize_libcircle __P((void)); -+#endif -+ - /* Non-zero means that this shell has already been run; i.e. you should - call shell_reinitialize () if you need to start afresh. */ - int shell_initialized = 0; -@@ -324,7 +331,7 @@ - static void init_interactive_script __P((void)); - - static void set_shell_name __P((char *)); --static void shell_initialize __P((void)); -+static void shell_initialize __P((int, char **)); - static void shell_reinitialize __P((void)); - - static void show_shell_usage __P((FILE *, int)); -@@ -561,7 +568,7 @@ - - /* From here on in, the shell must be a normal functioning shell. - Variables from the environment are expected to be set, etc. */ -- shell_initialize (); -+ shell_initialize (argc, argv); - - set_default_lang (); - set_default_locale_vars (); -@@ -941,6 +948,12 @@ - end_job_control (); - #endif /* JOB_CONTROL */ - -+#ifdef HAVE_LIBCIRCLE -+ finalize_libcircle (); -+#else -+ finalize_mpi (); -+#endif -+ - /* Always return the exit status of the last command to our parent. */ - sh_exit (s); - } -@@ -1691,7 +1704,9 @@ - /* Do whatever is necessary to initialize the shell. - Put new initializations in here. */ - static void --shell_initialize () -+shell_initialize (argc, argv) -+ int argc; -+ char **argv; - { - char hostname[256]; - -@@ -1760,6 +1775,17 @@ - initialize_shell_options (privileged_mode||running_setuid); - initialize_bashopts (privileged_mode||running_setuid); - #endif -+ -+ /* Initialize Libcircle and MPI. */ -+#ifdef HAVE_LIBCIRCLE -+ initialize_libcircle (argc, argv); -+ initialize_mpi (argc, argv); -+ bind_variable ("libcircle", "yes", 0); -+#else -+ initialize_mpi (argc, argv); -+ bind_variable ("libcircle", "no", 0); -+#endif -+ bind_variable ("mpibash", "yes", 0); - } - - /* Function called by main () when it appears that the shell has already diff --git a/var/spack/packages/mpibash/package.py b/var/spack/packages/mpibash/package.py deleted file mode 100644 index d0f6dafed6..0000000000 --- a/var/spack/packages/mpibash/package.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -from spack import * - -class Mpibash(Package): - """Parallel scripting right from the Bourne-Again Shell (Bash)""" - homepage = "http://www.ccs3.lanl.gov/~pakin/software/mpibash-4.3.html" - - version('4.3', '81348932d5da294953e15d4814c74dd1', - url="http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz") - - # patch -p1 < ../mpibash-4.3.patch - patch('mpibash-4.3.patch', level=1, when='@4.3') - - # above patch modifies configure.ac - depends_on('autoconf') - - # uses MPI_Exscan which is in MPI-1.2 and later - depends_on('mpi@1.2:') - - depends_on('libcircle') - - def install(self, spec, prefix): - # run autoconf to rebuild configure - autoconf = which('autoconf') - autoconf() - - configure("--prefix=" + prefix, - "CC=mpicc") - - make(parallel=False) - - make("install") diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py deleted file mode 100644 index d48bf878f6..0000000000 --- a/var/spack/packages/mpich/package.py +++ /dev/null @@ -1,92 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with 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 Mpich(Package): - """MPICH is a high performance and widely portable implementation of - the Message Passing Interface (MPI) standard.""" - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - - version('3.1.4', '2ab544607986486562e076b83937bba2') - version('3.1.3', '93cb17f91ac758cbf9174ecb03563778') - version('3.1.2', '7fbf4b81dcb74b07ae85939d1ceee7f1') - version('3.1.1', '40dc408b1e03cc36d80209baaa2d32b7') - version('3.1', '5643dd176499bfb7d25079aaff25f2ec') - version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') - - provides('mpi@:3.0', when='@3:') - provides('mpi@:1.3', when='@1:') - - def setup_dependent_environment(self, module, spec, dep_spec): - """For dependencies, make mpicc's use spack wrapper.""" - os.environ['MPICH_CC'] = 'cc' - os.environ['MPICH_CXX'] = 'c++' - os.environ['MPICH_F77'] = 'f77' - os.environ['MPICH_F90'] = 'f90' - - - def install(self, spec, prefix): - config_args = ["--prefix=" + prefix, - "--enable-shared"] - - # TODO: Spack should make it so that you can't actually find - # these compilers if they're "disabled" for the current - # compiler configuration. - if not self.compiler.f77: - config_args.append("--disable-f77") - - if not self.compiler.fc: - config_args.append("--disable-fc") - - configure(*config_args) - make() - make("install") - - self.filter_compilers() - - - def filter_compilers(self): - """Run after install to make the MPI compilers use the - compilers that Spack built the package with. - - If this isn't done, they'll have CC, CXX, F77, and FC set - to Spack's generic cc, c++, f77, and f90. We want them to - be bound to whatever compiler they were built with. - """ - bin = self.prefix.bin - mpicc = os.path.join(bin, 'mpicc') - mpicxx = os.path.join(bin, 'mpicxx') - mpif77 = os.path.join(bin, 'mpif77') - mpif90 = os.path.join(bin, 'mpif90') - - kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } - filter_file('CC="cc"', 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) - filter_file('CXX="c++"', 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) - filter_file('F77="f77"', 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) - filter_file('FC="f90"', 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) diff --git a/var/spack/packages/mpileaks/package.py b/var/spack/packages/mpileaks/package.py deleted file mode 100644 index 4ef866588c..0000000000 --- a/var/spack/packages/mpileaks/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Mpileaks(Package): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/hpc/mpileaks" - url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz" - - version('1.0', '8838c574b39202a57d7c2d68692718aa') - - depends_on("mpi") - depends_on("adept-utils") - depends_on("callpath") - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--with-adept-utils=" + spec['adept-utils'].prefix, - "--with-callpath=" + spec['callpath'].prefix) - make() - make("install") diff --git a/var/spack/packages/mrnet/package.py b/var/spack/packages/mrnet/package.py deleted file mode 100644 index 6e9766f275..0000000000 --- a/var/spack/packages/mrnet/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Mrnet(Package): - """The MRNet Multi-Cast Reduction Network.""" - homepage = "http://paradyn.org/mrnet" - url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz" - - version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') - version('4.1.0', '5a248298b395b329e2371bf25366115c') - - parallel = False - - depends_on("boost") - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") - - make() - make("install") - diff --git a/var/spack/packages/munge/package.py b/var/spack/packages/munge/package.py deleted file mode 100644 index c737ca0354..0000000000 --- a/var/spack/packages/munge/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * -import os - -class Munge(Package): - """ MUNGE Uid 'N' Gid Emporium """ - homepage = "https://code.google.com/p/munge/" - url = "https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2" - - version('0.5.11', 'bd8fca8d5f4c1fcbef1816482d49ee01', url='https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2') - - depends_on('openssl') - depends_on('libgcrypt') - - def install(self, spec, prefix): - os.makedirs(os.path.join(prefix, "lib/systemd/system")) - configure("--prefix=%s" % prefix) - - make() - make("install") - diff --git a/var/spack/packages/muster/package.py b/var/spack/packages/muster/package.py deleted file mode 100644 index 722daf3d7f..0000000000 --- a/var/spack/packages/muster/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class Muster(Package): - """The Muster library provides implementations of sequential and - parallel K-Medoids clustering algorithms. It is intended as a - general framework for parallel cluster analysis, particularly - for performance data analysis on systems with very large - numbers of processes. - """ - homepage = "https://github.com/scalability-llnl/muster" - url = "https://github.com/scalability-llnl/muster/archive/v1.0.tar.gz" - - version('1.0.1', 'd709787db7e080447afb6571ac17723c') - version('1.0', '2eec6979a4a36d3a65a792d12969be16') - - depends_on("boost") - depends_on("mpi") - - def install(self, spec, prefix): - cmake(".", *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch b/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch deleted file mode 100644 index ff85845cf8..0000000000 --- a/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 -+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 -@@ -8,7 +8,7 @@ - * Copyright (C) 2008 Sun Microsystems, Lustre group - */ - --#define _XOPEN_SOURCE 600 -+//#define _XOPEN_SOURCE 600 - #include - #include - #include "ad_lustre.h" diff --git a/var/spack/packages/mvapich2/package.py b/var/spack/packages/mvapich2/package.py deleted file mode 100644 index ca0b1287c1..0000000000 --- a/var/spack/packages/mvapich2/package.py +++ /dev/null @@ -1,104 +0,0 @@ -import os -from spack import * - -class Mvapich2(Package): - """mvapich2 is an MPI implmenetation for infiniband networks.""" - homepage = "http://mvapich.cse.ohio-state.edu/" - - version('1.9', '5dc58ed08fd3142c260b70fe297e127c', - url="http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz") - patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') - - version('2.0', '9fbb68a4111a8b6338e476dc657388b4', - url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz') - - provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2 - provides('mpi@:3.0', when='@2.0') # MVAPICH2-2.0 supports MPI 3.0 - - - def install(self, spec, prefix): - # we'll set different configure flags depending on our environment - configure_args = [] - - # TODO: The MPICH*_FLAGS have a different name for 1.9 - - if '+debug' in spec: - # set configure flags for debug build - configure_args.append("--disable-fast") - configure_args.append("--enable-g=dbg") - configure_args.append("--enable-error-checking=runtime") - configure_args.append("--enable-error-messages=all") - configure_args.append("--enable-nmpi-as-mpi") - - if "%gnu" in spec: - # set variables for GNU compilers - os.environ['MPICHLIB_CFLAGS'] = "-g -O0" - os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0" - os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fno-second-underscore" - os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fno-second-underscore" - elif "%intel" in spec: - # set variables for Inel compilers - os.environ['MPICHLIB_CFLAGS'] = "-g -O0" - os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0" - os.environ['MPICHLIB_FFLAGS'] = "-g -O0" - os.environ['MPICHLIB_F90FLAGS'] = "-g -O0" - elif "%pgi" in spec: - # set variables for PGI compilers - os.environ['MPICHLIB_CFLAGS'] = "-g -O0 -fPIC" - os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0 -fPIC" - os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fPIC" - os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fPIC" - - else: - # set configure flags for normal optimizations - configure_args.append("--enable-fast=all") - configure_args.append("--enable-g=dbg") - configure_args.append("--enable-nmpi-as-mpi") - - if "%gnu" in spec: - # set variables for what compilers - os.environ['MPICHLIB_CFLAGS'] = "-g -O2" - os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2" - os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fno-second-underscore" - os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fno-second-underscore" - elif "%intel" in spec: - # set variables for Inel compilers - os.environ['MPICHLIB_CFLAGS'] = "-g -O2" - os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2" - os.environ['MPICHLIB_FFLAGS'] = "-g -O2" - os.environ['MPICHLIB_F90FLAGS'] = "-g -O2" - elif "%pgi" in spec: - # set variables for PGI compilers - os.environ['MPICHLIB_CFLAGS'] = "-g -O2 -fPIC" - os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2 -fPIC" - os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fPIC" - os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fPIC" - - # determine network type by variant - if "+psm" in spec: - # throw this flag on QLogic systems to use PSM - configure_args.append("--with-device=ch3:psm") - else: - # throw this flag on IB systems - configure_args.append("--with-device=ch3:mrail", "--with-rdma=gen2") - - # TODO: shared-memory build - - # TODO: CUDA - - # TODO: other file systems like panasis - - configure( - "--prefix=" + prefix, - "--enable-f77", "--enable-fc", "--enable-cxx", - "--enable-shared", "--enable-sharedlibs=gcc", - "--enable-debuginfo", - "--with-pm=no", "--with-pmi=slurm", - "--enable-romio", "--with-file-system=lustre+nfs+ufs", - "--disable-mpe", "--without-mpe", - "--disable-silent-rules", - *configure_args) - - make() - - make("install") diff --git a/var/spack/packages/nasm/package.py b/var/spack/packages/nasm/package.py deleted file mode 100644 index 933b6a62c5..0000000000 --- a/var/spack/packages/nasm/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Nasm(Package): - """NASM (Netwide Assembler) is an 80x86 assembler designed for - portability and modularity. It includes a disassembler as well.""" - homepage = "http://www.nasm.us" - url = "http://www.nasm.us/pub/nasm/releasebuilds/2.11.06/nasm-2.11.06.tar.xz" - - version('2.11.06', '2b958e9f5d200641e6fc9564977aecc5') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/ncdu/package.py b/var/spack/packages/ncdu/package.py deleted file mode 100644 index 234f9730d6..0000000000 --- a/var/spack/packages/ncdu/package.py +++ /dev/null @@ -1,28 +0,0 @@ -from spack import * - -class Ncdu(Package): - """ - Ncdu is a disk usage analyzer with an ncurses interface. It is designed - to find space hogs on a remote server where you don't have an entire - gaphical setup available, but it is a useful tool even on regular desktop - systems. Ncdu aims to be fast, simple and easy to use, and should be able - to run in any minimal POSIX-like environment with ncurses installed. - """ - - homepage = "http://dev.yorhel.nl/ncdu" - url = "http://dev.yorhel.nl/download/ncdu-1.11.tar.gz" - - version('1.11', '9e44240a5356b029f05f0e70a63c4d12') - version('1.10', '7535decc8d54eca811493e82d4bfab2d') - version('1.9' , '93258079db897d28bb8890e2db89b1fb') - version('1.8' , '94d7a821f8a0d7ba8ef3dd926226f7d5') - version('1.7' , '172047c29d232724cc62e773e82e592a') - - depends_on("ncurses") - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix, - '--with-ncurses=%s' % spec['ncurses']) - - make() - make("install") diff --git a/var/spack/packages/ncurses/package.py b/var/spack/packages/ncurses/package.py deleted file mode 100644 index cc180bbae1..0000000000 --- a/var/spack/packages/ncurses/package.py +++ /dev/null @@ -1,33 +0,0 @@ -from spack import * - -class Ncurses(Package): - """The ncurses (new curses) library is a free software emulation of curses - in System V Release 4.0, and more. It uses terminfo format, supports pads and - color and multiple highlights and forms characters and function-key mapping, - and has all the other SYSV-curses enhancements over BSD curses. - """ - - homepage = "http://invisible-island.net/ncurses/ncurses.html" - - version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1', - url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz') - version('6.0', 'ee13d052e1ead260d7c28071f46eefb1', - url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-shared", - "--enable-widec", - "--disable-pc-files", - "--without-ada") - make() - make("install") - - configure("--prefix=%s" % prefix, - "--with-shared", - "--disable-widec", - "--disable-pc-files", - "--without-ada") - make() - make("install") - diff --git a/var/spack/packages/netcdf/netcdf-4.3.3-mpi.patch b/var/spack/packages/netcdf/netcdf-4.3.3-mpi.patch deleted file mode 100644 index 46dda5fc9d..0000000000 --- a/var/spack/packages/netcdf/netcdf-4.3.3-mpi.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nur netcdf-4.3.3/CMakeLists.txt netcdf-4.3.3.mpi/CMakeLists.txt ---- netcdf-4.3.3/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500 -+++ netcdf-4.3.3.mpi/CMakeLists.txt 2015-10-14 16:44:41.176300658 -0400 -@@ -753,6 +753,7 @@ - SET(USE_PARALLEL OFF CACHE BOOL "") - MESSAGE(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.") - ELSE() -+ FIND_PACKAGE(MPI REQUIRED) - SET(USE_PARALLEL ON CACHE BOOL "") - SET(STATUS_PARALLEL "ON") - ENDIF() -diff -Nur netcdf-4.3.3/liblib/CMakeLists.txt netcdf-4.3.3.mpi/liblib/CMakeLists.txt ---- netcdf-4.3.3/liblib/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500 -+++ netcdf-4.3.3.mpi/liblib/CMakeLists.txt 2015-10-14 16:44:57.757793634 -0400 -@@ -71,6 +71,10 @@ - SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY}) - ENDIF() - -+IF(USE_PARALLEL) -+ SET(TLL_LIBS ${TLL_LIBS} ${MPI_C_LIBRARIES}) -+ENDIF() -+ - IF(USE_HDF4) - SET(TLL_LIBS ${TLL_LIBS} ${HDF4_LIBRARIES}) - ENDIF() diff --git a/var/spack/packages/netcdf/package.py b/var/spack/packages/netcdf/package.py deleted file mode 100644 index e1e0d836c6..0000000000 --- a/var/spack/packages/netcdf/package.py +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class Netcdf(Package): - """NetCDF is a set of software libraries and self-describing, machine-independent - data formats that support the creation, access, and sharing of array-oriented - scientific data.""" - - homepage = "http://www.unidata.ucar.edu/software/netcdf/" - url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz" - - version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') - - patch('netcdf-4.3.3-mpi.patch') - - # Dependencies: - # >HDF5 - depends_on("hdf5") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', - "-DCMAKE_INSTALL_PREFIX:PATH=%s" % prefix, - "-DENABLE_DAP:BOOL=OFF", # Disable DAP. - "-DBUILD_SHARED_LIBS:BOOL=OFF") # Don't build shared libraries (use static libs). - - make() - make("install") diff --git a/var/spack/packages/netgauge/package.py b/var/spack/packages/netgauge/package.py deleted file mode 100644 index c2378b0718..0000000000 --- a/var/spack/packages/netgauge/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Netgauge(Package): - """Netgauge is a high-precision network parameter measurement - tool. It supports benchmarking of many different network protocols - and communication patterns. The main focus lies on accuracy, - statistical analysis and easy extensibility. - """ - homepage = "http://unixer.de/research/netgauge/" - url = "http://unixer.de/research/netgauge/netgauge-2.4.6.tar.gz" - - version('2.4.6', 'e0e040ec6452e93ca21ccc54deac1d7f') - - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/netlib-blas/package.py b/var/spack/packages/netlib-blas/package.py deleted file mode 100644 index 85e97323d3..0000000000 --- a/var/spack/packages/netlib-blas/package.py +++ /dev/null @@ -1,46 +0,0 @@ -from spack import * -import os - - -class NetlibBlas(Package): - """Netlib reference BLAS""" - homepage = "http://www.netlib.org/lapack/" - url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" - - version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') - - variant('fpic', default=False, description="Build with -fpic compiler option") - - # virtual dependency - provides('blas') - - # Doesn't always build correctly in parallel - parallel = False - - def patch(self): - os.symlink('make.inc.example', 'make.inc') - - mf = FileFilter('make.inc') - mf.filter('^FORTRAN.*', 'FORTRAN = f90') - mf.filter('^LOADER.*', 'LOADER = f90') - mf.filter('^CC =.*', 'CC = cc') - - if '+fpic' in self.spec: - mf.filter('^OPTS.*=.*', 'OPTS = -O2 -frecursive -fpic') - mf.filter('^CFLAGS =.*', 'CFLAGS = -O3 -fpic') - - - def install(self, spec, prefix): - make('blaslib') - - # Tests that blas builds correctly - make('blas_testing') - - # No install provided - mkdirp(prefix.lib) - install('librefblas.a', prefix.lib) - - # Blas virtual package should provide blas.a and libblas.a - with working_dir(prefix.lib): - symlink('librefblas.a', 'blas.a') - symlink('librefblas.a', 'libblas.a') diff --git a/var/spack/packages/netlib-lapack/package.py b/var/spack/packages/netlib-lapack/package.py deleted file mode 100644 index fb6b99e27c..0000000000 --- a/var/spack/packages/netlib-lapack/package.py +++ /dev/null @@ -1,59 +0,0 @@ -from spack import * - -class NetlibLapack(Package): - """ - LAPACK version 3.X is a comprehensive FORTRAN library that does - linear algebra operations including matrix inversions, least - squared solutions to linear sets of equations, eigenvector - analysis, singular value decomposition, etc. It is a very - comprehensive and reputable package that has found extensive - use in the scientific community. - """ - homepage = "http://www.netlib.org/lapack/" - url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" - - version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') - version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') - version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') - version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') - version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') - - variant('shared', default=False, description="Build shared library version") - - # virtual dependency - provides('lapack') - - # blas is a virtual dependency. - depends_on('blas') - - depends_on('cmake') - - # Doesn't always build correctly in parallel - parallel = False - - @when('^netlib-blas') - def get_blas_libs(self): - blas = self.spec['netlib-blas'] - return [join_path(blas.prefix.lib, 'blas.a')] - - - @when('^atlas') - def get_blas_libs(self): - blas = self.spec['atlas'] - return [join_path(blas.prefix.lib, l) - for l in ('libf77blas.a', 'libatlas.a')] - - - def install(self, spec, prefix): - blas_libs = ";".join(self.get_blas_libs()) - cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] - - if '+shared' in spec: - cmake_args.append('-DBUILD_SHARED_LIBS=ON') - - cmake_args += std_cmake_args - - cmake(*cmake_args) - make() - make("install") - diff --git a/var/spack/packages/nettle/package.py b/var/spack/packages/nettle/package.py deleted file mode 100644 index cd600b0b87..0000000000 --- a/var/spack/packages/nettle/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Nettle(Package): - """The Nettle package contains the low-level cryptographic library - that is designed to fit easily in many contexts.""" - - homepage = "http://www.example.com" - url = "http://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz" - - version('2.7', '2caa1bd667c35db71becb93c5d89737f') - - depends_on('gmp') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/ompss/package.py b/var/spack/packages/ompss/package.py deleted file mode 100644 index e09e0a624f..0000000000 --- a/var/spack/packages/ompss/package.py +++ /dev/null @@ -1,50 +0,0 @@ -from spack import * -import os -import glob - -# working config lines for ompss 14.06 : -#./nanox-0.7/config.log: $ ./configure --prefix=/usr/gapps/exmatex/ompss --with-mcc=/usr/gapps/exmatex/ompss/ --with-hwloc=/usr -#./mcxx-1.99.2/config.log: $ ./configure --prefix=/usr/gapps/exmatex/ompss --with-nanox=/usr/gapps/exmatex/ompss --enable-ompss --with-mpi=/opt/mvapich2-intel-shmem-1.7 --enable-tl-openmp-profile --enable-tl-openmp-intel - -class Ompss(Package): - """OmpSs is an effort to integrate features from the StarSs - programming model developed by BSC into a single programming - model. In particular, our objective is to extend OpenMP with - new directives to support asynchronous parallelism and - heterogeneity (devices like GPUs). However, it can also be - understood as new directives extending other accelerator based - APIs like CUDA or OpenCL. Our OmpSs environment is built on top - of our Mercurium compiler and Nanos++ runtime system.""" - homepage = "http://pm.bsc.es/" - url = "http://pm.bsc.es/sites/default/files/ftp/ompss/releases/ompss-14.10.tar.gz" - list_url = 'http://pm.bsc.es/ompss-downloads' - - version('14.10', '404d161265748f2f96bb35fd8c7e79ee') - - # all dependencies are optional, really - depends_on("mpi") - #depends_on("openmp") - depends_on("hwloc") - depends_on("extrae") - - def install(self, spec, prefix): - if 'openmpi' in spec: - mpi = spec['openmpi'] - elif 'mpich' in spec: - mpi = spec['mpich'] - elif 'mvapich' in spec: - mpi = spec['mvapich'] - - openmp_options = ["--enable-tl-openmp-profile"] - if spec.satisfies('%intel'): - openmp_options.append( "--enable-tl-openmp-intel" ) - - os.chdir(glob.glob('./nanox-*').pop()) - configure("--prefix=%s" % prefix, "--with-mcc=%s" % prefix, "--with-extrae=%s" % spec['extrae'].prefix, "--with-hwloc=%s" % spec['hwloc'].prefix) - make() - make("install") - - os.chdir(glob.glob('../mcxx-*').pop()) - configure("--prefix=%s" % prefix, "--with-nanox=%s" % prefix, "--enable-ompss", "--with-mpi=%s" % mpi.prefix, *openmp_options) - make() - make("install") diff --git a/var/spack/packages/ompt-openmp/package.py b/var/spack/packages/ompt-openmp/package.py deleted file mode 100644 index 5d380ebd77..0000000000 --- a/var/spack/packages/ompt-openmp/package.py +++ /dev/null @@ -1,23 +0,0 @@ -from spack import * - -class OmptOpenmp(Package): - """LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP mirror. This library provides a drop-in replacement of the OpenMP runtimes for GCC, Intel and LLVM/Clang.""" - homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" - url = "http://github.com/khuck/LLVM-openmp/archive/v0.1-spack.tar.gz" - - version('spack', '35227b2726e377faa433fc841226e036') - - # depends_on("foo") - - def install(self, spec, prefix): - with working_dir("runtime/build", create=True): - - # FIXME: Modify the configure line to suit your build system here. - cmake('-DCMAKE_C_COMPILER=%s' % self.compiler.cc, - '-DCMAKE_CXX_COMPILER=%s' % self.compiler.cxx, - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '..', *std_cmake_args) - - # FIXME: Add logic to build and install here - make() - make("install") diff --git a/var/spack/packages/opari2/package.py b/var/spack/packages/opari2/package.py deleted file mode 100644 index daaee61e3a..0000000000 --- a/var/spack/packages/opari2/package.py +++ /dev/null @@ -1,65 +0,0 @@ -# FIXME: Add copyright statement here - -from spack import * -from contextlib import closing - -class Opari2(Package): - """OPARI2 is a source-to-source instrumentation tool for OpenMP and - hybrid codes. It surrounds OpenMP directives and runtime library - calls with calls to the POMP2 measurement interface. - OPARI2 will provide you with a new initialization method that allows - for multi-directory and parallel builds as well as the usage of - pre-instrumented libraries. Furthermore, an efficient way of - tracking parent-child relationships was added. Additionally, we - extended OPARI2 to support instrumentation of OpenMP 3.0 - tied tasks. """ - - homepage = "http://www.vi-hps.org/projects/score-p" - url = "http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.2.tar.gz" - - version('1.1.2', '9a262c7ca05ff0ab5f7775ae96f3539e') - - backend_user_provided = """\ -CC=cc -CXX=c++ -F77=f77 -FC=f90 -CFLAGS=-fPIC -CXXFLAGS=-fPIC -""" - frontend_user_provided = """\ -CC_FOR_BUILD=cc -CXX_FOR_BUILD=c++ -F77_FOR_BUILD=f70 -FC_FOR_BUILD=f90 -CFLAGS_FOR_BUILD=-fPIC -CXXFLAGS_FOR_BUILD=-fPIC -""" - mpi_user_provided = """\ -MPICC=mpicc -MPICXX=mpicxx -MPIF77=mpif77 -MPIFC=mpif90 -MPI_CFLAGS=-fPIC -MPI_CXXFLAGS=-fPIC -""" - - def install(self, spec, prefix): - # Use a custom compiler configuration, otherwise the score-p - # build system messes with spack's compiler settings. - # Create these three files in the build directory - with closing(open("platform-backend-user-provided", "w")) as backend_file: - backend_file.write(self.backend_user_provided) - with closing(open("platform-frontend-user-provided", "w")) as frontend_file: - frontend_file.write(self.frontend_user_provided) - with closing(open("platform-mpi-user-provided", "w")) as mpi_file: - mpi_file.write(self.mpi_user_provided) - - # FIXME: Modify the configure line to suit your build system here. - configure("--prefix=%s" % prefix, - "--with-custom-compilers", - "--enable-shared") - - # FIXME: Add logic to build and install here - make() - make("install") diff --git a/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch b/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch deleted file mode 100644 index daa825ccbe..0000000000 --- a/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 -+++ b/ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 -@@ -8,7 +8,7 @@ - * Copyright (C) 2008 Sun Microsystems, Lustre group - */ - --#define _XOPEN_SOURCE 600 -+//#define _XOPEN_SOURCE 600 - #include - #include - #include "ad_lustre.h" diff --git a/var/spack/packages/openmpi/llnl-platforms.patch b/var/spack/packages/openmpi/llnl-platforms.patch deleted file mode 100644 index f515743c4d..0000000000 --- a/var/spack/packages/openmpi/llnl-platforms.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff -Nuar openmpi-1.6.5.orig/contrib/platform/llnl/optimized openmpi-1.6.5.llnl/contrib/platform/llnl/optimized ---- openmpi-1.6.5.orig/contrib/platform/llnl/optimized 1969-12-31 16:00:00.000000000 -0800 -+++ openmpi-1.6.5.llnl/contrib/platform/llnl/optimized 2013-08-08 23:47:12.704029000 -0700 -@@ -0,0 +1,29 @@ -+enable_dlopen=no -+enable_mem_debug=no -+enable_mem_profile=no -+enable_debug_symbols=no -+enable_binaries=yes -+enable_heterogeneous=no -+enable_debug=no -+enable_shared=yes -+enable_static=yes -+enable_memchecker=no -+enable_ipv6=no -+enable_mpi_f77=yes -+enable_mpi_f90=yes -+enable_mpi_cxx=yes -+enable_mpi_cxx_seek=yes -+enable_cxx_exceptions=no -+enable_ft_thread=no -+enable_per_user_config_files=no -+enable_mca_no_build=carto,crs,filem,routed-linear,snapc,pml-dr,pml-crcp2,pml-crcpw,pml-v,pml-example,crcp,btl-tcp -+enable_contrib_no_build=libnbc,vt -+with_slurm=yes -+with_pmi=yes -+with_tm=no -+with_openib=yes -+with_psm=yes -+with_devel_headers=yes -+with_io_romio_flags=--with-file-system=ufs+nfs+lustre -+with_memory_manager=ptmalloc2 -+with_valgrind=no -diff -Nuar openmpi-1.6.5.orig/contrib/platform/llnl/optimized.conf openmpi-1.6.5.llnl/contrib/platform/llnl/optimized.conf ---- openmpi-1.6.5.orig/contrib/platform/llnl/optimized.conf 1969-12-31 16:00:00.000000000 -0800 -+++ openmpi-1.6.5.llnl/contrib/platform/llnl/optimized.conf 2013-08-08 23:43:52.907553000 -0700 -@@ -0,0 +1,114 @@ -+# -+# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -+# University Research and Technology -+# Corporation. All rights reserved. -+# Copyright (c) 2004-2005 The University of Tennessee and The University -+# of Tennessee Research Foundation. All rights -+# reserved. -+# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -+# University of Stuttgart. All rights reserved. -+# Copyright (c) 2004-2005 The Regents of the University of California. -+# All rights reserved. -+# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. -+# Copyright (c) 2011 Los Alamos National Security, LLC. -+# All rights reserved. -+# $COPYRIGHT$ -+# -+# Additional copyrights may follow -+# -+# $HEADER$ -+# -+ -+# This is the default system-wide MCA parameters defaults file. -+# Specifically, the MCA parameter "mca_param_files" defaults to a -+# value of -+# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf" -+# (this file is the latter of the two). So if the default value of -+# mca_param_files is not changed, this file is used to set system-wide -+# MCA parameters. This file can therefore be used to set system-wide -+# default MCA parameters for all users. Of course, users can override -+# these values if they want, but this file is an excellent location -+# for setting system-specific MCA parameters for those users who don't -+# know / care enough to investigate the proper values for them. -+ -+# Note that this file is only applicable where it is visible (in a -+# filesystem sense). Specifically, MPI processes each read this file -+# during their startup to determine what default values for MCA -+# parameters should be used. mpirun does not bundle up the values in -+# this file from the node where it was run and send them to all nodes; -+# the default value decisions are effectively distributed. Hence, -+# these values are only applicable on nodes that "see" this file. If -+# $sysconf is a directory on a local disk, it is likely that changes -+# to this file will need to be propagated to other nodes. If $sysconf -+# is a directory that is shared via a networked filesystem, changes to -+# this file will be visible to all nodes that share this $sysconf. -+ -+# The format is straightforward: one per line, mca_param_name = -+# rvalue. Quoting is ignored (so if you use quotes or escape -+# characters, they'll be included as part of the value). For example: -+ -+# Disable run-time MPI parameter checking -+# mpi_param_check = 0 -+ -+# Note that the value "~/" will be expanded to the current user's home -+# directory. For example: -+ -+# Change component loading path -+# component_path = /usr/local/lib/openmpi:~/my_openmpi_components -+ -+# See "ompi_info --param all all" for a full listing of Open MPI MCA -+# parameters available and their default values. -+# -+ -+# Basic behavior to smooth startup -+mca_component_show_load_errors = 0 -+orte_abort_timeout = 10 -+opal_set_max_sys_limits = 1 -+orte_report_launch_progress = 1 -+ -+# Define timeout for daemons to report back during launch -+orte_startup_timeout = 10000 -+ -+## Protect the shared file systems -+orte_no_session_dirs = /p,/usr/local,/usr/global,/nfs/tmp1,/nfs/tmp2 -+orte_tmpdir_base = /tmp -+ -+## Require an allocation to run - protects the frontend -+## from inadvertent job executions -+orte_allocation_required = 1 -+ -+## MPI behavior -+## Do NOT specify mpi_leave_pinned so system -+## can figure out for itself whether or not -+## it is supported and usable -+orte_notifier = syslog -+ -+## Add the interface for out-of-band communication -+## and set it up -+oob_tcp_if_include=ib0 -+oob_tcp_peer_retries = 1000 -+oob_tcp_disable_family = IPv6 -+oob_tcp_listen_mode = listen_thread -+oob_tcp_sndbuf = 32768 -+oob_tcp_rcvbuf = 32768 -+ -+## Define the MPI interconnects -+btl = sm,openib,self -+ -+## We are using the PSM MTL by default -+## There can only be one! -+pml = cm -+ -+## Setup OpenIB - just in case -+btl_openib_want_fork_support = 0 -+btl_openib_cpc_include = oob -+btl_openib_receive_queues = S,4096,1024:S,12288,512:S,65536,512 -+ -+## Enable cpu affinity -+opal_paffinity_alone = 1 -+ -+## Setup MPI options -+mpi_show_handle_leaks = 0 -+mpi_warn_on_fork = 1 -+mpi_abort_print_stack = 0 -+ diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py deleted file mode 100644 index 5e429dedf5..0000000000 --- a/var/spack/packages/openmpi/package.py +++ /dev/null @@ -1,109 +0,0 @@ -import os - -from spack import * - - -class Openmpi(Package): - """Open MPI is a project combining technologies and resources from - several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) - in order to build the best MPI library available. A completely - new MPI-2 compliant implementation, Open MPI offers advantages - for system and software vendors, application developers and - computer science researchers. - """ - - homepage = "http://www.open-mpi.org" - - version('1.10.0', '280cf952de68369cebaca886c5ce0304', - url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2") - version('1.8.8', '0dab8e602372da1425e9242ae37faf8c', - url = 'http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.bz2') - version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475', - url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2") - - patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") - patch('llnl-platforms.patch', when="@1.6.5") - - provides('mpi@:2.2', when='@1.6.5') # Open MPI 1.6.5 supports MPI-2.2 - provides('mpi@:3.0', when='@1.8.8') # Open MPI 1.8.8 supports MPI-3.0 - provides('mpi@:3.0', when='@1.10.0') # Open MPI 1.10.0 supports MPI-3.0 - - - def setup_dependent_environment(self, module, spec, dep_spec): - """For dependencies, make mpicc's use spack wrapper.""" - os.environ['OMPI_CC'] = 'cc' - os.environ['OMPI_CXX'] = 'c++' - os.environ['OMPI_FC'] = 'f90' - os.environ['OMPI_F77'] = 'f77' - - - def install(self, spec, prefix): - config_args = ["--prefix=%s" % prefix] - - # TODO: use variants for this, e.g. +lanl, +llnl, etc. - # use this for LANL builds, but for LLNL builds, we need: - # "--with-platform=contrib/platform/llnl/optimized" - if self.version == ver("1.6.5") and '+lanl' in spec: - config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") - - # TODO: Spack should make it so that you can't actually find - # these compilers if they're "disabled" for the current - # compiler configuration. - if not self.compiler.f77 and not self.compiler.fc: - config_args.append("--enable-mpi-fortran=no") - - configure(*config_args) - make() - make("install") - - self.filter_compilers() - - - def filter_compilers(self): - """Run after install to make the MPI compilers use the - compilers that Spack built the package with. - - If this isn't done, they'll have CC, CXX and FC set - to Spack's generic cc, c++ and f90. We want them to - be bound to whatever compiler they were built with. - """ - kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : False } - dir = os.path.join(self.prefix, 'share/openmpi/') - - cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt', - 'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt'] - - cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt', - 'ortec++-wrapper-data.txt'] - - fc_wrappers = ['mpifort-vt-wrapper-data.txt', - 'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt'] - - for wrapper in cc_wrappers: - filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc, - os.path.join(dir, wrapper), **kwargs) - - for wrapper in cxx_wrappers: - filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx, - os.path.join(dir, wrapper), **kwargs) - - for wrapper in fc_wrappers: - filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, - os.path.join(dir, wrapper), **kwargs) - - # These are symlinks in newer versions, so check that here - f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt'] - f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt'] - - for wrapper in f77_wrappers: - path = os.path.join(dir, wrapper) - if not os.path.islink(path): - filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77, - path, **kwargs) - for wrapper in f90_wrappers: - path = os.path.join(dir, wrapper) - if not os.path.islink(path): - filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, - path, **kwargs) - - diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py deleted file mode 100644 index c5a8aeb9dc..0000000000 --- a/var/spack/packages/openssl/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * - -class Openssl(Package): - """The OpenSSL Project is a collaborative effort to develop a - robust, commercial-grade, full-featured, and Open Source - toolkit implementing the Secure Sockets Layer (SSL v2/v3) and - Transport Layer Security (TLS v1) protocols as well as a - full-strength general purpose cryptography library.""" - homepage = "http://www.openssl.org" - url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" - - version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') - - depends_on("zlib") - parallel = False - - def install(self, spec, prefix): - config = Executable("./config") - config("--prefix=%s" % prefix, - "--openssldir=%s/etc/openssl" % prefix, - "zlib", - "no-krb5", - "shared") - - make() - make("install") diff --git a/var/spack/packages/otf/package.py b/var/spack/packages/otf/package.py deleted file mode 100644 index 52893dd265..0000000000 --- a/var/spack/packages/otf/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Otf(Package): - """To improve scalability for very large and massively parallel - traces the Open Trace Format (OTF) is developed at ZIH as a - successor format to the Vampir Trace Format (VTF3).""" - - homepage = "http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/otf/index_html/document_view?set_language=en" - url = "http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=otf&get=OTF-1.12.5salmon.tar.gz" - - version('1.12.5salmon', 'bf260198633277031330e3356dcb4eec') - - depends_on('zlib') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix, - '--without-vtf3', - '--with-zlib', - '--with-zlibsymbols') - make() - make("install") diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py deleted file mode 100644 index fa0a5898b6..0000000000 --- a/var/spack/packages/otf2/package.py +++ /dev/null @@ -1,74 +0,0 @@ -# FIXME: Add copyright - -from spack import * -from contextlib import closing -import os - -class Otf2(Package): - """The Open Trace Format 2 is a highly scalable, memory efficient event - trace data format plus support library.""" - - homepage = "http://www.vi-hps.org/score-p" - url = "http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz" - - version('1.4', 'a23c42e936eb9209c4e08b61c3cf5092', - url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz") - version('1.3.1', 'd0ffc4e858455ace4f596f910e68c9f2', - url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.3.1.tar.gz") - version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8', - url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") - - backend_user_provided = """\ -CC=cc -CXX=c++ -F77=f77 -FC=f90 -CFLAGS=-fPIC -CXXFLAGS=-fPIC -""" - frontend_user_provided = """\ -CC_FOR_BUILD=cc -CXX_FOR_BUILD=c++ -F77_FOR_BUILD=f70 -FC_FOR_BUILD=f90 -CFLAGS_FOR_BUILD=-fPIC -CXXFLAGS_FOR_BUILD=-fPIC -""" - mpi_user_provided = """\ -MPICC=cc -MPICXX=c++ -MPIF77=f77 -MPIFC=f90 -MPI_CFLAGS=-fPIC -MPI_CXXFLAGS=-fPIC -""" - - @when('@:1.2.1') - def version_specific_args(self): - return ["--with-platform=disabled", "CC=cc", "CXX=c++", "F77=f77", "F90=f90", "CFLAGS=-fPIC", "CXXFLAGS=-fPIC"] - - @when('@1.3:') - def version_specific_args(self): - # TODO: figure out what scorep's build does as of otf2 1.3 - return ["--with-custom-compilers"] - - def install(self, spec, prefix): - # Use a custom compiler configuration, otherwise the score-p - # build system messes with spack's compiler settings. - # Create these three files in the build directory - with closing(open("platform-backend-user-provided", "w")) as backend_file: - backend_file.write(self.backend_user_provided) - with closing(open("platform-frontend-user-provided", "w")) as frontend_file: - frontend_file.write(self.frontend_user_provided) - with closing(open("platform-mpi-user-provided", "w")) as mpi_file: - mpi_file.write(self.mpi_user_provided) - - configure_args=["--prefix=%s" % prefix, - "--enable-shared"] - - configure_args.extend(self.version_specific_args()) - - configure(*configure_args) - - make() - make("install") diff --git a/var/spack/packages/pango/package.py b/var/spack/packages/pango/package.py deleted file mode 100644 index df43625bf5..0000000000 --- a/var/spack/packages/pango/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Pango(Package): - """Pango is a library for laying out and rendering of text, with - an emphasis on internationalization. It can be used anywhere - that text layout is needed, though most of the work on Pango so - far has been done in the context of the GTK+ widget toolkit.""" - homepage = "http://www.pango.org" - url = "http://ftp.gnome.org/pub/gnome/sources/pango/1.36/pango-1.36.8.tar.xz" - - version('1.36.8', '217a9a753006275215fa9fa127760ece') - - depends_on("harfbuzz") - depends_on("cairo") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/papi/package.py b/var/spack/packages/papi/package.py deleted file mode 100644 index 596f7114d6..0000000000 --- a/var/spack/packages/papi/package.py +++ /dev/null @@ -1,35 +0,0 @@ -from spack import * -import os - -class Papi(Package): - """PAPI provides the tool designer and application engineer with a - consistent interface and methodology for use of the performance - counter hardware found in most major microprocessors. PAPI - enables software engineers to see, in near real time, the - relation between software performance and processor events. In - addition Component PAPI provides access to a collection of - components that expose performance measurement opportunites - across the hardware and software stack.""" - homepage = "http://icl.cs.utk.edu/papi/index.html" - url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.3.0.tar.gz" - - version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') - - def install(self, spec, prefix): - os.chdir("src/") - - configure_args=["--prefix=%s" % prefix] - - # need to force consistency in the use of compilers - if spec.satisfies('%gcc'): - configure_args.append('CC=gcc') - configure_args.append('MPICH_CC=gcc') - if spec.satisfies('%intel'): - configure_args.append('CC=icc') - configure_args.append('MPICH_CC=icc') - - configure(*configure_args) - - make() - make("install") - diff --git a/var/spack/packages/paraver/package.py b/var/spack/packages/paraver/package.py deleted file mode 100644 index 5f8a153d4c..0000000000 --- a/var/spack/packages/paraver/package.py +++ /dev/null @@ -1,41 +0,0 @@ -from spack import * -import os - -class Paraver(Package): - """"A very powerful performance visualization and analysis tool - based on traces that can be used to analyse any information that - is expressed on its input trace format. Traces for parallel MPI, - OpenMP and other programs can be genereated with Extrae.""" - homepage = "http://www.bsc.es/computer-sciences/performance-tools/paraver" - url = "http://www.bsc.es/ssl/apps/performanceTools/files/paraver-sources-4.5.3.tar.gz" - - version('4.5.3', '625de9ec0d639acd18d1aaa644b38f72') - - depends_on("boost") - #depends_on("extrae") - depends_on("wx") - depends_on("wxpropgrid") - - def install(self, spec, prefix): - os.chdir("ptools_common_files") - configure("--prefix=%s" % prefix) - make() - make("install") - - os.chdir("../paraver-kernel") - #"--with-extrae=%s" % spec['extrae'].prefix, - configure("--prefix=%s" % prefix, "--with-ptools-common-files=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization") - make() - make("install") - - os.chdir("../paraver-toolset") - configure("--prefix=%s" % prefix) - make() - make("install") - - os.chdir("../wxparaver") - #"--with-extrae=%s" % spec['extrae'].prefix, - configure("--prefix=%s" % prefix, "--with-paraver=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization", "--with-wxdir=%s" % spec['wx'].prefix.bin) - make() - make("install") - diff --git a/var/spack/packages/paraview/package.py b/var/spack/packages/paraview/package.py deleted file mode 100644 index a0ff812ca2..0000000000 --- a/var/spack/packages/paraview/package.py +++ /dev/null @@ -1,72 +0,0 @@ -from spack import * - -class Paraview(Package): - homepage = 'http://www.paraview.org' - url = 'http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz' - - version('4.4.0', 'fa1569857dd680ebb4d7ff89c2227378', url='http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz') - - variant('python', default=False, description='Enable Python support') - variant('matplotlib', default=False, description='Enable Matplotlib support') - variant('numpy', default=False, description='Enable NumPy support') - - variant('tcl', default=False, description='Enable TCL support') - - variant('mpi', default=False, description='Enable MPI support') - - variant('osmesa', default=False, description='Enable OSMesa support') - variant('qt', default=False, description='Enable Qt support') - - depends_on('python', when='+python') - depends_on('py-numpy', when='+python+numpy') - depends_on('py-matplotlib', when='+python+matplotlib') - depends_on('tcl', when='+tcl') - depends_on('mpi', when='+mpi') - depends_on('qt', when='+qt') - - depends_on('bzip2') - depends_on('freetype') - depends_on('hdf5') # drags in mpi - depends_on('jpeg') - depends_on('libpng') - depends_on('libtiff') - #depends_on('libxml2') # drags in python - depends_on('netcdf') - #depends_on('protobuf') # version mismatches? - #depends_on('sqlite') # external version not supported - depends_on('zlib') - - 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')) - feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' % feature_to_bool('+mpi')) - 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) - - cmake('..', - '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, - '-DBUILD_TESTING:BOOL=OFF', - '-DVTK_USER_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USER_SYSTEM_HDF5:BOOL=ON', - '-DVTK_USER_SYSTEM_JPEG:BOOL=ON', - #'-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USER_SYSTEM_NETCDF:BOOL=ON', - '-DVTK_USER_SYSTEM_TIFF:BOOL=ON', - '-DVTK_USER_SYSTEM_ZLIB:BOOL=ON', - *feature_args) - make() - make('install') diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py deleted file mode 100644 index d8cd337304..0000000000 --- a/var/spack/packages/parmetis/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * - -class Parmetis(Package): - """ParMETIS is an MPI-based parallel library that implements a - variety of algorithms for partitioning unstructured graphs, - meshes, and for computing fill-reducing orderings of sparse - matrices.""" - homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview" - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz" - - version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') - - depends_on('mpi') - - def install(self, spec, prefix): - cmake(".", - '-DGKLIB_PATH=%s/metis/GKlib' % pwd(), - '-DMETIS_PATH=%s/metis' % pwd(), - '-DSHARED=1', - '-DCMAKE_C_COMPILER=mpicc', - '-DCMAKE_CXX_COMPILER=mpicxx', - '-DSHARED=1', - *std_cmake_args) - - make() - make("install") diff --git a/var/spack/packages/parpack/package.py b/var/spack/packages/parpack/package.py deleted file mode 100644 index 622aceca04..0000000000 --- a/var/spack/packages/parpack/package.py +++ /dev/null @@ -1,43 +0,0 @@ -from spack import * -import os -import shutil - -class Parpack(Package): - """ARPACK is a collection of Fortran77 subroutines designed to solve large - scale eigenvalue problems.""" - - homepage = "http://www.caam.rice.edu/software/ARPACK/download.html" - url = "http://www.caam.rice.edu/software/ARPACK/SRC/parpack96.tar.Z" - - version('96', 'a175f70ff71837a33ff7e4b0b6054f43') - - depends_on('mpi') - depends_on('blas') - depends_on('lapack') - - def patch(self): - # Filter the CJ makefile to make a spack one. - shutil.move('ARMAKES/ARmake.CJ', 'ARmake.inc') - mf = FileFilter('ARmake.inc') - - # Be sure to use Spack F77 wrapper - mf.filter('^FC.*', 'FC = f77') - mf.filter('^FFLAGS.*', 'FFLAGS = -O2 -g') - - # Set up some variables. - mf.filter('^PLAT.*', 'PLAT = ') - mf.filter('^home.*', 'home = %s' % os.getcwd()) - mf.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) - mf.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) - mf.filter('^MAKE.*', 'MAKE = make') - - # build the library in our own prefix. - mf.filter('^ARPACKLIB.*', 'PARPACKLIB = %s/libparpack.a' % os.getcwd()) - - - def install(self, spec, prefix): - with working_dir('PARPACK/SRC/MPI'): - make('all') - - mkdirp(prefix.lib) - install('libparpack.a', prefix.lib) diff --git a/var/spack/packages/pcre/package.py b/var/spack/packages/pcre/package.py deleted file mode 100644 index 3424048a6c..0000000000 --- a/var/spack/packages/pcre/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Pcre(Package): - """The PCRE package contains Perl Compatible Regular Expression - libraries. These are useful for implementing regular expression - pattern matching using the same syntax and semantics as Perl 5.""" - homepage = "http://www.pcre.org""" - url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" - - version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py deleted file mode 100644 index 4864e39bf1..0000000000 --- a/var/spack/packages/petsc/package.py +++ /dev/null @@ -1,40 +0,0 @@ -from spack import * - -class Petsc(Package): - """PETSc is a suite of data structures and routines for the - scalable (parallel) solution of scientific applications modeled by - partial differential equations.""" - - homepage = "http://www.mcs.anl.gov/petsc/index.html" - url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz" - - version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f') - version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13') - version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') - - depends_on("boost") - depends_on("blas") - depends_on("lapack") - depends_on("hypre") - depends_on("parmetis") - depends_on("metis") - depends_on("hdf5") - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "CC=cc", - "CXX=c++", - "FC=f90", - "--with-blas-lib=%s/libblas.a" % spec['blas'].prefix.lib, - "--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib, - "--with-boost-dir=%s" % spec['boost'].prefix, - "--with-hypre-dir=%s" % spec['hypre'].prefix, - "--with-parmetis-dir=%s" % spec['parmetis'].prefix, - "--with-metis-dir=%s" % spec['metis'].prefix, - "--with-hdf5-dir=%s" % spec['hdf5'].prefix, - "--with-shared-libraries=0") - - # PETSc has its own way of doing parallel make. - make('MAKE_NP=%s' % make_jobs, parallel=False) - make("install") diff --git a/var/spack/packages/pidx/package.py b/var/spack/packages/pidx/package.py deleted file mode 100644 index 81aed62fb1..0000000000 --- a/var/spack/packages/pidx/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Pidx(Package): - """PIDX Parallel I/O Library. - - PIDX is an efficient parallel I/O library that reads and writes - multiresolution IDX data files. - """ - - homepage = "http://www.cedmav.com/pidx" - - version('1.0', git='https://github.com/sci-visus/PIDX.git', - commit='6afa1cf71d1c41263296dc049c8fabaf73c296da') - - depends_on("mpi") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/pixman/package.py b/var/spack/packages/pixman/package.py deleted file mode 100644 index 895cbdbca5..0000000000 --- a/var/spack/packages/pixman/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Pixman(Package): - """The Pixman package contains a library that provides low-level - pixel manipulation features such as image compositing and - trapezoid rasterization.""" - homepage = "http://www.pixman.org" - url = "http://cairographics.org/releases/pixman-0.32.6.tar.gz" - - version('0.32.6', '3a30859719a41bd0f5cccffbfefdd4c2') - - depends_on("libpng") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--disable-gtk") - make() - make("install") diff --git a/var/spack/packages/pkg-config/package.py b/var/spack/packages/pkg-config/package.py deleted file mode 100644 index 9964c6ce34..0000000000 --- a/var/spack/packages/pkg-config/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PkgConfig(Package): - """pkg-config is a helper tool used when compiling applications and libraries""" - homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/" - url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" - - version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') - - parallel = False - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") - - make() - make("install") - diff --git a/var/spack/packages/pmgr_collective/package.py b/var/spack/packages/pmgr_collective/package.py deleted file mode 100644 index 5d9b02acc3..0000000000 --- a/var/spack/packages/pmgr_collective/package.py +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class PmgrCollective(Package): - """PMGR_COLLECTIVE provides a scalable network for bootstrapping - MPI jobs.""" - homepage = "http://www.sourceforge.net/projects/pmgrcollective" - url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz" - - version('1.0', '0384d008774274cc3fc7b4d810dfd07e') - - def install(self, spec, prefix): - make('PREFIX="' + prefix + '"') - make('PREFIX="' + prefix + '"', "install") diff --git a/var/spack/packages/postgresql/package.py b/var/spack/packages/postgresql/package.py deleted file mode 100644 index 46922b7b71..0000000000 --- a/var/spack/packages/postgresql/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Postgresql(Package): - """PostgreSQL is a powerful, open source object-relational - database system. It has more than 15 years of active - development and a proven architecture that has earned it a - strong reputation for reliability, data integrity, and - correctness.""" - homepage = "http://www.postgresql.org/" - url = "http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2" - - version('9.3.4', 'd0a41f54c377b2d2fab4a003b0dac762') - - depends_on("openssl") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-openssl") - make() - make("install") diff --git a/var/spack/packages/ppl/package.py b/var/spack/packages/ppl/package.py deleted file mode 100644 index 018d5c523d..0000000000 --- a/var/spack/packages/ppl/package.py +++ /dev/null @@ -1,28 +0,0 @@ -from spack import * - -class Ppl(Package): - """The Parma Polyhedra Library (PPL) provides numerical - abstractions especially targeted at applications in the field of - analysis and verification of complex systems. These abstractions - include convex polyhedra, some special classes of polyhedra shapes - that offer interesting complexity/precision tradeoffs, and grids - which represent regularly spaced points that satisfy a set of - linear congruence relations. The library also supports finite - powersets and products of polyhedra and grids, a mixed integer - linear programming problem solver using an exact-arithmetic - version of the simplex algorithm, a parametric integer programming - solver, and primitives for termination analysis via the automatic - synthesis of linear ranking functions.""" - - homepage = "http://bugseng.com/products/ppl/" - url = "http://bugseng.com/products/ppl/download/ftp/releases/1.1/ppl-1.1.tar.gz" - - version('1.1', '4f2422c0ef3f409707af32108deb30a7') - - depends_on("gmp") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-gmp=%s" % spec['gmp'].prefix) - make() - make("install") diff --git a/var/spack/packages/protobuf/package.py b/var/spack/packages/protobuf/package.py deleted file mode 100644 index 34085c7ce9..0000000000 --- a/var/spack/packages/protobuf/package.py +++ /dev/null @@ -1,16 +0,0 @@ -import os -from spack import * - -class Protobuf(Package): - """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" - - version('2.5.0', 'a72001a9067a4c2c4e0e836d0f92ece4') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("check") - make("install") diff --git a/var/spack/packages/py-basemap/package.py b/var/spack/packages/py-basemap/package.py deleted file mode 100644 index 45f1085ba1..0000000000 --- a/var/spack/packages/py-basemap/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * -import os - -class PyBasemap(Package): - """The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python.""" - homepage = "http://matplotlib.org/basemap/" - url = "https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz" - - version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8') - - extends('python') - depends_on('py-setuptools') - depends_on('py-numpy') - depends_on('py-matplotlib') - depends_on('py-pil') - depends_on("geos") - - def install(self, spec, prefix): - env['GEOS_DIR'] = spec['geos'].prefix - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-biopython/package.py b/var/spack/packages/py-biopython/package.py deleted file mode 100644 index 8ecaf48626..0000000000 --- a/var/spack/packages/py-biopython/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyBiopython(Package): - """It is a distributed collaborative effort to develop Python libraries and applications which address the needs of current and future work in bioinformatics.""" - homepage = "http://biopython.org/wiki/Main_Page" - url = "http://biopython.org/DIST/biopython-1.65.tar.gz" - - version('1.65', '143e7861ade85c0a8b5e2bbdd1da1f67') - - extends('python') - depends_on('py-mx') - depends_on('py-numpy') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-cffi/package.py b/var/spack/packages/py-cffi/package.py deleted file mode 100644 index a4d37483fe..0000000000 --- a/var/spack/packages/py-cffi/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PyCffi(Package): - """Foreign Function Interface for Python calling C code""" - homepage = "http://cffi.readthedocs.org/en/latest/" - # base https://pypi.python.org/pypi/cffi - url = "https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz#md5=" - - version('1.1.2', 'ca6e6c45b45caa87aee9adc7c796eaea') - - extends('python') - depends_on('py-setuptools') - depends_on('py-pycparser') - depends_on('libffi') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-cython/package.py b/var/spack/packages/py-cython/package.py deleted file mode 100644 index 68eb735ad9..0000000000 --- a/var/spack/packages/py-cython/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyCython(Package): - """The Cython compiler for writing C extensions for the Python language.""" - homepage = "https://pypi.python.org/pypi/cython" - url = "https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz" - - version('0.21.2', 'd21adb870c75680dc857cd05d41046a4') - version('0.22', '1ae25add4ef7b63ee9b4af697300d6b6') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-dateutil/package.py b/var/spack/packages/py-dateutil/package.py deleted file mode 100644 index 0a17f2f2d2..0000000000 --- a/var/spack/packages/py-dateutil/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class PyDateutil(Package): - """Extensions to the standard Python datetime module.""" - homepage = "https://pypi.python.org/pypi/dateutil" - url = "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.0.tar.gz" - - version('2.4.0', '75714163bb96bedd07685cdb2071b8bc') - version('2.4.2', '4ef68e1c485b09e9f034e10473e5add2') - - extends('python') - depends_on('py-setuptools') - depends_on('py-six') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-epydoc/package.py b/var/spack/packages/py-epydoc/package.py deleted file mode 100644 index af05510504..0000000000 --- a/var/spack/packages/py-epydoc/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyEpydoc(Package): - """Epydoc is a tool for generating API documentation documentation for Python modules, based on their docstrings.""" - homepage = "https://pypi.python.org/pypi/epydoc" - url = "https://pypi.python.org/packages/source/e/epydoc/epydoc-3.0.1.tar.gz" - - version('3.0.1', '36407974bd5da2af00bf90ca27feeb44') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-genders/package.py b/var/spack/packages/py-genders/package.py deleted file mode 100644 index c49c8fd5b2..0000000000 --- a/var/spack/packages/py-genders/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyGenders(Package): - """Genders is a static cluster configuration database used for cluster configuration management. It is used by a variety of tools and scripts for management of large clusters.""" - homepage = "https://github.com/chaos/genders" - url = "https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz" - - version('1.22', '9ea59a024dcbddb85b0ed25ddca9bc8e', url='https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz') - extends('python') - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix) - make(parallel=False) - make("install") - diff --git a/var/spack/packages/py-gnuplot/package.py b/var/spack/packages/py-gnuplot/package.py deleted file mode 100644 index ede4472c03..0000000000 --- a/var/spack/packages/py-gnuplot/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyGnuplot(Package): - """Gnuplot.py is a Python package that allows you to create graphs from within Python using the gnuplot plotting program.""" - homepage = "http://gnuplot-py.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.tar.gz" - - version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1') - - extends('python') - depends_on('py-numpy') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-h5py/package.py b/var/spack/packages/py-h5py/package.py deleted file mode 100644 index 6293da5407..0000000000 --- a/var/spack/packages/py-h5py/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * -import re - -class PyH5py(Package): - """The h5py package provides both a high- and low-level interface to the HDF5 library from Python.""" - homepage = "https://pypi.python.org/pypi/h5py" - url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz" - - version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758') - version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74') - - extends('python', ignore=lambda f: re.match(r'bin/cy*', f)) - depends_on('hdf5') - depends_on('py-numpy') - depends_on('py-cython') - - def install(self, spec, prefix): - python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix) - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython/package.py b/var/spack/packages/py-ipython/package.py deleted file mode 100644 index 8d0e64a07f..0000000000 --- a/var/spack/packages/py-ipython/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class PyIpython(Package): - """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" - homepage = "https://pypi.python.org/pypi/ipython" - url = "https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz" - - version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf') - version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') - - extends('python') - depends_on('py-pygments') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-libxml2/package.py b/var/spack/packages/py-libxml2/package.py deleted file mode 100644 index 59005428e4..0000000000 --- a/var/spack/packages/py-libxml2/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyLibxml2(Package): - """A Python wrapper around libxml2.""" - homepage = "https://xmlsoft.org/python.html" - url = "ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz" - - version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3') - - extends('python') - depends_on('libxml2') - depends_on('libxslt') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-lockfile/package.py b/var/spack/packages/py-lockfile/package.py deleted file mode 100644 index 8722914d94..0000000000 --- a/var/spack/packages/py-lockfile/package.py +++ /dev/null @@ -1,23 +0,0 @@ -from spack import * - -class PyLockfile(Package): - """The lockfile package exports a LockFile class which provides a - simple API for locking files. Unlike the Windows msvcrt.locking - function, the fcntl.lockf and flock functions, and the - deprecated posixfile module, the API is identical across both - Unix (including Linux and Mac) and Windows platforms. The lock - mechanism relies on the atomic nature of the link (on Unix) and - mkdir (on Windows) system calls. An implementation based on - SQLite is also provided, more as a demonstration of the - possibilities it provides than as production-quality code. - """ - homepage = "https://pypi.python.org/pypi/lockfile" - url = "https://pypi.python.org/packages/source/l/lockfile/lockfile-0.10.2.tar.gz" - - version('0.10.2', '1aa6175a6d57f082cd12e7ac6102ab15') - - extends("python") - depends_on("py-setuptools") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-mako/package.py b/var/spack/packages/py-mako/package.py deleted file mode 100644 index 3e91ffd8e5..0000000000 --- a/var/spack/packages/py-mako/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class PyMako(Package): - """A super-fast templating language that borrows the best - ideas from the existing templating languages.""" - - homepage = "https://pypi.python.org/pypi/mako" - url = "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz" - - version('1.0.1', '9f0aafd177b039ef67b90ea350497a54') - - depends_on('py-setuptools') - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py deleted file mode 100644 index e7ce3dfd24..0000000000 --- a/var/spack/packages/py-matplotlib/package.py +++ /dev/null @@ -1,47 +0,0 @@ -from spack import * -import os - -class PyMatplotlib(Package): - """Python plotting package.""" - homepage = "https://pypi.python.org/pypi/matplotlib" - url = "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz" - - version('1.4.2', '7d22efb6cce475025733c50487bd8898') - version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267') - - extends('python', ignore=r'bin/nosetests.*$') - - depends_on('py-pyside') - depends_on('py-ipython') - depends_on('py-pyparsing') - depends_on('py-six') - depends_on('py-dateutil') - depends_on('py-pytz') - depends_on('py-nose') - depends_on('py-numpy') - - depends_on('qt') - depends_on('bzip2') - depends_on('tcl') - depends_on('tk') - depends_on('qhull') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) - - if str(self.version) in ['1.4.2', '1.4.3']: - # hack to fix configuration file - config_file = None - for p,d,f in os.walk(prefix.lib): - for file in f: - if file.find('matplotlibrc') != -1: - config_file = join_path(p, 'matplotlibrc') - print config_file - if config_file == None: - raise InstallError('could not find config file') - filter_file(r'backend : pyside', - 'backend : Qt4Agg', - config_file) - filter_file(r'#backend.qt4 : PyQt4', - 'backend.qt4 : PySide', - config_file) diff --git a/var/spack/packages/py-mock/package.py b/var/spack/packages/py-mock/package.py deleted file mode 100644 index 3b08428ba0..0000000000 --- a/var/spack/packages/py-mock/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PyMock(Package): - """mock is a library for testing in Python. It allows you to replace parts - of your system under test with mock objects and make assertions about how - they have been used.""" - - homepage = "https://github.com/testing-cabal/mock" - url = "https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz" - - version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb') - - extends('python') - depends_on('py-setuptools@17.1:') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-mpi4py/package.py b/var/spack/packages/py-mpi4py/package.py deleted file mode 100644 index 8001689a18..0000000000 --- a/var/spack/packages/py-mpi4py/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyMpi4py(Package): - """This package provides Python bindings for the Message Passing Interface (MPI) standard. It is implemented on top of the MPI-1/MPI-2 specification and exposes an API which grounds on the standard MPI-2 C++ bindings.""" - homepage = "https://pypi.python.org/pypi/mpi4py" - url = "https://pypi.python.org/packages/source/m/mpi4py/mpi4py-1.3.1.tar.gz" - - version('1.3.1', 'dbe9d22bdc8ed965c23a7ceb6f32fc3c') - extends('python') - depends_on('py-setuptools') - depends_on('mpi') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-mx/package.py b/var/spack/packages/py-mx/package.py deleted file mode 100644 index 717ee0562b..0000000000 --- a/var/spack/packages/py-mx/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyMx(Package): - """The eGenix.com mx Base Distribution for Python is a collection of professional quality software tools which enhance Python's usability in many important areas such as fast text searching, date/time processing and high speed data types.""" - homepage = "http://www.egenix.com/products/python/mxBase/" - url = "https://downloads.egenix.com/python/egenix-mx-base-3.2.8.tar.gz" - - version('3.2.8', '9d9d3a25f9dc051a15e97f452413423b') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-nose/package.py b/var/spack/packages/py-nose/package.py deleted file mode 100644 index e7c6cf0264..0000000000 --- a/var/spack/packages/py-nose/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PyNose(Package): - """nose extends the test loading and running features of unittest, - making it easier to write, find and run tests.""" - - homepage = "https://pypi.python.org/pypi/nose" - url = "https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz" - - version('1.3.4', '6ed7169887580ddc9a8e16048d38274d') - version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16') - - extends('python', ignore=r'bin/nosetests.*$') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-numpy/package.py b/var/spack/packages/py-numpy/package.py deleted file mode 100644 index efa109a3e9..0000000000 --- a/var/spack/packages/py-numpy/package.py +++ /dev/null @@ -1,28 +0,0 @@ -from spack import * - -class PyNumpy(Package): - """array processing for numbers, strings, records, and objects.""" - homepage = "https://pypi.python.org/pypi/numpy" - url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" - - version('1.9.1', '78842b73560ec378142665e712ae4ad9') - version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') - - extends('python') - depends_on('py-nose') - depends_on('netlib-blas+fpic') - depends_on('netlib-lapack+shared') - - def patch(self): - filter_file( - "possible_executables = \['(gfortran|g77|ifort|efl)", - "possible_executables = ['fc", - "numpy/distutils/fcompiler/gnu.py", - "numpy/distutils/fcompiler/intel.py") - - def install(self, spec, prefix): - with open('site.cfg', 'w') as f: - f.write('[DEFAULT]\n') - f.write('libraries=lapack,blas\n') - f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pandas/package.py b/var/spack/packages/py-pandas/package.py deleted file mode 100644 index 5b9997faa9..0000000000 --- a/var/spack/packages/py-pandas/package.py +++ /dev/null @@ -1,25 +0,0 @@ -from spack import * -import os - -class PyPandas(Package): - """pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with relational or labeled data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open source data analysis / manipulation tool available in any language.""" - homepage = "http://pandas.pydata.org/" - url = "https://pypi.python.org/packages/source/p/pandas/pandas-0.16.0.tar.gz#md5=bfe311f05dc0c351f8955fbd1e296e73" - - version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73') - version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') - - extends('python') - depends_on('py-dateutil') - depends_on('py-numpy') - depends_on('py-matplotlib') - depends_on('py-scipy') - depends_on('py-setuptools') - depends_on('py-pytz') - depends_on('libdrm') - depends_on('libpciaccess') - depends_on('llvm') - depends_on('mesa') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pexpect/package.py b/var/spack/packages/py-pexpect/package.py deleted file mode 100644 index ff5fac84e0..0000000000 --- a/var/spack/packages/py-pexpect/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyPexpect(Package): - """Pexpect allows easy control of interactive console applications.""" - homepage = "https://pypi.python.org/pypi/pexpect" - url = "https://pypi.python.org/packages/source/p/pexpect/pexpect-3.3.tar.gz" - - version('3.3', '0de72541d3f1374b795472fed841dce8') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pil/package.py b/var/spack/packages/py-pil/package.py deleted file mode 100644 index 743b761981..0000000000 --- a/var/spack/packages/py-pil/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyPil(Package): - """The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.""" - - homepage = "http://www.pythonware.com/products/pil/" - url = "http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz" - - version('1.1.7', 'fc14a54e1ce02a0225be8854bfba478e') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pmw/package.py b/var/spack/packages/py-pmw/package.py deleted file mode 100644 index 56131811e9..0000000000 --- a/var/spack/packages/py-pmw/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyPmw(Package): - """Pmw is a toolkit for building high-level compound widgets, or megawidgets, constructed using other widgets as component parts.""" - homepage = "https://pypi.python.org/pypi/Pmw" - url = "https://pypi.python.org/packages/source/P/Pmw/Pmw-2.0.0.tar.gz" - - version('2.0.0', 'c7c3f26c4f5abaa99807edefee578fc0') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pychecker/package.py b/var/spack/packages/py-pychecker/package.py deleted file mode 100644 index bda5a746aa..0000000000 --- a/var/spack/packages/py-pychecker/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyPychecker(Package): - """""" - homepage = "http://pychecker.sourceforge.net/" - url = "http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz" - - version('0.8.19', 'c37182863dfb09209d6ba4f38fce9d2b') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pycparser/package.py b/var/spack/packages/py-pycparser/package.py deleted file mode 100644 index f2bb679d25..0000000000 --- a/var/spack/packages/py-pycparser/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyPycparser(Package): - """pycparser is a complete parser of the C language, written in pure python""" - homepage = "https://github.com/eliben/pycparser" - url = "https://pypi.python.org/packages/source/p/pycparser/pycparser-2.13.tar.gz" - - version('2.13', 'e4fe1a2d341b22e25da0d22f034ef32f') - - - extends('python') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pyelftools/package.py b/var/spack/packages/py-pyelftools/package.py deleted file mode 100644 index d5ad32e624..0000000000 --- a/var/spack/packages/py-pyelftools/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyPyelftools(Package): - """A pure-Python library for parsing and analyzing ELF files and DWARF debugging information""" - homepage = "https://pypi.python.org/pypi/pyelftools" - url = "https://pypi.python.org/packages/source/p/pyelftools/pyelftools-0.23.tar.gz" - - version('0.23', 'aa7cefa8bd2f63d7b017440c9084f310') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pygments/package.py b/var/spack/packages/py-pygments/package.py deleted file mode 100644 index 7e07bf6869..0000000000 --- a/var/spack/packages/py-pygments/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyPygments(Package): - """Pygments is a syntax highlighting package written in Python.""" - homepage = "https://pypi.python.org/pypi/pygments" - url = "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz" - - version('2.0.1', 'e0daf4c14a4fe5b630da765904de4d6c') - version('2.0.2', '238587a1370d62405edabd0794b3ec4a') - - extends('python') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pylint/package.py b/var/spack/packages/py-pylint/package.py deleted file mode 100644 index 9579708c29..0000000000 --- a/var/spack/packages/py-pylint/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * -import re - -class PyPylint(Package): - """array processing for numbers, strings, records, and objects.""" - homepage = "https://pypi.python.org/pypi/pylint" - url = "https://pypi.python.org/packages/source/p/pylint/pylint-1.4.1.tar.gz" - - version('1.4.1', 'df7c679bdcce5019389038847e4de622') - version('1.4.3', '5924c1c7ca5ca23647812f5971d0ea44') - - extends('python') - depends_on('py-nose') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pypar/package.py b/var/spack/packages/py-pypar/package.py deleted file mode 100644 index af9c76ccd8..0000000000 --- a/var/spack/packages/py-pypar/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyPypar(Package): - """Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using MPI.""" - homepage = "http://code.google.com/p/pypar/" - url = "https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz" - - version('2.1.5_108', '7a1f28327d2a3b679f9455c843d850b8', url='https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz') - extends('python') - depends_on('mpi') - - def install(self, spec, prefix): - with working_dir('source'): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pyparsing/package.py b/var/spack/packages/py-pyparsing/package.py deleted file mode 100644 index a6e50ad139..0000000000 --- a/var/spack/packages/py-pyparsing/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyPyparsing(Package): - """A Python Parsing Module.""" - homepage = "https://pypi.python.org/pypi/pyparsing" - url = "https://pypi.python.org/packages/source/p/pyparsing/pyparsing-2.0.3.tar.gz" - - version('2.0.3', '0fe479be09fc2cf005f753d3acc35939') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pyqt/package.py b/var/spack/packages/py-pyqt/package.py deleted file mode 100644 index 8edca105bb..0000000000 --- a/var/spack/packages/py-pyqt/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * - -class PyPyqt(Package): - """PyQt is a set of Python v2 and v3 bindings for Digia's Qt - application framework and runs on all platforms supported by Qt - including Windows, MacOS/X and Linux.""" - homepage = "http://www.riverbankcomputing.com/software/pyqt/intro" - url = "http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz" - - version('4.11.3', '997c3e443165a89a559e0d96b061bf70') - - extends('python') - depends_on('py-sip') - - # TODO: allow qt5 when conditional deps are supported. - # TODO: Fix version matching so that @4 works like @:4 - depends_on('qt@:4') - - def install(self, spec, prefix): - python('configure.py', - '--confirm-license', - '--destdir=%s' % site_packages_dir) - make() - make('install') diff --git a/var/spack/packages/py-pyside/package.py b/var/spack/packages/py-pyside/package.py deleted file mode 100644 index bb5da44d02..0000000000 --- a/var/spack/packages/py-pyside/package.py +++ /dev/null @@ -1,45 +0,0 @@ -from spack import * -import os - -class PyPyside(Package): - """array processing for numbers, strings, records, and objects.""" - homepage = "https://pypi.python.org/pypi/pyside" - url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz" - - version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') - - # TODO: make build dependency - # depends_on("cmake") - - extends('python') - depends_on('py-setuptools') - depends_on('qt@:4') - - def patch(self): - """Undo PySide RPATH handling and add Spack RPATH.""" - # Figure out the special RPATH - pypkg = self.spec['python'].package - rpath = self.rpath - rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'PySide')) - - # Add Spack's standard CMake args to the sub-builds. - # They're called BY setup.py so we have to patch it. - filter_file( - r'OPTION_CMAKE,', - r'OPTION_CMAKE, ' + ( - '"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE", ' - '"-DCMAKE_INSTALL_RPATH=%s",' % ':'.join(rpath)), - 'setup.py') - - # PySide tries to patch ELF files to remove RPATHs - # Disable this and go with the one we set. - filter_file( - r'^\s*rpath_cmd\(pyside_path, srcpath\)', - r'#rpath_cmd(pyside_path, srcpath)', - 'pyside_postinstall.py') - - - def install(self, spec, prefix): - python('setup.py', 'install', - '--prefix=%s' % prefix, - '--jobs=%s' % make_jobs) diff --git a/var/spack/packages/py-python-daemon/package.py b/var/spack/packages/py-python-daemon/package.py deleted file mode 100644 index 12cbe9101c..0000000000 --- a/var/spack/packages/py-python-daemon/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * - -class PyPythonDaemon(Package): - """Library to implement a well-behaved Unix daemon process. - - This library implements the well-behaved daemon specification of - PEP Standard daemon process. - - A well-behaved Unix daemon process is tricky to get right, but the - required steps are much the same for every daemon program. A - DaemonContext instance holds the behaviour and configured process - environment for the program; use the instance as a context manager - to enter a daemon state. - """ - homepage = "https://pypi.python.org/pypi/python-daemon/" - url = "https://pypi.python.org/packages/source/p/python-daemon/python-daemon-2.0.5.tar.gz" - - version('2.0.5', '73e7f49f525c51fa4a995aea4d80de41') - - extends("python") - depends_on("py-setuptools") - depends_on("py-lockfile") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/packages/py-pytz/package.py b/var/spack/packages/py-pytz/package.py deleted file mode 100644 index da6311a784..0000000000 --- a/var/spack/packages/py-pytz/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyPytz(Package): - """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" - - version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') - version('2015.4', '417a47b1c432d90333e42084a605d3d8') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-rpy2/package.py b/var/spack/packages/py-rpy2/package.py deleted file mode 100644 index a0b03d03e3..0000000000 --- a/var/spack/packages/py-rpy2/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PyRpy2(Package): - """rpy2 is a redesign and rewrite of rpy. It is providing a low-level interface to R from Python, a proposed high-level interface, including wrappers to graphical libraries, as well as R-like structures and functions.""" - homepage = "https://pypi.python.org/pypi/rpy2" - url = "https://pypi.python.org/packages/source/r/rpy2/rpy2-2.5.4.tar.gz" - - version('2.5.4', '115a20ac30883f096da2bdfcab55196d') - version('2.5.6', 'a36e758b633ce6aec6a5f450bfee980f') - - extends('python') - depends_on('py-setuptools') - - depends_on('R') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-scientificpython/package.py b/var/spack/packages/py-scientificpython/package.py deleted file mode 100644 index df2c86caac..0000000000 --- a/var/spack/packages/py-scientificpython/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class PyScientificpython(Package): - """ScientificPython is a collection of Python modules for - scientific computing. It contains support for geometry, - mathematical functions, statistics, physical units, IO, - visualization, and parallelization.""" - - homepage = "https://sourcesup.renater.fr/projects/scientific-py/" - url = "https://sourcesup.renater.fr/frs/download.php/file/4411/ScientificPython-2.8.1.tar.gz" - version('2.8.1', '73ee0df19c7b58cdf2954261f0763c77') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-scikit-learn/package.py b/var/spack/packages/py-scikit-learn/package.py deleted file mode 100644 index 5b078ce901..0000000000 --- a/var/spack/packages/py-scikit-learn/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyScikitLearn(Package): - """""" - homepage = "https://pypi.python.org/pypi/scikit-learn" - url = "https://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0.15.2.tar.gz" - - version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d') - version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-scipy/package.py b/var/spack/packages/py-scipy/package.py deleted file mode 100644 index 3a1124cc15..0000000000 --- a/var/spack/packages/py-scipy/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class PyScipy(Package): - """Scientific Library for Python.""" - homepage = "https://pypi.python.org/pypi/scipy" - url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" - - version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') - version('0.15.1', 'be56cd8e60591d6332aac792a5880110') - - extends('python') - depends_on('py-nose') - depends_on('py-numpy') - depends_on('blas') - depends_on('lapack') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-setuptools/package.py b/var/spack/packages/py-setuptools/package.py deleted file mode 100644 index 760ad4d6db..0000000000 --- a/var/spack/packages/py-setuptools/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PySetuptools(Package): - """Easily download, build, install, upgrade, and uninstall Python packages.""" - homepage = "https://pypi.python.org/pypi/setuptools" - url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" - - version('11.3.1', '01f69212e019a2420c1693fb43593930') - version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') - version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-shiboken/package.py b/var/spack/packages/py-shiboken/package.py deleted file mode 100644 index e4bf4ce07e..0000000000 --- a/var/spack/packages/py-shiboken/package.py +++ /dev/null @@ -1,45 +0,0 @@ -from spack import * -import os - -class PyShiboken(Package): - """Shiboken generates bindings for C++ libraries using CPython source code.""" - homepage = "https://shiboken.readthedocs.org/" - url = "https://pypi.python.org/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz" - - version('1.2.2', '345cfebda221f525842e079a6141e555') - - # TODO: make build dependency - # depends_on("cmake") - - extends('python') - depends_on("py-setuptools") - depends_on("libxml2") - depends_on("qt@:4.8") - - def patch(self): - """Undo Shiboken RPATH handling and add Spack RPATH.""" - # Add Spack's standard CMake args to the sub-builds. - # They're called BY setup.py so we have to patch it. - pypkg = self.spec['python'].package - rpath = self.rpath - rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'Shiboken')) - - filter_file( - r'OPTION_CMAKE,', - r'OPTION_CMAKE, ' + ( - '"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE", ' - '"-DCMAKE_INSTALL_RPATH=%s",' % ':'.join(rpath)), - 'setup.py') - - # Shiboken tries to patch ELF files to remove RPATHs - # Disable this and go with the one we set. - filter_file( - r'^\s*rpath_cmd\(shiboken_path, srcpath\)', - r'#rpath_cmd(shiboken_path, srcpath)', - 'shiboken_postinstall.py') - - - def install(self, spec, prefix): - python('setup.py', 'install', - '--prefix=%s' % prefix, - '--jobs=%s' % make_jobs) diff --git a/var/spack/packages/py-sip/package.py b/var/spack/packages/py-sip/package.py deleted file mode 100644 index e4a6fb6961..0000000000 --- a/var/spack/packages/py-sip/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * -import os - -class PySip(Package): - """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" - homepage = "http://www.riverbankcomputing.com/software/sip/intro" - url = "http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.5/sip-4.16.5.tar.gz" - - version('4.16.5', '6d01ea966a53e4c7ae5c5e48c40e49e5') - version('4.16.7', '32abc003980599d33ffd789734de4c36') - - extends('python') - - def install(self, spec, prefix): - python('configure.py', - '--destdir=%s' % site_packages_dir, - '--bindir=%s' % spec.prefix.bin, - '--incdir=%s' % python_include_dir, - '--sipdir=%s' % os.path.join(spec.prefix.share, 'sip')) - make() - make('install') diff --git a/var/spack/packages/py-six/package.py b/var/spack/packages/py-six/package.py deleted file mode 100644 index 05c5bd00a9..0000000000 --- a/var/spack/packages/py-six/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PySix(Package): - """Python 2 and 3 compatibility utilities.""" - homepage = "https://pypi.python.org/pypi/six" - url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" - - version('1.9.0', '476881ef4012262dfc8adc645ee786c4') - - extends('python') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-sphinx/package.py b/var/spack/packages/py-sphinx/package.py deleted file mode 100644 index ec2e89a098..0000000000 --- a/var/spack/packages/py-sphinx/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PySphinx(Package): - """Sphinx Documentation Generator.""" - homepage = "http://sphinx-doc.org" - url = "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.3.1.tar.gz" - - version('1.3.1', '8786a194acf9673464c5455b11fd4332') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-sympy/package.py b/var/spack/packages/py-sympy/package.py deleted file mode 100644 index c17e35b95f..0000000000 --- a/var/spack/packages/py-sympy/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PySympy(Package): - """SymPy is a Python library for symbolic mathematics.""" - homepage = "https://pypi.python.org/pypi/sympy" - url = "https://pypi.python.org/packages/source/s/sympy/sympy-0.7.6.tar.gz" - - version('0.7.6', '3d04753974306d8a13830008e17babca') - - extends('python') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-virtualenv/package.py b/var/spack/packages/py-virtualenv/package.py deleted file mode 100644 index 037a6fc59f..0000000000 --- a/var/spack/packages/py-virtualenv/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * -import shutil - -class PyVirtualenv(Package): - """virtualenv is a tool to create isolated Python environments.""" - homepage = "http://virtualenv.readthedocs.org/projects/virtualenv/" - url = "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz" - - version('1.11.6', 'f61cdd983d2c4e6aeabb70b1060d6f49') - version('13.0.1', '1ffc011bde6667f0e37ecd976f4934db') - - extends('python') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-yapf/package.py b/var/spack/packages/py-yapf/package.py deleted file mode 100644 index 12ef191515..0000000000 --- a/var/spack/packages/py-yapf/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyYapf(Package): - """ Yet Another Python Formatter """ - homepage = "https://github.com/google/yapf" - # base https://pypi.python.org/pypi/cffi - url = "https://github.com/google/yapf/archive/v0.2.1.tar.gz" - - version('0.2.1', '348ccf86cf2057872e4451b204fb914c') - - extends('python') - depends_on('py-setuptools') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py deleted file mode 100644 index 000881a846..0000000000 --- a/var/spack/packages/python/package.py +++ /dev/null @@ -1,160 +0,0 @@ -import os -import re -from contextlib import closing -from llnl.util.lang import match_predicate - -from spack import * -import spack - - -class Python(Package): - """The Python programming language.""" - homepage = "http://www.python.org" - url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz" - - extendable = True - - version('2.7.8', 'd235bdfa75b8396942e360a70487ee00') - version('2.7.10', 'c685ef0b8e9f27b5e3db5db12b268ac6') - - depends_on("openssl") - depends_on("bzip2") - depends_on("readline") - depends_on("ncurses") - depends_on("sqlite") - - def install(self, spec, prefix): - # Need this to allow python build to find the Python installation. - env['PYTHONHOME'] = prefix - - # Rest of install is pretty standard. - configure("--prefix=%s" % prefix, - "--with-threads", - "--enable-shared") - make() - make("install") - - - # ======================================================================== - # Set up environment to make install easy for python extensions. - # ======================================================================== - - @property - def python_lib_dir(self): - return os.path.join('lib', 'python%d.%d' % self.version[:2]) - - - @property - def python_include_dir(self): - return os.path.join('include', 'python%d.%d' % self.version[:2]) - - - @property - def site_packages_dir(self): - return os.path.join(self.python_lib_dir, 'site-packages') - - - def setup_dependent_environment(self, module, spec, ext_spec): - """Called before python modules' install() methods. - - In most cases, extensions will only need to have one line:: - - python('setup.py', 'install', '--prefix=%s' % prefix) - """ - # Python extension builds can have a global python executable function - module.python = Executable(join_path(spec.prefix.bin, 'python')) - - # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. - module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) - module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir) - module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir) - - # Make the site packages directory if it does not exist already. - mkdirp(module.site_packages_dir) - - # Set PYTHONPATH to include site-packages dir for the - # extension and any other python extensions it depends on. - python_paths = [] - for d in ext_spec.traverse(): - if d.package.extends(self.spec): - python_paths.append(os.path.join(d.prefix, self.site_packages_dir)) - os.environ['PYTHONPATH'] = ':'.join(python_paths) - - - # ======================================================================== - # Handle specifics of activating and deactivating python modules. - # ======================================================================== - - def python_ignore(self, ext_pkg, args): - """Add some ignore files to activate/deactivate args.""" - ignore_arg = args.get('ignore', lambda f: False) - - # Always ignore easy-install.pth, as it needs to be merged. - patterns = [r'easy-install\.pth$'] - - # Ignore pieces of setuptools installed by other packages. - if ext_pkg.name != 'py-setuptools': - patterns.append(r'/site\.pyc?$') - patterns.append(r'setuptools\.pth') - patterns.append(r'bin/easy_install[^/]*$') - patterns.append(r'setuptools.*egg$') - - return match_predicate(ignore_arg, patterns) - - - def write_easy_install_pth(self, exts): - paths = [] - for ext in sorted(exts.values()): - ext_site_packages = os.path.join(ext.prefix, self.site_packages_dir) - easy_pth = "%s/easy-install.pth" % ext_site_packages - - if not os.path.isfile(easy_pth): - continue - - with closing(open(easy_pth)) as f: - for line in f: - line = line.rstrip() - - # Skip lines matching these criteria - if not line: continue - if re.search(r'^(import|#)', line): continue - if (ext.name != 'py-setuptools' and - re.search(r'setuptools.*egg$', line)): continue - - paths.append(line) - - site_packages = os.path.join(self.prefix, self.site_packages_dir) - main_pth = "%s/easy-install.pth" % site_packages - - if not paths: - if os.path.isfile(main_pth): - os.remove(main_pth) - - else: - with closing(open(main_pth, 'w')) as f: - f.write("import sys; sys.__plen = len(sys.path)\n") - for path in paths: - f.write("%s\n" % path) - f.write("import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; " - "p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)\n") - - - def activate(self, ext_pkg, **args): - ignore=self.python_ignore(ext_pkg, args) - args.update(ignore=ignore) - - super(Python, self).activate(ext_pkg, **args) - - exts = spack.install_layout.extension_map(self.spec) - exts[ext_pkg.name] = ext_pkg.spec - self.write_easy_install_pth(exts) - - - def deactivate(self, ext_pkg, **args): - args.update(ignore=self.python_ignore(ext_pkg, args)) - super(Python, self).deactivate(ext_pkg, **args) - - exts = spack.install_layout.extension_map(self.spec) - if ext_pkg.name in exts: # Make deactivate idempotent. - del exts[ext_pkg.name] - self.write_easy_install_pth(exts) diff --git a/var/spack/packages/qhull/package.py b/var/spack/packages/qhull/package.py deleted file mode 100644 index 9da4078a70..0000000000 --- a/var/spack/packages/qhull/package.py +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class Qhull(Package): - """Qhull computes the convex hull, Delaunay triangulation, Voronoi - diagram, halfspace intersection about a point, furt hest-site - Delaunay triangulation, and furthest-site Voronoi diagram. The - source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull - implements the Quickhull algorithm for computing the convex - hull. It handles roundoff errors from floating point - arithmetic. It computes volumes, surface areas, and - approximations to the convex hull. - - Qhull does not support triangulation of non-convex surfaces, - mesh generation of non-convex objects, medium-sized inputs in - 9-D and higher, alpha shapes, weighted Voronoi diagrams, - Voronoi volumes, or constrained Delaunay triangulations.""" - - homepage = "http://www.qhull.org" - - version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c', - url="http://www.qhull.org/download/qhull-2012.1-src.tgz") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py deleted file mode 100644 index 0e4abe3b1d..0000000000 --- a/var/spack/packages/qt/package.py +++ /dev/null @@ -1,109 +0,0 @@ -import os -from spack import * -import os - -class Qt(Package): - """Qt is a comprehensive cross-platform C++ application framework.""" - homepage = "http://qt.io" - list_url = 'http://download.qt-project.org/official_releases/qt/' - list_depth = 2 - - version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6', - url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz') - version('5.3.2', 'febb001129927a70174467ecb508a682', - url='http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz') - - version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8', - url='http://download.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz') - version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb', - url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz") - - # Use system openssl for security. - #depends_on("openssl") - - depends_on("glib") - depends_on("gtkplus") - depends_on("libxml2") - depends_on("zlib") - depends_on("dbus") - depends_on("libtiff") - depends_on("libpng") - depends_on("libmng") - depends_on("jpeg") - - # Webkit - # depends_on("gperf") - # depends_on("flex") - # depends_on("bison") - # depends_on("ruby") - # depends_on("icu4c") - - # OpenGL hardware acceleration - depends_on("mesa") - depends_on("libxcb") - - - def setup_dependent_environment(self, module, spec, dep_spec): - """Dependencies of Qt find it using the QTDIR environment variable.""" - os.environ['QTDIR'] = self.prefix - - - def patch(self): - if self.spec.satisfies('@4'): - qmake_conf = 'mkspecs/common/g++-base.conf' - qmake_unix_conf = 'mkspecs/common/g++-unix.conf' - elif self.spec.satisfies('@5'): - qmake_conf = 'qtbase/mkspecs/common/g++-base.conf' - qmake_unix_conf = 'qtbase/mkspecs/common/g++-unix.conf' - else: - return - - # Fix qmake compilers in the default mkspec - filter_file(r'^QMAKE_COMPILER *=.*$', 'QMAKE_COMPILER = cc', qmake_conf) - filter_file(r'^QMAKE_CC *=.*$', 'QMAKE_CC = cc', qmake_conf) - filter_file(r'^QMAKE_CXX *=.*$', 'QMAKE_CXX = c++', qmake_conf) - filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', 'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) - - - @property - def common_config_args(self): - return [ - '-prefix', self.prefix, - '-v', - '-opensource', - '-opengl', - "-release", - '-shared', - '-confirm-license', - '-openssl-linked', - '-dbus-linked', - '-optimized-qmake', - '-no-openvg', - '-no-pch', - # NIS is deprecated in more recent glibc - "-no-nis"] - # Don't disable all the database drivers, but should - # really get them into spack at some point. - - - @when('@4') - def configure(self): - configure('-fast', - '-no-webkit', - *self.common_config_args) - - - @when('@5') - def configure(self): - configure('-no-eglfs', - '-no-directfb', - '-qt-xcb', - # If someone wants to get a webkit build working, be my guest! - '-skip', 'qtwebkit', - *self.common_config_args) - - - def install(self, spec, prefix): - self.configure() - make() - make("install") diff --git a/var/spack/packages/qthreads/package.py b/var/spack/packages/qthreads/package.py deleted file mode 100644 index dacdb71524..0000000000 --- a/var/spack/packages/qthreads/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class Qthreads(Package): - """The qthreads API is designed to make using large numbers of - threads convenient and easy, and to allow portable access to - threading constructs used in massively parallel shared memory - environments. The API maps well to both MTA-style threading and - PIM-style threading, and we provide an implementation of this - interface in both a standard SMP context as well as the SST - context. The qthreads API provides access to full/empty-bit - (FEB) semantics, where every word of memory can be marked - either full or empty, and a thread can wait for any word to - attain either state.""" - homepage = "http://www.cs.sandia.gov/qthreads/" - url = "https://qthreads.googlecode.com/files/qthread-1.10.tar.bz2" - - version('1.10', '5af8c8bbe88c2a6d45361643780d1671') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/ravel/package.py b/var/spack/packages/ravel/package.py deleted file mode 100644 index 01fa941cfe..0000000000 --- a/var/spack/packages/ravel/package.py +++ /dev/null @@ -1,23 +0,0 @@ -from spack import * - -class Ravel(Package): - """Ravel is a parallel communication trace visualization tool that - orders events according to logical time.""" - - homepage = "https://github.com/scalability-llnl/ravel" - url = 'https://github.com/scalability-llnl/ravel/archive/v1.0.0.tar.gz' - - version('1.0.0', 'b25fece58331c2adfcce76c5036485c2') - - # TODO: make this a build dependency - depends_on('cmake@2.8.9:') - - depends_on('muster@1.0.1:') - depends_on('otf') - depends_on('otf2') - depends_on('qt@5:') - - def install(self, spec, prefix): - cmake('-Wno-dev', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/readline/package.py b/var/spack/packages/readline/package.py deleted file mode 100644 index 1b870e0e7f..0000000000 --- a/var/spack/packages/readline/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Readline(Package): - """The GNU Readline library provides a set of functions for use by - applications that allow users to edit command li nes as they - are typed in. Both Emacs and vi editing modes are - available. The Readline library includes additional functions - to maintain a list of previously-entered command lines, to - recall and perhaps reedit those lines, and perform csh-like - history expansion on previous commands. """ - homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" - url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz" - - version('6.3', '33c8fb279e981274f485fd91da77e94a') - - depends_on("ncurses") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make("SHLIB_LIBS=-lncurses") - make("install") diff --git a/var/spack/packages/rose/add_spack_compiler_recognition.patch b/var/spack/packages/rose/add_spack_compiler_recognition.patch deleted file mode 100644 index ce61ae4e4c..0000000000 --- a/var/spack/packages/rose/add_spack_compiler_recognition.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/compiler-defs.m4 b/config/compiler-defs.m4 -index d7d85d2..780c8de 100644 ---- a/config/compiler-defs.m4 -+++ b/config/compiler-defs.m4 -@@ -28,7 +28,7 @@ dnl predefined by a specific compiler - # g++|gcc|mpicc|mpic++|mpicxx|mpiCC) - # TOO (2/16/2011): added support for tensilica compilers, assuming they are - # like GCC (they use a GCC front-end) -- g++*|gcc*|mpicc|mpic++|mpicxx|mpiCC|xt-xc++|xt-xcc) -+ cc*|c++*|g++*|gcc*|mpicc|mpic++|mpicxx|mpiCC|xt-xc++|xt-xcc) - BACKEND_GCC_MAJOR=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f1` - BACKEND_GCC_MINOR=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f2` - BACKEND_GCC_PATCHLEVEL=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f3` diff --git a/var/spack/packages/rose/package.py b/var/spack/packages/rose/package.py deleted file mode 100644 index 1d7294acab..0000000000 --- a/var/spack/packages/rose/package.py +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# Author: Justin Too -#------------------------------------------------------------------------------ - -from spack import * - -class Rose(Package): - """A compiler infrastructure to build source-to-source program - transformation and analysis tools. - (Developed at Lawrence Livermore National Lab)""" - - homepage = "http://rosecompiler.org/" - url = "https://github.com/rose-compiler/edg4x-rose" - - version('master', branch='master', git='https://github.com/rose-compiler/edg4x-rose.git') - - patch('add_spack_compiler_recognition.patch') - - depends_on("autoconf@2.69") - depends_on("automake@1.14") - depends_on("libtool@2.4") - depends_on("boost@1.54.0") - depends_on("jdk@8u25-linux-x64") - - def install(self, spec, prefix): - # Bootstrap with autotools - bash = which('bash') - bash('build') - - # Configure, compile & install - with working_dir('rose-build', create=True): - boost = spec['boost'] - - configure = Executable('../configure') - configure("--prefix=" + prefix, - "--with-boost=" + boost.prefix, - "--disable-boost-version-check") - make("install-core") - diff --git a/var/spack/packages/ruby/package.py b/var/spack/packages/ruby/package.py deleted file mode 100644 index 6b6242362c..0000000000 --- a/var/spack/packages/ruby/package.py +++ /dev/null @@ -1,41 +0,0 @@ -from spack import * -import spack -import os - -class Ruby(Package): - """A dynamic, open source programming language with a focus on - simplicity and productivity.""" - - homepage = "https://www.ruby-lang.org/" - url = "http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz" - - extendable = True - - version('2.2.0', 'cd03b28fd0b555970f5c4fd481700852') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") - - def setup_dependent_environment(self, module, spec, ext_spec): - """Called before ruby modules' install() methods. Sets GEM_HOME - and GEM_PATH to values appropriate for the package being built. - - In most cases, extensions will only need to have one line:: - - gem('install', '.gem') - """ - # Ruby extension builds have global ruby and gem functions - module.ruby = Executable(join_path(spec.prefix.bin, 'ruby')) - module.gem = Executable(join_path(spec.prefix.bin, 'gem')) - - # Set GEM_PATH to include dependent gem directories - ruby_paths = [] - for d in ext_spec.traverse(): - if d.package.extends(self.spec): - ruby_paths.append(d.prefix) - os.environ['GEM_PATH'] = ':'.join(ruby_paths) - # The actual installation path for this gem - os.environ['GEM_HOME'] = ext_spec.prefix diff --git a/var/spack/packages/samtools/package.py b/var/spack/packages/samtools/package.py deleted file mode 100644 index 72900398d8..0000000000 --- a/var/spack/packages/samtools/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Samtools(Package): - """SAM Tools provide various utilities for manipulating alignments in the SAM format, - including sorting, merging, indexing and generating - alignments in a per-position format""" - - homepage = "www.htslib.org" - version('1.2','988ec4c3058a6ceda36503eebecd4122',url = "https://github.com/samtools/samtools/releases/download/1.2/samtools-1.2.tar.bz2") - - depends_on("zlib") - depends_on("mpc") - parallel=False - patch("samtools1.2.patch",level=0) - - def install(self, spec, prefix): - make("prefix=%s" % prefix, "install") - diff --git a/var/spack/packages/samtools/samtools1.2.patch b/var/spack/packages/samtools/samtools1.2.patch deleted file mode 100644 index ead3ab4e2c..0000000000 --- a/var/spack/packages/samtools/samtools1.2.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile 2015-02-03 08:27:34.000000000 -0800 -+++ Makefile.new 2015-07-21 10:38:27.881406892 -0700 -@@ -26,7 +26,7 @@ - CFLAGS = -g -Wall -O2 - LDFLAGS = - LDLIBS = --DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 -+DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=0 - LOBJS= bam_aux.o bam.o bam_import.o sam.o \ - sam_header.o bam_plbuf.o - AOBJS= bam_index.o bam_plcmd.o sam_view.o \ -@@ -37,7 +37,7 @@ - faidx.o stats.o stats_isize.o bam_flags.o bam_split.o \ - bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o - INCLUDES= -I. -I$(HTSDIR) --LIBCURSES= -lcurses # -lXCurses -+#LIBCURSES= -lcurses # -lXCurses - - prefix = /usr/local - exec_prefix = $(prefix) diff --git a/var/spack/packages/scalasca/package.py b/var/spack/packages/scalasca/package.py deleted file mode 100644 index cf7a40c1f5..0000000000 --- a/var/spack/packages/scalasca/package.py +++ /dev/null @@ -1,65 +0,0 @@ -# FIXME: Add copyright - -from spack import * - -class Scalasca(Package): - """Scalasca is a software tool that supports the performance optimization - of parallel programs by measuring and analyzing their runtime behavior. - The analysis identifies potential performance bottlenecks - in - particular those concerning communication and synchronization - and - offers guidance in exploring their causes.""" - - # FIXME: add a proper url for your package's homepage here. - homepage = "http://www.scalasca.org" - url = "http://apps.fz-juelich.de/scalasca/releases/scalasca/2.1/dist/scalasca-2.1.tar.gz" - - version('2.1', 'bab9c2b021e51e2ba187feec442b96e6', - url = 'http://apps.fz-juelich.de/scalasca/releases/scalasca/2.1/dist/scalasca-2.1.tar.gz' ) - - depends_on("mpi") - depends_on("otf2@1.4") - depends_on("cube@4.2.3") - - backend_user_provided = """\ -CC=cc -CXX=c++ -F77=f77 -FC=f90 -CFLAGS=-fPIC -CXXFLAGS=-fPIC -""" - frontend_user_provided = """\ -CC_FOR_BUILD=cc -CXX_FOR_BUILD=c++ -F77_FOR_BUILD=f70 -FC_FOR_BUILD=f90 -CFLAGS_FOR_BUILD=-fPIC -CXXFLAGS_FOR_BUILD=-fPIC -""" - mpi_user_provided = """\ -MPICC=mpicc -MPICXX=mpicxx -MPIF77=mpif77 -MPIFC=mpif90 -MPI_CFLAGS=-fPIC -MPI_CXXFLAGS=-fPIC -""" - - def install(self, spec, prefix): - configure_args = ["--prefix=%s" % prefix, - "--with-custom-compilers", - "--with-otf2=%s" % spec['otf2'].prefix.bin, - "--with-cube=%s" % spec['cube'].prefix.bin, - "--enable-shared"] - - configure(*configure_args) - - make() - make("install") - - # FIXME: Modify the configure line to suit your build system here. - configure("--prefix=%s" % prefix) - - # FIXME: Add logic to build and install here - make() - make("install") diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py deleted file mode 100644 index f013bd1cbb..0000000000 --- a/var/spack/packages/scorep/package.py +++ /dev/null @@ -1,74 +0,0 @@ -# FIXME: Add copyright statement - -from spack import * - -class Scorep(Package): - """The Score-P measurement infrastructure is a highly scalable and - easy-to-use tool suite for profiling, event tracing, and online - analysis of HPC applications.""" - - # FIXME: add a proper url for your package's homepage here. - homepage = "http://www.vi-hps.org/projects/score-p" - url = "http://www.vi-hps.org/upload/packages/scorep/scorep-1.2.3.tar.gz" - - version('1.3', '9db6f957b7f51fa01377a9537867a55c', - url = 'http://www.vi-hps.org/upload/packages/scorep/scorep-1.3.tar.gz') - - version('1.2.3', '4978084e7cbd05b94517aa8beaea0817') - - depends_on("mpi") - depends_on("papi") - # depends_on("otf2@1.2:1.2.1") # only Score-P 1.2.x - depends_on("otf2") - depends_on("opari2") - depends_on("cube@4.2:4.2.3") - - backend_user_provided = """\ -CC=cc -CXX=c++ -F77=f77 -FC=f90 -CFLAGS=-fPIC -CXXFLAGS=-fPIC -""" - frontend_user_provided = """\ -CC_FOR_BUILD=cc -CXX_FOR_BUILD=c++ -F77_FOR_BUILD=f70 -FC_FOR_BUILD=f90 -CFLAGS_FOR_BUILD=-fPIC -CXXFLAGS_FOR_BUILD=-fPIC -""" - mpi_user_provided = """\ -MPICC=mpicc -MPICXX=mpicxx -MPIF77=mpif77 -MPIFC=mpif90 -MPI_CFLAGS=-fPIC -MPI_CXXFLAGS=-fPIC -""" - - def install(self, spec, prefix): - # Use a custom compiler configuration, otherwise the score-p - # build system messes with spack's compiler settings. - # Create these three files in the build directory - with open("platform-backend-user-provided", "w") as backend_file: - backend_file.write(self.backend_user_provided) - with open("platform-frontend-user-provided", "w") as frontend_file: - frontend_file.write(self.frontend_user_provided) - with open("platform-mpi-user-provided", "w") as mpi_file: - mpi_file.write(self.mpi_user_provided) - - configure_args = ["--prefix=%s" % prefix, - "--with-custom-compilers", - "--with-otf2=%s" % spec['otf2'].prefix.bin, - "--with-opari2=%s" % spec['opari2'].prefix.bin, - "--with-cube=%s" % spec['cube'].prefix.bin, - "--with-papi-header=%s" % spec['papi'].prefix.include, - "--with-papi-lib=%s" % spec['papi'].prefix.lib, - "--enable-shared"] - - configure(*configure_args) - - make() - make("install") diff --git a/var/spack/packages/scotch/package.py b/var/spack/packages/scotch/package.py deleted file mode 100644 index 79289ff2ad..0000000000 --- a/var/spack/packages/scotch/package.py +++ /dev/null @@ -1,40 +0,0 @@ -from spack import * -import glob -import os - -class Scotch(Package): - """Scotch is a software package for graph and mesh/hypergraph - partitioning, graph clustering, and sparse matrix ordering.""" - homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz" - list_url = "http://gforge.inria.fr/frs/?group_id=248" - - version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') - - depends_on('mpi') - - - def patch(self): - with working_dir('src/Make.inc'): - makefiles = glob.glob('Makefile.inc.x86-64_pc_linux2*') - filter_file(r'^CCS\s*=.*$', 'CCS = cc', *makefiles) - filter_file(r'^CCD\s*=.*$', 'CCD = cc', *makefiles) - - - def install(self, spec, prefix): - # Currently support gcc and icc on x86_64 (maybe others with - # vanilla makefile) - makefile = 'Make.inc/Makefile.inc.x86-64_pc_linux2' - if spec.satisfies('%icc'): - makefile += '.icc' - - with working_dir('src'): - force_symlink(makefile, 'Makefile.inc') - for app in ('scotch', 'ptscotch'): - make(app) - - install_tree('bin', prefix.bin) - install_tree('lib', prefix.lib) - install_tree('include', prefix.include) - install_tree('man/man1', prefix.share_man1) - diff --git a/var/spack/packages/scr/package.py b/var/spack/packages/scr/package.py deleted file mode 100644 index 9fb758f072..0000000000 --- a/var/spack/packages/scr/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Scr(Package): - """SCR caches checkpoint data in storage on the compute nodes of a - Linux cluster to provide a fast, scalable checkpoint/restart - capability for MPI codes""" - - homepage = "https://computation.llnl.gov/project/scr/" - - depends_on("mpi") -# depends_on("dtcmp") - - version('1.1-7', 'a5930e9ab27d1b7049447c2fd7734ebd', url='http://downloads.sourceforge.net/project/scalablecr/releases/scr-1.1-7.tar.gz') - version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e', url='https://github.com/hpc/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz') - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--with-scr-config-file=" + prefix + "/etc/scr.conf") - make() - make("install") diff --git a/var/spack/packages/silo/package.py b/var/spack/packages/silo/package.py deleted file mode 100644 index 9eda11df15..0000000000 --- a/var/spack/packages/silo/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Silo(Package): - """Silo is a library for reading and writing a wide variety of scientific data to binary, disk files.""" - - homepage = "http://wci.llnl.gov/simulation/computer-codes/silo" - url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.8/silo-4.8.tar.gz" - - #version('4.9', 'a83eda4f06761a86726e918fc55e782a') - version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9') - - depends_on("hdf5@:1.8.12") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-hdf5=%s" %spec['hdf5'].prefix) - - make() - make("install") diff --git a/var/spack/packages/snappy/package.py b/var/spack/packages/snappy/package.py deleted file mode 100644 index c8f9ceef7d..0000000000 --- a/var/spack/packages/snappy/package.py +++ /dev/null @@ -1,15 +0,0 @@ -import os -from spack import * - -class Snappy(Package): - """A fast compressor/decompressor: https://code.google.com/p/snappy""" - - homepage = "https://code.google.com/p/snappy" - url = "https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz" - - version('1.1.3', '7358c82f133dc77798e4c2062a749b73') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/spindle/package.py b/var/spack/packages/spindle/package.py deleted file mode 100644 index 06a1e14284..0000000000 --- a/var/spack/packages/spindle/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Spindle(Package): - """Spindle improves the library-loading performance of dynamically - linked HPC applications. Without Spindle large MPI jobs can - overload on a shared file system when loading dynamically - linked libraries, causing site-wide performance problems. - """ - homepage = "https://computation.llnl.gov/project/spindle/" - url = "https://github.com/hpc/Spindle/archive/v0.8.1.tar.gz" - list_url = "https://github.com/hpc/Spindle/releases" - - version('0.8.1', 'f11793a6b9d8df2cd231fccb2857d912') - - depends_on("launchmon") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/sqlite/package.py b/var/spack/packages/sqlite/package.py deleted file mode 100644 index 734b0b6cb6..0000000000 --- a/var/spack/packages/sqlite/package.py +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Sqlite(Package): - """SQLite3 is an SQL database engine in a C library. Programs that - link the SQLite3 library can have SQL database access without - running a separate RDBMS process. - """ - homepage = "www.sqlite.org" - - version('3.8.5', '0544ef6d7afd8ca797935ccc2685a9ed', - url='http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/stat/configure_mpicxx.patch b/var/spack/packages/stat/configure_mpicxx.patch deleted file mode 100644 index e09056d95c..0000000000 --- a/var/spack/packages/stat/configure_mpicxx.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 07ab6e565f939c54fff6580fc8463ea61662871a -Author: Gregory L. Lee -Date: Tue May 20 14:53:35 2014 -0700 - - re-boostrap to update configure - -diff --git a/configure b/configure -index 6c4af7d..30901ea 100755 ---- a/configure -+++ b/configure -@@ -15529,7 +15529,7 @@ fi - done - test -n "$MPICC" || MPICC="$CC" - -- for ac_prog in mpig++ mpiicpc mpxlC mpixlC -+ for ac_prog in mpig++ mpiCC mpicxx mpiicpc mpxlC mpixlC - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 diff --git a/var/spack/packages/stat/package.py b/var/spack/packages/stat/package.py deleted file mode 100644 index 5d81e62731..0000000000 --- a/var/spack/packages/stat/package.py +++ /dev/null @@ -1,40 +0,0 @@ -from spack import * - -class Stat(Package): - """Library to create, manipulate, and export graphs Graphlib.""" - homepage = "http://paradyn.org/STAT/STAT.html" - url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz" - - version('2.2.0', '26bd69dd57a15afdd5d0ebdb0b7fb6fc') - version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91') - version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b') - - variant('dysect', default=False, description="enable DySectAPI") - - depends_on('libelf') - depends_on('libdwarf') - depends_on('dyninst') - depends_on('graphlib') - depends_on('graphviz') - depends_on('launchmon') - depends_on('mrnet') - - patch('configure_mpicxx.patch', when='@2.1.0') - - def install(self, spec, prefix): - configure_args = [ - "--enable-gui", - "--prefix=%s" % prefix, - "--disable-examples", # Examples require MPI: avoid this dependency. - "--with-launchmon=%s" % spec['launchmon'].prefix, - "--with-mrnet=%s" % spec['mrnet'].prefix, - "--with-graphlib=%s" % spec['graphlib'].prefix, - "--with-stackwalker=%s" % spec['dyninst'].prefix, - "--with-libdwarf=%s" % spec['libdwarf'].prefix - ] - if '+dysect' in spec: - configure_args.append('--enable-dysectapi') - configure(*configure_args) - - make(parallel=False) - make("install") diff --git a/var/spack/packages/sundials/package.py b/var/spack/packages/sundials/package.py deleted file mode 100644 index 8b784c8c3c..0000000000 --- a/var/spack/packages/sundials/package.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Sundials(Package): - """SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)""" - homepage = "http://computation.llnl.gov/casc/sundials/" - url = "http://computation.llnl.gov/casc/sundials/download/code/sundials-2.5.0.tar.gz" - - version('2.5.0', 'aba8b56eec600de3109cfb967aa3ba0f') - - depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/swig/package.py b/var/spack/packages/swig/package.py deleted file mode 100644 index ee536d7063..0000000000 --- a/var/spack/packages/swig/package.py +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Swig(Package): - """SWIG is an interface compiler that connects programs written in - C and C++ with scripting languages such as Perl, Python, Ruby, - and Tcl. It works by taking the declarations found in C/C++ - header files and using them to generate the wrapper code that - scripting languages need to access the underlying C/C++ - code. In addition, SWIG provides a variety of customization - features that let you tailor the wrapping process to suit your - application.""" - homepage = "http://www.swig.org" - url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" - - version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') - - depends_on('pcre') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/task/package.py b/var/spack/packages/task/package.py deleted file mode 100644 index 07f44cc45b..0000000000 --- a/var/spack/packages/task/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Task(Package): - """Feature-rich console based todo list manager""" - homepage = "http://www.taskwarrior.org" - url = "http://taskwarrior.org/download/task-2.4.4.tar.gz" - - version('2.4.4', '517450c4a23a5842df3e9905b38801b3') - - depends_on("gnutls") - depends_on("libuuid") - # depends_on("gcc@4.8:") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('-DCMAKE_BUILD_TYPE=release', - '..', - *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/taskd/package.py b/var/spack/packages/taskd/package.py deleted file mode 100644 index 66bc0cb484..0000000000 --- a/var/spack/packages/taskd/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Taskd(Package): - """TaskWarrior task synchronization daemon""" - # FIXME: add a proper url for your package's homepage here. - homepage = "http://www.taskwarrior.org" - url = "http://taskwarrior.org/download/taskd-1.1.0.tar.gz" - - version('1.1.0', 'ac855828c16f199bdbc45fbc227388d0') - - depends_on("libuuid") - depends_on("gnutls") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('-DCMAKE_BUILD_TYPE=release', - '..', - *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/tau/package.py b/var/spack/packages/tau/package.py deleted file mode 100644 index 048fac80aa..0000000000 --- a/var/spack/packages/tau/package.py +++ /dev/null @@ -1,36 +0,0 @@ -from spack import * - -import os -from llnl.util.filesystem import join_path - -class Tau(Package): - """A portable profiling and tracing toolkit for performance - analysis of parallel programs written in Fortran, C, C++, UPC, - Java, Python.""" - homepage = "http://www.cs.uoregon.edu/research/tau" - url = "http://www.cs.uoregon.edu/research/paracomp/tau/tauprofile/dist/tau-2.23.1.tar.gz" - - version('2.23.1', '6593b47ae1e7a838e632652f0426fe72') - - def install(self, spec, prefix): - # TAU isn't happy with directories that have '@' in the path. Sigh. - change_sed_delimiter('@', ';', 'configure') - change_sed_delimiter('@', ';', 'utils/FixMakefile') - change_sed_delimiter('@', ';', 'utils/FixMakefile.sed.default') - - # After that, it's relatively standard. - configure("-prefix=%s" % prefix) - make("install") - - # Link arch-specific directories into prefix since there is - # only one arch per prefix the way spack installs. - self.link_tau_arch_dirs() - - - def link_tau_arch_dirs(self): - for subdir in os.listdir(self.prefix): - for d in ('bin', 'lib'): - src = join_path(self.prefix, subdir, d) - dest = join_path(self.prefix, d) - if os.path.isdir(src) and not os.path.exists(dest): - os.symlink(join_path(subdir, d), dest) diff --git a/var/spack/packages/tcl/package.py b/var/spack/packages/tcl/package.py deleted file mode 100644 index 529adf7788..0000000000 --- a/var/spack/packages/tcl/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class Tcl(Package): - """Tcl (Tool Command Language) is a very powerful but easy to - learn dynamic programming language, suitable for a very wide - range of uses, including web and desktop applications, - networking, administration, testing and many more. Open source - and business-friendly, Tcl is a mature yet evolving language - that is truly cross platform, easily deployed and highly - extensible.""" - homepage = "http://www.tcl.tk" - - version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', - url="http://prdownloads.sourceforge.net/tcl/tcl8.6.3-src.tar.gz") - - depends_on('zlib') - - def install(self, spec, prefix): - with working_dir('unix'): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/the_silver_searcher/package.py b/var/spack/packages/the_silver_searcher/package.py deleted file mode 100644 index e4020b6766..0000000000 --- a/var/spack/packages/the_silver_searcher/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class TheSilverSearcher(Package): - """Fast recursive grep alternative""" - homepage = "http://geoff.greer.fm/ag/" - url = "http://geoff.greer.fm/ag/releases/the_silver_searcher-0.30.0.tar.gz" - - version('0.30.0', '95e2e7859fab1156c835aff7413481db') - - depends_on('pcre') - depends_on('xz') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/thrift/package.py b/var/spack/packages/thrift/package.py deleted file mode 100644 index 0e15052f64..0000000000 --- a/var/spack/packages/thrift/package.py +++ /dev/null @@ -1,44 +0,0 @@ -from spack import * - -class Thrift(Package): - """The Apache Thrift software framework, for scalable cross-language services - development, combines a software stack with a code generation engine to build - services that work efficiently and seamlessly between C++, Java, Python, PHP, - Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml - and Delphi and other languages.""" - - homepage = "http://thrift.apache.org" - url = "http://apache.mirrors.ionfish.org/thrift/0.9.2/thrift-0.9.2.tar.gz" - - version('0.9.2', '89f63cc4d0100912f4a1f8a9dee63678') - - extends("python") - - depends_on("autoconf") - depends_on("automake") - depends_on("bison") - depends_on("boost") - depends_on("flex") - depends_on("jdk") - depends_on("libtool") - depends_on("openssl") - depends_on("python") - - # Compilation fails for most languages, fortunately cpp installs fine - # All other languages (yes, including C) are omitted until someone needs them - def install(self, spec, prefix): - env["PY_PREFIX"] = prefix - env["JAVA_PREFIX"] = prefix - - configure("--prefix=%s" % prefix, - "--with-boost=%s" % spec['boost'].prefix, - "--with-c=no", - "--with-go=no", - "--with-python=yes", - "--with-lua=no", - "--with-php=no", - "--with-qt4=no", - "--enable-tests=no") - - make() - make("install") diff --git a/var/spack/packages/tk/package.py b/var/spack/packages/tk/package.py deleted file mode 100644 index 96736f6f95..0000000000 --- a/var/spack/packages/tk/package.py +++ /dev/null @@ -1,22 +0,0 @@ -from spack import * - -class Tk(Package): - """Tk is a graphical user interface toolkit that takes developing - desktop applications to a higher level than conventional - approaches. Tk is the standard GUI not only for Tcl, but for - many other dynamic languages, and can produce rich, native - 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.3-src.tar.gz" - - version('src', '85ca4dbf4dcc19777fd456f6ee5d0221') - - depends_on("tcl") - - def install(self, spec, prefix): - with working_dir('unix'): - configure("--prefix=%s" % prefix, - "--with-tcl=%s" % spec['tcl'].prefix.lib) - make() - make("install") diff --git a/var/spack/packages/tmux/package.py b/var/spack/packages/tmux/package.py deleted file mode 100644 index 23d36db427..0000000000 --- a/var/spack/packages/tmux/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * - -class Tmux(Package): - """tmux is a terminal multiplexer. What is a terminal multiplexer? It lets - you switch easily between several programs in one terminal, detach them (they - keep running in the background) and reattach them to a different terminal. And - do a lot more. - """ - - homepage = "http://tmux.sourceforge.net" - url = "http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz" - - version('1.9a', 'b07601711f96f1d260b390513b509a2d') - - depends_on('libevent') - depends_on('ncurses') - - def install(self, spec, prefix): - configure( - "--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix)) - - make() - make("install") diff --git a/var/spack/packages/tmuxinator/package.py b/var/spack/packages/tmuxinator/package.py deleted file mode 100644 index 26c061cbd6..0000000000 --- a/var/spack/packages/tmuxinator/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Tmuxinator(Package): - """A session configuration creator and manager for tmux""" - homepage = "https://github.com/tmuxinator/tmuxinator" - url = "https://github.com/tmuxinator/tmuxinator" - - version('0.6.11', - git='https://github.com/tmuxinator/tmuxinator', - tag='v0.6.11') - - extends('ruby') - - def install(self, spec, prefix): - gem('build', 'tmuxinator.gemspec') - gem('install', 'tmuxinator-{}.gem'.format(self.version)) - diff --git a/var/spack/packages/trilinos/package.py b/var/spack/packages/trilinos/package.py deleted file mode 100644 index 7c43f796a4..0000000000 --- a/var/spack/packages/trilinos/package.py +++ /dev/null @@ -1,50 +0,0 @@ -from spack import * - - -class Trilinos(Package): - """ - The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented - software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. - A unique design feature of Trilinos is its focus on packages. - """ - homepage = "https://trilinos.org/" - url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" - - version('12.2.1', '6161926ea247863c690e927687f83be9') - version('12.0.1', 'bd99741d047471e127b8296b2ec08017') - version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426') - version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') - version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') - - variant('mpi', default=True, description='Add a dependency on MPI and enables MPI dependent packages') - - # Everything should be compiled with -fpic - depends_on('blas') - depends_on('lapack') - depends_on('boost') - depends_on('netcdf') - depends_on('matio') - depends_on('glm') - depends_on('swig') - depends_on('mpi', when='+mpi') - - def install(self, spec, prefix): - - options = [ - '-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', - '-DTrilinos_ENABLE_TESTS:BOOL=OFF', - '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', - '-DBUILD_SHARED_LIBS:BOOL=ON', - '-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix, - '-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix - ] - if '+mpi' in spec: - mpi_options = ['-DTPL_ENABLE_MPI:BOOL=ON'] - options.extend(mpi_options) - - # -DCMAKE_INSTALL_PREFIX and all the likes... - options.extend(std_cmake_args) - with working_dir('spack-build', create=True): - cmake('..', *options) - make() - make('install') diff --git a/var/spack/packages/uncrustify/package.py b/var/spack/packages/uncrustify/package.py deleted file mode 100644 index d3f2d1b473..0000000000 --- a/var/spack/packages/uncrustify/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class Uncrustify(Package): - """Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA""" - - homepage = "http://uncrustify.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz" - - version('0.61', 'b6140106e74c64e831d0b1c4b6cf7727') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/util-linux/package.py b/var/spack/packages/util-linux/package.py deleted file mode 100644 index cb7ceabf57..0000000000 --- a/var/spack/packages/util-linux/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * -import os - -class UtilLinux(Package): - """Util-linux is a suite of essential utilities for any Linux system.""" - - homepage = "http://freecode.com/projects/util-linux" - url = "https://www.kernel.org/pub/linux/utils/util-linux/v2.25/util-linux-2.25.tar.gz" - - version('2.25', 'f6d7fc6952ec69c4dc62c8d7c59c1d57') - - depends_on("python@2.7:") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s/pkgconfig" % spec['python'].prefix.lib, - "--disable-use-tty-group") - - make() - make("install") diff --git a/var/spack/packages/vim/package.py b/var/spack/packages/vim/package.py deleted file mode 100644 index 4099b3257f..0000000000 --- a/var/spack/packages/vim/package.py +++ /dev/null @@ -1,83 +0,0 @@ -from spack import * - -class Vim(Package): - """Vim is a highly configurable text editor built to enable efficient text - editing. It is an improved version of the vi editor distributed with most - UNIX systems. Vim is often called a "programmer's editor," and so useful - for programming that many consider it an entire IDE. It's not just for - programmers, though. Vim is perfect for all kinds of text editing, from - composing email to editing configuration files. - """ - - homepage = "http://www.vim.org" - url = "ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2" - list_url = "http://ftp.vim.org/pub/vim/unix/" - - version('7.4', '607e135c559be642f210094ad023dc65') - version('7.3', '5b9510a17074e2b37d8bb38ae09edbf2') - version('7.2', 'f0901284b338e448bfd79ccca0041254') - version('7.1', '44c6b4914f38d6f9aa959640b89da329') - version('7.0', '4ca69757678272f718b1041c810d82d8') - version('6.4', '774c14d93ce58674b3b2c880edd12d77') - version('6.3', '821fda8f14d674346b87e3ef9cb96389') - version('6.2', 'c49d360bbd069d00e2a57804f2a123d9') - version('6.1.405', 'd220ff58f2c72ed606e6d0297c2f2a7c') - version('6.1', '7fd0f915adc7c0dab89772884268b030') - version('6.0', '9d9ca84d489af6b3f54639dd97af3774') - - feature_sets = ('huge', 'big', 'normal', 'small', 'tiny') - for fs in feature_sets: - variant(fs, default=False, description="Use '%s' feature set" % fs) - - variant('python', default=False, description="build with Python") - depends_on('python', when='+python') - - variant('ruby', default=False, description="build with Ruby") - depends_on('ruby', when='+ruby') - - variant('cscope', default=False, description="build with cscope support") - depends_on('cscope', when='+cscope') - - variant('gui', default=False, description="build with gui (gvim)") - # virtual dependency? - - def install(self, spec, prefix): - feature_set = None - for fs in self.feature_sets: - if "+" + fs in spec: - if feature_set is not None: - tty.error("Only one feature set allowed, both %s and %s specified" - % (feature_set, fs)) - feature_set = fs - if '+gui' in spec: - if feature_set is not None: - if feature_set is not 'huge': - tty.error("+gui variant requires 'huge' feature set, %s was specified" - % feature_set) - feature_set = 'huge' - if feature_set is None: - feature_set = 'normal' - - configure_args = [] - configure_args.append("--with-features=" + feature_set) - - if '+python' in spec: - configure_args.append("--enable-pythoninterp=yes") - else: - configure_args.append("--enable-pythoninterp=dynamic") - - if '+ruby' in spec: - configure_args.append("--enable-rubyinterp=yes") - else: - configure_args.append("--enable-rubyinterp=dynamic") - - if '+gui' in spec: - configure_args.append("--enable-gui=auto") - - if '+cscope' in spec: - configure_args.append("--enable-cscope") - - configure("--prefix=%s" % prefix, *configure_args) - - make() - make("install") diff --git a/var/spack/packages/vtk/package.py b/var/spack/packages/vtk/package.py deleted file mode 100644 index 4a27a8fedb..0000000000 --- a/var/spack/packages/vtk/package.py +++ /dev/null @@ -1,40 +0,0 @@ -from spack import * - -class Vtk(Package): - """The Visualization Toolkit (VTK) is an open-source, freely - available software system for 3D computer graphics, image - processing and visualization. """ - homepage = "http://www.vtk.org" - url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" - - version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d') - - depends_on("qt") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake_args = [ - "..", - "-DBUILD_SHARED_LIBS=ON", - # Disable wrappers for other languages. - "-DVTK_WRAP_PYTHON=OFF", - "-DVTK_WRAP_JAVA=OFF", - "-DVTK_WRAP_TCL=OFF"] - cmake_args.extend(std_cmake_args) - - # Enable Qt support here. - cmake_args.extend([ - "-DQT_QMAKE_EXECUTABLE:PATH=%s/qmake" % spec['qt'].prefix.bin, - "-DVTK_Group_Qt:BOOL=ON", - # Ignore webkit because it's hard to build w/Qt - "-DVTK_Group_Qt=OFF", - "-DModule_vtkGUISupportQt:BOOL=ON", - "-DModule_vtkGUISupportQtOpenGL:BOOL=ON" - ]) - - if spec['qt'].satisfies('@5'): - cmake_args.append("-DVTK_QT_VERSION:STRING=5") - - cmake(*cmake_args) - make() - make("install") diff --git a/var/spack/packages/wget/package.py b/var/spack/packages/wget/package.py deleted file mode 100644 index c8fd025122..0000000000 --- a/var/spack/packages/wget/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Wget(Package): - """GNU Wget is a free software package for retrieving files using - HTTP, HTTPS and FTP, the most widely-used Internet protocols. It - is a non-interactive commandline tool, so it may easily be called - from scripts, cron jobs, terminals without X-Windows support, - etc.""" - - homepage = "http://www.gnu.org/software/wget/" - url = "http://ftp.gnu.org/gnu/wget/wget-1.16.tar.xz" - - version('1.16', 'fe102975ab3a6c049777883f1bb9ad07') - - depends_on("openssl") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-ssl=openssl") - make() - make("install") diff --git a/var/spack/packages/wx/package.py b/var/spack/packages/wx/package.py deleted file mode 100644 index 1813a8c8a5..0000000000 --- a/var/spack/packages/wx/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * - -class Wx(Package): - """wxWidgets is a C++ library that lets developers create - applications for Windows, Mac OS X, Linux and other platforms - with a single code base. It has popular language bindings for - Python, Perl, Ruby and many other languages, and unlike other - cross-platform toolkits, wxWidgets gives applications a truly - native look and feel because it uses the platform's native API - rather than emulating the GUI. It's also extensive, free, - open-source and mature.""" - homepage = "http://www.wxwidgets.org/" - - version('2.8.12', '2fa39da14bc06ea86fe902579fedc5b1', - url="https://sourceforge.net/projects/wxwindows/files/2.8.12/wxWidgets-2.8.12.tar.gz") - version('3.0.1', 'dad1f1cd9d4c370cbc22700dc492da31', - url="https://sourceforge.net/projects/wxwindows/files/3.0.1/wxWidgets-3.0.1.tar.bz2") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, "--enable-unicode", "--disable-precomp-headers") - - make(parallel=False) - make("install") - diff --git a/var/spack/packages/wxpropgrid/package.py b/var/spack/packages/wxpropgrid/package.py deleted file mode 100644 index 790cead517..0000000000 --- a/var/spack/packages/wxpropgrid/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Wxpropgrid(Package): - """wxPropertyGrid is a property sheet control for wxWidgets. In - other words, it is a specialized two-column grid for editing - properties such as strings, numbers, flagsets, string arrays, - and colours.""" - homepage = "http://wxpropgrid.sourceforge.net/" - url = "http://prdownloads.sourceforge.net/wxpropgrid/wxpropgrid-1.4.15-src.tar.gz" - - version('1.4.15', 'f44b5cd6fd60718bacfabbf7994f1e93') - - depends_on("wx") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, "--with-wxdir=%s" % spec['wx'].prefix.bin, "--enable-unicode") - - make() - make("install") - diff --git a/var/spack/packages/xcb-proto/package.py b/var/spack/packages/xcb-proto/package.py deleted file mode 100644 index 17a94bd892..0000000000 --- a/var/spack/packages/xcb-proto/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class XcbProto(Package): - """Protocol for libxcb""" - - homepage = "http://xcb.freedesktop.org/" - url = "http://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.gz" - - version('1.11', 'c8c6cb72c84f58270f4db1f39607f66a') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/xz/package.py b/var/spack/packages/xz/package.py deleted file mode 100644 index ba6c9733a7..0000000000 --- a/var/spack/packages/xz/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Xz(Package): - """XZ Utils is free general-purpose data compression software with - high compression ratio. XZ Utils were written for POSIX-like - systems, but also work on some not-so-POSIX systems. XZ Utils are - the successor to LZMA Utils.""" - homepage = "http://tukaani.org/xz/" - url = "http://tukaani.org/xz/xz-5.2.0.tar.bz2" - - version('5.2.0', '867cc8611760240ebf3440bd6e170bb9', - url = 'http://tukaani.org/xz/xz-5.2.0.tar.bz2') - version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af', - url = 'http://tukaani.org/xz/xz-5.2.2.tar.bz2') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") - diff --git a/var/spack/packages/yasm/package.py b/var/spack/packages/yasm/package.py deleted file mode 100644 index d3a695b16d..0000000000 --- a/var/spack/packages/yasm/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Yasm(Package): - """Yasm is a complete rewrite of the NASM-2.11.06 assembler. It - supports the x86 and AMD64 instruction sets, accepts NASM and - GAS assembler syntaxes and outputs binary, ELF32 and ELF64 - object formats.""" - homepage = "http://yasm.tortall.net" - url = "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" - - version('1.3.0', 'fc9e586751ff789b34b1f21d572d96af') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/packages/zeromq/package.py b/var/spack/packages/zeromq/package.py deleted file mode 100644 index b5a1e3d4cd..0000000000 --- a/var/spack/packages/zeromq/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Zeromq(Package): - """ The ZMQ networking/concurrency library and core API """ - homepage = "http://zguide.zeromq.org/" - url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz" - - version('4.1.2', '159c0c56a895472f02668e692d122685') - version('4.1.1', '0a4b44aa085644f25c177f79dc13f253') - version('4.0.7', '9b46f7e7b0704b83638ef0d461fd59ab') - version('4.0.6', 'd47dd09ed7ae6e7fd6f9a816d7f5fdf6') - version('4.0.5', '73c39f5eb01b9d7eaf74a5d899f1d03d') - - depends_on("libsodium") - - def install(self, spec, prefix): - configure("--with-libsodium","--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/zlib/package.py b/var/spack/packages/zlib/package.py deleted file mode 100644 index 2770f781ac..0000000000 --- a/var/spack/packages/zlib/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Zlib(Package): - """zlib is designed to be a free, general-purpose, legally unencumbered -- - that is, not covered by any patents -- lossless data-compression library for - use on virtually any computer hardware and operating system. - """ - - homepage = "http://zlib.net" - url = "http://zlib.net/zlib-1.2.8.tar.gz" - - version('1.2.8', '44d667c142d7cda120332623eab69f40') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/zsh/package.py b/var/spack/packages/zsh/package.py deleted file mode 100644 index 99ef9de2e5..0000000000 --- a/var/spack/packages/zsh/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class Zsh(Package): - """ The ZSH shell """ - homepage = "http://www.zsh.org" - url = "http://www.zsh.org/pub/zsh-5.0.8.tar.bz2" - - version('5.0.8', 'e6759e8dd7b714d624feffd0a73ba0fe') - - depends_on("pcre") - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/a/package.py new file mode 100644 index 0000000000..fa63c08df0 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/a/package.py @@ -0,0 +1,12 @@ +from spack import * + +class A(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/b/package.py b/var/spack/repos/builtin.mock/packages/b/package.py new file mode 100644 index 0000000000..cb88aa2157 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/b/package.py @@ -0,0 +1,12 @@ +from spack import * + +class B(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/b-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/c/package.py b/var/spack/repos/builtin.mock/packages/c/package.py new file mode 100644 index 0000000000..f51b913fa9 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/c/package.py @@ -0,0 +1,12 @@ +from spack import * + +class C(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/c-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/callpath/package.py b/var/spack/repos/builtin.mock/packages/callpath/package.py new file mode 100644 index 0000000000..5b6b70ba2a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/callpath/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Callpath(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("dyninst") + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin.mock/packages/direct_mpich/package.py b/var/spack/repos/builtin.mock/packages/direct_mpich/package.py new file mode 100644 index 0000000000..2ced82521b --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/direct_mpich/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class DirectMpich(Package): + homepage = "http://www.example.com" + url = "http://www.example.com/direct_mpich-1.0.tar.gz" + + version('1.0', 'foobarbaz') + + depends_on('mpich') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dyninst/package.py b/var/spack/repos/builtin.mock/packages/dyninst/package.py new file mode 100644 index 0000000000..7998578da1 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dyninst/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Dyninst(Package): + homepage = "https://paradyn.org" + url = "http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz" + + version('8.2', 'cxyzab', + url='http://www.paradyn.org/release8.2/DyninstAPI-8.2.tgz') + version('8.1.2', 'bcxyza', + url='http://www.paradyn.org/release8.1.2/DyninstAPI-8.1.2.tgz') + version('8.1.1', 'abcxyz', + url='http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz') + + depends_on("libelf") + depends_on("libdwarf") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin.mock/packages/e/package.py b/var/spack/repos/builtin.mock/packages/e/package.py new file mode 100644 index 0000000000..76c6b64c7f --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/e/package.py @@ -0,0 +1,12 @@ +from spack import * + +class E(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/e-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/fake/package.py b/var/spack/repos/builtin.mock/packages/fake/package.py new file mode 100644 index 0000000000..fb3c2bdd2e --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/fake/package.py @@ -0,0 +1,34 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Fake(Package): + homepage = "http://www.fake-spack-example.org" + url = "http://www.fake-spack-example.org/downloads/fake-1.0.tar.gz" + + version('1.0', 'foobarbaz') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/git-test/package.py b/var/spack/repos/builtin.mock/packages/git-test/package.py new file mode 100644 index 0000000000..689185463c --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/git-test/package.py @@ -0,0 +1,10 @@ +from spack import * + +class GitTest(Package): + """Mock package that uses git for fetching.""" + homepage = "http://www.git-fetch-example.com" + + version('git', git='to-be-filled-in-by-test') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/hg-test/package.py b/var/spack/repos/builtin.mock/packages/hg-test/package.py new file mode 100644 index 0000000000..462f1e4c3a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/hg-test/package.py @@ -0,0 +1,10 @@ +from spack import * + +class HgTest(Package): + """Test package that does fetching with mercurial.""" + homepage = "http://www.hg-fetch-example.com" + + version('hg', hg='to-be-filled-in-by-test') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py b/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py new file mode 100644 index 0000000000..daf8b4b166 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class IndirectMpich(Package): + """Test case for a package that depends on MPI and one of its + dependencies requires a *particular version* of MPI. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/indirect_mpich-1.0.tar.gz" + + version(1.0, 'foobarbaz') + + depends_on('mpi') + depends_on('direct_mpich') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/libdwarf/package.py b/var/spack/repos/builtin.mock/packages/libdwarf/package.py new file mode 100644 index 0000000000..0b8df04cfb --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/libdwarf/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with 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 + +# Only build certain parts of dwarf because the other ones break. +dwarf_dirs = ['libdwarf', 'dwarfdump2'] + +class Libdwarf(Package): + homepage = "http://www.prevanders.net/dwarf.html" + url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" + list_url = homepage + + version(20130729, "64b42692e947d5180e162e46c689dfbf") + version(20130207, 'foobarbaz') + version(20111030, 'foobarbaz') + version(20070703, 'foobarbaz') + + depends_on("libelf") + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/libelf/package.py b/var/spack/repos/builtin.mock/packages/libelf/package.py new file mode 100644 index 0000000000..94c8f942cd --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/libelf/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Libelf(Package): + homepage = "http://www.mr511.de/software/english.html" + url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" + + version('0.8.13', '4136d7b4c04df68b686570afa26988ac') + version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') + version('0.8.10', '9db4d36c283d9790d8fa7df1f4d7b4d9') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--enable-shared", + "--disable-dependency-tracking", + "--disable-debug") + make() + + # The mkdir commands in libelf's intsall can fail in parallel + make("install", parallel=False) diff --git a/var/spack/repos/builtin.mock/packages/mpich/package.py b/var/spack/repos/builtin.mock/packages/mpich/package.py new file mode 100644 index 0000000000..f77d3efc5d --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/mpich/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Mpich(Package): + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" + list_depth = 2 + + variant('debug', default=False, + description="Compile MPICH with debug flags.") + + version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') + version('3.0.3', 'foobarbaz') + version('3.0.2', 'foobarbaz') + version('3.0.1', 'foobarbaz') + version('3.0', 'foobarbaz') + + provides('mpi@:3', when='@3:') + provides('mpi@:1', when='@:1') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/mpich2/package.py b/var/spack/repos/builtin.mock/packages/mpich2/package.py new file mode 100644 index 0000000000..827b94c8a4 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/mpich2/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Mpich2(Package): + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/1.5/mpich2-1.5.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" + list_depth = 2 + + version('1.5', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') + version('1.4', 'foobarbaz') + version('1.3', 'foobarbaz') + version('1.2', 'foobarbaz') + version('1.1', 'foobarbaz') + version('1.0', 'foobarbaz') + + provides('mpi@:2.0') + provides('mpi@:2.1', when='@1.1:') + provides('mpi@:2.2', when='@1.2:') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin.mock/packages/mpileaks/package.py b/var/spack/repos/builtin.mock/packages/mpileaks/package.py new file mode 100644 index 0000000000..3989f1b452 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/mpileaks/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Mpileaks(Package): + homepage = "http://www.llnl.gov" + url = "http://www.llnl.gov/mpileaks-1.0.tar.gz" + + version(1.0, 'foobarbaz') + version(2.1, 'foobarbaz') + version(2.2, 'foobarbaz') + version(2.3, 'foobarbaz') + + variant('debug', default=False, description='Debug variant') + variant('opt', default=False, description='Optimized variant') + + depends_on("mpi") + depends_on("callpath") + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py new file mode 100644 index 0000000000..75b1606ffc --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py @@ -0,0 +1,143 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Multimethod(Package): + """This package is designed for use with Spack's multimethod test. + It has a bunch of test cases for the @when decorator that the + test uses. + """ + + homepage = 'http://www.example.com/' + url = 'http://www.example.com/example-1.0.tar.gz' + + # + # These functions are only valid for versions 1, 2, and 3. + # + @when('@1.0') + def no_version_2(self): + return 1 + + @when('@3.0') + def no_version_2(self): + return 3 + + @when('@4.0') + def no_version_2(self): + return 4 + + + # + # These functions overlap, so there is ambiguity, but we'll take + # the first one. + # + @when('@:4') + def version_overlap(self): + return 1 + + @when('@2:') + def version_overlap(self): + return 2 + + + # + # More complicated case with cascading versions. + # + def mpi_version(self): + return 0 + + @when('^mpi@3:') + def mpi_version(self): + return 3 + + @when('^mpi@2:') + def mpi_version(self): + return 2 + + @when('^mpi@1:') + def mpi_version(self): + return 1 + + + # + # Use these to test whether the default method is called when no + # match is found. This also tests whether we can switch methods + # on compilers + # + def has_a_default(self): + return 'default' + + @when('%gcc') + def has_a_default(self): + return 'gcc' + + @when('%intel') + def has_a_default(self): + return 'intel' + + + + # + # Make sure we can switch methods on different architectures + # + @when('=x86_64') + def different_by_architecture(self): + return 'x86_64' + + @when('=ppc64') + def different_by_architecture(self): + return 'ppc64' + + @when('=ppc32') + def different_by_architecture(self): + return 'ppc32' + + @when('=arm64') + def different_by_architecture(self): + return 'arm64' + + + # + # Make sure we can switch methods on different dependencies + # + @when('^mpich') + def different_by_dep(self): + return 'mpich' + + @when('^zmpi') + def different_by_dep(self): + return 'zmpi' + + + # + # Make sure we can switch on virtual dependencies + # + def different_by_virtual_dep(self): + return 1 + + @when('^mpi@2:') + def different_by_virtual_dep(self): + return 2 diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py new file mode 100644 index 0000000000..ef0587588e --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py @@ -0,0 +1,18 @@ +from spack import * + +class OptionalDepTest2(Package): + """Depends on the optional-dep-test package""" + + homepage = "http://www.example.com" + url = "http://www.example.com/optional-dep-test-2-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + variant('odt', default=False) + variant('mpi', default=False) + + depends_on('optional-dep-test', when='+odt') + depends_on('optional-dep-test+mpi', when='+mpi') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py new file mode 100644 index 0000000000..e6cb3bd6e7 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py @@ -0,0 +1,17 @@ +from spack import * + +class OptionalDepTest3(Package): + """Depends on the optional-dep-test package""" + + homepage = "http://www.example.com" + url = "http://www.example.com/optional-dep-test-3-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + variant('var', default=False) + + depends_on('a', when='~var') + depends_on('b', when='+var') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py new file mode 100644 index 0000000000..bb57576ca9 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py @@ -0,0 +1,29 @@ +from spack import * + +class OptionalDepTest(Package): + """Description""" + + homepage = "http://www.example.com" + url = "http://www.example.com/optional_dep_test-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + version('1.1', '0123456789abcdef0123456789abcdef') + + variant('a', default=False) + variant('f', default=False) + variant('mpi', default=False) + + depends_on('a', when='+a') + depends_on('b', when='@1.1') + depends_on('c', when='%intel') + depends_on('d', when='%intel@64.1') + depends_on('e', when='%clang@34:40') + + depends_on('f', when='+f') + depends_on('g', when='^f') + depends_on('mpi', when='^g') + + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/svn-test/package.py b/var/spack/repos/builtin.mock/packages/svn-test/package.py new file mode 100644 index 0000000000..ba4d5522b4 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/svn-test/package.py @@ -0,0 +1,10 @@ +from spack import * + +class SvnTest(Package): + """Mock package that uses svn for fetching.""" + url = "http://www.example.com/svn-test-1.0.tar.gz" + + version('svn', 'to-be-filled-in-by-test') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py b/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py new file mode 100644 index 0000000000..c4db9f5f07 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class TrivialInstallTestPackage(Package): + """This package is a stub with a trivial install method. It allows us + to test the install and uninstall logic of spack.""" + homepage = "http://www.example.com/trivial_install" + url = "http://www.unit-test-should-replace-this-url/trivial_install-1.0.tar.gz" + + version('1.0', 'foobarbaz') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make('install') diff --git a/var/spack/repos/builtin.mock/packages/zmpi/package.py b/var/spack/repos/builtin.mock/packages/zmpi/package.py new file mode 100644 index 0000000000..8c6ceda6d3 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/zmpi/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Zmpi(Package): + """This is a fake MPI package used to demonstrate virtual package providers + with dependencies.""" + homepage = "http://www.spack-fake-zmpi.org" + url = "http://www.spack-fake-zmpi.org/downloads/zmpi-1.0.tar.gz" + + version('1.0', 'foobarbaz') + + provides('mpi@:10.0') + depends_on('fake') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/repo.yaml b/var/spack/repos/builtin.mock/repo.yaml new file mode 100644 index 0000000000..30b068da13 --- /dev/null +++ b/var/spack/repos/builtin.mock/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: builtin.mock diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py new file mode 100644 index 0000000000..753ea80ca6 --- /dev/null +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -0,0 +1,37 @@ +from spack import * + +class Imagemagick(Package): + """ImageMagick is a image processing library""" + homepage = "http://www.imagemagic.org" + + #------------------------------------------------------------------------- + # ImageMagick does not keep around anything but *-10 versions, so + # this URL may change. If you want the bleeding edge, you can + # uncomment it and see if it works but you may need to try to + # fetch a newer version (-6, -7, -8, -9, etc.) or you can stick + # wtih the older, stable, archived -10 versions below. + # + # TODO: would be nice if spack had a way to recommend avoiding a + # TODO: bleeding edge version, but not comment it out. + # ------------------------------------------------------------------------- + # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', + # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") + + #------------------------------------------------------------------------- + # *-10 versions are archived, so these versions should fetch reliably. + # ------------------------------------------------------------------------- + version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', + url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") + + depends_on('libtool') + depends_on('jpeg') + depends_on('libpng') + depends_on('freetype') + depends_on('fontconfig') + depends_on('libtiff') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/Mitos/package.py b/var/spack/repos/builtin/packages/Mitos/package.py new file mode 100644 index 0000000000..e312da3ffc --- /dev/null +++ b/var/spack/repos/builtin/packages/Mitos/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Mitos(Package): + """Mitos is a library and a tool for collecting sampled memory + performance data to view with MemAxes""" + + homepage = "https://github.com/scalability-llnl/Mitos" + url = "https://github.com/scalability-llnl/Mitos" + + version('0.9.1', 'c6cb57f3cae54f5157affd97ef7ef79e', git='https://github.com/scalability-llnl/Mitos.git', tag='v0.9.1') + + depends_on('dyninst@8.2.1:') + depends_on('hwloc') + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py new file mode 100644 index 0000000000..2e6f65a742 --- /dev/null +++ b/var/spack/repos/builtin/packages/R/package.py @@ -0,0 +1,33 @@ +from spack import * + +class R(Package): + """R is 'GNU S', a freely available language and environment for + statistical computing and graphics which provides a wide va + riety of statistical and graphical techniques: linear and + nonlinear modelling, statistical tests, time series analysis, + classification, clustering, etc. Please consult the R project + homepage for further information.""" + homepage = "http://www.example.com" + url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" + + version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74') + + depends_on("readline") + depends_on("ncurses") + depends_on("icu") + depends_on("glib") + depends_on("zlib") + depends_on("libtiff") + depends_on("jpeg") + depends_on("cairo") + depends_on("pango") + depends_on("freetype") + depends_on("tcl") + depends_on("tk") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--enable-R-shlib", + "--enable-BLAS-shlib") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/SAMRAI/no-tool-build.patch b/var/spack/repos/builtin/packages/SAMRAI/no-tool-build.patch new file mode 100644 index 0000000000..1adf0cf721 --- /dev/null +++ b/var/spack/repos/builtin/packages/SAMRAI/no-tool-build.patch @@ -0,0 +1,20 @@ +--- SAMRAI/Makefile.in 2013-05-31 11:04:32.000000000 -0700 ++++ SAMRAI/Makefile.in.notools 2014-05-30 10:31:15.135979900 -0700 +@@ -8,7 +8,7 @@ + ## + ######################################################################### + +-default: library tools ++default: library + + SAMRAI = @top_srcdir@ + SUBDIR = . +@@ -135,7 +135,7 @@ + done + $(MAKE) archive_remove_obj_names + +-install: library tools ++install: library + $(INSTALL) -d -m 755 $(INSTDIR)/config + $(INSTALL) -d -m 755 $(INSTDIR)/lib + $(INSTALL) -d -m 755 $(INSTDIR)/bin diff --git a/var/spack/repos/builtin/packages/SAMRAI/package.py b/var/spack/repos/builtin/packages/SAMRAI/package.py new file mode 100644 index 0000000000..eef041f0d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/SAMRAI/package.py @@ -0,0 +1,53 @@ +from spack import * + +class Samrai(Package): + """SAMRAI (Structured Adaptive Mesh Refinement Application Infrastructure) + is an object-oriented C++ software library enables exploration of numerical, + algorithmic, parallel computing, and software issues associated with applying + structured adaptive mesh refinement (SAMR) technology in large-scale parallel + application development. + """ + homepage = "https://computation.llnl.gov/project/SAMRAI/" + url = "https://computation.llnl.gov/project/SAMRAI/download/SAMRAI-v3.9.1.tar.gz" + list_url = homepage + + version('3.9.1', '232d04d0c995f5abf20d94350befd0b2') + version('3.7.3', '12d574eacadf8c9a70f1bb4cd1a69df6') + version('3.7.2', 'f6a716f171c9fdbf3cb12f71fa6e2737') + version('3.6.3-beta', 'ef0510bf2893042daedaca434e5ec6ce') + version('3.5.2-beta', 'd072d9d681eeb9ada15ce91bea784274') + version('3.5.0-beta', '1ad18a319fc573e12e2b1fbb6f6b0a19') + version('3.4.1-beta', '00814cbee2cb76bf8302aff56bbb385b') + version('3.3.3-beta', '1db3241d3e1cab913dc310d736c34388') + version('3.3.2-beta', 'e598a085dab979498fcb6c110c4dd26c') + version('2.4.4', '04fb048ed0efe7c531ac10c81cc5f6ac') + + depends_on("mpi") + depends_on("zlib") + depends_on("hdf5") + depends_on("boost") + + # don't build tools with gcc + patch('no-tool-build.patch', when='%gcc') + + # TODO: currently hard-coded to use openmpi - be careful! + def install(self, spec, prefix): + mpi = next(m for m in ('openmpi', 'mpich', 'mvapich') + if m in spec) + + configure( + "--prefix=%s" % prefix, + "--with-CXX=%s" % spec[mpi].prefix.bin + "/mpic++", + "--with-CC=%s" % spec[mpi].prefix.bin + "/mpicc", + "--with-hdf5=%s" % spec['hdf5'].prefix, + "--with-boost=%s" % spec['boost'].prefix, + "--with-zlib=%s" % spec['zlib'].prefix, + "--without-blas", + "--without-lapack", + "--with-hypre=no", + "--with-petsc=no", + "--enable-opt", + "--disable-debug") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py new file mode 100644 index 0000000000..45dcc7c0e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/activeharmony/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Activeharmony(Package): + """Active Harmony: a framework for auto-tuning (the automated search for values to improve the performance of a target application).""" + homepage = "http://www.dyninst.org/harmony" + url = "http://www.dyninst.org/sites/default/files/downloads/harmony/ah-4.5.tar.gz" + + version('4.5', 'caee5b864716d376e2c25d739251b2a9') + + def install(self, spec, prefix): + make("CFLAGS=-O3") + make("install", 'PREFIX=%s' % prefix) + +from spack import * + diff --git a/var/spack/repos/builtin/packages/adept-utils/package.py b/var/spack/repos/builtin/packages/adept-utils/package.py new file mode 100644 index 0000000000..e4a2e1523f --- /dev/null +++ b/var/spack/repos/builtin/packages/adept-utils/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class AdeptUtils(Package): + """Utility libraries for LLNL performance tools.""" + + homepage = "https://github.com/scalability-llnl/adept-utils" + url = "https://github.com/scalability-llnl/adept-utils/archive/v1.0.tar.gz" + + version('1.0.1', '731a310717adcb004d9d195130efee7d') + version('1.0', '5c6cd9badce56c945ac8551e34804397') + + depends_on("boost") + depends_on("mpi") + + def install(self, spec, prefix): + cmake(*std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py new file mode 100644 index 0000000000..6404d5208a --- /dev/null +++ b/var/spack/repos/builtin/packages/apex/package.py @@ -0,0 +1,34 @@ +from spack import * +from spack.util.environment import * + +class Apex(Package): + homepage = "http://github.com/khuck/xpress-apex" + #url = "http://github.com/khuck/xpress-apex/archive/v0.1-release-candidate.tar.gz" + url = "http://github.com/khuck/xpress-apex" + + #version('0.1', '6e039c224387348296739f6bf360d081') + #version('master', branch='master', git='https://github.com/khuck/xpress-apex.git') + version('2015-10-21', git='https://github.com/khuck/xpress-apex.git', commit='d2e66ddde689120472fc57fc546d8cd80aab745c') + + depends_on("binutils+libiberty") + depends_on("boost@1.54:") + depends_on("cmake@2.8.12:") + depends_on("activeharmony@4.5:") + depends_on("ompt-openmp") + + def install(self, spec, prefix): + + path=get_path("PATH") + path.remove(spec["binutils"].prefix.bin) + path_set("PATH", path) + with working_dir("build", create=True): + cmake('-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DUSE_BFD=TRUE', + '-DBFD_ROOT=%s' % spec['binutils'].prefix, + '-DUSE_ACTIVEHARMONY=TRUE', + '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix, + '-DUSE_OMPT=TRUE', + '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix, + '..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py new file mode 100644 index 0000000000..8c67c536f3 --- /dev/null +++ b/var/spack/repos/builtin/packages/arpack/package.py @@ -0,0 +1,41 @@ +from spack import * +import os +import shutil + +class Arpack(Package): + """A collection of Fortran77 subroutines designed to solve large scale + eigenvalue problems. + """ + homepage = "http://www.caam.rice.edu/software/ARPACK/" + url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz" + + version('96', 'fffaa970198b285676f4156cebc8626e') + + depends_on('blas') + depends_on('lapack') + + def patch(self): + # Filter the cray makefile to make a spack one. + shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc') + makefile = FileFilter('ARmake.inc') + + # Be sure to use Spack F77 wrapper + makefile.filter('^FC.*', 'FC = f77') + makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g') + + # Set up some variables. + makefile.filter('^PLAT.*', 'PLAT = ') + makefile.filter('^home.*', 'home = %s' % os.getcwd()) + makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) + makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) + + # build the library in our own prefix. + makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd()) + + + def install(self, spec, prefix): + with working_dir('SRC'): + make('all') + + mkdirp(prefix.lib) + install('libarpack.a', prefix.lib) diff --git a/var/spack/repos/builtin/packages/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py new file mode 100644 index 0000000000..828f3b3f4f --- /dev/null +++ b/var/spack/repos/builtin/packages/asciidoc/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Asciidoc(Package): + """ A presentable text document format for writing articles, UNIX man + pages and other small to medium sized documents.""" + homepage = "http://asciidoc.org" + url = "http://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz" + + version('8.6.9', 'c59018f105be8d022714b826b0be130a') + + depends_on('libxml2') + depends_on('libxslt') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py new file mode 100644 index 0000000000..769805b227 --- /dev/null +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Atk(Package): + """ATK provides the set of accessibility interfaces that are + implemented by other toolkits and applications. Using the ATK + interfaces, accessibility tools have full access to view and + control running applications.""" + homepage = "https://developer.gnome.org/atk/" + url = "http://ftp.gnome.org/pub/gnome/sources/atk/2.14/atk-2.14.0.tar.xz" + + version('2.14.0', 'ecb7ca8469a5650581b1227d78051b8b') + + depends_on("glib") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py new file mode 100644 index 0000000000..fc683363a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -0,0 +1,60 @@ +from spack import * +from spack.util.executable import Executable +import os + +class Atlas(Package): + """ + Automatically Tuned Linear Algebra Software, generic shared + ATLAS is an approach for the automatic generation and optimization of + numerical software. Currently ATLAS supplies optimized versions for the + complete set of linear algebra kernels known as the Basic Linear Algebra + Subroutines (BLAS), and a subset of the linear algebra routines in the + LAPACK library. + """ + homepage = "http://math-atlas.sourceforge.net/" + + version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', + url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') + version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da', + url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2') + + # TODO: make this provide BLAS once it works better. Create a way + # TODO: to mark "beta" packages and require explicit invocation. + + # provides('blas') + + + def patch(self): + # Disable thraed check. LLNL's environment does not allow + # disabling of CPU throttling in a way that ATLAS actually + # understands. + filter_file(r'^\s+if \(thrchk\) exit\(1\);', 'if (0) exit(1);', + 'CONFIG/src/config.c') + # TODO: investigate a better way to add the check back in + # TODO: using, say, MSRs. Or move this to a variant. + + @when('@:3.10') + def install(self, spec, prefix): + with working_dir('ATLAS-Build', create=True): + configure = Executable('../configure') + configure('--prefix=%s' % prefix, '-C', 'ic', 'cc', '-C', 'if', 'f77', "--dylibs") + make() + make('check') + make('ptcheck') + make('time') + make("install") + + + def install(self, spec, prefix): + with working_dir('ATLAS-Build', create=True): + configure = Executable('../configure') + configure('--incdir=%s' % prefix.include, + '--libdir=%s' % prefix.lib, + '--cc=cc', + "--shared") + + make() + make('check') + make('ptcheck') + make('time') + make("install") diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py new file mode 100644 index 0000000000..5189faf054 --- /dev/null +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Autoconf(Package): + """Autoconf -- system configuration part of autotools""" + homepage = "https://www.gnu.org/software/autoconf/" + url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz" + + version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/automaded/package.py b/var/spack/repos/builtin/packages/automaded/package.py new file mode 100644 index 0000000000..9fbd93e3b3 --- /dev/null +++ b/var/spack/repos/builtin/packages/automaded/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Automaded(Package): + """AutomaDeD (Automata-based Debugging for Dissimilar parallel + tasks) is a tool for automatic diagnosis of performance and + correctness problems in MPI applications. It creates + control-flow models of each MPI process and, when a failure + occurs, these models are leveraged to find the origin of + problems automatically. MPI calls are intercepted (using + wrappers) to create the models. When an MPI application hangs, + AutomaDeD creates a progress-dependence graph that helps + finding the process (or group of processes) that caused the hang. + """ + + homepage = "https://github.com/scalability-llnl/AutomaDeD" + url = "https://github.com/scalability-llnl/AutomaDeD/archive/v1.0.tar.gz" + + version('1.0', '16a3d4def2c4c77d0bc4b21de8b3ab03') + + depends_on('mpi') + depends_on('boost') + depends_on('callpath') + + def install(self, spec, prefix): + cmake("-DSTATE_TRACKER_WITH_CALLPATH=ON", *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py new file mode 100644 index 0000000000..9115822730 --- /dev/null +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Automake(Package): + """Automake -- make file builder part of autotools""" + homepage = "http://www.gnu.org/software/automake/" + url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz" + + version('1.14.1', 'd052a3e884631b9c7892f2efce542d75') + + depends_on('autoconf') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py new file mode 100644 index 0000000000..0d4436fccc --- /dev/null +++ b/var/spack/repos/builtin/packages/bear/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Bear(Package): + """Bear is a tool that generates a compilation database for clang tooling from non-cmake build systems.""" + homepage = "https://github.com/rizsotto/Bear" + url = "https://github.com/rizsotto/Bear/archive/2.0.4.tar.gz" + + version('2.0.4', 'fd8afb5e8e18f8737ba06f90bd77d011') + + depends_on("cmake") + depends_on("python") + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make("all") + make("install") diff --git a/var/spack/repos/builtin/packages/bib2xhtml/package.py b/var/spack/repos/builtin/packages/bib2xhtml/package.py new file mode 100644 index 0000000000..7f8e0cfe5a --- /dev/null +++ b/var/spack/repos/builtin/packages/bib2xhtml/package.py @@ -0,0 +1,27 @@ +from spack import * +from glob import glob + +class Bib2xhtml(Package): + """bib2xhtml is a program that converts BibTeX files into HTML.""" + homepage = "http://www.spinellis.gr/sw/textproc/bib2xhtml/" + url='http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v3.0-15-gf506.tar.gz' + + 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') + mkdirp(bst_include) + for bstfile in glob('html-*bst'): + install(bstfile, bst_include) + + # Install the script and point it at the user's favorite perl + # and the bst include directory. + mkdirp(prefix.bin) + install('bib2xhtml', prefix.bin) + filter_file(r'#!/usr/bin/perl', + '#!/usr/bin/env BSTINPUTS=%s perl' % bst_include, + join_path(prefix.bin, 'bib2xhtml')) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py new file mode 100644 index 0000000000..cac0a0407f --- /dev/null +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -0,0 +1,30 @@ +from spack import * + +class Binutils(Package): + """GNU binutils, which contain the linker, assembler, objdump and others""" + homepage = "http://www.gnu.org/software/binutils/" + url = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" + + version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66') + version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b') + version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') + version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') + + variant('libiberty', default=False, description='Also install libiberty.') + + def install(self, spec, prefix): + configure_args = [ + '--prefix=%s' % prefix, + '--disable-dependency-tracking', + '--enable-interwork', + '--enable-multilib', + '--enable-shared', + '--enable-64-bit-bfd', + '--enable-targets=all'] + + if '+libiberty' in spec: + configure_args.append('--enable-install-libiberty') + + configure(*configure_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py new file mode 100644 index 0000000000..7c526fb958 --- /dev/null +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Bison(Package): + """Bison is a general-purpose parser generator that converts + an annotated context-free grammar into a deterministic LR or + 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" + + version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py new file mode 100644 index 0000000000..35824d53a2 --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -0,0 +1,66 @@ +from spack import * + +class Boost(Package): + """Boost provides free peer-reviewed portable C++ source + libraries, emphasizing libraries that work well with the C++ + Standard Library. + + Boost libraries are intended to be widely useful, and usable + across a broad spectrum of applications. The Boost license + encourages both commercial and non-commercial use. + """ + 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 + + version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87') + version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546') + version('1.57.0', '1be49befbdd9a5ce9def2983ba3e7b76') + version('1.56.0', 'a744cf167b05d72335f27c88115f211d') + version('1.55.0', 'd6eef4b4cacb2183f2bf265a5a03a354') + version('1.54.0', '15cb8c0803064faef0c4ddf5bc5ca279') + version('1.53.0', 'a00d22605d5dbcfb4c9936a9b35bc4c2') + version('1.52.0', '3a855e0f919107e0ca4de4d84ad3f750') + version('1.51.0', '4b6bd483b692fd138aef84ed2c8eb679') + version('1.50.0', '52dd00be775e689f55a987baebccc462') + version('1.49.0', '0d202cb811f934282dea64856a175698') + version('1.48.0', 'd1e9a7a7f532bb031a3c175d86688d95') + version('1.47.0', 'a2dc343f7bc7f83f8941e47ed4a18200') + version('1.46.1', '7375679575f4c8db605d426fc721d506') + version('1.46.0', '37b12f1702319b73876b0097982087e0') + version('1.45.0', 'd405c606354789d0426bc07bea617e58') + version('1.44.0', 'f02578f5218f217a9f20e9c30e119c6a') + version('1.43.0', 'dd49767bfb726b0c774f7db0cef91ed1') + version('1.42.0', '7bf3b4eb841b62ffb0ade2b82218ebe6') + version('1.41.0', '8bb65e133907db727a2a825c5400d0a6') + version('1.40.0', 'ec3875caeac8c52c7c129802a8483bd7') + version('1.39.0', 'a17281fd88c48e0d866e1a12deecbcc0') + version('1.38.0', '5eca2116d39d61382b8f8235915cb267') + version('1.37.0', '8d9f990bfb7e83769fa5f1d6f065bc92') + version('1.36.0', '328bfec66c312150e4c2a78dcecb504b') + version('1.35.0', 'dce952a7214e72d6597516bcac84048b') + version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') + version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') + + + 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) + + + def install(self, spec, prefix): + bootstrap = Executable('./bootstrap.sh') + bootstrap() + + # b2 used to be called bjam, before 1.47 (sigh) + b2name = './b2' if spec.satisfies('@1.47:') else './bjam' + + b2 = Executable(b2name) + b2('install', + '-j %s' % make_jobs, + '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.5.patch b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.5.patch new file mode 100644 index 0000000000..290be39c73 --- /dev/null +++ b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.5.patch @@ -0,0 +1,16 @@ +--- Makefile 2015-02-26 10:50:00.000000000 -0800 ++++ Makefile.new 2015-07-29 18:03:59.891357399 -0700 +@@ -22,10 +22,10 @@ + # + + INC = +-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 new file mode 100644 index 0000000000..339aab6598 --- /dev/null +++ b/var/spack/repos/builtin/packages/bowtie2/package.py @@ -0,0 +1,24 @@ +from spack import * +from glob import glob +class Bowtie2(Package): + """Description""" + homepage = "bowtie-bio.sourceforge.net/bowtie2/index.shtml" + version('2.2.5','51fa97a862d248d7ee660efc1147c75f', url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip") + + patch('bowtie2-2.5.patch',when='@2.2.5', level=0) + + def install(self, spec, prefix): + make() + mkdirp(prefix.bin) + for bow in glob("bowtie2*"): + install(bow, prefix.bin) + # install('bowtie2',prefix.bin) + # install('bowtie2-align-l',prefix.bin) + # install('bowtie2-align-s',prefix.bin) + # install('bowtie2-build',prefix.bin) + # install('bowtie2-build-l',prefix.bin) + # install('bowtie2-build-s',prefix.bin) + # install('bowtie2-inspect',prefix.bin) + # install('bowtie2-inspect-l',prefix.bin) + # install('bowtie2-inspect-s',prefix.bin) + diff --git a/var/spack/repos/builtin/packages/boxlib/package.py b/var/spack/repos/builtin/packages/boxlib/package.py new file mode 100644 index 0000000000..4f1b71132f --- /dev/null +++ b/var/spack/repos/builtin/packages/boxlib/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Boxlib(Package): + """BoxLib, a software framework for massively parallel + block-structured adaptive mesh refinement (AMR) codes.""" + + homepage = "https://ccse.lbl.gov/BoxLib/" + url = "https://ccse.lbl.gov/pub/Downloads/BoxLib.git"; + + # TODO: figure out how best to version this. No tags in the repo! + version('master', git='https://ccse.lbl.gov/pub/Downloads/BoxLib.git') + + depends_on('mpi') + + def install(self, spec, prefix): + args = std_cmake_args + args += ['-DCCSE_ENABLE_MPI=1', + '-DCMAKE_C_COMPILER=%s' % which('mpicc'), + '-DCMAKE_CXX_COMPILER=%s' % which('mpicxx'), + '-DCMAKE_Fortran_COMPILER=%s' % which('mpif90')] + + cmake('.', *args) + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py new file mode 100644 index 0000000000..d88336664d --- /dev/null +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -0,0 +1,36 @@ +from spack import * +from glob import glob + +class Bzip2(Package): + """bzip2 is a freely available, patent free high-quality data + compressor. It typically compresses files to within 10% to 15% + of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression + and six times faster at decompression.""" + homepage = "http://www.bzip.org" + url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" + + version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b') + + def install(self, spec, prefix): + # No configure system -- have to filter the makefile for this package. + filter_file(r'CC=gcc', 'CC=cc', 'Makefile', string=True) + + make('-f', 'Makefile-libbz2_so') + make('clean') + make("install", "PREFIX=%s" % prefix) + + bzip2_exe = join_path(prefix.bin, 'bzip2') + install('bzip2-shared', bzip2_exe) + for i, libfile in enumerate(glob('libbz2.so*')): + install(libfile, prefix.lib) + if i == 0: + symlink(join_path(prefix.lib, libfile), join_path(prefix.lib, 'libbz2.so')) + + bunzip2 = join_path(prefix.bin, 'bunzip2') + remove(bunzip2) + symlink(bzip2_exe, bunzip2) + + bzcat = join_path(prefix.bin, 'bzcat') + remove(bzcat) + symlink(bzip2_exe, bzcat) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py new file mode 100644 index 0000000000..e1ac8aaa7d --- /dev/null +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Cairo(Package): + """Cairo is a 2D graphics library with support for multiple output devices.""" + homepage = "http://cairographics.org" + url = "http://cairographics.org/releases/cairo-1.14.0.tar.xz" + + version('1.14.0', 'fc3a5edeba703f906f2241b394f0cced') + + depends_on("libpng") + depends_on("glib") + depends_on("pixman") + depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig. + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--enable-tee") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py new file mode 100644 index 0000000000..f8a1eab9f7 --- /dev/null +++ b/var/spack/repos/builtin/packages/callpath/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Callpath(Package): + """Library for representing callpaths consistently in + distributed-memory performance tools.""" + + homepage = "https://github.com/scalability-llnl/callpath" + url = "https://github.com/scalability-llnl/callpath/archive/v1.0.1.tar.gz" + + version('1.0.2', 'b1994d5ee7c7db9d27586fc2dcf8f373') + version('1.0.1', '0047983d2a52c5c335f8ba7f5bab2325') + + depends_on("libelf") + depends_on("libdwarf") + depends_on("dyninst") + depends_on("adept-utils") + depends_on("mpi") + + def install(self, spec, prefix): + # TODO: offer options for the walker used. + cmake('.', "-DCALLPATH_WALKER=dyninst", *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cblas/package.py b/var/spack/repos/builtin/packages/cblas/package.py new file mode 100644 index 0000000000..3cfe5ee588 --- /dev/null +++ b/var/spack/repos/builtin/packages/cblas/package.py @@ -0,0 +1,35 @@ +from spack import * +import os + +class Cblas(Package): + """The BLAS (Basic Linear Algebra Subprograms) are routines that + provide standard building blocks for performing basic vector and + matrix operations.""" + + homepage = "http://www.netlib.org/blas/_cblas/" + + # tarball has no version, but on the date below, this MD5 was correct. + version('2015-06-06', '1e8830f622d2112239a4a8a83b84209a', + url='http://www.netlib.org/blas/blast-forum/cblas.tgz') + + depends_on('blas') + parallel = False + + def patch(self): + mf = FileFilter('Makefile.in') + + mf.filter('^BLLIB =.*', 'BLLIB = %s/libblas.a' % self.spec['blas'].prefix.lib) + mf.filter('^CC =.*', 'CC = cc') + mf.filter('^FC =.*', 'FC = f90') + + + def install(self, spec, prefix): + make('all') + mkdirp(prefix.lib) + mkdirp(prefix.include) + + # Rename the generated lib file to libcblas.a + install('./lib/cblas_LINUX.a', '%s/libcblas.a' % prefix.lib) + install('./include/cblas.h','%s' % prefix.include) + install('./include/cblas_f77.h','%s' % prefix.include) + diff --git a/var/spack/repos/builtin/packages/cgm/package.py b/var/spack/repos/builtin/packages/cgm/package.py new file mode 100644 index 0000000000..05d6395c5a --- /dev/null +++ b/var/spack/repos/builtin/packages/cgm/package.py @@ -0,0 +1,30 @@ +from spack import * + +class Cgm(Package): + """The Common Geometry Module, Argonne (CGMA) is a code library + which provides geometry functionality used for mesh generation and + other applications.""" + homepage = "http://trac.mcs.anl.gov/projects/ITAPS/wiki/CGM" + url = "http://ftp.mcs.anl.gov/pub/fathom/cgm13.1.1.tar.gz" + + version('13.1.1', '4e8dbc4ba8f65767b29f985f7a23b01f') + version('13.1.0', 'a6c7b22660f164ce893fb974f9cb2028') + version('13.1' , '95f724bda04919fc76818a5b7bc0b4ed') + + depends_on("mpi") + + def patch(self): + filter_file('^(#include "CGMParallelConventions.h")', + '//\1', + 'geom/parallel/CGMReadParallel.cpp') + + + def install(self, spec, prefix): + configure("--with-mpi", + "--prefix=%s" % prefix, + "CFLAGS=-static", + "CXXFLAGS=-static", + "FCFLAGS=-static") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/clang/package.py b/var/spack/repos/builtin/packages/clang/package.py new file mode 100644 index 0000000000..4f977bf9a4 --- /dev/null +++ b/var/spack/repos/builtin/packages/clang/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Clang(Package): + """The goal of the Clang project is to create a new C, C++, + Objective C and Objective C++ front-end for the LLVM compiler. + """ + homepage = 'http://clang.llvm.org' + url = 'http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz' + + depends_on('llvm@3.7.0', when='@3.7.0') + depends_on('llvm@3.6.2', when='@3.6.2') + depends_on('llvm@3.5.1', when='@3.5.1') + + version('3.7.0', '8f9d27335e7331cf0a4711e952f21f01', url='http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz') + version('3.6.2', 'ff862793682f714bb7862325b9c06e20', url='http://llvm.org/releases/3.6.2/cfe-3.6.2.src.tar.xz') + version('3.5.1', '93f9532f8f7e6f1d8e5c1116907051cb', url='http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz') + + def install(self, spec, prefix): + env['CXXFLAGS'] = self.compiler.cxx11_flag + + with working_dir('spack-build', create=True): + cmake('..', + '-DCLANG_PATH_TO_LLVM_BUILD=%s' % spec['llvm'].prefix, + '-DLLVM_MAIN_SRC_DIR=%s' % spec['llvm'].prefix, + *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cloog/package.py b/var/spack/repos/builtin/packages/cloog/package.py new file mode 100644 index 0000000000..814a33c76c --- /dev/null +++ b/var/spack/repos/builtin/packages/cloog/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Cloog(Package): + """CLooG is a free software and library to generate code for + scanning Z-polyhedra. That is, it finds a code (e.g. in C, + FORTRAN...) that reaches each integral point of one or more + parameterized polyhedra.""" + + homepage = "http://www.cloog.org" + url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.1.tar.gz" + list_url = "http://www.bastoul.net/cloog/pages/download" + + version('0.18.1', 'e34fca0540d840e5d0f6427e98c92252') + version('0.18.0', 'be78a47bd82523250eb3e91646db5b3d') + version('0.17.0', '0aa3302c81f65ca62c114e5264f8a802') + + depends_on("gmp") + depends_on("isl") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-osl=no", + "--with-isl=%s" % spec['isl'].prefix, + "--with-gmp=%s" % spec['gmp'].prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py new file mode 100644 index 0000000000..9efa370c8b --- /dev/null +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Cmake(Package): + """A cross-platform, open-source build system. CMake is a family of + tools designed to build, test and package software.""" + homepage = 'https://www.cmake.org' + + version('2.8.10.2', '097278785da7182ec0aea8769d06860c', + url = 'http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz') + + version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f', + url = 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz') + +# version('3.0.1', 'e2e05d84cb44a42f1371d9995631dcf5') +# version('3.0.0', '21a1c85e1a3b803c4b48e7ff915a863e') + + def install(self, spec, prefix): + configure('--prefix=' + prefix, + '--parallel=' + str(make_jobs)) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py new file mode 100644 index 0000000000..78c608d8eb --- /dev/null +++ b/var/spack/repos/builtin/packages/coreutils/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Coreutils(Package): + """The GNU Core Utilities are the basic file, shell and text + manipulation utilities of the GNU operating system. These are + the core utilities which are expected to exist on every + operating system. + """ + homepage = "http://www.gnu.org/software/coreutils/" + url = "http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz" + + version('8.23', 'abed135279f87ad6762ce57ff6d89c41') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py new file mode 100644 index 0000000000..8e98f457ee --- /dev/null +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Cppcheck(Package): + """A tool for static C/C++ code analysis.""" + homepage = "http://cppcheck.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/cppcheck/cppcheck/1.68/cppcheck-1.68.tar.bz2" + + version('1.68', 'c015195f5d61a542f350269030150708') + + def install(self, spec, prefix): + # cppcheck does not have a configure script + make() + # manually install the final cppcheck binary + mkdirp(prefix.bin) + install('cppcheck', prefix.bin) diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py new file mode 100644 index 0000000000..4b8ec56f25 --- /dev/null +++ b/var/spack/repos/builtin/packages/cram/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Cram(Package): + """Cram runs many small MPI jobs inside one large MPI job.""" + homepage = "https://github.com/scalability-llnl/cram" + url = "http://github.com/scalability-llnl/cram/archive/v1.0.1.tar.gz" + + version('1.0.1', 'c73711e945cf5dc603e44395f6647f5e') + + depends_on("mpi") + + def install(self, spec, prefix): + cmake(".", *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py new file mode 100644 index 0000000000..9aac0f7304 --- /dev/null +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Cscope(Package): + """Cscope is a developer's tool for browsing source code.""" + homepage = "http://http://cscope.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz" + + version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176') + + # Can be configured to use flex (not necessary) + # ./configure --with-flex + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py new file mode 100644 index 0000000000..d97cd25636 --- /dev/null +++ b/var/spack/repos/builtin/packages/cube/package.py @@ -0,0 +1,55 @@ +# FIXME: Add copyright statement +# +from spack import * +from contextlib import closing + +class Cube(Package): + """Cube the profile viewer for Score-P and Scalasca profiles. It + displays a multi-dimensional performance space consisting + of the dimensions (i) performance metric, (ii) call path, + and (iii) system resource.""" + + homepage = "http://www.scalasca.org/software/cube-4.x/download.html" + url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz" + + version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20') + + version('4.3TP1', 'a2090fbc7b2ba394bd5c09ba971e237f', + url = 'http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-4.3-TP1.tar.gz') + + # Using CC as C++ compiler provides quirky workaround for a Score-P build system attempt + # to guess a matching C compiler when configuring scorep-score + backend_user_provided = """\ +CC=cc +CXX=CC +F77=f77 +FC=f90 +#CFLAGS=-fPIC +#CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=CC +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +""" + + def install(self, spec, prefix): + # Use a custom compiler configuration, otherwise the score-p + # build system messes with spack's compiler settings. + # Create these three files in the build directory + + with closing(open("vendor/common/build-config/platforms/platform-backend-user-provided", "w")) as backend_file: + backend_file.write(self.backend_user_provided) + with closing(open("vendor/common/build-config/platforms/platform-frontend-user-provided", "w")) as frontend_file: + frontend_file.write(self.frontend_user_provided) + + configure_args = ["--prefix=%s" % prefix, + "--with-custom-compilers", + "--without-paraver", + "--without-gui"] + + configure(*configure_args) + + make(parallel=False) + make("install", parallel=False) diff --git a/var/spack/repos/builtin/packages/czmq/package.py b/var/spack/repos/builtin/packages/czmq/package.py new file mode 100644 index 0000000000..a2f1947554 --- /dev/null +++ b/var/spack/repos/builtin/packages/czmq/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Czmq(Package): + """ A C interface to the ZMQ library """ + homepage = "http://czmq.zeromq.org" + url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz" + + version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz') + + depends_on('zeromq') + + def install(self, spec, prefix): + bash = which("bash") + bash("./autogen.sh") + configure("--prefix=%s" % prefix) + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py new file mode 100644 index 0000000000..f7c302d611 --- /dev/null +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -0,0 +1,31 @@ +from spack import * + +class Dbus(Package): + """D-Bus is a message bus system, a simple way for applications to + talk to one another. D-Bus supplies both a system daemon (for + events such new hardware device printer queue ) and a + per-user-login-session daemon (for general IPC needs among user + applications). Also, the message bus is built on top of a + general one-to-one message passing framework, which can be used + by any two applications to communicate directly (without going + through the message bus daemon).""" + + homepage = "http://dbus.freedesktop.org/" + url = "http://dbus.freedesktop.org/releases/dbus/dbus-1.8.8.tar.gz" + + version('1.9.0', 'ec6895a4d5c0637b01f0d0e7689e2b36') + version('1.8.8', 'b9f4a18ee3faa1e07c04aa1d83239c43') + version('1.8.6', '6a08ba555d340e9dfe2d623b83c0eea8') + version('1.8.4', '4717cb8ab5b80978fcadf2b4f2f72e1b') + version('1.8.2', 'd6f709bbec0a022a1847c7caec9d6068') + + def install(self, spec, prefix): + configure( + "--prefix=%s" % prefix, + "--disable-systemd") + make() + make("install") + + # dbus needs a machine id generated after install + dbus_uuidgen = Executable(join_path(prefix.bin, 'dbus-uuidgen')) + dbus_uuidgen('--ensure') diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py new file mode 100644 index 0000000000..fce1de7deb --- /dev/null +++ b/var/spack/repos/builtin/packages/docbook-xml/package.py @@ -0,0 +1,19 @@ +import os +import glob +from spack import * + + +class DocbookXml(Package): + """Docbook DTD XML files.""" + homepage = "http://www.oasis-open.org/docbook" + url = "http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip" + + version('4.5', '03083e288e87a7e829e437358da7ef9e') + + def install(self, spec, prefix): + cp = which('cp') + + install_args = ['-a', '-t', prefix] + install_args.extend(glob.glob('*')) + + cp(*install_args) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py new file mode 100644 index 0000000000..3d4a4e47a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------ +# Author: Justin Too +# Date: September 11, 2015 +#------------------------------------------------------------------------------ + +from spack import * + +class Doxygen(Package): + """Doxygen is the de facto standard tool for generating documentation + from annotated C++ sources, but it also supports other popular programming + languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, + Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.. + """ + homepage = "http://www.stack.nl/~dimitri/doxygen/" + url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz" + + version('1.8.10', '79767ccd986f12a0f949015efb5f058f') + + depends_on("cmake@2.8.12:") + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/dri2proto/package.py b/var/spack/repos/builtin/packages/dri2proto/package.py new file mode 100644 index 0000000000..11dfa568e2 --- /dev/null +++ b/var/spack/repos/builtin/packages/dri2proto/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Dri2proto(Package): + """DRI2 Protocol Headers.""" + homepage = "http://http://cgit.freedesktop.org/xorg/proto/dri2proto/" + url = "http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.8.tar.gz" + + version('2.8', '19ea18f63d8ae8053c9fa84b60365b77') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/dtcmp/package.py b/var/spack/repos/builtin/packages/dtcmp/package.py new file mode 100644 index 0000000000..9d940583c1 --- /dev/null +++ b/var/spack/repos/builtin/packages/dtcmp/package.py @@ -0,0 +1,20 @@ +import os +from spack import * + +class Dtcmp(Package): + """The Datatype Comparison Library provides comparison operations and + parallel sort algorithms for MPI applications.""" + + homepage = "https://github.com/hpc/dtcmp" + url = "https://github.com/hpc/dtcmp/releases/download/v1.0.3/dtcmp-1.0.3.tar.gz" + + version('1.0.3', 'cdd8ccf71e8ff67de2558594a7fcd317') + + depends_on('mpi') + depends_on('lwgrp') + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--with-lwgrp=" + spec['lwgrp'].prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py new file mode 100644 index 0000000000..41ec57dd2f --- /dev/null +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -0,0 +1,68 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Dyninst(Package): + """API for dynamic binary instrumentation. Modify programs while they + are executing without recompiling, re-linking, or re-executing.""" + homepage = "https://paradyn.org" + url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" + list_url = "http://www.dyninst.org/downloads/dyninst-8.x" + + version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7', + url="http://www.paradyn.org/release8.2/DyninstAPI-8.2.1.tgz") + version('8.1.2', 'bf03b33375afa66fe0efa46ce3f4b17a', + url="http://www.paradyn.org/release8.1.2/DyninstAPI-8.1.2.tgz") + version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac', + url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz") + + depends_on("libelf") + depends_on("libdwarf") + depends_on("boost@1.42:") + + # new version uses cmake + def install(self, spec, prefix): + libelf = spec['libelf'].prefix + libdwarf = spec['libdwarf'].prefix + + with working_dir('spack-build', create=True): + cmake('..', + '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DLIBELF_INCLUDE_DIR=%s' % join_path(libelf.include, 'libelf'), + '-DLIBELF_LIBRARIES=%s' % join_path(libelf.lib, 'libelf.so'), + '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, + '-DLIBDWARF_LIBRARIES=%s' % join_path(libdwarf.lib, 'libdwarf.so'), + *std_cmake_args) + make() + make("install") + + + @when('@:8.1') + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py new file mode 100644 index 0000000000..926d234584 --- /dev/null +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Elfutils(Package): + """elfutils is a collection of various binary tools such as + eu-objdump, eu-readelf, and other utilities that allow you to + inspect and manipulate ELF files. Refer to Table 5.Tools Included + in elfutils for Red Hat Developer for a complete list of binary + tools that are distributed with the Red Hat Developer Toolset + version of elfutils.""" + + homepage = "https://fedorahosted.org/elfutils/" + + version('0.163', + git='git://git.fedorahosted.org/git/elfutils.git', + tag='elfutils-0.163') + + provides('elf') + + def install(self, spec, prefix): + autoreconf = which('autoreconf') + autoreconf('-if') + + configure('--prefix=%s' % prefix, '--enable-maintainer-mode') + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py new file mode 100644 index 0000000000..3ad4cbaf86 --- /dev/null +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -0,0 +1,46 @@ +from spack import * + +# typical working line with extrae 3.0.1 +# ./configure --prefix=/usr/local --with-mpi=/usr/lib64/mpi/gcc/openmpi --with-unwind=/usr/local --with-papi=/usr --with-dwarf=/usr --with-elf=/usr --with-dyninst=/usr --with-binutils=/usr --with-xml-prefix=/usr --enable-openmp --enable-nanos --enable-pthread --disable-parallel-merge LDFLAGS=-pthread + +class Extrae(Package): + """Extrae is the package devoted to generate tracefiles which can + be analyzed later by Paraver. Extrae is a tool that uses + different interposition mechanisms to inject probes into the + target application so as to gather information regarding the + application performance. The Extrae instrumentation package can + instrument the MPI programin model, and the following parallel + programming models either alone or in conjunction with MPI : + OpenMP, CUDA, OpenCL, pthread, OmpSs""" + homepage = "http://www.bsc.es/computer-sciences/extrae" + url = "http://www.bsc.es/ssl/apps/performanceTools/files/extrae-3.0.1.tar.bz2" + version('3.0.1', 'a6a8ca96cd877723cd8cc5df6bdb922b') + + depends_on("mpi") + depends_on("dyninst") + depends_on("libunwind") + depends_on("boost") + depends_on("libdwarf") + depends_on("papi") + + def install(self, spec, prefix): + if 'openmpi' in spec: + mpi = spec['openmpi'] + elif 'mpich' in spec: + mpi = spec['mpich'] + elif 'mvapich2' in spec: + mpi = spec['mvapich2'] + + configure("--prefix=%s" % prefix, + "--with-mpi=%s" % mpi.prefix, + "--with-unwind=%s" % spec['libunwind'].prefix, + "--with-dyninst=%s" % spec['dyninst'].prefix, + "--with-boost=%s" % spec['boost'].prefix, + "--with-dwarf=%s" % spec['libdwarf'].prefix, + "--with-papi=%s" % spec['papi'].prefix, + "--with-dyninst-headers=%s" % spec['dyninst'].prefix.include, + "--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib) + + make() + make("install", parallel=False) + diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py new file mode 100644 index 0000000000..efd2b541b2 --- /dev/null +++ b/var/spack/repos/builtin/packages/exuberant-ctags/package.py @@ -0,0 +1,14 @@ +from spack import * + +class ExuberantCtags(Package): + """The canonical ctags generator""" + homepage = "ctags.sourceforge.net" + url = "http://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz" + + version('5.8', 'c00f82ecdcc357434731913e5b48630d') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py new file mode 100644 index 0000000000..1225558705 --- /dev/null +++ b/var/spack/repos/builtin/packages/fish/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Fish(Package): + """fish is a smart and user-friendly command line shell for OS X, Linux, and + the rest of the family. + """ + + homepage = "http://fishshell.com/" + url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz" + list_url = homepage + + version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py new file mode 100644 index 0000000000..b065904912 --- /dev/null +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Flex(Package): + """Flex is a tool for generating scanners.""" + + homepage = "http://flex.sourceforge.net/" + url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" + + version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/flux/package.py b/var/spack/repos/builtin/packages/flux/package.py new file mode 100644 index 0000000000..c128f46be8 --- /dev/null +++ b/var/spack/repos/builtin/packages/flux/package.py @@ -0,0 +1,36 @@ +from spack import * +import os + +class Flux(Package): + """ A next-generation resource manager (pre-alpha) """ + + homepage = "https://github.com/flux-framework/flux-core" + url = "https://github.com/flux-framework/flux-core" + + version('master', branch='master', git='https://github.com/flux-framework/flux-core') + + # Also needs autotools, but should use the system version if available + depends_on("zeromq@4.0.4:") + depends_on("czmq@2.2:") + depends_on("lua@5.1:5.1.99") + depends_on("munge") + depends_on("libjson-c") + depends_on("libxslt") + # TODO: This provides a catalog, hacked with environment below for now + depends_on("docbook-xml") + depends_on("asciidoc") + depends_on("python") + depends_on("py-cffi") + + def install(self, spec, prefix): + # Bootstrap with autotools + bash = which('bash') + bash('./autogen.sh') + + # Fix asciidoc dependency on xml style sheets and whatnot + os.environ['XML_CATALOG_FILES'] = os.path.join(spec['docbook-xml'].prefix, + 'catalog.xml') + # Configure, compile & install + configure("--prefix=" + prefix) + make("install", "V=1") + diff --git a/var/spack/repos/builtin/packages/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py new file mode 100644 index 0000000000..89b13604e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/fontconfig/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Fontconfig(Package): + """Fontconfig customizing font access""" + homepage = "http://www.freedesktop.org/wiki/Software/fontconfig/" + url = "http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz" + + version('2.11.1' , 'e75e303b4f7756c2b16203a57ac87eba') + + depends_on('freetype') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py new file mode 100644 index 0000000000..0309b858a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Freetype(Package): + """Font package""" + homepage = "http://http://www.freetype.org" + url = "http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz" + + version('2.5.3' , 'cafe9f210e45360279c730d27bf071e9') + + depends_on('libpng') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gasnet/package.py b/var/spack/repos/builtin/packages/gasnet/package.py new file mode 100644 index 0000000000..705961d1de --- /dev/null +++ b/var/spack/repos/builtin/packages/gasnet/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Gasnet(Package): + """GASNet is a language-independent, low-level networking layer + that provides network-independent, high-performance communication + primitives tailored for implementing parallel global address space + SPMD languages and libraries such as UPC, Co-Array Fortran, SHMEM, + Cray Chapel, and Titanium. + """ + homepage = "http://gasnet.lbl.gov" + url = "http://gasnet.lbl.gov/GASNet-1.24.0.tar.gz" + + version('1.24.0', 'c8afdf48381e8b5a7340bdb32ca0f41a') + + + def install(self, spec, prefix): + # TODO: don't use paths with @ in them. + change_sed_delimiter('@', ';', 'configure') + + configure("--prefix=%s" % prefix, + # TODO: factor IB suport out into architecture description. + "--enable-ibv", + "--enable-udp", + "--disable-mpi", + "--enable-par", + "--enable-mpi-compat", + "--enable-segment-fast", + "--disable-aligned-segments", + # TODO: make an option so that Legion can request builds with/without this. + # See the Legion webpage for details on when to/not to use. + "--disable-pshm", + "--with-segment-mmap-max=64MB") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py new file mode 100644 index 0000000000..a49a1348aa --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -0,0 +1,122 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with 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 contextlib import closing +from glob import glob + +class Gcc(Package): + """The GNU Compiler Collection includes front ends for C, C++, + Objective-C, Fortran, and Java.""" + homepage = "https://gcc.gnu.org" + + url = "http://open-source-box.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2" + list_url = 'http://open-source-box.org/gcc/' + list_depth = 2 + + DEPENDS_ON_ISL_PREDICATE = '@5.0:' + + version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467') + version('4.9.3', '6f831b4d251872736e8e9cc09746f327') + version('4.9.2', '4df8ee253b7f3863ad0b86359cd39c43') + version('4.9.1', 'fddf71348546af523353bd43d34919c1') + version('4.8.5', '80d2c2982a3392bb0b89673ff136e223') + version('4.8.4', '5a84a30839b2aca22a2d723de2a626ec') + version('4.7.4', '4c696da46297de6ae77a82797d2abe28') + version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') + version('4.5.4', '27e459c2566b8209ab064570e1b378f7') + + depends_on("mpfr") + depends_on("gmp") + depends_on("mpc") # when @4.5: + depends_on("binutils~libiberty") + + # Save these until we can do optional deps. + depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) + #depends_on("ppl") + #depends_on("cloog") + + def install(self, spec, prefix): + # libjava/configure needs a minor fix to install into spack paths. + filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) + + enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) + if spec.satisfies("@4.7.1:"): + enabled_languages.add('go') + + # Generic options to compile GCC + options = ["--prefix=%s" % prefix, + "--libdir=%s/lib64" % prefix, + "--disable-multilib", + "--enable-languages=" + ','.join(enabled_languages), + "--with-mpc=%s" % spec['mpc'].prefix, + "--with-mpfr=%s" % spec['mpfr'].prefix, + "--with-gmp=%s" % spec['gmp'].prefix, + "--enable-lto", + "--with-gnu-ld", + "--with-gnu-as", + "--with-quad"] + # Binutils + binutils_options = ["--with-stage1-ldflags=%s" % self.rpath_args, + "--with-boot-ldflags=%s" % self.rpath_args, + "--with-ld=%s/bin/ld" % spec['binutils'].prefix, + "--with-as=%s/bin/as" % spec['binutils'].prefix] + options.extend(binutils_options) + # Isl + if spec.satisfies(Gcc.DEPENDS_ON_ISL_PREDICATE): + isl_options = ["--with-isl=%s" % spec['isl'].prefix] + options.extend(isl_options) + + # Rest of install is straightforward. + configure(*options) + make() + make("install") + + self.write_rpath_specs() + + + @property + def spec_dir(self): + # e.g. lib64/gcc/x86_64-unknown-linux-gnu/4.9.2 + spec_dir = glob("%s/lib64/gcc/*/*" % self.prefix) + return spec_dir[0] if spec_dir else None + + + def write_rpath_specs(self): + """Generate a spec file so the linker adds a rpath to the libs + the compiler used to build the executable.""" + if not self.spec_dir: + tty.warn("Could not install specs for %s." % self.spec.format('$_$@')) + return + + gcc = Executable(join_path(self.prefix.bin, 'gcc')) + lines = gcc('-dumpspecs', return_output=True).strip().split("\n") + specs_file = join_path(self.spec_dir, 'specs') + with closing(open(specs_file, 'w')) as out: + for line in lines: + out.write(line + "\n") + if line.startswith("*link:"): + out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix)) + set_install_permissions(specs_file) diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py new file mode 100644 index 0000000000..14a5569984 --- /dev/null +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -0,0 +1,22 @@ +from spack import * + +class GdkPixbuf(Package): + """The Gdk Pixbuf is a toolkit for image loading and pixel buffer + manipulation. It is used by GTK+ 2 and GTK+ 3 to load and + manipulate images. In the past it was distributed as part of + 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" + + version('2.31.2', '6be6bbc4f356d4b79ab4226860ab8523') + + depends_on("glib") + depends_on("jpeg") + depends_on("libpng") + depends_on("libtiff") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py new file mode 100644 index 0000000000..4a2657e32f --- /dev/null +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -0,0 +1,31 @@ +from spack import * + +class Geos(Package): + """GEOS (Geometry Engine - Open Source) is a C++ port of the Java + Topology Suite (JTS). As such, it aims to contain the complete + functionality of JTS in C++. This includes all the OpenGIS + Simple Features for SQL spatial predicate functions and spatial + operators, as well as specific JTS enhanced topology functions.""" + + homepage = "http://trac.osgeo.org/geos/" + url = "http://download.osgeo.org/geos/geos-3.4.2.tar.bz2" + + version('3.4.2', 'fc5df2d926eb7e67f988a43a92683bae') + version('3.4.1', '4c930dec44c45c49cd71f3e0931ded7e') + version('3.4.0', 'e41318fc76b5dc764a69d43ac6b18488') + version('3.3.9', '4794c20f07721d5011c93efc6ccb8e4e') + version('3.3.8', '75be476d0831a2d14958fed76ca266de') + version('3.3.7', '95ab996d22672b067d92c7dee2170460') + version('3.3.6', '6fadfb941541875f4976f75fb0bbc800') + version('3.3.5', '2ba61afb7fe2c5ddf642d82d7b16e75b') + version('3.3.4', '1bb9f14d57ef06ffa41cb1d67acb55a1') + version('3.3.3', '8454e653d7ecca475153cc88fd1daa26') + + extends('python') + depends_on('swig') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--enable-python") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gflags/package.py b/var/spack/repos/builtin/packages/gflags/package.py new file mode 100644 index 0000000000..62dd80a094 --- /dev/null +++ b/var/spack/repos/builtin/packages/gflags/package.py @@ -0,0 +1,21 @@ +import os +from spack import * + +class Gflags(Package): + """The gflags package contains a C++ library that implements + commandline flags processing. It includes built-in support for + standard types such as string and the ability to define flags + in the source file in which they are used. Online documentation + available at: https://gflags.github.io/gflags/""" + + homepage = "https://gflags.github.io/gflags" + url = "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz" + + version('2.1.2', 'ac432de923f9de1e9780b5254884599f') + + def install(self, spec, prefix): + cmake("-DCMAKE_INSTALL_PREFIX=" + prefix, + "-DBUILD_SHARED_LIBS=ON") + make() + make("test") + make("install") diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py new file mode 100644 index 0000000000..0ab49d425f --- /dev/null +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Ghostscript(Package): + """an interpreter for the PostScript language and for PDF. """ + homepage = "http://ghostscript.com/" + url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz" + + version('9.16', '829319325bbdb83f5c81379a8f86f38f') + + parallel = False + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix, "--enable-shared") + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py new file mode 100644 index 0000000000..0f1a3ba05b --- /dev/null +++ b/var/spack/repos/builtin/packages/git/package.py @@ -0,0 +1,27 @@ +from spack import * + +class Git(Package): + """Git is a free and open source distributed version control + system designed to handle everything from small to very large + projects with speed and efficiency.""" + homepage = "http://git-scm.com" + url = "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.xz" + + version('2.2.1', '43e01f9d96ba8c11611e0eef0d9f9f28') + + # Use system openssl. + # depends_on("openssl") + + # Use system perl for now. + # depends_on("perl") + # depends_on("pcre") + + depends_on("zlib") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--without-pcre", + "--without-python") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py new file mode 100644 index 0000000000..178f0b9df5 --- /dev/null +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Glib(Package): + """The GLib package contains a low-level libraries useful for + providing data structure handling for C, portability wrappers + and interfaces for such runtime functionality as an event loop, + threads, dynamic loading and an object system.""" + homepage = "https://developer.gnome.org/glib/" + url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" + + version('2.42.1', '89c4119e50e767d3532158605ee9121a') + + depends_on("libffi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py new file mode 100644 index 0000000000..d00c301b4c --- /dev/null +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -0,0 +1,19 @@ +from spack import * + + +class Glm(Package): + """ + OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on + the OpenGL Shading Language (GLSL) specification. + """ + + homepage = "https://github.com/g-truc/glm" + url = "https://github.com/g-truc/glm/archive/0.9.7.1.tar.gz" + + version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8') + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py new file mode 100644 index 0000000000..a77b1bdc09 --- /dev/null +++ b/var/spack/repos/builtin/packages/global/package.py @@ -0,0 +1,24 @@ +from spack import * +import os + + +class Global(Package): + """ The Gnu Global tagging system """ + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.gnu.org/software/global" + url = "http://tamacom.com/global/global-6.5.tar.gz" + + version('6.5', 'dfec818b4f53d91721e247cf7b218078') + + depends_on('exuberant-ctags') + + def install(self, spec, prefix): + config_args = ['--prefix={}'.format(prefix)] + + config_args.append('--with-exuberant-ctags={}'.format( + os.path.join(spec['exuberant-ctags'].prefix.bin, 'ctags'))) + + configure(*config_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/glog/package.py b/var/spack/repos/builtin/packages/glog/package.py new file mode 100644 index 0000000000..d73386b394 --- /dev/null +++ b/var/spack/repos/builtin/packages/glog/package.py @@ -0,0 +1,15 @@ +import os +from spack import * + +class Glog(Package): + """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" + + version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py new file mode 100644 index 0000000000..d6af821b34 --- /dev/null +++ b/var/spack/repos/builtin/packages/gmp/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Gmp(Package): + """GMP is a free library for arbitrary precision arithmetic, + operating on signed integers, rational numbers, and + floating-point numbers.""" + homepage = "https://gmplib.org" + url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2" + + version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470') + version('6.0.0' , '6ef5869ae735db9995619135bd856b84') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py new file mode 100644 index 0000000000..cf57a24a6d --- /dev/null +++ b/var/spack/repos/builtin/packages/gnutls/package.py @@ -0,0 +1,22 @@ +from spack import * + +class Gnutls(Package): + """GnuTLS is a secure communications library implementing the SSL, + TLS and DTLS protocols and technologies around them. It + provides a simple C language application programming interface + (API) to access the secure communications protocols as well as + APIs to parse and write X.509, PKCS #12, OpenPGP and other + required structures. It is aimed to be portable and efficient + with focus on security and interoperability.""" + + homepage = "http://www.gnutls.org" + url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-3.3.9.tar.xz" + + version('3.3.9', 'ff61b77e39d09f1140ab5a9cf52c58b6') + + depends_on("nettle") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gperf/package.py b/var/spack/repos/builtin/packages/gperf/package.py new file mode 100644 index 0000000000..32551b67b4 --- /dev/null +++ b/var/spack/repos/builtin/packages/gperf/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Gperf(Package): + """GNU gperf is a perfect hash function generator. For a given + list of strings, it produces a hash function and hash table, in + form of C or C++ code, for looking up a value depending on the + input string. The hash function is perfect, which means that the + hash table has no collisions, and the hash table lookup needs a + single string comparison only.""" + + homepage = "https://www.gnu.org/software/gperf/" + url = "http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz" + + version('3.0.4', 'c1f1db32fb6598d6a93e6e88796a8632') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py new file mode 100644 index 0000000000..8900462324 --- /dev/null +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Gperftools(Package): + """Google's fast malloc/free implementation, especially for multi-threaded applications. + Contains tcmalloc, heap-checker, heap-profiler, and cpu-profiler.""" + homepage = "https://code.google.com/p/gperftools" + url = "https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz" + + version('2.3', 'f54dd119f0e46ac1f13264f8d97adf90', url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py new file mode 100644 index 0000000000..ddac0b2b66 --- /dev/null +++ b/var/spack/repos/builtin/packages/graphlib/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Graphlib(Package): + """Library to create, manipulate, and export graphs Graphlib.""" + homepage = "http://https://github.com/lee218llnl/graphlib" + url = "https://github.com/lee218llnl/graphlib/archive/v2.0.0.tar.gz" + + version('2.0.0', '43c6df84f1d38ba5a5dce0ae19371a70') + + def install(self, spec, prefix): + cmake(".", *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py new file mode 100644 index 0000000000..7af7da1881 --- /dev/null +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Graphviz(Package): + """Graph Visualization Software""" + homepage = "http://www.graphviz.org" + url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz" + + version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') + + parallel = False + + depends_on("swig") + depends_on("python") + depends_on("ghostscript") + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix) + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py new file mode 100644 index 0000000000..0ebc7100de --- /dev/null +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -0,0 +1,22 @@ +from spack import * + +class Gtkplus(Package): + """The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications.""" + homepage = "http://www.gtk.org" + + version('2.24.25', '612350704dd3aacb95355a4981930c6f', + url="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.25.tar.xz") + + depends_on("atk") + depends_on("gdk-pixbuf") + depends_on("pango") + + def patch(self): + # remove disable deprecated flag. + filter_file(r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"', + '', 'configure', string=True) + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py new file mode 100644 index 0000000000..ed7c42a909 --- /dev/null +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Harfbuzz(Package): + """The Harfbuzz package contains an OpenType text shaping engine.""" + homepage = "http://www.freedesktop.org/wiki/Software/HarfBuzz/" + url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.37.tar.bz2" + + version('0.9.37', 'bfe733250e34629a188d82e3b971bc1e') + + depends_on("glib") + depends_on("icu") + depends_on("freetype") + + def patch(self): + change_sed_delimiter('@', ';', 'src/Makefile.in') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py new file mode 100644 index 0000000000..15e0ef9338 --- /dev/null +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -0,0 +1,42 @@ +from spack import * + +class Hdf5(Package): + """HDF5 is a data model, library, and file format for storing and managing + data. It supports an unlimited variety of datatypes, and is designed for + flexible and efficient I/O and for high volume and complex data. + """ + + homepage = "http://www.hdfgroup.org/HDF5/" + url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz" + list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" + list_depth = 3 + + version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') + version('1.8.13', 'c03426e9e77d7766944654280b467289') + + depends_on("mpi") + depends_on("zlib") + + # TODO: currently hard-coded to use OpenMPI + def install(self, spec, prefix): + + configure( + "--prefix=%s" % prefix, + "--with-zlib=%s" % spec['zlib'].prefix, + "--enable-parallel", + "--enable-shared", + "CC=%s" % spec['mpich'].prefix.bin + "/mpicc", + "CXX=%s" % spec['mpich'].prefix.bin + "/mpic++") + + make() + make("install") + + def url_for_version(self, version): + v = str(version) + + if version == Version("1.2.2"): + return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" + elif version < Version("1.7"): + return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" + else: + return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py new file mode 100644 index 0000000000..31a31f376a --- /dev/null +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Hwloc(Package): + """The Portable Hardware Locality (hwloc) software package + provides a portable abstraction (across OS, versions, + architectures, ...) of the hierarchical topology of modern + architectures, including NUMA memory nodes, sockets, shared + caches, cores and simultaneous multithreading. It also gathers + various system attributes such as cache and memory information + as well as the locality of I/O devices such as network + interfaces, InfiniBand HCAs or GPUs. It primarily aims at + helping applications with gathering information about modern + computing hardware so as to exploit it accordingly and + efficiently.""" + homepage = "http://www.open-mpi.org/projects/hwloc/" + url = "http://www.open-mpi.org/software/hwloc/v1.9/downloads/hwloc-1.9.tar.gz" + + version('1.9', '1f9f9155682fe8946a97c08896109508') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py new file mode 100644 index 0000000000..198b3f00dc --- /dev/null +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -0,0 +1,32 @@ +from spack import * + +class Hypre(Package): + """Hypre is a library of high performance preconditioners that + features parallel multigrid methods for both structured and + unstructured grid problems.""" + + homepage = "https://computation.llnl.gov/project/linear_solvers/software.php" + url = "https://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz" + + version('2.10.0b', '768be38793a35bb5d055905b271f5b8e') + + depends_on("mpi") + depends_on("blas") + depends_on("lapack") + + def install(self, spec, prefix): + blas_dir = spec['blas'].prefix + lapack_dir = spec['lapack'].prefix + + # Hypre's source is staged under ./src so we'll have to manually + # cd into it. + with working_dir("src"): + configure( + "--prefix=%s" % prefix, + "--with-blas-libs=blas", + "--with-blas-lib-dirs=%s/lib" % blas_dir, + "--with-lapack-libs=\"lapack blas\"", + "--with-lapack-lib-dirs=%s/lib" % lapack_dir, + "--with-MPI") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/icu/package.py b/var/spack/repos/builtin/packages/icu/package.py new file mode 100644 index 0000000000..f256ec5712 --- /dev/null +++ b/var/spack/repos/builtin/packages/icu/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Icu(Package): + """The International Components for Unicode (ICU) package is a + mature, widely used set of C/C++ libraries providing Unicode and + Globalization support for software applications. ICU is widely + portable and gives applications the same results on all + platforms.""" + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.example.com" + url = "http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz" + + version('54.1', 'e844caed8f2ca24c088505b0d6271bc0') + + + def url_for_version(self, version): + return "http://download.icu-project.org/files/icu4c/%s/icu4c-%s-src.tgz" % ( + version, str(version).replace('.', '_')) + + + def install(self, spec, prefix): + with working_dir("source"): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py new file mode 100644 index 0000000000..55b44463b2 --- /dev/null +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Icu4c(Package): + """ICU is a mature, widely used set of C/C++ and Java libraries + providing Unicode and Globalization support for software applications.""" + + homepage = "http://site.icu-project.org/" + url = "http://downloads.sourceforge.net/project/icu/ICU4C/54.1/icu4c-54_1-src.tgz" + + version('54_1', 'e844caed8f2ca24c088505b0d6271bc0') + + def install(self, spec, prefix): + cd("source") + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/isl/package.py b/var/spack/repos/builtin/packages/isl/package.py new file mode 100644 index 0000000000..836ef3ea40 --- /dev/null +++ b/var/spack/repos/builtin/packages/isl/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Isl(Package): + """isl is a thread-safe C library for manipulating sets and + relations of integer points bounded by affine constraints.""" + homepage = "http://isl.gforge.inria.fr" + url = "http://isl.gforge.inria.fr/isl-0.14.tar.bz2" + + version('0.14', 'acd347243fca5609e3df37dba47fd0bb') + + depends_on("gmp") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-gmp-prefix=%s" % spec['gmp'].prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py new file mode 100644 index 0000000000..8f8076dd14 --- /dev/null +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------ +# Author: Justin Too +#------------------------------------------------------------------------------ +import distutils +from distutils import dir_util +from subprocess import call + +import spack +from spack import * +import llnl.util.tty as tty + +class Jdk(Package): + """The Java Development Kit (JDK) released by Oracle Corporation + in the form of a binary product aimed at Java developers.""" + homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html" + + version('8u25-linux-x64', 'e145c03a7edc845215092786bcfba77e', + url="http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz") + + # Oracle requires that you accept their License Agreement in order + # to access the Java packages in download.oracle.com. In order to + # automate this process, we need to utilize these additional curl + # commandline options. + # + # See http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux + curl_options=[ + '-j', # junk cookies + '-H', # specify required License Agreement cookie + 'Cookie: oraclelicense=accept-securebackup-cookie'] + + def do_fetch(self): + # Add our custom curl commandline options + tty.msg( + "[Jdk] Adding required commandline options to curl " + + "before performing fetch: %s" % + (self.curl_options)) + + for option in self.curl_options: + spack.curl.add_default_arg(option) + + # Now perform the actual fetch + super(Jdk, self).do_fetch() + + + def install(self, spec, prefix): + distutils.dir_util.copy_tree(".", prefix) diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py new file mode 100644 index 0000000000..87820467db --- /dev/null +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Jpeg(Package): + """jpeg library""" + homepage = "http://www.ijg.org" + url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz" + + version('9a', '3353992aecaee1805ef4109aadd433e7') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py new file mode 100644 index 0000000000..6fbe6a68d0 --- /dev/null +++ b/var/spack/repos/builtin/packages/launchmon/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Launchmon(Package): + """Software infrastructure that enables HPC run-time tools to + co-locate tool daemons with a parallel job.""" + homepage = "http://sourceforge.net/projects/launchmon" + url = "http://downloads.sourceforge.net/project/launchmon/launchmon/1.0.1%20release/launchmon-1.0.1.tar.gz" + + version('1.0.1', '2f12465803409fd07f91174a4389eb2b') + version('1.0.1-2', git='https://github.com/scalability-llnl/launchmon.git', commit='ff7e22424b8f375318951eb1c9282fcbbfa8aadf') + + depends_on('autoconf') + depends_on('automake') + depends_on('libtool') + + def install(self, spec, prefix): + configure( + "--prefix=" + prefix, + "--with-bootfabric=cobo", + "--with-rm=slurm") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/launchmon/patch.lmon_install_dir b/var/spack/repos/builtin/packages/launchmon/patch.lmon_install_dir new file mode 100644 index 0000000000..8a1d93fdc9 --- /dev/null +++ b/var/spack/repos/builtin/packages/launchmon/patch.lmon_install_dir @@ -0,0 +1,147 @@ +Index: launchmon/src/linux/lmon_api/Makefile.am +=================================================================== +--- launchmon/src/linux/lmon_api/Makefile.am (revision 481) ++++ launchmon/src/linux/lmon_api/Makefile.am (working copy) +@@ -80,13 +80,10 @@ + libmonfeapi_la_CFLAGS = $(AM_CFLAGS) + libmonfeapi_la_CXXFLAGS = $(AM_CXXFLAGS) + +-libmonfeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ +- -L$(top_srcdir)/@GCRYPTLOC@ \ +- -L$(top_srcdir)/@GPGERRLOC@ \ +- $(AM_LDFLAGS) \ +- -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ ++libmonfeapi_la_LDFLAGS = $(AM_LDFLAGS) \ ++ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ + +-libmonfeapi_la_LIBADD = @LIBPTHREAD@ @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ @LIBRT@ ++libmonfeapi_la_LIBADD = @LIBPTHREAD@ $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ @LIBRT@ + + libmonbeapi_la_SOURCES = lmon_be.cxx \ + lmon_daemon_internal.cxx \ +@@ -113,13 +110,10 @@ + libmonbeapi_la_CFLAGS = $(AM_CFLAGS) + libmonbeapi_la_CXXFLAGS = $(AM_CXXFLAGS) + +-libmonbeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ +- -L$(top_srcdir)/@GCRYPTLOC@ \ +- -L$(top_srcdir)/@GPGERRLOC@ \ +- $(AM_LDFLAGS) \ ++libmonbeapi_la_LDFLAGS = $(AM_LDFLAGS) \ + -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ + +-libmonbeapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ ++libmonbeapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ + + + # +@@ -146,10 +140,8 @@ + + libmonmwapi_la_CXXFLAGS = $(AM_CXXFLAGS) + +-libmonmwapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ +- -L$(top_srcdir)/@GCRYPTLOC@ \ +- -L$(top_srcdir)/@GPGERRLOC@ \ +- $(AM_LDFLAGS) \ ++libmonmwapi_la_LDFLAGS = $(AM_LDFLAGS) \ + -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ + +-libmonmwapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ ++ ++libmonmwapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ +Index: tools/cobo/test/Makefile.am +=================================================================== +--- tools/cobo/test/Makefile.am (revision 481) ++++ tools/cobo/test/Makefile.am (working copy) +@@ -37,12 +37,12 @@ + + client_SOURCES = client.c + +-client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++client_LDFLAGS = + +-client_LDADD = @LIBCOMM@ ++client_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ + + server_rsh_SOURCES = server_rsh.c + +-server_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++server_rsh_LDFLAGS = + +-server_rsh_LDADD = @LIBCOMM@ ++server_rsh_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ +Index: tools/pmgr_collective/test/Makefile.am +=================================================================== +--- tools/pmgr_collective/test/Makefile.am (revision 481) ++++ tools/pmgr_collective/test/Makefile.am (working copy) +@@ -31,18 +31,18 @@ + ## Jun 10 2008 DHA: Copied from the old Makefile. + ## + +-INCLUDES = -I$(top_srcdir)/@COMMLOC@ ++INCLUDES = + + noinst_PROGRAMS = client mpirun_rsh + + client_SOURCES = client.c + +-client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++client_LDFLAGS = + +-client_LDADD = @LIBCOMM@ ++client_LDADD = @COMMLOC@/@LIBCOMM@ + + mpirun_rsh_SOURCES = mpirun_rsh.c + +-mpirun_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++mpirun_rsh_LDFLAGS = + +-mpirun_rsh_LDADD = @LIBCOMM@ ++mpirun_rsh_LDADD = @COMMLOC@/@LIBCOMM@ +Index: config/x_ac_bootfabric.m4 +=================================================================== +--- config/x_ac_bootfabric.m4 (revision 481) ++++ config/x_ac_bootfabric.m4 (working copy) +@@ -63,7 +63,7 @@ + #AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) + #AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) + #AC_SUBST(COMMLOC, tools/pmgr_collective/src) +- #AC_SUBST(LIBCOMM, -lpmgr_collective) ++ #AC_SUBST(LIBCOMM, libcobo.la) + #else + commfab_found="no" + AC_MSG_ERROR([--with-bootfabric=pmgr is given, but pmgr_collective has been deprecated]) +@@ -87,7 +87,7 @@ + AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) + AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) + AC_SUBST(COMMLOC, tools/cobo/src) +- AC_SUBST(LIBCOMM, -lcobo) ++ AC_SUBST(LIBCOMM, libcobo.la) + + if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then + AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) +@@ -117,7 +117,7 @@ + AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) + AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) + AC_SUBST(COMMLOC, tools/cobo/src) +- AC_SUBST(LIBCOMM, -lcobo) ++ AC_SUBST(LIBCOMM, libcobo.la) + + if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then + AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) +Index: config/x_ac_gcrpyt.m4 +=================================================================== +--- config/x_ac_gcrypt.m4 2011-10-22 00:50:38.000000000 -0700 ++++ config/x_ac_gcrypt.patched.m4 2014-03-14 11:33:59.189220000 -0700 +@@ -55,8 +55,8 @@ + AC_CONFIG_SUBDIRS([tools/libgpg-error]) + AC_SUBST(GPGERRLOC, [tools/libgpg-error/src]) + AC_SUBST(GCRYPTLOC, [tools/libgcrypt/src]) +- AC_SUBST(LIBGCRYPT, [-lgcrypt]) +- AC_SUBST(LIBGPGERR, [-lgpg-error]) ++ AC_SUBST(LIBGCRYPT, [libgcrypt.la]) ++ AC_SUBST(LIBGPGERR, [libgpg-error.la]) + gcrypt_configured="yes" + else + AC_MSG_ERROR([tools/libgpg-error or tools/libgcrypt not found]) + diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py new file mode 100644 index 0000000000..a53c2f997a --- /dev/null +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Lcms(Package): + """Little cms is a color management library. Implements fast + transforms between ICC profiles. It is focused on speed, and is + portable across several platforms (MIT license).""" + homepage = "http://www.littlecms.com" + url = "http://downloads.sourceforge.net/project/lcms/lcms/2.6/lcms2-2.6.tar.gz" + + version('2.6', 'f4c08d38ceade4a664ebff7228910a33') + + depends_on("jpeg") + depends_on("libtiff") + depends_on("zlib") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/leveldb/package.py b/var/spack/repos/builtin/packages/leveldb/package.py new file mode 100644 index 0000000000..da68a9cbcb --- /dev/null +++ b/var/spack/repos/builtin/packages/leveldb/package.py @@ -0,0 +1,29 @@ +import os +import glob +from spack import * + +class Leveldb(Package): + """LevelDB is a fast key-value storage library written at Google + that provides an ordered mapping from string keys to string values.""" + + homepage = "https://github.com/google/leveldb" + url = "https://github.com/google/leveldb/archive/v1.18.tar.gz" + + version('1.18', '73770de34a2a5ab34498d2e05b2b7fa0') + + depends_on("snappy") + + def install(self, spec, prefix): + make() + + mkdirp(prefix.include) + mkdirp(prefix.lib) + + cp = which('cp') + + # cp --preserve=links libleveldb.* prefix/lib + args = glob.glob('libleveldb.*') + args.append(prefix + '/lib') + cp('--preserve=links', *args) + + cp('-r', 'include/leveldb', prefix + '/include') diff --git a/var/spack/repos/builtin/packages/libNBC/package.py b/var/spack/repos/builtin/packages/libNBC/package.py new file mode 100644 index 0000000000..6d08f3219c --- /dev/null +++ b/var/spack/repos/builtin/packages/libNBC/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Libnbc(Package): + """LibNBC is a prototypic implementation of a nonblocking + interface for MPI collective operations. Based on ANSI C and + MPI-1, it supports all MPI-1 collective operations in a + nonblocking manner. LibNBC is distributed under the BSD license. + """ + homepage = "http://unixer.de/research/nbcoll/libnbc/" + url = "http://unixer.de/research/nbcoll/libnbc/libNBC-1.1.1.tar.gz" + + version('1.1.1', 'ece5c94992591a9fa934a90e5dbe50ce') + + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py new file mode 100644 index 0000000000..cbd4b89cd0 --- /dev/null +++ b/var/spack/repos/builtin/packages/libarchive/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Libarchive(Package): + """libarchive: C library and command-line tools for reading and + writing tar, cpio, zip, ISO, and other archive formats.""" + homepage = "http://www.libarchive.org" + url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz" + + version('3.1.2', 'efad5a503f66329bb9d2f4308b5de98a') + version('3.1.1', '1f3d883daf7161a0065e42a15bbf168f') + version('3.1.0', '095a287bb1fd687ab50c85955692bf3a') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libcircle/package.py b/var/spack/repos/builtin/packages/libcircle/package.py new file mode 100644 index 0000000000..3f7c996fb0 --- /dev/null +++ b/var/spack/repos/builtin/packages/libcircle/package.py @@ -0,0 +1,18 @@ +import os +from spack import * + +class Libcircle(Package): + """libcircle provides an efficient distributed queue on a cluster, + using self-stabilizing work stealing.""" + + homepage = "https://github.com/hpc/libcircle" + + version('0.2.1-rc.1', '2b1369a5736457239f908abf88143ec2', + url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz') + + depends_on('mpi') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py new file mode 100644 index 0000000000..00736b7811 --- /dev/null +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Libdrm(Package): + """A userspace library for accessing the DRM, direct + rendering manager, on Linux, BSD and other operating + systems that support the ioctl interface.""" + + homepage = "http://dri.freedesktop.org/libdrm/" # no real website... + url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz" + + version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') + version('2.4.33', '86e4e3debe7087d5404461e0032231c8') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py new file mode 100644 index 0000000000..099a974e93 --- /dev/null +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -0,0 +1,81 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with 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 + +# Only build certain parts of dwarf because the other ones break. +dwarf_dirs = ['libdwarf', 'dwarfdump2'] + +class Libdwarf(Package): + """The DWARF Debugging Information Format is of interest to + programmers working on compilers and debuggers (and any one + interested in reading or writing DWARF information). It was + developed by a committee (known as the PLSIG at the time) + starting around 1991. Starting around 1991 SGI developed the + libdwarf and dwarfdump tools for internal use and as part of + SGI IRIX developer tools. Since that time dwarfdump and + libdwarf have been shipped (as an executable and archive + respectively, not source) with every release of the SGI + MIPS/IRIX C compiler.""" + + homepage = "http://www.prevanders.net/dwarf.html" + url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" + list_url = homepage + + version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d') + version('20130207', '64b42692e947d5180e162e46c689dfbf') + version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db') + + depends_on("libelf") + + parallel = False + + + def install(self, spec, prefix): + # dwarf build does not set arguments for ar properly + make.add_default_arg('ARFLAGS=rcs') + + # Dwarf doesn't provide an install, so we have to do it. + mkdirp(prefix.bin, prefix.include, prefix.lib, prefix.man1) + + with working_dir('libdwarf'): + configure("--prefix=" + prefix, "--enable-shared") + make() + + install('libdwarf.a', prefix.lib) + install('libdwarf.so', prefix.lib) + install('libdwarf.h', prefix.include) + install('dwarf.h', prefix.include) + + with working_dir('dwarfdump2'): + configure("--prefix=" + prefix) + + # This makefile has strings of copy commands that + # cause a race in parallel + make(parallel=False) + + install('dwarfdump', prefix.bin) + install('dwarfdump.conf', prefix.lib) + install('dwarfdump.1', prefix.man1) diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py new file mode 100644 index 0000000000..9338b8f393 --- /dev/null +++ b/var/spack/repos/builtin/packages/libelf/package.py @@ -0,0 +1,49 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Libelf(Package): + """libelf lets you read, modify or create ELF object files in an + architecture-independent way. The library takes care of size + and endian issues, e.g. you can process a file for SPARC + processors on an Intel-based system.""" + + homepage = "http://www.mr511.de/software/english.html" + url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" + + version('0.8.13', '4136d7b4c04df68b686570afa26988ac') + version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') + + provides('elf') + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--enable-shared", + "--disable-dependency-tracking", + "--disable-debug") + make() + + # The mkdir commands in libelf's install can fail in parallel + make("install", parallel=False) diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py new file mode 100644 index 0000000000..11b1083d67 --- /dev/null +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -0,0 +1,30 @@ +from spack import * + +class Libevent(Package): + """The libevent API provides a mechanism to execute a callback function + when a specific event occurs on a file descriptor or after a timeout has been + reached. Furthermore, libevent also support callbacks due to signals or regular + timeouts. + """ + + homepage = "http://libevent.org" + url = "https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" + list_url = "http://libevent.org/old-releases.html" + + version('2.0.21', 'b2405cc9ebf264aa47ff615d9de527a2') + version('2.0.20', '94270cdee32c0cd0aa9f4ee6ede27e8e') + version('2.0.19', '91111579769f46055b0a438f5cc59572') + version('2.0.18', 'aa1ce9bc0dee7b8084f6855765f2c86a') + version('2.0.17', 'dad64aaaaff16b5fbec25160c06fee9a') + version('2.0.16', '899efcffccdb3d5111419df76e7dc8df') + version('2.0.15', '2643abe7ba242df15c08b2cc14ec8759') + version('2.0.14', 'cac0f379da35d3b98f83ac16fcfe1df4') + version('2.0.13', 'af786b4b3f790c9d3279792edf7867fc') + version('2.0.12', '42986228baf95e325778ed328a93e070') + + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py new file mode 100644 index 0000000000..acec031717 --- /dev/null +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Libffi(Package): + """The libffi library provides a portable, high level programming + interface to various calling conventions. This allows a programmer + to call any function specified by a call interface description at + run time.""" + homepage = "https://sourceware.org/libffi/" + + version('3.2.1','83b89587607e3eb65c70d361f13bab43',url = "ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") + #version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug $(lib64) instead of ${lib64} in libffi.pc + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py new file mode 100644 index 0000000000..1d0a57f317 --- /dev/null +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Libgcrypt(Package): + """Libgcrypt is a general purpose cryptographic library based on + the code from GnuPG. It provides functions for all cryptographic + building blocks: symmetric ciphers, hash algorithms, MACs, public + key algorithms, large integer functions, random numbers and a lot + of supporting functions. """ + homepage = "http://www.gnu.org/software/libgcrypt/" + url = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.2.tar.bz2" + + version('1.6.2', 'b54395a93cb1e57619943c082da09d5f') + + depends_on("libgpg-error") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libgpg-error/package.py b/var/spack/repos/builtin/packages/libgpg-error/package.py new file mode 100644 index 0000000000..6c1d1a10a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/libgpg-error/package.py @@ -0,0 +1,17 @@ +from spack import * + +class LibgpgError(Package): + """Libgpg-error is a small library that defines common error + values for all GnuPG components. Among these are GPG, GPGSM, + GPGME, GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, + SmartCard Daemon and possibly more in the future. """ + + homepage = "https://www.gnupg.org/related_software/libgpg-error" + url = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.18.tar.bz2" + + version('1.18', '12312802d2065774b787cbfc22cc04e9') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py new file mode 100644 index 0000000000..07ee183947 --- /dev/null +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -0,0 +1,20 @@ +from spack import * + +class LibjpegTurbo(Package): + """libjpeg-turbo is a fork of the original IJG libjpeg which uses + SIMD to accelerate baseline JPEG compression and + decompression. libjpeg is a library that implements JPEG image + encoding, decoding and transcoding.""" + homepage = "http://libjpeg-turbo.virtualgl.org" + url = "http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.3.1.tar.gz" + + version('1.3.1', '2c3a68129dac443a72815ff5bb374b05') + + # Can use either of these. + depends_on("yasm") + depends_on("nasm") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libjson-c/package.py b/var/spack/repos/builtin/packages/libjson-c/package.py new file mode 100644 index 0000000000..c0801cce9c --- /dev/null +++ b/var/spack/repos/builtin/packages/libjson-c/package.py @@ -0,0 +1,14 @@ +from spack import * + +class LibjsonC(Package): + """ A JSON implementation in C """ + homepage = "https://github.com/json-c/json-c/wiki" + url = "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.11.tar.gz" + + version('0.11', 'aa02367d2f7a830bf1e3376f77881e98') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libmng/package.py b/var/spack/repos/builtin/packages/libmng/package.py new file mode 100644 index 0000000000..e5336ea2c2 --- /dev/null +++ b/var/spack/repos/builtin/packages/libmng/package.py @@ -0,0 +1,23 @@ +from spack import * + +class Libmng(Package): + """libmng -THE reference library for reading, displaying, writing + and examining Multiple-Image Network Graphics. MNG is the animation + extension to the popular PNG image-format.""" + homepage = "http://sourceforge.net/projects/libmng/" + url = "http://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.2/libmng-2.0.2.tar.gz" + + version('2.0.2', '1ffefaed4aac98475ee6267422cbca55') + + depends_on("jpeg") + depends_on("zlib") + depends_on("lcms") + + def patch(self): + # jpeg requires stdio to beincluded before its headrs. + filter_file(r'^(\#include \)', '#include\n\\1', 'libmng_types.h') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py new file mode 100644 index 0000000000..3b95b86ddf --- /dev/null +++ b/var/spack/repos/builtin/packages/libmonitor/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Libmonitor(Package): + """Libmonitor is a library for process and thread control.""" + homepage = "http://hpctoolkit.org" + + version('20130218', svn='http://libmonitor.googlecode.com/svn/trunk/', revision=146) + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py new file mode 100644 index 0000000000..6022fc34a3 --- /dev/null +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Libpciaccess(Package): + """Generic PCI access library.""" + + homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" + url = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" + + version('0.13.4', git='http://anongit.freedesktop.org/git/xorg/lib/libpciaccess.git', + tag='libpciaccess-0.13.4') + + depends_on('autoconf') + depends_on('libtool') + + def install(self, spec, prefix): + from subprocess import call + call(["./autogen.sh"]) + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py new file mode 100644 index 0000000000..e02b08663e --- /dev/null +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Libpng(Package): + """libpng graphics file format""" + homepage = "http://www.libpng.org/pub/png/libpng.html" + url = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz" + + version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d') + version('1.6.15', '829a256f3de9307731d4f52dc071916d') + version('1.6.14', '2101b3de1d5f348925990f9aa8405660') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py new file mode 100644 index 0000000000..1c8a16d998 --- /dev/null +++ b/var/spack/repos/builtin/packages/libsodium/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Libsodium(Package): + """Sodium is a modern, easy-to-use software library for encryption, + decryption, signatures, password hashing and more.""" + homepage = "https://download.libsodium.org/doc/" + url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz" + + version('1.0.3', 'b3bcc98e34d3250f55ae196822307fab') + version('1.0.2', 'dc40eb23e293448c6fc908757738003f') + version('1.0.1', '9a221b49fba7281ceaaf5e278d0f4430') + version('1.0.0', '3093dabe4e038d09f0d150cef064b2f7') + version('0.7.1', 'c224fe3923d1dcfe418c65c8a7246316') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py new file mode 100644 index 0000000000..63c6704cb8 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Libtiff(Package): + """libtiff graphics format library""" + homepage = "http://www.remotesensing.org/libtiff/" + url = "http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz" + + version('4.0.3', '051c1068e6a0627f461948c365290410') + + depends_on('jpeg') + depends_on('zlib') + depends_on('xz') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py new file mode 100644 index 0000000000..a07daf9781 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Libtool(Package): + """libtool -- library building part of autotools""" + homepage = "https://www.gnu.org/software/libtool/" + url = "http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz" + + version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py new file mode 100644 index 0000000000..239fcbcfd5 --- /dev/null +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Libunwind(Package): + """A portable and efficient C programming interface (API) to determine + the call-chain of a program.""" + homepage = "http://www.nongnu.org/libunwind/" + url = "http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz" + + version('1.1', 'fb4ea2f6fbbe45bf032cd36e586883ce') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py new file mode 100644 index 0000000000..373c5bfcac --- /dev/null +++ b/var/spack/repos/builtin/packages/libuuid/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Libuuid(Package): + """Portable uuid C library""" + # FIXME: add a proper url for your package's homepage here. + homepage = "http://sourceforge.net/projects/libuuid/" + url = "http://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibuuid%2F&ts=1433881396&use_mirror=iweb" + + version('1.0.3', 'd44d866d06286c08ba0846aba1086d68') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py new file mode 100644 index 0000000000..16a5525c0d --- /dev/null +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Libxcb(Package): + """The X protocol C-language Binding (XCB) is a replacement + for Xlib featuring a small footprint, latency hiding, direct + access to the protocol, improved threading support, and + extensibility.""" + + homepage = "http://xcb.freedesktop.org/" + url = "http://xcb.freedesktop.org/dist/libxcb-1.11.tar.gz" + + version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb') + version('1.11.1', '118623c15a96b08622603a71d8789bf3') + depends_on("python") + depends_on("xcb-proto") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py new file mode 100644 index 0000000000..3a0af6b368 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Libxml2(Package): + """Libxml2 is the XML C parser and toolkit developed for the Gnome + project (but usable outside of the Gnome platform), it is free + software available under the MIT License.""" + homepage = "http://xmlsoft.org" + url = "http://xmlsoft.org/sources/libxml2-2.9.2.tar.gz" + + version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788') + + extends('python') + depends_on('zlib') + depends_on('xz') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py new file mode 100644 index 0000000000..3aa2448b46 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxshmfence/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Libxshmfence(Package): + """This is a tiny library that exposes a event API on top of Linux + futexes.""" + + homepage = "http://keithp.com/blogs/dri3_extension/" # not really... + url = "http://xorg.freedesktop.org/archive/individual/lib/libxshmfence-1.2.tar.gz" + + version('1.2', 'f0b30c0fc568b22ec524859ee28556f1') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py new file mode 100644 index 0000000000..f97332d020 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxslt/package.py @@ -0,0 +1,24 @@ +from spack import * + +class Libxslt(Package): + """Libxslt is the XSLT C library developed for the GNOME + project. XSLT itself is a an XML language to define + transformation for XML. Libxslt is based on libxml2 the XML C + library developed for the GNOME project. It also implements + most of the EXSLT set of processor-portable extensions + functions and some of Saxon's evaluate and expressions + extensions.""" + homepage = "http://www.xmlsoft.org/XSLT/index.html" + url = "http://xmlsoft.org/sources/libxslt-1.1.28.tar.gz" + + version('1.1.28', '9667bf6f9310b957254fdcf6596600b7') + + depends_on("libxml2") + depends_on("xz") + depends_on("zlib") + depends_on("libgcrypt") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/llvm-lld/package.py b/var/spack/repos/builtin/packages/llvm-lld/package.py new file mode 100644 index 0000000000..f229211396 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm-lld/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class LlvmLld(Package): + """lld - The LLVM Linker + lld is a new set of modular code for creating linker tools.""" + homepage = "http://lld.llvm.org" + url = "http://llvm.org/releases/3.4/lld-3.4.src.tar.gz" + + depends_on('llvm') + + version('3.4', '3b6a17e58c8416c869c14dd37682f78e') + + def install(self, spec, prefix): + env['CXXFLAGS'] = self.compier.cxx11_flag + + with working_dir('spack-build', create=True): + cmake('..', + '-DLLD_PATH_TO_LLVM_BUILD=%s' % spec['llvm'].prefix, + '-DLLVM_MAIN_SRC_DIR=%s' % spec['llvm'].prefix, + *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py new file mode 100644 index 0000000000..a6759c3033 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -0,0 +1,53 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Llvm(Package): + """The LLVM Project is a collection of modular and reusable compiler and + toolchain technologies. Despite its name, LLVM has little to do with + traditional virtual machines, though it does provide helpful libraries + that can be used to build them. The name "LLVM" itself is not an acronym; + it is the full name of the project. + """ + homepage = 'http://llvm.org/' + url = 'http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz' + + version('3.7.0', 'b98b9495e5655a672d6cb83e1a180f8e', url='http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz') + version('3.6.2', '0c1ee3597d75280dee603bae9cbf5cc2', url='http://llvm.org/releases/3.6.2/llvm-3.6.2.src.tar.xz') + version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz') + + depends_on('python@2.7:') + + def install(self, spec, prefix): + env['CXXFLAGS'] = self.compiler.cxx11_flag + + with working_dir('spack-build', create=True): + cmake('..', + '-DLLVM_REQUIRES_RTTI=1', + '-DPYTHON_EXECUTABLE=%s/bin/python' % spec['python'].prefix, + *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/lmdb/package.py b/var/spack/repos/builtin/packages/lmdb/package.py new file mode 100644 index 0000000000..875b8100c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/lmdb/package.py @@ -0,0 +1,39 @@ +import os +from spack import * + +class Lmdb(Package): + """Read-only mirror of official repo on openldap.org. Issues and + pull requests here are ignored. Use OpenLDAP ITS for issues. + http://www.openldap.org/software/repo.html""" + + + homepage = "http://www.openldap.org/software/repo.html" + url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.16.tar.gz" + + version('0.9.16', '0de89730b8f3f5711c2b3a4ba517b648') + + def install(self, spec, prefix): + os.chdir('libraries/liblmdb') + + make() + + mkdirp(prefix.bin) + mkdirp(prefix + '/man/man1') + mkdirp(prefix.lib) + mkdirp(prefix.include) + + bins = ['mdb_stat', 'mdb_copy', 'mdb_dump', 'mdb_load'] + for f in bins: + install(f, prefix.bin) + + mans = ['mdb_stat.1', 'mdb_copy.1', 'mdb_dump.1', 'mdb_load.1'] + for f in mans: + install(f, prefix + '/man/man1') + + libs = ['liblmdb.a', 'liblmdb.so'] + for f in libs: + install(f, prefix.lib) + + includes = ['lmdb.h'] + for f in includes: + install(f, prefix.include) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py new file mode 100644 index 0000000000..57c443cc2d --- /dev/null +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -0,0 +1,26 @@ +from spack import * +import os + +class Lua(Package): + """ The Lua programming language interpreter and library """ + homepage = "http://www.lua.org" + url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" + + version('5.3.1', '797adacada8d85761c079390ff1d9961') + version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8af') + version('5.2.4', '913fdb32207046b273fdb17aad70be13') + version('5.2.3', 'dc7f94ec6ff15c985d2d6ad0f1b35654') + version('5.2.2', 'efbb645e897eae37cad4344ce8b0a614') + version('5.2.1', 'ae08f641b45d737d12d30291a5e5f6e3') + version('5.2.0', 'f1ea831f397214bae8a265995ab1a93e') + version('5.1.5', '2e115fe26e435e33b0d5c022e4490567') + version('5.1.4', 'd0870f2de55d59c1c8419f36e8fac150') + version('5.1.3', 'a70a8dfaa150e047866dc01a46272599') + + depends_on('ncurses') + + def install(self, spec, prefix): + make('INSTALL_TOP=%s' % prefix, + 'MYLDFLAGS=-L%s/lib' % spec['ncurses'].prefix, + 'linux', + 'install') diff --git a/var/spack/repos/builtin/packages/lwgrp/package.py b/var/spack/repos/builtin/packages/lwgrp/package.py new file mode 100644 index 0000000000..5963382b92 --- /dev/null +++ b/var/spack/repos/builtin/packages/lwgrp/package.py @@ -0,0 +1,18 @@ +import os +from spack import * + +class Lwgrp(Package): + """Thie light-weight group library provides process group + representations using O(log N) space and time.""" + + homepage = "https://github.com/hpc/lwgrp" + url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz" + + version('1.0.2', 'ab7ba3bdd8534a651da5076f47f27d8a') + + depends_on('mpi') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/lwm2/package.py b/var/spack/repos/builtin/packages/lwm2/package.py new file mode 100644 index 0000000000..31afff8816 --- /dev/null +++ b/var/spack/repos/builtin/packages/lwm2/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Lwm2(Package): + """LWM2: Light Weight Measurement Module. This is a PMPI module + that can collect a number of time-sliced MPI and POSIX I/O + measurements from a program. + """ + homepage = "https://jay.grs.rwth-aachen.de/redmine/projects/lwm2" + + version('torus', hg='https://jay.grs.rwth-aachen.de/hg/lwm2', revision='torus') + + depends_on("papi") + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/matio/package.py b/var/spack/repos/builtin/packages/matio/package.py new file mode 100644 index 0000000000..12cfb80926 --- /dev/null +++ b/var/spack/repos/builtin/packages/matio/package.py @@ -0,0 +1,15 @@ +from spack import * + + +class Matio(Package): + """matio is an C library for reading and writing Matlab MAT files""" + homepage = "http://sourceforge.net/projects/matio/" + url = "http://downloads.sourceforge.net/project/matio/matio/1.5.2/matio-1.5.2.tar.gz" + + version('1.5.2', '85b007b99916c63791f28398f6a4c6f1') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/memaxes/package.py b/var/spack/repos/builtin/packages/memaxes/package.py new file mode 100644 index 0000000000..76d5d3f831 --- /dev/null +++ b/var/spack/repos/builtin/packages/memaxes/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Memaxes(Package): + """MemAxes is a visualizer for sampled memory trace data.""" + + homepage = "https://github.com/scalability-llnl/MemAxes" + + version('0.5', '5874f3fda9fd2d313c0ff9684f915ab5', + url='https://github.com/scalability-llnl/MemAxes/archive/v0.5.tar.gz') + + depends_on("cmake@2.8.9:") + depends_on("qt@5:") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py new file mode 100644 index 0000000000..2a04a8fd51 --- /dev/null +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -0,0 +1,34 @@ +from spack import * + +class Mesa(Package): + """Mesa is an open-source implementation of the OpenGL + specification - a system for rendering interactive 3D graphics.""" + + homepage = "http://www.mesa3d.org" + url = "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/8.0.5/MesaLib-8.0.5.tar.gz" + # url = "ftp://ftp.freedesktop.org/pub/mesa/10.4.4/MesaLib-10.4.4.tar.gz" + + # version('10.4.4', '8d863a3c209bf5116b2babfccccc68ce') + version('8.0.5', 'cda5d101f43b8784fa60bdeaca4056f2') + + # mesa 7.x, 8.x, 9.x + depends_on("libdrm@2.4.33") + depends_on("llvm@3.0") + depends_on("libxml2") + + # patch("llvm-fixes.patch") # using newer llvm + + # mesa 10.x + # depends_on("py-mako") + # depends_on("flex") + # depends_on("bison") + # depends_on("dri2proto") + # depends_on("libxcb") + # depends_on("libxshmfence") + + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py new file mode 100644 index 0000000000..7ce5ae1925 --- /dev/null +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -0,0 +1,27 @@ +from spack import * + +class Metis(Package): + """METIS is a set of serial programs for partitioning graphs, + partitioning finite element meshes, and producing fill reducing + orderings for sparse matrices. The algorithms implemented in + METIS are based on the multilevel recursive-bisection, + multilevel k-way, and multi-constraint partitioning schemes.""" + + homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" + url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" + + version('5.1.0', '5465e67079419a69e0116de24fce58fe') + + depends_on('mpi') + + def install(self, spec, prefix): + cmake(".", + '-DGKLIB_PATH=%s/GKlib' % pwd(), + '-DSHARED=1', + '-DCMAKE_C_COMPILER=mpicc', + '-DCMAKE_CXX_COMPILER=mpicxx', + '-DSHARED=1', + *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py new file mode 100644 index 0000000000..6fbfca3007 --- /dev/null +++ b/var/spack/repos/builtin/packages/mpc/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Mpc(Package): + """Gnu Mpc is a C library for the arithmetic of complex numbers + with arbitrarily high precision and correct rounding of the + result.""" + homepage = "http://www.multiprecision.org" + url = "ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz" + + version('1.0.2', '68fadff3358fb3e7976c7a398a0af4c3') + + depends_on("gmp") + depends_on("mpfr") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mpe2/mpe2.patch b/var/spack/repos/builtin/packages/mpe2/mpe2.patch new file mode 100644 index 0000000000..3ade1f04f4 --- /dev/null +++ b/var/spack/repos/builtin/packages/mpe2/mpe2.patch @@ -0,0 +1,12 @@ +diff -rupN mpe2-1.3.0/src/graphics/src/mpe_graphics.c mpe2-1.3.0.new/src/graphics/src/mpe_graphics.c +--- mpe2-1.3.0/src/graphics/src/mpe_graphics.c 2009-06-15 10:36:22.000000000 -0600 ++++ mpe2-1.3.0.new/src/graphics/src/mpe_graphics.c 2014-10-25 00:11:22.000000000 -0600 +@@ -982,7 +982,7 @@ char *string; + return MPE_ERR_BAD_ARGS; + } + +- printf("color = %d, string = %s\n",(int) color, string); ++//printf("color = %d, string = %s\n",(int) color, string); + + XBSetPixVal( graph->xwin, graph->xwin->cmapping[color] ); + returnVal = XDrawString( graph->xwin->disp, XBDrawable(graph->xwin), diff --git a/var/spack/repos/builtin/packages/mpe2/package.py b/var/spack/repos/builtin/packages/mpe2/package.py new file mode 100644 index 0000000000..27295172cc --- /dev/null +++ b/var/spack/repos/builtin/packages/mpe2/package.py @@ -0,0 +1,28 @@ +from spack import * + +class Mpe2(Package): + """Message Passing Extensions (MPE) -- Parallel, shared X window graphics""" + + homepage = "http://www.mcs.anl.gov/research/projects/perfvis/software/MPE/" + url = "ftp://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-1.3.0.tar.gz" + + version('1.3.0', '67bf0c7b2e573df3ba0d2059a96c2f7b') + + patch('mpe2.patch') + + depends_on("mpi") + + provides("mpe") + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--x-includes=/usr/X11R6/include", + "--x-libraries=/usr/X11R6/lib", + "--enable-mpe_graphics=yes", + "--disable-f77", + "--enable-viewers=no", + "--enable-slog2=no", + "--with-mpicc=mpicc") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py new file mode 100644 index 0000000000..9c744a22df --- /dev/null +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Mpfr(Package): + """The MPFR library is a C library for multiple-precision + floating-point computations with correct rounding.""" + homepage = "http://www.mpfr.org" + url = "http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.bz2" + + version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138') + # version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') + + depends_on('gmp') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mpibash/mpibash-4.3.patch b/var/spack/repos/builtin/packages/mpibash/mpibash-4.3.patch new file mode 100644 index 0000000000..17e285b0bf --- /dev/null +++ b/var/spack/repos/builtin/packages/mpibash/mpibash-4.3.patch @@ -0,0 +1,1565 @@ +diff -Naur bash-4.3/builtins/circle.def mpibash-4.3/builtins/circle.def +--- bash-4.3/builtins/circle.def 1969-12-31 17:00:00.000000000 -0700 ++++ mpibash-4.3/builtins/circle.def 2014-05-13 11:27:37.314100671 -0600 +@@ -0,0 +1,620 @@ ++This file is circle.def, from which is created circle.c. ++It implements all of the "circle_*" builtins in Bash. ++ ++$PRODUCES circle.c ++ ++#include ++ ++#include ++#if defined (HAVE_UNISTD_H) ++# ifdef _MINIX ++# include ++# endif ++# include ++#endif ++ ++#include "../bashintl.h" ++#include "../shell.h" ++#include "common.h" ++#include "bashgetopt.h" ++#include ++ ++extern int running_trap, trap_saved_exit_value; ++ ++static int circle_rank; /* Rank in the Libcircle job */ ++static SHELL_VAR *create_func = NULL; /* User-defined callback function for CIRCLE_cb_create. */ ++static SHELL_VAR *process_func = NULL; /* User-defined callback function for CIRCLE_cb_process. */ ++static SHELL_VAR *reduce_init_func = NULL; /* User-defined callback function for CIRCLE_cb_reduce_init. */ ++static SHELL_VAR *reduce_fini_func = NULL; /* User-defined callback function for CIRCLE_cb_reduce_fini. */ ++static SHELL_VAR *reduce_op_func = NULL; /* User-defined callback function for CIRCLE_cb_reduce_op. */ ++static CIRCLE_handle *current_handle = NULL; /* Active handle within a callback or NULL if not within a callback */ ++static int within_reduction = 0; /* 1=within a reduction callback; 0=not */ ++ ++/* Return with a usage message if no arguments remain. */ ++#define YES_ARGS(LIST) \ ++ if ((LIST) == 0) \ ++ { \ ++ builtin_usage (); \ ++ return (EX_USAGE); \ ++ } ++ ++/* Perform the same operation as bind_variable, but with VALUE being a ++ * number, not a string. */ ++static SHELL_VAR * ++bind_variable_number (name, value, flags) ++ const char *name; ++ long value; ++ int flags; ++{ ++ char numstr[25]; /* String version of VALUE */ ++ ++ sprintf (numstr, "%ld", value); ++ return bind_variable (name, numstr, flags); ++} ++ ++/* Invoke the user-defined creation-callback function (create_func). */ ++static void ++internal_create_func (handle) ++ CIRCLE_handle *handle; ++{ ++ WORD_LIST *funcargs; ++ ++ if (create_func == NULL) ++ return; ++ current_handle = handle; ++ funcargs = make_word_list (make_word ("cb_create"), NULL); ++ execute_shell_function (create_func, funcargs); ++ dispose_words (funcargs); ++ current_handle = NULL; ++} ++ ++/* Invoke the user-defined process-callback function (process_func). */ ++static void ++internal_process_func (handle) ++ CIRCLE_handle *handle; ++{ ++ WORD_LIST *funcargs; ++ ++ if (process_func == NULL) ++ return; ++ current_handle = handle; ++ funcargs = make_word_list (make_word ("cb_process"), NULL); ++ execute_shell_function (process_func, funcargs); ++ dispose_words (funcargs); ++ current_handle = NULL; ++} ++ ++/* Invoke the user-defined reduction-initiation callback function ++ * (reduce_init_func). */ ++static void ++internal_reduce_init_func (void) ++{ ++ WORD_LIST *funcargs; ++ ++ if (reduce_init_func == NULL) ++ return; ++ within_reduction = 1; ++ funcargs = make_word_list (make_word ("cb_reduce_init"), NULL); ++ execute_shell_function (reduce_init_func, funcargs); ++ dispose_words (funcargs); ++ within_reduction = 0; ++} ++ ++/* Invoke the user-defined reduction callback function ++ * (reduce_op_func). */ ++static void ++internal_reduce_op_func (buf1, size1, buf2, size2) ++ const void* buf1; ++ size_t size1; ++ const void* buf2; ++ size_t size2; ++{ ++ WORD_LIST *funcargs; ++ ++ if (reduce_op_func == NULL) ++ return; ++ within_reduction = 1; ++ funcargs = make_word_list (make_word (buf2), NULL); ++ funcargs = make_word_list (make_word (buf1), funcargs); ++ funcargs = make_word_list (make_word ("cb_reduce_op"), funcargs); ++ execute_shell_function (reduce_op_func, funcargs); ++ dispose_words (funcargs); ++ within_reduction = 0; ++} ++ ++/* Invoke the user-defined reduction-finalization callback function ++ * (reduce_fini_func). */ ++static void ++internal_reduce_fini_func (buf, size) ++ const void* buf; ++ size_t size; ++{ ++ WORD_LIST *funcargs; ++ ++ if (reduce_fini_func == NULL) ++ return; ++ funcargs = make_word_list (make_word (buf), NULL); ++ funcargs = make_word_list (make_word ("cb_reduce_fini"), funcargs); ++ execute_shell_function (reduce_fini_func, funcargs); ++ dispose_words (funcargs); ++} ++ ++/* Look up a user-provided callback function. */ ++static int ++find_callback_function (list, user_func) ++ WORD_LIST *list; ++ SHELL_VAR **user_func; ++{ ++ char *funcname; /* Name of the user-defined function. */ ++ ++ /* If no argument was provided, nullify the callback function. */ ++ if (list == NULL) ++ { ++ *user_func = NULL; ++ return EXECUTION_SUCCESS; ++ } ++ ++ /* Get the callback function. */ ++ funcname = list->word->word; ++ list = list->next; ++ no_args (list); ++ *user_func = find_function (funcname); ++ if (*user_func == NULL) ++ { ++ builtin_error (_("function %s not found"), funcname); ++ return EXECUTION_FAILURE; ++ } ++ return EXECUTION_SUCCESS; ++} ++ ++/* Initialize Libcircle. */ ++void ++initialize_libcircle (argc, argv) ++ int argc; ++ char **argv; ++{ ++ circle_rank = CIRCLE_init (argc, argv, CIRCLE_DEFAULT_FLAGS); ++ bind_variable_number ("circle_rank", circle_rank, 0); ++ CIRCLE_enable_logging (CIRCLE_LOG_WARN); ++ CIRCLE_cb_create (internal_create_func); ++ CIRCLE_cb_process (internal_process_func); ++ CIRCLE_cb_reduce_init (internal_reduce_init_func); ++ CIRCLE_cb_reduce_op (internal_reduce_op_func); ++ CIRCLE_cb_reduce_fini (internal_reduce_fini_func); ++} ++ ++/* Finalize Libcircle. */ ++void ++finalize_libcircle (void) ++{ ++ CIRCLE_finalize (); ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++$BUILTIN circle_set_options ++$FUNCTION circle_set_options_builtin ++$SHORT_DOC circle_set_options [flag]... ++Change Libcircle's run-time behavior. ++ ++Arguments: ++ FLAG "split_random", "split_equal", or "create_global" ++ ++Multiple flags can be provided. If no flags are provided, Libcircle ++reverts to its default options. ++ ++Exit Status: ++Returns 0 unless an invalid option is given. ++$END ++/*'*/ ++ ++/* Here is the circle_set_options builtin. */ ++int ++circle_set_options_builtin (list) ++ WORD_LIST *list; ++{ ++ char *word; /* One argument */ ++ int flags = 0; /* Flags to pass to CIRCLE_set_options */ ++ ++ if (list == NULL) ++ flags = CIRCLE_DEFAULT_FLAGS; ++ else ++ while (list != NULL) ++ { ++ word = list->word->word; ++ if (!strcmp (word, "split_random")) ++ flags |= CIRCLE_SPLIT_RANDOM; ++ else if (!strcmp (word, "split_equal")) ++ flags |= CIRCLE_SPLIT_EQUAL; ++ else if (!strcmp (word, "create_global")) ++ flags |= CIRCLE_CREATE_GLOBAL; ++ else ++ { ++ builtin_error (_("invalid flag \"%s\""), word); ++ return (EXECUTION_FAILURE); ++ } ++ list = list->next; ++ } ++ CIRCLE_set_options (flags); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_cb_create ++$FUNCTION circle_cb_create_builtin ++$SHORT_DOC circle_cb_create [func] ++Register a function that will create work when asked. ++ ++Arguments: ++ FUNC User-defined callback function that will invoke ++ circle_enqueue when called ++ ++If FUNC is omitted, no function will be associated with work creation. ++This can be used to nullify a previous circle_cb_create invocation. ++ ++Exit Status: ++Returns 0 unless an invalid function is given or an error occurs. ++$END ++ ++/* Here is the circle_cb_create builtin. */ ++int ++circle_cb_create_builtin (list) ++ WORD_LIST *list; ++{ ++ return find_callback_function (list, &create_func); ++} ++ ++$BUILTIN circle_cb_process ++$FUNCTION circle_cb_process_builtin ++$SHORT_DOC circle_cb_process [func] ++Register a function that will process work when asked. ++ ++Arguments: ++ FUNC User-defined callback function that will invoke ++ circle_enqueue when called ++ ++If FUNC is omitted, no function will be associated with work processing. ++This can be used to nullify a previous circle_cb_process invocation. ++ ++Exit Status: ++Returns 0 unless an invalid function is given or an error occurs. ++$END ++ ++/* Here is the circle_cb_process builtin. */ ++int ++circle_cb_process_builtin (list) ++ WORD_LIST *list; ++{ ++ return find_callback_function (list, &process_func); ++} ++ ++$BUILTIN circle_begin ++$FUNCTION circle_begin_builtin ++$SHORT_DOC circle_begin ++Begin creation and processing of the distributed work queue. ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++ ++/* Here is the circle_begin builtin. */ ++int ++circle_begin_builtin (list) ++ WORD_LIST *list; ++{ ++ no_args (list); ++ CIRCLE_begin (); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_enqueue ++$FUNCTION circle_enqueue_builtin ++$SHORT_DOC circle_enqueue work ++Enqueue work onto the distributed queue. ++ ++Arguments: ++ WORK "Work" as represented by an arbitrary string of limited ++ size (generally around 4KB) ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++ ++/* Here is the circle_enqueue builtin. */ ++int ++circle_enqueue_builtin (list) ++ WORD_LIST *list; ++{ ++ char *work; /* Work to perform */ ++ ++ /* Extract the work argument. */ ++ YES_ARGS (list); ++ work = list->word->word; ++ list = list->next; ++ no_args (list); ++ ++ /* Complain if we're not within a proper callback function. */ ++ if (current_handle == NULL) ++ { ++ builtin_error (_("not within a Libcircle \"create\" or \"process\" callback function")); ++ return EXECUTION_FAILURE; ++ } ++ ++ /* Enqueue the work. */ ++ if (current_handle->enqueue (work) == -1) ++ return EXECUTION_FAILURE; ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_dequeue ++$FUNCTION circle_dequeue_builtin ++$SHORT_DOC circle_dequeue var ++Dequeue work from the distributed queue into a variable. ++ ++Arguments: ++ VAR Variable in which to receive previously enqueued "work" ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++ ++/* Here is the circle_dequeue builtin. */ ++int ++circle_dequeue_builtin (list) ++ WORD_LIST *list; ++{ ++ char *varname; /* Variable in which to store the work string */ ++ char work[CIRCLE_MAX_STRING_LEN+1]; /* Work to perform */ ++ ++ /* Extract the variable-name argument. */ ++ YES_ARGS (list); ++ varname = list->word->word; ++ list = list->next; ++ no_args (list); ++ ++ /* Complain if we're not within a callback function. */ ++ if (current_handle == NULL) ++ { ++ builtin_error (_("not within a Libcircle callback function")); ++ return EXECUTION_FAILURE; ++ } ++ ++ /* Dequeue the work and bind it to the given variable. */ ++ if (current_handle->dequeue (work) == -1) ++ return EXECUTION_FAILURE; ++ bind_variable (varname, work, 0); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_enable_logging ++$FUNCTION circle_enable_logging_builtin ++$SHORT_DOC circle_enable_logging log_level ++Change Libcircle's logging verbosity ++ ++Arguments: ++ LOG_LEVEL "fatal", "error", "warning", "info", or "debug" ++ ++Exit Status: ++Returns 0 unless an invalid option is given. ++$END ++/*'*/ ++ ++/* Here is the circle_enable_logging builtin. */ ++int ++circle_enable_logging_builtin (list) ++ WORD_LIST *list; ++{ ++ char *word; /* One argument */ ++ CIRCLE_loglevel loglevel; /* Level to set */ ++ ++ /* Parse the log level. */ ++ YES_ARGS (list); ++ word = list->word->word; ++ if (!strcmp (word, "fatal")) ++ loglevel = CIRCLE_LOG_FATAL; ++ else if (!strcmp (word, "error")) ++ loglevel = CIRCLE_LOG_ERR; ++ else if (!strcmp (word, "warning")) ++ loglevel = CIRCLE_LOG_WARN; ++ else if (!strcmp (word, "info")) ++ loglevel = CIRCLE_LOG_INFO; ++ else if (!strcmp (word, "debug")) ++ loglevel = CIRCLE_LOG_DBG; ++ else ++ { ++ builtin_error (_("invalid log level \"%s\""), word); ++ return (EXECUTION_FAILURE); ++ } ++ ++ /* Set the log level. */ ++ CIRCLE_enable_logging (loglevel); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_abort ++$FUNCTION circle_abort_builtin ++$SHORT_DOC circle_abort ++Terminate queue processing. ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++ ++/* Here is the circle_abort builtin. */ ++int ++circle_abort_builtin (list) ++ WORD_LIST *list; ++{ ++ no_args (list); ++ CIRCLE_abort (); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_checkpoint ++$FUNCTION circle_checkpoint_builtin ++$SHORT_DOC circle_checkpoint ++Checkpoint a work queue to disk. ++ ++Write a file called circle${circle_rank}.txt containing the current ++queue state of rank ${circle_rank}. On a later run, a worker can ++invoke circle_read_restarts to repopulate its queue from such a ++checkpoint file. ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++/*'*/ ++ ++/* Here is the circle_checkpoint builtin. */ ++int ++circle_checkpoint_builtin (list) ++ WORD_LIST *list; ++{ ++ no_args (list); ++ CIRCLE_checkpoint (); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_read_restarts ++$FUNCTION circle_read_restarts_builtin ++$SHORT_DOC circle_read_restarts ++Repopulate a work queue from a disk checkpoint. ++ ++Read queue contents from a file called circle${circle_rank}.txt, which ++was previously produced by circle_checkpoint. ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++/*'*/ ++ ++/* Here is the circle_read_restarts builtin. */ ++int ++circle_read_restarts_builtin (list) ++ WORD_LIST *list; ++{ ++ no_args (list); ++ CIRCLE_read_restarts (); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN circle_cb_reduce_init ++$FUNCTION circle_cb_reduce_init_builtin ++$SHORT_DOC circle_cb_reduce_init [func] ++Register a function that will initiate a reduction operation. ++ ++Arguments: ++ FUNC User-defined callback function that will invoke ++ circle_reduce when called ++ ++FUNC will be invoked on all ranks. ++ ++If FUNC is omitted, no function will be associated with reduction ++initialization. This can be used to nullify a previous ++circle_cb_reduce_init invocation. ++ ++Exit Status: ++Returns 0 unless an invalid function is given or an error occurs. ++$END ++ ++/* Here is the circle_cb_reduce_init builtin. */ ++int ++circle_cb_reduce_init_builtin (list) ++ WORD_LIST *list; ++{ ++ return find_callback_function (list, &reduce_init_func); ++} ++ ++$BUILTIN circle_cb_reduce_op ++$FUNCTION circle_cb_reduce_op_builtin ++$SHORT_DOC circle_cb_reduce_op [func] ++Register a function that will complete a reduction operation. ++ ++Arguments: ++ FUNC User-defined callback function that will receive ++ two items to reduce and invoke circle_reduce on ++ the reduced value ++ ++If FUNC is omitted, no function will be associated with reduction ++execution. This can be used to nullify a previous circle_cb_reduce_op ++invocation. ++ ++Exit Status: ++Returns 0 unless an invalid function is given or an error occurs. ++$END ++ ++/* Here is the circle_cb_reduce_op builtin. */ ++int ++circle_cb_reduce_op_builtin (list) ++ WORD_LIST *list; ++{ ++ return find_callback_function (list, &reduce_op_func); ++} ++ ++$BUILTIN circle_cb_reduce_fini ++$FUNCTION circle_cb_reduce_fini_builtin ++$SHORT_DOC circle_cb_reduce_fini [func] ++Register a function that will complete a reduction operation. ++ ++Arguments: ++ FUNC User-defined callback function that will receive ++ the final reduced data ++ ++If FUNC is omitted, no function will be associated with reduction ++completion. This can be used to nullify a previous ++circle_cb_reduce_fini invocation. ++ ++Libcircle guarantees that FUNC will be invoked only on rank 0. ++ ++Exit Status: ++Returns 0 unless an invalid function is given or an error occurs. ++$END ++ ++/* Here is the circle_cb_reduce_fini builtin. */ ++int ++circle_cb_reduce_fini_builtin (list) ++ WORD_LIST *list; ++{ ++ return find_callback_function (list, &reduce_fini_func); ++} ++ ++$BUILTIN circle_reduce ++$FUNCTION circle_reduce_builtin ++$SHORT_DOC circle_reduce work ++Seed the next phase of a reduction operation ++ ++Arguments: ++ WORK "Work" as represented by an arbitrary string of limited ++ size (generally around 4KB) ++ ++This function should be called both by the callback function ++registered with circle_reduce_init and the callback function ++registered with circle_reduce_op. ++ ++Exit Status: ++Returns 0 unless an error occurs. ++$END ++ ++/* Here is the circle_reduce builtin. */ ++int ++circle_reduce_builtin (list) ++ WORD_LIST *list; ++{ ++ char *work; /* Work to perform */ ++ ++ /* Extract the work argument. */ ++ YES_ARGS (list); ++ work = list->word->word; ++ list = list->next; ++ no_args (list); ++ ++ /* Complain if we're not within a proper callback function. */ ++ if (!within_reduction) ++ { ++ builtin_error (_("not within a Libcircle \"reduce_init\" or \"reduce_op\" callback function")); ++ return EXECUTION_FAILURE; ++ } ++ ++ /* Reduce the work. */ ++ CIRCLE_reduce (work, strlen (work)); ++ return EXECUTION_SUCCESS; ++} +diff -Naur bash-4.3/builtins/Makefile.in mpibash-4.3/builtins/Makefile.in +--- bash-4.3/builtins/Makefile.in 2012-05-25 07:29:19.000000000 -0600 ++++ mpibash-4.3/builtins/Makefile.in 2014-05-13 11:27:37.314100671 -0600 +@@ -141,7 +141,9 @@ + $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \ + $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \ + $(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \ +- $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def ++ $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def \ ++ $(srcdir)/mpi.def \ ++@CIRCLE@ $(srcdir)/circle.def + + STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \ + getopt.h +@@ -153,7 +155,9 @@ + jobs.o kill.o let.o mapfile.o \ + pushd.o read.o return.o set.o setattr.o shift.o source.o \ + suspend.o test.o times.o trap.o type.o ulimit.o umask.o \ +- wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o ++ wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o \ ++ mpi.o \ ++@CIRCLE@ circle.o + + CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h tmpbuiltins.c \ + tmpbuiltins.h +@@ -317,6 +321,8 @@ + getopts.o: getopts.def + reserved.o: reserved.def + complete.o: complete.def ++@CIRCLE@ circle.o: circle.def ++mpi.o: mpi.def + + # C files + bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h +@@ -644,6 +650,19 @@ + mapfile.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h + mapfile.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/variables.h $(topdir)/conftypes.h + mapfile.o: $(topdir)/arrayfunc.h ../pathnames.h ++@CIRCLE@ circle.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h ++@CIRCLE@ circle.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h ++@CIRCLE@ circle.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ++@CIRCLE@ circle.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h ++@CIRCLE@ circle.o: $(BASHINCDIR)/maxpath.h ../pathnames.h ++mpi.o: ../config.h ../config-top.h ../config-bot.h ../bashintl.h ++mpi.o: ../include/gettext.h ../shell.h ../config.h ../bashjmp.h ++mpi.o: ../include/posixjmp.h ../command.h ../syntax.h ../general.h ++mpi.o: ../bashtypes.h ../include/chartypes.h ../xmalloc.h ../bashansi.h ++mpi.o: ../error.h ../variables.h ../array.h ../assoc.h ../hashlib.h ++mpi.o: ../conftypes.h ../arrayfunc.h ../quit.h ../sig.h ../include/maxpath.h ++mpi.o: ../unwind_prot.h ../dispose_cmd.h ../make_cmd.h ../include/ocache.h ++mpi.o: ../subst.h ../pathnames.h ../externs.h common.h bashgetopt.h + + #bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h + +diff -Naur bash-4.3/builtins/mpi.def mpibash-4.3/builtins/mpi.def +--- bash-4.3/builtins/mpi.def 1969-12-31 17:00:00.000000000 -0700 ++++ mpibash-4.3/builtins/mpi.def 2014-05-13 11:27:37.314100671 -0600 +@@ -0,0 +1,744 @@ ++This file is mpi.def, from which is created mpi.c. ++It implements all of the "mpi_*" builtins in Bash. ++ ++$PRODUCES mpi.c ++ ++#include ++ ++#include ++#if defined (HAVE_UNISTD_H) ++# ifdef _MINIX ++# include ++# endif ++# include ++#endif ++ ++#include "../bashintl.h" ++#include "../shell.h" ++#include "common.h" ++#include "bashgetopt.h" ++#include ++ ++extern int running_trap, trap_saved_exit_value; ++ ++/* Keep track of who we are within MPI_COMM_WORLD. */ ++static int mpi_rank; ++static int mpi_num_ranks; ++ ++/* Try an MPI operation. Return with an error message on failure. */ ++#define MPI_TRY(STMT) \ ++ do \ ++ { \ ++ int mpierr; \ ++ mpierr = STMT; \ ++ if (mpierr != MPI_SUCCESS) \ ++ return report_mpi_error (mpierr); \ ++ } \ ++ while (0) ++ ++/* Return with a usage message if no arguments remain. */ ++#define YES_ARGS(LIST) \ ++ if ((LIST) == 0) \ ++ { \ ++ builtin_usage (); \ ++ return (EX_USAGE); \ ++ } ++ ++/* Return with an error message if a given variable is read-only or if ++ * we can't write to it for any other reason (e.g., it's defined as a ++ * function). */ ++#define REQUIRE_WRITABLE(NAME) \ ++ do \ ++ { \ ++ SHELL_VAR *bindvar = find_shell_variable (NAME); \ ++ if (bindvar) \ ++ { \ ++ if (readonly_p (bindvar)) \ ++ { \ ++ err_readonly (NAME); \ ++ return (EXECUTION_FAILURE); \ ++ } \ ++ if (unbind_variable (NAME) == -1) \ ++ { \ ++ builtin_error ("Failed to write to variable %s", NAME); \ ++ return (EXECUTION_FAILURE); \ ++ } \ ++ } \ ++ } \ ++ while (0) ++ ++/* Initialize MPI. */ ++void ++initialize_mpi (argc, argv) ++ int argc; ++ char **argv; ++{ ++ int init_done; ++ ++ MPI_Initialized (&init_done); ++ if (!init_done) ++ MPI_Init (&argc, &argv); ++ MPI_Errhandler_set (MPI_COMM_WORLD, MPI_ERRORS_RETURN); ++ MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank); ++ MPI_Comm_size (MPI_COMM_WORLD, &mpi_num_ranks); ++} ++ ++/* Finalize MPI. */ ++void ++finalize_mpi () ++{ ++ MPI_Finalize (); ++} ++ ++/* Parse an operation name into an MPI_Op. Return 1 on success, 0 on ++ * failure. */ ++static int ++parse_operation (char *name, MPI_Op *op) ++{ ++ /* Define a mapping from operator names to MPI_Op values. */ ++ typedef struct { ++ char *name; /* Operation name (e.g., "sum") */ ++ MPI_Op value; /* Operation value (e.g., MPI_SUM) */ ++ } opname2value_t; ++ static opname2value_t oplist[] = { ++ {"max", MPI_MAX}, ++ {"min", MPI_MIN}, ++ {"sum", MPI_SUM}, ++ {"prod", MPI_PROD}, ++ {"land", MPI_LAND}, ++ {"band", MPI_BAND}, ++ {"lor", MPI_LOR}, ++ {"bor", MPI_BOR}, ++ {"lxor", MPI_LXOR}, ++ {"bxor", MPI_BXOR}, ++ {"maxloc", MPI_MAXLOC}, ++ {"minloc", MPI_MINLOC} ++ }; ++ size_t i; ++ ++ for (i = 0; i < sizeof(oplist)/sizeof(opname2value_t); i++) ++ if (!strcmp(name, oplist[i].name)) ++ { ++ *op = oplist[i].value; ++ if (i > 0) ++ { ++ /* As a performance optimization, bubble up the value we ++ * just found. */ ++ opname2value_t prev = oplist[i - 1]; ++ oplist[i - 1] = oplist[i]; ++ oplist[i] = prev; ++ } ++ return 1; ++ } ++ return 0; ++} ++ ++/* Report an error to the user and return EXECUTION_FAILURE. */ ++static int ++report_mpi_error (mpierr) ++ int mpierr; ++{ ++ char errstr[MPI_MAX_ERROR_STRING]; ++ int errstrlen; ++ ++ MPI_Error_string (mpierr, errstr, &errstrlen); ++ builtin_error ("%s", errstr); ++ return EXECUTION_FAILURE; ++} ++ ++/* Perform the same operation as bind_variable, but with VALUE being a ++ * number, not a string. */ ++static SHELL_VAR * ++bind_variable_number (name, value, flags) ++ const char *name; ++ long value; ++ int flags; ++{ ++ char numstr[25]; /* String version of VALUE */ ++ ++ sprintf (numstr, "%ld", value); ++ return bind_variable (name, numstr, flags); ++} ++ ++/* Perform the same operation as bind_array_variable, but with VALUE ++ * being a number, not a string. */ ++static SHELL_VAR * ++bind_array_variable_number (name, ind, value, flags) ++ char *name; ++ arrayind_t ind; ++ long value; ++ int flags; ++{ ++ char numstr[25]; /* String version of VALUE */ ++ ++ sprintf (numstr, "%ld", value); ++ return bind_array_variable (name, ind, numstr, flags); ++} ++ ++/* Define a reduction-type function (allreduce, scan, exscan, etc.). */ ++typedef int (*reduction_func_t)(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm); ++ ++/* Perform any reduction-type operation (allreduce, scan, exscan, etc.). */ ++static int ++reduction_like (list, funcname, func) ++ WORD_LIST *list; ++ char *funcname; ++ reduction_func_t func; ++{ ++ char *word; /* One argument */ ++ struct { ++ long int value; /* Reduced value */ ++ int rank; /* Rank associated with the above */ ++ } number, result; ++ MPI_Op operation = MPI_SUM; /* Operation to perform */ ++ char *varname; /* Name of the variable to bind the results to */ ++ intmax_t n; ++ int i; ++ ++ /* Parse "-O OPERATION" (optional), where OPERATION is a reduction ++ * operation. */ ++ YES_ARGS (list); ++ word = list->word->word; ++ if (ISOPTION (word, 'O')) ++ { ++ list = list->next; ++ if (list == 0) ++ { ++ sh_needarg (funcname); ++ return (EX_USAGE); ++ } ++ word = list->word->word; ++ if (!parse_operation (word, &operation)) ++ { ++ sh_invalidopt ("-O"); ++ return (EX_USAGE); ++ } ++ list = list->next; ++ } ++ ++ /* Parse the argument, which must be a number. */ ++ YES_ARGS (list); ++ word = list->word->word; ++ if (!legal_number (word, &n)) ++ { ++ sh_neednumarg (funcname); ++ return (EX_USAGE); ++ } ++ number.value = (long int) n; ++ number.rank = mpi_rank; ++ list = list->next; ++ ++ /* Parse the target variable, which must not be read-only. */ ++ YES_ARGS (list); ++ varname = list->word->word; ++ if (mpi_rank != 0 || func != MPI_Exscan) ++ REQUIRE_WRITABLE (varname); ++ list = list->next; ++ no_args (list); ++ ++ /* Perform the reduction operation. Bind the given array variable ++ * to the result and, for minloc/maxloc, the associated rank. */ ++ if (mpi_rank != 0 || func != MPI_Exscan) { ++ bind_array_variable (varname, 0, "", 0); ++ bind_array_variable (varname, 1, "", 0); ++ } ++ if (operation == MPI_MINLOC || operation == MPI_MAXLOC) ++ { ++ MPI_TRY (func (&number, &result, 1, MPI_LONG_INT, operation, MPI_COMM_WORLD)); ++ if (mpi_rank != 0 || func != MPI_Exscan) ++ bind_array_variable_number (varname, 1, result.rank, 0); ++ } ++ else ++ MPI_TRY (func (&number.value, &result.value, 1, MPI_LONG, operation, MPI_COMM_WORLD)); ++ if (mpi_rank != 0 || func != MPI_Exscan) ++ bind_array_variable_number (varname, 0, result.value, 0); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN mpi_comm_rank ++$FUNCTION mpi_comm_rank_builtin ++$SHORT_DOC mpi_comm_rank name ++Return the process's rank in the MPI job. ++ ++Arguments: ++ NAME Scalar variable in which to receive the rank ++ ++Exit Status: ++Returns 0 unless an invalid option is given. ++$END ++/*'*/ ++ ++/* Here is the mpi_comm_rank builtin. */ ++int ++mpi_comm_rank_builtin (list) ++ WORD_LIST *list; ++{ ++ char *varname; /* Name of the variable to bind the results to */ ++ ++ YES_ARGS (list); ++ varname = list->word->word; ++ REQUIRE_WRITABLE (varname); ++ list = list->next; ++ no_args (list); ++ bind_variable_number (varname, mpi_rank, 0); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN mpi_comm_size ++$FUNCTION mpi_comm_size_builtin ++$SHORT_DOC mpi_comm_size name ++Return the total number of ranks in the MPI job. ++ ++Arguments: ++ NAME Scalar variable in which to receive the number of ranks ++ ++Exit Status: ++Returns 0 unless an invalid option is given. ++$END ++ ++/* Here is the mpi_comm_size builtin. */ ++int ++mpi_comm_size_builtin (list) ++ WORD_LIST *list; ++{ ++ char *varname; /* Name of the variable to bind the results to */ ++ ++ YES_ARGS (list); ++ varname = list->word->word; ++ REQUIRE_WRITABLE (varname); ++ list = list->next; ++ no_args (list); ++ bind_variable_number (varname, mpi_num_ranks, 0); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN mpi_abort ++$FUNCTION mpi_abort_builtin ++$SHORT_DOC mpi_abort [n] ++Abort all processes in the MPI job and exit the shell. ++ ++Exits not only the caller's shell (with a status of N) but also all ++remote shells that are part of the same MPI job. If N is omitted, the ++exit status is that of the last command executed. ++ ++This command should be used only in extreme circumstances. It is ++better for each process to exit normally on its own. ++$END ++/*'*/ ++ ++/* Here is the mpi_abort builtin. */ ++int ++mpi_abort_builtin (list) ++ WORD_LIST *list; ++{ ++ int exit_value; ++ ++ exit_value = (running_trap == 1 && list == 0) ? trap_saved_exit_value : get_exitstat (list); /* Copied from exit.def */ ++ MPI_TRY (MPI_Abort (MPI_COMM_WORLD, exit_value)); ++ return EXECUTION_FAILURE; ++} ++ ++$BUILTIN mpi_send ++$FUNCTION mpi_send_builtin ++$SHORT_DOC mpi_send [-t tag] rank message ++Send a message to a remote process in the same MPI job. ++ ++Options: ++ -t TAG Send the message using tag TAG (default: 0). TAG must ++ be a nonnegative integer. ++ ++Arguments: ++ RANK Whom to send the message to. RANK must be an integer in ++ the range [0, $(mpi_comm_size)-1]. ++ ++ MESSAGE String to send to rank RANK. ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_send builtin. */ ++int ++mpi_send_builtin (list) ++ WORD_LIST *list; ++{ ++ char *word; /* One argument */ ++ intmax_t target_rank; /* MPI target rank */ ++ char *message; /* Message to send to rank target_rank */ ++ intmax_t tag = 0; /* Message tag to use */ ++ ++ /* Parse "-t TAG" (optional), where TAG is a number or "any". */ ++ YES_ARGS (list); ++ word = list->word->word; ++ if (ISOPTION (word, 't')) ++ { ++ list = list->next; ++ if (list == 0) ++ { ++ sh_needarg ("mpi_recv"); ++ return (EX_USAGE); ++ } ++ word = list->word->word; ++ if (!legal_number (word, &tag)) ++ { ++ sh_neednumarg ("-t"); ++ return (EX_USAGE); ++ } ++ list = list->next; ++ } ++ else if (*word == '-') ++ { ++ sh_invalidopt (word); ++ builtin_usage (); ++ return (EX_USAGE); ++ } ++ ++ /* Parse the target rank, which must be a number. */ ++ YES_ARGS (list); ++ word = list->word->word; ++ if (!legal_number (word, &target_rank)) ++ { ++ builtin_error (_("mpi_send: numeric rank required")); ++ return (EX_USAGE); ++ } ++ list = list->next; ++ ++ /* Parse the message to send. */ ++ YES_ARGS (list); ++ message = list->word->word; ++ list = list->next; ++ no_args (list); ++ ++ /* Send the message. */ ++ MPI_TRY (MPI_Send (message, strlen(message)+1, MPI_BYTE, (int)target_rank, (int)tag, MPI_COMM_WORLD)); ++ return EXECUTION_SUCCESS; ++} ++ ++ ++$BUILTIN mpi_recv ++$FUNCTION mpi_recv_builtin ++$SHORT_DOC mpi_recv [-t tag] rank name ++Receive a message from a remote process in the same MPI job. ++ ++Options: ++ -t TAG Receive only messages sent using tag TAG (default: 0). ++ TAG must be either a nonnegative integer or the string ++ "any" to receive messages sent using any tag. ++ ++Arguments: ++ RANK Receive only messages sent from sender RANK. RANK ++ must either be in the range [0, $(mpi_comm_size)-1] or ++ be the string "any" to receive messages from any sender. ++ ++ NAME Array variable in which to receive the message, sender ++ rank, and tag. ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_recv builtin. */ ++int ++mpi_recv_builtin (list) ++ WORD_LIST *list; ++{ ++ char *word; /* One argument */ ++ intmax_t source_rank; /* MPI source rank */ ++ char *endptr; /* Used for parsing strings into numbers */ ++ MPI_Status status; /* Status of an MPI operation */ ++ int count; /* Message length in bytes */ ++ intmax_t tag = 0; /* Message tag to use */ ++ char *varname; /* Name of the variable to bind the results to */ ++ static char *message = NULL; /* Message received from MPI */ ++ static size_t alloced = 0; /* Number of bytes allocated for the above */ ++ int opt; /* Parsed option */ ++ ++ /* Parse any options provided. */ ++ reset_internal_getopt (); ++ while ((opt = internal_getopt (list, "t:")) != -1) ++ { ++ switch (opt) ++ { ++ case 't': ++ if (!strcmp (list_optarg, "any")) ++ tag = MPI_ANY_TAG; ++ else if (!legal_number (list_optarg, &tag)) ++ { ++ builtin_error (_("-t: numeric argument or \"any\" required")); ++ return (EX_USAGE); ++ } ++ break; ++ ++ default: ++ sh_invalidopt (word); ++ builtin_usage (); ++ return (EX_USAGE); ++ } ++ } ++ list = loptend; ++ ++ /* Parse the source rank, which must be a number or "any". */ ++ YES_ARGS (list); ++ word = list->word->word; ++ if (!legal_number (word, &source_rank)) ++ { ++ if (!strcmp (word, "any")) ++ source_rank = MPI_ANY_SOURCE; ++ else ++ { ++ builtin_error (_("mpi_recv: numeric rank or \"any\" required")); ++ return (EX_USAGE); ++ } ++ } ++ list = list->next; ++ ++ /* Parse the target variable, which must not be read-only. */ ++ YES_ARGS (list); ++ varname = list->word->word; ++ REQUIRE_WRITABLE (varname); ++ list = list->next; ++ no_args (list); ++ ++ /* Receive a message. Because we don't know long the message will ++ * be, we first probe to get the length. */ ++ MPI_TRY (MPI_Probe ((int)source_rank, (int)tag, MPI_COMM_WORLD, &status)); ++ MPI_TRY (MPI_Get_count (&status, MPI_BYTE, &count)); ++ if (alloced < count) ++ { ++ message = xrealloc (message, count); ++ alloced = count; ++ } ++ MPI_TRY (MPI_Recv (message, count, MPI_BYTE, status.MPI_SOURCE, status.MPI_TAG, MPI_COMM_WORLD, &status)); ++ bind_array_variable (varname, 0, message, 0); ++ bind_array_variable_number (varname, 1, status.MPI_SOURCE, 0); ++ bind_array_variable_number (varname, 2, status.MPI_TAG, 0); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN mpi_barrier ++$FUNCTION mpi_barrier_builtin ++$SHORT_DOC mpi_barrier ++Synchronizes all of the processes in the MPI job. ++ ++No process will return from mpi_barrier until all processes have ++called mpi_barrier. ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_barrier builtin. */ ++int ++mpi_barrier_builtin (list) ++ WORD_LIST *list; ++{ ++ no_args (list); ++ MPI_TRY (MPI_Barrier (MPI_COMM_WORLD)); ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN mpi_bcast ++$FUNCTION mpi_bcast_builtin ++$SHORT_DOC mpi_bcast [message] name ++Broadcast a message to all processes in the same MPI job. ++ ++Arguments: ++ MESSAGE String to broadcast from one process to all the others. ++ ++ NAME Scalar variable in which to receive the broadcast message. ++ ++Exactly one process in the MPI job must specify a message to ++broadcast. No process will return from mpi_bcast until all processes ++have called mpi_bcast. ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_bcast builtin. */ ++int ++mpi_bcast_builtin (list) ++ WORD_LIST *list; ++{ ++ char *word; /* One argument */ ++ int root; /* MPI root rank */ ++ char *root_message; /* Message to broadcast */ ++ int msglen; /* Length in bytes of the above (including the NULL byte) */ ++ char *varname; /* Name of the variable to bind the results to */ ++ static int *all_lengths = NULL; /* List of every rank's msglen */ ++ static char *message = NULL; /* Message received from the root */ ++ static int alloced = 0; /* Bytes allocated for the above */ ++ int i; ++ ++ /* Parse the optional message and target variable, which must not be ++ * read-only. */ ++ YES_ARGS (list); ++ if (list->next == NULL) ++ { ++ /* Non-root */ ++ root_message = NULL; ++ msglen = -1; ++ } ++ else ++ { ++ /* Root */ ++ root_message = list->word->word; ++ msglen = (int) strlen(root_message) + 1; ++ list = list->next; ++ } ++ varname = list->word->word; ++ REQUIRE_WRITABLE (varname); ++ list = list->next; ++ no_args (list); ++ ++ /* Acquire global agreement on the root and the message size. */ ++ if (all_lengths == NULL) ++ all_lengths = xmalloc (mpi_num_ranks*sizeof(int)); ++ MPI_TRY (MPI_Allgather (&msglen, 1, MPI_INT, all_lengths, 1, MPI_INT, MPI_COMM_WORLD)); ++ root = -1; ++ for (i = 0; i < mpi_num_ranks; i++) ++ { ++ if (all_lengths[i] == -1) ++ continue; ++ if (root != -1) ++ { ++ builtin_error (_("mpi_bcast: more than one process specified a message")); ++ return (EXECUTION_FAILURE); ++ } ++ root = i; ++ msglen = all_lengths[i]; ++ } ++ if (root == -1) ++ { ++ builtin_error (_("mpi_bcast: no process specified a message")); ++ return (EXECUTION_FAILURE); ++ } ++ ++ /* Broadcast the message. */ ++ if (mpi_rank == root) ++ { ++ MPI_TRY (MPI_Bcast (root_message, msglen, MPI_BYTE, root, MPI_COMM_WORLD)); ++ bind_variable (varname, root_message, 0); ++ } ++ else ++ { ++ if (alloced < msglen) ++ { ++ message = xrealloc (message, msglen); ++ alloced = msglen; ++ } ++ MPI_TRY (MPI_Bcast (message, msglen, MPI_BYTE, root, MPI_COMM_WORLD)); ++ bind_variable (varname, message, 0); ++ } ++ return EXECUTION_SUCCESS; ++} ++ ++$BUILTIN mpi_scan ++$FUNCTION mpi_scan_builtin ++$SHORT_DOC mpi_scan number name ++Perform an inclusive scan across all processes in the same MPI job. ++ ++ -O OPERATION Operation to perform. Must be one of "max", "min", ++ "sum", "prod", "land", "band", "lor", "bor", "lxor", ++ "bxor", "maxloc", or "minloc" (default: "sum"). ++ ++Arguments: ++ NUMBER Integer to use in the scan operation. ++ ++ NAME Array variable in which to receive the result and, in ++ the case of maxloc and minloc, the associated rank. ++ ++In an inclusive-scan operation, each process i presents a number, ++a[i]. Once all processes in the MPI job have presented their number, ++the command returns a[0] to rank 0, a[0]+a[1] to rank 1, ++a[0]+a[1]+a[2] to rank 2, and so forth. The -O option enables "+" to ++be replaced with other operations. ++ ++Inclusive scans can be useful for assigning a unique index to each ++process in the MPI job. ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_scan builtin. */ ++int ++mpi_scan_builtin (list) ++ WORD_LIST *list; ++{ ++ return reduction_like (list, "mpi_scan", MPI_Scan); ++} ++ ++$BUILTIN mpi_exscan ++$FUNCTION mpi_exscan_builtin ++$SHORT_DOC mpi_exscan number name ++Perform an exclusive scan across all processes in the same MPI job. ++ ++ -O OPERATION Operation to perform. Must be one of "max", "min", ++ "sum", "prod", "land", "band", "lor", "bor", "lxor", ++ "bxor", "maxloc", or "minloc" (default: "sum"). ++ ++Arguments: ++ NUMBER Integer to use in the scan operation. ++ ++ NAME Array variable in which to receive the result and, in ++ the case of maxloc and minloc, the associated rank. ++ ++In a exclusive-scan operation, each process i presents a number, a[i]. ++Once all processes in the MPI job have presented their number, the ++command assigns a[0] to NAME on rank 1, a[0]+a[1] to NAME on rank 2, ++a[0]+a[1]+a[2] to NAME on rank 3, and so forth. No assignment is ++performed on rank 0. The -O option enables "+" to be replaced with ++other operations. ++ ++Exclusive scans can be useful for assigning a unique index to each ++process in the MPI job. ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_exscan builtin. */ ++int ++mpi_exscan_builtin (list) ++ WORD_LIST *list; ++{ ++ return reduction_like (list, "mpi_exscan", MPI_Exscan); ++} ++ ++$BUILTIN mpi_allreduce ++$FUNCTION mpi_allreduce_builtin ++$SHORT_DOC mpi_allreduce number name ++Reduce numbers from all processes in an MPI job to a single number. ++ ++Options: ++ ++ -O OPERATION Operation to perform. Must be one of "max", "min", ++ "sum", "prod", "land", "band", "lor", "bor", "lxor", ++ "bxor", "maxloc", or "minloc" (default: "sum"). ++ ++Arguments: ++ NUMBER Integer to use in the allreduce operation. ++ ++ NAME Array variable in which to receive the result and, in ++ the case of maxloc and minloc, the associated rank. ++ ++In an all-reduce operation, each process i presents a number, a[i]. ++Once all processes in the MPI job have presented their number, the ++command returns a[0]+a[1]+...+a[n-1] to all ranks. The -O option ++enables "+" to be replaced with other operations. ++ ++All-reduces can be useful for reaching global agreement (e.g., of a ++termination condition). ++ ++Exit Status: ++Returns 0 unless an invalid option is given or an error occurs. ++$END ++ ++/* Here is the mpi_allreduce builtin. */ ++int ++mpi_allreduce_builtin (list) ++ WORD_LIST *list; ++{ ++ return reduction_like (list, "mpi_allreduce", MPI_Allreduce); ++} +diff -Naur bash-4.3/config.h.in mpibash-4.3/config.h.in +--- bash-4.3/config.h.in 2013-06-29 15:35:33.000000000 -0600 ++++ mpibash-4.3/config.h.in 2014-05-13 11:27:37.314100671 -0600 +@@ -1147,6 +1147,12 @@ + /* Define if you have the `__argz_stringify' function. */ + #undef HAVE___ARGZ_STRINGIFY + ++/* Define if you have both the header file and the libcircle library. */ ++#undef HAVE_LIBCIRCLE ++ ++/* Define if you have the `CIRCLE_cb_reduce_op' function. */ ++#undef HAVE_CIRCLE_CB_REDUCE_OP ++ + /* End additions for lib/intl */ + + #include "config-bot.h" +diff -Naur bash-4.3/configure.ac mpibash-4.3/configure.ac +--- bash-4.3/configure.ac 2014-02-11 08:37:53.000000000 -0700 ++++ mpibash-4.3/configure.ac 2014-05-13 11:27:37.302100179 -0600 +@@ -24,7 +24,7 @@ + AC_REVISION([for Bash 4.3, version 4.063])dnl + + define(bashvers, 4.3) +-define(relstatus, release) ++define(relstatus, MPI) + + AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org]) + +@@ -813,6 +813,21 @@ + fi + ]) + ++dnl Ensure that we can find an MPI library. ++AC_CHECK_FUNCS([MPI_Init], [], [ ++ AC_MSG_ERROR([Cannot continue without MPI. Consider specifying CC=mpicc.])]) ++ ++dnl If we have Libcircle, use it, too. ++AC_SEARCH_LIBS([CIRCLE_cb_create], [circle], [AC_CHECK_HEADERS([libcircle.h])]) ++if test "x$ac_cv_header_libcircle_h" = xyes; then ++ libcircle_make_prefix="" ++ AC_DEFINE([HAVE_LIBCIRCLE], [1], [Define if you have the Libcircle header and library.]) ++ AC_CHECK_FUNCS([CIRCLE_cb_reduce_op]) ++else ++ libcircle_make_prefix="#" ++fi ++AC_SUBST([CIRCLE], [$libcircle_make_prefix]) ++ + BASH_CHECK_DECL(strtoimax) + BASH_CHECK_DECL(strtol) + BASH_CHECK_DECL(strtoll) +diff -Naur bash-4.3/Makefile.in mpibash-4.3/Makefile.in +--- bash-4.3/Makefile.in 2014-01-25 14:27:30.000000000 -0700 ++++ mpibash-4.3/Makefile.in 2014-05-13 11:27:37.314100671 -0600 +@@ -104,7 +104,7 @@ + VERSPROG = bashversion$(EXEEXT) + VERSOBJ = bashversion.$(OBJEXT) + +-Program = bash$(EXEEXT) ++Program = mpibash$(EXEEXT) + Version = @BASHVERS@ + PatchLevel = `$(BUILD_DIR)/$(VERSPROG) -p` + RELSTATUS = @RELSTATUS@ +diff -Naur bash-4.3/shell.c mpibash-4.3/shell.c +--- bash-4.3/shell.c 2014-01-14 06:04:32.000000000 -0700 ++++ mpibash-4.3/shell.c 2014-05-13 11:27:37.314100671 -0600 +@@ -107,6 +107,13 @@ + extern char *primary_prompt, *secondary_prompt; + extern char *this_command_name; + ++extern void initialize_mpi __P((int, char **)); ++extern void finalize_mpi __P((void)); ++#ifdef HAVE_LIBCIRCLE ++extern void initialize_libcircle __P((int, char **)); ++extern void finalize_libcircle __P((void)); ++#endif ++ + /* Non-zero means that this shell has already been run; i.e. you should + call shell_reinitialize () if you need to start afresh. */ + int shell_initialized = 0; +@@ -324,7 +331,7 @@ + static void init_interactive_script __P((void)); + + static void set_shell_name __P((char *)); +-static void shell_initialize __P((void)); ++static void shell_initialize __P((int, char **)); + static void shell_reinitialize __P((void)); + + static void show_shell_usage __P((FILE *, int)); +@@ -561,7 +568,7 @@ + + /* From here on in, the shell must be a normal functioning shell. + Variables from the environment are expected to be set, etc. */ +- shell_initialize (); ++ shell_initialize (argc, argv); + + set_default_lang (); + set_default_locale_vars (); +@@ -941,6 +948,12 @@ + end_job_control (); + #endif /* JOB_CONTROL */ + ++#ifdef HAVE_LIBCIRCLE ++ finalize_libcircle (); ++#else ++ finalize_mpi (); ++#endif ++ + /* Always return the exit status of the last command to our parent. */ + sh_exit (s); + } +@@ -1691,7 +1704,9 @@ + /* Do whatever is necessary to initialize the shell. + Put new initializations in here. */ + static void +-shell_initialize () ++shell_initialize (argc, argv) ++ int argc; ++ char **argv; + { + char hostname[256]; + +@@ -1760,6 +1775,17 @@ + initialize_shell_options (privileged_mode||running_setuid); + initialize_bashopts (privileged_mode||running_setuid); + #endif ++ ++ /* Initialize Libcircle and MPI. */ ++#ifdef HAVE_LIBCIRCLE ++ initialize_libcircle (argc, argv); ++ initialize_mpi (argc, argv); ++ bind_variable ("libcircle", "yes", 0); ++#else ++ initialize_mpi (argc, argv); ++ bind_variable ("libcircle", "no", 0); ++#endif ++ bind_variable ("mpibash", "yes", 0); + } + + /* Function called by main () when it appears that the shell has already diff --git a/var/spack/repos/builtin/packages/mpibash/package.py b/var/spack/repos/builtin/packages/mpibash/package.py new file mode 100644 index 0000000000..d0f6dafed6 --- /dev/null +++ b/var/spack/repos/builtin/packages/mpibash/package.py @@ -0,0 +1,32 @@ +import os +from spack import * + +class Mpibash(Package): + """Parallel scripting right from the Bourne-Again Shell (Bash)""" + homepage = "http://www.ccs3.lanl.gov/~pakin/software/mpibash-4.3.html" + + version('4.3', '81348932d5da294953e15d4814c74dd1', + url="http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz") + + # patch -p1 < ../mpibash-4.3.patch + patch('mpibash-4.3.patch', level=1, when='@4.3') + + # above patch modifies configure.ac + depends_on('autoconf') + + # uses MPI_Exscan which is in MPI-1.2 and later + depends_on('mpi@1.2:') + + depends_on('libcircle') + + def install(self, spec, prefix): + # run autoconf to rebuild configure + autoconf = which('autoconf') + autoconf() + + configure("--prefix=" + prefix, + "CC=mpicc") + + make(parallel=False) + + make("install") diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py new file mode 100644 index 0000000000..d48bf878f6 --- /dev/null +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -0,0 +1,92 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with 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 Mpich(Package): + """MPICH is a high performance and widely portable implementation of + the Message Passing Interface (MPI) standard.""" + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" + list_depth = 2 + + version('3.1.4', '2ab544607986486562e076b83937bba2') + version('3.1.3', '93cb17f91ac758cbf9174ecb03563778') + version('3.1.2', '7fbf4b81dcb74b07ae85939d1ceee7f1') + version('3.1.1', '40dc408b1e03cc36d80209baaa2d32b7') + version('3.1', '5643dd176499bfb7d25079aaff25f2ec') + version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') + + provides('mpi@:3.0', when='@3:') + provides('mpi@:1.3', when='@1:') + + def setup_dependent_environment(self, module, spec, dep_spec): + """For dependencies, make mpicc's use spack wrapper.""" + os.environ['MPICH_CC'] = 'cc' + os.environ['MPICH_CXX'] = 'c++' + os.environ['MPICH_F77'] = 'f77' + os.environ['MPICH_F90'] = 'f90' + + + def install(self, spec, prefix): + config_args = ["--prefix=" + prefix, + "--enable-shared"] + + # TODO: Spack should make it so that you can't actually find + # these compilers if they're "disabled" for the current + # compiler configuration. + if not self.compiler.f77: + config_args.append("--disable-f77") + + if not self.compiler.fc: + config_args.append("--disable-fc") + + configure(*config_args) + make() + make("install") + + self.filter_compilers() + + + def filter_compilers(self): + """Run after install to make the MPI compilers use the + compilers that Spack built the package with. + + If this isn't done, they'll have CC, CXX, F77, and FC set + to Spack's generic cc, c++, f77, and f90. We want them to + be bound to whatever compiler they were built with. + """ + bin = self.prefix.bin + mpicc = os.path.join(bin, 'mpicc') + mpicxx = os.path.join(bin, 'mpicxx') + mpif77 = os.path.join(bin, 'mpif77') + mpif90 = os.path.join(bin, 'mpif90') + + kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } + filter_file('CC="cc"', 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) + filter_file('CXX="c++"', 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) + filter_file('F77="f77"', 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) + filter_file('FC="f90"', 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) diff --git a/var/spack/repos/builtin/packages/mpileaks/package.py b/var/spack/repos/builtin/packages/mpileaks/package.py new file mode 100644 index 0000000000..4ef866588c --- /dev/null +++ b/var/spack/repos/builtin/packages/mpileaks/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Mpileaks(Package): + """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" + + homepage = "https://github.com/hpc/mpileaks" + url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz" + + version('1.0', '8838c574b39202a57d7c2d68692718aa') + + depends_on("mpi") + depends_on("adept-utils") + depends_on("callpath") + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--with-adept-utils=" + spec['adept-utils'].prefix, + "--with-callpath=" + spec['callpath'].prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py new file mode 100644 index 0000000000..6e9766f275 --- /dev/null +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Mrnet(Package): + """The MRNet Multi-Cast Reduction Network.""" + homepage = "http://paradyn.org/mrnet" + url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz" + + version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') + version('4.1.0', '5a248298b395b329e2371bf25366115c') + + parallel = False + + depends_on("boost") + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix, "--enable-shared") + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/munge/package.py b/var/spack/repos/builtin/packages/munge/package.py new file mode 100644 index 0000000000..c737ca0354 --- /dev/null +++ b/var/spack/repos/builtin/packages/munge/package.py @@ -0,0 +1,20 @@ +from spack import * +import os + +class Munge(Package): + """ MUNGE Uid 'N' Gid Emporium """ + homepage = "https://code.google.com/p/munge/" + url = "https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2" + + version('0.5.11', 'bd8fca8d5f4c1fcbef1816482d49ee01', url='https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2') + + depends_on('openssl') + depends_on('libgcrypt') + + def install(self, spec, prefix): + os.makedirs(os.path.join(prefix, "lib/systemd/system")) + configure("--prefix=%s" % prefix) + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/muster/package.py b/var/spack/repos/builtin/packages/muster/package.py new file mode 100644 index 0000000000..722daf3d7f --- /dev/null +++ b/var/spack/repos/builtin/packages/muster/package.py @@ -0,0 +1,22 @@ +from spack import * + +class Muster(Package): + """The Muster library provides implementations of sequential and + parallel K-Medoids clustering algorithms. It is intended as a + general framework for parallel cluster analysis, particularly + for performance data analysis on systems with very large + numbers of processes. + """ + homepage = "https://github.com/scalability-llnl/muster" + url = "https://github.com/scalability-llnl/muster/archive/v1.0.tar.gz" + + version('1.0.1', 'd709787db7e080447afb6571ac17723c') + version('1.0', '2eec6979a4a36d3a65a792d12969be16') + + depends_on("boost") + depends_on("mpi") + + def install(self, spec, prefix): + cmake(".", *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch b/var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch new file mode 100644 index 0000000000..ff85845cf8 --- /dev/null +++ b/var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch @@ -0,0 +1,11 @@ +--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 ++++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 +@@ -8,7 +8,7 @@ + * Copyright (C) 2008 Sun Microsystems, Lustre group + */ + +-#define _XOPEN_SOURCE 600 ++//#define _XOPEN_SOURCE 600 + #include + #include + #include "ad_lustre.h" diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py new file mode 100644 index 0000000000..ca0b1287c1 --- /dev/null +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -0,0 +1,104 @@ +import os +from spack import * + +class Mvapich2(Package): + """mvapich2 is an MPI implmenetation for infiniband networks.""" + homepage = "http://mvapich.cse.ohio-state.edu/" + + version('1.9', '5dc58ed08fd3142c260b70fe297e127c', + url="http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz") + patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') + + version('2.0', '9fbb68a4111a8b6338e476dc657388b4', + url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz') + + provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2 + provides('mpi@:3.0', when='@2.0') # MVAPICH2-2.0 supports MPI 3.0 + + + def install(self, spec, prefix): + # we'll set different configure flags depending on our environment + configure_args = [] + + # TODO: The MPICH*_FLAGS have a different name for 1.9 + + if '+debug' in spec: + # set configure flags for debug build + configure_args.append("--disable-fast") + configure_args.append("--enable-g=dbg") + configure_args.append("--enable-error-checking=runtime") + configure_args.append("--enable-error-messages=all") + configure_args.append("--enable-nmpi-as-mpi") + + if "%gnu" in spec: + # set variables for GNU compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O0" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0" + os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fno-second-underscore" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fno-second-underscore" + elif "%intel" in spec: + # set variables for Inel compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O0" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0" + os.environ['MPICHLIB_FFLAGS'] = "-g -O0" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O0" + elif "%pgi" in spec: + # set variables for PGI compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O0 -fPIC" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0 -fPIC" + os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fPIC" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fPIC" + + else: + # set configure flags for normal optimizations + configure_args.append("--enable-fast=all") + configure_args.append("--enable-g=dbg") + configure_args.append("--enable-nmpi-as-mpi") + + if "%gnu" in spec: + # set variables for what compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O2" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2" + os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fno-second-underscore" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fno-second-underscore" + elif "%intel" in spec: + # set variables for Inel compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O2" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2" + os.environ['MPICHLIB_FFLAGS'] = "-g -O2" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O2" + elif "%pgi" in spec: + # set variables for PGI compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O2 -fPIC" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2 -fPIC" + os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fPIC" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fPIC" + + # determine network type by variant + if "+psm" in spec: + # throw this flag on QLogic systems to use PSM + configure_args.append("--with-device=ch3:psm") + else: + # throw this flag on IB systems + configure_args.append("--with-device=ch3:mrail", "--with-rdma=gen2") + + # TODO: shared-memory build + + # TODO: CUDA + + # TODO: other file systems like panasis + + configure( + "--prefix=" + prefix, + "--enable-f77", "--enable-fc", "--enable-cxx", + "--enable-shared", "--enable-sharedlibs=gcc", + "--enable-debuginfo", + "--with-pm=no", "--with-pmi=slurm", + "--enable-romio", "--with-file-system=lustre+nfs+ufs", + "--disable-mpe", "--without-mpe", + "--disable-silent-rules", + *configure_args) + + make() + + make("install") diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py new file mode 100644 index 0000000000..933b6a62c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Nasm(Package): + """NASM (Netwide Assembler) is an 80x86 assembler designed for + portability and modularity. It includes a disassembler as well.""" + homepage = "http://www.nasm.us" + url = "http://www.nasm.us/pub/nasm/releasebuilds/2.11.06/nasm-2.11.06.tar.xz" + + version('2.11.06', '2b958e9f5d200641e6fc9564977aecc5') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/ncdu/package.py b/var/spack/repos/builtin/packages/ncdu/package.py new file mode 100644 index 0000000000..234f9730d6 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncdu/package.py @@ -0,0 +1,28 @@ +from spack import * + +class Ncdu(Package): + """ + Ncdu is a disk usage analyzer with an ncurses interface. It is designed + to find space hogs on a remote server where you don't have an entire + gaphical setup available, but it is a useful tool even on regular desktop + systems. Ncdu aims to be fast, simple and easy to use, and should be able + to run in any minimal POSIX-like environment with ncurses installed. + """ + + homepage = "http://dev.yorhel.nl/ncdu" + url = "http://dev.yorhel.nl/download/ncdu-1.11.tar.gz" + + version('1.11', '9e44240a5356b029f05f0e70a63c4d12') + version('1.10', '7535decc8d54eca811493e82d4bfab2d') + version('1.9' , '93258079db897d28bb8890e2db89b1fb') + version('1.8' , '94d7a821f8a0d7ba8ef3dd926226f7d5') + version('1.7' , '172047c29d232724cc62e773e82e592a') + + depends_on("ncurses") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--with-ncurses=%s' % spec['ncurses']) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py new file mode 100644 index 0000000000..cc180bbae1 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -0,0 +1,33 @@ +from spack import * + +class Ncurses(Package): + """The ncurses (new curses) library is a free software emulation of curses + in System V Release 4.0, and more. It uses terminfo format, supports pads and + color and multiple highlights and forms characters and function-key mapping, + and has all the other SYSV-curses enhancements over BSD curses. + """ + + homepage = "http://invisible-island.net/ncurses/ncurses.html" + + version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1', + url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz') + version('6.0', 'ee13d052e1ead260d7c28071f46eefb1', + url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-shared", + "--enable-widec", + "--disable-pc-files", + "--without-ada") + make() + make("install") + + configure("--prefix=%s" % prefix, + "--with-shared", + "--disable-widec", + "--disable-pc-files", + "--without-ada") + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch b/var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch new file mode 100644 index 0000000000..46dda5fc9d --- /dev/null +++ b/var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch @@ -0,0 +1,25 @@ +diff -Nur netcdf-4.3.3/CMakeLists.txt netcdf-4.3.3.mpi/CMakeLists.txt +--- netcdf-4.3.3/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500 ++++ netcdf-4.3.3.mpi/CMakeLists.txt 2015-10-14 16:44:41.176300658 -0400 +@@ -753,6 +753,7 @@ + SET(USE_PARALLEL OFF CACHE BOOL "") + MESSAGE(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.") + ELSE() ++ FIND_PACKAGE(MPI REQUIRED) + SET(USE_PARALLEL ON CACHE BOOL "") + SET(STATUS_PARALLEL "ON") + ENDIF() +diff -Nur netcdf-4.3.3/liblib/CMakeLists.txt netcdf-4.3.3.mpi/liblib/CMakeLists.txt +--- netcdf-4.3.3/liblib/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500 ++++ netcdf-4.3.3.mpi/liblib/CMakeLists.txt 2015-10-14 16:44:57.757793634 -0400 +@@ -71,6 +71,10 @@ + SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY}) + ENDIF() + ++IF(USE_PARALLEL) ++ SET(TLL_LIBS ${TLL_LIBS} ${MPI_C_LIBRARIES}) ++ENDIF() ++ + IF(USE_HDF4) + SET(TLL_LIBS ${TLL_LIBS} ${HDF4_LIBRARIES}) + ENDIF() diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py new file mode 100644 index 0000000000..e1e0d836c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -0,0 +1,27 @@ +from spack import * + +class Netcdf(Package): + """NetCDF is a set of software libraries and self-describing, machine-independent + data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + + homepage = "http://www.unidata.ucar.edu/software/netcdf/" + url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz" + + version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') + + patch('netcdf-4.3.3-mpi.patch') + + # Dependencies: + # >HDF5 + depends_on("hdf5") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', + "-DCMAKE_INSTALL_PREFIX:PATH=%s" % prefix, + "-DENABLE_DAP:BOOL=OFF", # Disable DAP. + "-DBUILD_SHARED_LIBS:BOOL=OFF") # Don't build shared libraries (use static libs). + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/netgauge/package.py b/var/spack/repos/builtin/packages/netgauge/package.py new file mode 100644 index 0000000000..c2378b0718 --- /dev/null +++ b/var/spack/repos/builtin/packages/netgauge/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Netgauge(Package): + """Netgauge is a high-precision network parameter measurement + tool. It supports benchmarking of many different network protocols + and communication patterns. The main focus lies on accuracy, + statistical analysis and easy extensibility. + """ + homepage = "http://unixer.de/research/netgauge/" + url = "http://unixer.de/research/netgauge/netgauge-2.4.6.tar.gz" + + version('2.4.6', 'e0e040ec6452e93ca21ccc54deac1d7f') + + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/netlib-blas/package.py b/var/spack/repos/builtin/packages/netlib-blas/package.py new file mode 100644 index 0000000000..85e97323d3 --- /dev/null +++ b/var/spack/repos/builtin/packages/netlib-blas/package.py @@ -0,0 +1,46 @@ +from spack import * +import os + + +class NetlibBlas(Package): + """Netlib reference BLAS""" + homepage = "http://www.netlib.org/lapack/" + url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + + version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') + + variant('fpic', default=False, description="Build with -fpic compiler option") + + # virtual dependency + provides('blas') + + # Doesn't always build correctly in parallel + parallel = False + + def patch(self): + os.symlink('make.inc.example', 'make.inc') + + mf = FileFilter('make.inc') + mf.filter('^FORTRAN.*', 'FORTRAN = f90') + mf.filter('^LOADER.*', 'LOADER = f90') + mf.filter('^CC =.*', 'CC = cc') + + if '+fpic' in self.spec: + mf.filter('^OPTS.*=.*', 'OPTS = -O2 -frecursive -fpic') + mf.filter('^CFLAGS =.*', 'CFLAGS = -O3 -fpic') + + + def install(self, spec, prefix): + make('blaslib') + + # Tests that blas builds correctly + make('blas_testing') + + # No install provided + mkdirp(prefix.lib) + install('librefblas.a', prefix.lib) + + # Blas virtual package should provide blas.a and libblas.a + with working_dir(prefix.lib): + symlink('librefblas.a', 'blas.a') + symlink('librefblas.a', 'libblas.a') diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py new file mode 100644 index 0000000000..fb6b99e27c --- /dev/null +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -0,0 +1,59 @@ +from spack import * + +class NetlibLapack(Package): + """ + LAPACK version 3.X is a comprehensive FORTRAN library that does + linear algebra operations including matrix inversions, least + squared solutions to linear sets of equations, eigenvector + analysis, singular value decomposition, etc. It is a very + comprehensive and reputable package that has found extensive + use in the scientific community. + """ + homepage = "http://www.netlib.org/lapack/" + url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + + version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') + version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') + version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') + version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') + version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') + + variant('shared', default=False, description="Build shared library version") + + # virtual dependency + provides('lapack') + + # blas is a virtual dependency. + depends_on('blas') + + depends_on('cmake') + + # Doesn't always build correctly in parallel + parallel = False + + @when('^netlib-blas') + def get_blas_libs(self): + blas = self.spec['netlib-blas'] + return [join_path(blas.prefix.lib, 'blas.a')] + + + @when('^atlas') + def get_blas_libs(self): + blas = self.spec['atlas'] + return [join_path(blas.prefix.lib, l) + for l in ('libf77blas.a', 'libatlas.a')] + + + def install(self, spec, prefix): + blas_libs = ";".join(self.get_blas_libs()) + cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] + + if '+shared' in spec: + cmake_args.append('-DBUILD_SHARED_LIBS=ON') + + cmake_args += std_cmake_args + + cmake(*cmake_args) + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py new file mode 100644 index 0000000000..cd600b0b87 --- /dev/null +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Nettle(Package): + """The Nettle package contains the low-level cryptographic library + that is designed to fit easily in many contexts.""" + + homepage = "http://www.example.com" + url = "http://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz" + + version('2.7', '2caa1bd667c35db71becb93c5d89737f') + + depends_on('gmp') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/ompss/package.py b/var/spack/repos/builtin/packages/ompss/package.py new file mode 100644 index 0000000000..e09e0a624f --- /dev/null +++ b/var/spack/repos/builtin/packages/ompss/package.py @@ -0,0 +1,50 @@ +from spack import * +import os +import glob + +# working config lines for ompss 14.06 : +#./nanox-0.7/config.log: $ ./configure --prefix=/usr/gapps/exmatex/ompss --with-mcc=/usr/gapps/exmatex/ompss/ --with-hwloc=/usr +#./mcxx-1.99.2/config.log: $ ./configure --prefix=/usr/gapps/exmatex/ompss --with-nanox=/usr/gapps/exmatex/ompss --enable-ompss --with-mpi=/opt/mvapich2-intel-shmem-1.7 --enable-tl-openmp-profile --enable-tl-openmp-intel + +class Ompss(Package): + """OmpSs is an effort to integrate features from the StarSs + programming model developed by BSC into a single programming + model. In particular, our objective is to extend OpenMP with + new directives to support asynchronous parallelism and + heterogeneity (devices like GPUs). However, it can also be + understood as new directives extending other accelerator based + APIs like CUDA or OpenCL. Our OmpSs environment is built on top + of our Mercurium compiler and Nanos++ runtime system.""" + homepage = "http://pm.bsc.es/" + url = "http://pm.bsc.es/sites/default/files/ftp/ompss/releases/ompss-14.10.tar.gz" + list_url = 'http://pm.bsc.es/ompss-downloads' + + version('14.10', '404d161265748f2f96bb35fd8c7e79ee') + + # all dependencies are optional, really + depends_on("mpi") + #depends_on("openmp") + depends_on("hwloc") + depends_on("extrae") + + def install(self, spec, prefix): + if 'openmpi' in spec: + mpi = spec['openmpi'] + elif 'mpich' in spec: + mpi = spec['mpich'] + elif 'mvapich' in spec: + mpi = spec['mvapich'] + + openmp_options = ["--enable-tl-openmp-profile"] + if spec.satisfies('%intel'): + openmp_options.append( "--enable-tl-openmp-intel" ) + + os.chdir(glob.glob('./nanox-*').pop()) + configure("--prefix=%s" % prefix, "--with-mcc=%s" % prefix, "--with-extrae=%s" % spec['extrae'].prefix, "--with-hwloc=%s" % spec['hwloc'].prefix) + make() + make("install") + + os.chdir(glob.glob('../mcxx-*').pop()) + configure("--prefix=%s" % prefix, "--with-nanox=%s" % prefix, "--enable-ompss", "--with-mpi=%s" % mpi.prefix, *openmp_options) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py new file mode 100644 index 0000000000..5d380ebd77 --- /dev/null +++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py @@ -0,0 +1,23 @@ +from spack import * + +class OmptOpenmp(Package): + """LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP mirror. This library provides a drop-in replacement of the OpenMP runtimes for GCC, Intel and LLVM/Clang.""" + homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" + url = "http://github.com/khuck/LLVM-openmp/archive/v0.1-spack.tar.gz" + + version('spack', '35227b2726e377faa433fc841226e036') + + # depends_on("foo") + + def install(self, spec, prefix): + with working_dir("runtime/build", create=True): + + # FIXME: Modify the configure line to suit your build system here. + cmake('-DCMAKE_C_COMPILER=%s' % self.compiler.cc, + '-DCMAKE_CXX_COMPILER=%s' % self.compiler.cxx, + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '..', *std_cmake_args) + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/repos/builtin/packages/opari2/package.py b/var/spack/repos/builtin/packages/opari2/package.py new file mode 100644 index 0000000000..daaee61e3a --- /dev/null +++ b/var/spack/repos/builtin/packages/opari2/package.py @@ -0,0 +1,65 @@ +# FIXME: Add copyright statement here + +from spack import * +from contextlib import closing + +class Opari2(Package): + """OPARI2 is a source-to-source instrumentation tool for OpenMP and + hybrid codes. It surrounds OpenMP directives and runtime library + calls with calls to the POMP2 measurement interface. + OPARI2 will provide you with a new initialization method that allows + for multi-directory and parallel builds as well as the usage of + pre-instrumented libraries. Furthermore, an efficient way of + tracking parent-child relationships was added. Additionally, we + extended OPARI2 to support instrumentation of OpenMP 3.0 + tied tasks. """ + + homepage = "http://www.vi-hps.org/projects/score-p" + url = "http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.2.tar.gz" + + version('1.1.2', '9a262c7ca05ff0ab5f7775ae96f3539e') + + backend_user_provided = """\ +CC=cc +CXX=c++ +F77=f77 +FC=f90 +CFLAGS=-fPIC +CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=c++ +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +CFLAGS_FOR_BUILD=-fPIC +CXXFLAGS_FOR_BUILD=-fPIC +""" + mpi_user_provided = """\ +MPICC=mpicc +MPICXX=mpicxx +MPIF77=mpif77 +MPIFC=mpif90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" + + def install(self, spec, prefix): + # Use a custom compiler configuration, otherwise the score-p + # build system messes with spack's compiler settings. + # Create these three files in the build directory + with closing(open("platform-backend-user-provided", "w")) as backend_file: + backend_file.write(self.backend_user_provided) + with closing(open("platform-frontend-user-provided", "w")) as frontend_file: + frontend_file.write(self.frontend_user_provided) + with closing(open("platform-mpi-user-provided", "w")) as mpi_file: + mpi_file.write(self.mpi_user_provided) + + # FIXME: Modify the configure line to suit your build system here. + configure("--prefix=%s" % prefix, + "--with-custom-compilers", + "--enable-shared") + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openmpi/ad_lustre_rwcontig_open_source.patch b/var/spack/repos/builtin/packages/openmpi/ad_lustre_rwcontig_open_source.patch new file mode 100644 index 0000000000..daa825ccbe --- /dev/null +++ b/var/spack/repos/builtin/packages/openmpi/ad_lustre_rwcontig_open_source.patch @@ -0,0 +1,11 @@ +--- a/ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 ++++ b/ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 +@@ -8,7 +8,7 @@ + * Copyright (C) 2008 Sun Microsystems, Lustre group + */ + +-#define _XOPEN_SOURCE 600 ++//#define _XOPEN_SOURCE 600 + #include + #include + #include "ad_lustre.h" diff --git a/var/spack/repos/builtin/packages/openmpi/llnl-platforms.patch b/var/spack/repos/builtin/packages/openmpi/llnl-platforms.patch new file mode 100644 index 0000000000..f515743c4d --- /dev/null +++ b/var/spack/repos/builtin/packages/openmpi/llnl-platforms.patch @@ -0,0 +1,151 @@ +diff -Nuar openmpi-1.6.5.orig/contrib/platform/llnl/optimized openmpi-1.6.5.llnl/contrib/platform/llnl/optimized +--- openmpi-1.6.5.orig/contrib/platform/llnl/optimized 1969-12-31 16:00:00.000000000 -0800 ++++ openmpi-1.6.5.llnl/contrib/platform/llnl/optimized 2013-08-08 23:47:12.704029000 -0700 +@@ -0,0 +1,29 @@ ++enable_dlopen=no ++enable_mem_debug=no ++enable_mem_profile=no ++enable_debug_symbols=no ++enable_binaries=yes ++enable_heterogeneous=no ++enable_debug=no ++enable_shared=yes ++enable_static=yes ++enable_memchecker=no ++enable_ipv6=no ++enable_mpi_f77=yes ++enable_mpi_f90=yes ++enable_mpi_cxx=yes ++enable_mpi_cxx_seek=yes ++enable_cxx_exceptions=no ++enable_ft_thread=no ++enable_per_user_config_files=no ++enable_mca_no_build=carto,crs,filem,routed-linear,snapc,pml-dr,pml-crcp2,pml-crcpw,pml-v,pml-example,crcp,btl-tcp ++enable_contrib_no_build=libnbc,vt ++with_slurm=yes ++with_pmi=yes ++with_tm=no ++with_openib=yes ++with_psm=yes ++with_devel_headers=yes ++with_io_romio_flags=--with-file-system=ufs+nfs+lustre ++with_memory_manager=ptmalloc2 ++with_valgrind=no +diff -Nuar openmpi-1.6.5.orig/contrib/platform/llnl/optimized.conf openmpi-1.6.5.llnl/contrib/platform/llnl/optimized.conf +--- openmpi-1.6.5.orig/contrib/platform/llnl/optimized.conf 1969-12-31 16:00:00.000000000 -0800 ++++ openmpi-1.6.5.llnl/contrib/platform/llnl/optimized.conf 2013-08-08 23:43:52.907553000 -0700 +@@ -0,0 +1,114 @@ ++# ++# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana ++# University Research and Technology ++# Corporation. All rights reserved. ++# Copyright (c) 2004-2005 The University of Tennessee and The University ++# of Tennessee Research Foundation. All rights ++# reserved. ++# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, ++# University of Stuttgart. All rights reserved. ++# Copyright (c) 2004-2005 The Regents of the University of California. ++# All rights reserved. ++# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. ++# Copyright (c) 2011 Los Alamos National Security, LLC. ++# All rights reserved. ++# $COPYRIGHT$ ++# ++# Additional copyrights may follow ++# ++# $HEADER$ ++# ++ ++# This is the default system-wide MCA parameters defaults file. ++# Specifically, the MCA parameter "mca_param_files" defaults to a ++# value of ++# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf" ++# (this file is the latter of the two). So if the default value of ++# mca_param_files is not changed, this file is used to set system-wide ++# MCA parameters. This file can therefore be used to set system-wide ++# default MCA parameters for all users. Of course, users can override ++# these values if they want, but this file is an excellent location ++# for setting system-specific MCA parameters for those users who don't ++# know / care enough to investigate the proper values for them. ++ ++# Note that this file is only applicable where it is visible (in a ++# filesystem sense). Specifically, MPI processes each read this file ++# during their startup to determine what default values for MCA ++# parameters should be used. mpirun does not bundle up the values in ++# this file from the node where it was run and send them to all nodes; ++# the default value decisions are effectively distributed. Hence, ++# these values are only applicable on nodes that "see" this file. If ++# $sysconf is a directory on a local disk, it is likely that changes ++# to this file will need to be propagated to other nodes. If $sysconf ++# is a directory that is shared via a networked filesystem, changes to ++# this file will be visible to all nodes that share this $sysconf. ++ ++# The format is straightforward: one per line, mca_param_name = ++# rvalue. Quoting is ignored (so if you use quotes or escape ++# characters, they'll be included as part of the value). For example: ++ ++# Disable run-time MPI parameter checking ++# mpi_param_check = 0 ++ ++# Note that the value "~/" will be expanded to the current user's home ++# directory. For example: ++ ++# Change component loading path ++# component_path = /usr/local/lib/openmpi:~/my_openmpi_components ++ ++# See "ompi_info --param all all" for a full listing of Open MPI MCA ++# parameters available and their default values. ++# ++ ++# Basic behavior to smooth startup ++mca_component_show_load_errors = 0 ++orte_abort_timeout = 10 ++opal_set_max_sys_limits = 1 ++orte_report_launch_progress = 1 ++ ++# Define timeout for daemons to report back during launch ++orte_startup_timeout = 10000 ++ ++## Protect the shared file systems ++orte_no_session_dirs = /p,/usr/local,/usr/global,/nfs/tmp1,/nfs/tmp2 ++orte_tmpdir_base = /tmp ++ ++## Require an allocation to run - protects the frontend ++## from inadvertent job executions ++orte_allocation_required = 1 ++ ++## MPI behavior ++## Do NOT specify mpi_leave_pinned so system ++## can figure out for itself whether or not ++## it is supported and usable ++orte_notifier = syslog ++ ++## Add the interface for out-of-band communication ++## and set it up ++oob_tcp_if_include=ib0 ++oob_tcp_peer_retries = 1000 ++oob_tcp_disable_family = IPv6 ++oob_tcp_listen_mode = listen_thread ++oob_tcp_sndbuf = 32768 ++oob_tcp_rcvbuf = 32768 ++ ++## Define the MPI interconnects ++btl = sm,openib,self ++ ++## We are using the PSM MTL by default ++## There can only be one! ++pml = cm ++ ++## Setup OpenIB - just in case ++btl_openib_want_fork_support = 0 ++btl_openib_cpc_include = oob ++btl_openib_receive_queues = S,4096,1024:S,12288,512:S,65536,512 ++ ++## Enable cpu affinity ++opal_paffinity_alone = 1 ++ ++## Setup MPI options ++mpi_show_handle_leaks = 0 ++mpi_warn_on_fork = 1 ++mpi_abort_print_stack = 0 ++ diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py new file mode 100644 index 0000000000..5e429dedf5 --- /dev/null +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -0,0 +1,109 @@ +import os + +from spack import * + + +class Openmpi(Package): + """Open MPI is a project combining technologies and resources from + several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) + in order to build the best MPI library available. A completely + new MPI-2 compliant implementation, Open MPI offers advantages + for system and software vendors, application developers and + computer science researchers. + """ + + homepage = "http://www.open-mpi.org" + + version('1.10.0', '280cf952de68369cebaca886c5ce0304', + url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2") + version('1.8.8', '0dab8e602372da1425e9242ae37faf8c', + url = 'http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.bz2') + version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475', + url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2") + + patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") + patch('llnl-platforms.patch', when="@1.6.5") + + provides('mpi@:2.2', when='@1.6.5') # Open MPI 1.6.5 supports MPI-2.2 + provides('mpi@:3.0', when='@1.8.8') # Open MPI 1.8.8 supports MPI-3.0 + provides('mpi@:3.0', when='@1.10.0') # Open MPI 1.10.0 supports MPI-3.0 + + + def setup_dependent_environment(self, module, spec, dep_spec): + """For dependencies, make mpicc's use spack wrapper.""" + os.environ['OMPI_CC'] = 'cc' + os.environ['OMPI_CXX'] = 'c++' + os.environ['OMPI_FC'] = 'f90' + os.environ['OMPI_F77'] = 'f77' + + + def install(self, spec, prefix): + config_args = ["--prefix=%s" % prefix] + + # TODO: use variants for this, e.g. +lanl, +llnl, etc. + # use this for LANL builds, but for LLNL builds, we need: + # "--with-platform=contrib/platform/llnl/optimized" + if self.version == ver("1.6.5") and '+lanl' in spec: + config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") + + # TODO: Spack should make it so that you can't actually find + # these compilers if they're "disabled" for the current + # compiler configuration. + if not self.compiler.f77 and not self.compiler.fc: + config_args.append("--enable-mpi-fortran=no") + + configure(*config_args) + make() + make("install") + + self.filter_compilers() + + + def filter_compilers(self): + """Run after install to make the MPI compilers use the + compilers that Spack built the package with. + + If this isn't done, they'll have CC, CXX and FC set + to Spack's generic cc, c++ and f90. We want them to + be bound to whatever compiler they were built with. + """ + kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : False } + dir = os.path.join(self.prefix, 'share/openmpi/') + + cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt', + 'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt'] + + cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt', + 'ortec++-wrapper-data.txt'] + + fc_wrappers = ['mpifort-vt-wrapper-data.txt', + 'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt'] + + for wrapper in cc_wrappers: + filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc, + os.path.join(dir, wrapper), **kwargs) + + for wrapper in cxx_wrappers: + filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx, + os.path.join(dir, wrapper), **kwargs) + + for wrapper in fc_wrappers: + filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, + os.path.join(dir, wrapper), **kwargs) + + # These are symlinks in newer versions, so check that here + f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt'] + f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt'] + + for wrapper in f77_wrappers: + path = os.path.join(dir, wrapper) + if not os.path.islink(path): + filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77, + path, **kwargs) + for wrapper in f90_wrappers: + path = os.path.join(dir, wrapper) + if not os.path.islink(path): + filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, + path, **kwargs) + + diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py new file mode 100644 index 0000000000..c5a8aeb9dc --- /dev/null +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Openssl(Package): + """The OpenSSL Project is a collaborative effort to develop a + robust, commercial-grade, full-featured, and Open Source + toolkit implementing the Secure Sockets Layer (SSL v2/v3) and + Transport Layer Security (TLS v1) protocols as well as a + full-strength general purpose cryptography library.""" + homepage = "http://www.openssl.org" + url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" + + version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') + + depends_on("zlib") + parallel = False + + def install(self, spec, prefix): + config = Executable("./config") + config("--prefix=%s" % prefix, + "--openssldir=%s/etc/openssl" % prefix, + "zlib", + "no-krb5", + "shared") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/otf/package.py b/var/spack/repos/builtin/packages/otf/package.py new file mode 100644 index 0000000000..52893dd265 --- /dev/null +++ b/var/spack/repos/builtin/packages/otf/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Otf(Package): + """To improve scalability for very large and massively parallel + traces the Open Trace Format (OTF) is developed at ZIH as a + successor format to the Vampir Trace Format (VTF3).""" + + homepage = "http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/otf/index_html/document_view?set_language=en" + url = "http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=otf&get=OTF-1.12.5salmon.tar.gz" + + version('1.12.5salmon', 'bf260198633277031330e3356dcb4eec') + + depends_on('zlib') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--without-vtf3', + '--with-zlib', + '--with-zlibsymbols') + make() + make("install") diff --git a/var/spack/repos/builtin/packages/otf2/package.py b/var/spack/repos/builtin/packages/otf2/package.py new file mode 100644 index 0000000000..fa0a5898b6 --- /dev/null +++ b/var/spack/repos/builtin/packages/otf2/package.py @@ -0,0 +1,74 @@ +# FIXME: Add copyright + +from spack import * +from contextlib import closing +import os + +class Otf2(Package): + """The Open Trace Format 2 is a highly scalable, memory efficient event + trace data format plus support library.""" + + homepage = "http://www.vi-hps.org/score-p" + url = "http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz" + + version('1.4', 'a23c42e936eb9209c4e08b61c3cf5092', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz") + version('1.3.1', 'd0ffc4e858455ace4f596f910e68c9f2', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.3.1.tar.gz") + version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8', + url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") + + backend_user_provided = """\ +CC=cc +CXX=c++ +F77=f77 +FC=f90 +CFLAGS=-fPIC +CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=c++ +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +CFLAGS_FOR_BUILD=-fPIC +CXXFLAGS_FOR_BUILD=-fPIC +""" + mpi_user_provided = """\ +MPICC=cc +MPICXX=c++ +MPIF77=f77 +MPIFC=f90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" + + @when('@:1.2.1') + def version_specific_args(self): + return ["--with-platform=disabled", "CC=cc", "CXX=c++", "F77=f77", "F90=f90", "CFLAGS=-fPIC", "CXXFLAGS=-fPIC"] + + @when('@1.3:') + def version_specific_args(self): + # TODO: figure out what scorep's build does as of otf2 1.3 + return ["--with-custom-compilers"] + + def install(self, spec, prefix): + # Use a custom compiler configuration, otherwise the score-p + # build system messes with spack's compiler settings. + # Create these three files in the build directory + with closing(open("platform-backend-user-provided", "w")) as backend_file: + backend_file.write(self.backend_user_provided) + with closing(open("platform-frontend-user-provided", "w")) as frontend_file: + frontend_file.write(self.frontend_user_provided) + with closing(open("platform-mpi-user-provided", "w")) as mpi_file: + mpi_file.write(self.mpi_user_provided) + + configure_args=["--prefix=%s" % prefix, + "--enable-shared"] + + configure_args.extend(self.version_specific_args()) + + configure(*configure_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py new file mode 100644 index 0000000000..df43625bf5 --- /dev/null +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Pango(Package): + """Pango is a library for laying out and rendering of text, with + an emphasis on internationalization. It can be used anywhere + that text layout is needed, though most of the work on Pango so + far has been done in the context of the GTK+ widget toolkit.""" + homepage = "http://www.pango.org" + url = "http://ftp.gnome.org/pub/gnome/sources/pango/1.36/pango-1.36.8.tar.xz" + + version('1.36.8', '217a9a753006275215fa9fa127760ece') + + depends_on("harfbuzz") + depends_on("cairo") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py new file mode 100644 index 0000000000..596f7114d6 --- /dev/null +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -0,0 +1,35 @@ +from spack import * +import os + +class Papi(Package): + """PAPI provides the tool designer and application engineer with a + consistent interface and methodology for use of the performance + counter hardware found in most major microprocessors. PAPI + enables software engineers to see, in near real time, the + relation between software performance and processor events. In + addition Component PAPI provides access to a collection of + components that expose performance measurement opportunites + across the hardware and software stack.""" + homepage = "http://icl.cs.utk.edu/papi/index.html" + url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.3.0.tar.gz" + + version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') + + def install(self, spec, prefix): + os.chdir("src/") + + configure_args=["--prefix=%s" % prefix] + + # need to force consistency in the use of compilers + if spec.satisfies('%gcc'): + configure_args.append('CC=gcc') + configure_args.append('MPICH_CC=gcc') + if spec.satisfies('%intel'): + configure_args.append('CC=icc') + configure_args.append('MPICH_CC=icc') + + configure(*configure_args) + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py new file mode 100644 index 0000000000..5f8a153d4c --- /dev/null +++ b/var/spack/repos/builtin/packages/paraver/package.py @@ -0,0 +1,41 @@ +from spack import * +import os + +class Paraver(Package): + """"A very powerful performance visualization and analysis tool + based on traces that can be used to analyse any information that + is expressed on its input trace format. Traces for parallel MPI, + OpenMP and other programs can be genereated with Extrae.""" + homepage = "http://www.bsc.es/computer-sciences/performance-tools/paraver" + url = "http://www.bsc.es/ssl/apps/performanceTools/files/paraver-sources-4.5.3.tar.gz" + + version('4.5.3', '625de9ec0d639acd18d1aaa644b38f72') + + depends_on("boost") + #depends_on("extrae") + depends_on("wx") + depends_on("wxpropgrid") + + def install(self, spec, prefix): + os.chdir("ptools_common_files") + configure("--prefix=%s" % prefix) + make() + make("install") + + os.chdir("../paraver-kernel") + #"--with-extrae=%s" % spec['extrae'].prefix, + configure("--prefix=%s" % prefix, "--with-ptools-common-files=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization") + make() + make("install") + + os.chdir("../paraver-toolset") + configure("--prefix=%s" % prefix) + make() + make("install") + + os.chdir("../wxparaver") + #"--with-extrae=%s" % spec['extrae'].prefix, + configure("--prefix=%s" % prefix, "--with-paraver=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization", "--with-wxdir=%s" % spec['wx'].prefix.bin) + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py new file mode 100644 index 0000000000..a0ff812ca2 --- /dev/null +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -0,0 +1,72 @@ +from spack import * + +class Paraview(Package): + homepage = 'http://www.paraview.org' + url = 'http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz' + + version('4.4.0', 'fa1569857dd680ebb4d7ff89c2227378', url='http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz') + + variant('python', default=False, description='Enable Python support') + variant('matplotlib', default=False, description='Enable Matplotlib support') + variant('numpy', default=False, description='Enable NumPy support') + + variant('tcl', default=False, description='Enable TCL support') + + variant('mpi', default=False, description='Enable MPI support') + + variant('osmesa', default=False, description='Enable OSMesa support') + variant('qt', default=False, description='Enable Qt support') + + depends_on('python', when='+python') + depends_on('py-numpy', when='+python+numpy') + depends_on('py-matplotlib', when='+python+matplotlib') + depends_on('tcl', when='+tcl') + depends_on('mpi', when='+mpi') + depends_on('qt', when='+qt') + + depends_on('bzip2') + depends_on('freetype') + depends_on('hdf5') # drags in mpi + depends_on('jpeg') + depends_on('libpng') + depends_on('libtiff') + #depends_on('libxml2') # drags in python + depends_on('netcdf') + #depends_on('protobuf') # version mismatches? + #depends_on('sqlite') # external version not supported + depends_on('zlib') + + 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')) + feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' % feature_to_bool('+mpi')) + 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) + + cmake('..', + '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, + '-DBUILD_TESTING:BOOL=OFF', + '-DVTK_USER_SYSTEM_FREETYPE:BOOL=ON', + '-DVTK_USER_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USER_SYSTEM_JPEG:BOOL=ON', + #'-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', + '-DVTK_USER_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USER_SYSTEM_TIFF:BOOL=ON', + '-DVTK_USER_SYSTEM_ZLIB:BOOL=ON', + *feature_args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py new file mode 100644 index 0000000000..d8cd337304 --- /dev/null +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Parmetis(Package): + """ParMETIS is an MPI-based parallel library that implements a + variety of algorithms for partitioning unstructured graphs, + meshes, and for computing fill-reducing orderings of sparse + matrices.""" + homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview" + url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz" + + version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') + + depends_on('mpi') + + def install(self, spec, prefix): + cmake(".", + '-DGKLIB_PATH=%s/metis/GKlib' % pwd(), + '-DMETIS_PATH=%s/metis' % pwd(), + '-DSHARED=1', + '-DCMAKE_C_COMPILER=mpicc', + '-DCMAKE_CXX_COMPILER=mpicxx', + '-DSHARED=1', + *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/parpack/package.py b/var/spack/repos/builtin/packages/parpack/package.py new file mode 100644 index 0000000000..622aceca04 --- /dev/null +++ b/var/spack/repos/builtin/packages/parpack/package.py @@ -0,0 +1,43 @@ +from spack import * +import os +import shutil + +class Parpack(Package): + """ARPACK is a collection of Fortran77 subroutines designed to solve large + scale eigenvalue problems.""" + + homepage = "http://www.caam.rice.edu/software/ARPACK/download.html" + url = "http://www.caam.rice.edu/software/ARPACK/SRC/parpack96.tar.Z" + + version('96', 'a175f70ff71837a33ff7e4b0b6054f43') + + depends_on('mpi') + depends_on('blas') + depends_on('lapack') + + def patch(self): + # Filter the CJ makefile to make a spack one. + shutil.move('ARMAKES/ARmake.CJ', 'ARmake.inc') + mf = FileFilter('ARmake.inc') + + # Be sure to use Spack F77 wrapper + mf.filter('^FC.*', 'FC = f77') + mf.filter('^FFLAGS.*', 'FFLAGS = -O2 -g') + + # Set up some variables. + mf.filter('^PLAT.*', 'PLAT = ') + mf.filter('^home.*', 'home = %s' % os.getcwd()) + mf.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) + mf.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) + mf.filter('^MAKE.*', 'MAKE = make') + + # build the library in our own prefix. + mf.filter('^ARPACKLIB.*', 'PARPACKLIB = %s/libparpack.a' % os.getcwd()) + + + def install(self, spec, prefix): + with working_dir('PARPACK/SRC/MPI'): + make('all') + + mkdirp(prefix.lib) + install('libparpack.a', prefix.lib) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py new file mode 100644 index 0000000000..3424048a6c --- /dev/null +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Pcre(Package): + """The PCRE package contains Perl Compatible Regular Expression + libraries. These are useful for implementing regular expression + pattern matching using the same syntax and semantics as Perl 5.""" + homepage = "http://www.pcre.org""" + url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" + + version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py new file mode 100644 index 0000000000..4864e39bf1 --- /dev/null +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -0,0 +1,40 @@ +from spack import * + +class Petsc(Package): + """PETSc is a suite of data structures and routines for the + scalable (parallel) solution of scientific applications modeled by + partial differential equations.""" + + homepage = "http://www.mcs.anl.gov/petsc/index.html" + url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz" + + version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f') + version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13') + version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') + + depends_on("boost") + depends_on("blas") + depends_on("lapack") + depends_on("hypre") + depends_on("parmetis") + depends_on("metis") + depends_on("hdf5") + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "CC=cc", + "CXX=c++", + "FC=f90", + "--with-blas-lib=%s/libblas.a" % spec['blas'].prefix.lib, + "--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib, + "--with-boost-dir=%s" % spec['boost'].prefix, + "--with-hypre-dir=%s" % spec['hypre'].prefix, + "--with-parmetis-dir=%s" % spec['parmetis'].prefix, + "--with-metis-dir=%s" % spec['metis'].prefix, + "--with-hdf5-dir=%s" % spec['hdf5'].prefix, + "--with-shared-libraries=0") + + # PETSc has its own way of doing parallel make. + make('MAKE_NP=%s' % make_jobs, parallel=False) + make("install") diff --git a/var/spack/repos/builtin/packages/pidx/package.py b/var/spack/repos/builtin/packages/pidx/package.py new file mode 100644 index 0000000000..81aed62fb1 --- /dev/null +++ b/var/spack/repos/builtin/packages/pidx/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Pidx(Package): + """PIDX Parallel I/O Library. + + PIDX is an efficient parallel I/O library that reads and writes + multiresolution IDX data files. + """ + + homepage = "http://www.cedmav.com/pidx" + + version('1.0', git='https://github.com/sci-visus/PIDX.git', + commit='6afa1cf71d1c41263296dc049c8fabaf73c296da') + + depends_on("mpi") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py new file mode 100644 index 0000000000..895cbdbca5 --- /dev/null +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Pixman(Package): + """The Pixman package contains a library that provides low-level + pixel manipulation features such as image compositing and + trapezoid rasterization.""" + homepage = "http://www.pixman.org" + url = "http://cairographics.org/releases/pixman-0.32.6.tar.gz" + + version('0.32.6', '3a30859719a41bd0f5cccffbfefdd4c2') + + depends_on("libpng") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--disable-gtk") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py new file mode 100644 index 0000000000..9964c6ce34 --- /dev/null +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PkgConfig(Package): + """pkg-config is a helper tool used when compiling applications and libraries""" + homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/" + url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" + + version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') + + parallel = False + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix, "--enable-shared") + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/pmgr_collective/package.py b/var/spack/repos/builtin/packages/pmgr_collective/package.py new file mode 100644 index 0000000000..5d9b02acc3 --- /dev/null +++ b/var/spack/repos/builtin/packages/pmgr_collective/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class PmgrCollective(Package): + """PMGR_COLLECTIVE provides a scalable network for bootstrapping + MPI jobs.""" + homepage = "http://www.sourceforge.net/projects/pmgrcollective" + url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz" + + version('1.0', '0384d008774274cc3fc7b4d810dfd07e') + + def install(self, spec, prefix): + make('PREFIX="' + prefix + '"') + make('PREFIX="' + prefix + '"', "install") diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py new file mode 100644 index 0000000000..46922b7b71 --- /dev/null +++ b/var/spack/repos/builtin/packages/postgresql/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Postgresql(Package): + """PostgreSQL is a powerful, open source object-relational + database system. It has more than 15 years of active + development and a proven architecture that has earned it a + strong reputation for reliability, data integrity, and + correctness.""" + homepage = "http://www.postgresql.org/" + url = "http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2" + + version('9.3.4', 'd0a41f54c377b2d2fab4a003b0dac762') + + depends_on("openssl") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-openssl") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/ppl/package.py b/var/spack/repos/builtin/packages/ppl/package.py new file mode 100644 index 0000000000..018d5c523d --- /dev/null +++ b/var/spack/repos/builtin/packages/ppl/package.py @@ -0,0 +1,28 @@ +from spack import * + +class Ppl(Package): + """The Parma Polyhedra Library (PPL) provides numerical + abstractions especially targeted at applications in the field of + analysis and verification of complex systems. These abstractions + include convex polyhedra, some special classes of polyhedra shapes + that offer interesting complexity/precision tradeoffs, and grids + which represent regularly spaced points that satisfy a set of + linear congruence relations. The library also supports finite + powersets and products of polyhedra and grids, a mixed integer + linear programming problem solver using an exact-arithmetic + version of the simplex algorithm, a parametric integer programming + solver, and primitives for termination analysis via the automatic + synthesis of linear ranking functions.""" + + homepage = "http://bugseng.com/products/ppl/" + url = "http://bugseng.com/products/ppl/download/ftp/releases/1.1/ppl-1.1.tar.gz" + + version('1.1', '4f2422c0ef3f409707af32108deb30a7') + + depends_on("gmp") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-gmp=%s" % spec['gmp'].prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py new file mode 100644 index 0000000000..34085c7ce9 --- /dev/null +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -0,0 +1,16 @@ +import os +from spack import * + +class Protobuf(Package): + """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" + + version('2.5.0', 'a72001a9067a4c2c4e0e836d0f92ece4') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("check") + make("install") diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py new file mode 100644 index 0000000000..45f1085ba1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-basemap/package.py @@ -0,0 +1,20 @@ +from spack import * +import os + +class PyBasemap(Package): + """The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python.""" + homepage = "http://matplotlib.org/basemap/" + url = "https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz" + + version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8') + + extends('python') + depends_on('py-setuptools') + depends_on('py-numpy') + depends_on('py-matplotlib') + depends_on('py-pil') + depends_on("geos") + + def install(self, spec, prefix): + env['GEOS_DIR'] = spec['geos'].prefix + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py new file mode 100644 index 0000000000..8ecaf48626 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-biopython/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyBiopython(Package): + """It is a distributed collaborative effort to develop Python libraries and applications which address the needs of current and future work in bioinformatics.""" + homepage = "http://biopython.org/wiki/Main_Page" + url = "http://biopython.org/DIST/biopython-1.65.tar.gz" + + version('1.65', '143e7861ade85c0a8b5e2bbdd1da1f67') + + extends('python') + depends_on('py-mx') + depends_on('py-numpy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py new file mode 100644 index 0000000000..a4d37483fe --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyCffi(Package): + """Foreign Function Interface for Python calling C code""" + homepage = "http://cffi.readthedocs.org/en/latest/" + # base https://pypi.python.org/pypi/cffi + url = "https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz#md5=" + + version('1.1.2', 'ca6e6c45b45caa87aee9adc7c796eaea') + + extends('python') + depends_on('py-setuptools') + depends_on('py-pycparser') + depends_on('libffi') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py new file mode 100644 index 0000000000..68eb735ad9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyCython(Package): + """The Cython compiler for writing C extensions for the Python language.""" + homepage = "https://pypi.python.org/pypi/cython" + url = "https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz" + + version('0.21.2', 'd21adb870c75680dc857cd05d41046a4') + version('0.22', '1ae25add4ef7b63ee9b4af697300d6b6') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py new file mode 100644 index 0000000000..0a17f2f2d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dateutil/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyDateutil(Package): + """Extensions to the standard Python datetime module.""" + homepage = "https://pypi.python.org/pypi/dateutil" + url = "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.0.tar.gz" + + version('2.4.0', '75714163bb96bedd07685cdb2071b8bc') + version('2.4.2', '4ef68e1c485b09e9f034e10473e5add2') + + extends('python') + depends_on('py-setuptools') + depends_on('py-six') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-epydoc/package.py b/var/spack/repos/builtin/packages/py-epydoc/package.py new file mode 100644 index 0000000000..af05510504 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-epydoc/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyEpydoc(Package): + """Epydoc is a tool for generating API documentation documentation for Python modules, based on their docstrings.""" + homepage = "https://pypi.python.org/pypi/epydoc" + url = "https://pypi.python.org/packages/source/e/epydoc/epydoc-3.0.1.tar.gz" + + version('3.0.1', '36407974bd5da2af00bf90ca27feeb44') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-genders/package.py b/var/spack/repos/builtin/packages/py-genders/package.py new file mode 100644 index 0000000000..c49c8fd5b2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-genders/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyGenders(Package): + """Genders is a static cluster configuration database used for cluster configuration management. It is used by a variety of tools and scripts for management of large clusters.""" + homepage = "https://github.com/chaos/genders" + url = "https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz" + + version('1.22', '9ea59a024dcbddb85b0ed25ddca9bc8e', url='https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz') + extends('python') + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix) + make(parallel=False) + make("install") + diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py new file mode 100644 index 0000000000..ede4472c03 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyGnuplot(Package): + """Gnuplot.py is a Python package that allows you to create graphs from within Python using the gnuplot plotting program.""" + homepage = "http://gnuplot-py.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.tar.gz" + + version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1') + + extends('python') + depends_on('py-numpy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py new file mode 100644 index 0000000000..6293da5407 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -0,0 +1,19 @@ +from spack import * +import re + +class PyH5py(Package): + """The h5py package provides both a high- and low-level interface to the HDF5 library from Python.""" + homepage = "https://pypi.python.org/pypi/h5py" + url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz" + + version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758') + version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74') + + extends('python', ignore=lambda f: re.match(r'bin/cy*', f)) + depends_on('hdf5') + depends_on('py-numpy') + depends_on('py-cython') + + def install(self, spec, prefix): + python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix) + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py new file mode 100644 index 0000000000..8d0e64a07f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-ipython/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyIpython(Package): + """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" + homepage = "https://pypi.python.org/pypi/ipython" + url = "https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz" + + version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf') + version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') + + extends('python') + depends_on('py-pygments') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-libxml2/package.py b/var/spack/repos/builtin/packages/py-libxml2/package.py new file mode 100644 index 0000000000..59005428e4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-libxml2/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyLibxml2(Package): + """A Python wrapper around libxml2.""" + homepage = "https://xmlsoft.org/python.html" + url = "ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz" + + version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3') + + extends('python') + depends_on('libxml2') + depends_on('libxslt') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-lockfile/package.py b/var/spack/repos/builtin/packages/py-lockfile/package.py new file mode 100644 index 0000000000..8722914d94 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-lockfile/package.py @@ -0,0 +1,23 @@ +from spack import * + +class PyLockfile(Package): + """The lockfile package exports a LockFile class which provides a + simple API for locking files. Unlike the Windows msvcrt.locking + function, the fcntl.lockf and flock functions, and the + deprecated posixfile module, the API is identical across both + Unix (including Linux and Mac) and Windows platforms. The lock + mechanism relies on the atomic nature of the link (on Unix) and + mkdir (on Windows) system calls. An implementation based on + SQLite is also provided, more as a demonstration of the + possibilities it provides than as production-quality code. + """ + homepage = "https://pypi.python.org/pypi/lockfile" + url = "https://pypi.python.org/packages/source/l/lockfile/lockfile-0.10.2.tar.gz" + + version('0.10.2', '1aa6175a6d57f082cd12e7ac6102ab15') + + extends("python") + depends_on("py-setuptools") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-mako/package.py b/var/spack/repos/builtin/packages/py-mako/package.py new file mode 100644 index 0000000000..3e91ffd8e5 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mako/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyMako(Package): + """A super-fast templating language that borrows the best + ideas from the existing templating languages.""" + + homepage = "https://pypi.python.org/pypi/mako" + url = "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz" + + version('1.0.1', '9f0aafd177b039ef67b90ea350497a54') + + depends_on('py-setuptools') + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py new file mode 100644 index 0000000000..e7ce3dfd24 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -0,0 +1,47 @@ +from spack import * +import os + +class PyMatplotlib(Package): + """Python plotting package.""" + homepage = "https://pypi.python.org/pypi/matplotlib" + url = "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz" + + version('1.4.2', '7d22efb6cce475025733c50487bd8898') + version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267') + + extends('python', ignore=r'bin/nosetests.*$') + + depends_on('py-pyside') + depends_on('py-ipython') + depends_on('py-pyparsing') + depends_on('py-six') + depends_on('py-dateutil') + depends_on('py-pytz') + depends_on('py-nose') + depends_on('py-numpy') + + depends_on('qt') + depends_on('bzip2') + depends_on('tcl') + depends_on('tk') + depends_on('qhull') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + + if str(self.version) in ['1.4.2', '1.4.3']: + # hack to fix configuration file + config_file = None + for p,d,f in os.walk(prefix.lib): + for file in f: + if file.find('matplotlibrc') != -1: + config_file = join_path(p, 'matplotlibrc') + print config_file + if config_file == None: + raise InstallError('could not find config file') + filter_file(r'backend : pyside', + 'backend : Qt4Agg', + config_file) + filter_file(r'#backend.qt4 : PyQt4', + 'backend.qt4 : PySide', + config_file) diff --git a/var/spack/repos/builtin/packages/py-mock/package.py b/var/spack/repos/builtin/packages/py-mock/package.py new file mode 100644 index 0000000000..3b08428ba0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mock/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyMock(Package): + """mock is a library for testing in Python. It allows you to replace parts + of your system under test with mock objects and make assertions about how + they have been used.""" + + homepage = "https://github.com/testing-cabal/mock" + url = "https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz" + + version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb') + + extends('python') + depends_on('py-setuptools@17.1:') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py new file mode 100644 index 0000000000..8001689a18 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyMpi4py(Package): + """This package provides Python bindings for the Message Passing Interface (MPI) standard. It is implemented on top of the MPI-1/MPI-2 specification and exposes an API which grounds on the standard MPI-2 C++ bindings.""" + homepage = "https://pypi.python.org/pypi/mpi4py" + url = "https://pypi.python.org/packages/source/m/mpi4py/mpi4py-1.3.1.tar.gz" + + version('1.3.1', 'dbe9d22bdc8ed965c23a7ceb6f32fc3c') + extends('python') + depends_on('py-setuptools') + depends_on('mpi') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-mx/package.py b/var/spack/repos/builtin/packages/py-mx/package.py new file mode 100644 index 0000000000..717ee0562b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mx/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyMx(Package): + """The eGenix.com mx Base Distribution for Python is a collection of professional quality software tools which enhance Python's usability in many important areas such as fast text searching, date/time processing and high speed data types.""" + homepage = "http://www.egenix.com/products/python/mxBase/" + url = "https://downloads.egenix.com/python/egenix-mx-base-3.2.8.tar.gz" + + version('3.2.8', '9d9d3a25f9dc051a15e97f452413423b') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py new file mode 100644 index 0000000000..e7c6cf0264 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-nose/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyNose(Package): + """nose extends the test loading and running features of unittest, + making it easier to write, find and run tests.""" + + homepage = "https://pypi.python.org/pypi/nose" + url = "https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz" + + version('1.3.4', '6ed7169887580ddc9a8e16048d38274d') + version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16') + + extends('python', ignore=r'bin/nosetests.*$') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py new file mode 100644 index 0000000000..efa109a3e9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -0,0 +1,28 @@ +from spack import * + +class PyNumpy(Package): + """array processing for numbers, strings, records, and objects.""" + homepage = "https://pypi.python.org/pypi/numpy" + url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" + + version('1.9.1', '78842b73560ec378142665e712ae4ad9') + version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') + + extends('python') + depends_on('py-nose') + depends_on('netlib-blas+fpic') + depends_on('netlib-lapack+shared') + + def patch(self): + filter_file( + "possible_executables = \['(gfortran|g77|ifort|efl)", + "possible_executables = ['fc", + "numpy/distutils/fcompiler/gnu.py", + "numpy/distutils/fcompiler/intel.py") + + def install(self, spec, prefix): + with open('site.cfg', 'w') as f: + f.write('[DEFAULT]\n') + f.write('libraries=lapack,blas\n') + f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py new file mode 100644 index 0000000000..5b9997faa9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -0,0 +1,25 @@ +from spack import * +import os + +class PyPandas(Package): + """pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with relational or labeled data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open source data analysis / manipulation tool available in any language.""" + homepage = "http://pandas.pydata.org/" + url = "https://pypi.python.org/packages/source/p/pandas/pandas-0.16.0.tar.gz#md5=bfe311f05dc0c351f8955fbd1e296e73" + + version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73') + version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') + + extends('python') + depends_on('py-dateutil') + depends_on('py-numpy') + depends_on('py-matplotlib') + depends_on('py-scipy') + depends_on('py-setuptools') + depends_on('py-pytz') + depends_on('libdrm') + depends_on('libpciaccess') + depends_on('llvm') + depends_on('mesa') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pexpect/package.py b/var/spack/repos/builtin/packages/py-pexpect/package.py new file mode 100644 index 0000000000..ff5fac84e0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pexpect/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyPexpect(Package): + """Pexpect allows easy control of interactive console applications.""" + homepage = "https://pypi.python.org/pypi/pexpect" + url = "https://pypi.python.org/packages/source/p/pexpect/pexpect-3.3.tar.gz" + + version('3.3', '0de72541d3f1374b795472fed841dce8') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pil/package.py b/var/spack/repos/builtin/packages/py-pil/package.py new file mode 100644 index 0000000000..743b761981 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pil/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyPil(Package): + """The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.""" + + homepage = "http://www.pythonware.com/products/pil/" + url = "http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz" + + version('1.1.7', 'fc14a54e1ce02a0225be8854bfba478e') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pmw/package.py b/var/spack/repos/builtin/packages/py-pmw/package.py new file mode 100644 index 0000000000..56131811e9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pmw/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyPmw(Package): + """Pmw is a toolkit for building high-level compound widgets, or megawidgets, constructed using other widgets as component parts.""" + homepage = "https://pypi.python.org/pypi/Pmw" + url = "https://pypi.python.org/packages/source/P/Pmw/Pmw-2.0.0.tar.gz" + + version('2.0.0', 'c7c3f26c4f5abaa99807edefee578fc0') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pychecker/package.py b/var/spack/repos/builtin/packages/py-pychecker/package.py new file mode 100644 index 0000000000..bda5a746aa --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pychecker/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyPychecker(Package): + """""" + homepage = "http://pychecker.sourceforge.net/" + url = "http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz" + + version('0.8.19', 'c37182863dfb09209d6ba4f38fce9d2b') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pycparser/package.py b/var/spack/repos/builtin/packages/py-pycparser/package.py new file mode 100644 index 0000000000..f2bb679d25 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pycparser/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyPycparser(Package): + """pycparser is a complete parser of the C language, written in pure python""" + homepage = "https://github.com/eliben/pycparser" + url = "https://pypi.python.org/packages/source/p/pycparser/pycparser-2.13.tar.gz" + + version('2.13', 'e4fe1a2d341b22e25da0d22f034ef32f') + + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py new file mode 100644 index 0000000000..d5ad32e624 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyPyelftools(Package): + """A pure-Python library for parsing and analyzing ELF files and DWARF debugging information""" + homepage = "https://pypi.python.org/pypi/pyelftools" + url = "https://pypi.python.org/packages/source/p/pyelftools/pyelftools-0.23.tar.gz" + + version('0.23', 'aa7cefa8bd2f63d7b017440c9084f310') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py new file mode 100644 index 0000000000..7e07bf6869 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygments/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyPygments(Package): + """Pygments is a syntax highlighting package written in Python.""" + homepage = "https://pypi.python.org/pypi/pygments" + url = "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz" + + version('2.0.1', 'e0daf4c14a4fe5b630da765904de4d6c') + version('2.0.2', '238587a1370d62405edabd0794b3ec4a') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py new file mode 100644 index 0000000000..9579708c29 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pylint/package.py @@ -0,0 +1,17 @@ +from spack import * +import re + +class PyPylint(Package): + """array processing for numbers, strings, records, and objects.""" + homepage = "https://pypi.python.org/pypi/pylint" + url = "https://pypi.python.org/packages/source/p/pylint/pylint-1.4.1.tar.gz" + + version('1.4.1', 'df7c679bdcce5019389038847e4de622') + version('1.4.3', '5924c1c7ca5ca23647812f5971d0ea44') + + extends('python') + depends_on('py-nose') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py new file mode 100644 index 0000000000..af9c76ccd8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pypar/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyPypar(Package): + """Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using MPI.""" + homepage = "http://code.google.com/p/pypar/" + url = "https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz" + + version('2.1.5_108', '7a1f28327d2a3b679f9455c843d850b8', url='https://pypar.googlecode.com/files/pypar-2.1.5_108.tgz') + extends('python') + depends_on('mpi') + + def install(self, spec, prefix): + with working_dir('source'): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pyparsing/package.py b/var/spack/repos/builtin/packages/py-pyparsing/package.py new file mode 100644 index 0000000000..a6e50ad139 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyparsing/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyPyparsing(Package): + """A Python Parsing Module.""" + homepage = "https://pypi.python.org/pypi/pyparsing" + url = "https://pypi.python.org/packages/source/p/pyparsing/pyparsing-2.0.3.tar.gz" + + version('2.0.3', '0fe479be09fc2cf005f753d3acc35939') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pyqt/package.py b/var/spack/repos/builtin/packages/py-pyqt/package.py new file mode 100644 index 0000000000..8edca105bb --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyqt/package.py @@ -0,0 +1,24 @@ +from spack import * + +class PyPyqt(Package): + """PyQt is a set of Python v2 and v3 bindings for Digia's Qt + application framework and runs on all platforms supported by Qt + including Windows, MacOS/X and Linux.""" + homepage = "http://www.riverbankcomputing.com/software/pyqt/intro" + url = "http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz" + + version('4.11.3', '997c3e443165a89a559e0d96b061bf70') + + extends('python') + depends_on('py-sip') + + # TODO: allow qt5 when conditional deps are supported. + # TODO: Fix version matching so that @4 works like @:4 + depends_on('qt@:4') + + def install(self, spec, prefix): + python('configure.py', + '--confirm-license', + '--destdir=%s' % site_packages_dir) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py new file mode 100644 index 0000000000..bb5da44d02 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyside/package.py @@ -0,0 +1,45 @@ +from spack import * +import os + +class PyPyside(Package): + """array processing for numbers, strings, records, and objects.""" + homepage = "https://pypi.python.org/pypi/pyside" + url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz" + + version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') + + # TODO: make build dependency + # depends_on("cmake") + + extends('python') + depends_on('py-setuptools') + depends_on('qt@:4') + + def patch(self): + """Undo PySide RPATH handling and add Spack RPATH.""" + # Figure out the special RPATH + pypkg = self.spec['python'].package + rpath = self.rpath + rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'PySide')) + + # Add Spack's standard CMake args to the sub-builds. + # They're called BY setup.py so we have to patch it. + filter_file( + r'OPTION_CMAKE,', + r'OPTION_CMAKE, ' + ( + '"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE", ' + '"-DCMAKE_INSTALL_RPATH=%s",' % ':'.join(rpath)), + 'setup.py') + + # PySide tries to patch ELF files to remove RPATHs + # Disable this and go with the one we set. + filter_file( + r'^\s*rpath_cmd\(pyside_path, srcpath\)', + r'#rpath_cmd(pyside_path, srcpath)', + 'pyside_postinstall.py') + + + def install(self, spec, prefix): + python('setup.py', 'install', + '--prefix=%s' % prefix, + '--jobs=%s' % make_jobs) diff --git a/var/spack/repos/builtin/packages/py-python-daemon/package.py b/var/spack/repos/builtin/packages/py-python-daemon/package.py new file mode 100644 index 0000000000..12cbe9101c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-python-daemon/package.py @@ -0,0 +1,26 @@ +from spack import * + +class PyPythonDaemon(Package): + """Library to implement a well-behaved Unix daemon process. + + This library implements the well-behaved daemon specification of + PEP Standard daemon process. + + A well-behaved Unix daemon process is tricky to get right, but the + required steps are much the same for every daemon program. A + DaemonContext instance holds the behaviour and configured process + environment for the program; use the instance as a context manager + to enter a daemon state. + """ + homepage = "https://pypi.python.org/pypi/python-daemon/" + url = "https://pypi.python.org/packages/source/p/python-daemon/python-daemon-2.0.5.tar.gz" + + version('2.0.5', '73e7f49f525c51fa4a995aea4d80de41') + + extends("python") + depends_on("py-setuptools") + depends_on("py-lockfile") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py new file mode 100644 index 0000000000..da6311a784 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pytz/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyPytz(Package): + """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" + + version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') + version('2015.4', '417a47b1c432d90333e42084a605d3d8') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py new file mode 100644 index 0000000000..a0b03d03e3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-rpy2/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyRpy2(Package): + """rpy2 is a redesign and rewrite of rpy. It is providing a low-level interface to R from Python, a proposed high-level interface, including wrappers to graphical libraries, as well as R-like structures and functions.""" + homepage = "https://pypi.python.org/pypi/rpy2" + url = "https://pypi.python.org/packages/source/r/rpy2/rpy2-2.5.4.tar.gz" + + version('2.5.4', '115a20ac30883f096da2bdfcab55196d') + version('2.5.6', 'a36e758b633ce6aec6a5f450bfee980f') + + extends('python') + depends_on('py-setuptools') + + depends_on('R') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-scientificpython/package.py b/var/spack/repos/builtin/packages/py-scientificpython/package.py new file mode 100644 index 0000000000..df2c86caac --- /dev/null +++ b/var/spack/repos/builtin/packages/py-scientificpython/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyScientificpython(Package): + """ScientificPython is a collection of Python modules for + scientific computing. It contains support for geometry, + mathematical functions, statistics, physical units, IO, + visualization, and parallelization.""" + + homepage = "https://sourcesup.renater.fr/projects/scientific-py/" + url = "https://sourcesup.renater.fr/frs/download.php/file/4411/ScientificPython-2.8.1.tar.gz" + version('2.8.1', '73ee0df19c7b58cdf2954261f0763c77') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py new file mode 100644 index 0000000000..5b078ce901 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyScikitLearn(Package): + """""" + homepage = "https://pypi.python.org/pypi/scikit-learn" + url = "https://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0.15.2.tar.gz" + + version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d') + version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py new file mode 100644 index 0000000000..3a1124cc15 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -0,0 +1,18 @@ +from spack import * + +class PyScipy(Package): + """Scientific Library for Python.""" + homepage = "https://pypi.python.org/pypi/scipy" + url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" + + version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') + version('0.15.1', 'be56cd8e60591d6332aac792a5880110') + + extends('python') + depends_on('py-nose') + depends_on('py-numpy') + depends_on('blas') + depends_on('lapack') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py new file mode 100644 index 0000000000..760ad4d6db --- /dev/null +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PySetuptools(Package): + """Easily download, build, install, upgrade, and uninstall Python packages.""" + homepage = "https://pypi.python.org/pypi/setuptools" + url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" + + version('11.3.1', '01f69212e019a2420c1693fb43593930') + version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') + version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py new file mode 100644 index 0000000000..e4bf4ce07e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-shiboken/package.py @@ -0,0 +1,45 @@ +from spack import * +import os + +class PyShiboken(Package): + """Shiboken generates bindings for C++ libraries using CPython source code.""" + homepage = "https://shiboken.readthedocs.org/" + url = "https://pypi.python.org/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz" + + version('1.2.2', '345cfebda221f525842e079a6141e555') + + # TODO: make build dependency + # depends_on("cmake") + + extends('python') + depends_on("py-setuptools") + depends_on("libxml2") + depends_on("qt@:4.8") + + def patch(self): + """Undo Shiboken RPATH handling and add Spack RPATH.""" + # Add Spack's standard CMake args to the sub-builds. + # They're called BY setup.py so we have to patch it. + pypkg = self.spec['python'].package + rpath = self.rpath + rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'Shiboken')) + + filter_file( + r'OPTION_CMAKE,', + r'OPTION_CMAKE, ' + ( + '"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE", ' + '"-DCMAKE_INSTALL_RPATH=%s",' % ':'.join(rpath)), + 'setup.py') + + # Shiboken tries to patch ELF files to remove RPATHs + # Disable this and go with the one we set. + filter_file( + r'^\s*rpath_cmd\(shiboken_path, srcpath\)', + r'#rpath_cmd(shiboken_path, srcpath)', + 'shiboken_postinstall.py') + + + def install(self, spec, prefix): + python('setup.py', 'install', + '--prefix=%s' % prefix, + '--jobs=%s' % make_jobs) diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py new file mode 100644 index 0000000000..e4a6fb6961 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sip/package.py @@ -0,0 +1,21 @@ +from spack import * +import os + +class PySip(Package): + """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" + homepage = "http://www.riverbankcomputing.com/software/sip/intro" + url = "http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.5/sip-4.16.5.tar.gz" + + version('4.16.5', '6d01ea966a53e4c7ae5c5e48c40e49e5') + version('4.16.7', '32abc003980599d33ffd789734de4c36') + + extends('python') + + def install(self, spec, prefix): + python('configure.py', + '--destdir=%s' % site_packages_dir, + '--bindir=%s' % spec.prefix.bin, + '--incdir=%s' % python_include_dir, + '--sipdir=%s' % os.path.join(spec.prefix.share, 'sip')) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py new file mode 100644 index 0000000000..05c5bd00a9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-six/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PySix(Package): + """Python 2 and 3 compatibility utilities.""" + homepage = "https://pypi.python.org/pypi/six" + url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" + + version('1.9.0', '476881ef4012262dfc8adc645ee786c4') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py new file mode 100644 index 0000000000..ec2e89a098 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sphinx/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PySphinx(Package): + """Sphinx Documentation Generator.""" + homepage = "http://sphinx-doc.org" + url = "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.3.1.tar.gz" + + version('1.3.1', '8786a194acf9673464c5455b11fd4332') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py new file mode 100644 index 0000000000..c17e35b95f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sympy/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PySympy(Package): + """SymPy is a Python library for symbolic mathematics.""" + homepage = "https://pypi.python.org/pypi/sympy" + url = "https://pypi.python.org/packages/source/s/sympy/sympy-0.7.6.tar.gz" + + version('0.7.6', '3d04753974306d8a13830008e17babca') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py new file mode 100644 index 0000000000..037a6fc59f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -0,0 +1,16 @@ +from spack import * +import shutil + +class PyVirtualenv(Package): + """virtualenv is a tool to create isolated Python environments.""" + homepage = "http://virtualenv.readthedocs.org/projects/virtualenv/" + url = "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz" + + version('1.11.6', 'f61cdd983d2c4e6aeabb70b1060d6f49') + version('13.0.1', '1ffc011bde6667f0e37ecd976f4934db') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-yapf/package.py b/var/spack/repos/builtin/packages/py-yapf/package.py new file mode 100644 index 0000000000..12ef191515 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-yapf/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyYapf(Package): + """ Yet Another Python Formatter """ + homepage = "https://github.com/google/yapf" + # base https://pypi.python.org/pypi/cffi + url = "https://github.com/google/yapf/archive/v0.2.1.tar.gz" + + version('0.2.1', '348ccf86cf2057872e4451b204fb914c') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py new file mode 100644 index 0000000000..000881a846 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/package.py @@ -0,0 +1,160 @@ +import os +import re +from contextlib import closing +from llnl.util.lang import match_predicate + +from spack import * +import spack + + +class Python(Package): + """The Python programming language.""" + homepage = "http://www.python.org" + url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz" + + extendable = True + + version('2.7.8', 'd235bdfa75b8396942e360a70487ee00') + version('2.7.10', 'c685ef0b8e9f27b5e3db5db12b268ac6') + + depends_on("openssl") + depends_on("bzip2") + depends_on("readline") + depends_on("ncurses") + depends_on("sqlite") + + def install(self, spec, prefix): + # Need this to allow python build to find the Python installation. + env['PYTHONHOME'] = prefix + + # Rest of install is pretty standard. + configure("--prefix=%s" % prefix, + "--with-threads", + "--enable-shared") + make() + make("install") + + + # ======================================================================== + # Set up environment to make install easy for python extensions. + # ======================================================================== + + @property + def python_lib_dir(self): + return os.path.join('lib', 'python%d.%d' % self.version[:2]) + + + @property + def python_include_dir(self): + return os.path.join('include', 'python%d.%d' % self.version[:2]) + + + @property + def site_packages_dir(self): + return os.path.join(self.python_lib_dir, 'site-packages') + + + def setup_dependent_environment(self, module, spec, ext_spec): + """Called before python modules' install() methods. + + In most cases, extensions will only need to have one line:: + + python('setup.py', 'install', '--prefix=%s' % prefix) + """ + # Python extension builds can have a global python executable function + module.python = Executable(join_path(spec.prefix.bin, 'python')) + + # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. + module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) + module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir) + module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir) + + # Make the site packages directory if it does not exist already. + mkdirp(module.site_packages_dir) + + # Set PYTHONPATH to include site-packages dir for the + # extension and any other python extensions it depends on. + python_paths = [] + for d in ext_spec.traverse(): + if d.package.extends(self.spec): + python_paths.append(os.path.join(d.prefix, self.site_packages_dir)) + os.environ['PYTHONPATH'] = ':'.join(python_paths) + + + # ======================================================================== + # Handle specifics of activating and deactivating python modules. + # ======================================================================== + + def python_ignore(self, ext_pkg, args): + """Add some ignore files to activate/deactivate args.""" + ignore_arg = args.get('ignore', lambda f: False) + + # Always ignore easy-install.pth, as it needs to be merged. + patterns = [r'easy-install\.pth$'] + + # Ignore pieces of setuptools installed by other packages. + if ext_pkg.name != 'py-setuptools': + patterns.append(r'/site\.pyc?$') + patterns.append(r'setuptools\.pth') + patterns.append(r'bin/easy_install[^/]*$') + patterns.append(r'setuptools.*egg$') + + return match_predicate(ignore_arg, patterns) + + + def write_easy_install_pth(self, exts): + paths = [] + for ext in sorted(exts.values()): + ext_site_packages = os.path.join(ext.prefix, self.site_packages_dir) + easy_pth = "%s/easy-install.pth" % ext_site_packages + + if not os.path.isfile(easy_pth): + continue + + with closing(open(easy_pth)) as f: + for line in f: + line = line.rstrip() + + # Skip lines matching these criteria + if not line: continue + if re.search(r'^(import|#)', line): continue + if (ext.name != 'py-setuptools' and + re.search(r'setuptools.*egg$', line)): continue + + paths.append(line) + + site_packages = os.path.join(self.prefix, self.site_packages_dir) + main_pth = "%s/easy-install.pth" % site_packages + + if not paths: + if os.path.isfile(main_pth): + os.remove(main_pth) + + else: + with closing(open(main_pth, 'w')) as f: + f.write("import sys; sys.__plen = len(sys.path)\n") + for path in paths: + f.write("%s\n" % path) + f.write("import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; " + "p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)\n") + + + def activate(self, ext_pkg, **args): + ignore=self.python_ignore(ext_pkg, args) + args.update(ignore=ignore) + + super(Python, self).activate(ext_pkg, **args) + + exts = spack.install_layout.extension_map(self.spec) + exts[ext_pkg.name] = ext_pkg.spec + self.write_easy_install_pth(exts) + + + def deactivate(self, ext_pkg, **args): + args.update(ignore=self.python_ignore(ext_pkg, args)) + super(Python, self).deactivate(ext_pkg, **args) + + exts = spack.install_layout.extension_map(self.spec) + if ext_pkg.name in exts: # Make deactivate idempotent. + del exts[ext_pkg.name] + self.write_easy_install_pth(exts) diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py new file mode 100644 index 0000000000..9da4078a70 --- /dev/null +++ b/var/spack/repos/builtin/packages/qhull/package.py @@ -0,0 +1,27 @@ +from spack import * + +class Qhull(Package): + """Qhull computes the convex hull, Delaunay triangulation, Voronoi + diagram, halfspace intersection about a point, furt hest-site + Delaunay triangulation, and furthest-site Voronoi diagram. The + source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull + implements the Quickhull algorithm for computing the convex + hull. It handles roundoff errors from floating point + arithmetic. It computes volumes, surface areas, and + approximations to the convex hull. + + Qhull does not support triangulation of non-convex surfaces, + mesh generation of non-convex objects, medium-sized inputs in + 9-D and higher, alpha shapes, weighted Voronoi diagrams, + Voronoi volumes, or constrained Delaunay triangulations.""" + + homepage = "http://www.qhull.org" + + version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c', + url="http://www.qhull.org/download/qhull-2012.1-src.tgz") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py new file mode 100644 index 0000000000..0e4abe3b1d --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -0,0 +1,109 @@ +import os +from spack import * +import os + +class Qt(Package): + """Qt is a comprehensive cross-platform C++ application framework.""" + homepage = "http://qt.io" + list_url = 'http://download.qt-project.org/official_releases/qt/' + list_depth = 2 + + version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6', + url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz') + version('5.3.2', 'febb001129927a70174467ecb508a682', + url='http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz') + + version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8', + url='http://download.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz') + version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb', + url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz") + + # Use system openssl for security. + #depends_on("openssl") + + depends_on("glib") + depends_on("gtkplus") + depends_on("libxml2") + depends_on("zlib") + depends_on("dbus") + depends_on("libtiff") + depends_on("libpng") + depends_on("libmng") + depends_on("jpeg") + + # Webkit + # depends_on("gperf") + # depends_on("flex") + # depends_on("bison") + # depends_on("ruby") + # depends_on("icu4c") + + # OpenGL hardware acceleration + depends_on("mesa") + depends_on("libxcb") + + + def setup_dependent_environment(self, module, spec, dep_spec): + """Dependencies of Qt find it using the QTDIR environment variable.""" + os.environ['QTDIR'] = self.prefix + + + def patch(self): + if self.spec.satisfies('@4'): + qmake_conf = 'mkspecs/common/g++-base.conf' + qmake_unix_conf = 'mkspecs/common/g++-unix.conf' + elif self.spec.satisfies('@5'): + qmake_conf = 'qtbase/mkspecs/common/g++-base.conf' + qmake_unix_conf = 'qtbase/mkspecs/common/g++-unix.conf' + else: + return + + # Fix qmake compilers in the default mkspec + filter_file(r'^QMAKE_COMPILER *=.*$', 'QMAKE_COMPILER = cc', qmake_conf) + filter_file(r'^QMAKE_CC *=.*$', 'QMAKE_CC = cc', qmake_conf) + filter_file(r'^QMAKE_CXX *=.*$', 'QMAKE_CXX = c++', qmake_conf) + filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', 'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) + + + @property + def common_config_args(self): + return [ + '-prefix', self.prefix, + '-v', + '-opensource', + '-opengl', + "-release", + '-shared', + '-confirm-license', + '-openssl-linked', + '-dbus-linked', + '-optimized-qmake', + '-no-openvg', + '-no-pch', + # NIS is deprecated in more recent glibc + "-no-nis"] + # Don't disable all the database drivers, but should + # really get them into spack at some point. + + + @when('@4') + def configure(self): + configure('-fast', + '-no-webkit', + *self.common_config_args) + + + @when('@5') + def configure(self): + configure('-no-eglfs', + '-no-directfb', + '-qt-xcb', + # If someone wants to get a webkit build working, be my guest! + '-skip', 'qtwebkit', + *self.common_config_args) + + + def install(self, spec, prefix): + self.configure() + make() + make("install") diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py new file mode 100644 index 0000000000..dacdb71524 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -0,0 +1,22 @@ +from spack import * + +class Qthreads(Package): + """The qthreads API is designed to make using large numbers of + threads convenient and easy, and to allow portable access to + threading constructs used in massively parallel shared memory + environments. The API maps well to both MTA-style threading and + PIM-style threading, and we provide an implementation of this + interface in both a standard SMP context as well as the SST + context. The qthreads API provides access to full/empty-bit + (FEB) semantics, where every word of memory can be marked + either full or empty, and a thread can wait for any word to + attain either state.""" + homepage = "http://www.cs.sandia.gov/qthreads/" + url = "https://qthreads.googlecode.com/files/qthread-1.10.tar.bz2" + + version('1.10', '5af8c8bbe88c2a6d45361643780d1671') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/ravel/package.py b/var/spack/repos/builtin/packages/ravel/package.py new file mode 100644 index 0000000000..01fa941cfe --- /dev/null +++ b/var/spack/repos/builtin/packages/ravel/package.py @@ -0,0 +1,23 @@ +from spack import * + +class Ravel(Package): + """Ravel is a parallel communication trace visualization tool that + orders events according to logical time.""" + + homepage = "https://github.com/scalability-llnl/ravel" + url = 'https://github.com/scalability-llnl/ravel/archive/v1.0.0.tar.gz' + + version('1.0.0', 'b25fece58331c2adfcce76c5036485c2') + + # TODO: make this a build dependency + depends_on('cmake@2.8.9:') + + depends_on('muster@1.0.1:') + depends_on('otf') + depends_on('otf2') + depends_on('qt@5:') + + def install(self, spec, prefix): + cmake('-Wno-dev', *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py new file mode 100644 index 0000000000..1b870e0e7f --- /dev/null +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Readline(Package): + """The GNU Readline library provides a set of functions for use by + applications that allow users to edit command li nes as they + are typed in. Both Emacs and vi editing modes are + available. The Readline library includes additional functions + to maintain a list of previously-entered command lines, to + recall and perhaps reedit those lines, and perform csh-like + history expansion on previous commands. """ + homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" + url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz" + + version('6.3', '33c8fb279e981274f485fd91da77e94a') + + depends_on("ncurses") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make("SHLIB_LIBS=-lncurses") + make("install") diff --git a/var/spack/repos/builtin/packages/rose/add_spack_compiler_recognition.patch b/var/spack/repos/builtin/packages/rose/add_spack_compiler_recognition.patch new file mode 100644 index 0000000000..ce61ae4e4c --- /dev/null +++ b/var/spack/repos/builtin/packages/rose/add_spack_compiler_recognition.patch @@ -0,0 +1,13 @@ +diff --git a/config/compiler-defs.m4 b/config/compiler-defs.m4 +index d7d85d2..780c8de 100644 +--- a/config/compiler-defs.m4 ++++ b/config/compiler-defs.m4 +@@ -28,7 +28,7 @@ dnl predefined by a specific compiler + # g++|gcc|mpicc|mpic++|mpicxx|mpiCC) + # TOO (2/16/2011): added support for tensilica compilers, assuming they are + # like GCC (they use a GCC front-end) +- g++*|gcc*|mpicc|mpic++|mpicxx|mpiCC|xt-xc++|xt-xcc) ++ cc*|c++*|g++*|gcc*|mpicc|mpic++|mpicxx|mpiCC|xt-xc++|xt-xcc) + BACKEND_GCC_MAJOR=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f1` + BACKEND_GCC_MINOR=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f2` + BACKEND_GCC_PATCHLEVEL=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f3` diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py new file mode 100644 index 0000000000..1d7294acab --- /dev/null +++ b/var/spack/repos/builtin/packages/rose/package.py @@ -0,0 +1,39 @@ +#------------------------------------------------------------------------------ +# Author: Justin Too +#------------------------------------------------------------------------------ + +from spack import * + +class Rose(Package): + """A compiler infrastructure to build source-to-source program + transformation and analysis tools. + (Developed at Lawrence Livermore National Lab)""" + + homepage = "http://rosecompiler.org/" + url = "https://github.com/rose-compiler/edg4x-rose" + + version('master', branch='master', git='https://github.com/rose-compiler/edg4x-rose.git') + + patch('add_spack_compiler_recognition.patch') + + depends_on("autoconf@2.69") + depends_on("automake@1.14") + depends_on("libtool@2.4") + depends_on("boost@1.54.0") + depends_on("jdk@8u25-linux-x64") + + def install(self, spec, prefix): + # Bootstrap with autotools + bash = which('bash') + bash('build') + + # Configure, compile & install + with working_dir('rose-build', create=True): + boost = spec['boost'] + + configure = Executable('../configure') + configure("--prefix=" + prefix, + "--with-boost=" + boost.prefix, + "--disable-boost-version-check") + make("install-core") + diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py new file mode 100644 index 0000000000..6b6242362c --- /dev/null +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -0,0 +1,41 @@ +from spack import * +import spack +import os + +class Ruby(Package): + """A dynamic, open source programming language with a focus on + simplicity and productivity.""" + + homepage = "https://www.ruby-lang.org/" + url = "http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz" + + extendable = True + + version('2.2.0', 'cd03b28fd0b555970f5c4fd481700852') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") + + def setup_dependent_environment(self, module, spec, ext_spec): + """Called before ruby modules' install() methods. Sets GEM_HOME + and GEM_PATH to values appropriate for the package being built. + + In most cases, extensions will only need to have one line:: + + gem('install', '.gem') + """ + # Ruby extension builds have global ruby and gem functions + module.ruby = Executable(join_path(spec.prefix.bin, 'ruby')) + module.gem = Executable(join_path(spec.prefix.bin, 'gem')) + + # Set GEM_PATH to include dependent gem directories + ruby_paths = [] + for d in ext_spec.traverse(): + if d.package.extends(self.spec): + ruby_paths.append(d.prefix) + os.environ['GEM_PATH'] = ':'.join(ruby_paths) + # The actual installation path for this gem + os.environ['GEM_HOME'] = ext_spec.prefix diff --git a/var/spack/repos/builtin/packages/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py new file mode 100644 index 0000000000..72900398d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/samtools/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Samtools(Package): + """SAM Tools provide various utilities for manipulating alignments in the SAM format, + including sorting, merging, indexing and generating + alignments in a per-position format""" + + homepage = "www.htslib.org" + version('1.2','988ec4c3058a6ceda36503eebecd4122',url = "https://github.com/samtools/samtools/releases/download/1.2/samtools-1.2.tar.bz2") + + depends_on("zlib") + depends_on("mpc") + parallel=False + patch("samtools1.2.patch",level=0) + + def install(self, spec, prefix): + make("prefix=%s" % prefix, "install") + diff --git a/var/spack/repos/builtin/packages/samtools/samtools1.2.patch b/var/spack/repos/builtin/packages/samtools/samtools1.2.patch new file mode 100644 index 0000000000..ead3ab4e2c --- /dev/null +++ b/var/spack/repos/builtin/packages/samtools/samtools1.2.patch @@ -0,0 +1,20 @@ +--- Makefile 2015-02-03 08:27:34.000000000 -0800 ++++ Makefile.new 2015-07-21 10:38:27.881406892 -0700 +@@ -26,7 +26,7 @@ + CFLAGS = -g -Wall -O2 + LDFLAGS = + LDLIBS = +-DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 ++DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=0 + LOBJS= bam_aux.o bam.o bam_import.o sam.o \ + sam_header.o bam_plbuf.o + AOBJS= bam_index.o bam_plcmd.o sam_view.o \ +@@ -37,7 +37,7 @@ + faidx.o stats.o stats_isize.o bam_flags.o bam_split.o \ + bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o + INCLUDES= -I. -I$(HTSDIR) +-LIBCURSES= -lcurses # -lXCurses ++#LIBCURSES= -lcurses # -lXCurses + + prefix = /usr/local + exec_prefix = $(prefix) diff --git a/var/spack/repos/builtin/packages/scalasca/package.py b/var/spack/repos/builtin/packages/scalasca/package.py new file mode 100644 index 0000000000..cf7a40c1f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/scalasca/package.py @@ -0,0 +1,65 @@ +# FIXME: Add copyright + +from spack import * + +class Scalasca(Package): + """Scalasca is a software tool that supports the performance optimization + of parallel programs by measuring and analyzing their runtime behavior. + The analysis identifies potential performance bottlenecks - in + particular those concerning communication and synchronization - and + offers guidance in exploring their causes.""" + + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.scalasca.org" + url = "http://apps.fz-juelich.de/scalasca/releases/scalasca/2.1/dist/scalasca-2.1.tar.gz" + + version('2.1', 'bab9c2b021e51e2ba187feec442b96e6', + url = 'http://apps.fz-juelich.de/scalasca/releases/scalasca/2.1/dist/scalasca-2.1.tar.gz' ) + + depends_on("mpi") + depends_on("otf2@1.4") + depends_on("cube@4.2.3") + + backend_user_provided = """\ +CC=cc +CXX=c++ +F77=f77 +FC=f90 +CFLAGS=-fPIC +CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=c++ +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +CFLAGS_FOR_BUILD=-fPIC +CXXFLAGS_FOR_BUILD=-fPIC +""" + mpi_user_provided = """\ +MPICC=mpicc +MPICXX=mpicxx +MPIF77=mpif77 +MPIFC=mpif90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" + + def install(self, spec, prefix): + configure_args = ["--prefix=%s" % prefix, + "--with-custom-compilers", + "--with-otf2=%s" % spec['otf2'].prefix.bin, + "--with-cube=%s" % spec['cube'].prefix.bin, + "--enable-shared"] + + configure(*configure_args) + + make() + make("install") + + # FIXME: Modify the configure line to suit your build system here. + configure("--prefix=%s" % prefix) + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py new file mode 100644 index 0000000000..f013bd1cbb --- /dev/null +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -0,0 +1,74 @@ +# FIXME: Add copyright statement + +from spack import * + +class Scorep(Package): + """The Score-P measurement infrastructure is a highly scalable and + easy-to-use tool suite for profiling, event tracing, and online + analysis of HPC applications.""" + + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.vi-hps.org/projects/score-p" + url = "http://www.vi-hps.org/upload/packages/scorep/scorep-1.2.3.tar.gz" + + version('1.3', '9db6f957b7f51fa01377a9537867a55c', + url = 'http://www.vi-hps.org/upload/packages/scorep/scorep-1.3.tar.gz') + + version('1.2.3', '4978084e7cbd05b94517aa8beaea0817') + + depends_on("mpi") + depends_on("papi") + # depends_on("otf2@1.2:1.2.1") # only Score-P 1.2.x + depends_on("otf2") + depends_on("opari2") + depends_on("cube@4.2:4.2.3") + + backend_user_provided = """\ +CC=cc +CXX=c++ +F77=f77 +FC=f90 +CFLAGS=-fPIC +CXXFLAGS=-fPIC +""" + frontend_user_provided = """\ +CC_FOR_BUILD=cc +CXX_FOR_BUILD=c++ +F77_FOR_BUILD=f70 +FC_FOR_BUILD=f90 +CFLAGS_FOR_BUILD=-fPIC +CXXFLAGS_FOR_BUILD=-fPIC +""" + mpi_user_provided = """\ +MPICC=mpicc +MPICXX=mpicxx +MPIF77=mpif77 +MPIFC=mpif90 +MPI_CFLAGS=-fPIC +MPI_CXXFLAGS=-fPIC +""" + + def install(self, spec, prefix): + # Use a custom compiler configuration, otherwise the score-p + # build system messes with spack's compiler settings. + # Create these three files in the build directory + with open("platform-backend-user-provided", "w") as backend_file: + backend_file.write(self.backend_user_provided) + with open("platform-frontend-user-provided", "w") as frontend_file: + frontend_file.write(self.frontend_user_provided) + with open("platform-mpi-user-provided", "w") as mpi_file: + mpi_file.write(self.mpi_user_provided) + + configure_args = ["--prefix=%s" % prefix, + "--with-custom-compilers", + "--with-otf2=%s" % spec['otf2'].prefix.bin, + "--with-opari2=%s" % spec['opari2'].prefix.bin, + "--with-cube=%s" % spec['cube'].prefix.bin, + "--with-papi-header=%s" % spec['papi'].prefix.include, + "--with-papi-lib=%s" % spec['papi'].prefix.lib, + "--enable-shared"] + + configure(*configure_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py new file mode 100644 index 0000000000..79289ff2ad --- /dev/null +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -0,0 +1,40 @@ +from spack import * +import glob +import os + +class Scotch(Package): + """Scotch is a software package for graph and mesh/hypergraph + partitioning, graph clustering, and sparse matrix ordering.""" + homepage = "http://www.labri.fr/perso/pelegrin/scotch/" + url = "http://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz" + list_url = "http://gforge.inria.fr/frs/?group_id=248" + + version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') + + depends_on('mpi') + + + def patch(self): + with working_dir('src/Make.inc'): + makefiles = glob.glob('Makefile.inc.x86-64_pc_linux2*') + filter_file(r'^CCS\s*=.*$', 'CCS = cc', *makefiles) + filter_file(r'^CCD\s*=.*$', 'CCD = cc', *makefiles) + + + def install(self, spec, prefix): + # Currently support gcc and icc on x86_64 (maybe others with + # vanilla makefile) + makefile = 'Make.inc/Makefile.inc.x86-64_pc_linux2' + if spec.satisfies('%icc'): + makefile += '.icc' + + with working_dir('src'): + force_symlink(makefile, 'Makefile.inc') + for app in ('scotch', 'ptscotch'): + make(app) + + install_tree('bin', prefix.bin) + install_tree('lib', prefix.lib) + install_tree('include', prefix.include) + install_tree('man/man1', prefix.share_man1) + diff --git a/var/spack/repos/builtin/packages/scr/package.py b/var/spack/repos/builtin/packages/scr/package.py new file mode 100644 index 0000000000..9fb758f072 --- /dev/null +++ b/var/spack/repos/builtin/packages/scr/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Scr(Package): + """SCR caches checkpoint data in storage on the compute nodes of a + Linux cluster to provide a fast, scalable checkpoint/restart + capability for MPI codes""" + + homepage = "https://computation.llnl.gov/project/scr/" + + depends_on("mpi") +# depends_on("dtcmp") + + version('1.1-7', 'a5930e9ab27d1b7049447c2fd7734ebd', url='http://downloads.sourceforge.net/project/scalablecr/releases/scr-1.1-7.tar.gz') + version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e', url='https://github.com/hpc/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz') + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--with-scr-config-file=" + prefix + "/etc/scr.conf") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py new file mode 100644 index 0000000000..9eda11df15 --- /dev/null +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Silo(Package): + """Silo is a library for reading and writing a wide variety of scientific data to binary, disk files.""" + + homepage = "http://wci.llnl.gov/simulation/computer-codes/silo" + url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.8/silo-4.8.tar.gz" + + #version('4.9', 'a83eda4f06761a86726e918fc55e782a') + version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9') + + depends_on("hdf5@:1.8.12") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-hdf5=%s" %spec['hdf5'].prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/snappy/package.py b/var/spack/repos/builtin/packages/snappy/package.py new file mode 100644 index 0000000000..c8f9ceef7d --- /dev/null +++ b/var/spack/repos/builtin/packages/snappy/package.py @@ -0,0 +1,15 @@ +import os +from spack import * + +class Snappy(Package): + """A fast compressor/decompressor: https://code.google.com/p/snappy""" + + homepage = "https://code.google.com/p/snappy" + url = "https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz" + + version('1.1.3', '7358c82f133dc77798e4c2062a749b73') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/spindle/package.py b/var/spack/repos/builtin/packages/spindle/package.py new file mode 100644 index 0000000000..06a1e14284 --- /dev/null +++ b/var/spack/repos/builtin/packages/spindle/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Spindle(Package): + """Spindle improves the library-loading performance of dynamically + linked HPC applications. Without Spindle large MPI jobs can + overload on a shared file system when loading dynamically + linked libraries, causing site-wide performance problems. + """ + homepage = "https://computation.llnl.gov/project/spindle/" + url = "https://github.com/hpc/Spindle/archive/v0.8.1.tar.gz" + list_url = "https://github.com/hpc/Spindle/releases" + + version('0.8.1', 'f11793a6b9d8df2cd231fccb2857d912') + + depends_on("launchmon") + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py new file mode 100644 index 0000000000..734b0b6cb6 --- /dev/null +++ b/var/spack/repos/builtin/packages/sqlite/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Sqlite(Package): + """SQLite3 is an SQL database engine in a C library. Programs that + link the SQLite3 library can have SQL database access without + running a separate RDBMS process. + """ + homepage = "www.sqlite.org" + + version('3.8.5', '0544ef6d7afd8ca797935ccc2685a9ed', + url='http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/stat/configure_mpicxx.patch b/var/spack/repos/builtin/packages/stat/configure_mpicxx.patch new file mode 100644 index 0000000000..e09056d95c --- /dev/null +++ b/var/spack/repos/builtin/packages/stat/configure_mpicxx.patch @@ -0,0 +1,19 @@ +commit 07ab6e565f939c54fff6580fc8463ea61662871a +Author: Gregory L. Lee +Date: Tue May 20 14:53:35 2014 -0700 + + re-boostrap to update configure + +diff --git a/configure b/configure +index 6c4af7d..30901ea 100755 +--- a/configure ++++ b/configure +@@ -15529,7 +15529,7 @@ fi + done + test -n "$MPICC" || MPICC="$CC" + +- for ac_prog in mpig++ mpiicpc mpxlC mpixlC ++ for ac_prog in mpig++ mpiCC mpicxx mpiicpc mpxlC mpixlC + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py new file mode 100644 index 0000000000..5d81e62731 --- /dev/null +++ b/var/spack/repos/builtin/packages/stat/package.py @@ -0,0 +1,40 @@ +from spack import * + +class Stat(Package): + """Library to create, manipulate, and export graphs Graphlib.""" + homepage = "http://paradyn.org/STAT/STAT.html" + url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz" + + version('2.2.0', '26bd69dd57a15afdd5d0ebdb0b7fb6fc') + version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91') + version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b') + + variant('dysect', default=False, description="enable DySectAPI") + + depends_on('libelf') + depends_on('libdwarf') + depends_on('dyninst') + depends_on('graphlib') + depends_on('graphviz') + depends_on('launchmon') + depends_on('mrnet') + + patch('configure_mpicxx.patch', when='@2.1.0') + + def install(self, spec, prefix): + configure_args = [ + "--enable-gui", + "--prefix=%s" % prefix, + "--disable-examples", # Examples require MPI: avoid this dependency. + "--with-launchmon=%s" % spec['launchmon'].prefix, + "--with-mrnet=%s" % spec['mrnet'].prefix, + "--with-graphlib=%s" % spec['graphlib'].prefix, + "--with-stackwalker=%s" % spec['dyninst'].prefix, + "--with-libdwarf=%s" % spec['libdwarf'].prefix + ] + if '+dysect' in spec: + configure_args.append('--enable-dysectapi') + configure(*configure_args) + + make(parallel=False) + make("install") diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py new file mode 100644 index 0000000000..8b784c8c3c --- /dev/null +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Sundials(Package): + """SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)""" + homepage = "http://computation.llnl.gov/casc/sundials/" + url = "http://computation.llnl.gov/casc/sundials/download/code/sundials-2.5.0.tar.gz" + + version('2.5.0', 'aba8b56eec600de3109cfb967aa3ba0f') + + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py new file mode 100644 index 0000000000..ee536d7063 --- /dev/null +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Swig(Package): + """SWIG is an interface compiler that connects programs written in + C and C++ with scripting languages such as Perl, Python, Ruby, + and Tcl. It works by taking the declarations found in C/C++ + header files and using them to generate the wrapper code that + scripting languages need to access the underlying C/C++ + code. In addition, SWIG provides a variety of customization + features that let you tailor the wrapping process to suit your + application.""" + homepage = "http://www.swig.org" + url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" + + version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + + depends_on('pcre') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py new file mode 100644 index 0000000000..07f44cc45b --- /dev/null +++ b/var/spack/repos/builtin/packages/task/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Task(Package): + """Feature-rich console based todo list manager""" + homepage = "http://www.taskwarrior.org" + url = "http://taskwarrior.org/download/task-2.4.4.tar.gz" + + version('2.4.4', '517450c4a23a5842df3e9905b38801b3') + + depends_on("gnutls") + depends_on("libuuid") + # depends_on("gcc@4.8:") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('-DCMAKE_BUILD_TYPE=release', + '..', + *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/taskd/package.py b/var/spack/repos/builtin/packages/taskd/package.py new file mode 100644 index 0000000000..66bc0cb484 --- /dev/null +++ b/var/spack/repos/builtin/packages/taskd/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Taskd(Package): + """TaskWarrior task synchronization daemon""" + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.taskwarrior.org" + url = "http://taskwarrior.org/download/taskd-1.1.0.tar.gz" + + version('1.1.0', 'ac855828c16f199bdbc45fbc227388d0') + + depends_on("libuuid") + depends_on("gnutls") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('-DCMAKE_BUILD_TYPE=release', + '..', + *std_cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py new file mode 100644 index 0000000000..048fac80aa --- /dev/null +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -0,0 +1,36 @@ +from spack import * + +import os +from llnl.util.filesystem import join_path + +class Tau(Package): + """A portable profiling and tracing toolkit for performance + analysis of parallel programs written in Fortran, C, C++, UPC, + Java, Python.""" + homepage = "http://www.cs.uoregon.edu/research/tau" + url = "http://www.cs.uoregon.edu/research/paracomp/tau/tauprofile/dist/tau-2.23.1.tar.gz" + + version('2.23.1', '6593b47ae1e7a838e632652f0426fe72') + + def install(self, spec, prefix): + # TAU isn't happy with directories that have '@' in the path. Sigh. + change_sed_delimiter('@', ';', 'configure') + change_sed_delimiter('@', ';', 'utils/FixMakefile') + change_sed_delimiter('@', ';', 'utils/FixMakefile.sed.default') + + # After that, it's relatively standard. + configure("-prefix=%s" % prefix) + make("install") + + # Link arch-specific directories into prefix since there is + # only one arch per prefix the way spack installs. + self.link_tau_arch_dirs() + + + def link_tau_arch_dirs(self): + for subdir in os.listdir(self.prefix): + for d in ('bin', 'lib'): + src = join_path(self.prefix, subdir, d) + dest = join_path(self.prefix, d) + if os.path.isdir(src) and not os.path.exists(dest): + os.symlink(join_path(subdir, d), dest) diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py new file mode 100644 index 0000000000..529adf7788 --- /dev/null +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -0,0 +1,22 @@ +from spack import * + +class Tcl(Package): + """Tcl (Tool Command Language) is a very powerful but easy to + learn dynamic programming language, suitable for a very wide + range of uses, including web and desktop applications, + networking, administration, testing and many more. Open source + and business-friendly, Tcl is a mature yet evolving language + that is truly cross platform, easily deployed and highly + extensible.""" + homepage = "http://www.tcl.tk" + + version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', + url="http://prdownloads.sourceforge.net/tcl/tcl8.6.3-src.tar.gz") + + depends_on('zlib') + + def install(self, spec, prefix): + with working_dir('unix'): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/the_silver_searcher/package.py b/var/spack/repos/builtin/packages/the_silver_searcher/package.py new file mode 100644 index 0000000000..e4020b6766 --- /dev/null +++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py @@ -0,0 +1,17 @@ +from spack import * + +class TheSilverSearcher(Package): + """Fast recursive grep alternative""" + homepage = "http://geoff.greer.fm/ag/" + url = "http://geoff.greer.fm/ag/releases/the_silver_searcher-0.30.0.tar.gz" + + version('0.30.0', '95e2e7859fab1156c835aff7413481db') + + depends_on('pcre') + depends_on('xz') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py new file mode 100644 index 0000000000..0e15052f64 --- /dev/null +++ b/var/spack/repos/builtin/packages/thrift/package.py @@ -0,0 +1,44 @@ +from spack import * + +class Thrift(Package): + """The Apache Thrift software framework, for scalable cross-language services + development, combines a software stack with a code generation engine to build + services that work efficiently and seamlessly between C++, Java, Python, PHP, + Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml + and Delphi and other languages.""" + + homepage = "http://thrift.apache.org" + url = "http://apache.mirrors.ionfish.org/thrift/0.9.2/thrift-0.9.2.tar.gz" + + version('0.9.2', '89f63cc4d0100912f4a1f8a9dee63678') + + extends("python") + + depends_on("autoconf") + depends_on("automake") + depends_on("bison") + depends_on("boost") + depends_on("flex") + depends_on("jdk") + depends_on("libtool") + depends_on("openssl") + depends_on("python") + + # Compilation fails for most languages, fortunately cpp installs fine + # All other languages (yes, including C) are omitted until someone needs them + def install(self, spec, prefix): + env["PY_PREFIX"] = prefix + env["JAVA_PREFIX"] = prefix + + configure("--prefix=%s" % prefix, + "--with-boost=%s" % spec['boost'].prefix, + "--with-c=no", + "--with-go=no", + "--with-python=yes", + "--with-lua=no", + "--with-php=no", + "--with-qt4=no", + "--enable-tests=no") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py new file mode 100644 index 0000000000..96736f6f95 --- /dev/null +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -0,0 +1,22 @@ +from spack import * + +class Tk(Package): + """Tk is a graphical user interface toolkit that takes developing + desktop applications to a higher level than conventional + approaches. Tk is the standard GUI not only for Tcl, but for + many other dynamic languages, and can produce rich, native + 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.3-src.tar.gz" + + version('src', '85ca4dbf4dcc19777fd456f6ee5d0221') + + depends_on("tcl") + + def install(self, spec, prefix): + with working_dir('unix'): + configure("--prefix=%s" % prefix, + "--with-tcl=%s" % spec['tcl'].prefix.lib) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py new file mode 100644 index 0000000000..23d36db427 --- /dev/null +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -0,0 +1,24 @@ +from spack import * + +class Tmux(Package): + """tmux is a terminal multiplexer. What is a terminal multiplexer? It lets + you switch easily between several programs in one terminal, detach them (they + keep running in the background) and reattach them to a different terminal. And + do a lot more. + """ + + homepage = "http://tmux.sourceforge.net" + url = "http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz" + + version('1.9a', 'b07601711f96f1d260b390513b509a2d') + + depends_on('libevent') + depends_on('ncurses') + + def install(self, spec, prefix): + configure( + "--prefix=%s" % prefix, + "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix)) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/tmuxinator/package.py b/var/spack/repos/builtin/packages/tmuxinator/package.py new file mode 100644 index 0000000000..26c061cbd6 --- /dev/null +++ b/var/spack/repos/builtin/packages/tmuxinator/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Tmuxinator(Package): + """A session configuration creator and manager for tmux""" + homepage = "https://github.com/tmuxinator/tmuxinator" + url = "https://github.com/tmuxinator/tmuxinator" + + version('0.6.11', + git='https://github.com/tmuxinator/tmuxinator', + tag='v0.6.11') + + extends('ruby') + + def install(self, spec, prefix): + gem('build', 'tmuxinator.gemspec') + gem('install', 'tmuxinator-{}.gem'.format(self.version)) + diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py new file mode 100644 index 0000000000..7c43f796a4 --- /dev/null +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -0,0 +1,50 @@ +from spack import * + + +class Trilinos(Package): + """ + The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented + software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. + A unique design feature of Trilinos is its focus on packages. + """ + homepage = "https://trilinos.org/" + url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" + + version('12.2.1', '6161926ea247863c690e927687f83be9') + version('12.0.1', 'bd99741d047471e127b8296b2ec08017') + version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426') + version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') + version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') + + variant('mpi', default=True, description='Add a dependency on MPI and enables MPI dependent packages') + + # Everything should be compiled with -fpic + depends_on('blas') + depends_on('lapack') + depends_on('boost') + depends_on('netcdf') + depends_on('matio') + depends_on('glm') + depends_on('swig') + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + + options = [ + '-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', + '-DTrilinos_ENABLE_TESTS:BOOL=OFF', + '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', + '-DBUILD_SHARED_LIBS:BOOL=ON', + '-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix, + '-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix + ] + if '+mpi' in spec: + mpi_options = ['-DTPL_ENABLE_MPI:BOOL=ON'] + options.extend(mpi_options) + + # -DCMAKE_INSTALL_PREFIX and all the likes... + options.extend(std_cmake_args) + with working_dir('spack-build', create=True): + cmake('..', *options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py new file mode 100644 index 0000000000..d3f2d1b473 --- /dev/null +++ b/var/spack/repos/builtin/packages/uncrustify/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Uncrustify(Package): + """Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA""" + + homepage = "http://uncrustify.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz" + + version('0.61', 'b6140106e74c64e831d0b1c4b6cf7727') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py new file mode 100644 index 0000000000..cb7ceabf57 --- /dev/null +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -0,0 +1,20 @@ +from spack import * +import os + +class UtilLinux(Package): + """Util-linux is a suite of essential utilities for any Linux system.""" + + homepage = "http://freecode.com/projects/util-linux" + url = "https://www.kernel.org/pub/linux/utils/util-linux/v2.25/util-linux-2.25.tar.gz" + + version('2.25', 'f6d7fc6952ec69c4dc62c8d7c59c1d57') + + depends_on("python@2.7:") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "PKG_CONFIG_PATH=%s/pkgconfig" % spec['python'].prefix.lib, + "--disable-use-tty-group") + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py new file mode 100644 index 0000000000..4099b3257f --- /dev/null +++ b/var/spack/repos/builtin/packages/vim/package.py @@ -0,0 +1,83 @@ +from spack import * + +class Vim(Package): + """Vim is a highly configurable text editor built to enable efficient text + editing. It is an improved version of the vi editor distributed with most + UNIX systems. Vim is often called a "programmer's editor," and so useful + for programming that many consider it an entire IDE. It's not just for + programmers, though. Vim is perfect for all kinds of text editing, from + composing email to editing configuration files. + """ + + homepage = "http://www.vim.org" + url = "ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2" + list_url = "http://ftp.vim.org/pub/vim/unix/" + + version('7.4', '607e135c559be642f210094ad023dc65') + version('7.3', '5b9510a17074e2b37d8bb38ae09edbf2') + version('7.2', 'f0901284b338e448bfd79ccca0041254') + version('7.1', '44c6b4914f38d6f9aa959640b89da329') + version('7.0', '4ca69757678272f718b1041c810d82d8') + version('6.4', '774c14d93ce58674b3b2c880edd12d77') + version('6.3', '821fda8f14d674346b87e3ef9cb96389') + version('6.2', 'c49d360bbd069d00e2a57804f2a123d9') + version('6.1.405', 'd220ff58f2c72ed606e6d0297c2f2a7c') + version('6.1', '7fd0f915adc7c0dab89772884268b030') + version('6.0', '9d9ca84d489af6b3f54639dd97af3774') + + feature_sets = ('huge', 'big', 'normal', 'small', 'tiny') + for fs in feature_sets: + variant(fs, default=False, description="Use '%s' feature set" % fs) + + variant('python', default=False, description="build with Python") + depends_on('python', when='+python') + + variant('ruby', default=False, description="build with Ruby") + depends_on('ruby', when='+ruby') + + variant('cscope', default=False, description="build with cscope support") + depends_on('cscope', when='+cscope') + + variant('gui', default=False, description="build with gui (gvim)") + # virtual dependency? + + def install(self, spec, prefix): + feature_set = None + for fs in self.feature_sets: + if "+" + fs in spec: + if feature_set is not None: + tty.error("Only one feature set allowed, both %s and %s specified" + % (feature_set, fs)) + feature_set = fs + if '+gui' in spec: + if feature_set is not None: + if feature_set is not 'huge': + tty.error("+gui variant requires 'huge' feature set, %s was specified" + % feature_set) + feature_set = 'huge' + if feature_set is None: + feature_set = 'normal' + + configure_args = [] + configure_args.append("--with-features=" + feature_set) + + if '+python' in spec: + configure_args.append("--enable-pythoninterp=yes") + else: + configure_args.append("--enable-pythoninterp=dynamic") + + if '+ruby' in spec: + configure_args.append("--enable-rubyinterp=yes") + else: + configure_args.append("--enable-rubyinterp=dynamic") + + if '+gui' in spec: + configure_args.append("--enable-gui=auto") + + if '+cscope' in spec: + configure_args.append("--enable-cscope") + + configure("--prefix=%s" % prefix, *configure_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py new file mode 100644 index 0000000000..4a27a8fedb --- /dev/null +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -0,0 +1,40 @@ +from spack import * + +class Vtk(Package): + """The Visualization Toolkit (VTK) is an open-source, freely + available software system for 3D computer graphics, image + processing and visualization. """ + homepage = "http://www.vtk.org" + url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" + + version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d') + + depends_on("qt") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake_args = [ + "..", + "-DBUILD_SHARED_LIBS=ON", + # Disable wrappers for other languages. + "-DVTK_WRAP_PYTHON=OFF", + "-DVTK_WRAP_JAVA=OFF", + "-DVTK_WRAP_TCL=OFF"] + cmake_args.extend(std_cmake_args) + + # Enable Qt support here. + cmake_args.extend([ + "-DQT_QMAKE_EXECUTABLE:PATH=%s/qmake" % spec['qt'].prefix.bin, + "-DVTK_Group_Qt:BOOL=ON", + # Ignore webkit because it's hard to build w/Qt + "-DVTK_Group_Qt=OFF", + "-DModule_vtkGUISupportQt:BOOL=ON", + "-DModule_vtkGUISupportQtOpenGL:BOOL=ON" + ]) + + if spec['qt'].satisfies('@5'): + cmake_args.append("-DVTK_QT_VERSION:STRING=5") + + cmake(*cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py new file mode 100644 index 0000000000..c8fd025122 --- /dev/null +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Wget(Package): + """GNU Wget is a free software package for retrieving files using + HTTP, HTTPS and FTP, the most widely-used Internet protocols. It + is a non-interactive commandline tool, so it may easily be called + from scripts, cron jobs, terminals without X-Windows support, + etc.""" + + homepage = "http://www.gnu.org/software/wget/" + url = "http://ftp.gnu.org/gnu/wget/wget-1.16.tar.xz" + + version('1.16', 'fe102975ab3a6c049777883f1bb9ad07') + + depends_on("openssl") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-ssl=openssl") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/wx/package.py b/var/spack/repos/builtin/packages/wx/package.py new file mode 100644 index 0000000000..1813a8c8a5 --- /dev/null +++ b/var/spack/repos/builtin/packages/wx/package.py @@ -0,0 +1,24 @@ +from spack import * + +class Wx(Package): + """wxWidgets is a C++ library that lets developers create + applications for Windows, Mac OS X, Linux and other platforms + with a single code base. It has popular language bindings for + Python, Perl, Ruby and many other languages, and unlike other + cross-platform toolkits, wxWidgets gives applications a truly + native look and feel because it uses the platform's native API + rather than emulating the GUI. It's also extensive, free, + open-source and mature.""" + homepage = "http://www.wxwidgets.org/" + + version('2.8.12', '2fa39da14bc06ea86fe902579fedc5b1', + url="https://sourceforge.net/projects/wxwindows/files/2.8.12/wxWidgets-2.8.12.tar.gz") + version('3.0.1', 'dad1f1cd9d4c370cbc22700dc492da31', + url="https://sourceforge.net/projects/wxwindows/files/3.0.1/wxWidgets-3.0.1.tar.bz2") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, "--enable-unicode", "--disable-precomp-headers") + + make(parallel=False) + make("install") + diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py new file mode 100644 index 0000000000..790cead517 --- /dev/null +++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Wxpropgrid(Package): + """wxPropertyGrid is a property sheet control for wxWidgets. In + other words, it is a specialized two-column grid for editing + properties such as strings, numbers, flagsets, string arrays, + and colours.""" + homepage = "http://wxpropgrid.sourceforge.net/" + url = "http://prdownloads.sourceforge.net/wxpropgrid/wxpropgrid-1.4.15-src.tar.gz" + + version('1.4.15', 'f44b5cd6fd60718bacfabbf7994f1e93') + + depends_on("wx") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, "--with-wxdir=%s" % spec['wx'].prefix.bin, "--enable-unicode") + + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/xcb-proto/package.py b/var/spack/repos/builtin/packages/xcb-proto/package.py new file mode 100644 index 0000000000..17a94bd892 --- /dev/null +++ b/var/spack/repos/builtin/packages/xcb-proto/package.py @@ -0,0 +1,15 @@ +from spack import * + +class XcbProto(Package): + """Protocol for libxcb""" + + homepage = "http://xcb.freedesktop.org/" + url = "http://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.gz" + + version('1.11', 'c8c6cb72c84f58270f4db1f39607f66a') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py new file mode 100644 index 0000000000..ba6c9733a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/xz/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Xz(Package): + """XZ Utils is free general-purpose data compression software with + high compression ratio. XZ Utils were written for POSIX-like + systems, but also work on some not-so-POSIX systems. XZ Utils are + the successor to LZMA Utils.""" + homepage = "http://tukaani.org/xz/" + url = "http://tukaani.org/xz/xz-5.2.0.tar.bz2" + + version('5.2.0', '867cc8611760240ebf3440bd6e170bb9', + url = 'http://tukaani.org/xz/xz-5.2.0.tar.bz2') + version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af', + url = 'http://tukaani.org/xz/xz-5.2.2.tar.bz2') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") + diff --git a/var/spack/repos/builtin/packages/yasm/package.py b/var/spack/repos/builtin/packages/yasm/package.py new file mode 100644 index 0000000000..d3a695b16d --- /dev/null +++ b/var/spack/repos/builtin/packages/yasm/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Yasm(Package): + """Yasm is a complete rewrite of the NASM-2.11.06 assembler. It + supports the x86 and AMD64 instruction sets, accepts NASM and + GAS assembler syntaxes and outputs binary, ELF32 and ELF64 + object formats.""" + homepage = "http://yasm.tortall.net" + url = "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" + + version('1.3.0', 'fc9e586751ff789b34b1f21d572d96af') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py new file mode 100644 index 0000000000..b5a1e3d4cd --- /dev/null +++ b/var/spack/repos/builtin/packages/zeromq/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Zeromq(Package): + """ The ZMQ networking/concurrency library and core API """ + homepage = "http://zguide.zeromq.org/" + url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz" + + version('4.1.2', '159c0c56a895472f02668e692d122685') + version('4.1.1', '0a4b44aa085644f25c177f79dc13f253') + version('4.0.7', '9b46f7e7b0704b83638ef0d461fd59ab') + version('4.0.6', 'd47dd09ed7ae6e7fd6f9a816d7f5fdf6') + version('4.0.5', '73c39f5eb01b9d7eaf74a5d899f1d03d') + + depends_on("libsodium") + + def install(self, spec, prefix): + configure("--with-libsodium","--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py new file mode 100644 index 0000000000..2770f781ac --- /dev/null +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Zlib(Package): + """zlib is designed to be a free, general-purpose, legally unencumbered -- + that is, not covered by any patents -- lossless data-compression library for + use on virtually any computer hardware and operating system. + """ + + homepage = "http://zlib.net" + url = "http://zlib.net/zlib-1.2.8.tar.gz" + + version('1.2.8', '44d667c142d7cda120332623eab69f40') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py new file mode 100644 index 0000000000..99ef9de2e5 --- /dev/null +++ b/var/spack/repos/builtin/packages/zsh/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Zsh(Package): + """ The ZSH shell """ + homepage = "http://www.zsh.org" + url = "http://www.zsh.org/pub/zsh-5.0.8.tar.bz2" + + version('5.0.8', 'e6759e8dd7b714d624feffd0a73ba0fe') + + depends_on("pcre") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/repo.yaml b/var/spack/repos/builtin/repo.yaml new file mode 100644 index 0000000000..54b282db6b --- /dev/null +++ b/var/spack/repos/builtin/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: builtin -- cgit v1.2.3-70-g09d2 From a540a68561db4067b66b4d4d0920b217fea4fda4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 22 Dec 2015 18:51:49 -0500 Subject: Make OpenSSL build on Darwin --- var/spack/packages/openssl/package.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index 40648fca49..82c315da33 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -17,12 +17,24 @@ class Openssl(Package): parallel = False def install(self, spec, prefix): - config = Executable("./config") - config("--prefix=%s" % prefix, - "--openssldir=%s/etc/openssl" % prefix, - "zlib", - "no-krb5", - "shared") + if spec.satisfies("=darwin-x86_64"): + perl = which('perl') + perl("./Configure", + "--prefix=%s" % prefix, + "--openssldir=%s/etc/openssl" % prefix, + "zlib", + "no-krb5", + "shared", + "darwin64-x86_64-cc") + perl('-pi', '-e', 's/-arch x86_64//g', 'Makefile') + else: + exit(1) + config = Executable("./config") + config("--prefix=%s" % prefix, + "--openssldir=%s/etc/openssl" % prefix, + "zlib", + "no-krb5", + "shared") make() make("install") -- cgit v1.2.3-70-g09d2 From 21dae4577a6990384a4fe330cdef09b902d6044e Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Dec 2015 10:20:13 +0100 Subject: R : updated package --- var/spack/packages/R/package.py | 64 +++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 24 deletions(-) (limited to 'var') diff --git a/var/spack/packages/R/package.py b/var/spack/packages/R/package.py index 2e6f65a742..2471dff09b 100644 --- a/var/spack/packages/R/package.py +++ b/var/spack/packages/R/package.py @@ -1,33 +1,49 @@ from spack import * + class R(Package): - """R is 'GNU S', a freely available language and environment for - statistical computing and graphics which provides a wide va - riety of statistical and graphical techniques: linear and - nonlinear modelling, statistical tests, time series analysis, - classification, clustering, etc. Please consult the R project - homepage for further information.""" - homepage = "http://www.example.com" - url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" + """ + R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a + wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series + analysis, classification, clustering, etc. Please consult the R project homepage for further information. + """ + homepage = "https://www.r-project.org" + url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" + version('3.2.3', '1ba3dac113efab69e706902810cc2970') + version('3.2.2', '57cef5c2e210a5454da1979562a10e5b') + version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3') + version('3.2.0', '66fa17ad457d7e618191aa0f52fc402e') + version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4') version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74') - depends_on("readline") - depends_on("ncurses") - depends_on("icu") - depends_on("glib") - depends_on("zlib") - depends_on("libtiff") - depends_on("jpeg") - depends_on("cairo") - depends_on("pango") - depends_on("freetype") - depends_on("tcl") - depends_on("tk") + variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK') + + # Virtual dependencies + depends_on('blas', when='+external-lapack') + depends_on('lapack', when='+external-lapack') + + # Concrete dependencies + depends_on('readline') + depends_on('ncurses') + depends_on('icu') + depends_on('glib') + depends_on('zlib') + depends_on('libtiff') + depends_on('jpeg') + depends_on('cairo') + depends_on('pango') + depends_on('freetype') + depends_on('tcl') + depends_on('tk') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-R-shlib", - "--enable-BLAS-shlib") + options = ['--prefix=%s' % prefix, + '--enable-R-shlib', + '--enable-BLAS-shlib'] + if '+external-lapack' in spec: + options.extend(['--with-blas', '--with-lapack']) + + configure(*options) make() - make("install") + make('install') -- cgit v1.2.3-70-g09d2 From a58dd8f6abb00281af1b469981dce760cd1c55ff Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 23 Dec 2015 18:19:26 -0500 Subject: Remove leftover debug statement --- var/spack/packages/openssl/package.py | 1 - 1 file changed, 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index 82c315da33..a51bace666 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -28,7 +28,6 @@ class Openssl(Package): "darwin64-x86_64-cc") perl('-pi', '-e', 's/-arch x86_64//g', 'Makefile') else: - exit(1) config = Executable("./config") config("--prefix=%s" % prefix, "--openssldir=%s/etc/openssl" % prefix, -- cgit v1.2.3-70-g09d2 From 01f7e768f6638add78e213f0430d091c471cb230 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 23 Dec 2015 22:49:42 -0500 Subject: Enable several variants for HDF5 +cxx, +fortran: Enable support for the respective languages +threadsafe: Enable multi-threading --- var/spack/packages/hdf5/package.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py index adac79d9bb..fdc77c121a 100644 --- a/var/spack/packages/hdf5/package.py +++ b/var/spack/packages/hdf5/package.py @@ -10,12 +10,15 @@ class Hdf5(Package): url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz" list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 - + version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') + variant('cxx', default=False, description='Enable C++ support') + variant('fortran', default=False, description='Enable Fortran support') variant('mpi', default=False, description='Enable MPI support') + variant('threadsafe', default=False, description='Enable multithreading') depends_on("mpi", when='+mpi') depends_on("zlib") @@ -23,11 +26,36 @@ class Hdf5(Package): # TODO: currently hard-coded to use OpenMPI def install(self, spec, prefix): extra_args = [] + if '+cxx' in spec: + extra_args.extend([ + '--enable-cxx' + ]) + if '+fortran' in spec: + extra_args.extend([ + '--enable-fortran', + '--enable-fortran2003' + ]) if '+mpi' in spec: + # The HDF5 configure script warns if cxx and mpi are enabled + # together. There doesn't seem to be a real reason for this, except + # that parts of the MPI interface are not accessible via the C++ + # interface. Since they are still accessible via the C interface, + # this is not actually a problem. extra_args.extend([ "--enable-parallel", + "--enable-unsupported", "CC=%s" % spec['mpi'].prefix.bin + "/mpicc", "CXX=%s" % spec['mpi'].prefix.bin + "/mpic++", + "FC=%s" % spec['mpi'].prefix.bin + "/mpifort", + ]) + if '+threads' in spec: + if '+cxx' in spec or '+fortran' in spec: + die("Cannot use variant +threads with either +cxx or +fortran") + extra_args.extend([ + '--enable-threadsafe', + '--disable-hl', + 'CPPFLAGS=-DHDatexit=""', + 'CFLAGS=-DHDatexit=""' ]) configure( -- cgit v1.2.3-70-g09d2 From be12720eb797e5a3a6031067248035db7d291962 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 25 Dec 2015 14:02:56 -0500 Subject: Use `filter_file` instead of calling perl --- var/spack/packages/openssl/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index a51bace666..e1039fcbe1 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -26,7 +26,7 @@ class Openssl(Package): "no-krb5", "shared", "darwin64-x86_64-cc") - perl('-pi', '-e', 's/-arch x86_64//g', 'Makefile') + filter_file(r'-arch x86_64', '', 'Makefile') else: config = Executable("./config") config("--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From ff0d871612c05d803fdabb8a5b870b7af961cdc2 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 27 Dec 2015 21:13:18 -0800 Subject: Remove mock_configs; tests no longer modify spack home directory. --- lib/spack/spack/__init__.py | 4 --- lib/spack/spack/test/mock_packages_test.py | 32 ++++++++++++++++++++-- .../mock_configs/site_spackconfig/compilers.yaml | 12 -------- 3 files changed, 30 insertions(+), 18 deletions(-) delete mode 100644 var/spack/mock_configs/site_spackconfig/compilers.yaml (limited to 'var') diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index de1a98d092..973ba64b96 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -78,10 +78,6 @@ installed_db = Database(install_path) packages_path = join_path(repos_path, "builtin") mock_packages_path = join_path(repos_path, "builtin.mock") -mock_config_path = join_path(var_path, "mock_configs") -mock_site_config = join_path(mock_config_path, "site_spackconfig") -mock_user_config = join_path(mock_config_path, "user_spackconfig") - # # This controls how spack lays out install prefixes and # stage directories. diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 320c2921b0..7642edcf4b 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -23,14 +23,32 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys +import os import unittest +import tempfile from ordereddict_backport import OrderedDict +from llnl.util.filesystem import mkdirp + import spack import spack.config from spack.repository import RepoPath from spack.spec import Spec +mock_compiler_config = """\ +compilers: + all: + clang@3.3: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + gcc@4.5.0: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran +""" class MockPackagesTest(unittest.TestCase): def initmock(self): @@ -43,11 +61,21 @@ class MockPackagesTest(unittest.TestCase): spack.config.clear_config_caches() self.real_scopes = spack.config.config_scopes + # Mock up temporary configuration directories + self.temp_config = tempfile.mkdtemp() + self.mock_site_config = os.path.join(self.temp_config, 'site') + self.mock_user_config = os.path.join(self.temp_config, 'user') + mkdirp(self.mock_site_config) + mkdirp(self.mock_user_config) + comp_yaml = os.path.join(self.mock_site_config, 'compilers.yaml') + with open(comp_yaml, 'w') as f: + f.write(mock_compiler_config) + # TODO: Mocking this up is kind of brittle b/c ConfigScope # TODO: constructor modifies config_scopes. Make it cleaner. spack.config.config_scopes = OrderedDict() - spack.config.ConfigScope('site', spack.mock_site_config) - spack.config.ConfigScope('user', spack.mock_user_config) + spack.config.ConfigScope('site', self.mock_site_config) + spack.config.ConfigScope('user', self.mock_user_config) # Store changes to the package's dependencies so we can # restore later. diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml deleted file mode 100644 index 0a2dc893e2..0000000000 --- a/var/spack/mock_configs/site_spackconfig/compilers.yaml +++ /dev/null @@ -1,12 +0,0 @@ -compilers: - all: - clang@3.3: - cc: /path/to/clang - cxx: /path/to/clang++ - f77: None - fc: None - gcc@4.5.0: - cc: /path/to/gcc - cxx: /path/to/g++ - f77: /path/to/gfortran - fc: /path/to/gfortran -- cgit v1.2.3-70-g09d2 From 4ae98f8b214ea491a50aa2ddf3d995625d1b35f7 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 15:37:06 -0800 Subject: significant llvm update This update significantly reworks the llvm and clang packages. The llvm package now includes variants allowing it to build and install any and all of: * clang * lldb * llvm's libunwind (why, WHY did they name it this?!?) * polly (including building it directly into the clang tools, 3.7.0 only) * clang extra tools * compiler-rt (sanitizers) * clang lto (the gold linker plugin that allows same to work) * libcxx/libcxxabi * libopenmp, also setting the default openmp runtime to same, when parameters happen this shoudl be an option of libomp or libgomp Ideally, this should have rpath setup like the gcc package does, but clang's driver has no support for specs as such, and no clearly equivalent mechanism either. If anyone has ideas on this, they would be welcome. One significant note related to gcc though, if you test this on LLNL systems, or anywhere that has multiple GCCs straddling the dwarf2 boundary and sharing a libstdc++, build a gcc with spack and use that to build clang. If you use a gcc4.8+ to build this with an older libstdc++ it will fail on missing unwind symbols because of the discrepancy. Resource handling has been changed slightly to move the unpacked archive into the target rather than use symlinks, because symlinks break certain kinds of relative paths, and orders resource staging such that nested resources are unpacked after outer ones. --- lib/spack/spack/package.py | 22 +++-- var/spack/packages/clang/package.py | 95 ------------------ var/spack/packages/llvm/package.py | 186 +++++++++++++++++++++++++++++++----- 3 files changed, 176 insertions(+), 127 deletions(-) delete mode 100644 var/spack/packages/clang/package.py (limited to 'var') diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 118069a0a7..fe82d58394 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -36,6 +36,7 @@ README. import os import errno import re +import shutil import time import itertools import subprocess @@ -711,15 +712,20 @@ class Package(object): target_path = join_path(self.stage.source_path, resource.destination) link_path = join_path(target_path, value) source_path = join_path(stage.source_path, key) + + try: + os.makedirs(target_path) + except OSError as err: + if err.errno == errno.EEXIST and os.path.isdir(target_path): + pass + else: raise + + # NOTE: a reasonable fix for the TODO above might be to have + # these expand in place, but expand_archive does not offer + # this + if not os.path.exists(link_path): - # Create a symlink - try: - os.makedirs(target_path) - except OSError as err: - if err.errno == errno.EEXIST and os.path.isdir(target_path): - pass - else: raise - os.symlink(source_path, link_path) + shutil.move(source_path, link_path) ########## self.stage.chdir_to_source() diff --git a/var/spack/packages/clang/package.py b/var/spack/packages/clang/package.py deleted file mode 100644 index e46e08d5f1..0000000000 --- a/var/spack/packages/clang/package.py +++ /dev/null @@ -1,95 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## - - -from spack import * - -import os -import os.path - -class Clang(Package): - """The goal of the Clang project is to create a new C, C++, - Objective C and Objective C++ front-end for the LLVM compiler. - """ - homepage = 'http://clang.llvm.org' - url = 'http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz' - - depends_on('llvm@3.7.0', when='@3.7.0') - depends_on('llvm@3.6.2', when='@3.6.2') - depends_on('llvm@3.5.1', when='@3.5.1') - - version('3.7.0', '8f9d27335e7331cf0a4711e952f21f01', url='http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz') - version('3.6.2', 'ff862793682f714bb7862325b9c06e20', url='http://llvm.org/releases/3.6.2/cfe-3.6.2.src.tar.xz') - version('3.5.1', '93f9532f8f7e6f1d8e5c1116907051cb', url='http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz') - - ########## - # @3.7.0 - resource(name='clang-tools-extra', - url='http://llvm.org/releases/3.7.0/clang-tools-extra-3.7.0.src.tar.xz', - md5='d5a87dacb65d981a427a536f6964642e', destination='tools', when='@3.7.0') - ########## - - def install(self, spec, prefix): - env['CXXFLAGS'] = self.compiler.cxx11_flag - - with working_dir('spack-build', create=True): - - options = [] - if '@3.7.0:' in spec: - options.append('-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp') - options.extend(std_cmake_args) - - cmake('..', - '-DCLANG_PATH_TO_LLVM_BUILD:PATH=%s' % spec['llvm'].prefix, - '-DLLVM_MAIN_SRC_DIR:PATH=%s' % spec['llvm'].prefix, - *options) - make() - make("install") - # CLang doesn't look in llvm folders for system headers... - self.link_llvm_directories(spec) - - def link_llvm_directories(self, spec): - - def clang_include_dir_at(root): - return join_path(root, 'include') - - def clang_lib_dir_at(root): - return join_path(root, 'lib/clang/', str(self.version), 'include') - - def do_link(source_dir, destination_dir): - if os.path.exists(source_dir): - for name in os.listdir(source_dir): - source = join_path(source_dir, name) - link = join_path(destination_dir, name) - os.symlink(source, link) - - # Link folder and files in include - llvm_dir = clang_include_dir_at(spec['llvm'].prefix) - clang_dir = clang_include_dir_at(self.prefix) - do_link(llvm_dir, clang_dir) - # Link folder and files in lib - llvm_dir = clang_lib_dir_at(spec['llvm'].prefix) - clang_dir = clang_lib_dir_at(self.prefix) - do_link(llvm_dir, clang_dir) \ No newline at end of file diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index a3307584e0..eeb2c11fe2 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -35,38 +35,176 @@ class Llvm(Package): homepage = 'http://llvm.org/' url = 'http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz' - version('3.7.0', 'b98b9495e5655a672d6cb83e1a180f8e', url='http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz') - version('3.6.2', '0c1ee3597d75280dee603bae9cbf5cc2', url='http://llvm.org/releases/3.6.2/llvm-3.6.2.src.tar.xz') - version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz') version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') # currently required by mesa package + variant('debug', default=False, description="Build a debug version of LLVM, this increases binary size by an order of magnitude, make sure you have 20-30gb of space available to build this") + variant('clang', default=True, description="Build the LLVM C/C++/Objective-C compiler frontend") + variant('lldb', default=True, description="Build the LLVM debugger") + variant('internal_unwind', default=True, description="Build the libcxxabi libunwind") + variant('polly', default=True, description="Build the LLVM polyhedral optimization plugin, only builds for 3.7.0+") + variant('libcxx', default=True, description="Build the LLVM C++ standard library") + variant('compiler-rt', default=True, description="Build the LLVM compiler runtime, including sanitizers") + variant('lto', default=True, description="Add support for LTO with the gold linker plugin") + + + # Universal dependency depends_on('python@2.7:') - variant('libcxx', default=False, description="Builds the LLVM Standard C++ library targeting C++11") - - ########## - # @3.7.0 - resource(name='compiler-rt', - url='http://llvm.org/releases/3.7.0/compiler-rt-3.7.0.src.tar.xz', md5='383c10affd513026f08936b5525523f5', - destination='projects', when='@3.7.0') - resource(name='openmp', - url='http://llvm.org/releases/3.7.0/openmp-3.7.0.src.tar.xz', md5='f482c86fdead50ba246a1a2b0bbf206f', - destination='projects', when='@3.7.0') - resource(name='libcxx', - url='http://llvm.org/releases/3.7.0/libcxx-3.7.0.src.tar.xz', md5='46aa5175cbe1ad42d6e9c995968e56dd', - destination='projects', placement='libcxx', when='+libcxx@3.7.0') - resource(name='libcxxabi', - url='http://llvm.org/releases/3.7.0/libcxxabi-3.7.0.src.tar.xz', md5='5aa769e2fca79fa5335cfae8f6258772', - destination='projects', placement='libcxxabi', when='+libcxx@3.7.0') - ########## + # lldb dependencies + depends_on('ncurses', when='+lldb') + depends_on('swig', when='+lldb') + depends_on('libedit', when='+lldb') + + # gold support + depends_on('binutils+gold', when='+lto') + + # polly plugin + depends_on('gmp', when='+polly') + depends_on('isl', when='+polly') + + base_url = 'http://llvm.org/releases/%%(version)s/%(pkg)s-%%(version)s.src.tar.xz' + llvm_url = base_url % { 'pkg' : 'llvm'} + + resources = { + 'compiler-rt' : { + 'url' : base_url % { 'pkg' : 'compiler-rt'}, + 'destination' : 'projects', + 'placement' : 'compiler-rt', + }, + 'openmp' : { + 'url' : base_url % { 'pkg' : 'openmp'}, + 'destination' : 'projects', + 'placement' : 'openmp', + }, + 'libcxx' : { + 'url' : base_url % { 'pkg' : 'libcxx'}, + 'destination' : 'projects', + 'placement' : 'libcxx', + }, + 'libcxxabi' : { + 'url' : base_url % { 'pkg' : 'libcxxabi'}, + 'destination' : 'projects', + 'placement' : 'libcxxabi', + }, + 'clang' : { + 'url' : base_url % { 'pkg' : 'cfe'}, + 'destination' : 'tools', + 'placement' : 'clang', + }, + 'clang-tools-extra' : { + 'url' : base_url % { 'pkg' : 'clang-tools-extra'}, + 'destination' : 'tools/clang/tools', + 'placement' : 'extra', + }, + 'lldb' : { + 'url' : base_url % { 'pkg' : 'lldb'}, + 'destination' : 'tools', + 'placement' : 'lldb', + }, + 'polly' : { + 'url' : base_url % { 'pkg' : 'polly'}, + 'destination' : 'tools', + 'placement' : 'polly', + }, + 'llvm-libunwind' : { + 'url' : base_url % { 'pkg' : 'libunwind'}, + 'destination' : 'projects', + 'placement' : 'libunwind', + }, + } + releases = [ + { + 'version' : '3.7.0', + 'md5':'b98b9495e5655a672d6cb83e1a180f8e', + 'resources' : { + 'compiler-rt' : '383c10affd513026f08936b5525523f5', + 'openmp' : 'f482c86fdead50ba246a1a2b0bbf206f', + 'polly' : '32f93ffc9cc7e042df22089761558f8b', + 'libcxx' : '46aa5175cbe1ad42d6e9c995968e56dd', + 'libcxxabi' : '5aa769e2fca79fa5335cfae8f6258772', + 'clang' : '8f9d27335e7331cf0a4711e952f21f01', + 'clang-tools-extra' : 'd5a87dacb65d981a427a536f6964642e', + 'lldb' : 'e5931740400d1dc3e7db4c7ba2ceff68', + 'llvm-libunwind' : '9a75392eb7eb8ed5c0840007e212baf5', + } + }, + { + 'version' : '3.6.2', + 'md5':'0c1ee3597d75280dee603bae9cbf5cc2', + 'resources' : { + 'compiler-rt' : 'e3bc4eb7ba8c39a6fe90d6c988927f3c', + 'openmp' : '65dd5863b9b270960a96817e9152b123', + 'libcxx' : '22214c90697636ef960a49aef7c1823a', + 'libcxxabi' : '17518e361e4e228f193dd91e8ef54ba2', + 'clang' : 'ff862793682f714bb7862325b9c06e20', + 'clang-tools-extra' : '3ebc1dc41659fcec3db1b47d81575e06', + 'lldb' : '51e5eb552f777b950bb0ff326e60d5f0', + } + }, + { + 'version' : '3.5.1', + 'md5':'2d3d8004f38852aa679e5945b8ce0b14', + 'resources' : { + 'compiler-rt' : 'd626cfb8a9712cb92b820798ab5bc1f8', + 'openmp' : '121ddb10167d7fc38b1f7e4b029cf059', + 'libcxx' : '406f09b1dab529f3f7879f4d548329d2', + 'libcxxabi' : 'b22c707e8d474a99865ad3c521c3d464', + 'clang' : '93f9532f8f7e6f1d8e5c1116907051cb', + 'clang-tools-extra' : 'f13f31ed3038acadc6fa63fef812a246', + 'lldb' : 'cc5ea8a414c62c33e760517f8929a204', + } + }, + ] + + for release in releases: + version(release['version'], release['md5'], url=llvm_url % release) + + for name, md5 in release['resources'].items(): + resource(name=name, + url=resources[name]['url'] % release, + md5=md5, + destination=resources[name]['destination'], + when='@%(version)s' % release, + placement=resources[name].get('placement', None)) def install(self, spec, prefix): env['CXXFLAGS'] = self.compiler.cxx11_flag + cmake_args = [ arg for arg in std_cmake_args if 'BUILD_TYPE' not in arg ] + + build_type = 'RelWithDebInfo' if '+debug' in spec else 'Release' + cmake_args.extend([ + '..', + '-DCMAKE_BUILD_TYPE=' + build_type, + '-DLLVM_REQUIRES_RTTI:BOOL=ON', + '-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp', + '-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix ]) + + if '+lto' in spec: + cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + os.path.join( spec['binutils'].prefix, 'include')) + if '+polly' in spec: + cmake_args.append('-DPOLLY_LINK_INTO_TOOLS:Bool=ON') + else: + cmake_args.append('-DLLVM_EXTERNAL_POLLY_BUILD:Bool=OFF') + + if '+clang' not in spec: + cmake_args.append('-DLLVM_EXTERNAL_CLANG_BUILD:Bool=OFF') + if '+lldb' not in spec: + cmake_args.append('-DLLVM_EXTERNAL_LLDB_BUILD:Bool=OFF') + if '+internal_unwind' not in spec: + cmake_args.append('-DLLVM_EXTERNAL_LIBUNWIND_BUILD:Bool=OFF') + if '+libcxx' not in spec: + cmake_args.append('-DLLVM_EXTERNAL_LIBCXX_BUILD:Bool=OFF') + cmake_args.append('-DLLVM_EXTERNAL_LIBCXXABI_BUILD:Bool=OFF') + if '+compiler-rt' not in spec: + cmake_args.append('-DLLVM_EXTERNAL_COMPILER_RT_BUILD:Bool=OFF') + + if '+clang' not in spec: + if '+clang_extra' in spec: + raise SpackException('The clang_extra variant requires the clang variant to be selected') + if '+lldb' in spec: + raise SpackException('The lldb variant requires the clang variant to be selected') with working_dir('spack-build', create=True): - cmake('..', - '-DLLVM_REQUIRES_RTTI:BOOL=ON', - '-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix, - *std_cmake_args) + cmake(*cmake_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 5d89fb8dfa200072fbbd2d2945c0a38917477ae1 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 16:56:00 -0800 Subject: ensure that clang-query gets installed --- var/spack/packages/llvm/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index eeb2c11fe2..19d82d81b7 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os, shutil class Llvm(Package): @@ -182,7 +183,7 @@ class Llvm(Package): if '+lto' in spec: cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + os.path.join( spec['binutils'].prefix, 'include')) if '+polly' in spec: - cmake_args.append('-DPOLLY_LINK_INTO_TOOLS:Bool=ON') + cmake_args.append('-DLINK_POLLY_INTO_TOOLS:Bool=ON') else: cmake_args.append('-DLLVM_EXTERNAL_POLLY_BUILD:Bool=OFF') @@ -205,6 +206,10 @@ class Llvm(Package): raise SpackException('The lldb variant requires the clang variant to be selected') with working_dir('spack-build', create=True): - cmake(*cmake_args) - make() + # cmake(*cmake_args) + # make() make("install") + query_path = os.path.join('bin', 'clang-query') + # Manually install clang-query, because llvm doesn't... + if os.path.exists(query_path): + shutil.copy(query_path, os.path.join(prefix, 'bin')) -- cgit v1.2.3-70-g09d2 From 48f19b5fdec848339314c456e69fbd761fd277dd Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 16:56:25 -0800 Subject: add the gold linker to binutils --- var/spack/packages/binutils/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 123f4598f6..1de796bee0 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -11,6 +11,7 @@ class Binutils(Package): # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell variant('krellpatch', default=False, description="build with openspeedshop based patch.") + variant('gold', default=True, description="build the gold linker") patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') variant('libiberty', default=False, description='Also install libiberty.') @@ -26,6 +27,9 @@ class Binutils(Package): '--enable-targets=all', '--with-sysroot=/'] + if '+gold' in spec: + configure_args.append('--enable-gold') + if '+libiberty' in spec: configure_args.append('--enable-install-libiberty') -- cgit v1.2.3-70-g09d2 From f5a49280c3b9063c6deb29307cd6356bf75cedd5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 1 Jan 2016 17:26:49 -0500 Subject: Enable C++ and Fortran languages by default --- var/spack/packages/hdf5/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py index fdc77c121a..9a40164341 100644 --- a/var/spack/packages/hdf5/package.py +++ b/var/spack/packages/hdf5/package.py @@ -15,8 +15,8 @@ class Hdf5(Package): version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') - variant('cxx', default=False, description='Enable C++ support') - variant('fortran', default=False, description='Enable Fortran support') + variant('cxx', default=True, description='Enable C++ support') + variant('fortran', default=True, description='Enable Fortran support') variant('mpi', default=False, description='Enable MPI support') variant('threadsafe', default=False, description='Enable multithreading') -- cgit v1.2.3-70-g09d2 From 03537a6be414f92114e240435b6ecbff200d8717 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 1 Jan 2016 17:38:42 -0500 Subject: Support Darwin for Boost Ensure that builds on Darwin use the "darwin" toolset. Also update Boost to 1.60.0. --- var/spack/packages/boost/package.py | 62 +++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 26 deletions(-) (limited to 'var') diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 81dadbbf61..9b7c22c53d 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -14,6 +14,7 @@ class Boost(Package): list_url = "http://sourceforge.net/projects/boost/files/boost/" list_depth = 2 + version('1.60.0', '65a840e1a0b13a558ff19eeb2c4f0cbe') version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87') version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546') version('1.57.0', '1be49befbdd9a5ce9def2983ba3e7b76') @@ -48,11 +49,11 @@ class Boost(Package): variant('mpi', default=False, description='Activate the component Boost.MPI') variant('compression', default=True, description='Activate the compression Boost.iostreams') - depends_on('mpi', when='+mpi') depends_on('python', when='+python') - depends_on('zlib', when='+compression') + depends_on('mpi', when='+mpi') depends_on('bzip2', when='+compression') - + depends_on('zlib', when='+compression') + 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)] @@ -61,20 +62,23 @@ class Boost(Package): return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( dots, underscores) - def determine_toolset(self): - toolsets = {'gcc': 'gcc', + def determine_toolset(self, spec): + if spec.satisfies("=darwin-x86_64"): + return 'darwin' + + toolsets = {'g++': 'gcc', 'icpc': 'intel', 'clang++': 'clang'} for cc, toolset in toolsets.iteritems(): - if(cc in self.compiler.cxx_names): + if cc in self.compiler.cxx_names: return toolset # fallback to gcc if no toolset found return 'gcc' def determine_bootstrap_options(self, spec, options): - options.append('--with-toolset=%s' % self.determine_toolset()) + options.append('--with-toolset=%s' % self.determine_toolset(spec)) without_libs = [] if '~mpi' in spec: @@ -82,17 +86,20 @@ class Boost(Package): if '~python' in spec: without_libs.append('python') else: - options.append('--with-python=%s' % (spec['python'].prefix.bin + '/python')) + options.append('--with-python=%s' % + join_path(spec['python'].prefix.bin, 'python')) if without_libs: options.append('--without-libraries=%s' % ','.join(without_libs)) with open('user-config.jam', 'w') as f: if '+mpi' in spec: - f.write('using mpi : %s ;\n' % (spec['mpi'].prefix.bin + '/mpicxx')) + f.write('using mpi : %s ;\n' % + joinpath(spec['mpi'].prefix.bin, 'mpicxx')) if '+python' in spec: - f.write('using python : %s : %s ;\n' % (spec['python'].version, - (spec['python'].prefix.bin + '/python'))) + f.write('using python : %s : %s ;\n' % + (spec['python'].version, + joinpath(spec['python'].prefix.bin, 'python'))) def determine_b2_options(self, spec, options): if '+debug' in spec: @@ -101,22 +108,26 @@ class Boost(Package): options.append('variant=release') if '~compression' in spec: - options.extend(['-s NO_BZIP2=1', - '-s NO_ZLIB=1', - ]) + options.extend([ + '-s', 'NO_BZIP2=1', + '-s', 'NO_ZLIB=1']) if '+compression' in spec: - options.extend(['-s BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include, - '-s BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib, - '-s ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include, - '-s ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib]) - - options.extend(['toolset=%s' % self.determine_toolset(), - 'link=static,shared', - '--layout=tagged']) + options.extend([ + '-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include, + '-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib, + '-s', 'ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include, + '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib, + ]) + + options.extend([ + 'toolset=%s' % self.determine_toolset(spec), + 'link=static,shared', + 'threading=single,multi', + '--layout=tagged']) def install(self, spec, prefix): - # to make him find the user-config.jam + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' bootstrap = Executable('./bootstrap.sh') @@ -130,9 +141,8 @@ class Boost(Package): b2name = './b2' if spec.satisfies('@1.47:') else './bjam' b2 = Executable(b2name) - b2_options = ['-j %s' % make_jobs] + b2_options = ['-j', '%s' % make_jobs] self.determine_b2_options(spec, b2_options) - b2('install', 'threading=single', *b2_options) - b2('install', 'threading=multi', *b2_options) + b2('install', *b2_options) -- cgit v1.2.3-70-g09d2 From 356836ccbb6a187588ea6454bf1b7f7a679c5706 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 1 Jan 2016 22:30:02 -0800 Subject: removed extraneous comment lines --- var/spack/packages/llvm/package.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index 19d82d81b7..61e9b68542 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -206,8 +206,6 @@ class Llvm(Package): raise SpackException('The lldb variant requires the clang variant to be selected') with working_dir('spack-build', create=True): - # cmake(*cmake_args) - # make() make("install") query_path = os.path.join('bin', 'clang-query') # Manually install clang-query, because llvm doesn't... -- cgit v1.2.3-70-g09d2 From 31803d10aac4dc163eb168de4028357aa23b68c3 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 2 Jan 2016 11:59:33 -0800 Subject: bringing back configuration and build stages --- var/spack/packages/llvm/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index 61e9b68542..419aef1ac9 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -206,6 +206,8 @@ class Llvm(Package): raise SpackException('The lldb variant requires the clang variant to be selected') with working_dir('spack-build', create=True): + cmake(*cmake_args) + make() make("install") query_path = os.path.join('bin', 'clang-query') # Manually install clang-query, because llvm doesn't... -- cgit v1.2.3-70-g09d2 From 884f317d50344101246f2892af492663a45be261 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sun, 3 Jan 2016 17:22:13 -0800 Subject: tweak gold support, added to gcc The gold linker support and gold plugin variants now use the same name. Trying to apply use-flag-style discipline here despite the fact gold has other implications for clang, this way globally enabling gold will have a more consistent effect if that becomes possible. The gold support in gcc could use more testing to ensure it works consistently, but as long as a binutils including gold is used the gcc configure tends to pick it up, and it seems to work with 5.3.0 at least. --- var/spack/packages/gcc/package.py | 5 ++++- var/spack/packages/llvm/package.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py index 7ec160d595..61b16f3fd8 100644 --- a/var/spack/packages/gcc/package.py +++ b/var/spack/packages/gcc/package.py @@ -48,11 +48,14 @@ class Gcc(Package): version('4.7.4', '4c696da46297de6ae77a82797d2abe28') version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') + + variant('gold', default=True, description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") depends_on("mpc") # when @4.5: - depends_on("binutils~libiberty") + depends_on("binutils~libiberty", when='~gold') + depends_on("binutils~libiberty+gold", when='+gold') # Save these until we can do optional deps. depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index 19d82d81b7..10e899437f 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -45,7 +45,7 @@ class Llvm(Package): variant('polly', default=True, description="Build the LLVM polyhedral optimization plugin, only builds for 3.7.0+") variant('libcxx', default=True, description="Build the LLVM C++ standard library") variant('compiler-rt', default=True, description="Build the LLVM compiler runtime, including sanitizers") - variant('lto', default=True, description="Add support for LTO with the gold linker plugin") + variant('gold', default=True, description="Add support for LTO with the gold linker plugin") # Universal dependency @@ -57,7 +57,7 @@ class Llvm(Package): depends_on('libedit', when='+lldb') # gold support - depends_on('binutils+gold', when='+lto') + depends_on('binutils+gold', when='+gold') # polly plugin depends_on('gmp', when='+polly') @@ -180,7 +180,7 @@ class Llvm(Package): '-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp', '-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix ]) - if '+lto' in spec: + if '+gold' in spec: cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + os.path.join( spec['binutils'].prefix, 'include')) if '+polly' in spec: cmake_args.append('-DLINK_POLLY_INTO_TOOLS:Bool=ON') -- cgit v1.2.3-70-g09d2 From 96e5905bce302007e8be6e3debf6d3efdf77a8cd Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Jan 2016 12:14:42 -0500 Subject: Build multiple FFTW variants simultaneously FFTW can build only one floating point precision (float, double, long double, quad) at once, but they can all be installed simultaneously as the libraries have different names. It is common packages to decide only at run time which precision FFTW they need, and thus FFTW should offer all precisions at once. --- var/spack/packages/fftw/package.py | 55 ++++++++++++-------------------------- 1 file changed, 17 insertions(+), 38 deletions(-) (limited to 'var') diff --git a/var/spack/packages/fftw/package.py b/var/spack/packages/fftw/package.py index 5f71762c4f..4d2b964242 100644 --- a/var/spack/packages/fftw/package.py +++ b/var/spack/packages/fftw/package.py @@ -39,54 +39,21 @@ class Fftw(Package): version('3.3.4', '2edab8c06b24feeb3b82bbb3ebf3e7b3') - ########## - # Floating point precision - FLOAT = 'float' - LONG_DOUBLE = 'long_double' - QUAD_PRECISION = 'quad' - PRECISION_OPTIONS = { - FLOAT: '--enable-float', - LONG_DOUBLE: '--enable--long-double', - QUAD_PRECISION: '--enable-quad-precision' - } - variant(FLOAT, default=False, description='Produces a single precision version of the library') - variant(LONG_DOUBLE, default=False, description='Produces a long double precision version of the library') - variant(QUAD_PRECISION, default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') - ########## + variant('float', default=True, description='Produces a single precision version of the library') + variant('long_double', default=True, description='Produces a long double precision version of the library') + variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') - @staticmethod - def enabled(x): - """ - Given a variant name returns the string that means the variant is enabled - - :param x: variant name - """ - # FIXME : duplicated from MVAPICH2 - return '+' + x - - def check_fortran_availability(self, options): - if not self.compiler.f77 or not self.compiler.fc: - options.append("--disable-fortran") - - def set_floating_point_precision(self, spec, options): - l = [option for variant, option in Fftw.PRECISION_OPTIONS.iteritems() if self.enabled(variant) in spec] - if len(l) > 1: - raise RuntimeError('At most one floating point precision variant may activated per build.') - options.extend(l) - def install(self, spec, prefix): - options = ['--prefix=%s' % prefix, '--enable-shared', '--enable-threads', '--enable-openmp'] - self.check_fortran_availability(options) - self.set_floating_point_precision(spec, options) - + if not self.compiler.f77 or not self.compiler.fc: + options.append("--disable-fortran") if '+mpi' in spec: options.append('--enable-mpi') @@ -94,3 +61,15 @@ class Fftw(Package): make() make("install") + if '+float' in spec: + configure('--enable-float', *options) + make() + make("install") + if '+long_double' in spec: + configure('--enable-long-double', *options) + make() + make("install") + if '+quad' in spec: + configure('--enable-quad-precision', *options) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 24ced90913d7b819d0bec5375ab6cc0c54ceecd8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Jan 2016 09:40:30 -0500 Subject: Correct `join_path` in package boost --- var/spack/packages/boost/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 9b7c22c53d..3427b74ad6 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -95,11 +95,11 @@ class Boost(Package): with open('user-config.jam', 'w') as f: if '+mpi' in spec: f.write('using mpi : %s ;\n' % - joinpath(spec['mpi'].prefix.bin, 'mpicxx')) + join_path(spec['mpi'].prefix.bin, 'mpicxx')) if '+python' in spec: f.write('using python : %s : %s ;\n' % (spec['python'].version, - joinpath(spec['python'].prefix.bin, 'python'))) + join_path(spec['python'].prefix.bin, 'python'))) def determine_b2_options(self, spec, options): if '+debug' in spec: -- cgit v1.2.3-70-g09d2 From 12632f16b8a5f51fd35ad81c9a8625fe1e30cd7c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Jan 2016 13:17:17 -0500 Subject: Combine with other OpenSSL Darwin patch Set KERNEL_BITS. Don't use Darwin-specific configure script. --- var/spack/packages/openssl/package.py | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index e1039fcbe1..779c31af12 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -17,23 +17,18 @@ class Openssl(Package): parallel = False def install(self, spec, prefix): - if spec.satisfies("=darwin-x86_64"): - perl = which('perl') - perl("./Configure", - "--prefix=%s" % prefix, - "--openssldir=%s/etc/openssl" % prefix, - "zlib", - "no-krb5", - "shared", - "darwin64-x86_64-cc") - filter_file(r'-arch x86_64', '', 'Makefile') - else: - config = Executable("./config") - config("--prefix=%s" % prefix, - "--openssldir=%s/etc/openssl" % prefix, - "zlib", - "no-krb5", - "shared") + if spec.satisfies("=darwin-x86_64") or spec.satisfies("=ppc64"): + # This needs to be done for all 64-bit architectures (except Linux, + # where it happens automatically?) + env['KERNEL_BITS'] = '64' + config = Executable("./config") + config("--prefix=%s" % prefix, + "--openssldir=%s" % join_path(prefix, 'etc', 'openssl'), + "zlib", + "no-krb5", + "shared") + # Remove non-standard compiler options if present + filter_file(r'-arch x86_64', '', 'Makefile') make() make("install") -- cgit v1.2.3-70-g09d2 From c18dfa058a208627063d069566a728d8715f984c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Jan 2016 14:09:54 -0500 Subject: Add details to comment --- var/spack/packages/openssl/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index 779c31af12..a24de20cc3 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -27,7 +27,9 @@ class Openssl(Package): "zlib", "no-krb5", "shared") - # Remove non-standard compiler options if present + # Remove non-standard compiler options if present. These options are + # present e.g. on Darwin. They are non-standard, i.e. most compilers + # (e.g. gcc) will not accept them. filter_file(r'-arch x86_64', '', 'Makefile') make() -- cgit v1.2.3-70-g09d2 From 2b801e20866152055f1cb4845b22da66a0020968 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Tue, 22 Dec 2015 20:24:17 -0500 Subject: new package: py-astropy --- var/spack/packages/py-astropy/package.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/packages/py-astropy/package.py (limited to 'var') diff --git a/var/spack/packages/py-astropy/package.py b/var/spack/packages/py-astropy/package.py new file mode 100644 index 0000000000..d138a514f6 --- /dev/null +++ b/var/spack/packages/py-astropy/package.py @@ -0,0 +1,28 @@ +from spack import * + +class PyAstropy(Package): + """ + The Astropy Project is a community effort to develop a single core + package for Astronomy in Python and foster interoperability between + Python astronomy packages. + """ + homepage = 'http://www.astropy.org/' + + version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d') + + def url_for_version(self, version): + return 'https://pypi.python.org/packages/source/a/astropy/astropy-{0}.tar.gz'.format(version) + + extends('python') + + depends_on('cfitsio') + depends_on('expat') + depends_on('py-h5py') + depends_on('py-numpy') + depends_on('py-scipy') + + def install(self, spec, prefix): + python('setup.py', 'build', '--use-system-cfitsio', + '--use-system-expat') + python('setup.py', 'install', '--prefix=' + prefix) + -- cgit v1.2.3-70-g09d2 From 60d8413940119c64db89ded7854850912947e135 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Jan 2016 19:21:57 -0500 Subject: Support mbedtls, an alternative SSL library --- var/spack/packages/mbedtls/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/packages/mbedtls/package.py (limited to 'var') diff --git a/var/spack/packages/mbedtls/package.py b/var/spack/packages/mbedtls/package.py new file mode 100644 index 0000000000..7745522956 --- /dev/null +++ b/var/spack/packages/mbedtls/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Mbedtls(Package): + """ + mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint. + """ + homepage = "https://tls.mbed.org" + url = "https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.2.1.tar.gz" + + version('2.2.1' , '73a38f96898d6d03e32f55dd9f9a67be') + version('2.2.0' , 'eaf4586c1ef93ae872e606b6c1203942') + version('2.1.4' , '40cdf67b6c6d92c9cbcfd552d39ea3ae') + version('2.1.3' , '7eb4cf1dfa68578a2c8dbd0b6fa752dd') + version('1.3.16', '4144d7320c691f721aeb9e67a1bc38e0') + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From cfe54b201d0b563214f068c93c05acad116c7361 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Jan 2016 20:09:22 -0500 Subject: New package atop --- var/spack/packages/atop/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/packages/atop/package.py (limited to 'var') diff --git a/var/spack/packages/atop/package.py b/var/spack/packages/atop/package.py new file mode 100644 index 0000000000..83894477f4 --- /dev/null +++ b/var/spack/packages/atop/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Atop(Package): + """Atop is an ASCII full-screen performance monitor for Linux""" + homepage = "http://www.atoptool.nl/index.php" + url = "http://www.atoptool.nl/download/atop-2.2-3.tar.gz" + + version('2.2-3', '034dc1544f2ec4e4d2c739d320dc326d') + + def install(self, spec, prefix): + make() + mkdirp(prefix.bin) + install("atop", join_path(prefix.bin, "atop")) + mkdirp(join_path(prefix.man, "man1")) + install(join_path("man", "atop.1"), + join_path(prefix.man, "man1", "atop.1")) -- cgit v1.2.3-70-g09d2 From 24ba60168d8c0f7a681deca81c4a9bb8ea4cd5d1 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Jan 2016 09:49:10 +0100 Subject: added package : glpk --- var/spack/packages/glpk/package.py | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/packages/glpk/package.py (limited to 'var') diff --git a/var/spack/packages/glpk/package.py b/var/spack/packages/glpk/package.py new file mode 100644 index 0000000000..ab1eb1983d --- /dev/null +++ b/var/spack/packages/glpk/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Glpk(Package): + """ + The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed + integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in + the form of a callable library + """ + homepage = "https://www.gnu.org/software/glpk" + url = "http://ftp.gnu.org/gnu/glpk/glpk-4.57.tar.gz" + + version('4.57', '237531a54f73155842f8defe51aedb0f') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 7670dc7efcee7b16c7b08b3c2ba6669bcbbcf49b Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Jan 2016 10:05:48 +0100 Subject: glpk : added support for gmp --- var/spack/packages/glpk/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/glpk/package.py b/var/spack/packages/glpk/package.py index ab1eb1983d..855f459fb3 100644 --- a/var/spack/packages/glpk/package.py +++ b/var/spack/packages/glpk/package.py @@ -37,7 +37,17 @@ class Glpk(Package): version('4.57', '237531a54f73155842f8defe51aedb0f') + variant('gmp', default=False, description='Activates support for GMP library') + + depends_on('gmp', when='+gmp') + def install(self, spec, prefix): - configure('--prefix=%s' % prefix) + + options = ['--prefix=%s' % prefix] + + if '+gmp' in spec: + options.append('--with-gmp') + + configure(*options) make() make("install") -- cgit v1.2.3-70-g09d2 From fd7c1fe58481a211267a67e5ec3c08499dab8b10 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 6 Jan 2016 10:10:15 -0500 Subject: Avoid using tabs --- var/spack/packages/atop/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/atop/package.py b/var/spack/packages/atop/package.py index 83894477f4..346ab0763c 100644 --- a/var/spack/packages/atop/package.py +++ b/var/spack/packages/atop/package.py @@ -12,5 +12,5 @@ class Atop(Package): mkdirp(prefix.bin) install("atop", join_path(prefix.bin, "atop")) mkdirp(join_path(prefix.man, "man1")) - install(join_path("man", "atop.1"), - join_path(prefix.man, "man1", "atop.1")) + install(join_path("man", "atop.1"), + join_path(prefix.man, "man1", "atop.1")) -- cgit v1.2.3-70-g09d2 From e7901466273884b680d2575d54561bd73d0c73b4 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 5 Jan 2016 17:53:55 -0500 Subject: paraview: add some extra arguments on OS X X shouldn't be used on OS X and spack expects a Unix-style install, not a .app bundle. --- var/spack/packages/paraview/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/packages/paraview/package.py b/var/spack/packages/paraview/package.py index 1d99b34899..aaab352e66 100644 --- a/var/spack/packages/paraview/package.py +++ b/var/spack/packages/paraview/package.py @@ -60,6 +60,10 @@ class Paraview(Package): 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', -- cgit v1.2.3-70-g09d2 From 1646bec1a4fd612abcb408dc169dd189b14756ac Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 7 Jan 2016 13:54:47 -0500 Subject: Make PETSc build with OpenMPI --- var/spack/packages/petsc/package.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py index f3ed3d72ec..43c7f8a9b6 100644 --- a/var/spack/packages/petsc/package.py +++ b/var/spack/packages/petsc/package.py @@ -23,9 +23,6 @@ class Petsc(Package): def install(self, spec, prefix): configure("--prefix=%s" % prefix, - "CC=cc", - "CXX=c++", - "FC=f90", "--with-blas-lib=%s/libblas.a" % spec['blas'].prefix.lib, "--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib, "--with-boost-dir=%s" % spec['boost'].prefix, @@ -33,6 +30,7 @@ class Petsc(Package): "--with-parmetis-dir=%s" % spec['parmetis'].prefix, "--with-metis-dir=%s" % spec['metis'].prefix, "--with-hdf5-dir=%s" % spec['hdf5'].prefix, + "--with-mpi-dir=%s" % spec['mpi'].prefix, "--with-shared-libraries=0") # PETSc has its own way of doing parallel make. -- cgit v1.2.3-70-g09d2 From 175f20a9dce00bf2129923aae50abe36fdd25bf4 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Thu, 7 Jan 2016 11:12:47 -0800 Subject: new and updated python packages --- var/spack/packages/py-funcsigs/package.py | 19 +++++++++++++++++++ var/spack/packages/py-matplotlib/package.py | 5 ++++- var/spack/packages/py-mock/package.py | 1 + var/spack/packages/py-pbr/package.py | 18 ++++++++++++++++++ var/spack/packages/py-periodictable/package.py | 17 +++++++++++++++++ var/spack/packages/py-setuptools/package.py | 1 + 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 var/spack/packages/py-funcsigs/package.py create mode 100644 var/spack/packages/py-pbr/package.py create mode 100644 var/spack/packages/py-periodictable/package.py (limited to 'var') diff --git a/var/spack/packages/py-funcsigs/package.py b/var/spack/packages/py-funcsigs/package.py new file mode 100644 index 0000000000..a428890288 --- /dev/null +++ b/var/spack/packages/py-funcsigs/package.py @@ -0,0 +1,19 @@ +from spack import * +import os + +class PyFuncsigs(Package): + """Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2.""" + homepage = "https://pypi.python.org/pypi/funcsigs" + url = "https://pypi.python.org/packages/source/f/funcsigs/funcsigs-0.4.tar.gz" + + version('0.4', 'fb1d031f284233e09701f6db1281c2a5') + + extends('python') + + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + + + diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py index a5fee39d42..4776c581ee 100644 --- a/var/spack/packages/py-matplotlib/package.py +++ b/var/spack/packages/py-matplotlib/package.py @@ -12,7 +12,7 @@ class PyMatplotlib(Package): variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') - extends('python', ignore=r'bin/nosetests.*$') + extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') depends_on('py-pyside', when='+gui') depends_on('py-ipython', when='+ipython') @@ -22,6 +22,9 @@ class PyMatplotlib(Package): depends_on('py-pytz') depends_on('py-nose') depends_on('py-numpy') + depends_on('py-mock') + depends_on('py-pbr') + depends_on('py-funcsigs') depends_on('qt', when='+gui') depends_on('bzip2') diff --git a/var/spack/packages/py-mock/package.py b/var/spack/packages/py-mock/package.py index 3b08428ba0..e89af8802a 100644 --- a/var/spack/packages/py-mock/package.py +++ b/var/spack/packages/py-mock/package.py @@ -11,6 +11,7 @@ class PyMock(Package): version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb') extends('python') + depends_on('py-pbr') depends_on('py-setuptools@17.1:') def install(self, spec, prefix): diff --git a/var/spack/packages/py-pbr/package.py b/var/spack/packages/py-pbr/package.py new file mode 100644 index 0000000000..02957483d4 --- /dev/null +++ b/var/spack/packages/py-pbr/package.py @@ -0,0 +1,18 @@ +from spack import * +import os + +class PyPbr(Package): + """PBR is a library that injects some useful and sensible default behaviors into your setuptools run.""" + homepage = "https://pypi.python.org/pypi/pbr" + url = "https://pypi.python.org/packages/source/p/pbr/pbr-1.8.1.tar.gz" + + version('1.8.1', 'c8f9285e1a4ca6f9654c529b158baa3a') + + extends('python') + + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + + diff --git a/var/spack/packages/py-periodictable/package.py b/var/spack/packages/py-periodictable/package.py new file mode 100644 index 0000000000..6a495a1cc8 --- /dev/null +++ b/var/spack/packages/py-periodictable/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyPeriodictable(Package): + """nose extends the test loading and running features of unittest, + making it easier to write, find and run tests.""" + + homepage = "https://pypi.python.org/pypi/periodictable" + url = "https://pypi.python.org/packages/source/p/periodictable/periodictable-1.4.1.tar.gz" + + version('1.4.1', '7246b63cc0b6b1be6e86b6616f9e866e') + + depends_on('py-numpy') + depends_on('py-pyparsing') + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-setuptools/package.py b/var/spack/packages/py-setuptools/package.py index 760ad4d6db..26c048bfd4 100644 --- a/var/spack/packages/py-setuptools/package.py +++ b/var/spack/packages/py-setuptools/package.py @@ -8,6 +8,7 @@ class PySetuptools(Package): version('11.3.1', '01f69212e019a2420c1693fb43593930') version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') + version('19.2', '78353b1f80375ca5e088f4b4627ffe03') extends('python') -- cgit v1.2.3-70-g09d2 From 7ad3e2b56bca4aca3a1ed5a157380070ea17514f Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Fri, 8 Jan 2016 11:09:11 -0800 Subject: new python packages --- var/spack/packages/py-numexpr/package.py | 15 +++++++++++++++ var/spack/packages/py-pytables/package.py | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 var/spack/packages/py-numexpr/package.py create mode 100644 var/spack/packages/py-pytables/package.py (limited to 'var') diff --git a/var/spack/packages/py-numexpr/package.py b/var/spack/packages/py-numexpr/package.py new file mode 100644 index 0000000000..89f8a525b1 --- /dev/null +++ b/var/spack/packages/py-numexpr/package.py @@ -0,0 +1,15 @@ +from spack import * +import re + +class PyNumexpr(Package): + """Fast numerical expression evaluator for NumPy""" + homepage = "https://pypi.python.org/pypi/numexpr" + url = "https://pypi.python.org/packages/source/n/numexpr/numexpr-2.4.6.tar.gz" + + version('2.4.6', '17ac6fafc9ea1ce3eb970b9abccb4fbd') + + extends('python') + depends_on('py-numpy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pytables/package.py b/var/spack/packages/py-pytables/package.py new file mode 100644 index 0000000000..a5b1e78ab3 --- /dev/null +++ b/var/spack/packages/py-pytables/package.py @@ -0,0 +1,19 @@ +from spack import * +import re + +class PyPytables(Package): + """PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data.""" + homepage = "http://www.pytables.org/" + url = "https://github.com/PyTables/PyTables/archive/v.3.2.2.tar.gz" + + version('3.2.2', '7cbb0972e4d6580f629996a5bed92441') + + extends('python') + depends_on('hdf5') + depends_on('py-numpy') + depends_on('py-numexpr') + depends_on('py-cython') + + def install(self, spec, prefix): + env["HDF5_DIR"] = spec['hdf5'].prefix + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 6214148d35845f2a15d23b4c197aa4cc91ebe306 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 17:16:30 -0500 Subject: Use .tar.gz instead of .tar.xz for backward compatibility --- var/spack/packages/gdb/package.py | 12 ++++++------ var/spack/packages/git/package.py | 16 ++++++++-------- var/spack/packages/python/package.py | 13 +++++++------ var/spack/packages/texinfo/package.py | 10 +++++----- var/spack/packages/wget/package.py | 5 +++-- 5 files changed, 29 insertions(+), 27 deletions(-) (limited to 'var') diff --git a/var/spack/packages/gdb/package.py b/var/spack/packages/gdb/package.py index fd567f346b..85ed3215e2 100644 --- a/var/spack/packages/gdb/package.py +++ b/var/spack/packages/gdb/package.py @@ -32,13 +32,13 @@ class Gdb(Package): -- or what another program was doing at the moment it crashed. """ homepage = "https://www.gnu.org/software/gdb" - url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.xz" + url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz" - version('7.10.1', '39e654460c9cdd80200a29ac020cfe11') - version('7.10', '2a35bac41fa8e10bf04f3a0dd7f7f363') - version('7.9.1', '35374c77a70884eb430c97061053a36e') - version('7.9', 'e6279f26559d839f0b4218a482bcb43e') - version('7.8.2', 'a80cf252ed2e775d4e4533341bbf2459') + version('7.10.1', 'b93a2721393e5fa226375b42d567d90b') + version('7.10', 'fa6827ad0fd2be1daa418abb11a54d86') + version('7.9.1', 'f3b97de919a9dba84490b2e076ec4cb0') + version('7.9', '8f8ced422fe462a00e0135a643544f17') + version('7.8.2', '8b0ea8b3559d3d90b3ff4952f0aeafbc') depends_on('texinfo') diff --git a/var/spack/packages/git/package.py b/var/spack/packages/git/package.py index 28c7aa8161..ddc5078c4d 100644 --- a/var/spack/packages/git/package.py +++ b/var/spack/packages/git/package.py @@ -5,14 +5,14 @@ class Git(Package): system designed to handle everything from small to very large projects with speed and efficiency.""" homepage = "http://git-scm.com" - url = "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.xz" - - version('2.6.3', '5a6375349c3f13c8dbbabfc327bae429') - version('2.6.2', '32ae5ad29763fc927bfcaeab55385fd9') - version('2.6.1', 'dd4a3a7fe96598c553edd39d40c9c290') - version('2.6.0', '6b7d43d615fb3f0dfecf4d131e23f438') - version('2.5.4', 'ec118fcd1cf984edc17eb6588b78e81b') - version('2.2.1', '43e01f9d96ba8c11611e0eef0d9f9f28') + url = "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.gz" + + version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423') + version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8') + version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd') + version('2.6.0', 'eb76a07148d94802a1745d759716a57e') + version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b') + version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c') # Git compiles with curl support by default on but if your system diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py index eae2566b57..a1ce06feb0 100644 --- a/var/spack/packages/python/package.py +++ b/var/spack/packages/python/package.py @@ -11,15 +11,16 @@ import spack class Python(Package): """The Python programming language.""" homepage = "http://www.python.org" - url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz" + url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz" extendable = True - version('2.7.8', 'd235bdfa75b8396942e360a70487ee00') - version('2.7.10', 'c685ef0b8e9f27b5e3db5db12b268ac6') - version('2.7.11', '1dbcc848b4cd8399a8199d000f9f823c', preferred=True) - version('3.5.0', 'd149d2812f10cbe04c042232e7964171') - version('3.5.1', 'e9ea6f2623fffcdd871b7b19113fde80') + version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe') + version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36') + version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True) + version('2.7.10', 'd7547558fd673bd9d38e2108c6b42521') + version('2.7.9', '5eebcaa0030dc4061156d3429657fb83') + version('2.7.8', 'd4bca0159acb0b44a781292b5231936f') depends_on("openssl") depends_on("bzip2") diff --git a/var/spack/packages/texinfo/package.py b/var/spack/packages/texinfo/package.py index 460db65b3e..1b22c72e72 100644 --- a/var/spack/packages/texinfo/package.py +++ b/var/spack/packages/texinfo/package.py @@ -33,12 +33,12 @@ class Texinfo(Package): used by many non-GNU projects as well.FIXME: put a proper description of your package here. """ homepage = "https://www.gnu.org/software/texinfo/" - url = "http://ftp.gnu.org/gnu/texinfo/texinfo-6.0.tar.xz" + url = "http://ftp.gnu.org/gnu/texinfo/texinfo-6.0.tar.gz" - version('6.0', '02818e62a5b8ae0213a7ff572991bb50') - version('5.2', 'cb489df8a7ee9d10a236197aefdb32c5') - version('5.1', '52ee905a3b705020d2a1b6ec36d53ca6') - version('5.0', 'ef2fad34c71ddc95b20c7d6a08c0d7a6') + version('6.0', 'e1a2ef5dce5018b53f0f6eed45b247a7') + version('5.2', '1b8f98b80a8e6c50422125e07522e8db') + version('5.1', '54e250014fe698fb4832016158747c03') + version('5.0', '918432285abe6fe96c98355594c5656a') def install(self, spec, prefix): configure('--prefix=%s' % prefix) diff --git a/var/spack/packages/wget/package.py b/var/spack/packages/wget/package.py index c8fd025122..55728b0515 100644 --- a/var/spack/packages/wget/package.py +++ b/var/spack/packages/wget/package.py @@ -8,9 +8,10 @@ class Wget(Package): etc.""" homepage = "http://www.gnu.org/software/wget/" - url = "http://ftp.gnu.org/gnu/wget/wget-1.16.tar.xz" + url = "http://ftp.gnu.org/gnu/wget/wget-1.16.tar.gz" - version('1.16', 'fe102975ab3a6c049777883f1bb9ad07') + version('1.17', 'c4c4727766f24ac716936275014a0536') + version('1.16', '293a37977c41b5522f781d3a3a078426') depends_on("openssl") -- cgit v1.2.3-70-g09d2 From 8da1dd2b4526241e70df3bb17c93439b26f389dd Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 21:32:17 -0500 Subject: Require cmake --- var/spack/packages/julia/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/julia/package.py b/var/spack/packages/julia/package.py index 9fd946c905..6e81564e17 100644 --- a/var/spack/packages/julia/package.py +++ b/var/spack/packages/julia/package.py @@ -9,7 +9,7 @@ class Julia(Package): version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') # Build-time dependencies - # depends_on("cmake") + depends_on("cmake") # depends_on("awk") # depends_on("m4") # depends_on("pkg-config") -- cgit v1.2.3-70-g09d2 From 04f908a957c69ae03b82482d37b87d74bd4a0064 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 21:41:35 -0500 Subject: Require cmake @2.8: --- var/spack/packages/julia/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/julia/package.py b/var/spack/packages/julia/package.py index 6e81564e17..40f94269ab 100644 --- a/var/spack/packages/julia/package.py +++ b/var/spack/packages/julia/package.py @@ -9,7 +9,7 @@ class Julia(Package): version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') # Build-time dependencies - depends_on("cmake") + depends_on("cmake @2.8:") # depends_on("awk") # depends_on("m4") # depends_on("pkg-config") -- cgit v1.2.3-70-g09d2 From da8fd5b30a696e5e7db91b929e840cb5e1bd070b Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 21:56:08 -0500 Subject: Require cmake @2.8: for metis --- var/spack/packages/metis/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/metis/package.py b/var/spack/packages/metis/package.py index 7ce5ae1925..9d6d7fefe1 100644 --- a/var/spack/packages/metis/package.py +++ b/var/spack/packages/metis/package.py @@ -12,6 +12,7 @@ class Metis(Package): version('5.1.0', '5465e67079419a69e0116de24fce58fe') + depends_on("cmake @2.8:") # build-time dependency depends_on('mpi') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From e628896c2be37ae974b787611609e91cee2dcef4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 22:12:19 -0500 Subject: parmetis requires cmake @2.8: --- var/spack/packages/parmetis/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py index d8cd337304..8c61cc00c8 100644 --- a/var/spack/packages/parmetis/package.py +++ b/var/spack/packages/parmetis/package.py @@ -10,6 +10,7 @@ class Parmetis(Package): version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') + depends_on('cmake @2.8:') # build dependency depends_on('mpi') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 2ac2985cf20f385e062227fc8f5bf7e4f330409a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 22:24:42 -0500 Subject: Require Python for PETSc PETSc requires Python for building. I have a case where an HPC system has a very old default Python version, too old for Spack. So I load a module for Python, which makes Spack work. This module relies on LD_LIBRARY_PATH. When building PETSc, Spack unsets LD_LIBRARY_PATH, breaking the Python that PETSc finds. Explicitly requiring Python for PETSc makes building PETSc work. --- var/spack/packages/petsc/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py index f3ed3d72ec..50533dbe54 100644 --- a/var/spack/packages/petsc/package.py +++ b/var/spack/packages/petsc/package.py @@ -12,6 +12,8 @@ class Petsc(Package): version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13') version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') + depends_on("python @2.6:@2.9") # requires Python for building + depends_on("boost") depends_on("blas") depends_on("lapack") -- cgit v1.2.3-70-g09d2 From 0c9acb0f6256389a1fd8266542e0857d6cdeb774 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 22:32:00 -0500 Subject: Update gperftools to version 2.4 --- var/spack/packages/gperftools/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/gperftools/package.py b/var/spack/packages/gperftools/package.py index 0ba44c9329..3ee0de1bc4 100644 --- a/var/spack/packages/gperftools/package.py +++ b/var/spack/packages/gperftools/package.py @@ -30,6 +30,7 @@ class Gperftools(Package): homepage = "https://code.google.com/p/gperftools" url = "https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz" + version('2.4', '2171cea3bbe053036fb5d5d25176a160', url="https://github.com/gperftools/gperftools/releases/download/gperftools-2.4/gperftools-2.4.tar.gz") version('2.3', 'f54dd119f0e46ac1f13264f8d97adf90', url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 3d7e7c53c5c2809df74a8f8d61a7f929e02a1ce6 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 22:33:55 -0500 Subject: Require libunwind --- var/spack/packages/gperftools/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/packages/gperftools/package.py b/var/spack/packages/gperftools/package.py index 3ee0de1bc4..22b2e6c424 100644 --- a/var/spack/packages/gperftools/package.py +++ b/var/spack/packages/gperftools/package.py @@ -33,6 +33,8 @@ class Gperftools(Package): version('2.4', '2171cea3bbe053036fb5d5d25176a160', url="https://github.com/gperftools/gperftools/releases/download/gperftools-2.4/gperftools-2.4.tar.gz") version('2.3', 'f54dd119f0e46ac1f13264f8d97adf90', url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") + depends_on("libunwind") + def install(self, spec, prefix): configure("--prefix=" + prefix) make() -- cgit v1.2.3-70-g09d2 From d5ff7fda6ec26df1e574ef9fc38ffc082ec2daca Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 22:41:18 -0500 Subject: Ensure the APPS environment variable is not set when building OpenSSL --- var/spack/packages/openssl/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index a24de20cc3..36b63e1262 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -17,6 +17,10 @@ class Openssl(Package): parallel = False def install(self, spec, prefix): + # OpenSSL uses a variable APPS in its Makefile. If it happens to be set + # in the environment, then this will override what is set in the + # Makefile, leading to build errors. + del env['APPS'] if spec.satisfies("=darwin-x86_64") or spec.satisfies("=ppc64"): # This needs to be done for all 64-bit architectures (except Linux, # where it happens automatically?) -- cgit v1.2.3-70-g09d2 From d9f1a55c902ca4544e99d946a81df33331f989dc Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 22:48:37 -0500 Subject: Ensure than OpenBLAS provides a file liblapack.a OpenBLAS implements the virtual package "lapack", and its consumers apparently expect a "liblapack.a". --- var/spack/packages/openblas/package.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'var') diff --git a/var/spack/packages/openblas/package.py b/var/spack/packages/openblas/package.py index e01467c05a..9c8fa1c694 100644 --- a/var/spack/packages/openblas/package.py +++ b/var/spack/packages/openblas/package.py @@ -19,3 +19,7 @@ class Openblas(Package): with working_dir(prefix.lib): symlink('libopenblas.a', 'blas.a') symlink('libopenblas.a', 'libblas.a') + + # Lapack virtual package should provide liblapack.a + with working_dir(prefix.lib): + symlink('libopenblas.a', 'liblapack.a') -- cgit v1.2.3-70-g09d2 From b18732173a22aa431165fa321abac7924f66b1e1 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 23:21:54 -0500 Subject: Require Python to build Julia --- var/spack/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/julia/package.py b/var/spack/packages/julia/package.py index 40f94269ab..80a58ab745 100644 --- a/var/spack/packages/julia/package.py +++ b/var/spack/packages/julia/package.py @@ -13,6 +13,7 @@ class Julia(Package): # depends_on("awk") # depends_on("m4") # depends_on("pkg-config") + depends_on("python @2.6:2.9") # I think that Julia requires the dependencies above, but it builds find (on # my system) without these. We should enable them as necessary. -- cgit v1.2.3-70-g09d2 From 79a1de2f17094e7e5592bed8cd9040bff9f43cf5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 9 Jan 2016 10:47:31 -0500 Subject: Add a patch to prevent Julia running out of virtual memory --- var/spack/packages/julia/gc.patch | 11 +++++++++++ var/spack/packages/julia/package.py | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 var/spack/packages/julia/gc.patch (limited to 'var') diff --git a/var/spack/packages/julia/gc.patch b/var/spack/packages/julia/gc.patch new file mode 100644 index 0000000000..6db69c6c1b --- /dev/null +++ b/var/spack/packages/julia/gc.patch @@ -0,0 +1,11 @@ +--- julia/src/gc.c ++++ julia/src/gc.c +@@ -162,7 +162,7 @@ + // A region is contiguous storage for up to REGION_PG_COUNT naturally aligned GC_PAGE_SZ pages + // It uses a very naive allocator (see malloc_page & free_page) + #if defined(_P64) && !defined(_COMPILER_MICROSOFT_) +-#define REGION_PG_COUNT 16*8*4096 // 8G because virtual memory is cheap ++#define REGION_PG_COUNT 8*4096 // 512M + #else + #define REGION_PG_COUNT 8*4096 // 512M + #endif diff --git a/var/spack/packages/julia/package.py b/var/spack/packages/julia/package.py index 80a58ab745..d978842d9c 100644 --- a/var/spack/packages/julia/package.py +++ b/var/spack/packages/julia/package.py @@ -8,6 +8,8 @@ class Julia(Package): version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') + patch('gc.patch') + # Build-time dependencies depends_on("cmake @2.8:") # depends_on("awk") -- cgit v1.2.3-70-g09d2 From 992b9c46dd432ad409025a3cbaeb1c06f880526c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 10 Jan 2016 13:44:53 -0800 Subject: Resolve readline/ncurses dependency when building Lua --- var/spack/packages/lua/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py index 6d8f7806d9..f0c949687e 100644 --- a/var/spack/packages/lua/package.py +++ b/var/spack/packages/lua/package.py @@ -18,11 +18,12 @@ class Lua(Package): version('5.1.3', 'a70a8dfaa150e047866dc01a46272599') depends_on('ncurses') + depends_on('readline') def install(self, spec, prefix): make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS="-L%s/lib -Wl,-rpath,%s"' % (spec['ncurses'].prefix,spec['ncurses'].prefix), + 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, 'linux') make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS="-L%s/lib -Wl,-rpath,%s"' % (spec['ncurses'].prefix,spec['ncurses'].prefix), + 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, 'install') -- cgit v1.2.3-70-g09d2 From 9f2dbc9df43ca0ebb4409c61d0a60bb5c6eccfa7 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 10 Jan 2016 19:34:02 -0500 Subject: Update Lua to 5.3.2 --- var/spack/packages/lua/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py index f0c949687e..e1a1ae9506 100644 --- a/var/spack/packages/lua/package.py +++ b/var/spack/packages/lua/package.py @@ -6,6 +6,7 @@ class Lua(Package): homepage = "http://www.lua.org" url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" + version('5.3.2', '33278c2ab5ee3c1a875be8d55c1ca2a1') version('5.3.1', '797adacada8d85761c079390ff1d9961') version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8af') version('5.2.4', '913fdb32207046b273fdb17aad70be13') -- cgit v1.2.3-70-g09d2 From 23c5a1e6e9b6f07ee3a97eeca3e786703bc1a58d Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 10 Jan 2016 19:37:44 -0500 Subject: Build Lua on Darwin --- var/spack/packages/lua/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py index e1a1ae9506..ca8cfc5365 100644 --- a/var/spack/packages/lua/package.py +++ b/var/spack/packages/lua/package.py @@ -22,9 +22,13 @@ class Lua(Package): depends_on('readline') def install(self, spec, prefix): + if spec.satisfies("=darwin-i686") or spec.satisfies("=darwin-x86_64"): + target = 'macosx' + else: + target = 'linux' make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, - 'linux') + target) make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, 'install') -- cgit v1.2.3-70-g09d2 From 625570e730e0aa699426240c657829e6ac5f3284 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 11 Jan 2016 12:50:47 +0100 Subject: added package : cgal --- var/spack/packages/cgal/package.py | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 var/spack/packages/cgal/package.py (limited to 'var') diff --git a/var/spack/packages/cgal/package.py b/var/spack/packages/cgal/package.py new file mode 100644 index 0000000000..97356433be --- /dev/null +++ b/var/spack/packages/cgal/package.py @@ -0,0 +1,73 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Cgal(Package): + """ + CGAL is a software project that provides easy access to efficient and reliable geometric algorithms in the form of + a C++ library. CGAL is used in various areas needing geometric computation, such as geographic information systems, + computer aided design, molecular biology, medical imaging, computer graphics, and robotics. + """ + homepage = 'http://www.cgal.org/' + url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz' + + version('4.7', '4826714810f3b4c65cac96b90fb03b67') + version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d') + + # Installation instructions : http://doc.cgal.org/latest/Manual/installation.html + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds a debug version of the libraries') + + depends_on('boost') + depends_on('mpfr') + depends_on('gmp') + depends_on('zlib') + + # FIXME : Qt5 dependency missing (needs Qt5 and OpenGL) + # FIXME : Optional third party libraries missing + + def install(self, spec, prefix): + + options = [] + options.extend(std_cmake_args) + # CGAL supports only Release and Debug build type. Any other build type will raise an error at configure time + if '+debug' in spec: + options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') + else: + options.append('-DCMAKE_BUILD_TYPE:STRING=Release') + + if '+shared' in spec: + options.append('-DBUILD_SHARED_LIBS:BOOL=ON') + else: + options.append('-DBUILD_SHARED_LIBS:BOOL=OFF') + + build_directory = join_path(self.stage.path, 'spack-build') + source_directory = self.stage.source_path + with working_dir(build_directory, create=True): + cmake(source_directory, *options) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 81a389151f58a362f9dc447d5af8dfc13fdd8b3b Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 11 Jan 2016 13:00:23 +0100 Subject: cmake : added variant that activates the build of the ncurses gui --- var/spack/packages/cmake/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py index cb54c92d69..173f72742c 100644 --- a/var/spack/packages/cmake/package.py +++ b/var/spack/packages/cmake/package.py @@ -38,8 +38,9 @@ class Cmake(Package): version('3.4.0', 'cd3034e0a44256a0917e254167217fc8', url = 'https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz') -# version('3.0.1', 'e2e05d84cb44a42f1371d9995631dcf5') -# version('3.0.0', '21a1c85e1a3b803c4b48e7ff915a863e') + variant('ncurses', default=True, description='Enables the build of the ncurses gui') + + depends_on('ncurses', when='+ncurses') def install(self, spec, prefix): configure('--prefix=' + prefix, -- cgit v1.2.3-70-g09d2 From 6a51b1d5705096264a1280a35185fd7293aafde3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Jan 2016 13:43:31 -0600 Subject: Add SZip package --- var/spack/packages/szip/package.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/packages/szip/package.py (limited to 'var') diff --git a/var/spack/packages/szip/package.py b/var/spack/packages/szip/package.py new file mode 100644 index 0000000000..c48c5b431e --- /dev/null +++ b/var/spack/packages/szip/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Szip(Package): + """Szip is an implementation of the extended-Rice lossless compression algorithm. + It provides lossless compression of scientific data, and is provided with HDF + software products.""" + + homepage = "https://www.hdfgroup.org/doc_resource/SZIP/" + url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz" + + version('2.1', '902f831bcefb69c6b635374424acbead') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--enable-production', + '--enable-shared', + '--enable-static', + '--enable-encoding') + + make() + make("install") -- cgit v1.2.3-70-g09d2 From adbe1d4f06028ba13e21386f7d62939d4b2eb740 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Jan 2016 13:54:26 -0600 Subject: Add PatchELF package --- var/spack/packages/patchelf/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/packages/patchelf/package.py (limited to 'var') diff --git a/var/spack/packages/patchelf/package.py b/var/spack/packages/patchelf/package.py new file mode 100644 index 0000000000..036dc6bd17 --- /dev/null +++ b/var/spack/packages/patchelf/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Patchelf(Package): + """PatchELF is a small utility to modify the dynamic linker and RPATH of ELF executables.""" + + homepage = "https://nixos.org/patchelf.html" + url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz" + list_url = "http://nixos.org/releases/patchelf/" + list_depth = 2 + + version('0.8', '407b229e6a681ffb0e2cdd5915cb2d01') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 85220dd77d696e11bd39cdd467084f579a10a138 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 11 Jan 2016 13:57:21 -0800 Subject: Revert "Require Python for PETSc" --- var/spack/packages/petsc/package.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py index dc4d6bb412..43c7f8a9b6 100644 --- a/var/spack/packages/petsc/package.py +++ b/var/spack/packages/petsc/package.py @@ -12,8 +12,6 @@ class Petsc(Package): version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13') version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') - depends_on("python @2.6:@2.9") # requires Python for building - depends_on("boost") depends_on("blas") depends_on("lapack") -- cgit v1.2.3-70-g09d2 From 8af8c105597f3bdeb999e288f8201612d6756788 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 11 Jan 2016 17:33:44 -0500 Subject: Avoid key error when env var is unset --- var/spack/packages/openssl/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index 36b63e1262..bbb169ec6b 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -20,7 +20,7 @@ class Openssl(Package): # OpenSSL uses a variable APPS in its Makefile. If it happens to be set # in the environment, then this will override what is set in the # Makefile, leading to build errors. - del env['APPS'] + env.pop('APPS', None) if spec.satisfies("=darwin-x86_64") or spec.satisfies("=ppc64"): # This needs to be done for all 64-bit architectures (except Linux, # where it happens automatically?) -- cgit v1.2.3-70-g09d2 From a5588e4bb76892286fadf486d15e96f16a107a68 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Jan 2016 14:20:48 -0500 Subject: Download package version with a configure script This avoids having to use autoconf, which requires many m4 scripts that are not always available. --- var/spack/packages/libpciaccess/package.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/packages/libpciaccess/package.py b/var/spack/packages/libpciaccess/package.py index 403bafbbd2..0c0847d323 100644 --- a/var/spack/packages/libpciaccess/package.py +++ b/var/spack/packages/libpciaccess/package.py @@ -5,12 +5,10 @@ class Libpciaccess(Package): """Generic PCI access library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - url = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" + url = "http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.4.tar.bz2" - version('0.13.4', git='http://anongit.freedesktop.org/git/xorg/lib/libpciaccess.git', - tag='libpciaccess-0.13.4') + version('0.13.4', 'ace78aec799b1cf6dfaea55d3879ed9f') - depends_on('autoconf') depends_on('libtool') def install(self, spec, prefix): @@ -20,9 +18,6 @@ class Libpciaccess(Package): mkdir(prefix.lib) return - from subprocess import call - call(["./autogen.sh"]) configure("--prefix=%s" % prefix) - make() make("install") -- cgit v1.2.3-70-g09d2 From 36d74d2a97b4b00fb9abc7fb07a067dac157f038 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 11 Jan 2016 17:39:39 -0500 Subject: Correct Python version constraint syntax --- var/spack/packages/petsc/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py index 50533dbe54..1463f360c2 100644 --- a/var/spack/packages/petsc/package.py +++ b/var/spack/packages/petsc/package.py @@ -12,7 +12,7 @@ class Petsc(Package): version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13') version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') - depends_on("python @2.6:@2.9") # requires Python for building + depends_on("python @2.6:2.9") # requires Python for building depends_on("boost") depends_on("blas") -- cgit v1.2.3-70-g09d2 From 50727527bc69a1b8ed26aa84a40039086db33827 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 11 Jan 2016 15:51:02 -0800 Subject: This commit makes the following changes: There are two sensible defaults for building boost libraries: build all of them or build none of them. Previously the Spack boost package took the first approach. This commit changes to building no libraries by default. The user can specify which libraries they need using variants (e.g. +iostreams to compile the boost iostreams library). If no libraries are built then a header-only install is performed (no compilation, just copy header files to prefix). The consequence of this change is that packages which specify a dependency on boost may now fail (until they are updated to specify exactly which boost libraries they need compiled). The user may now specify whether to build shared libraries (static libraries are always built) and whether to build libraries with/out multi-threading support (default is to only build with multi-threading support). The executable on the user-config.jam toolset line is set to Spack's cc script. Before, without this, the desired toolset was used but Spack deferred to the boost build system to choose the compiler version. bzip2 and zlib are always specified as dependencies when iostreams is built (before this could be controlled with the +compression variant). --- var/spack/packages/boost/package.py | 88 ++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 25 deletions(-) (limited to 'var') diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 3427b74ad6..5fb6c9dc04 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -1,4 +1,5 @@ from spack import * +import spack class Boost(Package): """Boost provides free peer-reviewed portable C++ source @@ -44,15 +45,35 @@ class Boost(Package): version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') + libs = ['chrono', + 'date_time', + 'filesystem', + 'iostreams', + 'random', + 'regex', + 'serialization', + 'signals', + 'system', + 'thread', + 'wave', + 'mpi', + 'python'] + + for lib in libs: + variant(lib, default=False, description="Compile with {0} library" + .format(lib)) + variant('debug', default=False, description='Switch to the debug version of Boost') - variant('python', default=False, description='Activate the component Boost.Python') - variant('mpi', default=False, description='Activate the component Boost.MPI') - variant('compression', default=True, description='Activate the compression Boost.iostreams') + variant('shared', default=True, description="Additionally build shared libraries") + variant('multithreaded', default=True, description="Build multi-threaded versions of libraries") + variant('singlethreaded', default=False, description="Build single-threaded versions of libraries") + variant('regex_icu', default=False, description="Include regex ICU support (by default false even if regex library is compiled)") + depends_on('icu', when='+regex_icu') depends_on('python', when='+python') depends_on('mpi', when='+mpi') - depends_on('bzip2', when='+compression') - depends_on('zlib', when='+compression') + depends_on('bzip2', when='+iostreams') + depends_on('zlib', when='+iostreams') def url_for_version(self, version): """Handle Boost's weird URLs, which write the version two different ways.""" @@ -77,22 +98,20 @@ class Boost(Package): # fallback to gcc if no toolset found return 'gcc' - def determine_bootstrap_options(self, spec, options): - options.append('--with-toolset=%s' % self.determine_toolset(spec)) + def determine_bootstrap_options(self, spec, withLibs, options): + boostToolsetId = self.determine_toolset(spec) + options.append('--with-toolset=%s' % boostToolsetId) + options.append("--with-libraries=%s" % ','.join(withLibs)) - without_libs = [] - if '~mpi' in spec: - without_libs.append('mpi') - if '~python' in spec: - without_libs.append('python') - else: + if '+python' in spec: options.append('--with-python=%s' % join_path(spec['python'].prefix.bin, 'python')) - if without_libs: - options.append('--without-libraries=%s' % ','.join(without_libs)) - with open('user-config.jam', 'w') as f: + compiler_wrapper = join_path(spack.build_env_path, 'c++') + f.write("using {0} : : {1} ;\n".format(boostToolsetId, + compiler_wrapper)) + if '+mpi' in spec: f.write('using mpi : %s ;\n' % join_path(spec['mpi'].prefix.bin, 'mpicxx')) @@ -107,12 +126,7 @@ class Boost(Package): else: options.append('variant=release') - if '~compression' in spec: - options.extend([ - '-s', 'NO_BZIP2=1', - '-s', 'NO_ZLIB=1']) - - if '+compression' in spec: + if '+iostreams' in spec: options.extend([ '-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include, '-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib, @@ -120,20 +134,44 @@ class Boost(Package): '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib, ]) + linkTypes = ['static'] + if '+shared' in spec: + linkTypes.append('shared') + + #TODO: at least one of these two options must be active + threadingOpts = [] + if '+multithreaded' in spec: + threadingOpts.append('multi') + if '+singlethreaded' in spec: + threadingOpts.append('single') + options.extend([ 'toolset=%s' % self.determine_toolset(spec), - 'link=static,shared', - 'threading=single,multi', + 'link=%s' % ','.join(linkTypes), + 'threading=%s' % ','.join(threadingOpts), '--layout=tagged']) def install(self, spec, prefix): + withLibs = list() + for lib in Boost.libs: + if "+{0}".format(lib) in spec: + withLibs.append(lib) + if not withLibs: + # if no libraries are specified for compilation, then you dont have + # to configure/build anything, just copy over to the prefix directory. + src = join_path(self.stage.source_path, 'boost') + mkdirp(join_path(prefix, 'include')) + dst = join_path(prefix, 'include', 'boost') + install_tree(src, dst) + return + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' bootstrap = Executable('./bootstrap.sh') bootstrap_options = ['--prefix=%s' % prefix] - self.determine_bootstrap_options(spec, bootstrap_options) + self.determine_bootstrap_options(spec, withLibs, bootstrap_options) bootstrap(*bootstrap_options) -- cgit v1.2.3-70-g09d2 From 30da85c3d8ecf293e791820880fd29306ad07d94 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Jan 2016 11:26:29 +0100 Subject: metis : added variant specified in BUILD.txt. Fixed wrong dependency on MPI. parmetis : added variants as in metis --- var/spack/packages/metis/package.py | 93 +++++++++++++++++++++++------ var/spack/packages/parmetis/package.py | 105 +++++++++++++++++++++++++++------ 2 files changed, 161 insertions(+), 37 deletions(-) (limited to 'var') diff --git a/var/spack/packages/metis/package.py b/var/spack/packages/metis/package.py index 9d6d7fefe1..bbfc4de7d1 100644 --- a/var/spack/packages/metis/package.py +++ b/var/spack/packages/metis/package.py @@ -1,28 +1,83 @@ +############################################################################## +# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + from spack import * + class Metis(Package): - """METIS is a set of serial programs for partitioning graphs, - partitioning finite element meshes, and producing fill reducing - orderings for sparse matrices. The algorithms implemented in - METIS are based on the multilevel recursive-bisection, - multilevel k-way, and multi-constraint partitioning schemes.""" + """ + METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill + reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel + recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes. + """ - homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" + homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' + url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" version('5.1.0', '5465e67079419a69e0116de24fce58fe') - depends_on("cmake @2.8:") # build-time dependency - depends_on('mpi') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds the library in debug mode') + variant('gdb', default=False, description='Enables gdb support') + + variant('idx64', default=False, description='Use int64_t as default index type') + variant('double', default=False, description='Use double precision floating point types') + + depends_on('cmake @2.8:') # build-time dependency + + depends_on('gdb', when='+gdb') def install(self, spec, prefix): - cmake(".", - '-DGKLIB_PATH=%s/GKlib' % pwd(), - '-DSHARED=1', - '-DCMAKE_C_COMPILER=mpicc', - '-DCMAKE_CXX_COMPILER=mpicxx', - '-DSHARED=1', - *std_cmake_args) - - make() - make("install") + + options = [] + options.extend(std_cmake_args) + + build_directory = join_path(self.stage.path, 'spack-build') + source_directory = self.stage.source_path + + options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory)) + + if '+shared' in spec: + options.append('-DSHARED:BOOL=ON') + + if '+debug' in spec: + options.extend(['-DDEBUG:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Debug']) + + if '+gdb' in spec: + options.append('-DGDB:BOOL=ON') + + metis_header = join_path(source_directory, 'include', 'metis.h') + + if '+idx64' in spec: + filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header) + + if '+double' in spec: + filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) + + with working_dir(build_directory, create=True): + cmake(source_directory, *options) + make() + make("install") \ No newline at end of file diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py index 8c61cc00c8..fa1b317eeb 100644 --- a/var/spack/packages/parmetis/package.py +++ b/var/spack/packages/parmetis/package.py @@ -1,27 +1,96 @@ +############################################################################## +# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with 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 shutil + +# FIXME : lot of code is duplicated from packages/metis/package.py . Inheriting from there may reduce +# FIXME : the installation rules to just a few lines + class Parmetis(Package): - """ParMETIS is an MPI-based parallel library that implements a - variety of algorithms for partitioning unstructured graphs, - meshes, and for computing fill-reducing orderings of sparse - matrices.""" - homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview" - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz" + """ + ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured + graphs, meshes, and for computing fill-reducing orderings of sparse matrices. + """ + homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' + url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz' version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') - depends_on('cmake @2.8:') # build dependency + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds the library in debug mode') + variant('gdb', default=False, description='Enables gdb support') + + variant('idx64', default=False, description='Use int64_t as default index type') + variant('double', default=False, description='Use double precision floating point types') + + depends_on('cmake @2.8:') # build dependency depends_on('mpi') + # FIXME : this should conflict with metis as it builds its own version internally + + depends_on('gdb', when='+gdb') + def install(self, spec, prefix): - cmake(".", - '-DGKLIB_PATH=%s/metis/GKlib' % pwd(), - '-DMETIS_PATH=%s/metis' % pwd(), - '-DSHARED=1', - '-DCMAKE_C_COMPILER=mpicc', - '-DCMAKE_CXX_COMPILER=mpicxx', - '-DSHARED=1', - *std_cmake_args) - - make() - make("install") + options = [] + options.extend(std_cmake_args) + + build_directory = join_path(self.stage.path, 'spack-build') + source_directory = self.stage.source_path + metis_source = join_path(source_directory, 'metis') + + # FIXME : Once a contract is defined, MPI compilers should be retrieved indirectly via spec['mpi'] in case + # FIXME : they use a non-standard name + options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=metis_source), + '-DMETIS_PATH:PATH={metis_source}'.format(metis_source=metis_source), + '-DCMAKE_C_COMPILER:STRING=mpicc', + '-DCMAKE_CXX_COMPILER:STRING=mpicxx']) + + if '+shared' in spec: + options.append('-DSHARED:BOOL=ON') + + if '+debug' in spec: + options.extend(['-DDEBUG:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Debug']) + + if '+gdb' in spec: + options.append('-DGDB:BOOL=ON') + + metis_header = join_path(metis_source, 'include', 'metis.h') + + if '+idx64' in spec: + filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header) + + if '+double' in spec: + filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) + + with working_dir(build_directory, create=True): + cmake(source_directory, *options) + make() + make("install") + # Parmetis build system doesn't allow for an external metis to be used, but doesn't copy the required + # metis header either + shutil.copy(metis_header, join_path(self.prefix, 'include')) -- cgit v1.2.3-70-g09d2 From da8b08b5fe1791754ea49590d84c5eeda1e542f2 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Jan 2016 14:55:29 +0100 Subject: parmetis : used spack install method instead of shutil.copy --- var/spack/packages/parmetis/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py index fa1b317eeb..613eabccff 100644 --- a/var/spack/packages/parmetis/package.py +++ b/var/spack/packages/parmetis/package.py @@ -93,4 +93,4 @@ class Parmetis(Package): make("install") # Parmetis build system doesn't allow for an external metis to be used, but doesn't copy the required # metis header either - shutil.copy(metis_header, join_path(self.prefix, 'include')) + install(metis_header, self.prefix.include) -- cgit v1.2.3-70-g09d2 From 1f78b9c7afe79eabc51cb4fdc9a1298dfcc35097 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Jan 2016 16:59:47 +0100 Subject: parmetis : removed leftover import statement --- var/spack/packages/parmetis/package.py | 1 - 1 file changed, 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py index 613eabccff..c897dec7e4 100644 --- a/var/spack/packages/parmetis/package.py +++ b/var/spack/packages/parmetis/package.py @@ -24,7 +24,6 @@ ############################################################################## from spack import * -import shutil # FIXME : lot of code is duplicated from packages/metis/package.py . Inheriting from there may reduce # FIXME : the installation rules to just a few lines -- cgit v1.2.3-70-g09d2 From 9b3e0255f4e8c1ec02aae2a75a11383ad274507d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Jan 2016 11:55:42 -0600 Subject: Add HDF package --- var/spack/packages/hdf/package.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 var/spack/packages/hdf/package.py (limited to 'var') diff --git a/var/spack/packages/hdf/package.py b/var/spack/packages/hdf/package.py new file mode 100644 index 0000000000..7882665dba --- /dev/null +++ b/var/spack/packages/hdf/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Hdf(Package): + """HDF4 (also known as HDF) is a library and multi-object + file format for storing and managing data between machines.""" + + homepage = "https://www.hdfgroup.org/products/hdf4/" + url = "https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.11/src/hdf-4.2.11.tar.gz" + list_url = "https://www.hdfgroup.org/ftp/HDF/releases/" + list_depth = 3 + + version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19') + + depends_on("jpeg") + depends_on("szip@2.1") + depends_on("zlib") + + + def url_for_version(self, version): + return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str(version) + "/src/hdf-" + str(version) + ".tar.gz" + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--with-jpeg=%s' % spec['jpeg'].prefix, + '--with-szlib=%s' % spec['szip'].prefix, + '--with-zlib=%s' % spec['zlib'].prefix, + '--disable-netcdf', + '--enable-fortran', + '--disable-shared', + '--enable-static', + '--enable-production') + + make() + make("install") -- cgit v1.2.3-70-g09d2 From 6985d2c914159f7978c304530f7fb1eb38b2b78d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Jan 2016 13:00:05 -0600 Subject: Add url_for_version function to calculate url --- var/spack/packages/hwloc/package.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/packages/hwloc/package.py b/var/spack/packages/hwloc/package.py index 7ebede76a3..60b315119b 100644 --- a/var/spack/packages/hwloc/package.py +++ b/var/spack/packages/hwloc/package.py @@ -14,15 +14,18 @@ class Hwloc(Package): efficiently.""" 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 - version('1.11.2', '486169cbe111cdea57be12638828ebbf', - url='http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.2.tar.bz2') - version('1.11.1', '002742efd3a8431f98d6315365a2b543', - url='http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.1.tar.bz2') - version('1.9', '1f9f9155682fe8946a97c08896109508') + version('1.11.2', '486169cbe111cdea57be12638828ebbf') + version('1.11.1', '002742efd3a8431f98d6315365a2b543') + version('1.9', '1f9f9155682fe8946a97c08896109508') depends_on('libpciaccess') + def url_for_version(self, version): + return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version) + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From a6f2cc9cbf82bae1b82680651ac6c1804524c77c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Jan 2016 13:28:48 -0600 Subject: Add required dependency version --- var/spack/packages/mpfr/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/mpfr/package.py b/var/spack/packages/mpfr/package.py index 0f2baac004..2758b0da2e 100644 --- a/var/spack/packages/mpfr/package.py +++ b/var/spack/packages/mpfr/package.py @@ -31,9 +31,9 @@ class Mpfr(Package): url = "http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.bz2" version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138') - # version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') + version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') - depends_on('gmp') + depends_on('gmp@4.1.0:') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From ffaa4a8922e8bb41a45eecb3ab7ba72bf677317e Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 13 Jan 2016 10:05:19 +0100 Subject: gmsh : added package with basic compile options --- var/spack/packages/gmsh/package.py | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 var/spack/packages/gmsh/package.py (limited to 'var') diff --git a/var/spack/packages/gmsh/package.py b/var/spack/packages/gmsh/package.py new file mode 100644 index 0000000000..45f2d4eadf --- /dev/null +++ b/var/spack/packages/gmsh/package.py @@ -0,0 +1,80 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Gmsh(Package): + """ + Gmsh is a free 3D finite element grid generator with a build-in CAD engine and post-processor. Its design goal is + to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization + capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of + any input to these modules is done either interactively using the graphical user interface or in ASCII text files + using Gmsh's own scripting language. + """ + homepage = 'http://gmsh.info' + url = 'http://gmsh.info/src/gmsh-2.11.0-source.tgz' + + version('2.11.0', 'f15b6e7ac9ca649c9a74440e1259d0db') + + # FIXME : Misses dependencies on gmm, FLTK, PetsC, TetGen, HDF5 + + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds the library in debug mode') + variant('mpi', default=False, description='Builds MPI support for parser and solver') + variant('compression', default=True, description='Enables IO compression through zlib') + + depends_on('blas') + depends_on('lapack') + depends_on('gmp') + depends_on('mpi', when='+mpi') + depends_on('zlib', when='+compression') + + def install(self, spec, prefix): + + options = [] + options.extend(std_cmake_args) + + build_directory = join_path(self.stage.path, 'spack-build') + source_directory = self.stage.source_path + + if '+shared' in spec: + options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON', + '-DENABLE_BUILD_DYNAMIC:BOOL=ON']) # Builds dynamic executable and installs shared library + else: + options.append('-DENABLE_BUILD_LIB:BOOL=ON') # Builds and installs static library + + if '+debug' in spec: + options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') + + if '+mpi' in spec: + options.append('-DENABLE_MPI:BOOL=ON') + + if '+compression' in spec: + options.append('-DENABLE_COMPRESSED_IO:BOOL=ON') + + with working_dir(build_directory, create=True): + cmake(source_directory, *options) + make() + make('install') -- cgit v1.2.3-70-g09d2 From 767f286a9fbdd1a44e2231ef7e21ecd64c1bfb30 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 13 Jan 2016 11:26:10 +0100 Subject: gmsh : added fltk support --- var/spack/packages/fltk/font.patch | 44 +++++++++++++++++++++++++++++ var/spack/packages/fltk/package.py | 58 ++++++++++++++++++++++++++++++++++++++ var/spack/packages/gmsh/package.py | 6 ++-- 3 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 var/spack/packages/fltk/font.patch create mode 100644 var/spack/packages/fltk/package.py (limited to 'var') diff --git a/var/spack/packages/fltk/font.patch b/var/spack/packages/fltk/font.patch new file mode 100644 index 0000000000..7706a1b4ee --- /dev/null +++ b/var/spack/packages/fltk/font.patch @@ -0,0 +1,44 @@ +Index: FL/x.H +=================================================================== +--- a/FL/x.H (revision 10476) ++++ b/FL/x.H (working copy) +@@ -132,6 +132,7 @@ + XFontStruct *ptr; + }; + extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; ++extern FL_EXPORT XFontStruct* fl_core_font(); + + // this object contains all X-specific stuff about a window: + // Warning: this object is highly subject to change! +Index: src/fl_font.cxx +=================================================================== +--- a/src/fl_font.cxx (revision 10476) ++++ b/src/fl_font.cxx (working copy) +@@ -55,6 +55,14 @@ + # include "fl_font_x.cxx" + #endif // WIN32 + ++#ifdef WIN32 ++#elif defined(__APPLE__) ++#else ++XFontStruct *fl_core_font() ++{ ++ return fl_xfont.value(); ++} ++#endif + + double fl_width(const char* c) { + if (c) return fl_width(c, (int) strlen(c)); +Index: src/gl_draw.cxx +=================================================================== +--- a/src/gl_draw.cxx (revision 10476) ++++ b/src/gl_draw.cxx (working copy) +@@ -84,7 +84,7 @@ + * then sorting through them at draw time (for normal X rendering) to find which one can + * render the current glyph... But for now, just use the first font in the list for GL... + */ +- XFontStruct *font = fl_xfont; ++ XFontStruct *font = fl_core_font(); + int base = font->min_char_or_byte2; + int count = font->max_char_or_byte2-base+1; + fl_fontsize->listbase = glGenLists(256); diff --git a/var/spack/packages/fltk/package.py b/var/spack/packages/fltk/package.py new file mode 100644 index 0000000000..0b462f83f8 --- /dev/null +++ b/var/spack/packages/fltk/package.py @@ -0,0 +1,58 @@ +############################################################################## +# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Fltk(Package): + """ + FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and + MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its + built-in GLUT emulation. + + FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK + also includes an excellent UI builder called FLUID that can be used to create applications in minutes. + """ + homepage = 'http://www.fltk.org/' + url = 'http://fltk.org/pub/fltk/1.3.3/fltk-1.3.3-source.tar.gz' + + version('1.3.3', '9ccdb0d19dc104b87179bd9fd10822e3') + + patch('font.patch', when='@1.3.3') + + variant('shared', default=True, description='Enables the build of shared libraries') + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix, + '--enable-localjpeg', + '--enable-localpng', + '--enable-localzlib'] + + if '+shared' in spec: + options.append('--enable-shared') + + # FLTK needs to be built in-source + configure(*options) + make() + make('install') diff --git a/var/spack/packages/gmsh/package.py b/var/spack/packages/gmsh/package.py index 45f2d4eadf..4e298d2a09 100644 --- a/var/spack/packages/gmsh/package.py +++ b/var/spack/packages/gmsh/package.py @@ -27,7 +27,7 @@ from spack import * class Gmsh(Package): """ - Gmsh is a free 3D finite element grid generator with a build-in CAD engine and post-processor. Its design goal is + Gmsh is a free 3D finite element grid generator with a built-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of any input to these modules is done either interactively using the graphical user interface or in ASCII text files @@ -38,17 +38,19 @@ class Gmsh(Package): version('2.11.0', 'f15b6e7ac9ca649c9a74440e1259d0db') - # FIXME : Misses dependencies on gmm, FLTK, PetsC, TetGen, HDF5 + # FIXME : Misses dependencies on gmm, PetsC, TetGen, HDF5 variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') variant('mpi', default=False, description='Builds MPI support for parser and solver') + variant('fltk', default=False, description='Enables the build of the FLTK GUI') variant('compression', default=True, description='Enables IO compression through zlib') depends_on('blas') depends_on('lapack') depends_on('gmp') depends_on('mpi', when='+mpi') + depends_on('fltk', when='+fltk') # Assumes OpenGL with GLU is already provided by the system depends_on('zlib', when='+compression') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 78b57787faebf906a9617d1425e489ca598153f4 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 13 Jan 2016 12:22:59 +0100 Subject: gmsh : added hdf5 support --- var/spack/packages/gmsh/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/gmsh/package.py b/var/spack/packages/gmsh/package.py index 4e298d2a09..9d759303cb 100644 --- a/var/spack/packages/gmsh/package.py +++ b/var/spack/packages/gmsh/package.py @@ -38,12 +38,13 @@ class Gmsh(Package): version('2.11.0', 'f15b6e7ac9ca649c9a74440e1259d0db') - # FIXME : Misses dependencies on gmm, PetsC, TetGen, HDF5 + # FIXME : Misses dependencies on gmm, PetsC, TetGen variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') variant('mpi', default=False, description='Builds MPI support for parser and solver') variant('fltk', default=False, description='Enables the build of the FLTK GUI') + variant('hdf5', default=False, description='Enables HDF5 support') variant('compression', default=True, description='Enables IO compression through zlib') depends_on('blas') @@ -51,6 +52,7 @@ class Gmsh(Package): depends_on('gmp') depends_on('mpi', when='+mpi') depends_on('fltk', when='+fltk') # Assumes OpenGL with GLU is already provided by the system + depends_on('hdf5', when='+hdf5') depends_on('zlib', when='+compression') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From aa1f96c73b0839f560f97b4814959c35be1ac056 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 13 Jan 2016 11:21:52 -0500 Subject: New package "cereal" --- var/spack/packages/cereal/Werror.patch | 33 +++++++++++++++++++++++++++++++++ var/spack/packages/cereal/package.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 var/spack/packages/cereal/Werror.patch create mode 100644 var/spack/packages/cereal/package.py (limited to 'var') diff --git a/var/spack/packages/cereal/Werror.patch b/var/spack/packages/cereal/Werror.patch new file mode 100644 index 0000000000..d39eaaffdb --- /dev/null +++ b/var/spack/packages/cereal/Werror.patch @@ -0,0 +1,33 @@ +--- old/sandbox/CMakeLists.txt ++++ new/sandbox/CMakeLists.txt +@@ -4,9 +4,11 @@ + add_executable(sandbox_json sandbox_json.cpp) + add_executable(sandbox_rtti sandbox_rtti.cpp) + ++if(Boost_FOUND) + add_executable(sandbox_vs sandbox_vs.cpp) + target_link_libraries(sandbox_vs sandbox_vs_dll) + include_directories(sandbox_shared_lib) ++endif(Boost_FOUND) + + if(Boost_FOUND) + add_executable(performance performance.cpp) +--- old/include/cereal/types/common.hpp ++++ new/include/cereal/types/common.hpp +@@ -106,14 +106,16 @@ + t = reinterpret_cast::type const &>( value ); + } + ++#ifndef CEREAL_ENABLE_RAW_POINTER_SERIALIZATION + //! Serialization for raw pointers + /*! This exists only to throw a static_assert to let users know we don't support raw pointers. */ + template inline + void CEREAL_SERIALIZE_FUNCTION_NAME( Archive &, T * & ) + { + static_assert(cereal::traits::detail::delay_static_assert::value, + "Cereal does not support serializing raw pointers - please use a smart pointer"); + } ++#endif + + //! Serialization for C style arrays + template inline diff --git a/var/spack/packages/cereal/package.py b/var/spack/packages/cereal/package.py new file mode 100644 index 0000000000..a83927456f --- /dev/null +++ b/var/spack/packages/cereal/package.py @@ -0,0 +1,34 @@ +from spack import * +import shutil + +class Cereal(Package): + """cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns them into different representations, such as compact binary encodings, XML, or JSON. cereal was designed to be fast, light-weight, and easy to extend - it has no external dependencies and can be easily bundled with other code or used standalone.""" + homepage = "http://uscilab.github.io/cereal/" + url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz" + + version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9') + version('1.1.1', '0ceff308c38f37d5b5f6df3927451c27') + version('1.1.0', '9f2d5f72e935c54f4c6d23e954ce699f') + version('1.0.0', 'd1bacca70a95cec0ddbff68b0871296b') + version('0.9.1', '8872d4444ff274ce6cd1ed364d0fc0ad') + + patch("Werror.patch") + + depends_on("cmake @2.6.2:") + + def install(self, spec, prefix): + # Don't use -Werror + filter_file(r'-Werror', '', 'CMakeLists.txt') + + # configure + # Boost is only used for self-tests, which we are not running (yet?) + cmake('.', '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE', *std_cmake_args) + + # Build + make() + + # Install + shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True) + shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True) + shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True) + shutil.copytree('include', join_path(prefix, 'include'), symlinks=True) -- cgit v1.2.3-70-g09d2 From 244ee673d67794806e8259fdc379c83950161a2a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 13 Jan 2016 11:44:51 -0600 Subject: Add latest version --- var/spack/packages/mpich/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py index 7cfa0a3b61..00b7dfda75 100644 --- a/var/spack/packages/mpich/package.py +++ b/var/spack/packages/mpich/package.py @@ -33,11 +33,12 @@ class Mpich(Package): list_url = "http://www.mpich.org/static/downloads/" list_depth = 2 + version('3.2', 'f414cfa77099cd1fa1a5ae4e22db508a') version('3.1.4', '2ab544607986486562e076b83937bba2') version('3.1.3', '93cb17f91ac758cbf9174ecb03563778') version('3.1.2', '7fbf4b81dcb74b07ae85939d1ceee7f1') version('3.1.1', '40dc408b1e03cc36d80209baaa2d32b7') - version('3.1', '5643dd176499bfb7d25079aaff25f2ec') + version('3.1', '5643dd176499bfb7d25079aaff25f2ec') version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') provides('mpi@:3.0', when='@3:') -- cgit v1.2.3-70-g09d2 From aa3897a8809be7fd729a59fcc3308ecf480a4226 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 14 Jan 2016 17:40:11 -0500 Subject: Install ncurses properly Currently, ncurses's include files are installed into two separate subdirectories, "install/ncurses" and "install/ncursesw". The second level of subdirectories ("ncurses" and "ncursesw") are non-standard. I checked several systems to confirm this, and ncurses examples on the web also simply contain "#include " instead of "#include ", which would be necessary to use the currently installed ncurses packages. For example, this also breaks llvm, which uses ncurses, but does not expect the second level of subdirectories. I am now using the option "--enable-overwrite", which installs the header files directly in to ".../include". I also enable "widec" support all the time. These options are e.g. similar to the ones used by MacPorts, and I confirm that they make the llvm package build (which didn't build before). --- var/spack/packages/ncurses/package.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'var') diff --git a/var/spack/packages/ncurses/package.py b/var/spack/packages/ncurses/package.py index 31f53b6c43..8dc808caac 100644 --- a/var/spack/packages/ncurses/package.py +++ b/var/spack/packages/ncurses/package.py @@ -17,19 +17,14 @@ class Ncurses(Package): patch('patch_gcc_5.txt', when='%gcc@5.0:') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-shared", - "--enable-widec", - "--disable-pc-files", - "--without-ada") + opts = [ + "--prefix=%s" % prefix, + "--with-shared", + "--with-cxx-shared", + "--enable-widec", + "--enable-overwrite", + "--disable-lib-suffixes", + "--without-ada"] + configure(*opts) make() make("install") - - configure("--prefix=%s" % prefix, - "--with-shared", - "--disable-widec", - "--disable-pc-files", - "--without-ada") - make() - make("install") - -- cgit v1.2.3-70-g09d2 From 3e703cc2812ab9120baabeab3914ee9fd9aefc8c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 14 Jan 2016 17:52:28 -0500 Subject: LLVM depends on cmake, and does not depend on isl Add cmake requirement. Remove gmp and isl requirements. Using an external isl leads to a build failure for me on a fairly standard Fedora Linux workstation. The Spack package file says that isl is required for polly, however, the polly documentation states that as of LLVM 3.7, polly includes isl, and has no external dependencies any more. --- var/spack/packages/llvm/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index d4be2b9541..a2b2c6eccc 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -48,6 +48,9 @@ class Llvm(Package): variant('gold', default=True, description="Add support for LTO with the gold linker plugin") + # Build dependency + depends_on('cmake @2.8.12.2:') + # Universal dependency depends_on('python@2.7:') @@ -60,8 +63,8 @@ class Llvm(Package): depends_on('binutils+gold', when='+gold') # polly plugin - depends_on('gmp', when='+polly') - depends_on('isl', when='+polly') + depends_on('gmp', when='@:3.6.999 +polly') + depends_on('isl', when='@:3.6.999 +polly') base_url = 'http://llvm.org/releases/%%(version)s/%(pkg)s-%%(version)s.src.tar.xz' llvm_url = base_url % { 'pkg' : 'llvm'} @@ -172,7 +175,7 @@ class Llvm(Package): env['CXXFLAGS'] = self.compiler.cxx11_flag cmake_args = [ arg for arg in std_cmake_args if 'BUILD_TYPE' not in arg ] - build_type = 'RelWithDebInfo' if '+debug' in spec else 'Release' + build_type = 'RelWithDebInfo' if '+debug' in spec else 'Release' cmake_args.extend([ '..', '-DCMAKE_BUILD_TYPE=' + build_type, -- cgit v1.2.3-70-g09d2 From 0a993cd9d7791c057fca91710434001857cf2818 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 14 Jan 2016 20:44:51 -0500 Subject: New package GNU tar --- var/spack/packages/tar/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/packages/tar/package.py (limited to 'var') diff --git a/var/spack/packages/tar/package.py b/var/spack/packages/tar/package.py new file mode 100644 index 0000000000..539174017c --- /dev/null +++ b/var/spack/packages/tar/package.py @@ -0,0 +1,13 @@ +from spack import * + +class Tar(Package): + """GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation.""" + homepage = "https://www.gnu.org/software/tar/" + url = "http://ftp.gnu.org/gnu/tar/tar-1.28.tar.gz" + + version('1.28', '6ea3dbea1f2b0409b234048e021a9fd7') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make('install') -- cgit v1.2.3-70-g09d2 From f6680a0051a586844386f0df57db8d6b9b11c3d3 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 15 Jan 2016 16:02:35 -0500 Subject: qhull: apply patch to work with libc++'s standard library Only seen on OS X with clang right now. --- var/spack/packages/qhull/package.py | 3 ++ var/spack/packages/qhull/qhull-iterator.patch | 45 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 var/spack/packages/qhull/qhull-iterator.patch (limited to 'var') diff --git a/var/spack/packages/qhull/package.py b/var/spack/packages/qhull/package.py index 9da4078a70..f6712ced38 100644 --- a/var/spack/packages/qhull/package.py +++ b/var/spack/packages/qhull/package.py @@ -20,6 +20,9 @@ class Qhull(Package): version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c', url="http://www.qhull.org/download/qhull-2012.1-src.tgz") + # https://github.com/qhull/qhull/pull/5 + patch('qhull-iterator.patch') + def install(self, spec, prefix): with working_dir('spack-build', create=True): cmake('..', *std_cmake_args) diff --git a/var/spack/packages/qhull/qhull-iterator.patch b/var/spack/packages/qhull/qhull-iterator.patch new file mode 100644 index 0000000000..88e931d84f --- /dev/null +++ b/var/spack/packages/qhull/qhull-iterator.patch @@ -0,0 +1,45 @@ +From 93f4b306c54bb5be7724dcc19c6e747b62ac76dd Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Thu, 28 May 2015 11:12:25 -0400 +Subject: [PATCH] iterator: use the header + +Standard libraries are doing funky things with inline namespaces which +make these declarations impossible to get right. Just include the +header. +--- + src/libqhullcpp/QhullIterator.h | 3 +-- + src/libqhullcpp/QhullLinkedList.h | 5 +---- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/libqhullcpp/QhullIterator.h b/src/libqhullcpp/QhullIterator.h +index 9dde894..49f3a3b 100644 +--- a/src/libqhullcpp/QhullIterator.h ++++ b/src/libqhullcpp/QhullIterator.h +@@ -14,10 +14,9 @@ extern "C" { + } + + #include ++#include + #include + #include +-//! Avoid dependence on +-namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; } + + namespace orgQhull { + +diff --git a/src/libqhullcpp/QhullLinkedList.h b/src/libqhullcpp/QhullLinkedList.h +index d828ac6..00b9008 100644 +--- a/src/libqhullcpp/QhullLinkedList.h ++++ b/src/libqhullcpp/QhullLinkedList.h +@@ -9,10 +9,7 @@ + #ifndef QHULLLINKEDLIST_H + #define QHULLLINKEDLIST_H + +-namespace std { +- struct bidirectional_iterator_tag; +- struct random_access_iterator_tag; +-}//std ++#include + + #include "QhullError.h" + extern "C" { -- cgit v1.2.3-70-g09d2 From c3bf1a77415e4e71c726637299fe840cb1156d35 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 15 Jan 2016 16:03:51 -0500 Subject: py-numpy: make blas/lapack optional dependencies OS X is having trouble building these libraries, so make them optional dependencies. --- var/spack/packages/py-numpy/package.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/packages/py-numpy/package.py b/var/spack/packages/py-numpy/package.py index 4c085fba6e..0354811186 100644 --- a/var/spack/packages/py-numpy/package.py +++ b/var/spack/packages/py-numpy/package.py @@ -7,15 +7,18 @@ class PyNumpy(Package): version('1.9.1', '78842b73560ec378142665e712ae4ad9') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') - + + variant('blas', default=True) + extends('python') depends_on('py-nose') - depends_on('netlib-blas+fpic') - depends_on('netlib-lapack+shared') + depends_on('netlib-blas+fpic', when='+blas') + depends_on('netlib-lapack+shared', when='+blas') def install(self, spec, prefix): - with open('site.cfg', 'w') as f: - f.write('[DEFAULT]\n') - f.write('libraries=lapack,blas\n') - f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) + if '+blas' in spec: + with open('site.cfg', 'w') as f: + f.write('[DEFAULT]\n') + f.write('libraries=lapack,blas\n') + f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 4f60948bffd33deda0f5009e655fac1308729522 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 15 Jan 2016 16:04:49 -0500 Subject: py-matplotlib: depend on freetype Probably a missed dependency, but appeared on OS X. --- var/spack/packages/py-matplotlib/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py index 4776c581ee..2167735fb8 100644 --- a/var/spack/packages/py-matplotlib/package.py +++ b/var/spack/packages/py-matplotlib/package.py @@ -26,6 +26,7 @@ class PyMatplotlib(Package): depends_on('py-pbr') depends_on('py-funcsigs') + depends_on('freetype') depends_on('qt', when='+gui') depends_on('bzip2') depends_on('tcl', when='+gui') -- cgit v1.2.3-70-g09d2 From eac795abc3637f79363a4a2648642a4a50055d19 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 15 Jan 2016 15:09:36 -0600 Subject: Add verbs and psm variants --- var/spack/packages/openmpi/package.py | 48 ++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 15 deletions(-) (limited to 'var') diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py index be2202fbbd..463719f9db 100644 --- a/var/spack/packages/openmpi/package.py +++ b/var/spack/packages/openmpi/package.py @@ -13,29 +13,33 @@ class Openmpi(Package): """ homepage = "http://www.open-mpi.org" + url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.1.tar.bz2" + list_url = "http://www.open-mpi.org/software/ompi/" + list_depth = 3 - version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e', - url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.1.tar.bz2") - version('1.10.0', '280cf952de68369cebaca886c5ce0304', - url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2") - version('1.8.8', '0dab8e602372da1425e9242ae37faf8c', - url = 'http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.bz2') - version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475', - url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2") + version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') + version('1.10.0', '280cf952de68369cebaca886c5ce0304') + version('1.8.8', '0dab8e602372da1425e9242ae37faf8c') + version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475') patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") patch('configure.patch', when="@1.10.0:") - provides('mpi@:2.2', when='@1.6.5') # Open MPI 1.6.5 supports MPI-2.2 - provides('mpi@:3.0', when='@1.8.8') # Open MPI 1.8.8 supports MPI-3.0 - provides('mpi@:3.0', when='@1.10.0') # Open MPI 1.10.0 supports MPI-3.0 - provides('mpi@:3.0', when='@1.10.1') # Open MPI 1.10.1 supports MPI-3.0 + variant('psm', default=False, description='Build support for the PSM library.') + variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + + provides('mpi@:2.2', when='@1.6.5') + provides('mpi@:3.0', when='@1.7.5:') depends_on('hwloc') + def url_for_version(self, version): + return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) + + def setup_dependent_environment(self, module, spec, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" os.environ['OMPI_CC'] = 'cc' @@ -45,9 +49,23 @@ class Openmpi(Package): def install(self, spec, prefix): - config_args = ["--prefix=%s" % prefix] - - config_args.append("--with-hwloc=%s" % spec['hwloc'].prefix) + config_args = ["--prefix=%s" % prefix, + "--with-hwloc=%s" % spec['hwloc'].prefix, + "--with-tm", # necessary for Torque support + "--enable-shared", + "--enable-static"] + + # Variants + if '+psm' in spec: + config_args.append("--with-psm") + + if '+verbs' in spec: + # Up through version 1.6, this option was previously named --with-openib + if spec.satisfies('@:1.6'): + config_args.append("--with-openib") + # In version 1.7, it was renamed to be --with-verbs + elif spec.satisfies('@1.7:'): + config_args.append("--with-verbs") # TODO: use variants for this, e.g. +lanl, +llnl, etc. # use this for LANL builds, but for LLNL builds, we need: -- cgit v1.2.3-70-g09d2 From d22cf1aed1d033610481cb451909c93916848ccc Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 15 Jan 2016 18:07:41 -0800 Subject: 1. raise an exception if the multithreaded and singlethreaded options are both disabled 2. invoke the b2 installation once for each enabled threading option (apparently the install fails if a single call has both options enabled for mpi) --- var/spack/packages/boost/package.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 5fb6c9dc04..1992d4d39a 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -138,18 +138,20 @@ class Boost(Package): if '+shared' in spec: linkTypes.append('shared') - #TODO: at least one of these two options must be active threadingOpts = [] if '+multithreaded' in spec: threadingOpts.append('multi') if '+singlethreaded' in spec: threadingOpts.append('single') + if not threadingOpts: + raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled") options.extend([ 'toolset=%s' % self.determine_toolset(spec), 'link=%s' % ','.join(linkTypes), - 'threading=%s' % ','.join(threadingOpts), '--layout=tagged']) + + return threadingOpts def install(self, spec, prefix): withLibs = list() @@ -181,6 +183,10 @@ class Boost(Package): b2 = Executable(b2name) b2_options = ['-j', '%s' % make_jobs] - self.determine_b2_options(spec, b2_options) + threadingOpts = self.determine_b2_options(spec, b2_options) - b2('install', *b2_options) + # In theory it could be done on one call but it fails on + # Boost.MPI if the threading options are not separated. + for threadingOpt in threadingOpts: + b2('install', 'threading=%s' % threadingOpt, *b2_options) + -- cgit v1.2.3-70-g09d2 From 36a428b8fc2cfaaab7fb52034a3272c67eb47aea Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 10:49:13 -0500 Subject: Make binutils build on OS X Binutils defines several global variables multiple times. Apparently this works fine under Linux, but it leads to a linker error on Darwin. Rename these global variables. Note that binutils on OS X is still not really useful, as important tools (e.g. ld) are not supported. --- var/spack/packages/binutils/cr16.patch | 26 ++++++++++++++++++++++++++ var/spack/packages/binutils/package.py | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 var/spack/packages/binutils/cr16.patch (limited to 'var') diff --git a/var/spack/packages/binutils/cr16.patch b/var/spack/packages/binutils/cr16.patch new file mode 100644 index 0000000000..2727c70b23 --- /dev/null +++ b/var/spack/packages/binutils/cr16.patch @@ -0,0 +1,26 @@ +--- old/opcodes/cr16-dis.c 2014-10-14 03:32:04.000000000 -0400 ++++ new/opcodes/cr16-dis.c 2016-01-14 21:54:26.000000000 -0500 +@@ -78,7 +78,7 @@ + REG_ARG_TYPE; + + /* Current opcode table entry we're disassembling. */ +-const inst *instruction; ++extern const inst *instruction; + /* Current instruction we're disassembling. */ + ins cr16_currInsn; + /* The current instruction is read into 3 consecutive words. */ +@@ -86,12 +86,12 @@ + /* Contains all words in appropriate order. */ + ULONGLONG cr16_allWords; + /* Holds the current processed argument number. */ +-int processing_argument_number; ++extern int processing_argument_number; + /* Nonzero means a IMM4 instruction. */ + int imm4flag; + /* Nonzero means the instruction's original size is + incremented (escape sequence is used). */ +-int size_changed; ++extern int size_changed; + + + /* Print the constant expression length. */ diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py index 1de796bee0..de04221e33 100644 --- a/var/spack/packages/binutils/package.py +++ b/var/spack/packages/binutils/package.py @@ -14,6 +14,8 @@ class Binutils(Package): variant('gold', default=True, description="build the gold linker") patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') + patch('cr16.patch') + variant('libiberty', default=False, description='Also install libiberty.') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From e585a5d8a3222a1203c4b4135746b8b5f9ab5e54 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 11:02:30 -0500 Subject: Update Julia to 0.4.3 --- var/spack/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/julia/package.py b/var/spack/packages/julia/package.py index d978842d9c..6900af38e4 100644 --- a/var/spack/packages/julia/package.py +++ b/var/spack/packages/julia/package.py @@ -6,6 +6,7 @@ class Julia(Package): homepage = "http://julialang.org" url = "http://github.com/JuliaLang/julia/releases/download/v0.4.2/julia-0.4.2.tar.gz" + version('0.4.3', '7b9f096798fca4bef262a64674bc2b52') version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') patch('gc.patch') -- cgit v1.2.3-70-g09d2 From 60656b6255886c492ee6c2ee8665b9f5b4b86e97 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 11:03:40 -0500 Subject: Update libtool to 2.4.6 --- var/spack/packages/libtool/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/libtool/package.py b/var/spack/packages/libtool/package.py index a07daf9781..82a54953b2 100644 --- a/var/spack/packages/libtool/package.py +++ b/var/spack/packages/libtool/package.py @@ -5,6 +5,7 @@ class Libtool(Package): homepage = "https://www.gnu.org/software/libtool/" url = "http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz" + version('2.4.6' , 'addf44b646ddb4e3919805aa88fa7c5e') version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From f4b87e29675ef51ab671bc2cbe4bdb4574b9bd77 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 11:05:15 -0500 Subject: Mbedtls depends on cmake --- var/spack/packages/mbedtls/package.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'var') diff --git a/var/spack/packages/mbedtls/package.py b/var/spack/packages/mbedtls/package.py index 7745522956..3da00cf417 100644 --- a/var/spack/packages/mbedtls/package.py +++ b/var/spack/packages/mbedtls/package.py @@ -13,6 +13,8 @@ class Mbedtls(Package): version('2.1.3' , '7eb4cf1dfa68578a2c8dbd0b6fa752dd') version('1.3.16', '4144d7320c691f721aeb9e67a1bc38e0') + depends_on('cmake') + def install(self, spec, prefix): cmake('.', *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 81f1311a604c3c9474fbb0bc4911a5648e54a1ab Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 14:57:08 -0800 Subject: Netcdf requires cmake >=2.8.12 --- var/spack/packages/netcdf/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/packages/netcdf/package.py b/var/spack/packages/netcdf/package.py index e1e0d836c6..239644d894 100644 --- a/var/spack/packages/netcdf/package.py +++ b/var/spack/packages/netcdf/package.py @@ -13,6 +13,7 @@ class Netcdf(Package): patch('netcdf-4.3.3-mpi.patch') # Dependencies: + depends_on("cmake @2.8.12:") # >HDF5 depends_on("hdf5") -- cgit v1.2.3-70-g09d2 From 4bab6f9fdb950b958d439d217f0aec671f336727 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 17 Jan 2016 18:55:36 -0800 Subject: Update cmake package to use http in all URLs. --- var/spack/packages/cmake/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py index 173f72742c..f67ae21ebd 100644 --- a/var/spack/packages/cmake/package.py +++ b/var/spack/packages/cmake/package.py @@ -31,12 +31,12 @@ class Cmake(Package): version('2.8.10.2', '097278785da7182ec0aea8769d06860c', url = 'http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz') - + version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f', url = 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz') - + version('3.4.0', 'cd3034e0a44256a0917e254167217fc8', - url = 'https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz') + url = 'http://cmake.org/files/v3.4/cmake-3.4.0.tar.gz') variant('ncurses', default=True, description='Enables the build of the ncurses gui') -- cgit v1.2.3-70-g09d2 From 58162ec17070db5476b3aeffe1ef40d676a62949 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 18 Jan 2016 16:03:41 -0600 Subject: Add verbs variant, remove deprecated configure flags --- var/spack/packages/mpich/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py index 00b7dfda75..128a1f44ae 100644 --- a/var/spack/packages/mpich/package.py +++ b/var/spack/packages/mpich/package.py @@ -41,6 +41,8 @@ class Mpich(Package): version('3.1', '5643dd176499bfb7d25079aaff25f2ec') version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') + variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + provides('mpi@:3.0', when='@3:') provides('mpi@:1.3', when='@1:') @@ -56,14 +58,20 @@ class Mpich(Package): config_args = ["--prefix=" + prefix, "--enable-shared"] + # Variants + if '+verbs' in spec: + config_args.append("--with-ibverbs") + else: + config_args.append("--without-ibverbs") + # TODO: Spack should make it so that you can't actually find # these compilers if they're "disabled" for the current # compiler configuration. if not self.compiler.f77: - config_args.append("--disable-f77") + config_args.append("--disable-fortran=f77") if not self.compiler.fc: - config_args.append("--disable-fc") + config_args.append("--disable-fortran=fc") configure(*config_args) make() -- cgit v1.2.3-70-g09d2 From 67ea7ce0ab2b89b19d73ea60285ba30bccebf4fb Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 18 Jan 2016 00:36:06 -0800 Subject: Fix LaunchMon on newer gcc versions. --- var/spack/repos/builtin/packages/launchmon/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py index f97384a249..aec2fd6fa7 100644 --- a/var/spack/repos/builtin/packages/launchmon/package.py +++ b/var/spack/repos/builtin/packages/launchmon/package.py @@ -37,6 +37,16 @@ class Launchmon(Package): depends_on('automake') depends_on('libtool') + + def patch(self): + # This patch makes libgcrypt compile correctly with newer gcc versions. + mf = FileFilter('tools/libgcrypt/tests/Makefile.in') + mf.filter(r'(basic_LDADD\s*=\s*.*)', r'\1 -lgpg-error') + mf.filter(r'(tsexp_LDADD\s*=\s*.*)', r'\1 -lgpg-error') + mf.filter(r'(keygen_LDADD\s*=\s*.*)', r'\1 -lgpg-error') + mf.filter(r'(benchmark_LDADD\s*=\s*.*)', r'\1 -lgpg-error') + + def install(self, spec, prefix): configure( "--prefix=" + prefix, -- cgit v1.2.3-70-g09d2 From b7b4faff96dbc4d1559fd06d1e9f1327590f1cc7 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 18 Jan 2016 03:01:46 -0800 Subject: disable cairo-trace, which is incompatible with older libiberty.h. --- var/spack/repos/builtin/packages/cairo/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index e1ac8aaa7d..8255e869be 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -14,6 +14,7 @@ class Cairo(Package): def install(self, spec, prefix): configure("--prefix=%s" % prefix, + "--disable-trace", # can cause problems with libiberty "--enable-tee") make() make("install") -- cgit v1.2.3-70-g09d2 From 047f1b9de9befd06c511b4d72a80a8b4c40a018a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 18 Jan 2016 03:02:21 -0800 Subject: disable parallel install for glib (found races) --- var/spack/repos/builtin/packages/glib/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index baca1a5a45..67ead5f941 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -16,4 +16,4 @@ class Glib(Package): def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() - make("install") + make("install", parallel=False) -- cgit v1.2.3-70-g09d2 From 01c5b53ba16a95ab77918d30dfa3a63f2ef2707f Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 18 Jan 2016 03:02:58 -0800 Subject: Make libxcb compile with gcc 4.9. --- var/spack/repos/builtin/packages/libxcb/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 16a5525c0d..1dd5954c99 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -1,9 +1,9 @@ from spack import * class Libxcb(Package): - """The X protocol C-language Binding (XCB) is a replacement - for Xlib featuring a small footprint, latency hiding, direct - access to the protocol, improved threading support, and + """The X protocol C-language Binding (XCB) is a replacement + for Xlib featuring a small footprint, latency hiding, direct + access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" @@ -14,6 +14,10 @@ class Libxcb(Package): depends_on("python") depends_on("xcb-proto") + def patch(self): + filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h') + + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From f48fc0d8b184e26accc570910b8f4244d4d9e63f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 19 Jan 2016 09:43:28 -0600 Subject: Revert deprecated configure flags --- var/spack/repos/builtin/packages/mpich/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 128a1f44ae..c856cfe277 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -68,10 +68,10 @@ class Mpich(Package): # these compilers if they're "disabled" for the current # compiler configuration. if not self.compiler.f77: - config_args.append("--disable-fortran=f77") + config_args.append("--disable-f77") if not self.compiler.fc: - config_args.append("--disable-fortran=fc") + config_args.append("--disable-fc") configure(*config_args) make() -- cgit v1.2.3-70-g09d2 From 0d42cdaffdf12fa3717135b07fade947dcb6b3b7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 19 Jan 2016 10:09:25 -0600 Subject: Merge branch 'develop' into features/hdf --- var/spack/packages/hdf/package.py | 35 ------------------------- var/spack/repos/builtin/packages/hdf/package.py | 35 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 var/spack/packages/hdf/package.py create mode 100644 var/spack/repos/builtin/packages/hdf/package.py (limited to 'var') diff --git a/var/spack/packages/hdf/package.py b/var/spack/packages/hdf/package.py deleted file mode 100644 index 7882665dba..0000000000 --- a/var/spack/packages/hdf/package.py +++ /dev/null @@ -1,35 +0,0 @@ -from spack import * - -class Hdf(Package): - """HDF4 (also known as HDF) is a library and multi-object - file format for storing and managing data between machines.""" - - homepage = "https://www.hdfgroup.org/products/hdf4/" - url = "https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.11/src/hdf-4.2.11.tar.gz" - list_url = "https://www.hdfgroup.org/ftp/HDF/releases/" - list_depth = 3 - - version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19') - - depends_on("jpeg") - depends_on("szip@2.1") - depends_on("zlib") - - - def url_for_version(self, version): - return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str(version) + "/src/hdf-" + str(version) + ".tar.gz" - - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix, - '--with-jpeg=%s' % spec['jpeg'].prefix, - '--with-szlib=%s' % spec['szip'].prefix, - '--with-zlib=%s' % spec['zlib'].prefix, - '--disable-netcdf', - '--enable-fortran', - '--disable-shared', - '--enable-static', - '--enable-production') - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py new file mode 100644 index 0000000000..7882665dba --- /dev/null +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Hdf(Package): + """HDF4 (also known as HDF) is a library and multi-object + file format for storing and managing data between machines.""" + + homepage = "https://www.hdfgroup.org/products/hdf4/" + url = "https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.11/src/hdf-4.2.11.tar.gz" + list_url = "https://www.hdfgroup.org/ftp/HDF/releases/" + list_depth = 3 + + version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19') + + depends_on("jpeg") + depends_on("szip@2.1") + depends_on("zlib") + + + def url_for_version(self, version): + return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str(version) + "/src/hdf-" + str(version) + ".tar.gz" + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--with-jpeg=%s' % spec['jpeg'].prefix, + '--with-szlib=%s' % spec['szip'].prefix, + '--with-zlib=%s' % spec['zlib'].prefix, + '--disable-netcdf', + '--enable-fortran', + '--disable-shared', + '--enable-static', + '--enable-production') + + make() + make("install") -- cgit v1.2.3-70-g09d2 From e121faffa1974bff9570eb8b7a2ba83fdd624f0e Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 19 Jan 2016 17:26:26 +0100 Subject: eigen : added package --- var/spack/repos/builtin/packages/eigen/package.py | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 var/spack/repos/builtin/packages/eigen/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py new file mode 100644 index 0000000000..44ee6819f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -0,0 +1,68 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Eigen(Package): + """ + Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms + """ + + homepage = 'http://eigen.tuxfamily.org/' + url = 'http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2' + + version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184', url='http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2') + + variant('debug', default=False, description='Builds the library in debug mode') + + variant('metis', default=True, description='Enables metis backend') + variant('scotch', default=True, description='Enables scotch backend') + variant('fftw', default=True, description='Enables FFTW backend') + + # TODO : dependency on SuiteSparse, googlehash, superlu, adolc missing + + depends_on('metis', when='+metis') + depends_on('scotch', when='+scotch') + depends_on('fftw', when='+fftw') + + depends_on('mpfr@2.3.0:') # Eigen 3.2.7 requires at least 2.3.0 + depends_on('gmp') + + def install(self, spec, prefix): + + options = [] + options.extend(std_cmake_args) + + build_directory = join_path(self.stage.path, 'spack-build') + source_directory = self.stage.source_path + + if '+debug' in spec: + options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') + + with working_dir(build_directory, create=True): + cmake(source_directory, *options) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 98706d31dca0773c51acfabb8f1a399d4720a875 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 19 Jan 2016 12:46:15 -0600 Subject: Various updates to MVAPICH2 package Use url_for_version function to specify urls Add version 2.2b Add dedicated MRAIL variant Fix typo Make fortran compiler flags more specific --- .../repos/builtin/packages/mvapich2/package.py | 34 +++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 23a11b3171..af5ed1b088 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -4,15 +4,13 @@ import os 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.2b.tar.gz" - version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2', - url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2a.tar.gz') + version('2.2b', '5651e8b7a72d7c77ca68da48f3a5d108') + version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2') + version('2.0', '9fbb68a4111a8b6338e476dc657388b4') + version('1.9', '5dc58ed08fd3142c260b70fe297e127c') - version('2.0', '9fbb68a4111a8b6338e476dc657388b4', - url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz') - - version('1.9', '5dc58ed08fd3142c260b70fe297e127c', - url="http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz") patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2 @@ -41,16 +39,25 @@ class Mvapich2(Package): NEMESISIBTCP = 'nemesisibtcp' NEMESISIB = 'nemesisib' NEMESIS = 'nemesis' + MRAIL = 'mrail' SUPPORTED_NETWORKS = (PSM, SOCK, NEMESIS, NEMESISIB, NEMESISIBTCP) variant(PSM, default=False, description='Configures a build for QLogic PSM-CH3') variant(SOCK, default=False, description='Configures a build for TCP/IP-CH3') variant(NEMESISIBTCP, default=False, description='Configures a build for both OFA-IB-Nemesis and TCP/IP-Nemesis') variant(NEMESISIB, default=False, description='Configures a build for OFA-IB-Nemesis') variant(NEMESIS, default=False, description='Configures a build for TCP/IP-Nemesis') + variant(MRAIL, default=False, description='Configures a build for OFA-IB-CH3') ########## # FIXME : CUDA support is missing + def url_for_version(self, version): + base_url = "http://mvapich.cse.ohio-state.edu/download" + if version < Version('2.0'): + return "%s/mvapich2/mv2/mvapich2-%s.tar.gz" % (base_url, version) + else: + return "%s/mvapich/mv2/mvapich2-%s.tar.gz" % (base_url, version) + @staticmethod def enabled(x): """ @@ -117,7 +124,7 @@ class Mvapich2(Package): if count > 1: raise RuntimeError('network variants are mutually exclusive (only one can be selected at a time)') - # From here on I can suppose that ony one variant has been selected + # From here on I can suppose that only one variant has been selected if self.enabled(Mvapich2.PSM) in spec: network_options = ["--with-device=ch3:psm"] elif self.enabled(Mvapich2.SOCK) in spec: @@ -128,7 +135,7 @@ class Mvapich2(Package): network_options = ["--with-device=ch3:nemesis:ib"] elif self.enabled(Mvapich2.NEMESIS) in spec: network_options = ["--with-device=ch3:nemesis"] - else: + elif self.enabled(Mvapich2.MRAIL) in spec: network_options = ["--with-device=ch3:mrail", "--with-rdma=gen2"] configure_args.extend(network_options) @@ -141,7 +148,14 @@ class Mvapich2(Package): "--enable-romio", "--disable-silent-rules", ] - if not self.compiler.f77 and not self.compiler.fc: + + if self.compiler.f77 and self.compiler.fc: + configure_args.append("--enable-fortran=all") + elif self.compiler.f77: + configure_args.append("--enable-fortran=f77") + elif self.compiler.fc: + configure_args.append("--enable-fortran=fc") + else: configure_args.append("--enable-fortran=none") # Set the type of the build (debug, release) -- cgit v1.2.3-70-g09d2 From ab27fdc692193fa2deeacfbb2aabc1f6feb06f6d Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 20 Jan 2016 09:35:15 +0100 Subject: elpa : commit partial package. Blocked by missing scalapack --- var/spack/repos/builtin/packages/elpa/package.py | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 var/spack/repos/builtin/packages/elpa/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py new file mode 100644 index 0000000000..6825056a04 --- /dev/null +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Elpa(Package): + """ + 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('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6', url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz') + + depends_on('mpi') + depends_on('blas') + depends_on('lapack') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 65f65ec4e47289e15e5d6a25913beb8e6bb4831b Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 20 Jan 2016 10:03:24 +0100 Subject: Adding MUMPS and ScaLAPACK --- var/spack/packages/mumps/Makefile.inc | 41 +++++++++ var/spack/packages/mumps/package.py | 121 +++++++++++++++++++++++++ var/spack/packages/netlib-scalapack/package.py | 43 +++++++++ 3 files changed, 205 insertions(+) create mode 100644 var/spack/packages/mumps/Makefile.inc create mode 100644 var/spack/packages/mumps/package.py create mode 100644 var/spack/packages/netlib-scalapack/package.py (limited to 'var') diff --git a/var/spack/packages/mumps/Makefile.inc b/var/spack/packages/mumps/Makefile.inc new file mode 100644 index 0000000000..4b6696db5c --- /dev/null +++ b/var/spack/packages/mumps/Makefile.inc @@ -0,0 +1,41 @@ +LPORDDIR = $(topdir)/PORD/lib/ +IPORD = -I$(topdir)/PORD/include/ +LPORD = -L$(LPORDDIR) -lpord + +ORDERINGSC = $(ORDERINGSF) +LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH) +IORDERINGSF = $(ISCOTCH) +IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) + +PLAT = +LIBEXT = .a +OUTC = -o +OUTF = -o +RM = /bin/rm -f +AR = ar vr +RANLIB = ranlib + +INCSEQ = -I$(topdir)/libseq +LIBSEQ = -L$(topdir)/libseq -lmpiseq + +INCPAR = +LIBPAR = $(SCALAP) + +LIBOTHERS = -lpthread + +#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER) +CDEFS = -DAdd_ + +#Sequential: +ifeq ($(MUMPS_TYPE),seq) +INCS = $(INCSEQ) +LIBS = $(LIBSEQ) +LIBSEQNEEDED = libseqneeded +endif + +#Parallel: +ifeq ($(MUMPS_TYPE),par) +INCS = $(INCPAR) +LIBS = $(LIBPAR) +LIBSEQNEEDED = +endif diff --git a/var/spack/packages/mumps/package.py b/var/spack/packages/mumps/package.py new file mode 100644 index 0000000000..b4e38c02de --- /dev/null +++ b/var/spack/packages/mumps/package.py @@ -0,0 +1,121 @@ +from spack import * +import os + + +class Mumps(Package): + """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" + + homepage = "http://mumps.enseeiht.fr" + url = "http://mumps.enseeiht.fr/MUMPS_5.0.1.tar.gz" + + version('5.0.1', 'b477573fdcc87babe861f62316833db0') + + variant('mpi', default=True, description='Activate the compilation of MUMPS with the MPI support') + variant('scotch', default=False, description='Activate Scotch as a possible ordering library') + variant('ptscotch', default=False, description='Activate PT-Scotch as a possible ordering library') + variant('metis', default=False, description='Activate Metis as a possible ordering library') + variant('parmetis', default=False, description='Activate Parmetis as a possible ordering library') + variant('double', default=True, description='Activate dmumps') + variant('float', default=True, description='Activate smumps') + variant('complex', default=True, description='Activate cmumps and/or zmumps') + variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') + variant('double', default=False, description='Use double precision floating point types') + + + depends_on('scotch + esmumps', when='~ptscotch+scotch') + depends_on('scotch + esmumps + mpi', when='+ptscotch') + depends_on('metis', when='~parmetis+metis') + depends_on('parmetis', when="+parmetis") + depends_on('blas') + depends_on('scalapack', when='+mpi') + depends_on('mpi', when='+mpi') + + def patch(self): + if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec: + raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') + + makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib] + + orderings = ['-Dpord'] + + if '+ptscotch' in self.spec or '+scotch' in self.spec: + join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '') + makefile_conf.extend( + ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include, + "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib, + join_lib, + join_lib.join(['esmumps', 'scotch', 'scotcherr']))]) + orderings.append('-Dscotch') + if '+ptscotch' in self.spec: + orderings.append('-Dptscotch') + + if '+parmetis' in self.spec or '+metis' in self.spec: + libname = 'parmetis' if '+parmetis' in self.spec else 'metis' + makefile_conf.extend( + ["IMETIS = -I%s" % self.spec[libname].prefix.include, + "LMETIS = -L%s -l%s" % (self.spec[libname].prefix.lib, libname)]) + + orderings.append('-Dmetis') + if '+parmetis' in self.spec: + orderings.append('-Dparmetis') + + makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) + + if '+idx64' in self.spec: + makefile_conf.extend( + ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', + 'OPTL = -O ', + 'OPTC = -O -DINTSIZE64']) + else: + makefile_conf.extend( + ['OPTF = -O -DALLOW_NON_INIT', + 'OPTL = -O ', + 'OPTC = -O ']) + + + if '+mpi' in self.spec: + makefile_conf.extend( + ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), + "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + "SCALAP = %s" % self.spec['scalapack'].fc_link]) + else: + makefile_conf.extend( + ["CC = cc", + "FC = fc", + "FL = fc", + "MUMPS_TYPE = seq"]) + + makefile_inc_template = join_path(os.path.dirname(self.module.__file__), + 'Makefile.inc') + with open(makefile_inc_template, "r") as fh: + makefile_conf.extend(fh.read().split('\n')) + + with working_dir('.'): + with open("Makefile.inc", "w") as fh: + makefile_inc = '\n'.join(makefile_conf) + fh.write(makefile_inc) + + + + def install(self, spec, prefix): + make_libs = [] + + # the coice to compile ?examples is to have kind of a sanity + # check on the libraries generated. + if '+float' in spec: + make_libs.append('sexamples') + if '+complex' in spec: + make_libs.append('cexamples') + + if '+double' in spec: + make_libs.append('dexamples') + if '+complex' in spec: + make_libs.append('zexamples') + + make(*make_libs) + + install_tree('lib', prefix.lib) + install_tree('include', prefix.include) + if '~mpi' in spec: + install('libseq/libmpiseq.a', prefix.lib) diff --git a/var/spack/packages/netlib-scalapack/package.py b/var/spack/packages/netlib-scalapack/package.py new file mode 100644 index 0000000000..69df4d9da7 --- /dev/null +++ b/var/spack/packages/netlib-scalapack/package.py @@ -0,0 +1,43 @@ +from spack import * + +class NetlibScalapack(Package): + """ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines""" + + homepage = "http://www.netlib.org/scalapack/" + url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz" + + version('2.0.2', '2f75e600a2ba155ed9ce974a1c4b536f') + version('2.0.1', '17b8cde589ea0423afe1ec43e7499161') + version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe') + + variant('shared', default=True, description='Build the shared library version') + + provides('scalapack') + + depends_on('mpi') + depends_on('blas') + depends_on('lapack') + + def install(self, spec, prefix): + options = [ + "-DBUILD_SHARED_LIBS:BOOL=%s" % 'ON' if '+shared' in spec else 'OFF', + "-DBUILD_STATIC_LIBS:BOOL=%s" % 'OFF' if '+shared' in spec else 'ON', + "-DCMAKE_C_FLAGS=-fPIC", + "-DCMAKE_Fortran_FLAGS=-fPIC", + ] + + options.extend(std_cmake_args) + + with working_dir('spack-build', create=True): + cmake('..', *options) + make() + make("install") + + def setup_dependent_environment(self, module, spec, dependent_spec): + # TODO treat OS that are not Linux... + lib_suffix = '.so' if '+shared' in spec['scalapack'] else '.a' + + spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib + spec['scalapack'].cc_link = spec['scalapack'].fc_link + spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib, + 'libscalapack%s' % lib_suffix)] -- cgit v1.2.3-70-g09d2 From 974fc65e0f15ac87d2422858d71e0c7624fb7726 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 20 Jan 2016 14:38:55 +0100 Subject: renaming packages to follow changes on develop --- var/spack/packages/mumps/Makefile.inc | 41 ------- var/spack/packages/mumps/package.py | 121 --------------------- var/spack/packages/netlib-scalapack/package.py | 43 -------- .../repos/builtin/packages/mumps/Makefile.inc | 41 +++++++ var/spack/repos/builtin/packages/mumps/package.py | 121 +++++++++++++++++++++ .../builtin/packages/netlib-scalapack/package.py | 43 ++++++++ 6 files changed, 205 insertions(+), 205 deletions(-) delete mode 100644 var/spack/packages/mumps/Makefile.inc delete mode 100644 var/spack/packages/mumps/package.py delete mode 100644 var/spack/packages/netlib-scalapack/package.py create mode 100644 var/spack/repos/builtin/packages/mumps/Makefile.inc create mode 100644 var/spack/repos/builtin/packages/mumps/package.py create mode 100644 var/spack/repos/builtin/packages/netlib-scalapack/package.py (limited to 'var') diff --git a/var/spack/packages/mumps/Makefile.inc b/var/spack/packages/mumps/Makefile.inc deleted file mode 100644 index 4b6696db5c..0000000000 --- a/var/spack/packages/mumps/Makefile.inc +++ /dev/null @@ -1,41 +0,0 @@ -LPORDDIR = $(topdir)/PORD/lib/ -IPORD = -I$(topdir)/PORD/include/ -LPORD = -L$(LPORDDIR) -lpord - -ORDERINGSC = $(ORDERINGSF) -LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH) -IORDERINGSF = $(ISCOTCH) -IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) - -PLAT = -LIBEXT = .a -OUTC = -o -OUTF = -o -RM = /bin/rm -f -AR = ar vr -RANLIB = ranlib - -INCSEQ = -I$(topdir)/libseq -LIBSEQ = -L$(topdir)/libseq -lmpiseq - -INCPAR = -LIBPAR = $(SCALAP) - -LIBOTHERS = -lpthread - -#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER) -CDEFS = -DAdd_ - -#Sequential: -ifeq ($(MUMPS_TYPE),seq) -INCS = $(INCSEQ) -LIBS = $(LIBSEQ) -LIBSEQNEEDED = libseqneeded -endif - -#Parallel: -ifeq ($(MUMPS_TYPE),par) -INCS = $(INCPAR) -LIBS = $(LIBPAR) -LIBSEQNEEDED = -endif diff --git a/var/spack/packages/mumps/package.py b/var/spack/packages/mumps/package.py deleted file mode 100644 index b4e38c02de..0000000000 --- a/var/spack/packages/mumps/package.py +++ /dev/null @@ -1,121 +0,0 @@ -from spack import * -import os - - -class Mumps(Package): - """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" - - homepage = "http://mumps.enseeiht.fr" - url = "http://mumps.enseeiht.fr/MUMPS_5.0.1.tar.gz" - - version('5.0.1', 'b477573fdcc87babe861f62316833db0') - - variant('mpi', default=True, description='Activate the compilation of MUMPS with the MPI support') - variant('scotch', default=False, description='Activate Scotch as a possible ordering library') - variant('ptscotch', default=False, description='Activate PT-Scotch as a possible ordering library') - variant('metis', default=False, description='Activate Metis as a possible ordering library') - variant('parmetis', default=False, description='Activate Parmetis as a possible ordering library') - variant('double', default=True, description='Activate dmumps') - variant('float', default=True, description='Activate smumps') - variant('complex', default=True, description='Activate cmumps and/or zmumps') - variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') - variant('double', default=False, description='Use double precision floating point types') - - - depends_on('scotch + esmumps', when='~ptscotch+scotch') - depends_on('scotch + esmumps + mpi', when='+ptscotch') - depends_on('metis', when='~parmetis+metis') - depends_on('parmetis', when="+parmetis") - depends_on('blas') - depends_on('scalapack', when='+mpi') - depends_on('mpi', when='+mpi') - - def patch(self): - if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec: - raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') - - makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib] - - orderings = ['-Dpord'] - - if '+ptscotch' in self.spec or '+scotch' in self.spec: - join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '') - makefile_conf.extend( - ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include, - "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib, - join_lib, - join_lib.join(['esmumps', 'scotch', 'scotcherr']))]) - orderings.append('-Dscotch') - if '+ptscotch' in self.spec: - orderings.append('-Dptscotch') - - if '+parmetis' in self.spec or '+metis' in self.spec: - libname = 'parmetis' if '+parmetis' in self.spec else 'metis' - makefile_conf.extend( - ["IMETIS = -I%s" % self.spec[libname].prefix.include, - "LMETIS = -L%s -l%s" % (self.spec[libname].prefix.lib, libname)]) - - orderings.append('-Dmetis') - if '+parmetis' in self.spec: - orderings.append('-Dparmetis') - - makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) - - if '+idx64' in self.spec: - makefile_conf.extend( - ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', - 'OPTL = -O ', - 'OPTC = -O -DINTSIZE64']) - else: - makefile_conf.extend( - ['OPTF = -O -DALLOW_NON_INIT', - 'OPTL = -O ', - 'OPTC = -O ']) - - - if '+mpi' in self.spec: - makefile_conf.extend( - ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), - "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - "SCALAP = %s" % self.spec['scalapack'].fc_link]) - else: - makefile_conf.extend( - ["CC = cc", - "FC = fc", - "FL = fc", - "MUMPS_TYPE = seq"]) - - makefile_inc_template = join_path(os.path.dirname(self.module.__file__), - 'Makefile.inc') - with open(makefile_inc_template, "r") as fh: - makefile_conf.extend(fh.read().split('\n')) - - with working_dir('.'): - with open("Makefile.inc", "w") as fh: - makefile_inc = '\n'.join(makefile_conf) - fh.write(makefile_inc) - - - - def install(self, spec, prefix): - make_libs = [] - - # the coice to compile ?examples is to have kind of a sanity - # check on the libraries generated. - if '+float' in spec: - make_libs.append('sexamples') - if '+complex' in spec: - make_libs.append('cexamples') - - if '+double' in spec: - make_libs.append('dexamples') - if '+complex' in spec: - make_libs.append('zexamples') - - make(*make_libs) - - install_tree('lib', prefix.lib) - install_tree('include', prefix.include) - if '~mpi' in spec: - install('libseq/libmpiseq.a', prefix.lib) diff --git a/var/spack/packages/netlib-scalapack/package.py b/var/spack/packages/netlib-scalapack/package.py deleted file mode 100644 index 69df4d9da7..0000000000 --- a/var/spack/packages/netlib-scalapack/package.py +++ /dev/null @@ -1,43 +0,0 @@ -from spack import * - -class NetlibScalapack(Package): - """ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines""" - - homepage = "http://www.netlib.org/scalapack/" - url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz" - - version('2.0.2', '2f75e600a2ba155ed9ce974a1c4b536f') - version('2.0.1', '17b8cde589ea0423afe1ec43e7499161') - version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe') - - variant('shared', default=True, description='Build the shared library version') - - provides('scalapack') - - depends_on('mpi') - depends_on('blas') - depends_on('lapack') - - def install(self, spec, prefix): - options = [ - "-DBUILD_SHARED_LIBS:BOOL=%s" % 'ON' if '+shared' in spec else 'OFF', - "-DBUILD_STATIC_LIBS:BOOL=%s" % 'OFF' if '+shared' in spec else 'ON', - "-DCMAKE_C_FLAGS=-fPIC", - "-DCMAKE_Fortran_FLAGS=-fPIC", - ] - - options.extend(std_cmake_args) - - with working_dir('spack-build', create=True): - cmake('..', *options) - make() - make("install") - - def setup_dependent_environment(self, module, spec, dependent_spec): - # TODO treat OS that are not Linux... - lib_suffix = '.so' if '+shared' in spec['scalapack'] else '.a' - - spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib - spec['scalapack'].cc_link = spec['scalapack'].fc_link - spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib, - 'libscalapack%s' % lib_suffix)] diff --git a/var/spack/repos/builtin/packages/mumps/Makefile.inc b/var/spack/repos/builtin/packages/mumps/Makefile.inc new file mode 100644 index 0000000000..4b6696db5c --- /dev/null +++ b/var/spack/repos/builtin/packages/mumps/Makefile.inc @@ -0,0 +1,41 @@ +LPORDDIR = $(topdir)/PORD/lib/ +IPORD = -I$(topdir)/PORD/include/ +LPORD = -L$(LPORDDIR) -lpord + +ORDERINGSC = $(ORDERINGSF) +LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH) +IORDERINGSF = $(ISCOTCH) +IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) + +PLAT = +LIBEXT = .a +OUTC = -o +OUTF = -o +RM = /bin/rm -f +AR = ar vr +RANLIB = ranlib + +INCSEQ = -I$(topdir)/libseq +LIBSEQ = -L$(topdir)/libseq -lmpiseq + +INCPAR = +LIBPAR = $(SCALAP) + +LIBOTHERS = -lpthread + +#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER) +CDEFS = -DAdd_ + +#Sequential: +ifeq ($(MUMPS_TYPE),seq) +INCS = $(INCSEQ) +LIBS = $(LIBSEQ) +LIBSEQNEEDED = libseqneeded +endif + +#Parallel: +ifeq ($(MUMPS_TYPE),par) +INCS = $(INCPAR) +LIBS = $(LIBPAR) +LIBSEQNEEDED = +endif diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py new file mode 100644 index 0000000000..b4e38c02de --- /dev/null +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -0,0 +1,121 @@ +from spack import * +import os + + +class Mumps(Package): + """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" + + homepage = "http://mumps.enseeiht.fr" + url = "http://mumps.enseeiht.fr/MUMPS_5.0.1.tar.gz" + + version('5.0.1', 'b477573fdcc87babe861f62316833db0') + + variant('mpi', default=True, description='Activate the compilation of MUMPS with the MPI support') + variant('scotch', default=False, description='Activate Scotch as a possible ordering library') + variant('ptscotch', default=False, description='Activate PT-Scotch as a possible ordering library') + variant('metis', default=False, description='Activate Metis as a possible ordering library') + variant('parmetis', default=False, description='Activate Parmetis as a possible ordering library') + variant('double', default=True, description='Activate dmumps') + variant('float', default=True, description='Activate smumps') + variant('complex', default=True, description='Activate cmumps and/or zmumps') + variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') + variant('double', default=False, description='Use double precision floating point types') + + + depends_on('scotch + esmumps', when='~ptscotch+scotch') + depends_on('scotch + esmumps + mpi', when='+ptscotch') + depends_on('metis', when='~parmetis+metis') + depends_on('parmetis', when="+parmetis") + depends_on('blas') + depends_on('scalapack', when='+mpi') + depends_on('mpi', when='+mpi') + + def patch(self): + if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec: + raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') + + makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib] + + orderings = ['-Dpord'] + + if '+ptscotch' in self.spec or '+scotch' in self.spec: + join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '') + makefile_conf.extend( + ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include, + "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib, + join_lib, + join_lib.join(['esmumps', 'scotch', 'scotcherr']))]) + orderings.append('-Dscotch') + if '+ptscotch' in self.spec: + orderings.append('-Dptscotch') + + if '+parmetis' in self.spec or '+metis' in self.spec: + libname = 'parmetis' if '+parmetis' in self.spec else 'metis' + makefile_conf.extend( + ["IMETIS = -I%s" % self.spec[libname].prefix.include, + "LMETIS = -L%s -l%s" % (self.spec[libname].prefix.lib, libname)]) + + orderings.append('-Dmetis') + if '+parmetis' in self.spec: + orderings.append('-Dparmetis') + + makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) + + if '+idx64' in self.spec: + makefile_conf.extend( + ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', + 'OPTL = -O ', + 'OPTC = -O -DINTSIZE64']) + else: + makefile_conf.extend( + ['OPTF = -O -DALLOW_NON_INIT', + 'OPTL = -O ', + 'OPTC = -O ']) + + + if '+mpi' in self.spec: + makefile_conf.extend( + ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), + "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + "SCALAP = %s" % self.spec['scalapack'].fc_link]) + else: + makefile_conf.extend( + ["CC = cc", + "FC = fc", + "FL = fc", + "MUMPS_TYPE = seq"]) + + makefile_inc_template = join_path(os.path.dirname(self.module.__file__), + 'Makefile.inc') + with open(makefile_inc_template, "r") as fh: + makefile_conf.extend(fh.read().split('\n')) + + with working_dir('.'): + with open("Makefile.inc", "w") as fh: + makefile_inc = '\n'.join(makefile_conf) + fh.write(makefile_inc) + + + + def install(self, spec, prefix): + make_libs = [] + + # the coice to compile ?examples is to have kind of a sanity + # check on the libraries generated. + if '+float' in spec: + make_libs.append('sexamples') + if '+complex' in spec: + make_libs.append('cexamples') + + if '+double' in spec: + make_libs.append('dexamples') + if '+complex' in spec: + make_libs.append('zexamples') + + make(*make_libs) + + install_tree('lib', prefix.lib) + install_tree('include', prefix.include) + if '~mpi' in spec: + install('libseq/libmpiseq.a', prefix.lib) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py new file mode 100644 index 0000000000..69df4d9da7 --- /dev/null +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -0,0 +1,43 @@ +from spack import * + +class NetlibScalapack(Package): + """ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines""" + + homepage = "http://www.netlib.org/scalapack/" + url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz" + + version('2.0.2', '2f75e600a2ba155ed9ce974a1c4b536f') + version('2.0.1', '17b8cde589ea0423afe1ec43e7499161') + version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe') + + variant('shared', default=True, description='Build the shared library version') + + provides('scalapack') + + depends_on('mpi') + depends_on('blas') + depends_on('lapack') + + def install(self, spec, prefix): + options = [ + "-DBUILD_SHARED_LIBS:BOOL=%s" % 'ON' if '+shared' in spec else 'OFF', + "-DBUILD_STATIC_LIBS:BOOL=%s" % 'OFF' if '+shared' in spec else 'ON', + "-DCMAKE_C_FLAGS=-fPIC", + "-DCMAKE_Fortran_FLAGS=-fPIC", + ] + + options.extend(std_cmake_args) + + with working_dir('spack-build', create=True): + cmake('..', *options) + make() + make("install") + + def setup_dependent_environment(self, module, spec, dependent_spec): + # TODO treat OS that are not Linux... + lib_suffix = '.so' if '+shared' in spec['scalapack'] else '.a' + + spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib + spec['scalapack'].cc_link = spec['scalapack'].fc_link + spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib, + 'libscalapack%s' % lib_suffix)] -- cgit v1.2.3-70-g09d2 From 19caac69d8b3c8383c7b59c2b39ec3bf54406fa8 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 20 Jan 2016 15:22:49 +0100 Subject: openmpi : turned torque support into a variant (default false) hdf5 : fixed a few bugs, removed suspicious macro deinition, etc. --- var/spack/repos/builtin/packages/hdf5/package.py | 84 +++++++++++++++++----- .../repos/builtin/packages/openmpi/package.py | 24 +++---- 2 files changed, 79 insertions(+), 29 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 9a40164341..ac78d8e961 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -1,5 +1,31 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + from spack import * + class Hdf5(Package): """HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for @@ -7,7 +33,7 @@ class Hdf5(Package): """ homepage = "http://www.hdfgroup.org/HDF5/" - url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz" + url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz" list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 @@ -15,26 +41,53 @@ class Hdf5(Package): version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') + variant('debug', default=False, description='Builds a debug version of the library') + variant('cxx', default=True, description='Enable C++ support') variant('fortran', default=True, description='Enable Fortran support') + variant('unsupported', default=False, description='Enables unsupported configuration options') + variant('mpi', default=False, description='Enable MPI support') - variant('threadsafe', default=False, description='Enable multithreading') + variant('threadsafe', default=False, description='Enable thread-safe capabilities') depends_on("mpi", when='+mpi') depends_on("zlib") - # TODO: currently hard-coded to use OpenMPI + def validate(self, spec): + """ + Checks if incompatible variants have been activated at the same time + + :param spec: spec of the package + :raises RuntimeError: in case of inconsistencies + """ + if '+fortran' in spec and not self.compiler.fc: + msg = 'cannot build a fortran variant without a fortran compiler' + raise RuntimeError(msg) + + if '+threadsafe' in spec and ('+cxx' in spec or '+fortran' in spec): + raise RuntimeError("cannot use variant +threadsafe with either +cxx or +fortran") + def install(self, spec, prefix): + self.validate(spec) + # Handle compilation after spec validation extra_args = [] + if '+debug' in spec: + extra_args.append('--enable-debug=all') + else: + extra_args.append('--enable-production') + + if '+unsupported' in spec: + extra_args.append("--enable-unsupported") + if '+cxx' in spec: - extra_args.extend([ - '--enable-cxx' - ]) + extra_args.append('--enable-cxx') + if '+fortran' in spec: extra_args.extend([ '--enable-fortran', '--enable-fortran2003' ]) + if '+mpi' in spec: # The HDF5 configure script warns if cxx and mpi are enabled # together. There doesn't seem to be a real reason for this, except @@ -43,27 +96,26 @@ class Hdf5(Package): # this is not actually a problem. extra_args.extend([ "--enable-parallel", - "--enable-unsupported", "CC=%s" % spec['mpi'].prefix.bin + "/mpicc", - "CXX=%s" % spec['mpi'].prefix.bin + "/mpic++", - "FC=%s" % spec['mpi'].prefix.bin + "/mpifort", ]) - if '+threads' in spec: - if '+cxx' in spec or '+fortran' in spec: - die("Cannot use variant +threads with either +cxx or +fortran") + + if '+cxx' in spec: + extra_args.append("CXX=%s" % spec['mpi'].prefix.bin + "/mpic++") + + if '+fortran' in spec: + extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort") + + if '+threadsafe' in spec: extra_args.extend([ '--enable-threadsafe', '--disable-hl', - 'CPPFLAGS=-DHDatexit=""', - 'CFLAGS=-DHDatexit=""' ]) configure( "--prefix=%s" % prefix, "--with-zlib=%s" % spec['zlib'].prefix, - "--enable-shared", + "--enable-shared", # TODO : this should be enabled by default, remove it? *extra_args) - make() make("install") diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 463719f9db..1b7f1c2011 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -19,43 +19,44 @@ class Openmpi(Package): version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') version('1.10.0', '280cf952de68369cebaca886c5ce0304') - version('1.8.8', '0dab8e602372da1425e9242ae37faf8c') - version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475') + version('1.8.8', '0dab8e602372da1425e9242ae37faf8c') + version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475') patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") patch('configure.patch', when="@1.10.0:") - variant('psm', default=False, description='Build support for the PSM library.') + variant('psm', default=False, description='Build support for the PSM library.') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + # TODO : variant support for other schedulers is missing + variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support') + provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') - depends_on('hwloc') - def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) - def setup_dependent_environment(self, module, spec, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" - os.environ['OMPI_CC'] = 'cc' + os.environ['OMPI_CC'] = 'cc' os.environ['OMPI_CXX'] = 'c++' os.environ['OMPI_FC'] = 'f90' os.environ['OMPI_F77'] = 'f77' - def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec['hwloc'].prefix, - "--with-tm", # necessary for Torque support "--enable-shared", "--enable-static"] # Variants + if '+tm' in spec: + config_args.append("--with-tm") # necessary for Torque support + if '+psm' in spec: config_args.append("--with-psm") @@ -85,7 +86,6 @@ class Openmpi(Package): self.filter_compilers() - def filter_compilers(self): """Run after install to make the MPI compilers use the compilers that Spack built the package with. @@ -94,7 +94,7 @@ class Openmpi(Package): to Spack's generic cc, c++ and f90. We want them to be bound to whatever compiler they were built with. """ - kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : False } + kwargs = {'ignore_absent': True, 'backup': False, 'string': False} dir = os.path.join(self.prefix, 'share/openmpi/') cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt', @@ -132,5 +132,3 @@ class Openmpi(Package): if not os.path.islink(path): filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, path, **kwargs) - - -- cgit v1.2.3-70-g09d2 From b71b478a3626ae9e1a0d3b5c7ab9945b5c478200 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 20 Jan 2016 18:31:02 +0100 Subject: Minor correction to install mumps+mpi --- .../repos/builtin/packages/mumps/Makefile.inc | 3 -- var/spack/repos/builtin/packages/mumps/package.py | 32 +++++++++++++++++----- .../builtin/packages/netlib-scalapack/package.py | 17 ++++++++---- 3 files changed, 37 insertions(+), 15 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mumps/Makefile.inc b/var/spack/repos/builtin/packages/mumps/Makefile.inc index 4b6696db5c..2e6a041878 100644 --- a/var/spack/repos/builtin/packages/mumps/Makefile.inc +++ b/var/spack/repos/builtin/packages/mumps/Makefile.inc @@ -23,9 +23,6 @@ LIBPAR = $(SCALAP) LIBOTHERS = -lpthread -#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER) -CDEFS = -DAdd_ - #Sequential: ifeq ($(MUMPS_TYPE),seq) INCS = $(INCSEQ) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index b4e38c02de..44a37903cc 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -15,11 +15,10 @@ class Mumps(Package): variant('ptscotch', default=False, description='Activate PT-Scotch as a possible ordering library') variant('metis', default=False, description='Activate Metis as a possible ordering library') variant('parmetis', default=False, description='Activate Parmetis as a possible ordering library') - variant('double', default=True, description='Activate dmumps') - variant('float', default=True, description='Activate smumps') - variant('complex', default=True, description='Activate cmumps and/or zmumps') + variant('double', default=True, description='Activate the compilation of dmumps') + variant('float', default=True, description='Activate the compilation of smumps') + variant('complex', default=True, description='Activate the compilation of cmumps and/or zmumps') variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') - variant('double', default=False, description='Use double precision floating point types') depends_on('scotch + esmumps', when='~ptscotch+scotch') @@ -27,10 +26,16 @@ class Mumps(Package): depends_on('metis', when='~parmetis+metis') depends_on('parmetis', when="+parmetis") depends_on('blas') + depends_on('lapack') depends_on('scalapack', when='+mpi') depends_on('mpi', when='+mpi') - - def patch(self): + + # this function is not a patch function because in case scalapack + # is needed it uses self.spec['scalapack'].fc_link set by the + # setup_dependent_environment in scalapck. This happen after patch + # end before install + # def patch(self): + def write_makefile_inc(self): if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec: raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') @@ -61,8 +66,13 @@ class Mumps(Package): makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) + # TODO: test this part, it needs a full blas, scalapack and + # partitionning environment with 64bit integers if '+idx64' in self.spec: makefile_conf.extend( + # the fortran compilation flags most probably are + # working only for intel and gnu compilers this is + # perhaps something the compiler should provide ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', 'OPTL = -O ', 'OPTC = -O -DINTSIZE64']) @@ -78,7 +88,8 @@ class Mumps(Package): ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - "SCALAP = %s" % self.spec['scalapack'].fc_link]) + "SCALAP = %s" % self.spec['scalapack'].fc_link, + "MUMPS_TYPE = par"]) else: makefile_conf.extend( ["CC = cc", @@ -86,6 +97,11 @@ class Mumps(Package): "FL = fc", "MUMPS_TYPE = seq"]) + # TODO: change the value to the correct one according to the + # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER + makefile_conf.append("CDEFS = -DAdd_") + + makefile_inc_template = join_path(os.path.dirname(self.module.__file__), 'Makefile.inc') with open(makefile_inc_template, "r") as fh: @@ -113,6 +129,8 @@ class Mumps(Package): if '+complex' in spec: make_libs.append('zexamples') + self.write_makefile_inc() + make(*make_libs) install_tree('lib', prefix.lib) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 69df4d9da7..5be91c4a40 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -9,23 +9,30 @@ class NetlibScalapack(Package): version('2.0.2', '2f75e600a2ba155ed9ce974a1c4b536f') version('2.0.1', '17b8cde589ea0423afe1ec43e7499161') version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe') - + # versions before 2.0.0 are not using cmake and requires blacs as + # a separated package + variant('shared', default=True, description='Build the shared library version') - + variant('fpic', default=False, description="Build with -fpic compiler option") + provides('scalapack') depends_on('mpi') - depends_on('blas') depends_on('lapack') def install(self, spec, prefix): options = [ "-DBUILD_SHARED_LIBS:BOOL=%s" % 'ON' if '+shared' in spec else 'OFF', "-DBUILD_STATIC_LIBS:BOOL=%s" % 'OFF' if '+shared' in spec else 'ON', - "-DCMAKE_C_FLAGS=-fPIC", - "-DCMAKE_Fortran_FLAGS=-fPIC", + "-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", # forces scalapack to use find_package(LAPACK) ] + if '+fpic' in spec: + options.extend([ + "-DCMAKE_C_FLAGS=-fPIC", + "-DCMAKE_Fortran_FLAGS=-fPIC" + ]) + options.extend(std_cmake_args) with working_dir('spack-build', create=True): -- cgit v1.2.3-70-g09d2 From 785c01218ffb33b085c786f19b81ebbefcb3d0c6 Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 21 Jan 2016 10:06:43 +0100 Subject: elpa : added missing dependencies --- var/spack/repos/builtin/packages/elpa/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index 6825056a04..2ade5b0b37 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -36,11 +36,20 @@ class Elpa(Package): version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6', url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz') + variant('openmp', default=False, description='Activates OpenMP support') + depends_on('mpi') depends_on('blas') depends_on('lapack') + depends_on('scalapack') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + + options = ["--prefix=%s" % prefix] + + if '+openmp' in spec: + options.append("--enable-openmp") + + configure(*options) make() make("install") -- cgit v1.2.3-70-g09d2 From 950246b331c74700e01dc48a86f84bf47d528af3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 21 Jan 2016 09:54:24 -0600 Subject: Remove constraint on dependency version --- var/spack/repos/builtin/packages/hdf/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index 7882665dba..43b5980230 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -12,7 +12,7 @@ class Hdf(Package): version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19') depends_on("jpeg") - depends_on("szip@2.1") + depends_on("szip") depends_on("zlib") -- cgit v1.2.3-70-g09d2 From 03d5ee6738e49c4402cffe7503ea92c25edf9720 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 21 Jan 2016 10:02:33 -0600 Subject: Remove constraint on dependency version --- var/spack/repos/builtin/packages/mpfr/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py index 2758b0da2e..a1bd7529cf 100644 --- a/var/spack/repos/builtin/packages/mpfr/package.py +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -33,7 +33,7 @@ class Mpfr(Package): version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138') version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') - depends_on('gmp@4.1.0:') + depends_on('gmp') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 10848c2e9a7cd3771c469dfd5ddb235f76b229ba Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 21 Jan 2016 02:40:38 -0800 Subject: Refactor args for Executable.__call__ - simplify output, error, and input redirection - `return_output=True` is now `output=str` - `return_output=True` will still work for the time being but is deprecated. - previously you could say `return_output=True` and `output=`, which wouldn't actually write to the stream. Now you actually can't specify erroneous cases since there is only one parameter with mutually exclusive options.. --- lib/spack/spack/cmd/bootstrap.py | 2 +- lib/spack/spack/cmd/create.py | 2 +- lib/spack/spack/cmd/pkg.py | 2 +- lib/spack/spack/compiler.py | 3 +- lib/spack/spack/fetch_strategy.py | 6 +- lib/spack/spack/test/cc.py | 6 +- lib/spack/spack/test/make_executable.py | 48 ++++++------- lib/spack/spack/test/mock_repo.py | 4 +- lib/spack/spack/test/svn_fetch.py | 2 +- lib/spack/spack/util/executable.py | 95 ++++++++++++++++++++----- var/spack/repos/builtin/packages/gcc/package.py | 6 +- 11 files changed, 116 insertions(+), 60 deletions(-) (limited to 'var') diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index e4ec7da35d..bdbd623b39 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -42,7 +42,7 @@ def get_origin_url(): git = which('git', required=True) origin_url = git( '--git-dir=%s' % git_dir, 'config', '--get', 'remote.origin.url', - return_output=True) + output=str) return origin_url.strip() diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 7cea39cb55..edcea0718c 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -132,7 +132,7 @@ class ConfigureGuesser(object): # Peek inside the tarball. tar = which('tar') output = tar( - "--exclude=*/*/*", "-tf", stage.archive_file, return_output=True) + "--exclude=*/*/*", "-tf", stage.archive_file, output=str) lines = output.split("\n") # Set the configure line to the one that matched. diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index 448f762841..cf478d3763 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -79,7 +79,7 @@ def list_packages(rev): git = get_git() relpath = spack.packages_path[len(spack.prefix + os.path.sep):] + os.path.sep output = git('ls-tree', '--full-tree', '--name-only', rev, relpath, - return_output=True) + output=str) return sorted(line[len(relpath):] for line in output.split('\n') if line) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 887e416dc5..12c02e0ea2 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -24,7 +24,6 @@ ############################################################################## import os import re -import subprocess import itertools from datetime import datetime @@ -52,7 +51,7 @@ _version_cache = {} def get_compiler_version(compiler_path, version_arg, regex='(.*)'): if not compiler_path in _version_cache: compiler = Executable(compiler_path) - output = compiler(version_arg, return_output=True, error=subprocess.STDOUT) + output = compiler(version_arg, output=str, error=str) match = re.search(regex, output) _version_cache[compiler_path] = match.group(1) if match else 'unknown' diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0657146bf6..337dd1e198 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -154,7 +154,7 @@ class URLFetchStrategy(FetchStrategy): # Run curl but grab the mime type from the http headers headers = spack.curl( - *curl_args, return_output=True, fail_on_error=False) + *curl_args, output=str, fail_on_error=False) if spack.curl.returncode != 0: # clean up archive on failure. @@ -375,7 +375,7 @@ class GitFetchStrategy(VCSFetchStrategy): @property def git_version(self): - vstring = self.git('--version', return_output=True).lstrip('git version ') + vstring = self.git('--version', output=str).lstrip('git version ') return Version(vstring) @@ -518,7 +518,7 @@ class SvnFetchStrategy(VCSFetchStrategy): def _remove_untracked_files(self): """Removes untracked files in an svn repository.""" - status = self.svn('status', '--no-ignore', return_output=True) + status = self.svn('status', '--no-ignore', output=str) self.svn('status', '--no-ignore') for line in status.split('\n'): if not re.match('^[I?]', line): diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 4188b8d550..905af28a06 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -65,17 +65,17 @@ class CompilerTest(unittest.TestCase): def check_cc(self, command, args, expected): os.environ['SPACK_TEST_COMMAND'] = command - self.assertEqual(self.cc(*args, return_output=True).strip(), expected) + self.assertEqual(self.cc(*args, output=str).strip(), expected) def check_ld(self, command, args, expected): os.environ['SPACK_TEST_COMMAND'] = command - self.assertEqual(self.ld(*args, return_output=True).strip(), expected) + self.assertEqual(self.ld(*args, output=str).strip(), expected) def check_cpp(self, command, args, expected): os.environ['SPACK_TEST_COMMAND'] = command - self.assertEqual(self.cpp(*args, return_output=True).strip(), expected) + self.assertEqual(self.cpp(*args, output=str).strip(), expected) def test_vcheck_mode(self): diff --git a/lib/spack/spack/test/make_executable.py b/lib/spack/spack/test/make_executable.py index 09efec8580..d568a28d44 100644 --- a/lib/spack/spack/test/make_executable.py +++ b/lib/spack/spack/test/make_executable.py @@ -56,47 +56,47 @@ class MakeExecutableTest(unittest.TestCase): def test_make_normal(self): make = MakeExecutable('make', 8) - self.assertEqual(make(return_output=True).strip(), '-j8') - self.assertEqual(make('install', return_output=True).strip(), '-j8 install') + self.assertEqual(make(output=str).strip(), '-j8') + self.assertEqual(make('install', output=str).strip(), '-j8 install') def test_make_explicit(self): make = MakeExecutable('make', 8) - self.assertEqual(make(parallel=True, return_output=True).strip(), '-j8') - self.assertEqual(make('install', parallel=True, return_output=True).strip(), '-j8 install') + self.assertEqual(make(parallel=True, output=str).strip(), '-j8') + self.assertEqual(make('install', parallel=True, output=str).strip(), '-j8 install') def test_make_one_job(self): make = MakeExecutable('make', 1) - self.assertEqual(make(return_output=True).strip(), '') - self.assertEqual(make('install', return_output=True).strip(), 'install') + self.assertEqual(make(output=str).strip(), '') + self.assertEqual(make('install', output=str).strip(), 'install') def test_make_parallel_false(self): make = MakeExecutable('make', 8) - self.assertEqual(make(parallel=False, return_output=True).strip(), '') - self.assertEqual(make('install', parallel=False, return_output=True).strip(), 'install') + self.assertEqual(make(parallel=False, output=str).strip(), '') + self.assertEqual(make('install', parallel=False, output=str).strip(), 'install') def test_make_parallel_disabled(self): make = MakeExecutable('make', 8) os.environ['SPACK_NO_PARALLEL_MAKE'] = 'true' - self.assertEqual(make(return_output=True).strip(), '') - self.assertEqual(make('install', return_output=True).strip(), 'install') + self.assertEqual(make(output=str).strip(), '') + self.assertEqual(make('install', output=str).strip(), 'install') os.environ['SPACK_NO_PARALLEL_MAKE'] = '1' - self.assertEqual(make(return_output=True).strip(), '') - self.assertEqual(make('install', return_output=True).strip(), 'install') + self.assertEqual(make(output=str).strip(), '') + self.assertEqual(make('install', output=str).strip(), 'install') # These don't disable (false and random string) os.environ['SPACK_NO_PARALLEL_MAKE'] = 'false' - self.assertEqual(make(return_output=True).strip(), '-j8') - self.assertEqual(make('install', return_output=True).strip(), '-j8 install') + self.assertEqual(make(output=str).strip(), '-j8') + self.assertEqual(make('install', output=str).strip(), '-j8 install') os.environ['SPACK_NO_PARALLEL_MAKE'] = 'foobar' - self.assertEqual(make(return_output=True).strip(), '-j8') - self.assertEqual(make('install', return_output=True).strip(), '-j8 install') + self.assertEqual(make(output=str).strip(), '-j8') + self.assertEqual(make('install', output=str).strip(), '-j8 install') del os.environ['SPACK_NO_PARALLEL_MAKE'] @@ -106,20 +106,20 @@ class MakeExecutableTest(unittest.TestCase): # These should work os.environ['SPACK_NO_PARALLEL_MAKE'] = 'true' - self.assertEqual(make(parallel=True, return_output=True).strip(), '') - self.assertEqual(make('install', parallel=True, return_output=True).strip(), 'install') + self.assertEqual(make(parallel=True, output=str).strip(), '') + self.assertEqual(make('install', parallel=True, output=str).strip(), 'install') os.environ['SPACK_NO_PARALLEL_MAKE'] = '1' - self.assertEqual(make(parallel=True, return_output=True).strip(), '') - self.assertEqual(make('install', parallel=True, return_output=True).strip(), 'install') + self.assertEqual(make(parallel=True, output=str).strip(), '') + self.assertEqual(make('install', parallel=True, output=str).strip(), 'install') # These don't disable (false and random string) os.environ['SPACK_NO_PARALLEL_MAKE'] = 'false' - self.assertEqual(make(parallel=True, return_output=True).strip(), '-j8') - self.assertEqual(make('install', parallel=True, return_output=True).strip(), '-j8 install') + self.assertEqual(make(parallel=True, output=str).strip(), '-j8') + self.assertEqual(make('install', parallel=True, output=str).strip(), '-j8 install') os.environ['SPACK_NO_PARALLEL_MAKE'] = 'foobar' - self.assertEqual(make(parallel=True, return_output=True).strip(), '-j8') - self.assertEqual(make('install', parallel=True, return_output=True).strip(), '-j8 install') + self.assertEqual(make(parallel=True, output=str).strip(), '-j8') + self.assertEqual(make('install', parallel=True, output=str).strip(), '-j8 install') del os.environ['SPACK_NO_PARALLEL_MAKE'] diff --git a/lib/spack/spack/test/mock_repo.py b/lib/spack/spack/test/mock_repo.py index c454b1f106..9738ba4e72 100644 --- a/lib/spack/spack/test/mock_repo.py +++ b/lib/spack/spack/test/mock_repo.py @@ -141,7 +141,7 @@ class MockGitRepo(MockVCSRepo): self.url = self.path def rev_hash(self, rev): - return git('rev-parse', rev, return_output=True).strip() + return git('rev-parse', rev, output=str).strip() class MockSvnRepo(MockVCSRepo): @@ -193,4 +193,4 @@ class MockHgRepo(MockVCSRepo): def get_rev(self): """Get current mercurial revision.""" - return hg('id', '-i', return_output=True).strip() + return hg('id', '-i', output=str).strip() diff --git a/lib/spack/spack/test/svn_fetch.py b/lib/spack/spack/test/svn_fetch.py index 2ee4748fdb..7d150b42f4 100644 --- a/lib/spack/spack/test/svn_fetch.py +++ b/lib/spack/spack/test/svn_fetch.py @@ -65,7 +65,7 @@ class SvnFetchTest(MockPackagesTest): def assert_rev(self, rev): """Check that the current revision is equal to the supplied rev.""" def get_rev(): - output = svn('info', return_output=True) + output = svn('info', output=str) self.assertTrue("Revision" in output) for line in output.split('\n'): match = re.match(r'Revision: (\d+)', line) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index ba765eb662..fc27b789d0 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -55,24 +55,80 @@ class Executable(object): def __call__(self, *args, **kwargs): - """Run the executable with subprocess.check_output, return output.""" - return_output = kwargs.get("return_output", False) - fail_on_error = kwargs.get("fail_on_error", True) - ignore_errors = kwargs.get("ignore_errors", ()) + """Run this executable in a subprocess. + + Arguments + args + command line arguments to the executable to run. + + Optional arguments + + fail_on_error + + Raise an exception if the subprocess returns an + error. Default is True. When not set, the return code is + avaiale as `exe.returncode`. + + ignore_errors + + An optional list/tuple of error codes that can be + *ignored*. i.e., if these codes are returned, this will + not raise an exception when `fail_on_error` is `True`. + + output, error + + These arguments allow you to specify new stdout and stderr + values. They default to `None`, which means the + subprocess will inherit the parent's file descriptors. + + You can set these to: + - python streams, e.g. open Python file objects, or os.devnull; + - filenames, which will be automatically opened for writing; or + - `str`, as in the Python string type. If you set these to `str`, + output and error will be written to pipes and returned as + a string. If both `output` and `error` are set to `str`, + then one string is returned containing output concatenated + with error. + + input + + Same as output, error, but `str` is not an allowed value. + + Deprecated arguments + + return_output[=False] + + Setting this to True is the same as setting output=str. + This argument may be removed in future Spack versions. + + """ + fail_on_error = kwargs.pop("fail_on_error", True) + ignore_errors = kwargs.pop("ignore_errors", ()) + + # TODO: This is deprecated. Remove in a future version. + return_output = kwargs.pop("return_output", False) # Default values of None says to keep parent's file descriptors. - output = kwargs.get("output", None) - error = kwargs.get("error", None) - input = kwargs.get("input", None) + if return_output: + output = str + else: + output = kwargs.pop("output", None) + + error = kwargs.pop("error", None) + input = kwargs.pop("input", None) + if input is str: + raise ValueError("Cannot use `str` as input stream.") def streamify(arg, mode): if isinstance(arg, basestring): return open(arg, mode), True + elif arg is str: + return subprocess.PIPE, False else: return arg, False - output, ostream = streamify(output, 'w') - error, estream = streamify(error, 'w') - input, istream = streamify(input, 'r') + ostream, close_ostream = streamify(output, 'w') + estream, close_estream = streamify(error, 'w') + istream, close_istream = streamify(input, 'r') # if they just want to ignore one error code, make it a tuple. if isinstance(ignore_errors, int): @@ -92,19 +148,20 @@ class Executable(object): tty.debug(cmd_line) try: - if return_output: - output = subprocess.PIPE - proc = subprocess.Popen( - cmd, stdin=input, stderr=error, stdout=output) + cmd, stdin=istream, stderr=estream, stdout=ostream) out, err = proc.communicate() rc = self.returncode = proc.returncode if fail_on_error and rc != 0 and (rc not in ignore_errors): raise ProcessError("Command exited with status %d:" % proc.returncode, cmd_line) - if return_output: - return out + + if output is str or error is str: + result = '' + if output is str: result += out + if error is str: result += err + return result except OSError, e: raise ProcessError( @@ -119,9 +176,9 @@ class Executable(object): % (proc.returncode, cmd_line)) finally: - if ostream: output.close() - if estream: error.close() - if istream: input.close() + if close_ostream: output.close() + if close_estream: error.close() + if close_istream: input.close() def __eq__(self, other): diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 61b16f3fd8..3e5895cfb8 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -50,7 +50,7 @@ class Gcc(Package): version('4.5.4', '27e459c2566b8209ab064570e1b378f7') variant('gold', default=True, description="Build the gold linker plugin for ld-based LTO") - + depends_on("mpfr") depends_on("gmp") depends_on("mpc") # when @4.5: @@ -102,7 +102,7 @@ class Gcc(Package): configure(*options) make() make("install") - + self.write_rpath_specs() @@ -121,7 +121,7 @@ class Gcc(Package): return gcc = Executable(join_path(self.prefix.bin, 'gcc')) - lines = gcc('-dumpspecs', return_output=True).strip().split("\n") + lines = gcc('-dumpspecs', output=str).strip().split("\n") specs_file = join_path(self.spec_dir, 'specs') with closing(open(specs_file, 'w')) as out: for line in lines: -- cgit v1.2.3-70-g09d2 From 6b3f023d98c7d34ab859e53b2e0953f529325f6e Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 21 Jan 2016 14:05:16 -0500 Subject: Update OpenMPI to 1.10.2 --- var/spack/repos/builtin/packages/openmpi/package.py | 1 + 1 file changed, 1 insertion(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 1b7f1c2011..9d57f49427 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -17,6 +17,7 @@ class Openmpi(Package): list_url = "http://www.open-mpi.org/software/ompi/" list_depth = 3 + version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c') version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') version('1.10.0', '280cf952de68369cebaca886c5ce0304') version('1.8.8', '0dab8e602372da1425e9242ae37faf8c') -- cgit v1.2.3-70-g09d2 From 2f70c842b8bc7f897b5a18df10c72ae6a7277fbd Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 21 Jan 2016 14:13:39 -0500 Subject: Disable patch that was merged into upstream in 1.10.2 --- var/spack/repos/builtin/packages/openmpi/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 9d57f49427..e4484af8c5 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -25,7 +25,7 @@ class Openmpi(Package): patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") - patch('configure.patch', when="@1.10.0:") + patch('configure.patch', when="@1.10.0:1.10.1") variant('psm', default=False, description='Build support for the PSM library.') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') -- cgit v1.2.3-70-g09d2 From 2e58bc31138ee172ea55ad652aaf49b09fe6e135 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 21 Jan 2016 19:57:49 -0800 Subject: Sticking with additive approach but now most libraries are installed by default. --- var/spack/repos/builtin/packages/boost/package.py | 26 +++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 1992d4d39a..f31bc445b8 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -45,28 +45,36 @@ class Boost(Package): version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') - libs = ['chrono', + default_install_libs = set(['chrono', 'date_time', 'filesystem', - 'iostreams', + 'graph', + 'iostreams', + 'log', + 'math', 'random', 'regex', 'serialization', 'signals', 'system', 'thread', - 'wave', - 'mpi', - 'python'] + 'wave']) - for lib in libs: - variant(lib, default=False, description="Compile with {0} library" - .format(lib)) + # These are not installed by default because they pull in many dependencies + # and/or because there is a great deal of customization possible (and it + # would be difficult or tedious to choose sensible defaults here). + default_noinstall_libs = set(['mpi', 'python']) + + all_libs = default_install_libs | default_noinstall_libs + + for lib in all_libs: + variant(lib, default=(lib in default_install_libs), + description="Compile with {0} library".format(lib)) variant('debug', default=False, description='Switch to the debug version of Boost') variant('shared', default=True, description="Additionally build shared libraries") variant('multithreaded', default=True, description="Build multi-threaded versions of libraries") - variant('singlethreaded', default=False, description="Build single-threaded versions of libraries") + variant('singlethreaded', default=True, description="Build single-threaded versions of libraries") variant('regex_icu', default=False, description="Include regex ICU support (by default false even if regex library is compiled)") depends_on('icu', when='+regex_icu') -- cgit v1.2.3-70-g09d2 From 4a55b97d11739a0ee6ca5ddcbdf35826ca292469 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 22 Jan 2016 12:37:12 -0800 Subject: Fixed reference --- var/spack/repos/builtin/packages/boost/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index f31bc445b8..467e9a61c6 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -163,7 +163,7 @@ class Boost(Package): def install(self, spec, prefix): withLibs = list() - for lib in Boost.libs: + for lib in Boost.all_libs: if "+{0}".format(lib) in spec: withLibs.append(lib) if not withLibs: -- cgit v1.2.3-70-g09d2 From 10de5a3ec76fbf1244c43a843ae26a67fc879ddb Mon Sep 17 00:00:00 2001 From: Alfredo Gimenez Date: Fri, 22 Jan 2016 13:02:18 -0800 Subject: Patch fix for boost@1.60.0%gcc@4.4.7 --- .../repos/builtin/packages/boost/boost_11856.patch | 34 ++++++++++++++++++++++ var/spack/repos/builtin/packages/boost/package.py | 3 ++ 2 files changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin/packages/boost/boost_11856.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/boost_11856.patch b/var/spack/repos/builtin/packages/boost/boost_11856.patch new file mode 100644 index 0000000000..3b4052ca18 --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/boost_11856.patch @@ -0,0 +1,34 @@ +--- a/libs/container/src/pool_resource.cpp 2015-11-06 12:49:55.000000000 -0800 ++++ b/libs/container/src/pool_resource.cpp 2015-12-22 07:54:36.202131121 -0800 +@@ -32,11 +32,11 @@ + class pool_data_t + : public block_slist_base<> + { +- typedef block_slist_base<> block_slist_base; ++ typedef block_slist_base<> block_slist_base_t; + + public: + explicit pool_data_t(std::size_t initial_blocks_per_chunk) +- : block_slist_base(), next_blocks_per_chunk(initial_blocks_per_chunk) ++ : block_slist_base_t(), next_blocks_per_chunk(initial_blocks_per_chunk) + { slist_algo::init_header(&free_slist); } + + void *allocate_block() BOOST_NOEXCEPT +@@ -59,7 +59,7 @@ + void release(memory_resource &upstream) + { + slist_algo::init_header(&free_slist); +- this->block_slist_base::release(upstream); ++ this->block_slist_base_t::release(upstream); + next_blocks_per_chunk = pool_options_minimum_max_blocks_per_chunk; + } + +@@ -72,7 +72,7 @@ + + //Minimum block size is at least max_align, so all pools allocate sizes that are multiple of max_align, + //meaning that all blocks are max_align-aligned. +- char *p = static_cast(block_slist_base::allocate(blocks_per_chunk*pool_block, mr)); ++ char *p = static_cast(block_slist_base_t::allocate(blocks_per_chunk*pool_block, mr)); + + //Create header types. This is no-throw + for(std::size_t i = 0, max = blocks_per_chunk; i != max; ++i){ diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 3427b74ad6..e3fb516be9 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -54,6 +54,9 @@ class Boost(Package): depends_on('bzip2', when='+compression') depends_on('zlib', when='+compression') + # Patch fix from https://svn.boost.org/trac/boost/ticket/11856 + patch('boost_11856.patch', when='@1.60.0%gcc@4.4.7') + def url_for_version(self, version): """Handle Boost's weird URLs, which write the version two different ways.""" parts = [str(p) for p in Version(version)] -- cgit v1.2.3-70-g09d2 From 9f99ee61c733e8fee8ae4058fb9198288af40fc6 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 22 Jan 2016 13:25:45 -0800 Subject: 1. added default install libs (atomic, test, locale, program_options) 2. clarify comment for default_noinstall_libs 3. renamed regex_icu variant to icu_support (both the locale and regex libs can use it) 4. explicitly set b2 install ICU_PATH when regex_icu is activated --- var/spack/repos/builtin/packages/boost/package.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 467e9a61c6..1403ea4411 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -45,24 +45,28 @@ class Boost(Package): version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') - default_install_libs = set(['chrono', + default_install_libs = set(['atomic', + 'chrono', 'date_time', 'filesystem', 'graph', 'iostreams', + 'locale', 'log', 'math', + 'program_options', 'random', 'regex', 'serialization', 'signals', 'system', + 'test', 'thread', 'wave']) - # These are not installed by default because they pull in many dependencies - # and/or because there is a great deal of customization possible (and it - # would be difficult or tedious to choose sensible defaults here). + # mpi/python are not installed by default because they pull in many + # dependencies and/or because there is a great deal of customization + # possible (and it would be difficult to choose sensible defaults) default_noinstall_libs = set(['mpi', 'python']) all_libs = default_install_libs | default_noinstall_libs @@ -75,9 +79,9 @@ class Boost(Package): variant('shared', default=True, description="Additionally build shared libraries") variant('multithreaded', default=True, description="Build multi-threaded versions of libraries") variant('singlethreaded', default=True, description="Build single-threaded versions of libraries") - variant('regex_icu', default=False, description="Include regex ICU support (by default false even if regex library is compiled)") + variant('icu_support', default=False, description="Include ICU support (for regex/locale libraries)") - depends_on('icu', when='+regex_icu') + depends_on('icu', when='+icu_support') depends_on('python', when='+python') depends_on('mpi', when='+mpi') depends_on('bzip2', when='+iostreams') @@ -134,6 +138,9 @@ class Boost(Package): else: options.append('variant=release') + if '+icu_support' in spec: + options.extend(['-s', 'ICU_PATH=%s' % spec['icu'].prefix]) + if '+iostreams' in spec: options.extend([ '-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include, -- cgit v1.2.3-70-g09d2 From a653d2f5e2f296ff66eb41ffb9f2f6e9b9bdb3b5 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 22 Jan 2016 13:43:16 -0800 Subject: Slightly more robust approach for setting defaults for noinstall_libs --- var/spack/repos/builtin/packages/boost/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 1403ea4411..a30cd7cc35 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -72,7 +72,7 @@ class Boost(Package): all_libs = default_install_libs | default_noinstall_libs for lib in all_libs: - variant(lib, default=(lib in default_install_libs), + variant(lib, default=(lib not in default_noinstall_libs), description="Compile with {0} library".format(lib)) variant('debug', default=False, description='Switch to the debug version of Boost') -- cgit v1.2.3-70-g09d2 From 1d18f2031c086b4f1e5bb52744c75b232cbf2e7f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 25 Jan 2016 14:57:33 -0600 Subject: Add szip variant --- var/spack/repos/builtin/packages/hdf5/package.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index ac78d8e961..5321a191f0 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -48,9 +48,11 @@ class Hdf5(Package): variant('unsupported', default=False, description='Enables unsupported configuration options') variant('mpi', default=False, description='Enable MPI support') + variant('szip', default=False, description='Enable szip support') variant('threadsafe', default=False, description='Enable thread-safe capabilities') depends_on("mpi", when='+mpi') + depends_on("szip", when='+szip') depends_on("zlib") def validate(self, spec): @@ -105,6 +107,9 @@ class Hdf5(Package): if '+fortran' in spec: extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort") + if '+szip' in spec: + extra_args.append("--with-szlib=%s" % spec['szip'].prefix) + if '+threadsafe' in spec: extra_args.extend([ '--enable-threadsafe', -- cgit v1.2.3-70-g09d2 From c6bb00085f89b6db37a03674ba09714adab1f2f0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 26 Jan 2016 12:04:48 -0600 Subject: Extensive modifications to NetCDF package --- var/spack/repos/builtin/packages/netcdf/package.py | 52 ++++++++++++++++------ 1 file changed, 39 insertions(+), 13 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index 239644d894..93c4410146 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -2,27 +2,53 @@ from spack import * class Netcdf(Package): """NetCDF is a set of software libraries and self-describing, machine-independent - data formats that support the creation, access, and sharing of array-oriented - scientific data.""" + data formats that support the creation, access, and sharing of array-oriented + scientific data.""" homepage = "http://www.unidata.ucar.edu/software/netcdf/" url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz" + version('4.4.0', 'f01cb26a0126dd9a6224e76472d25f6c') version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') + variant('fortran', default=False, description="Download and install NetCDF-Fortran") + variant('hdf4', default=False, description="Enable HDF4 support") + patch('netcdf-4.3.3-mpi.patch') # Dependencies: - depends_on("cmake @2.8.12:") - # >HDF5 - depends_on("hdf5") + depends_on("curl") # required for DAP support + depends_on("hdf", when='+hdf4') + depends_on("hdf5") # required for NetCDF-4 support + depends_on("zlib") # required for NetCDF-4 support def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', - "-DCMAKE_INSTALL_PREFIX:PATH=%s" % prefix, - "-DENABLE_DAP:BOOL=OFF", # Disable DAP. - "-DBUILD_SHARED_LIBS:BOOL=OFF") # Don't build shared libraries (use static libs). - - make() - make("install") + config_args = [ + "--enable-fsync", + "--enable-v2", + "--enable-utilities", + "--enable-shared", + "--enable-static", + "--enable-largefile", + # necessary for HDF5 support + "--enable-netcdf-4", + "--enable-dynamic-loading", + # necessary for DAP support + "--enable-dap" + ] + + # HDF4 support + if '+hdf4' in spec: + config_args.append("--enable-hdf4") + + # Fortran support + # In version 4.2+, NetCDF-C and NetCDF-Fortran have split. + # They can be installed separately, but this bootstrap procedure + # should be able to install both at the same time. + # Note: this is a new experimental feature + if '+fortran' in spec: + config_args.append("--enable-remote-fortran-bootstrap") + + configure(*config_args) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 81ccba202c601edacaf483eacc7373d1947e4875 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 26 Jan 2016 15:38:22 -0600 Subject: Make szip a variant --- var/spack/repos/builtin/packages/hdf/package.py | 29 ++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index 43b5980230..1ecb167183 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -11,8 +11,10 @@ class Hdf(Package): version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19') + variant('szip', default=False, description="Enable szip support") + depends_on("jpeg") - depends_on("szip") + depends_on("szip", when='+szip') depends_on("zlib") @@ -21,15 +23,22 @@ class Hdf(Package): def install(self, spec, prefix): - configure('--prefix=%s' % prefix, - '--with-jpeg=%s' % spec['jpeg'].prefix, - '--with-szlib=%s' % spec['szip'].prefix, - '--with-zlib=%s' % spec['zlib'].prefix, - '--disable-netcdf', - '--enable-fortran', - '--disable-shared', - '--enable-static', - '--enable-production') + config_args = [ + '--prefix=%s' % prefix, + '--with-jpeg=%s' % spec['jpeg'].prefix, + '--with-zlib=%s' % spec['zlib'].prefix, + '--disable-netcdf', + '--enable-fortran', + '--disable-shared', + '--enable-static', + '--enable-production' + ] + + # SZip support + if '+szip' in spec: + config_args.append('--with-szlib=%s' % spec['szip'].prefix) + + configure(*config_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 23af31cb1c773cd5a01f93a4896d794ddf908bae Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 26 Jan 2016 17:55:32 -0800 Subject: adding the cmocka unit testing library --- var/spack/repos/builtin/packages/cmocka/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cmocka/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cmocka/package.py b/var/spack/repos/builtin/packages/cmocka/package.py new file mode 100644 index 0000000000..7377016a6b --- /dev/null +++ b/var/spack/repos/builtin/packages/cmocka/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Cmocka(Package): + """Unit-testing framework in pure C""" + homepage = "https://cmocka.org/" + url = "https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz" + + version('1.0.1', 'ed861e501a21a92b2af63e466df2015e') + parallel = False + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From 6122642b818a6f1cfa999482949fed7154b2dbf0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 27 Jan 2016 16:16:33 -0600 Subject: More NetCDF changes --- var/spack/repos/builtin/packages/hdf/package.py | 9 +++--- .../builtin/packages/netcdf/netcdf-4.3.3-mpi.patch | 25 ---------------- var/spack/repos/builtin/packages/netcdf/package.py | 34 +++++++++++++++++++--- 3 files changed, 35 insertions(+), 33 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index 1ecb167183..ac6435f2a2 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -24,12 +24,13 @@ class Hdf(Package): def install(self, spec, prefix): config_args = [ + 'CFLAGS=-fPIC', '--prefix=%s' % prefix, - '--with-jpeg=%s' % spec['jpeg'].prefix, - '--with-zlib=%s' % spec['zlib'].prefix, - '--disable-netcdf', + '--with-jpeg=%s' % spec['jpeg'].prefix, + '--with-zlib=%s' % spec['zlib'].prefix, + '--disable-netcdf', # must be disabled to build NetCDF with HDF4 support '--enable-fortran', - '--disable-shared', + '--disable-shared', # fortran and shared libraries are not compatible '--enable-static', '--enable-production' ] diff --git a/var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch b/var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch deleted file mode 100644 index 46dda5fc9d..0000000000 --- a/var/spack/repos/builtin/packages/netcdf/netcdf-4.3.3-mpi.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nur netcdf-4.3.3/CMakeLists.txt netcdf-4.3.3.mpi/CMakeLists.txt ---- netcdf-4.3.3/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500 -+++ netcdf-4.3.3.mpi/CMakeLists.txt 2015-10-14 16:44:41.176300658 -0400 -@@ -753,6 +753,7 @@ - SET(USE_PARALLEL OFF CACHE BOOL "") - MESSAGE(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.") - ELSE() -+ FIND_PACKAGE(MPI REQUIRED) - SET(USE_PARALLEL ON CACHE BOOL "") - SET(STATUS_PARALLEL "ON") - ENDIF() -diff -Nur netcdf-4.3.3/liblib/CMakeLists.txt netcdf-4.3.3.mpi/liblib/CMakeLists.txt ---- netcdf-4.3.3/liblib/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500 -+++ netcdf-4.3.3.mpi/liblib/CMakeLists.txt 2015-10-14 16:44:57.757793634 -0400 -@@ -71,6 +71,10 @@ - SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY}) - ENDIF() - -+IF(USE_PARALLEL) -+ SET(TLL_LIBS ${TLL_LIBS} ${MPI_C_LIBRARIES}) -+ENDIF() -+ - IF(USE_HDF4) - SET(TLL_LIBS ${TLL_LIBS} ${HDF4_LIBRARIES}) - ENDIF() diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index 93c4410146..3cd0b2ee7a 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -12,9 +12,7 @@ class Netcdf(Package): version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') variant('fortran', default=False, description="Download and install NetCDF-Fortran") - variant('hdf4', default=False, description="Enable HDF4 support") - - patch('netcdf-4.3.3-mpi.patch') + variant('hdf4', default=False, description="Enable HDF4 support") # Dependencies: depends_on("curl") # required for DAP support @@ -23,7 +21,13 @@ class Netcdf(Package): depends_on("zlib") # required for NetCDF-4 support def install(self, spec, prefix): + # Environment variables + CPPFLAGS = [] + LDFLAGS = [] + LIBS = [] + config_args = [ + "--prefix=%s" % prefix, "--enable-fsync", "--enable-v2", "--enable-utilities", @@ -37,18 +41,40 @@ class Netcdf(Package): "--enable-dap" ] + CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix) + LDFLAGS.append( "-L%s/lib" % spec['hdf5'].prefix) + # HDF4 support + # As of NetCDF 4.1.3, "--with-hdf4=..." is no longer a valid option + # You must use the environment variables CPPFLAGS and LDFLAGS if '+hdf4' in spec: config_args.append("--enable-hdf4") + CPPFLAGS.append("-I%s/include" % spec['hdf'].prefix) + LDFLAGS.append( "-L%s/lib" % spec['hdf'].prefix) + LIBS.append( "-l%s" % "jpeg") + + if 'szip' in spec: + CPPFLAGS.append("-I%s/include" % spec['szip'].prefix) + LDFLAGS.append( "-L%s/lib" % spec['szip'].prefix) + LIBS.append( "-l%s" % "sz") # Fortran support # In version 4.2+, NetCDF-C and NetCDF-Fortran have split. # They can be installed separately, but this bootstrap procedure # should be able to install both at the same time. - # Note: this is a new experimental feature + # Note: this is a new experimental feature. if '+fortran' in spec: config_args.append("--enable-remote-fortran-bootstrap") + config_args.append('CPPFLAGS=%s' % ' '.join(CPPFLAGS)) + config_args.append('LDFLAGS=%s' % ' '.join(LDFLAGS)) + config_args.append('LIBS=%s' % ' '.join(LIBS)) + configure(*config_args) make() make("install") + + # After installing NetCDF-C, install NetCDF-Fortran + if '+fortran' in spec: + make("build-netcdf-fortran") + make("install-netcdf-fortran") -- cgit v1.2.3-70-g09d2