diff options
author | <kellyt@MENE.localdomain> | 2016-08-01 20:50:28 -0600 |
---|---|---|
committer | <kellyt@MENE.localdomain> | 2016-08-01 20:50:28 -0600 |
commit | ba11f19efcec5b5581bb804fb91768205c5488af (patch) | |
tree | f0c4162eb3a2f4481fc13ccec1eff97bf56b1346 | |
parent | 6c80b152208e8f2154db6c658475fe18a9c9f8bc (diff) | |
parent | bb5dd49206e98f066d211b6a0f5a408b209ef2aa (diff) | |
download | spack-ba11f19efcec5b5581bb804fb91768205c5488af.tar.gz spack-ba11f19efcec5b5581bb804fb91768205c5488af.tar.bz2 spack-ba11f19efcec5b5581bb804fb91768205c5488af.tar.xz spack-ba11f19efcec5b5581bb804fb91768205c5488af.zip |
Merge remote-tracking branch 'upstream/develop' into gktplus3-deps
75 files changed, 3256 insertions, 193 deletions
diff --git a/.travis.yml b/.travis.yml index 904143a00f..b376a33490 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,17 @@ language: python + python: - "2.6" - "2.7" +env: + - TEST_TYPE=unit + - TEST_TYPE=flake8 + +# Exclude flake8 from python 2.6 +matrix: + exclude: + - python: "2.6" + env: TEST_TYPE=flake8 # Use new Travis infrastructure (Docker can't sudo yet) sudo: false @@ -20,20 +30,13 @@ before_install: - git fetch origin develop:develop script: - # Regular spack setup and tests - - . share/spack/setup-env.sh - - spack compilers - - spack config get compilers - - spack install -v libdwarf - - # Run unit tests with code coverage - - coverage run bin/spack test - + # Run unit tests with code coverage plus install libdwarf + - 'if [ "$TEST_TYPE" = "unit" ]; then share/spack/qa/run-unit-tests; fi' # Run flake8 code style checks. - - share/spack/qa/run-flake8 + - 'if [ "$TEST_TYPE" = "flake8" ]; then share/spack/qa/run-flake8; fi' after_success: - - coveralls + - 'if [ "$TEST_TYPE" = "unit" ] && [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then coveralls; fi' notifications: email: diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 6e4cd338fe..2478f5c159 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -29,8 +29,9 @@ import shutil import stat import errno import getpass -from contextlib import contextmanager, closing +from contextlib import contextmanager import subprocess +import fileinput import llnl.util.tty as tty @@ -85,13 +86,14 @@ def filter_file(regex, repl, *filenames, **kwargs): if ignore_absent and not os.path.exists(filename): continue - shutil.copy(filename, backup_filename) + # Create backup file. Don't overwrite an existing backup + # file in case this file is being filtered multiple times. + if not os.path.exists(backup_filename): + shutil.copy(filename, backup_filename) + try: - with closing(open(backup_filename)) as infile: - with closing(open(filename, 'w')) as outfile: - for line in infile: - foo = re.sub(regex, repl, line) - outfile.write(foo) + for line in fileinput.input(filename, inplace=True): + print(re.sub(regex, repl, line.rstrip())) except: # clean up the original file on failure. shutil.move(backup_filename, filename) @@ -189,7 +191,7 @@ def install(src, dest): def install_tree(src, dest, **kwargs): - """Manually install a file to a particular location.""" + """Manually install a directory tree to a particular location.""" tty.debug("Installing %s to %s" % (src, dest)) shutil.copytree(src, dest, **kwargs) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 5180f3cf04..eced9917c9 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -336,14 +336,18 @@ class DefaultConcretizer(object): spack.pkgsort.compiler_compare, other_spec.name) matches = sorted(compiler_list, cmp=cmp_compilers) if not matches: - raise UnavailableCompilerVersionError(other_compiler) + arch = spec.architecture + raise UnavailableCompilerVersionError(other_compiler, + arch.platform_os) # copy concrete version into other_compiler index = 0 while not _proper_compiler_style(matches[index], spec.architecture): index += 1 if index == len(matches) - 1: - raise NoValidVersionError(spec) + arch = spec.architecture + raise UnavailableCompilerVersionError(spec.compiler, + arch.platform_os) spec.compiler = matches[index].copy() assert(spec.compiler.concrete) return True # things changed. @@ -489,9 +493,9 @@ class UnavailableCompilerVersionError(spack.error.SpackError): """Raised when there is no available compiler that satisfies a compiler spec.""" - def __init__(self, compiler_spec): + def __init__(self, compiler_spec, operating_system): super(UnavailableCompilerVersionError, self).__init__( - "No available compiler version matches '%s'" % compiler_spec, + "No available compiler version matches '%s' on operating_system %s" % compiler_spec, operating_system, # NOQA: ignore=E501 "Run 'spack compilers' to see available compiler Options.") diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index e2e7dbc0ee..31f0eb3a56 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -266,6 +266,19 @@ section_schemas = { ], }, },},},},},}, + 'targets': { + '$schema': 'http://json-schema.org/schema#', + 'title': 'Spack target configuration file schema', + 'type': 'object', + 'additionalProperties': False, + 'patternProperties': { + r'targets:?': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'patternProperties': { + r'\w[\w-]*': { # target name + 'type': 'string' ,},},},},}, 'modules': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack module file configuration file schema', diff --git a/lib/spack/spack/operating_systems/cnl.py b/lib/spack/spack/operating_systems/cnl.py index c160a60be8..dbd2775861 100644 --- a/lib/spack/spack/operating_systems/cnl.py +++ b/lib/spack/spack/operating_systems/cnl.py @@ -7,11 +7,12 @@ import spack.spec from spack.util.multiproc import parmap import spack.compilers + class Cnl(OperatingSystem): """ Compute Node Linux (CNL) is the operating system used for the Cray XC series super computers. It is a very stripped down version of GNU/Linux. Any compilers found through this operating system will be used with - modules. If updated, user must make sure that version and name are + modules. If updated, user must make sure that version and name are updated to indicate that OS has been upgraded (or downgraded) """ def __init__(self): @@ -19,17 +20,19 @@ class Cnl(OperatingSystem): version = '10' super(Cnl, self).__init__(name, version) + def __str__(self): + return self.name def find_compilers(self, *paths): types = spack.compilers.all_compiler_types() - compiler_lists = parmap(lambda cmp_cls: self.find_compiler(cmp_cls, *paths), types) + compiler_lists = parmap( + lambda cmp_cls: self.find_compiler(cmp_cls, *paths), types) # ensure all the version calls we made are cached in the parent # process, as well. This speeds up Spack a lot. - clist = reduce(lambda x,y: x+y, compiler_lists) + clist = reduce(lambda x, y: x + y, compiler_lists) return clist - def find_compiler(self, cmp_cls, *paths): compilers = [] if cmp_cls.PrgEnv: @@ -45,13 +48,16 @@ class Cnl(OperatingSystem): if paths: module_paths = ':' + ':'.join(p for p in paths) os.environ['MODULEPATH'] = module_paths - - output = modulecmd('avail', cmp_cls.PrgEnv_compiler, output=str, error=str) - matches = re.findall(r'(%s)/([\d\.]+[\d])' % cmp_cls.PrgEnv_compiler, output) + + output = modulecmd( + 'avail', cmp_cls.PrgEnv_compiler, output=str, error=str) + matches = re.findall( + r'(%s)/([\d\.]+[\d])' % cmp_cls.PrgEnv_compiler, output) for name, version in matches: v = version - comp = cmp_cls(spack.spec.CompilerSpec(name + '@' + v), self, - ['cc', 'CC', 'ftn'], [cmp_cls.PrgEnv, name +'/' + v]) + comp = cmp_cls( + spack.spec.CompilerSpec(name + '@' + v), self, + ['cc', 'CC', 'ftn'], [cmp_cls.PrgEnv, name + '/' + v]) compilers.append(comp) diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py new file mode 100644 index 0000000000..2a3b81cf9c --- /dev/null +++ b/lib/spack/spack/platforms/cray.py @@ -0,0 +1,105 @@ +import os +import re +import spack.config +import llnl.util.tty as tty +from spack.util.executable import which +from spack.architecture import Platform, Target, NoPlatformError +from spack.operating_systems.linux_distro import LinuxDistro +from spack.operating_systems.cnl import Cnl +from llnl.util.filesystem import join_path + +# Craype- module prefixes that are not valid CPU targets. +NON_TARGETS = ('hugepages', 'network', 'target', 'accel', 'xtpe') + + +def _target_from_clean_env(name): + '''Return the default back_end target as loaded in a clean login session. + + A bash subshell is launched with a wiped environment and the list of loaded + modules is parsed for the first acceptable CrayPE target. + ''' + # Based on the incantation: + # echo "$(env - USER=$USER /bin/bash -l -c 'module list -lt')" + targets = [] + if name != 'front_end': + env = which('env') + env.add_default_arg('-') + # CAUTION - $USER is generally needed to initialize the environment. + # There may be other variables needed for general success. + output = env('USER=%s' % os.environ['USER'], + '/bin/bash', '--noprofile', '--norc', '-c', + '. /etc/profile; module list -lt', + output=str, error=str) + default_modules = [i for i in output.splitlines() + if len(i.split()) == 1] + tty.debug("Found default modules:", + *[" " + mod for mod in default_modules]) + pattern = 'craype-(?!{0})(\S*)'.format('|'.join(NON_TARGETS)) + for mod in default_modules: + if 'craype-' in mod: + targets.extend(re.findall(pattern, mod)) + return targets[0] if targets else None + + +class Cray(Platform): + priority = 10 + + def __init__(self): + ''' Create a Cray system platform. + + Target names should use craype target names but not include the + 'craype-' prefix. Uses first viable target from: + self + envars [SPACK_FRONT_END, SPACK_BACK_END] + configuration file "targets.yaml" with keys 'front_end', 'back_end' + scanning /etc/bash/bashrc.local for back_end only + ''' + super(Cray, self).__init__('cray') + + # Get targets from config or make best guess from environment: + conf = spack.config.get_config('targets') + for name in ('front_end', 'back_end'): + _target = getattr(self, name, None) + if _target is None: + _target = os.environ.get('SPACK_' + name.upper()) + if _target is None: + _target = conf.get(name) + if _target is None: + _target = _target_from_clean_env(name) + setattr(self, name, _target) + + if _target is not None: + self.add_target(name, Target(_target, 'craype-' + _target)) + self.add_target(_target, Target(_target, 'craype-' + _target)) + + if self.back_end is not None: + self.default = self.back_end + self.add_target( + 'default', Target(self.default, 'craype-' + self.default)) + else: + raise NoPlatformError() + + front_distro = LinuxDistro() + back_distro = Cnl() + + self.default_os = str(back_distro) + self.back_os = self.default_os + self.front_os = str(front_distro) + + self.add_operating_system(self.back_os, back_distro) + self.add_operating_system(self.front_os, front_distro) + + @classmethod + def setup_platform_environment(self, pkg, env): + """ Change the linker to default dynamic to be more + similar to linux/standard linker behavior + """ + env.set('CRAYPE_LINK_TYPE', 'dynamic') + cray_wrapper_names = join_path(spack.build_env_path, 'cray') + if os.path.isdir(cray_wrapper_names): + env.prepend_path('PATH', cray_wrapper_names) + env.prepend_path('SPACK_ENV_PATHS', cray_wrapper_names) + + @classmethod + def detect(self): + return os.environ.get('CRAYPE_VERSION') is not None diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py deleted file mode 100644 index 03d0383cc5..0000000000 --- a/lib/spack/spack/platforms/cray_xc.py +++ /dev/null @@ -1,72 +0,0 @@ -import os -import spack -from spack.architecture import Platform, Target -from spack.operating_systems.linux_distro import LinuxDistro -from spack.operating_systems.cnl import Cnl -from spack.util.executable import which -from llnl.util.filesystem import join_path - - -class CrayXc(Platform): - priority = 20 - front_end = 'sandybridge' - back_end = 'ivybridge' - default = 'ivybridge' - - back_os = "CNL10" - default_os = "CNL10" - - def __init__(self): - ''' Since cori doesn't have ivybridge as a front end it's better - if we use CRAY_CPU_TARGET as the default. This will ensure - that if we're on a XC-40 or XC-30 then we can detect the target - ''' - super(CrayXc, self).__init__('cray_xc') - - # Handle the default here so we can check for a key error - if 'CRAY_CPU_TARGET' in os.environ: - self.default = os.environ['CRAY_CPU_TARGET'] - - # Change the defaults to haswell if we're on an XC40 - if self.default == 'haswell': - self.front_end = self.default - self.back_end = self.default - - # Could switch to use modules and fe targets for front end - # Currently using compilers by path for front end. - self.add_target('sandybridge', Target('sandybridge')) - self.add_target('ivybridge', - Target('ivybridge', 'craype-ivybridge')) - self.add_target('haswell', - Target('haswell', 'craype-haswell')) - - # Front end of the cray platform is a linux distro. - linux_dist = LinuxDistro() - self.front_os = str(linux_dist) - self.add_operating_system(str(linux_dist), linux_dist) - self.add_operating_system('CNL10', Cnl()) - - @classmethod - def setup_platform_environment(self, pkg, env): - """ Change the linker to default dynamic to be more - similar to linux/standard linker behavior - """ - env.set('CRAYPE_LINK_TYPE', 'dynamic') - cray_wrapper_names = join_path(spack.build_env_path, 'cray') - if os.path.isdir(cray_wrapper_names): - env.prepend_path('PATH', cray_wrapper_names) - env.prepend_path('SPACK_ENV_PATHS', cray_wrapper_names) - - @classmethod - def detect(self): - try: - cc_verbose = which('ftn') - text = cc_verbose('-craype-verbose', - output=str, error=str, - ignore_errors=True).split() - if '-D__CRAYXC' in text: - return True - else: - return False - except: - return False diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index b08cce43b8..1a8b1a169a 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -37,6 +37,7 @@ import spack import spack.config import spack.fetch_strategy as fs import spack.error +from spack.version import * STAGE_PREFIX = 'spack-stage-' @@ -51,10 +52,12 @@ class Stage(object): lifecycle looks like this: ``` - with Stage() as stage: # Context manager creates and destroys the stage directory + with Stage() as stage: # Context manager creates and destroys the + # stage directory stage.fetch() # Fetch a source archive into the stage. stage.expand_archive() # Expand the source archive. - <install> # Build and install the archive. (handled by user of Stage) + <install> # Build and install the archive. (handled by + # user of Stage) ``` When used as a context manager, the stage is automatically @@ -71,7 +74,8 @@ class Stage(object): stage.create() # Explicitly create the stage directory. stage.fetch() # Fetch a source archive into the stage. stage.expand_archive() # Expand the source archive. - <install> # Build and install the archive. (handled by user of Stage) + <install> # Build and install the archive. (handled by + # user of Stage) finally: stage.destroy() # Explicitly destroy the stage directory. ``` @@ -120,13 +124,17 @@ class Stage(object): elif isinstance(url_or_fetch_strategy, fs.FetchStrategy): self.fetcher = url_or_fetch_strategy else: - raise ValueError("Can't construct Stage without url or fetch strategy") + raise ValueError( + "Can't construct Stage without url or fetch strategy") self.fetcher.set_stage(self) - self.default_fetcher = self.fetcher # self.fetcher can change with mirrors. - self.skip_checksum_for_mirror = True # used for mirrored archives of repositories. + # self.fetcher can change with mirrors. + self.default_fetcher = self.fetcher + # used for mirrored archives of repositories. + self.skip_checksum_for_mirror = True - # TODO : this uses a protected member of tempfile, but seemed the only way to get a temporary name - # TODO : besides, the temporary link name won't be the same as the temporary stage area in tmp_root + # TODO : this uses a protected member of tempfile, but seemed the only + # TODO : way to get a temporary name besides, the temporary link name + # TODO : won't be the same as the temporary stage area in tmp_root self.name = name if name is None: self.name = STAGE_PREFIX + next(tempfile._get_candidate_names()) @@ -143,7 +151,6 @@ class Stage(object): # Flag to decide whether to delete the stage folder on exit or not self.keep = keep - def __enter__(self): """ Entering a stage context will create the stage directory @@ -154,7 +161,6 @@ class Stage(object): self.create() return self - def __exit__(self, exc_type, exc_val, exc_tb): """ Exiting from a stage context will delete the stage directory unless: @@ -173,12 +179,10 @@ class Stage(object): if exc_type is None and not self.keep: self.destroy() - def _need_to_create_path(self): """Makes sure nothing weird has happened since the last time we looked at path. Returns True if path already exists and is ok. - Returns False if path needs to be created. - """ + Returns False if path needs to be created.""" # Path doesn't exist yet. Will need to create it. if not os.path.exists(self.path): return True @@ -196,7 +200,8 @@ class Stage(object): if spack.use_tmp_stage: # If we're using a tmp dir, it's a link, and it points at the # right spot, then keep it. - if (real_path.startswith(real_tmp) and os.path.exists(real_path)): + if (real_path.startswith(real_tmp) and + os.path.exists(real_path)): return False else: # otherwise, just unlink it and start over. @@ -204,7 +209,8 @@ class Stage(object): return True else: - # If we're not tmp mode, then it's a link and we want a directory. + # If we're not tmp mode, then it's a link and we want a + # directory. os.unlink(self.path) return True @@ -215,10 +221,12 @@ class Stage(object): """Possible archive file paths.""" paths = [] if isinstance(self.fetcher, fs.URLFetchStrategy): - paths.append(os.path.join(self.path, os.path.basename(self.fetcher.url))) + paths.append(os.path.join( + self.path, os.path.basename(self.fetcher.url))) if self.mirror_path: - paths.append(os.path.join(self.path, os.path.basename(self.mirror_path))) + paths.append(os.path.join( + self.path, os.path.basename(self.mirror_path))) return paths @@ -227,10 +235,12 @@ class Stage(object): """Path to the source archive within this stage directory.""" paths = [] if isinstance(self.fetcher, fs.URLFetchStrategy): - paths.append(os.path.join(self.path, os.path.basename(self.fetcher.url))) + paths.append(os.path.join( + self.path, os.path.basename(self.fetcher.url))) if self.mirror_path: - paths.append(os.path.join(self.path, os.path.basename(self.mirror_path))) + paths.append(os.path.join( + self.path, os.path.basename(self.mirror_path))) for path in paths: if os.path.exists(path): @@ -262,7 +272,8 @@ class Stage(object): return None def chdir(self): - """Changes directory to the stage path. Or dies if it is not set up.""" + """Changes directory to the stage path. Or dies if it is not set + up.""" if os.path.isdir(self.path): os.chdir(self.path) else: @@ -306,6 +317,19 @@ class Stage(object): fetchers.insert(0, fs.URLFetchStrategy(url, digest)) fetchers.insert(0, spack.cache.fetcher(self.mirror_path, digest)) + # Look for the archive in list_url + archive_version = spack.url.parse_version(self.default_fetcher.url) + package_name = os.path.dirname(self.mirror_path) + pkg = spack.repo.get(package_name) + if pkg.list_url is not None and pkg.url is not None: + versions = pkg.fetch_remote_versions() + try: + url_from_list = versions[Version(archive_version)] + fetchers.append(fs.URLFetchStrategy(url_from_list, digest)) + except KeyError: + tty.msg("Can not find version %s in url_list" % + archive_version) + for fetcher in fetchers: try: fetcher.set_stage(self) @@ -321,11 +345,11 @@ class Stage(object): self.fetcher = self.default_fetcher raise fs.FetchError(errMessage, None) - def check(self): """Check the downloaded archive against a checksum digest. No-op if this stage checks code out of a repository.""" - if self.fetcher is not self.default_fetcher and self.skip_checksum_for_mirror: + if self.fetcher is not self.default_fetcher and \ + self.skip_checksum_for_mirror: tty.warn("Fetching from mirror without a checksum!", "This package is normally checked out from a version " "control system, but it has been archived on a spack " @@ -335,16 +359,13 @@ class Stage(object): else: self.fetcher.check() - def cache_local(self): spack.cache.store(self.fetcher, self.mirror_path) - def expand_archive(self): """Changes to the stage directory and attempt to expand the downloaded - archive. Fail if the stage is not set up or if the archive is not yet - downloaded. - """ + archive. Fail if the stage is not set up or if the archive is not yet + downloaded.""" archive_dir = self.source_path if not archive_dir: self.fetcher.expand() @@ -386,8 +407,8 @@ class Stage(object): # Create the top-level stage directory mkdirp(spack.stage_path) remove_dead_links(spack.stage_path) - # If a tmp_root exists then create a directory there and then link it in the stage area, - # otherwise create the stage directory in self.path + # If a tmp_root exists then create a directory there and then link it + # in the stage area, otherwise create the stage directory in self.path if self._need_to_create_path(): if self.tmp_root: tmp_dir = tempfile.mkdtemp('', STAGE_PREFIX, self.tmp_root) @@ -409,6 +430,7 @@ class Stage(object): class ResourceStage(Stage): + def __init__(self, url_or_fetch_strategy, root, resource, **kwargs): super(ResourceStage, self).__init__(url_or_fetch_strategy, **kwargs) self.root_stage = root @@ -418,12 +440,15 @@ class ResourceStage(Stage): super(ResourceStage, self).expand_archive() root_stage = self.root_stage resource = self.resource - placement = os.path.basename(self.source_path) if resource.placement is None else resource.placement + placement = os.path.basename(self.source_path) \ + if resource.placement is None \ + else resource.placement if not isinstance(placement, dict): placement = {'': placement} # Make the paths in the dictionary absolute and link for key, value in placement.iteritems(): - target_path = join_path(root_stage.source_path, resource.destination) + target_path = join_path( + root_stage.source_path, resource.destination) destination_path = join_path(target_path, value) source_path = join_path(self.source_path, key) @@ -437,21 +462,23 @@ class ResourceStage(Stage): if not os.path.exists(destination_path): # Create a symlink - tty.info('Moving resource stage\n\tsource : {stage}\n\tdestination : {destination}'.format( - stage=source_path, destination=destination_path - )) + tty.info('Moving resource stage\n\tsource : ' + '{stage}\n\tdestination : {destination}'.format( + stage=source_path, destination=destination_path + )) shutil.move(source_path, destination_path) -@pattern.composite(method_list=['fetch', 'create', 'check', 'expand_archive', 'restage', 'destroy', 'cache_local']) +@pattern.composite(method_list=['fetch', 'create', 'check', 'expand_archive', + 'restage', 'destroy', 'cache_local']) class StageComposite: - """ - Composite for Stage type objects. The first item in this composite is considered to be the root package, and - operations that return a value are forwarded to it. - """ + """Composite for Stage type objects. The first item in this composite is + considered to be the root package, and operations that return a value are + forwarded to it.""" # # __enter__ and __exit__ delegate to all stages in the composite. # + def __enter__(self): for item in self: item.__enter__() @@ -496,8 +523,11 @@ class DIYStage(object): raise ChdirError("Setup failed: no such directory: " + self.path) # DIY stages do nothing as context managers. - def __enter__(self): pass - def __exit__(self, exc_type, exc_val, exc_tb): pass + def __enter__(self): + pass + + def __exit__(self, exc_type, exc_val, exc_tb): + pass def chdir_to_source(self): self.chdir() diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 09bdb021af..42dd9f4c04 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -31,7 +31,7 @@ import platform as py_platform import spack import spack.architecture from spack.spec import * -from spack.platforms.cray_xc import CrayXc +from spack.platforms.cray import Cray from spack.platforms.linux import Linux from spack.platforms.bgq import Bgq from spack.platforms.darwin import Darwin @@ -76,7 +76,7 @@ class ArchitectureTest(MockPackagesTest): def test_platform(self): output_platform_class = spack.architecture.platform() if os.path.exists('/opt/cray/craype'): - my_platform_class = CrayXc() + my_platform_class = Cray() elif os.path.exists('/bgsys'): my_platform_class = Bgq() elif 'Linux' in py_platform.system(): diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests new file mode 100755 index 0000000000..33fb1bfae2 --- /dev/null +++ b/share/spack/qa/run-unit-tests @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# This script runs Spack unit tests. +# +# It should be executed from the top-level directory of the repo, +# e.g.: +# +# share/spack/qa/run-unit-tests +# +# To run it, you'll need to have the Python coverage installed locally. +# + +# Regular spack setup and tests +. ./share/spack/setup-env.sh +spack compilers +spack config get compilers +spack install -v libdwarf + +# Run unit tests with code coverage +coverage run bin/spack test diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index ad06c2ca48..e880a3aa66 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -22,10 +22,9 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import os - from spack import * from spack.util.environment import * +import shutil class R(Package): @@ -74,6 +73,10 @@ class R(Package): depends_on('pcre') depends_on('jdk') + @property + def etcdir(self): + return join_path(prefix, 'rlib', 'R', 'etc') + def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib') configure_args = ['--prefix=%s' % prefix, @@ -88,6 +91,12 @@ class R(Package): make() make('install') + # Make a copy of Makeconf because it will be needed to properly build R + # dependencies in Spack. + src_makeconf = join_path(self.etcdir, 'Makeconf') + dst_makeconf = join_path(self.etcdir, 'Makeconf.spack') + shutil.copy(src_makeconf, dst_makeconf) + self.filter_compilers(spec, prefix) def filter_compilers(self, spec, prefix): @@ -98,18 +107,16 @@ class R(Package): cc and c++. We want them to be bound to whatever compiler they were built with.""" - etcdir = join_path(prefix, 'rlib', 'R', 'etc') - kwargs = {'ignore_absent': True, 'backup': False, 'string': True} - filter_file(env['CC'], self.compiler.cc, - join_path(etcdir, 'Makeconf'), **kwargs) + filter_file(env['CC'], self.compiler.cc, + join_path(self.etcdir, 'Makeconf'), **kwargs) filter_file(env['CXX'], self.compiler.cxx, - join_path(etcdir, 'Makeconf'), **kwargs) + join_path(self.etcdir, 'Makeconf'), **kwargs) filter_file(env['F77'], self.compiler.f77, - join_path(etcdir, 'Makeconf'), **kwargs) + join_path(self.etcdir, 'Makeconf'), **kwargs) filter_file(env['FC'], self.compiler.fc, - join_path(etcdir, 'Makeconf'), **kwargs) + join_path(self.etcdir, 'Makeconf'), **kwargs) # ======================================================================== # Set up environment to make install easy for R extensions. @@ -117,7 +124,7 @@ class R(Package): @property def r_lib_dir(self): - return os.path.join('rlib', 'R', 'library') + return join_path('rlib', 'R', 'library') def setup_dependent_environment(self, spack_env, run_env, extension_spec): # Set R_LIBS to include the library dir for the @@ -125,15 +132,21 @@ class R(Package): r_libs_path = [] for d in extension_spec.traverse(deptype=nolink, deptype_query='run'): if d.package.extends(self.spec): - r_libs_path.append(os.path.join(d.prefix, self.r_lib_dir)) + r_libs_path.append(join_path(d.prefix, self.r_lib_dir)) r_libs_path = ':'.join(r_libs_path) spack_env.set('R_LIBS', r_libs_path) + spack_env.set('R_MAKEVARS_SITE', + join_path(self.etcdir, 'Makeconf.spack')) + + # Use the number of make_jobs set in spack. The make program will + # determine how many jobs can actually be started. + spack_env.set('MAKEFLAGS', '-j{0}'.format(make_jobs)) # For run time environment set only the path for extension_spec and # prepend it to R_LIBS if extension_spec.package.extends(self.spec): - run_env.prepend_path('R_LIBS', os.path.join( + run_env.prepend_path('R_LIBS', join_path( extension_spec.prefix, self.r_lib_dir)) def setup_environment(self, spack_env, run_env): @@ -147,13 +160,14 @@ class R(Package): def setup_dependent_package(self, module, ext_spec): """Called before R modules' install() methods. In most cases, extensions will only need to have one line: - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % - self.stage.source_path)""" + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path)""" + # R extension builds can have a global R executable function module.R = Executable(join_path(self.spec.prefix.bin, 'R')) # Add variable for library directry - module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir) + module.r_lib_dir = join_path(ext_spec.prefix, self.r_lib_dir) # Make the site packages directory for extensions, if it does not exist # already. diff --git a/var/spack/repos/builtin/packages/cask/package.py b/var/spack/repos/builtin/packages/cask/package.py new file mode 100644 index 0000000000..67cc48ab2a --- /dev/null +++ b/var/spack/repos/builtin/packages/cask/package.py @@ -0,0 +1,53 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +# +# Based on Homebrew's formula: +# https://github.com/Homebrew/homebrew-core/blob/master/Formula/cask.rb +# +from spack import * +from glob import glob + + +class Cask(Package): + """Cask is a project management tool for Emacs Lisp to automate the package + development cycle; development, dependencies, testing, building, + packaging and more.""" + homepage = "http://cask.readthedocs.io/en/latest/" + url = "https://github.com/cask/cask/archive/v0.7.4.tar.gz" + + version('0.7.4', 'c973a7db43bc980dd83759a5864a1260') + + depends_on('emacs', type=nolink) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('bin/cask', prefix.bin) + install_tree('templates', join_path(prefix, 'templates')) + for el_file in glob("*.el"): + install(el_file, prefix) + for misc_file in ['COPYING', 'cask.png', 'README.md']: + install(misc_file, prefix) + # disable cask's automatic upgrading feature + touch(join_path(prefix, ".no-upgrade")) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py new file mode 100644 index 0000000000..8fdd1e0ca3 --- /dev/null +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -0,0 +1,161 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import os +import shutil +import copy + +from spack import * + + +class Cp2k(Package): + """CP2K is a quantum chemistry and solid state physics software package + that can perform atomistic simulations of solid state, liquid, molecular, + periodic, material, crystal, and biological systems + """ + homepage = 'https://www.cp2k.org' + url = 'https://sourceforge.net/projects/cp2k/files/cp2k-3.0.tar.bz2' + + version('3.0', 'c05bc47335f68597a310b1ed75601d35') + + variant('mpi', default=True, description='Enable MPI support') + + depends_on('python') # Build dependency + + depends_on('lapack') + depends_on('blas') + depends_on('fftw') + + depends_on('mpi', when='+mpi') + depends_on('scalapack', when='+mpi') + + # TODO : add dependency on libint + # TODO : add dependency on libsmm, libxsmm + # TODO : add dependency on elpa + # TODO : add dependency on CUDA + # TODO : add dependency on PEXSI + # TODO : add dependency on QUIP + # TODO : add dependency on plumed + # TODO : add dependency on libwannier90 + + parallel = False + + def install(self, spec, prefix): + # Construct a proper filename for the architecture file + cp2k_architecture = '{0.architecture}-{0.compiler.name}'.format(spec) + cp2k_version = 'sopt' if '~mpi' in spec else 'popt' + makefile_basename = '.'.join([cp2k_architecture, cp2k_version]) + makefile = join_path('arch', makefile_basename) + + # Write the custom makefile + with open(makefile, 'w') as mkf: + mkf.write('CC = {0.compiler.cc}\n'.format(self)) + if '%intel' in self.spec: + # CPP is a commented command in Intel arch of CP2K + # This is the hack through which cp2k developers avoid doing : + # + # ${CPP} <file>.F > <file>.f90 + # + # and use `-fpp` instead + mkf.write('CPP = # {0.compiler.cc} -P\n'.format(self)) + mkf.write('AR = xiar -r\n') + else: + mkf.write('CPP = {0.compiler.cc} -E\n'.format(self)) + mkf.write('AR = ar -r\n') + fc = self.compiler.fc if '~mpi' in spec else self.spec['mpi'].mpifc + mkf.write('FC = {0}\n'.format(fc)) + mkf.write('LD = {0}\n'.format(fc)) + # Optimization flags + optflags = { + 'gcc': ['-O2', + '-ffast-math', + '-ffree-form', + '-ffree-line-length-none', + '-ftree-vectorize', + '-funroll-loops', + '-mtune=native'], + 'intel': ['-O2', + '-pc64', + '-unroll', + '-heap-arrays 64'] + } + cppflags = [ + '-D__FFTW3', + '-I' + spec['fftw'].prefix.include + ] + fcflags = copy.deepcopy(optflags[self.spec.compiler.name]) + fcflags.extend([ + '-I' + spec['fftw'].prefix.include + ]) + ldflags = ['-L' + spec['fftw'].prefix.lib] + libs = [] + # Intel + if '%intel' in self.spec: + cppflags.extend([ + '-D__INTEL_COMPILER', + '-D__MKL' + ]) + fcflags.extend([ + '-diag-disable 8290,8291,10010,10212,11060', + '-free', + '-fpp' + ]) + # MPI + if '+mpi' in self.spec: + cppflags.extend([ + '-D__parallel', + '-D__SCALAPACK' + ]) + ldflags.extend([ + '-L' + spec['scalapack'].prefix.lib + ]) + libs.extend(spec['scalapack'].scalapack_shared_libs) + + # LAPACK / BLAS + ldflags.extend([ + '-L' + spec['lapack'].prefix.lib, + '-L' + spec['blas'].prefix.lib + ]) + libs.extend([ + join_path(spec['fftw'].prefix.lib, 'libfftw3.so'), + spec['lapack'].lapack_shared_lib, + spec['blas'].blas_shared_lib + ]) + + # Write compiler flags to file + mkf.write('CPPFLAGS = {0}\n'.format(' '.join(cppflags))) + mkf.write('FCFLAGS = {0}\n'.format(' '.join(fcflags))) + mkf.write('LDFLAGS = {0}\n'.format(' '.join(ldflags))) + mkf.write('LIBS = {0}\n'.format(' '.join(libs))) + + with working_dir('makefiles'): + # Apparently the Makefile bases its paths on PWD + # so we need to set PWD = os.getcwd() + pwd_backup = env['PWD'] + env['PWD'] = os.getcwd() + make('ARCH={0}'.format(cp2k_architecture), + 'VERSION={0}'.format(cp2k_version)) + env['PWD'] = pwd_backup + exe_dir = join_path('exe', cp2k_architecture) + shutil.copytree(exe_dir, self.prefix.bin) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 65fef57559..b339e068bf 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -62,10 +62,10 @@ class Hypre(Package): '--prefix=%s' % prefix, '--with-lapack-libs=%s' % to_lib_name( spec['lapack'].lapack_shared_lib), - '--with-lapack-lib-dirs=%s/lib' % spec['lapack'].prefix, + '--with-lapack-lib-dirs=%s' % spec['lapack'].prefix.lib, '--with-blas-libs=%s' % to_lib_name( spec['blas'].blas_shared_lib), - '--with-blas-lib-dirs=%s/lib' % spec['blas'].prefix + '--with-blas-lib-dirs=%s' % spec['blas'].prefix.lib ] if '+shared' in self.spec: diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index 593a6d8340..794966f1c3 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -25,7 +25,7 @@ # # Author: Justin Too <too1@llnl.gov> # -import distutils +import distutils.dir_util import spack from spack import * diff --git a/var/spack/repos/builtin/packages/libhio/package.py b/var/spack/repos/builtin/packages/libhio/package.py new file mode 100644 index 0000000000..17bd86d310 --- /dev/null +++ b/var/spack/repos/builtin/packages/libhio/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Libhio(Package): + """ + A library for writing to hierarchical data store systems. + """ + + homepage = "https://github.com/hpc/libhio/" + url = "https://github.com/hpc/libhio/releases/download/hio.1.3.0.1/libhio-1.3.0.1.tar.gz" + + version('1.3.0.1', 'c073541de8dd70aeb8878bd00d6d877f') + + depends_on("libjson-c") + depends_on("bzip2") + depends_on("pkg-config", type="build") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py new file mode 100644 index 0000000000..a736490600 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -0,0 +1,66 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Libxsmm(Package): + '''LIBXSMM is a library for small dense and small sparse matrix-matrix + multiplications targeting Intel Architecture (x86).''' + + homepage = 'https://github.com/hfp/libxsmm' + url = 'https://github.com/hfp/libxsmm/archive/1.4.3.tar.gz' + + version('1.4.3', '9839bf0fb8be7badf1e97ce4c817149b') + version('1.4.2', 'ea025761437f3b5c936821b9ca21ec31') + version('1.4.1', '71648500ea4510529845d329091917df') + version('1.4', 'b42f91bf5285e7ad0463446e55ebdc2b') + + def patch(self): + kwargs = {'ignore_absent': False, 'backup': False, 'string': True} + makefile = FileFilter('Makefile.inc') + + # Spack sets CC, CXX, and FC to point to the compiler wrappers + # Don't let Makefile.inc overwrite these + makefile.filter('CC = icc', 'CC ?= icc', **kwargs) + makefile.filter('CC = gcc', 'CC ?= gcc', **kwargs) + makefile.filter('CXX = icpc', 'CXX ?= icpc', **kwargs) + makefile.filter('CXX = g++', 'CXX ?= g++', **kwargs) + makefile.filter('FC = ifort', 'FC ?= ifort', **kwargs) + makefile.filter('FC = gfortran', 'FC ?= gfortran', **kwargs) + + def manual_install(self, prefix): + install_tree('include', prefix.include) + install_tree('lib', prefix.lib) + install_tree('documentation', prefix.share + '/libxsmm/doc') + + def install(self, spec, prefix): + make_args = [ + 'ROW_MAJOR=0', + 'INDICES_M={0}'.format(' '.join(str(i) for i in range(1, 25))), + 'INDICES_N={0}'.format(' '.join(str(i) for i in range(1, 25))), + 'INDICES_K={0}'.format(' '.join(str(i) for i in range(1, 25))) + ] + make(*make_args) + self.manual_install(prefix) diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py index 6ea64f5313..71a233ff3e 100644 --- a/var/spack/repos/builtin/packages/mkl/package.py +++ b/var/spack/repos/builtin/packages/mkl/package.py @@ -12,9 +12,9 @@ class Mkl(IntelInstaller): mirror, see http://software.llnl.gov/spack/mirrors.html. To set the threading layer at run time set MKL_THREADING_LAYER - variable to one of the following values: INTEL, SEQUENTIAL, PGI. + variable to one of the following values: INTEL (default), SEQUENTIAL, PGI. To set interface layer at run time, use set the MKL_INTERFACE_LAYER - variable to LP64 or ILP64. + variable to LP64 (default) or ILP64. """ homepage = "https://software.intel.com/en-us/intel-mkl" @@ -38,6 +38,13 @@ class Mkl(IntelInstaller): for f in os.listdir(mkl_dir): os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f)) + # Unfortunately MKL libs are natively distrubted in prefix/lib/intel64. + # To make MKL play nice with Spack, symlink all files to prefix/lib: + mkl_lib_dir = os.path.join(prefix, "lib", "intel64") + for f in os.listdir(mkl_lib_dir): + os.symlink(os.path.join(mkl_lib_dir, f), + os.path.join(self.prefix, "lib", f)) + def setup_dependent_package(self, module, dspec): # For now use Single Dynamic Library: # To set the threading layer at run time, use the @@ -53,6 +60,7 @@ class Mkl(IntelInstaller): name = 'libmkl_rt.%s' % dso_suffix libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib) + # Now set blas/lapack libs: self.spec.blas_shared_lib = join_path(libdir, name) self.spec.lapack_shared_lib = self.spec.blas_shared_lib diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py index ff551d0b92..8f592342b0 100644 --- a/var/spack/repos/builtin/packages/opencv/package.py +++ b/var/spack/repos/builtin/packages/opencv/package.py @@ -23,51 +23,186 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +from glob import glob class Opencv(Package): + """OpenCV is released under a BSD license and hence it's free for both + academic and commercial use. It has C++, C, Python and Java interfaces and + supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for + computational efficiency and with a strong focus on real-time applications. + Written in optimized C/C++, the library can take advantage of multi-core + processing. Enabled with OpenCL, it can take advantage of the hardware + acceleration of the underlying heterogeneous compute platform. Adopted all + around the world, OpenCV has more than 47 thousand people of user community + and estimated number of downloads exceeding 9 million. Usage ranges from + interactive art, to mines inspection, stitching maps on the web or through + advanced robotics. """ - OpenCV is released under a BSD license and hence it's free for both academic and commercial use. It has C++, C, - Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for - computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library - can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware - acceleration of the underlying heterogeneous compute platform. Adopted all around the world, OpenCV has more than - 47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from - interactive art, to mines inspection, stitching maps on the web or through advanced robotics. - """ + homepage = 'http://opencv.org/' url = 'https://github.com/Itseez/opencv/archive/3.1.0.tar.gz' version('3.1.0', '70e1dd07f0aa06606f1bc0e3fa15abd3') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('debug', default=False, + description='Builds a debug version of the libraries') variant('eigen', default=True, description='Activates support for eigen') variant('ipp', default=True, description='Activates support for IPP') + variant('jasper', default=True, description='Activates support for JasPer') + variant('cuda', default=False, description='Activates support for CUDA') + variant('gtk', default=False, description='Activates support for GTK') + variant('vtk', default=False, description='Activates support for VTK') + variant('qt', default=False, description='Activates support for QT') + variant('python', default=False, + description='Enables the build of Python extensions') + variant('java', default=False, + description='Activates support for Java') + + depends_on('cmake', type='build') + depends_on('eigen', when='+eigen', type='build') depends_on('zlib') depends_on('libpng') depends_on('libjpeg-turbo') depends_on('libtiff') - depends_on('python') - depends_on('py-numpy') + depends_on('jasper', when='+jasper') + depends_on('cuda', when='+cuda') + depends_on('gtkplus', when='+gtk') + depends_on('vtk', when='+vtk') + depends_on('qt', when='+qt') + depends_on('jdk', when='+java') + depends_on('py-numpy', when='+python') - depends_on('eigen', when='+eigen', type='build') - depends_on('cmake', type='build') - - # FIXME : GUI extensions missing - # FIXME : CUDA extensions still missing + extends('python', when='+python') def install(self, spec, prefix): cmake_options = [] cmake_options.extend(std_cmake_args) - cmake_options.extend(['-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), - '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), - '-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF', - '-DWITH_IPP:BOOL=%s' % ('ON' if '+ipp' in spec else 'OFF')]) + cmake_options.extend([ + '-DCMAKE_BUILD_TYPE:STRING={0}'.format(( + 'Debug' if '+debug' in spec else 'Release')), + '-DBUILD_SHARED_LIBS:BOOL={0}'.format(( + 'ON' if '+shared' in spec else 'OFF')), + '-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF', + '-DWITH_IPP:BOOL={0}'.format(( + 'ON' if '+ipp' in spec else 'OFF')), + '-DWITH_CUDA:BOOL={0}'.format(( + 'ON' if '+cuda' in spec else 'OFF')), + '-DWITH_QT:BOOL={0}'.format(( + 'ON' if '+qt' in spec else 'OFF')), + '-DWITH_VTK:BOOL={0}'.format(( + 'ON' if '+vtk' in spec else 'OFF')), + '-DBUILD_opencv_java:BOOL={0}'.format(( + 'ON' if '+java' in spec else 'OFF')), + ]) + + # Media I/O + zlib = spec['zlib'] + cmake_options.extend([ + '-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(zlib.prefix.lib, + 'libz.{0}'.format(dso_suffix))), + '-DZLIB_INCLUDE_DIR:PATH={0}'.format(zlib.prefix.include) + ]) + + libpng = spec['libpng'] + cmake_options.extend([ + '-DPNG_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(libpng.prefix.lib, + 'libpng.{0}'.format(dso_suffix))), + '-DPNG_INCLUDE_DIR:PATH={0}'.format(libpng.prefix.include) + ]) + + libjpeg = spec['libjpeg-turbo'] + cmake_options.extend([ + '-DJPEG_LIBRARY:FILEPATH={0}'.format( + join_path(libjpeg.prefix.lib, + 'libjpeg.{0}'.format(dso_suffix))), + '-DJPEG_INCLUDE_DIR:PATH={0}'.format(libjpeg.prefix.include) + ]) + + libtiff = spec['libtiff'] + cmake_options.extend([ + '-DTIFF_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(libtiff.prefix.lib, + 'libtiff.{0}'.format(dso_suffix))), + '-DTIFF_INCLUDE_DIR:PATH={0}'.format(libtiff.prefix.include) + ]) + + jasper = spec['jasper'] + cmake_options.extend([ + '-DJASPER_LIBRARY_{0}:FILEPATH={1}'.format(( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + join_path(jasper.prefix.lib, + 'libjasper.{0}'.format(dso_suffix))), + '-DJASPER_INCLUDE_DIR:PATH={0}'.format(jasper.prefix.include) + ]) + + # GUI + if '+gtk' not in spec: + cmake_options.extend([ + '-DWITH_GTK:BOOL=OFF', + '-DWITH_GTK_2_X:BOOL=OFF' + ]) + elif '^gtkplus@3:' in spec: + cmake_options.extend([ + '-DWITH_GTK:BOOL=ON', + '-DWITH_GTK_2_X:BOOL=OFF' + ]) + elif '^gtkplus@2:3' in spec: + cmake_options.extend([ + '-DWITH_GTK:BOOL=OFF', + '-DWITH_GTK_2_X:BOOL=ON' + ]) + + # Python + if '+python' in spec: + python = spec['python'] + + try: + python_lib = glob(join_path( + python.prefix.lib, 'libpython*.{0}'.format(dso_suffix)))[0] + except KeyError: + raise InstallError('Cannot find libpython') + + try: + python_include_dir = glob(join_path(python.prefix.include, + 'python*'))[0] + except KeyError: + raise InstallError('Cannot find python include directory') + + if '^python@3:' in spec: + python_exe = join_path(python.prefix.bin, 'python3') + cmake_options.extend([ + '-DBUILD_opencv_python3=ON', + '-DPYTHON3_EXECUTABLE={0}'.format(python_exe), + '-DPYTHON3_LIBRARY={0}'.format(python_lib), + '-DPYTHON3_INCLUDE_DIR={0}'.format(python_include_dir), + '-DBUILD_opencv_python2=OFF', + ]) + elif '^python@2:3' in spec: + python_exe = join_path(python.prefix.bin, 'python2') + cmake_options.extend([ + '-DBUILD_opencv_python2=ON', + '-DPYTHON2_EXECUTABLE={0}'.format(python_exe), + '-DPYTHON2_LIBRARY={0}'.format(python_lib), + '-DPYTHON2_INCLUDE_DIR={0}'.format(python_include_dir), + '-DBUILD_opencv_python3=OFF', + ]) + else: + cmake_options.extend([ + '-DBUILD_opencv_python2=OFF', + '-DBUILD_opencv_python3=OFF' + ]) with working_dir('spack_build', create=True): cmake('..', *cmake_options) diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 7170c65303..c58d563682 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -41,6 +41,7 @@ class Pgi(Package): homepage = "http://www.pgroup.com/" url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() + version('16.5', 'a40e8852071b5d600cb42f31631b3de1') version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') variant('network', default=True, diff --git a/var/spack/repos/builtin/packages/r-boot/package.py b/var/spack/repos/builtin/packages/r-boot/package.py new file mode 100644 index 0000000000..1f2f541fec --- /dev/null +++ b/var/spack/repos/builtin/packages/r-boot/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RBoot(Package): + """Functions and datasets for bootstrapping from the book "Bootstrap + Methods and Their Application" by A. C. Davison and D. V. Hinkley (1997, + CUP), originally written by Angelo Canty for S.""" + + homepage = "https://cran.r-project.org/package=boot" + url = "https://cran.r-project.org/src/contrib/boot_1.3-18.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/boot" + + version('1.3-18', '711dd58af14e1027eb8377d9202e9b6f') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-brew/package.py b/var/spack/repos/builtin/packages/r-brew/package.py new file mode 100644 index 0000000000..111606d576 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-brew/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RBrew(Package): + """brew implements a templating framework for mixing text and R code for + report generation. brew template syntax is similar to PHP, Ruby's erb + module, Java Server Pages, and Python's psp module.""" + + homepage = "https://cran.r-project.org/package=brew" + url = "https://cran.r-project.org/src/contrib/brew_1.0-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/brew" + + version('1.0-6', '4aaca5e6ec145e0fc0fe6375ce1f3806') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-car/package.py b/var/spack/repos/builtin/packages/r-car/package.py new file mode 100644 index 0000000000..f4a3824983 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-car/package.py @@ -0,0 +1,48 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCar(Package): + """Functions and Datasets to Accompany J. Fox and S. Weisberg, An R + Companion to Applied Regression, Second Edition, Sage, 2011.""" + + homepage = "https://r-forge.r-project.org/projects/car/" + url = "https://cran.r-project.org/src/contrib/car_2.1-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/car" + + version('2.1-2', '0f78ad74ef7130126d319acec23951a0') + + extends('R') + + depends_on('r-mass', type=nolink) + depends_on('r-mgcv', type=nolink) + depends_on('r-nnet', type=nolink) + depends_on('r-pbkrtest', type=nolink) + depends_on('r-quantreg', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-caret/package.py b/var/spack/repos/builtin/packages/r-caret/package.py new file mode 100644 index 0000000000..460526c7d3 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-caret/package.py @@ -0,0 +1,50 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCaret(Package): + """Misc functions for training and plotting classification and regression + models.""" + + homepage = "https://github.com/topepo/caret/" + url = "https://cran.r-project.org/src/contrib/caret_6.0-70.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/caret" + + version('6.0-70', '202d7abb6a679af716ea69fb2573f108') + + extends('R') + + depends_on('r-lattice', type=nolink) + depends_on('r-ggplot2', type=nolink) + depends_on('r-car', type=nolink) + depends_on('r-foreach', type=nolink) + depends_on('r-plyr', type=nolink) + depends_on('r-nlme', type=nolink) + depends_on('r-reshape2', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-chron/package.py b/var/spack/repos/builtin/packages/r-chron/package.py new file mode 100644 index 0000000000..9cd9d76e9e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-chron/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RChron(Package): + """Chronological objects which can handle dates and times.""" + + homepage = "https://cran.r-project.org/package=chron" + url = "https://cran.r-project.org/src/contrib/chron_2.3-47.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/chron" + + version('2.3-47', 'b8890cdc5f2337f8fd775b0becdcdd1f') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-class/package.py b/var/spack/repos/builtin/packages/r-class/package.py new file mode 100644 index 0000000000..f541ea3611 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-class/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RClass(Package): + """Various functions for classification, including k-nearest neighbour, + Learning Vector Quantization and Self-Organizing Maps.""" + + homepage = "http://www.stats.ox.ac.uk/pub/MASS4/" + url = "https://cran.r-project.org/src/contrib/class_7.3-14.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/class" + + version('7.3-14', '6a21dd206fe4ea29c55faeb65fb2b71e') + + extends('R') + + depends_on('r-mass', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-crayon/package.py b/var/spack/repos/builtin/packages/r-crayon/package.py new file mode 100644 index 0000000000..1e0befbca9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-crayon/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCrayon(Package): + """Colored terminal output on terminals that support 'ANSI' color and + highlight codes. It also works in 'Emacs' 'ESS'. 'ANSI' color support is + automatically detected. Colors and highlighting can be combined and nested. + New styles can also be created easily. This package was inspired by the + 'chalk' 'JavaScript' project.""" + + homepage = "https://github.com/gaborcsardi/crayon" + url = "https://cran.r-project.org/src/contrib/crayon_1.3.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/crayon" + + version('1.3.2', 'fe29c6204d2d6ff4c2f9d107a03d0cb9') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-cubature/package.py b/var/spack/repos/builtin/packages/r-cubature/package.py new file mode 100644 index 0000000000..1d8f837922 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-cubature/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCubature(Package): + """Adaptive multivariate integration over hypercubes""" + + homepage = "https://cran.r-project.org/package=cubature" + url = "https://cran.r-project.org/src/contrib/cubature_1.1-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/cubature" + + version('1.1-2', '5617e1d82baa803a3814d92461da45c9') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py index c6e8f22a94..24c0eadb2d 100644 --- a/var/spack/repos/builtin/packages/r-curl/package.py +++ b/var/spack/repos/builtin/packages/r-curl/package.py @@ -38,8 +38,9 @@ class RCurl(Package): homepage = "https://github.com/jeroenooms/curl" url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/RCurl" + list_url = "https://cran.r-project.org/src/contrib/Archive/curl" + version('1.0', '93d34926d6071e1fba7e728b482f0dd9') version('0.9.7', 'a101f7de948cb828fef571c730f39217') extends('R') diff --git a/var/spack/repos/builtin/packages/r-datatable/package.py b/var/spack/repos/builtin/packages/r-datatable/package.py new file mode 100644 index 0000000000..8b50643341 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-datatable/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RDatatable(Package): + """Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, + fast add/modify/delete of columns by group using no copies at all, list + columns and a fast file reader (fread). Offers a natural and flexible + syntax, for faster development.""" + + homepage = "https://github.com/Rdatatable/data.table/wiki" + url = "https://cran.r-project.org/src/contrib/data.table_1.9.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/data.table" + + version('1.9.6', 'b1c0c7cce490bdf42ab288541cc55372') + + extends('R') + + depends_on('r-chron') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-e1071/package.py b/var/spack/repos/builtin/packages/r-e1071/package.py new file mode 100644 index 0000000000..c2e7166403 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-e1071/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RE1071(Package): + """Functions for latent class analysis, short time Fourier transform, fuzzy + clustering, support vector machines, shortest path computation, bagged + clustering, naive Bayes classifier, ...""" + + homepage = "https://cran.r-project.org/package=e1071" + url = "https://cran.r-project.org/src/contrib/e1071_1.6-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/e1071" + + version('1.6-7', 'd109a7e3dd0c905d420e327a9a921f5a') + + extends('R') + + depends_on('r-class', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-gdata/package.py b/var/spack/repos/builtin/packages/r-gdata/package.py new file mode 100644 index 0000000000..0a09a1145b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gdata/package.py @@ -0,0 +1,59 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RGdata(Package): + """Various R programming tools for data manipulation, including: - medical + unit conversions ('ConvertMedUnits', 'MedUnits'), - combining objects + ('bindData', 'cbindX', 'combine', 'interleave'), - character vector + operations ('centerText', 'startsWith', 'trim'), - factor manipulation + ('levels', 'reorder.factor', 'mapLevels'), - obtaining information about R + objects ('object.size', 'elem', 'env', 'humanReadable', 'is.what', 'll', + 'keep', 'ls.funs', 'Args','nPairs', 'nobs'), - manipulating MS-Excel + formatted files ('read.xls', 'installXLSXsupport', 'sheetCount', + 'xlsFormats'), - generating fixed-width format files ('write.fwf'), - + extricating components of date & time objects ('getYear', 'getMonth', + 'getDay', 'getHour', 'getMin', 'getSec'), - operations on columns of data + frames ('matchcols', 'rename.vars'), - matrix operations ('unmatrix', + 'upperTriangle', 'lowerTriangle'), - operations on vectors ('case', + 'unknownToNA', 'duplicated2', 'trimSum'), - operations on data frames + ('frameApply', 'wideByFactor'), - value of last evaluated expression + ('ans'), and - wrapper for 'sample' that ensures consistent behavior for + both scalar and vector arguments ('resample').""" + + homepage = "https://cran.r-project.org/package=gdata" + url = "https://cran.r-project.org/src/contrib/gdata_2.17.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gdata" + + version('2.17.0', 'c716b663b9dc16ad8cafe6acc781a75f') + + extends('R') + + depends_on('r-gtools', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-geosphere/package.py b/var/spack/repos/builtin/packages/r-geosphere/package.py new file mode 100644 index 0000000000..21ae07fd41 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-geosphere/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RGeosphere(Package): + """Spherical trigonometry for geographic applications. That is, compute + distances and related measures for angular (longitude/latitude) + locations.""" + + homepage = "https://cran.r-project.org/package=geosphere" + url = "https://cran.r-project.org/src/contrib/geosphere_1.5-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/geosphere" + + version('1.5-5', '28efb7a8e266c7f076cdbcf642455f3e') + + extends('R') + + depends_on('r-sp', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-ggmap/package.py b/var/spack/repos/builtin/packages/r-ggmap/package.py new file mode 100644 index 0000000000..2dfca19b51 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ggmap/package.py @@ -0,0 +1,57 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RGgmap(Package): + """A collection of functions to visualize spatial data and models on top of + static maps from various online sources (e.g Google Maps and Stamen Maps). + It includes tools common to those tasks, including functions for + geolocation and routing.""" + + homepage = "https://github.com/dkahle/ggmap" + url = "https://cran.r-project.org/src/contrib/ggmap_2.6.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ggmap" + + version('2.6.1', '25ad414a3a1c6d59a227a9f22601211a') + + extends('R') + + depends_on('r-ggplot2', type=nolink) + depends_on('r-proto', type=nolink) + depends_on('r-rgooglemaps', type=nolink) + depends_on('r-png', type=nolink) + depends_on('r-plyr', type=nolink) + depends_on('r-reshape2', type=nolink) + depends_on('r-rjson', type=nolink) + depends_on('r-mapproj', type=nolink) + depends_on('r-jpeg', type=nolink) + depends_on('r-geosphere', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-scales', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-glmnet/package.py b/var/spack/repos/builtin/packages/r-glmnet/package.py new file mode 100644 index 0000000000..af6e1d1b63 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-glmnet/package.py @@ -0,0 +1,49 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RGlmnet(Package): + """Extremely efficient procedures for fitting the entire lasso or + elastic-net regularization path for linear regression, logistic and + multinomial regression models, Poisson regression and the Cox model. Two + recent additions are the multiple-response Gaussian, and the grouped + multinomial. The algorithm uses cyclical coordinate descent in a path-wise + fashion, as described in the paper linked to via the URL below.""" + + homepage = "http://www.jstatsoft.org/v33/i01/" + url = "https://cran.r-project.org/src/contrib/glmnet_2.0-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/glmnet" + + version('2.0-5', '049b18caa29529614cd684db3beaec2a') + + extends('R') + + depends_on('r-matrix', type=nolink) + depends_on('r-foreach', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-gtools/package.py b/var/spack/repos/builtin/packages/r-gtools/package.py new file mode 100644 index 0000000000..367bb30f87 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-gtools/package.py @@ -0,0 +1,60 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RGtools(Package): + """Functions to assist in R programming, including: - assist in developing, + updating, and maintaining R and R packages ('ask', 'checkRVersion', + 'getDependencies', 'keywords', 'scat'), - calculate the logit and inverse + logit transformations ('logit', 'inv.logit'), - test if a value is missing, + empty or contains only NA and NULL values ('invalid'), - manipulate R's + .Last function ('addLast'), - define macros ('defmacro'), - detect odd and + even integers ('odd', 'even'), - convert strings containing non-ASCII + characters (like single quotes) to plain ASCII ('ASCIIfy'), - perform a + binary search ('binsearch'), - sort strings containing both numeric and + character components ('mixedsort'), - create a factor variable from the + quantiles of a continuous variable ('quantcut'), - enumerate permutations + and combinations ('combinations', 'permutation'), - calculate and convert + between fold-change and log-ratio ('foldchange', 'logratio2foldchange', + 'foldchange2logratio'), - calculate probabilities and generate random + numbers from Dirichlet distributions ('rdirichlet', 'ddirichlet'), - apply + a function over adjacent subsets of a vector ('running'), - modify the + TCP\_NODELAY ('de-Nagle') flag for socket objects, - efficient 'rbind' of + data frames, even if the column names don't match ('smartbind'), - generate + significance stars from p-values ('stars.pval'), - convert characters + to/from ASCII codes.""" + + homepage = "https://cran.r-project.org/package=gtools" + url = "https://cran.r-project.org/src/contrib/gtools_3.5.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/gtools" + + version('3.5.0', '45f8800c0336d35046641fbacc56bdbb') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-jpeg/package.py b/var/spack/repos/builtin/packages/r-jpeg/package.py new file mode 100644 index 0000000000..ef940720f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-jpeg/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RJpeg(Package): + """This package provides an easy and simple way to read, write and display + bitmap images stored in the JPEG format. It can read and write both files + and in-memory raw vectors.""" + + homepage = "http://www.rforge.net/jpeg/" + url = "https://cran.r-project.org/src/contrib/jpeg_0.1-8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/jpeg" + + version('0.1-8', '696007451d14395b1ed1d0e9af667a57') + + extends('R') + + depends_on('jpeg') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-lme4/package.py b/var/spack/repos/builtin/packages/r-lme4/package.py new file mode 100644 index 0000000000..c52d9d0e27 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lme4/package.py @@ -0,0 +1,53 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RLme4(Package): + """Fit linear and generalized linear mixed-effects models. The models and + their components are represented using S4 classes and methods. The core + computational algorithms are implemented using the 'Eigen' C++ library for + numerical linear algebra and 'RcppEigen' "glue".""" + + homepage = "https://github.com/lme4/lme4/" + url = "https://cran.r-project.org/src/contrib/lme4_1.1-12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lme4" + + version('1.1-12', 'da8aaebb67477ecb5631851c46207804') + + extends('R') + + depends_on('r-matrix', type=nolink) + depends_on('r-mass', type=nolink) + depends_on('r-lattice', type=nolink) + depends_on('r-nlme', type=nolink) + depends_on('r-minqa', type=nolink) + depends_on('r-nloptr', type=nolink) + depends_on('r-rcpp', type=nolink) + depends_on('r-rcppeigen', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-lmtest/package.py b/var/spack/repos/builtin/packages/r-lmtest/package.py new file mode 100644 index 0000000000..31a36f1f7e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lmtest/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RLmtest(Package): + """A collection of tests, data sets, and examples for diagnostic checking + in linear regression models. Furthermore, some generic tools for inference + in parametric models are provided.""" + + homepage = "https://cran.r-project.org/package=lmtest" + url = "https://cran.r-project.org/src/contrib/lmtest_0.9-34.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lmtest" + + version('0.9-34', 'fcdf7286bb5ccc2ca46be00bf25ac2fe') + + extends('R') + + depends_on('r-zoo', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-mapproj/package.py b/var/spack/repos/builtin/packages/r-mapproj/package.py new file mode 100644 index 0000000000..0f8bbe199b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mapproj/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMapproj(Package): + """Converts latitude/longitude into projected coordinates.""" + + homepage = "https://cran.r-project.org/package=mapproj" + url = "https://cran.r-project.org/src/contrib/mapproj_1.2-4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mapproj" + + version('1.2-4', '10e22bde1c790e1540672f15ddcaee71') + + extends('R') + + depends_on('r-maps', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-maps/package.py b/var/spack/repos/builtin/packages/r-maps/package.py new file mode 100644 index 0000000000..1e0bfd2d43 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-maps/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMaps(Package): + """Display of maps. Projection code and larger maps are in separate + packages ('mapproj' and 'mapdata').""" + + homepage = "https://cran.r-project.org/" + url = "https://cran.r-project.org/src/contrib/maps_3.1.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/maps" + + version('3.1.1', 'ff045eccb6d5a658db5a539116ddf764') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-maptools/package.py b/var/spack/repos/builtin/packages/r-maptools/package.py new file mode 100644 index 0000000000..8d045a4ed4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-maptools/package.py @@ -0,0 +1,49 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMaptools(Package): + """Set of tools for manipulating and reading geographic data, in particular + ESRI shapefiles; C code used from shapelib. It includes binary access to + GSHHG shoreline files. The package also provides interface wrappers for + exchanging spatial objects with packages such as PBSmapping, spatstat, + maps, RArcInfo, Stata tmap, WinBUGS, Mondrian, and others.""" + + homepage = "http://r-forge.r-project.org/projects/maptools/" + url = "https://cran.r-project.org/src/contrib/maptools_0.8-39.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/maptools" + + version('0.8-39', '3690d96afba8ef22c8e27ae540ffb836') + + extends('R') + + depends_on('r-sp', type=nolink) + depends_on('r-foreign', type=nolink) + depends_on('r-lattice', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-matrixmodels/package.py b/var/spack/repos/builtin/packages/r-matrixmodels/package.py new file mode 100644 index 0000000000..3cdce6fea6 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-matrixmodels/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMatrixmodels(Package): + """Modelling with sparse and dense 'Matrix' matrices, using modular + prediction and response module classes.""" + + homepage = "http://matrix.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/MatrixModels_0.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/MatrixModels" + + version('0.4-1', '65b3ab56650c62bf1046a3eb1f1e19a0') + + extends('R') + + depends_on('r-matrix', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-mgcv/package.py b/var/spack/repos/builtin/packages/r-mgcv/package.py new file mode 100644 index 0000000000..4c49462ba2 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mgcv/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMgcv(Package): + """GAMs, GAMMs and other generalized ridge regression with multiple + smoothing parameter estimation by GCV, REML or UBRE/AIC. Includes a gam() + function, a wide variety of smoothers, JAGS support and distributions + beyond the exponential family.""" + + homepage = "https://cran.r-project.org/package=mgcv" + url = "https://cran.r-project.org/src/contrib/mgcv_1.8-13.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mgcv" + + version('1.8-13', '30607be3aaf44b13bd8c81fc32e8c984') + + extends('R') + + depends_on('r-nlme', type=nolink) + depends_on('r-matrix', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-minqa/package.py b/var/spack/repos/builtin/packages/r-minqa/package.py new file mode 100644 index 0000000000..16cff20b41 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-minqa/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMinqa(Package): + """Derivative-free optimization by quadratic approximation based on an + interface to Fortran implementations by M. J. D. Powell.""" + + homepage = "http://optimizer.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/minqa_1.2.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/minqa" + + version('1.2.4', 'bcaae4fdba60a33528f2116e2fd51105') + + extends('R') + + depends_on('r-rcpp', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-multcomp/package.py b/var/spack/repos/builtin/packages/r-multcomp/package.py new file mode 100644 index 0000000000..54416502d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-multcomp/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMultcomp(Package): + """Simultaneous tests and confidence intervals for general linear + hypotheses in parametric models, including linear, generalized linear, + linear mixed effects, and survival models. The package includes demos + reproducing analyzes presented in the book "Multiple Comparisons Using R" + (Bretz, Hothorn, Westfall, 2010, CRC Press).""" + + homepage = "http://multcomp.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/multcomp_1.4-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/multcomp" + + version('1.4-6', 'f1353ede2ed78b23859a7f1f1f9ebe88') + + extends('R') + + depends_on('r-mvtnorm', type=nolink) + depends_on('r-survival', type=nolink) + depends_on('r-thdata', type=nolink) + depends_on('r-sandwich', type=nolink) + depends_on('r-codetools', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-mvtnorm/package.py b/var/spack/repos/builtin/packages/r-mvtnorm/package.py new file mode 100644 index 0000000000..b3f7db60c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mvtnorm/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMvtnorm(Package): + """Computes multivariate normal and t probabilities, quantiles, random + deviates and densities.""" + + homepage = "http://mvtnorm.r-forge.r-project.org/" + url = "https://cran.r-project.org/src/contrib/mvtnorm_1.0-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mvtnorm" + + version('1.0-5', '5894dd3969bbfa26f4862c45f9a48a52') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-ncdf4/package.py b/var/spack/repos/builtin/packages/r-ncdf4/package.py new file mode 100644 index 0000000000..11bf7abb38 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ncdf4/package.py @@ -0,0 +1,56 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RNcdf4(Package): + """Provides a high-level R interface to data files written using Unidata's + netCDF library (version 4 or earlier), which are binary data files that are + portable across platforms and include metadata information in addition to + the data sets. Using this package, netCDF files (either version 4 or + "classic" version 3) can be opened and data sets read in easily. It is also + easy to create new netCDF dimensions, variables, and files, in either + version 3 or 4 format, and manipulate existing netCDF files. This package + replaces the former ncdf package, which only worked with netcdf version 3 + files. For various reasons the names of the functions have had to be + changed from the names in the ncdf package. The old ncdf package is still + available at the URL given below, if you need to have backward + compatibility. It should be possible to have both the ncdf and ncdf4 + packages installed simultaneously without a problem. However, the ncdf + package does not provide an interface for netcdf version 4 files.""" + + homepage = "http://cirrus.ucsd.edu/~pierce/ncdf" + url = "https://cran.r-project.org/src/contrib/ncdf4_1.15.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ncdf4" + + version('1.15', 'cd60dadbae3be31371e1ed40ddeb420a') + + extends('R') + + depends_on('netcdf') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-nlme/package.py b/var/spack/repos/builtin/packages/r-nlme/package.py new file mode 100644 index 0000000000..1b6bb114e1 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nlme/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RNlme(Package): + """Fit and compare Gaussian linear and nonlinear mixed-effects models.""" + + homepage = "https://cran.r-project.org/package=nlme" + url = "https://cran.r-project.org/src/contrib/nlme_3.1-128.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/nlme" + + version('3.1-128', '3d75ae7380bf123761b95a073eb55008') + + extends('R') + + depends_on('r-lattice', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-nloptr/package.py b/var/spack/repos/builtin/packages/r-nloptr/package.py new file mode 100644 index 0000000000..58cb585c49 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nloptr/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RNloptr(Package): + """nloptr is an R interface to NLopt. NLopt is a free/open-source library + for nonlinear optimization, providing a common interface for a number of + different free optimization routines available online as well as original + implementations of various other algorithms. See + http://ab-initio.mit.edu/wiki/index.php/NLopt_Introduction for more + information on the available algorithms. During installation on Unix the + NLopt code is downloaded and compiled from the NLopt website.""" + + homepage = "https://cran.r-project.org/package=nloptr" + url = "https://cran.r-project.org/src/contrib/nloptr_1.0.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/nloptr" + + version('1.0.4', '9af69a613349b236fd377d0a107f484c') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-nnet/package.py b/var/spack/repos/builtin/packages/r-nnet/package.py new file mode 100644 index 0000000000..be048f5ad0 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-nnet/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RNnet(Package): + """Software for feed-forward neural networks with a single hidden layer, + and for multinomial log-linear models.""" + + homepage = "http://www.stats.ox.ac.uk/pub/MASS4/" + url = "https://cran.r-project.org/src/contrib/nnet_7.3-12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/nnet" + + version('7.3-12', 'dc7c6f0d0de53d8fc72b44554400a74e') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-np/package.py b/var/spack/repos/builtin/packages/r-np/package.py new file mode 100644 index 0000000000..bff7d0f195 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-np/package.py @@ -0,0 +1,50 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RNp(Package): + """This package provides a variety of nonparametric (and semiparametric) + kernel methods that seamlessly handle a mix of continuous, unordered, and + ordered factor data types. We would like to gratefully acknowledge support + from the Natural Sciences and Engineering Research Council of Canada + (NSERC:www.nserc.ca), the Social Sciences and Humanities Research Council + of Canada (SSHRC:www.sshrc.ca), and the Shared Hierarchical Academic + Research Computing Network (SHARCNET:www.sharcnet.ca).""" + + homepage = "https://github.com/JeffreyRacine/R-Package-np/" + url = "https://cran.r-project.org/src/contrib/np_0.60-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/np" + + version('0.60-2', 'e094d52ddff7280272b41e6cb2c74389') + + extends('R') + + depends_on('r-boot', type=nolink) + depends_on('r-cubature', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-pbkrtest/package.py b/var/spack/repos/builtin/packages/r-pbkrtest/package.py new file mode 100644 index 0000000000..40b6f96927 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-pbkrtest/package.py @@ -0,0 +1,49 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RPbkrtest(Package): + """Test in mixed effects models. Attention is on mixed effects models as + implemented in the 'lme4' package. This package implements a parametric + bootstrap test and a Kenward Roger modification of F-tests for linear mixed + effects models and a parametric bootstrap test for generalized linear mixed + models.""" + + homepage = "http://people.math.aau.dk/~sorenh/software/pbkrtest/" + url = "https://cran.r-project.org/src/contrib/pbkrtest_0.4-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/pbkrtest" + + version('0.4-6', '0a7d9ff83b8d131af9b2335f35781ef9') + + extends('R') + + depends_on('r-lme4', type=nolink) + depends_on('r-matrix', type=nolink) + depends_on('r-mass', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-plotrix/package.py b/var/spack/repos/builtin/packages/r-plotrix/package.py new file mode 100644 index 0000000000..d1d61dbc4d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-plotrix/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RPlotrix(Package): + """Lots of plots, various labeling, axis and color scaling functions.""" + + homepage = "https://cran.r-project.org/package=plotrix" + url = "https://cran.r-project.org/src/contrib/plotrix_3.6-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/plotrix" + + version('3.6-3', '23e3e022a13a596e9b77b40afcb4a2ef') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-praise/package.py b/var/spack/repos/builtin/packages/r-praise/package.py new file mode 100644 index 0000000000..102d86d2fa --- /dev/null +++ b/var/spack/repos/builtin/packages/r-praise/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RPraise(Package): + """Build friendly R packages that praise their users if they have done + something good, or they just need it to feel better.""" + + homepage = "https://github.com/gaborcsardi/praise" + url = "https://cran.r-project.org/src/contrib/praise_1.0.0.tar.gz" + + version('1.0.0', '9318724cec0454884b5f762bee2da6a1') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-proto/package.py b/var/spack/repos/builtin/packages/r-proto/package.py new file mode 100644 index 0000000000..07ace3ad29 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-proto/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RProto(Package): + """An object oriented system using object-based, also called + prototype-based, rather than class-based object oriented ideas.""" + + homepage = "http://r-proto.googlecode.com/" + url = "https://cran.r-project.org/src/contrib/proto_0.3-10.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/proto" + + version('0.3-10', 'd5523943a5be6ca2f0ab557c900f8212') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-quantmod/package.py b/var/spack/repos/builtin/packages/r-quantmod/package.py new file mode 100644 index 0000000000..ecfbf49055 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-quantmod/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RQuantmod(Package): + """Specify, build, trade, and analyse quantitative financial trading + strategies.""" + + homepage = "http://www.quantmod.com/" + url = "https://cran.r-project.org/src/contrib/quantmod_0.4-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/quantmod" + + version('0.4-5', 'cab3c409e4de3df98a20f1ded60f3631') + + extends('R') + + depends_on('r-xts', type=nolink) + depends_on('r-zoo', type=nolink) + depends_on('r-ttr', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-quantreg/package.py b/var/spack/repos/builtin/packages/r-quantreg/package.py new file mode 100644 index 0000000000..89a26070ba --- /dev/null +++ b/var/spack/repos/builtin/packages/r-quantreg/package.py @@ -0,0 +1,50 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RQuantreg(Package): + """Estimation and inference methods for models of conditional quantiles: + Linear and nonlinear parametric and non-parametric (total variation + penalized) models for conditional quantiles of a univariate response + and several methods for handling censored survival data. Portfolio + selection methods based on expected shortfall risk are also + included.""" + + homepage = "https://cran.r-project.org/package=quantreg" + url = "https://cran.r-project.org/src/contrib/quantreg_5.26.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/quantreg" + + version('5.26', '1d89ed932fb4d67ae2d5da0eb8c2989f') + + extends('R') + + depends_on('r-sparsem', type=nolink) + depends_on('r-matrix', type=nolink) + depends_on('r-matrixmodels', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-randomforest/package.py b/var/spack/repos/builtin/packages/r-randomforest/package.py new file mode 100644 index 0000000000..1066c217f4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-randomforest/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRandomforest(Package): + """Classification and regression based on a forest of trees using random + inputs.""" + + homepage = "https://www.stat.berkeley.edu/~breiman/RandomForests/" + url = "https://cran.r-project.org/src/contrib/randomForest_4.6-12.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/randomForest" + + version('4.6-12', '071c03af974198e861f1475c5bab9e7a') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-rgooglemaps/package.py b/var/spack/repos/builtin/packages/r-rgooglemaps/package.py new file mode 100644 index 0000000000..0d28b68b94 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rgooglemaps/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRgooglemaps(Package): + """This package serves two purposes: (i) Provide a comfortable R interface + to query the Google server for static maps, and (ii) Use the map as a + background image to overlay plots within R. This requires proper coordinate + scaling.""" + + homepage = "https://cran.r-project.org/package=RgoogleMaps" + url = "https://cran.r-project.org/src/contrib/RgoogleMaps_1.2.0.7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RgoogleMaps" + + version('1.2.0.7', '2e1df804f0331b4122d841105f0c7ea5') + + extends('R') + + depends_on('r-png', type=nolink) + depends_on('r-rjsonio', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-rjson/package.py b/var/spack/repos/builtin/packages/r-rjson/package.py new file mode 100644 index 0000000000..94ca45f485 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rjson/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRjson(Package): + """Converts R object into JSON objects and vice-versa.""" + + homepage = "https://cran.r-project.org/package=rjson" + url = "https://cran.r-project.org/src/contrib/rjson_0.2.15.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rjson" + + version('0.2.15', '87d0e29bc179c6aeaf312b138089f8e9') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-rjsonio/package.py b/var/spack/repos/builtin/packages/r-rjsonio/package.py new file mode 100644 index 0000000000..b56dfbe21d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rjsonio/package.py @@ -0,0 +1,55 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRjsonio(Package): + """This is a package that allows conversion to and from data in Javascript + object notation (JSON) format. This allows R objects to be inserted into + Javascript/ECMAScript/ActionScript code and allows R programmers to read + and convert JSON content to R objects. This is an alternative to rjson + package. Originally, that was too slow for converting large R objects to + JSON and was not extensible. rjson's performance is now similar to this + package, and perhaps slightly faster in some cases. This package uses + methods and is readily extensible by defining methods for different + classes, vectorized operations, and C code and callbacks to R functions for + deserializing JSON objects to R. The two packages intentionally share the + same basic interface. This package (RJSONIO) has many additional options to + allow customizing the generation and processing of JSON content. This + package uses libjson rather than implementing yet another JSON parser. The + aim is to support other general projects by building on their work, + providing feedback and benefit from their ongoing development.""" + + homepage = "https://cran.r-project.org/package=RJSONIO" + url = "https://cran.r-project.org/src/contrib/RJSONIO_1.3-0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RJSONIO" + + version('1.3-0', '72c395622ba8d1435ec43849fd32c830') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-roxygen2/package.py b/var/spack/repos/builtin/packages/r-roxygen2/package.py new file mode 100644 index 0000000000..4f4b8dcafa --- /dev/null +++ b/var/spack/repos/builtin/packages/r-roxygen2/package.py @@ -0,0 +1,48 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRoxygen2(Package): + """A 'Doxygen'-like in-source documentation system for Rd, collation, and + 'NAMESPACE' files.""" + + homepage = "https://github.com/klutometis/roxygen" + url = "https://cran.r-project.org/src/contrib/roxygen2_5.0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/roxygen2" + + version('5.0.1', 'df5bdbc12fda372e427710ef1cd92ed7') + + extends('R') + + depends_on('r-stringr', type=nolink) + depends_on('r-stringi', type=nolink) + depends_on('r-brew', type=nolink) + depends_on('r-digest', type=nolink) + depends_on('r-rcpp', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-sandwich/package.py b/var/spack/repos/builtin/packages/r-sandwich/package.py new file mode 100644 index 0000000000..ffd62b1b14 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-sandwich/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RSandwich(Package): + """Model-robust standard error estimators for cross-sectional, time series, + and longitudinal data.""" + + homepage = "https://cran.r-project.org/package=sandwich" + url = "https://cran.r-project.org/src/contrib/sandwich_2.3-4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/sandwich" + + version('2.3-4', 'a621dbd8a57b6e1e036496642aadc2e5') + + extends('R') + + depends_on('r-zoo', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-sparsem/package.py b/var/spack/repos/builtin/packages/r-sparsem/package.py new file mode 100644 index 0000000000..c4dabf5c15 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-sparsem/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RSparsem(Package): + """Some basic linear algebra functionality for sparse matrices is provided: + including Cholesky decomposition and backsolving as well as standard R + subsetting and Kronecker products.""" + + homepage = "http://www.econ.uiuc.edu/~roger/research/sparse/sparse.html" + url = "https://cran.r-project.org/src/contrib/SparseM_1.7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/SparseM" + + version('1.7', '7b5b0ab166a0929ef6dcfe1d97643601') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-survey/package.py b/var/spack/repos/builtin/packages/r-survey/package.py new file mode 100644 index 0000000000..646793f7a4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-survey/package.py @@ -0,0 +1,47 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RSurvey(Package): + """Summary statistics, two-sample tests, rank tests, generalised linear + models, cumulative link models, Cox models, loglinear models, and general + maximum pseudolikelihood estimation for multistage stratified, + cluster-sampled, unequally weighted survey samples. Variances by Taylor + series linearisation or replicate weights. Post-stratification, + calibration, and raking. Two-phase subsampling designs. Graphics. PPS + sampling without replacement. Principal components, factor analysis.""" + + homepage = "http://r-survey.r-forge.r-project.org/survey/" + url = "https://cran.r-project.org/src/contrib/survey_3.30-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/survey" + + version('3.30-3', 'c70cdae9cb43d35abddd11173d64cad0') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-survival/package.py b/var/spack/repos/builtin/packages/r-survival/package.py new file mode 100644 index 0000000000..cfba9298fe --- /dev/null +++ b/var/spack/repos/builtin/packages/r-survival/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RSurvival(Package): + """Contains the core survival analysis routines, including definition of + Surv objects, Kaplan-Meier and Aalen-Johansen (multi-state) curves, Cox + models, and parametric accelerated failure time models.""" + + homepage = "https://cran.r-project.org/package=survival" + url = "https://cran.r-project.org/src/contrib/survival_2.39-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/survival" + + version('2.39-5', 'a3cc6b5762e8c5c0bb9e64a276710be2') + + extends('R') + + depends_on('r-matrix', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-tarifx/package.py b/var/spack/repos/builtin/packages/r-tarifx/package.py new file mode 100644 index 0000000000..a85aa8baef --- /dev/null +++ b/var/spack/repos/builtin/packages/r-tarifx/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RTarifx(Package): + """A collection of various utility and convenience functions.""" + + homepage = "https://cran.r-project.org/package=taRifx" + url = "https://cran.r-project.org/src/contrib/taRifx_1.0.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/taRifx" + + version('1.0.6', '7e782e04bd69d929b29f91553382e6a2') + + extends('R') + + depends_on('r-reshape2', type=nolink) + depends_on('r-plyr', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-testthat/package.py b/var/spack/repos/builtin/packages/r-testthat/package.py new file mode 100644 index 0000000000..60dfd2afcd --- /dev/null +++ b/var/spack/repos/builtin/packages/r-testthat/package.py @@ -0,0 +1,48 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RTestthat(Package): + """A unit testing system designed to be fun, flexible and easy to set + up.""" + + homepage = "https://github.com/hadley/testthat" + url = "https://cran.r-project.org/src/contrib/testthat_1.0.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/testthat" + + version('1.0.2', '6c6a90c8db860292df5784a70e07b8dc') + + extends('R') + + depends_on('r-digest', type=nolink) + depends_on('r-crayon', type=nolink) + depends_on('r-praise', type=nolink) + depends_on('r-magrittr', type=nolink) + depends_on('r-R6', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-thdata/package.py b/var/spack/repos/builtin/packages/r-thdata/package.py new file mode 100644 index 0000000000..e1cf050181 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-thdata/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RThdata(Package): + """Contains data sets used in other packages Torsten Hothorn maintains.""" + + homepage = "https://cran.r-project.org/package=TH.data" + url = "https://cran.r-project.org/src/contrib/TH.data_1.0-7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/TH.data" + + version('1.0-7', '3e8b6b1a4699544f175215aed7039a94') + + extends('R') + + depends_on('r-survival', type=nolink) + depends_on('r-mass', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-ttr/package.py b/var/spack/repos/builtin/packages/r-ttr/package.py new file mode 100644 index 0000000000..c9b40a8262 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ttr/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RTtr(Package): + """Functions and data to construct technical trading rules with R.""" + + homepage = "https://github.com/joshuaulrich/TTR" + url = "https://cran.r-project.org/src/contrib/TTR_0.23-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/TTR" + + version('0.23-1', '35f693ac0d97e8ec742ebea2da222986') + + extends('R') + + depends_on('r-xts', type=nolink) + depends_on('r-zoo', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-vcd/package.py b/var/spack/repos/builtin/packages/r-vcd/package.py new file mode 100644 index 0000000000..06e609b1ef --- /dev/null +++ b/var/spack/repos/builtin/packages/r-vcd/package.py @@ -0,0 +1,50 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RVcd(Package): + """Visualization techniques, data sets, summary and inference procedures + aimed particularly at categorical data. Special emphasis is given to highly + extensible grid graphics. The package was package was originally inspired + by the book "Visualizing Categorical Data" by Michael Friendly and is now + the main support package for a new book, "Discrete Data Analysis with R" by + Michael Friendly and David Meyer (2015).""" + + homepage = "https://cran.r-project.org/package=vcd" + url = "https://cran.r-project.org/src/contrib/vcd_1.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/vcd" + + version('1.4-1', '7db150a77f173f85b69a1f86f73f8f02') + + extends('R') + + depends_on('r-mass', type=nolink) + depends_on('r-colorspace', type=nolink) + depends_on('r-lmtest', type=nolink) + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-xml/package.py b/var/spack/repos/builtin/packages/r-xml/package.py new file mode 100644 index 0000000000..591c887f32 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xml/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RXml(Package): + """Many approaches for both reading and creating XML (and HTML) documents + (including DTDs), both local and accessible via HTTP or FTP. Also offers + access to an 'XPath' "interpreter".""" + + homepage = "http://www.omegahat.net/RSXML" + url = "https://cran.r-project.org/src/contrib/XML_3.98-1.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/XML" + + version('3.98-1', '1a7f3ce6f264eeb109bfa57bedb26c14') + + extends('R') + + depends_on('libxml2') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/tree/package.py b/var/spack/repos/builtin/packages/tree/package.py new file mode 100644 index 0000000000..8e0e176c4c --- /dev/null +++ b/var/spack/repos/builtin/packages/tree/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Tree(Package): + """Tree is a recursive directory listing command that produces a depth + indented listing of files, which is colorized ala dircolors if + the LS_COLORS environment variable is set and output is to + tty. Tree has been ported and reported to work under the + following operating systems: Linux, FreeBSD, OS X, Solaris, + HP/UX, Cygwin, HP Nonstop and OS/2.""" + + homepage = "http://mama.indstate.edu/users/ice/tree/" + url = "http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz" + + version('1.7.0', 'abe3e03e469c542d8e157cdd93f4d8a6') + + def install(self, spec, prefix): + filter_file(r'^prefix =.*', 'prefix = %s' % prefix, 'Makefile') + filter_file(r'^CFLAGS', '# use spack settings instead... CFLAGS', + 'Makefile') + make() + make('install') diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 77589bb8f9..4d1d27e74a 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -138,16 +138,23 @@ class Trilinos(Package): '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=%s' % to_lib_name( spec['lapack'].lapack_shared_lib), - '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, + '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix.lib, '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=%s' % ( - 'ON' if '+hypre' in spec else 'OFF'), - '-DTPL_ENABLE_HDF5:BOOL=%s' % ( - 'ON' if '+hdf5' in spec else 'OFF'), + 'ON' if '+hypre' in spec else 'OFF') ]) + if '+hdf5' in spec: + options.extend([ + '-DTPL_ENABLE_HDF5:BOOL=ON', + '-DHDF5_INCLUDE_DIRS:PATH=%s' % spec['hdf5'].prefix.include, + '-DHDF5_LIBRARY_DIRS:PATH=%s' % spec['hdf5'].prefix.lib + ]) + else: + options.extend(['-DTPL_ENABLE_HDF5:BOOL=OFF']) + if '+boost' in spec: options.extend([ '-DTPL_ENABLE_Boost:BOOL=ON', |