diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index b90a0eea177..e4b10cdf536 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -490,6 +490,21 @@ version.joined 123 Python properties don't need parentheses. ``version.dashed`` is correct. ``version.dashed()`` is incorrect. +In addition, these version properties can be combined with ``up_to()``. +For example: + +.. code-block:: python + + >>> version = Version('1.2.3') + >>> version.up_to(2).dashed + Version('1-2') + >>> version.underscored.up_to(2) + Version('1_2') + + +As you can see, order is not important. Just keep in mind that ``up_to()`` and +the other version properties return ``Version`` objects, not strings. + If a URL cannot be derived systematically, or there is a special URL for one of its versions, you can add an explicit URL for a particular version: diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 1ef38ddc2db..230e12e1f85 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -98,7 +98,9 @@ class AutotoolsPackage(PackageBase): @run_after('autoreconf') def _do_patch_config_guess(self): """Some packages ship with an older config.guess and need to have - this updated when installed on a newer architecture.""" + this updated when installed on a newer architecture. In particular, + config.guess fails for PPC64LE for version prior to a 2013-06-10 + build date (automake 1.13.4).""" if not self.patch_config_guess or not self.spec.satisfies( 'arch=linux-rhel7-ppc64le' @@ -190,20 +192,6 @@ def default_flag_handler(self, spack_env, flag_val): ' '.join(flag_val[1])) return [] - def patch(self): - """Patches config.guess if - :py:attr:``~.AutotoolsPackage.patch_config_guess`` is True - - :raise RuntimeError: if something goes wrong when patching - ``config.guess`` - """ - - if self.patch_config_guess and self.spec.satisfies( - 'arch=linux-rhel7-ppc64le' - ): - if not self._do_patch_config_guess(): - raise RuntimeError('Failed to find suitable config.guess') - @run_before('autoreconf') def delete_configure_to_force_update(self): if self.force_autoreconf: diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index b339858348b..db3240e8a52 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -29,7 +29,7 @@ import spack.build_environment from llnl.util.filesystem import working_dir, join_path -from spack.directives import depends_on +from spack.directives import depends_on, variant from spack.package import PackageBase, run_after @@ -49,11 +49,6 @@ class CMakePackage(PackageBase): +-----------------------------------------------+--------------------+ | **Method** | **Purpose** | +===============================================+====================+ - | :py:meth:`~.CMakePackage.build_type` | Specify the value | - | | for the | - | | CMAKE_BUILD_TYPE | - | | variable | - +-----------------------------------------------+--------------------+ | :py:meth:`~.CMakePackage.root_cmakelists_dir` | Location of the | | | root CMakeLists.txt| +-----------------------------------------------+--------------------+ @@ -74,15 +69,13 @@ class CMakePackage(PackageBase): build_time_test_callbacks = ['check'] + # https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel')) + depends_on('cmake', type='build') - def build_type(self): - """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable - - :return: value for ``CMAKE_BUILD_TYPE`` - """ - return 'RelWithDebInfo' - @property def root_cmakelists_dir(self): """The relative path to the directory containing CMakeLists.txt @@ -108,8 +101,8 @@ def std_cmake_args(self): def _std_args(pkg): """Computes the standard cmake arguments for a generic package""" try: - build_type = pkg.build_type() - except AttributeError: + build_type = pkg.spec.variants['build_type'].value + except KeyError: build_type = 'RelWithDebInfo' args = ['-DCMAKE_INSTALL_PREFIX:PATH={0}'.format(pkg.prefix), diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py index 6789bc0aa3a..41a2fda649d 100644 --- a/lib/spack/spack/test/url_parse.py +++ b/lib/spack/spack/test/url_parse.py @@ -107,7 +107,9 @@ # Combinations of multiple patterns - public ('dakota-6.3-public.src', 'dakota-6.3'), # Combinations of multiple patterns - universal - ('synergy-1.3.6p2-MacOSX-Universal', 'synergy-1.3.6p2') + ('synergy-1.3.6p2-MacOSX-Universal', 'synergy-1.3.6p2'), + # Combinations of multiple patterns - dynamic + ('snptest_v2.5.2_linux_x86_64_dynamic', 'snptest_v2.5.2'), ]) def test_url_strip_version_suffixes(url, expected): stripped = strip_version_suffixes(url) diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index 3b04e1d4aa4..72292e4dcd0 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -204,6 +204,8 @@ def test_underscores(): assert_ver_eq('2_0', '2_0') assert_ver_eq('2.0', '2_0') assert_ver_eq('2_0', '2.0') + assert_ver_eq('2-0', '2_0') + assert_ver_eq('2_0', '2-0') def test_rpm_oddities(): @@ -426,20 +428,56 @@ def test_satisfaction_with_lists(): def test_formatted_strings(): - versions = '1.2.3', '1_2_3', '1-2-3' + versions = ( + '1.2.3b', '1_2_3b', '1-2-3b', + '1.2-3b', '1.2_3b', '1-2.3b', + '1-2_3b', '1_2.3b', '1_2-3b' + ) for item in versions: v = Version(item) - assert v.dotted == '1.2.3' - assert v.dashed == '1-2-3' - assert v.underscored == '1_2_3' - assert v.joined == '123' + assert v.dotted.string == '1.2.3b' + assert v.dashed.string == '1-2-3b' + assert v.underscored.string == '1_2_3b' + assert v.joined.string == '123b' + + assert v.dotted.dashed.string == '1-2-3b' + assert v.dotted.underscored.string == '1_2_3b' + assert v.dotted.dotted.string == '1.2.3b' + assert v.dotted.joined.string == '123b' + + +def test_up_to(): + v = Version('1.23-4_5b') + + assert v.up_to(1).string == '1' + assert v.up_to(2).string == '1.23' + assert v.up_to(3).string == '1.23-4' + assert v.up_to(4).string == '1.23-4_5' + assert v.up_to(5).string == '1.23-4_5b' + + assert v.up_to(-1).string == '1.23-4_5' + assert v.up_to(-2).string == '1.23-4' + assert v.up_to(-3).string == '1.23' + assert v.up_to(-4).string == '1' + + assert v.up_to(2).dotted.string == '1.23' + assert v.up_to(2).dashed.string == '1-23' + assert v.up_to(2).underscored.string == '1_23' + assert v.up_to(2).joined.string == '123' + + assert v.dotted.up_to(2).string == '1.23' == v.up_to(2).dotted.string + assert v.dashed.up_to(2).string == '1-23' == v.up_to(2).dashed.string + assert v.underscored.up_to(2).string == '1_23' + assert v.up_to(2).underscored.string == '1_23' + + assert v.up_to(2).up_to(1).string == '1' def test_repr_and_str(): def check_repr_and_str(vrs): a = Version(vrs) - assert repr(a) == 'Version(\'' + vrs + '\')' + assert repr(a) == "Version('" + vrs + "')" b = eval(repr(a)) assert a == b assert str(a) == vrs @@ -457,17 +495,17 @@ def test_get_item(): b = a[0:2] assert isinstance(b, Version) assert b == Version('0.1') - assert repr(b) == 'Version(\'0.1\')' + assert repr(b) == "Version('0.1')" assert str(b) == '0.1' b = a[0:3] assert isinstance(b, Version) assert b == Version('0.1_2') - assert repr(b) == 'Version(\'0.1_2\')' + assert repr(b) == "Version('0.1_2')" assert str(b) == '0.1_2' b = a[1:] assert isinstance(b, Version) assert b == Version('1_2-3') - assert repr(b) == 'Version(\'1_2-3\')' + assert repr(b) == "Version('1_2-3')" assert str(b) == '1_2-3' # Raise TypeError on tuples with pytest.raises(TypeError): diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index d29ce3d07f8..e3da753a76a 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -177,6 +177,7 @@ def strip_version_suffixes(path): '[Uu]niversal', 'jar', 'complete', + 'dynamic', 'oss', 'gem', 'tar', diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py index 10fac49e9d5..0d8520a0e0a 100644 --- a/lib/spack/spack/version.py +++ b/lib/spack/spack/version.py @@ -130,30 +130,90 @@ def __init__(self, string): self.version = tuple(int_if_int(seg) for seg in segments) # Store the separators from the original version string as well. - # last element of separators is '' - self.separators = tuple(re.split(segment_regex, string)[1:-1]) + self.separators = tuple(re.split(segment_regex, string)[1:]) @property def dotted(self): - return '.'.join(str(x) for x in self.version) + """The dotted representation of the version. + + Example: + >>> version = Version('1-2-3b') + >>> version.dotted + Version('1.2.3b') + + Returns: + Version: The version with separator characters replaced by dots + """ + return Version(self.string.replace('-', '.').replace('_', '.')) @property def underscored(self): - return '_'.join(str(x) for x in self.version) + """The underscored representation of the version. + + Example: + >>> version = Version('1.2.3b') + >>> version.underscored + Version('1_2_3b') + + Returns: + Version: The version with separator characters replaced by + underscores + """ + return Version(self.string.replace('.', '_').replace('-', '_')) @property def dashed(self): - return '-'.join(str(x) for x in self.version) + """The dashed representation of the version. + + Example: + >>> version = Version('1.2.3b') + >>> version.dashed + Version('1-2-3b') + + Returns: + Version: The version with separator characters replaced by dashes + """ + return Version(self.string.replace('.', '-').replace('_', '-')) @property def joined(self): - return ''.join(str(x) for x in self.version) + """The joined representation of the version. + + Example: + >>> version = Version('1.2.3b') + >>> version.joined + Version('123b') + + Returns: + Version: The version with separator characters removed + """ + return Version( + self.string.replace('.', '').replace('-', '').replace('_', '')) def up_to(self, index): - """Return a version string up to the specified component, exclusive. - e.g., if this is 10.8.2, self.up_to(2) will return '10.8'. + """The version up to the specified component. + + Examples: + >>> version = Version('1.23-4b') + >>> version.up_to(1) + Version('1') + >>> version.up_to(2) + Version('1.23') + >>> version.up_to(3) + Version('1.23-4') + >>> version.up_to(4) + Version('1.23-4b') + >>> version.up_to(-1) + Version('1.23-4') + >>> version.up_to(-2) + Version('1.23') + >>> version.up_to(-3) + Version('1') + + Returns: + Version: The first index components of the version """ - return '.'.join(str(x) for x in self[:index]) + return self[:index] def lowest(self): return self @@ -204,11 +264,9 @@ def __getitem__(self, idx): return self.version[idx] elif isinstance(idx, slice): - # Currently len(self.separators) == len(self.version) - 1 - extendend_separators = self.separators + ('',) string_arg = [] - pairs = zip(self.version[idx], extendend_separators[idx]) + pairs = zip(self.version[idx], self.separators[idx]) for token, sep in pairs: string_arg.append(str(token)) string_arg.append(str(sep)) diff --git a/var/spack/repos/builtin/packages/alquimia/package.py b/var/spack/repos/builtin/packages/alquimia/package.py index b8d3f608406..cadea3cb3ca 100644 --- a/var/spack/repos/builtin/packages/alquimia/package.py +++ b/var/spack/repos/builtin/packages/alquimia/package.py @@ -36,8 +36,6 @@ class Alquimia(CMakePackage): variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, - description='Builds a debug version of the libraries') depends_on('mpi') depends_on('hdf5') @@ -52,10 +50,6 @@ def cmake_args(self): options = ['-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc, '-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc, '-DUSE_XSDK_DEFAULTS=YES', - '-DCMAKE_BUILD_TYPE:STRING=%s' % ( - 'DEBUG' if '+debug' in spec else 'RELEASE'), - '-DXSDK_ENABLE_DEBUG:STRING=%s' % ( - 'YES' if '+debug' in spec else 'NO'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ( 'ON' if '+shared' in spec else 'OFF'), '-DTPL_ENABLE_MPI:BOOL=ON', diff --git a/var/spack/repos/builtin/packages/benchmark/package.py b/var/spack/repos/builtin/packages/benchmark/package.py index eecb9341d98..4101b0e9e09 100644 --- a/var/spack/repos/builtin/packages/benchmark/package.py +++ b/var/spack/repos/builtin/packages/benchmark/package.py @@ -37,6 +37,11 @@ class Benchmark(CMakePackage): version('1.1.0', '66b2a23076cf70739525be0092fc3ae3') version('1.0.0', '1474ff826f8cd68067258db75a0835b8') + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', + 'MinSizeRel', 'Coverage')) + def patch(self): filter_file( r'add_cxx_compiler_flag..fstrict.aliasing.', diff --git a/var/spack/repos/builtin/packages/bml/package.py b/var/spack/repos/builtin/packages/bml/package.py index 87dc1c9e80e..68e62032e4c 100644 --- a/var/spack/repos/builtin/packages/bml/package.py +++ b/var/spack/repos/builtin/packages/bml/package.py @@ -30,20 +30,11 @@ class Bml(CMakePackage): formats (in dense and sparse) and their associated algorithms for basic matrix operations.""" - homepage = "https://github.com/qmmd/bml" - url = "https://github.com/qmmd/bml" + homepage = "https://github.com/lanl/bml" + url = "https://github.com/lanl/bml" - version('develop', git='https://github.com/qmmd/bml', branch='master') - version('1.1.0', git='https://github.com/qmmd/bml', tag='v1.1.0') - - variant('debug', default=False, description='Build debug version') + version('develop', git='https://github.com/lanl/bml', branch='master') + version('1.1.0', git='https://github.com/lanl/bml', tag='v1.1.0') depends_on("blas") depends_on("lapack") - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py index 4e2ef26dbb4..021814c7fd6 100644 --- a/var/spack/repos/builtin/packages/caffe/package.py +++ b/var/spack/repos/builtin/packages/caffe/package.py @@ -39,7 +39,7 @@ class Caffe(CMakePackage): version('rc3', '84e39223115753b48312a8bf48c31f59') version('rc2', 'c331932e34b5e2f5022fcc34c419080f') - variant('gpu', default=False, + variant('cuda', default=False, description='Builds with support for GPUs via CUDA and cuDNN') variant('opencv', default=True, description='Build with OpenCV support') @@ -54,7 +54,7 @@ class Caffe(CMakePackage): depends_on('boost') depends_on('boost +python', when='+python') - depends_on('cuda', when='+gpu') + depends_on('cuda', when='+cuda') depends_on('blas') depends_on('protobuf') depends_on('glog') @@ -75,8 +75,8 @@ def cmake_args(self): spec = self.spec args = ['-DBLAS={0}'.format('open' if spec['blas'].name == 'openblas' else spec['blas'].name), - '-DCPU_ONLY=%s' % ('~gpu' in spec), - '-DUSE_CUDNN=%s' % ('+gpu' in spec), + '-DCPU_ONLY=%s' % ('~cuda' in spec), + '-DUSE_CUDNN=%s' % ('+cuda' in spec), '-DBUILD_python=%s' % ('+python' in spec), '-DBUILD_python_layer=%s' % ('+python' in spec), '-DBUILD_matlab=%s' % ('+matlab' in spec), diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py index 9ded62e5c5d..813e491dfdd 100644 --- a/var/spack/repos/builtin/packages/callpath/package.py +++ b/var/spack/repos/builtin/packages/callpath/package.py @@ -46,7 +46,9 @@ def install(self, spec, prefix): # TODO: offer options for the walker used. cmake_args = std_cmake_args if spec.satisfies("^dyninst@9.3.0:"): - cmake_args.append("-DCMAKE_CXX_FLAGS='-std=c++11 -fpermissive'") + std_flag = self.compiler.cxx11_flag + cmake_args.append("-DCMAKE_CXX_FLAGS='{0} -fpermissive'".format( + std_flag)) cmake('.', "-DCALLPATH_WALKER=dyninst", *cmake_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py index 2c1c6636393..a13d79c9539 100644 --- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py +++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py @@ -53,6 +53,9 @@ class CbtfArgonavis(CMakePackage): version('1.8', branch='master', git='https://github.com/OpenSpeedShop/cbtf-argonavis.git') + variant('build_type', default='None', values=('None'), + description='CMake build type') + depends_on("cmake@3.0.2:", type='build') depends_on("boost@1.50.0:1.59.0") depends_on("papi") @@ -65,9 +68,6 @@ class CbtfArgonavis(CMakePackage): build_directory = 'build_cbtf_argonavis' - def build_type(self): - return 'None' - def cmake_args(self): spec = self.spec compile_flags = "-O2 -g" diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py index a90ea74f9d0..40fc932e8f3 100644 --- a/var/spack/repos/builtin/packages/cbtf-krell/package.py +++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py @@ -68,6 +68,8 @@ class CbtfKrell(CMakePackage): description="Build mpi experiment collector for mpich2 MPI.") variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI.") + variant('build_type', default='None', values=('None'), + description='CMake build type') # Dependencies for cbtf-krell depends_on("cmake@3.0.2:", type='build') @@ -129,9 +131,6 @@ def set_mpi_cmakeOptions(self, spec, cmakeOptions): cmakeOptions.extend(MPIOptions) - def build_type(self): - return 'None' - def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py index 6ffca1f8b16..b56265154c3 100644 --- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py +++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py @@ -51,6 +51,9 @@ class CbtfLanl(CMakePackage): version('1.8', branch='master', git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl') + variant('build_type', default='None', values=('None'), + description='CMake build type') + depends_on("cmake@3.0.2:", type='build') # Dependencies for cbtf-krell depends_on("mrnet@5.0.1:+lwthreads") @@ -62,9 +65,6 @@ class CbtfLanl(CMakePackage): build_directory = 'build_cbtf_lanl' - def build_type(self): - return 'None' - def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py index 68e2b7d0a22..d972544f5ff 100644 --- a/var/spack/repos/builtin/packages/cbtf/package.py +++ b/var/spack/repos/builtin/packages/cbtf/package.py @@ -58,6 +58,8 @@ class Cbtf(CMakePackage): variant('runtime', default=False, description="build only the runtime libraries and collectors.") + variant('build_type', default='None', values=('None'), + description='CMake build type') depends_on("cmake@3.0.2:", type='build') depends_on("boost@1.50.0:1.59.0") @@ -70,9 +72,6 @@ class Cbtf(CMakePackage): build_directory = 'build_cbtf' - def build_type(self): - return 'None' - def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py index 898f7ff1b8c..938dcdfb8c4 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -34,6 +34,8 @@ class Cdo(Package): url = "https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz" list_url = "https://code.zmaw.de/projects/cdo/files" + version('1.8.2', '6a2e2f99b7c67ee9a512c40a8d4a7121', + url='https://code.zmaw.de/attachments/download/14686/cdo-1.8.2.tar.gz') version('1.7.2', 'f08e4ce8739a4f2b63fc81a24db3ee31', url='https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz') version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2', diff --git a/var/spack/repos/builtin/packages/clamr/package.py b/var/spack/repos/builtin/packages/clamr/package.py index c45069d39f5..d1eee12d1c0 100644 --- a/var/spack/repos/builtin/packages/clamr/package.py +++ b/var/spack/repos/builtin/packages/clamr/package.py @@ -41,10 +41,6 @@ class Clamr(CMakePackage): 'graphics', default='opengl', values=('opengl', 'mpe', 'none'), description='Build with specified graphics support') - variant( - 'build', default='relwithdebinfo', - values=('debug', 'release', 'relwithdebinfo'), - description='Build type') variant( 'precision', default='mixed', values=('single', 'mixed', 'full'), @@ -53,15 +49,6 @@ class Clamr(CMakePackage): depends_on('mpi') depends_on('mpe', when='graphics=mpe') - def build_type(self): - spec = self.spec - if 'build=debug' in spec: - return 'Debug' - elif 'build=release' in spec: - return 'Release' - else: - return 'RelWithDebInfo' - def cmake_args(self): spec = self.spec cmake_args = [] diff --git a/var/spack/repos/builtin/packages/cleaveland4/package.py b/var/spack/repos/builtin/packages/cleaveland4/package.py new file mode 100644 index 00000000000..505f800ac76 --- /dev/null +++ b/var/spack/repos/builtin/packages/cleaveland4/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Cleaveland4(Package): + """CleaveLand4: Analysis of degradome data to find sliced miRNA and siRNA + targets""" + + homepage = "https://github.com/MikeAxtell/CleaveLand4" + url = "https://github.com/MikeAxtell/CleaveLand4/archive/v4.4.tar.gz" + + version('4.4', 'cf62a1de715a612fc8bd5a62364e69db') + + depends_on('perl', type=('build', 'run')) + depends_on('perl-math-cdf', type=('build', 'run')) + depends_on('bowtie') + depends_on('viennarna') + depends_on('r', type=('build', 'run')) + depends_on('samtools') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('CleaveLand4.pl', prefix.bin) + with working_dir('GSTAr_v1-0'): + install('GSTAr.pl', prefix.bin) diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py index 7120fffac6c..2f4f5b1579c 100644 --- a/var/spack/repos/builtin/packages/clhep/package.py +++ b/var/spack/repos/builtin/packages/clhep/package.py @@ -50,7 +50,6 @@ class Clhep(CMakePackage): version('2.2.0.5', '1584e8ce6ebf395821aed377df315c7c') version('2.2.0.4', '71d2c7c2e39d86a0262e555148de01c1') - variant('debug', default=False, description="Switch to the debug version of CLHEP.") variant('cxx11', default=True, description="Compile using c++11 dialect.") variant('cxx14', default=False, description="Compile using c++14 dialect.") @@ -65,14 +64,6 @@ def patch(self): root_cmakelists_dir = 'CLHEP' - def build_type(self): - spec = self.spec - - if '+debug' in spec: - return 'Debug' - else: - return 'MinSizeRel' - def cmake_args(self): spec = self.spec cmake_args = [] diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index ba1f8960108..aa6a2be0b48 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -71,6 +71,9 @@ class Dealii(CMakePackage): description='Compile with 64 bit indices support') variant('optflags', default=False, description='Compile using additional optimization flags') + variant('build_type', default='DebugRelease', + description='The build type to build', + values=('Debug', 'Release', 'DebugRelease')) # required dependencies, light version depends_on("blas") @@ -136,10 +139,6 @@ class Dealii(CMakePackage): '+slepc', '+trilinos']: conflicts(p, when='~mpi') - def build_type(self): - # CMAKE_BUILD_TYPE should be DebugRelease | Debug | Release - return 'DebugRelease' - def cmake_args(self): spec = self.spec options = [] diff --git a/var/spack/repos/builtin/packages/eccodes/package.py b/var/spack/repos/builtin/packages/eccodes/package.py index 137f445c690..40539e19c92 100644 --- a/var/spack/repos/builtin/packages/eccodes/package.py +++ b/var/spack/repos/builtin/packages/eccodes/package.py @@ -50,6 +50,9 @@ class Eccodes(CMakePackage): description="Enable OpenMP threads") variant('memfs', default=False, description="Memory based access to definitions/samples") + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', 'Production')) depends_on('netcdf', when='+netcdf') depends_on('openjpeg', when='+jpeg') diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index 0aefe416e36..569af17c61d 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -40,9 +40,6 @@ class Eigen(CMakePackage): version('3.2.8', '64f4aef8012a424c7e079eaf0be71793ab9bc6e0') version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184') - variant('debug', default=False, - description='Builds the library in debug mode') - variant('metis', default=True, description='Enables metis backend') variant('scotch', default=True, description='Enables scotch backend') variant('fftw', default=True, description='Enables FFTW backend') @@ -50,6 +47,9 @@ class Eigen(CMakePackage): description='Enables SuiteSparse support') variant('mpfr', default=True, description='Enables support for multi-precisions FP via mpfr') + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo')) # TODO : dependency on googlehash, superlu, adolc missing depends_on('metis@5:', when='+metis') @@ -58,9 +58,3 @@ class Eigen(CMakePackage): depends_on('suite-sparse', when='+suitesparse') depends_on('mpfr@2.3.0:', when='+mpfr') depends_on('gmp', when='+mpfr') - - def build_type(self): - if '+debug' in self.spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py index d86ee985f76..e118bcbd447 100644 --- a/var/spack/repos/builtin/packages/elemental/package.py +++ b/var/spack/repos/builtin/packages/elemental/package.py @@ -36,8 +36,6 @@ class Elemental(CMakePackage): version('0.87.7', '6c1e7442021c59a36049e37ea69b8075') version('0.87.6', '9fd29783d45b0a0e27c0df85f548abe9') - variant('debug', default=False, - description='Builds a debug version of the libraries') variant('shared', default=True, description='Enables the build of shared libraries') variant('hybrid', default=True, @@ -61,6 +59,9 @@ class Elemental(CMakePackage): ' Requires local build of BLAS library.') variant('scalapack', default=False, description='Build with ScaLAPACK library') + variant('build_type', default='Release', + description='The build type to build', + values=('Debug', 'Release')) # Note that this forces us to use OpenBLAS until #1712 is fixed depends_on('blas', when='~openmp_blas ~int64_blas') @@ -85,15 +86,6 @@ def libs(self): 'libEl', root=self.prefix, shared=shared, recurse=True ) - def build_type(self): - """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable - :return: value for ``CMAKE_BUILD_TYPE`` - """ - if '+debug' in self.spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/espressopp/package.py b/var/spack/repos/builtin/packages/espressopp/package.py index e71291bec86..f1752b3b5eb 100644 --- a/var/spack/repos/builtin/packages/espressopp/package.py +++ b/var/spack/repos/builtin/packages/espressopp/package.py @@ -39,7 +39,6 @@ class Espressopp(CMakePackage): version('1.9.4.1', '0da74a6d4e1bfa6a2a24fca354245a4f') version('1.9.4', 'f2a27993a83547ad014335006eea74ea') - variant('debug', default=False, description='Build debug version') variant('ug', default=False, description='Build user guide') variant('pdf', default=False, description='Build user guide in pdf format') variant('dg', default=False, description='Build developer guide') @@ -60,13 +59,6 @@ class Espressopp(CMakePackage): depends_on("texlive", when="+pdf", type='build') depends_on("doxygen", when="+dg", type='build') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): return ['-DEXTERNAL_MPI4PY=ON', '-DEXTERNAL_BOOST=ON'] diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py index 34afa0d609c..5aa3b17d73b 100644 --- a/var/spack/repos/builtin/packages/fenics/package.py +++ b/var/spack/repos/builtin/packages/fenics/package.py @@ -55,10 +55,12 @@ class Fenics(CMakePackage): description='Enables the shared memory support') variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, - description='Builds a debug version of the libraries') variant('doc', default=False, description='Builds the documentation') + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', + 'MinSizeRel', 'Developer')) # not part of spack list for now # variant('petsc4py', default=True, description='Uses PETSc4py') @@ -144,11 +146,7 @@ def cmake_is_on(self, option): return 'ON' if option in self.spec else 'OFF' def cmake_args(self): - spec = self.spec - return [ - '-DCMAKE_BUILD_TYPE:STRING={0}'.format( - 'Debug' if '+debug' in spec else 'RelWithDebInfo'), '-DDOLFIN_ENABLE_DOCS:BOOL={0}'.format( self.cmake_is_on('+doc')), '-DBUILD_SHARED_LIBS:BOOL={0}'.format( diff --git a/var/spack/repos/builtin/packages/flecsale/package.py b/var/spack/repos/builtin/packages/flecsale/package.py index b22c553d2ab..828ff47d2fd 100644 --- a/var/spack/repos/builtin/packages/flecsale/package.py +++ b/var/spack/repos/builtin/packages/flecsale/package.py @@ -33,7 +33,6 @@ class Flecsale(CMakePackage): version('develop', git='https://github.com/laristra/flecsale', branch='master', submodules=True) - variant('debug', default=False, description='Build debug version') variant('mpi', default=True, description='Build on top of mpi conduit for mpi inoperability') @@ -43,13 +42,6 @@ class Flecsale(CMakePackage): depends_on("python") depends_on("openssl") - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): options = [ '-DENABLE_UNIT_TESTS=ON' diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py index 5c0f51b2d18..3b079565cb6 100644 --- a/var/spack/repos/builtin/packages/flecsi/package.py +++ b/var/spack/repos/builtin/packages/flecsi/package.py @@ -41,7 +41,6 @@ class Flecsi(CMakePackage): version('develop', git='https://github.com/laristra/flecsi', branch='master', submodules=True) - variant('debug', default=False, description='Build debug version') variant('mpi', default=True, description='Build on top of mpi conduit for mpi inoperability') @@ -49,13 +48,6 @@ class Flecsi(CMakePackage): depends_on("legion+shared", when='~mpi') depends_on("legion+shared+mpi", when='+mpi') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): options = ['-DENABLE_UNIT_TESTS=ON'] diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index cb04d674812..95d3eb9d551 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -41,7 +41,6 @@ class Geant4(CMakePackage): version('10.01.p03', '4fb4175cc0dabcd517443fbdccd97439') variant('qt', default=True, description='Enable Qt support') - variant('debug', default=False, description='Build debug version') depends_on('cmake@3.5:', type='build') @@ -54,13 +53,6 @@ class Geant4(CMakePackage): depends_on("xerces-c") depends_on("qt@4.8:", when="+qt") - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index 3c9eff5619f..977bf6c3d67 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -46,8 +46,6 @@ class Gmsh(CMakePackage): variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, - description='Builds the library in debug mode') variant('mpi', default=True, description='Builds MPI support for parser and solver') variant('fltk', default=False, @@ -128,9 +126,6 @@ def cmake_args(self): # Builds and installs static library options.append('-DENABLE_BUILD_LIB:BOOL=ON') - if '+debug' in spec: - options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') - if '+mpi' in spec: options.append('-DENABLE_MPI:BOOL=ON') diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py index 44078d059e2..26e5da3d568 100644 --- a/var/spack/repos/builtin/packages/gobject-introspection/package.py +++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py @@ -46,6 +46,9 @@ class GobjectIntrospection(Package): depends_on("flex", type="build") depends_on("pkg-config@0.9.0:", type="build") + # GobjectIntrospection does not build with sed from darwin: + depends_on('sed', when='platform=darwin', type='build') + # This package creates several scripts from # toosl/g-ir-tool-template.in. In their original form these # scripts end up with a sbang line like diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 97fd569d1ff..ae17193139c 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -48,12 +48,15 @@ class Gromacs(CMakePackage): variant('mpi', default=True, description='Activate MPI support') variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Enables debug mode') variant( 'double', default=False, description='Produces a double precision version of the executables') variant('plumed', default=False, description='Enable PLUMED support') variant('cuda', default=False, description='Enable CUDA support') + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel', + 'Reference', 'RelWithAssert', 'Profile')) depends_on('mpi', when='+mpi') depends_on('plumed+mpi', when='+plumed+mpi') @@ -79,11 +82,6 @@ def cmake_args(self): if '~shared' in self.spec: options.append('-DBUILD_SHARED_LIBS:BOOL=OFF') - if '+debug' in self.spec: - options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') - else: - options.append('-DCMAKE_BUILD_TYPE:STRING=Release') - if '+cuda' in self.spec: options.append('-DGMX_GPU:BOOL=ON') options.append('-DCUDA_TOOLKIT_ROOT_DIR:STRING=' + diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py index ef7b347426c..58644db11e7 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -40,10 +40,3 @@ class Hpx(CMakePackage): def cmake_args(self): args = ['-DHPX_BUILD_EXAMPLES=OFF', '-DHPX_MALLOC=system'] return args - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index a018529baef..249b03a74f8 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -48,6 +48,8 @@ class Jdk(Package): # For instructions on how to find the magic URL, see: # https://gist.github.com/P7h/9741922 # https://linuxconfig.org/how-to-install-java-se-development-kit-on-debian-linux + version('8u141-b15', '8cf4c4e00744bfafc023d770cb65328c', curl_options=curl_options, + url='http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz') version('8u131-b11', '75b2cb2249710d822a60f83e28860053', curl_options=curl_options, url='http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz') version('8u92-b14', '65a1cc17ea362453a6e0eb4f13be76e4', curl_options=curl_options) diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index b79f9244c98..fea19245503 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -36,24 +36,16 @@ class Lbann(CMakePackage): version('develop', git='https://github.com/LLNL/lbann.git', branch="develop") version('0.91', '83b0ec9cd0b7625d41dfb06d2abd4134') - variant('debug', default=False, description='Builds a debug version of the libraries') variant('gpu', default=False, description='Builds with support for GPUs via CUDA and cuDNN') variant('opencv', default=True, description='Builds with support for image processing routines with OpenCV') variant('seq_init', default=False, description='Force serial initialization of weight matrices.') depends_on('elemental +openmp_blas +scalapack +shared +int64') - depends_on('elemental +openmp_blas +scalapack +shared +int64 +debug', when='+debug') depends_on('cuda', when='+gpu') depends_on('mpi') depends_on('opencv@3.2.0', when='+opencv') depends_on('protobuf@3.0.2:') - def build_type(self): - if '+debug' in self.spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): spec = self.spec # Environment variables diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 79a1ee533d6..3bcd37e3068 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -46,7 +46,6 @@ class Legion(CMakePackage): version('develop', git='https://github.com/StanfordLegion/legion', branch='master') version('17.02.0', '31ac3004e2fb0996764362d2b6f6844a') - variant('debug', default=False, description='Build debug version') variant('mpi', default=True, description='Build on top of mpi conduit for mpi inoperability') variant('shared', default=True, description='Build shared libraries') @@ -55,13 +54,6 @@ class Legion(CMakePackage): depends_on("gasnet", when='~mpi') depends_on("gasnet+mpi", when='+mpi') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): options = [ '-DLegion_USE_GASNet=ON', diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index fc8823f1a81..64e50f0cfb7 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -43,10 +43,10 @@ class Llvm(CMakePackage): version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') - variant('debug', default=False, - description="Build a debug version of LLVM, this increases " - "binary size by an order of magnitude, make sure you have " - "20-30gb of space available to build this") + # NOTE: The debug version of LLVM is an order of magnitude larger than + # the release version, and may take up 20-30 GB of space. If you want + # to save space, build with `build_type=Release`. + variant('clang', default=True, description="Build the LLVM C/C++/Objective-C compiler frontend") variant('lldb', default=True, description="Build the LLVM debugger") @@ -327,12 +327,6 @@ class Llvm(CMakePackage): def setup_environment(self, spack_env, run_env): spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag) - def build_type(self): - if '+debug' in self.spec: - return 'RelWithDebInfo' - else: - return 'Release' - def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 0680e1a3b50..ecb2a8b5435 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -145,11 +145,11 @@ def setup_environment(self, spack_env, run_env): @property def lua_lib_dir(self): - return os.path.join('lib', 'lua', self.version.up_to(2)) + return os.path.join('lib', 'lua', str(self.version.up_to(2))) @property def lua_share_dir(self): - return os.path.join('share', 'lua', self.version.up_to(2)) + return os.path.join('share', 'lua', str(self.version.up_to(2))) def setup_dependent_package(self, module, dependent_spec): """ diff --git a/var/spack/repos/builtin/packages/mad-numdiff/package.py b/var/spack/repos/builtin/packages/mad-numdiff/package.py index 4d0c9c1ef73..574ddf2be37 100644 --- a/var/spack/repos/builtin/packages/mad-numdiff/package.py +++ b/var/spack/repos/builtin/packages/mad-numdiff/package.py @@ -34,12 +34,3 @@ class MadNumdiff(CMakePackage): version('develop', git='https://github.com/quinoacomputing/ndiff', branch='master') version('20150724', '7723c0f2499aea8fd960377c5bed28d8') - - variant('debug', default=False, description='Build debug version') - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py index d69dedf3eaf..33a6bb5640d 100644 --- a/var/spack/repos/builtin/packages/magics/package.py +++ b/var/spack/repos/builtin/packages/magics/package.py @@ -109,7 +109,7 @@ def install(self, spec, prefix): if '+metview' in spec: if '+qt' in spec: options.append('-DENABLE_METVIEW=ON') - if spec['qt'].version.up_to(1) == '5': + if spec['qt'].version[0] == 5: options.append('-DENABLE_QT5=ON') else: options.append('-DENABLE_METVIEW_NO_QT=ON') diff --git a/var/spack/repos/builtin/packages/nalu/package.py b/var/spack/repos/builtin/packages/nalu/package.py index fc6d79e9ea0..040144ff164 100644 --- a/var/spack/repos/builtin/packages/nalu/package.py +++ b/var/spack/repos/builtin/packages/nalu/package.py @@ -38,19 +38,10 @@ class Nalu(CMakePackage): version('master', git='https://github.com/NaluCFD/Nalu.git', branch='master') - variant('debug', default=False, - description='Builds a debug version') - # Currently Nalu only builds static libraries; To be fixed soon depends_on('yaml-cpp+fpic~shared') depends_on('trilinos~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf@master') - def build_type(self): - if '+debug' in self.spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): spec = self.spec options = [] diff --git a/var/spack/repos/builtin/packages/nekbone/package.py b/var/spack/repos/builtin/packages/nekbone/package.py index 7d2b61f038c..22d07661e5f 100644 --- a/var/spack/repos/builtin/packages/nekbone/package.py +++ b/var/spack/repos/builtin/packages/nekbone/package.py @@ -39,6 +39,8 @@ class Nekbone(Package): version('develop', git='https://github.com/ANL-CESAR/nekbone.git') + depends_on('mpi') + def install(self, spec, prefix): working_dirs = ['example1', 'example2', 'example3', 'nek_comm', @@ -47,6 +49,9 @@ def install(self, spec, prefix): for wdir in working_dirs: with working_dir('test/' + wdir): + makenec = FileFilter('makenek') + makenec.filter('CC.*', 'CC=' + self.spec['mpi'].mpicc) + makenec.filter('FF77.*', 'FF77=' + self.spec['mpi'].mpif77) makenek = Executable('./makenek') path = join_path(prefix.bin, wdir) makenek('ex1', '../../src') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index d79e2c27f8d..5afbd1e325d 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -33,6 +33,7 @@ class Openblas(MakefilePackage): homepage = 'http://www.openblas.net' url = 'http://github.com/xianyi/OpenBLAS/archive/v0.2.19.tar.gz' + version('0.2.20', '48637eb29f5b492b91459175dcc574b1') version('0.2.19', '28c998054fd377279741c6f0b9ea7941') version('0.2.18', '805e7f660877d588ea7e3792cda2ee65') version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1') diff --git a/var/spack/repos/builtin/packages/opencoarrays/package.py b/var/spack/repos/builtin/packages/opencoarrays/package.py index 0449155bc7f..37ae236c0ad 100644 --- a/var/spack/repos/builtin/packages/opencoarrays/package.py +++ b/var/spack/repos/builtin/packages/opencoarrays/package.py @@ -42,6 +42,11 @@ class Opencoarrays(CMakePackage): version('1.7.4', '85ba87def461e3ff5a164de2e6482930') version('1.6.2', '5a4da993794f3e04ea7855a6678981ba') + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', + 'MinSizeRel', 'CodeCoverage')) + depends_on('mpi') def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index a86465b1ba8..95971af10e0 100644 --- a/var/spack/repos/builtin/packages/openspeedshop/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop/package.py @@ -149,9 +149,6 @@ class Openspeedshop(CMakePackage): build_directory = 'build_openspeedshop' - def build_type(self): - return 'None' - def cmake_args(self): spec = self.spec compile_flags = "-O2 -g" diff --git a/var/spack/repos/builtin/packages/pegtl/package.py b/var/spack/repos/builtin/packages/pegtl/package.py index 85a008a1199..f6848be725a 100644 --- a/var/spack/repos/builtin/packages/pegtl/package.py +++ b/var/spack/repos/builtin/packages/pegtl/package.py @@ -39,12 +39,3 @@ class Pegtl(CMakePackage): version('develop', git='https://github.com/taocpp/PEGTL', branch='master') version('2.1.4', 'e5288b6968e6e910287fce93dc5557bf') version('2.0.0', 'c772828e7188459338a920c21f9896db') - - variant('debug', default=False, description='Build debug version') - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/perl-math-cdf/package.py b/var/spack/repos/builtin/packages/perl-math-cdf/package.py new file mode 100644 index 00000000000..6d7d195dea6 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-math-cdf/package.py @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PerlMathCdf(PerlPackage): + """Generate probabilities and quantiles from several statistical + probability functions""" + + homepage = "http://search.cpan.org/~callahan/Math-CDF-0.1/CDF.pm" + url = "http://search.cpan.org/CPAN/authors/id/C/CA/CALLAHAN/Math-CDF-0.1.tar.gz" + + version('0.1', '7866c7b6b9d27f0ce4b7637334478ab7') diff --git a/var/spack/repos/builtin/packages/portage/package.py b/var/spack/repos/builtin/packages/portage/package.py index 92e42665523..0934076ab90 100644 --- a/var/spack/repos/builtin/packages/portage/package.py +++ b/var/spack/repos/builtin/packages/portage/package.py @@ -36,19 +36,11 @@ class Portage(CMakePackage): version('develop', git='https://github.com/laristra/portage', branch='master', submodules=True) - variant('debug', default=False, description='Build debug version') variant('mpi', default=True, description='Support MPI') depends_on("cmake@3.1:", type='build') depends_on('mpi', when='+mpi') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): options = ['-DENABLE_UNIT_TESTS=ON', '-DENABLE_APP_TESTS=ON'] diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 551f87b5d78..89e821b68f8 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -131,9 +131,9 @@ def url_for_version(self, version): url = self.list_url if version >= Version('4.0'): - url += version.up_to(2) + '/' + url += str(version.up_to(2)) + '/' else: - url += version.up_to(1) + '/' + url += str(version.up_to(1)) + '/' if version >= Version('4.8'): url += str(version) + '/' diff --git a/var/spack/repos/builtin/packages/quinoa/package.py b/var/spack/repos/builtin/packages/quinoa/package.py index eb41bb8b371..de04e6407cd 100644 --- a/var/spack/repos/builtin/packages/quinoa/package.py +++ b/var/spack/repos/builtin/packages/quinoa/package.py @@ -38,8 +38,6 @@ class Quinoa(CMakePackage): version('develop', git='https://github.com/quinoacomputing/quinoa', branch='master') - variant('debug', default=False, description='Build debug version') - depends_on('hdf5+mpi') depends_on("charm backend=mpi") depends_on("trilinos+exodus") @@ -56,10 +54,3 @@ class Quinoa(CMakePackage): depends_on("pegtl") root_cmakelists_dir = 'src' - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/relion/package.py b/var/spack/repos/builtin/packages/relion/package.py index dfb93cd9434..23b1834fbc7 100644 --- a/var/spack/repos/builtin/packages/relion/package.py +++ b/var/spack/repos/builtin/packages/relion/package.py @@ -40,6 +40,10 @@ class Relion(CMakePackage): variant('cuda', default=False, description="enable compute on gpu") variant('double', default=False, description="double precision (cpu) code") variant('double-gpu', default=False, description="double precision (gpu) code") + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo', + 'Profiling', 'Benchmarking')) depends_on('mpi') depends_on('fftw+float+double') diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index b5f6ce89fe9..dfd7ba3e25a 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -99,12 +99,6 @@ class Root(CMakePackage): # See https://sft.its.cern.ch/jira/browse/ROOT-7517 conflicts('%intel') - def build_type(self): - if '+debug' in self.spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): args = [ '-Dcocoa=OFF', diff --git a/var/spack/repos/builtin/packages/sas/package.py b/var/spack/repos/builtin/packages/sas/package.py index 5a7f1de1d5d..050d6172d65 100644 --- a/var/spack/repos/builtin/packages/sas/package.py +++ b/var/spack/repos/builtin/packages/sas/package.py @@ -36,19 +36,10 @@ class Sas(CMakePackage): version('0.1.4', '20d7311258f2a59c9367ae1576c392b6') version('0.1.3', '1e6572afcc03318d16d7321d40eec0fd') - variant('debug', default=False, description='Build debug version') - depends_on('python@2.7:') depends_on('llvm@3.5:') depends_on('cmake@2.8:', type='build') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): args = [ '-DLLVM_DEV_DIR=%s' % self.spec['llvm'].prefix diff --git a/var/spack/repos/builtin/packages/shortstack/package.py b/var/spack/repos/builtin/packages/shortstack/package.py new file mode 100644 index 00000000000..8feb6710139 --- /dev/null +++ b/var/spack/repos/builtin/packages/shortstack/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Shortstack(Package): + """ShortStack is a tool developed to process and analyze smallRNA-seq data + with respect to a reference genome, and output a comprehensive and + informative annotation of all discovered small RNA genes.""" + + homepage = "http://sites.psu.edu/axtell/software/shortstack/" + url = "https://github.com/MikeAxtell/ShortStack/archive/v3.8.3.tar.gz" + + version('3.8.3', '3f21f494f799039f3fa88ea343f2d20d') + + depends_on('perl', type=('build', 'run')) + depends_on('samtools') + depends_on('viennarna') + depends_on('bowtie') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('ShortStack', prefix.bin) diff --git a/var/spack/repos/builtin/packages/snptest/package.py b/var/spack/repos/builtin/packages/snptest/package.py new file mode 100644 index 00000000000..a60a15d0548 --- /dev/null +++ b/var/spack/repos/builtin/packages/snptest/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Snptest(Package): + """SNPTEST is a program for the analysis of single SNP association in + genome-wide studies.""" + + homepage = "https://mathgen.stats.ox.ac.uk/genetics_software/snptest/snptest.html" + url = "http://www.well.ox.ac.uk/~gav/resources/snptest_v2.5.2_linux_x86_64_dynamic.tgz" + + version('2.5.2', 'e3f2cc0351f260cf29369dc4f79a660a') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('snptest_v{0}'.format(self.version), prefix.bin) diff --git a/var/spack/repos/builtin/packages/stacks/package.py b/var/spack/repos/builtin/packages/stacks/package.py new file mode 100644 index 00000000000..df0d486b0ba --- /dev/null +++ b/var/spack/repos/builtin/packages/stacks/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Stacks(AutotoolsPackage): + """Stacks is a software pipeline for building loci from short-read + sequences, such as those generated on the Illumina platform.""" + + homepage = "http://catchenlab.life.illinois.edu/stacks/" + url = "http://catchenlab.life.illinois.edu/stacks/source/stacks-1.46.tar.gz" + + version('1.46', '18b0568a4bba44fb4e5be0eb7ee2c08d') + + variant('sparsehash', default=True, description='Improve Stacks memory usage with SparseHash') + + depends_on('perl', type=('build', 'run')) + depends_on('sparsehash', when='+sparsehash') + + def configure_args(self): + args = [] + if '+sparsehash' in self.spec: + args.append('--enable-sparsehash') + else: + args.append('--disable-sparsehash') + return args diff --git a/var/spack/repos/builtin/packages/stringtie/package.py b/var/spack/repos/builtin/packages/stringtie/package.py new file mode 100644 index 00000000000..9baf545a4c7 --- /dev/null +++ b/var/spack/repos/builtin/packages/stringtie/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Stringtie(MakefilePackage): + """StringTie is a fast and highly efficient assembler of RNA-Seq alignments + into potential transcripts.""" + + homepage = "https://ccb.jhu.edu/software/stringtie" + url = "https://github.com/gpertea/stringtie/archive/v1.3.3b.tar.gz" + + version('1.3.3b', '11a43260b18e4272182380e922445d88') + + depends_on('samtools') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('stringtie', prefix.bin) diff --git a/var/spack/repos/builtin/packages/structure/package.py b/var/spack/repos/builtin/packages/structure/package.py new file mode 100644 index 00000000000..abe1ee76e88 --- /dev/null +++ b/var/spack/repos/builtin/packages/structure/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Structure(MakefilePackage): + """Structure is a free software package for using multi-locus genotype + data to investigate population structure.""" + + homepage = "http://web.stanford.edu/group/pritchardlab/structure.html" + url = "http://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/structure_kernel_source.tar.gz" + + version('2.3.4', '4e0591678cdbfe79347d272b5dceeda1') + + depends_on('jdk', type=('build', 'run')) + + def url_for_version(self, version): + url = "http://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v{0}/structure_kernel_source.tar.gz" + return url.format(version) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('structure', prefix.bin) + install('mainparams', prefix.bin) + install('extraparams', prefix.bin) diff --git a/var/spack/repos/builtin/packages/sublime-text/package.py b/var/spack/repos/builtin/packages/sublime-text/package.py index 3d7fb65005d..e7605b40be2 100644 --- a/var/spack/repos/builtin/packages/sublime-text/package.py +++ b/var/spack/repos/builtin/packages/sublime-text/package.py @@ -49,7 +49,7 @@ class SublimeText(Package): depends_on('libxau', type='run') def url_for_version(self, version): - if version.up_to(1) == '2': + if version[0] == 2: return "https://download.sublimetext.com/Sublime%20Text%20{0}%20x64.tar.bz2".format(version) else: return "https://download.sublimetext.com/sublime_text_3_build_{0}_x64.tar.bz2".format(version) diff --git a/var/spack/repos/builtin/packages/subread/package.py b/var/spack/repos/builtin/packages/subread/package.py new file mode 100644 index 00000000000..b09e3986024 --- /dev/null +++ b/var/spack/repos/builtin/packages/subread/package.py @@ -0,0 +1,52 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import sys + + +class Subread(MakefilePackage): + """The Subread software package is a tool kit for processing next-gen + sequencing data.""" + + homepage = "http://subread.sourceforge.net/" + url = "https://downloads.sourceforge.net/project/subread/subread-1.5.2/subread-1.5.2-source.tar.gz" + + version('1.5.2', '817d2a46d87fcef885c8832475b8b247') + + depends_on('zlib') + + def build(self, spec, prefix): + plat = sys.platform + with working_dir('src'): + if plat.startswith('linux'): + make('-f', 'Makefile.Linux') + elif plat.startswith('darwin'): + make('-f', 'Makefile.MacOS') + else: + raise InstallError("The communication mechanism %s is not" + "supported" % plat) + + def install(self, spec, prefix): + install_tree('bin', prefix.bin) diff --git a/var/spack/repos/builtin/packages/sumaclust/package.py b/var/spack/repos/builtin/packages/sumaclust/package.py new file mode 100644 index 00000000000..b1d7a94c5a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/sumaclust/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Sumaclust(MakefilePackage): + """Sumaclust aims to cluster sequences in a way that is fast and exact at + the same time.""" + + homepage = "https://git.metabarcoding.org/obitools/sumaclust" + + version('1.0.20', '31c7583fbe2e3345d5fe3e9431d9b30c', + url="https://git.metabarcoding.org/obitools/sumaclust/uploads/69f757c42f2cd45212c587e87c75a00f/sumaclust_v1.0.20.tar.gz") + + def build(self, spec, prefix): + make('CC={0}'.format(spack_cc)) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('sumaclust', prefix.bin) diff --git a/var/spack/repos/builtin/packages/swarm/package.py b/var/spack/repos/builtin/packages/swarm/package.py new file mode 100644 index 00000000000..b752f523813 --- /dev/null +++ b/var/spack/repos/builtin/packages/swarm/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Swarm(MakefilePackage): + """A robust and fast clustering method for amplicon-based studies.""" + + homepage = "https://github.com/torognes/swarm" + url = "https://github.com/torognes/swarm/archive/v2.1.13.tar.gz" + + version('2.1.13', 'ab6aff0ba5d20a53b9f13f8f3d85839f') + + build_directory = 'src' + + def install(self, spec, prefix): + install_tree('bin', prefix.bin) + install_tree('scripts', prefix.scripts) + install_tree('man', prefix.share.man) diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py index 50dd335ac70..a36cfc70b2b 100644 --- a/var/spack/repos/builtin/packages/symengine/package.py +++ b/var/spack/repos/builtin/packages/symengine/package.py @@ -55,6 +55,9 @@ class Symengine(CMakePackage): description='Enable thread safety option') variant('shared', default=True, description='Enables the build of shared libraries') + variant('build_type', default='Release', + description='The build type to build', + values=('Debug', 'Release')) # NOTE: mpir is a drop-in replacement for gmp # NOTE: [mpc,mpfr,flint,piranha] could also be built against mpir @@ -66,10 +69,6 @@ class Symengine(CMakePackage): depends_on('flint', when='+flint~boostmp') depends_on('piranha', when='+piranha~flint~boostmp') - def build_type(self): - # CMAKE_BUILD_TYPE should be Debug | Release - return 'Release' - def cmake_args(self): spec = self.spec options = [] @@ -77,7 +76,6 @@ def cmake_args(self): # See https://github.com/symengine/symengine/blob/master/README.md # for build options options.extend([ - '-DCMAKE_BUILD_TYPE=Release', '-DWITH_SYMENGINE_RCP:BOOL=ON', '-DWITH_SYMENGINE_THREAD_SAFE:BOOL=%s' % ( 'ON' if ('+thread_safe' or '+openmp') in spec else 'OFF'), diff --git a/var/spack/repos/builtin/packages/tabix/package.py b/var/spack/repos/builtin/packages/tabix/package.py new file mode 100644 index 00000000000..1e54dd4716b --- /dev/null +++ b/var/spack/repos/builtin/packages/tabix/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Tabix(MakefilePackage): + """Generic indexer for TAB-delimited genome position files""" + + homepage = "https://github.com/samtools/tabix" + url = "https://github.com/samtools/tabix" + + version('2013-12-16', git='https://github.com/samtools/tabix.git', commit='1ae158ac79b459f5feeed7490c67519b14ce9f35') + + depends_on('perl', type=('build', 'run')) + depends_on('python', type=('build', 'run')) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + mkdirp(prefix.share.man.man1) + install('tabix', prefix.bin) + install('bgzip', prefix.bin) + install('tabix.py', prefix.bin) + install('tabix.1', prefix.share.man.man1) + install('tabix.tex', prefix.share) + install('TabixReader.java', prefix.bin) + install('libtabix.a', prefix.lib) + install_tree('perl', prefix.perl) + install_tree('python', prefix.python) diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py index 63d6c943b8e..a3a8e5ad891 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -25,7 +25,7 @@ from spack import * -class Tmux(Package): +class Tmux(AutotoolsPackage): """Tmux is a terminal multiplexer. What is a terminal multiplexer? It lets you switch easily between several @@ -45,15 +45,5 @@ class Tmux(Package): depends_on('libevent') depends_on('ncurses') - def install(self, spec, prefix): - pkg_config_path = ':'.join([ - spec['libevent'].prefix, - spec['ncurses'].prefix - ]) - - configure( - "--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s" % pkg_config_path) - - make() - make("install") + def configure_args(self): + return ['LIBTINFO_LIBS=-lncurses'] diff --git a/var/spack/repos/builtin/packages/transdecoder/package.py b/var/spack/repos/builtin/packages/transdecoder/package.py new file mode 100644 index 00000000000..4c23afbf2a2 --- /dev/null +++ b/var/spack/repos/builtin/packages/transdecoder/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Transdecoder(MakefilePackage): + """TransDecoder identifies candidate coding regions within transcript + sequences, such as those generated by de novo RNA-Seq transcript + assembly using Trinity, or constructed based on RNA-Seq alignments to + the genome using Tophat and Cufflinks.""" + + homepage = "http://transdecoder.github.io/" + url = "https://github.com/TransDecoder/TransDecoder/archive/v3.0.1.tar.gz" + + version('3.0.1', 'f62b86a15fcb78b1dada9f80cc25f300') + + depends_on('perl', type=('build', 'run')) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('TransDecoder.LongOrfs', prefix) + install('TransDecoder.Predict', prefix) + install_tree('PerlLib', prefix.PerlLib) + install_tree('util', prefix.util) + + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('PATH', prefix.util.bin) + run_env.prepend_path('PATH', prefix) diff --git a/var/spack/repos/builtin/packages/transposome/package.py b/var/spack/repos/builtin/packages/transposome/package.py new file mode 100644 index 00000000000..01499290cfd --- /dev/null +++ b/var/spack/repos/builtin/packages/transposome/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Transposome(PerlPackage): + """A toolkit for annotation of transposable element families from + unassembled sequence reads.""" + + homepage = "https://sestaton.github.io/Transposome/" + url = "https://github.com/sestaton/Transposome/archive/v0.11.2.tar.gz" + + version('0.11.2', '157c1fc090b0aa30050d03df885dcde0') + + depends_on('blast-plus') diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 74022f08331..8566adc6491 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -93,8 +93,6 @@ class Trilinos(CMakePackage): description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, - description='Builds a debug version of the libraries') variant('boost', default=True, description='Compile with Boost') variant('tpetra', default=True, @@ -241,8 +239,6 @@ def cmake_args(self): '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DCMAKE_BUILD_TYPE:STRING=%s' % ( - 'DEBUG' if '+debug' in spec else 'RELEASE'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ( 'ON' if '+shared' in spec else 'OFF'), diff --git a/var/spack/repos/builtin/packages/trimgalore/package.py b/var/spack/repos/builtin/packages/trimgalore/package.py new file mode 100644 index 00000000000..9dd8be11e95 --- /dev/null +++ b/var/spack/repos/builtin/packages/trimgalore/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 NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Trimgalore(Package): + """Trim Galore! is a wrapper around Cutadapt and FastQC to consistently + apply adapter and quality trimming to FastQ files, with extra + functionality for RRBS data.""" + + homepage = "https://github.com/FelixKrueger/TrimGalore" + url = "https://github.com/FelixKrueger/TrimGalore/archive/0.4.4.tar.gz" + + version('0.4.4', 'aae1b807b48e38bae7074470203997bb') + + depends_on('perl', type=('build', 'run')) + depends_on('py-cutadapt', type=('build', 'run')) + depends_on('fastqc') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('trim_galore', prefix.bin) diff --git a/var/spack/repos/builtin/packages/vc/package.py b/var/spack/repos/builtin/packages/vc/package.py index e41a385947c..67ced036b25 100644 --- a/var/spack/repos/builtin/packages/vc/package.py +++ b/var/spack/repos/builtin/packages/vc/package.py @@ -35,11 +35,7 @@ class Vc(CMakePackage): version('1.2.0', 'a5236df286b845d2fee5ef1e4d27549f') version('1.1.0', 'e354c1e3ea1d674b6f2af9c6fd230d81') - variant('debug', default=False) - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebug', + 'RelWithDebInfo', 'MinSizeRel')) diff --git a/var/spack/repos/builtin/packages/vecgeom/package.py b/var/spack/repos/builtin/packages/vecgeom/package.py index d514f13c174..9843840e5b0 100644 --- a/var/spack/repos/builtin/packages/vecgeom/package.py +++ b/var/spack/repos/builtin/packages/vecgeom/package.py @@ -36,17 +36,8 @@ class Vecgeom(CMakePackage): version('0.3.rc', git='https://gitlab.cern.ch/VecGeom/VecGeom.git', tag='v0.3.rc') - variant('debug', default=False, description='Build debug version') - depends_on('cmake@3.5:', type='build') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): options = [ '-DBACKEND=Scalar', diff --git a/var/spack/repos/builtin/packages/viennarna/package.py b/var/spack/repos/builtin/packages/viennarna/package.py new file mode 100644 index 00000000000..548aacb56f0 --- /dev/null +++ b/var/spack/repos/builtin/packages/viennarna/package.py @@ -0,0 +1,67 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Viennarna(AutotoolsPackage): + """The ViennaRNA Package consists of a C code library and several + stand-alone programs for the prediction and comparison of RNA secondary + structures.""" + + homepage = "https://www.tbi.univie.ac.at/RNA/" + url = "https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_3_x/ViennaRNA-2.3.5.tar.gz" + + version('2.3.5', '4542120adae9b7abb605e2304c2a1326') + + variant('sse', default=True, description='Enable SSE in order to substantially speed up execution') + variant('perl', default=True, description='Build ViennaRNA with Perl interface') + variant('python', default=True, description='Build ViennaRNA with Python interface') + + depends_on('perl', type=('build', 'run')) + depends_on('python', type=('build', 'run')) + depends_on('libsvm') + depends_on('gsl') + + def url_for_version(self, version): + url = 'https://www.tbi.univie.ac.at/RNA/download/sourcecode/{0}_x/ViennaRNA-{1}.tar.gz' + return url.format(version.up_to(2).underscored, version) + + def configure_args(self): + args = [] + if '+sse' in self.spec: + args.append('--enable-sse') + else: + args.append('--disable-sse') + if '~python' in self.spec: + args.append('--without-python') + else: + args.append('--with-python') + if '~perl' in self.spec: + args.append('--without-perl') + else: + args.append('--with-perl') + if 'python@3:' in self.spec: + args.append('--with-python3') + return args diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py index 6756d0427b7..bd5879e68a0 100644 --- a/var/spack/repos/builtin/packages/votca-csg/package.py +++ b/var/spack/repos/builtin/packages/votca-csg/package.py @@ -39,16 +39,7 @@ class VotcaCsg(CMakePackage): version('develop', git='https://github.com/votca/csg', branch='master') version('1.4', 'd009e761e5e3afd51eed89c420610a67') - variant('debug', default=False, description='Build debug version') - depends_on("cmake@2.8:", type='build') depends_on("votca-tools@1.4:1.4.999", when='@1.4:1.4.999') depends_on("votca-tools@develop", when='@develop') depends_on("gromacs~mpi@5.1:") - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/votca-ctp/package.py b/var/spack/repos/builtin/packages/votca-ctp/package.py index 81586b18e64..8ace1804873 100644 --- a/var/spack/repos/builtin/packages/votca-ctp/package.py +++ b/var/spack/repos/builtin/packages/votca-ctp/package.py @@ -39,16 +39,7 @@ class VotcaCtp(CMakePackage): version('develop', git='https://github.com/votca/ctp', branch='master') - variant('debug', default=False, description='Build debug version') - depends_on("cmake@2.8:", type='build') depends_on("votca-tools@develop", when='@develop') depends_on("votca-csg@develop", when='@develop') depends_on("votca-moo@develop", when='@develop') - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/votca-moo/package.py b/var/spack/repos/builtin/packages/votca-moo/package.py index a596ba1c9c4..dfbef140eb1 100644 --- a/var/spack/repos/builtin/packages/votca-moo/package.py +++ b/var/spack/repos/builtin/packages/votca-moo/package.py @@ -39,14 +39,5 @@ class VotcaMoo(CMakePackage): version('develop', git='https://github.com/votca/moo', branch='master') - variant('debug', default=False, description='Build debug version') - depends_on("cmake@2.8:", type='build') depends_on("votca-tools@develop", when='@develop') - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 39055c45a3e..d2acac87369 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -39,18 +39,9 @@ class VotcaTools(CMakePackage): version('develop', git='https://github.com/votca/tools', branch='master') version('1.4', 'cd47868e9f28e2c7b9d01f95aa0185ca') - variant('debug', default=False, description='Build debug version') - depends_on("cmake@2.8:", type='build') depends_on("expat") depends_on("fftw") depends_on("gsl") depends_on("boost") depends_on("sqlite") - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py index 951df7b8c6a..80cd4802e38 100644 --- a/var/spack/repos/builtin/packages/votca-xtp/package.py +++ b/var/spack/repos/builtin/packages/votca-xtp/package.py @@ -39,17 +39,8 @@ class VotcaXtp(CMakePackage): version('develop', git='https://github.com/votca/xtp', branch='master') - variant('debug', default=False, description='Build debug version') - depends_on("cmake@2.8:", type='build') depends_on("votca-tools@develop", when='@develop') depends_on("votca-csg@develop", when='@develop') depends_on("votca-ctp@develop", when='@develop') depends_on("votca-moo@develop", when='@develop') - - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' diff --git a/var/spack/repos/builtin/packages/vpic/package.py b/var/spack/repos/builtin/packages/vpic/package.py index e24aa9e5306..43083d813e0 100644 --- a/var/spack/repos/builtin/packages/vpic/package.py +++ b/var/spack/repos/builtin/packages/vpic/package.py @@ -40,18 +40,9 @@ class Vpic(CMakePackage): version('develop', git='https://github.com/lanl/vpic', branch='master', submodules=True) - variant('debug', default=False, description='Build debug version') - depends_on("cmake@3.1:", type='build') depends_on('mpi') - def build_type(self): - spec = self.spec - if '+debug' in spec: - return 'Debug' - else: - return 'Release' - def cmake_args(self): options = ['-DENABLE_INTEGRATED_TESTS=ON', '-DENABLE_UNIT_TESTS=ON'] diff --git a/var/spack/repos/builtin/packages/xsdktrilinos/package.py b/var/spack/repos/builtin/packages/xsdktrilinos/package.py index 0d70baabcd1..cf3d425313c 100644 --- a/var/spack/repos/builtin/packages/xsdktrilinos/package.py +++ b/var/spack/repos/builtin/packages/xsdktrilinos/package.py @@ -45,20 +45,18 @@ class Xsdktrilinos(CMakePackage): description='Compile with PETSc solvers') variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, - description='Builds a debug version of the libraries') # MPI related dependencies depends_on('mpi') depends_on('hypre~internal-superlu', when='+hypre') depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre') - depends_on('hypre@develop~internal-superlu', when='@develop+hypre') + depends_on('hypre@develop~internal-superlu', when='@develop+hypre') depends_on('petsc@xsdk-0.2.0+mpi~complex', when='@xsdk-0.2.0+petsc') - depends_on('petsc@develop+mpi~complex', when='@develop+petsc') + depends_on('petsc@develop+mpi~complex', when='@develop+petsc') depends_on('trilinos@12.6.4', when='@12.6.4') depends_on('trilinos@12.8.1', when='@12.8.1') depends_on('trilinos@xsdk-0.2.0', when='@xsdk-0.2.0') - depends_on('trilinos@develop', when='@develop') + depends_on('trilinos@develop', when='@develop') def url_for_version(self, version): url = "https://github.com/trilinos/xSDKTrilinos/archive/trilinos-release-{0}.tar.gz" @@ -75,8 +73,6 @@ def cmake_args(self): '-DxSDKTrilinos_ENABLE_TESTS:BOOL=ON', '-DxSDKTrilinos_ENABLE_EXAMPLES:BOOL=ON', '-DTrilinos_INSTALL_DIR=%s' % spec['trilinos'].prefix, - '-DCMAKE_BUILD_TYPE:STRING=%s' % ( - 'DEBUG' if '+debug' in spec else 'RELEASE'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ( 'ON' if '+shared' in spec else 'OFF'), '-DTPL_ENABLE_MPI:BOOL=ON', diff --git a/var/spack/repos/builtin/packages/zstd/package.py b/var/spack/repos/builtin/packages/zstd/package.py index 7cd5d6785d7..0551ff81631 100644 --- a/var/spack/repos/builtin/packages/zstd/package.py +++ b/var/spack/repos/builtin/packages/zstd/package.py @@ -25,7 +25,7 @@ from spack import * -class Zstd(Package): +class Zstd(MakefilePackage): """Zstandard, or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios.""" @@ -33,10 +33,8 @@ class Zstd(Package): homepage = "http://facebook.github.io/zstd/" url = "https://github.com/facebook/zstd/archive/v1.1.2.tar.gz" + version('1.3.0', '888660a850e33c2dcc7c4f9d0b04d347') version('1.1.2', '4c57a080d194bdaac83f2d3251fc7ffc') def install(self, spec, prefix): - make() - if self.run_tests: - make('test') make('install', 'PREFIX={0}'.format(prefix))