summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch23
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py58
-rw-r--r--var/spack/repos/builtin/packages/expat/package.py17
-rw-r--r--var/spack/repos/builtin/packages/jsoncpp/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libarchive/package.py20
-rw-r--r--var/spack/repos/builtin/packages/libxml2/package.py16
-rw-r--r--var/spack/repos/builtin/packages/lz4/package.py45
-rw-r--r--var/spack/repos/builtin/packages/lzma/package.py49
-rw-r--r--var/spack/repos/builtin/packages/lzo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/nettle/package.py10
-rw-r--r--var/spack/repos/builtin/packages/xz/package.py7
-rw-r--r--var/spack/repos/builtin/packages/zlib/package.py6
12 files changed, 264 insertions, 40 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch b/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch
new file mode 100644
index 0000000000..afe6f871ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch
@@ -0,0 +1,23 @@
+diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
+index eb9602a..edca154 100644
+--- a/Modules/Compiler/Intel-C.cmake
++++ b/Modules/Compiler/Intel-C.cmake
+@@ -16,14 +16,14 @@ endif()
+
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
+ set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11")
+- set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11")
++ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11")
+ endif()
+
+-if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
++if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
+ set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89")
+- set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=c89")
++ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=gnu89")
+ set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99")
+- set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=c99")
++ set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=gnu99")
+ endif()
+
+ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index 6b46d8a9ae..0c16adcef7 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -42,19 +42,28 @@ class Cmake(Package):
version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f')
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
- variant('ncurses', default=True,
- description='Enables the build of the ncurses gui')
- variant('openssl', default=True,
- description="Enables CMake's OpenSSL features")
- variant('qt', default=False, description='Enables the build of cmake-gui')
- variant('doc', default=False,
- description='Enables the generation of html and man page docs')
-
- depends_on('ncurses', when='+ncurses')
- depends_on('openssl', when='+openssl')
- depends_on('qt', when='+qt')
+ variant('ownlibs', default=False, description='Use CMake-provided third-party libraries')
+ variant('qt', default=False, description='Enables the build of cmake-gui')
+ variant('doc', default=False, description='Enables the generation of html and man page documentation')
+ variant('openssl', default=True, description="Enables CMake's OpenSSL features")
+ variant('ncurses', default=True, description='Enables the build of the ncurses gui')
+
+ depends_on('curl', when='~ownlibs')
+ depends_on('expat', when='~ownlibs')
+ # depends_on('jsoncpp', when='~ownlibs') # circular dependency
+ depends_on('zlib', when='~ownlibs')
+ depends_on('bzip2', when='~ownlibs')
+ depends_on('xz', when='~ownlibs')
+ depends_on('libarchive', when='~ownlibs')
+ depends_on('qt', when='+qt')
depends_on('python@2.7.11:', when='+doc', type='build')
- depends_on('py-sphinx', when='+doc', type='build')
+ depends_on('py-sphinx', when='+doc', type='build')
+ depends_on('openssl', when='+openssl')
+ depends_on('ncurses', when='+ncurses')
+
+ # Cannot build with Intel, should be fixed in 3.6.2
+ # https://gitlab.kitware.com/cmake/cmake/issues/16226
+ patch('intel-c-gnu11.patch', when='@3.6.0:3.6.1')
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
@@ -77,12 +86,25 @@ class Cmake(Package):
# Consistency check
self.validate(spec)
- # configure, build, install:
- options = ['--prefix=%s' % prefix]
- options.append('--parallel=%s' % str(make_jobs))
+ options = [
+ '--prefix={0}'.format(prefix),
+ '--parallel={0}'.format(make_jobs),
+ # jsoncpp requires CMake to build
+ # use CMake-provided library to avoid circular dependency
+ '--no-system-jsoncpp'
+ ]
+
+ if '+ownlibs' in spec:
+ # Build and link to the CMake-provided third-party libraries
+ options.append('--no-system-libs')
+ else:
+ # Build and link to the Spack-installed third-party libraries
+ options.append('--system-libs')
if '+qt' in spec:
options.append('--qt-gui')
+ else:
+ options.append('--no-qt-gui')
if '+doc' in spec:
options.append('--sphinx-html')
@@ -92,6 +114,10 @@ class Cmake(Package):
options.append('--')
options.append('-DCMAKE_USE_OPENSSL=ON')
- configure(*options)
+ bootstrap = Executable('./bootstrap')
+ bootstrap(*options)
+
make()
+ if self.run_tests:
+ make('test') # some tests fail, takes forever
make('install')
diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py
index 7d0fdae1d4..0262bf1e3f 100644
--- a/var/spack/repos/builtin/packages/expat/package.py
+++ b/var/spack/repos/builtin/packages/expat/package.py
@@ -28,15 +28,16 @@ from spack import *
class Expat(Package):
"""<eXpat/> is an XML parser library written in C"""
homepage = "http://expat.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz"
- version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd')
-
- depends_on('cmake', type='build')
+ version('2.2.0', '2f47841c829facb346eb6e3fab5212e2',
+ url="http://downloads.sourceforge.net/project/expat/expat/2.2.0/expat-2.2.0.tar.bz2")
+ version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd',
+ url="http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz")
def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make('install')
+ make()
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/jsoncpp/package.py b/var/spack/repos/builtin/packages/jsoncpp/package.py
new file mode 100644
index 0000000000..5169b338ee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/jsoncpp/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Jsoncpp(Package):
+ """JsonCpp is a C++ library that allows manipulating JSON values,
+ including serialization and deserialization to and from strings.
+ It can also preserve existing comment in unserialization/serialization
+ steps, making it a convenient format to store user input files."""
+
+ homepage = "https://github.com/open-source-parsers/jsoncpp"
+ url = "https://github.com/open-source-parsers/jsoncpp/archive/1.7.3.tar.gz"
+
+ version('1.7.3', 'aff6bfb5b81d9a28785429faa45839c5')
+
+ depends_on('cmake', type='build')
+ # depends_on('python', type='test')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('..', '-DBUILD_SHARED_LIBS=ON', *std_cmake_args)
+
+ make()
+ if self.run_tests:
+ make('test') # Python needed to run tests
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py
index 0cf3932957..e439bf894f 100644
--- a/var/spack/repos/builtin/packages/libarchive/package.py
+++ b/var/spack/repos/builtin/packages/libarchive/package.py
@@ -28,14 +28,30 @@ from spack import *
class Libarchive(Package):
"""libarchive: C library and command-line tools for reading and
writing tar, cpio, zip, ISO, and other archive formats."""
+
homepage = "http://www.libarchive.org"
url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"
+ version('3.2.1', 'afa257047d1941a565216edbf0171e72')
version('3.1.2', 'efad5a503f66329bb9d2f4308b5de98a')
version('3.1.1', '1f3d883daf7161a0065e42a15bbf168f')
version('3.1.0', '095a287bb1fd687ab50c85955692bf3a')
+ depends_on('zlib')
+ depends_on('bzip2')
+ depends_on('lzma')
+ depends_on('lz4')
+ depends_on('xz')
+ depends_on('lzo')
+ depends_on('nettle')
+ depends_on('openssl')
+ depends_on('libxml2')
+ depends_on('expat')
+
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ if self.run_tests:
+ make('check') # cannot build test suite with Intel compilers
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py
index 0f4810fa8a..0b55fe4d30 100644
--- a/var/spack/repos/builtin/packages/libxml2/package.py
+++ b/var/spack/repos/builtin/packages/libxml2/package.py
@@ -32,6 +32,7 @@ class Libxml2(Package):
homepage = "http://xmlsoft.org"
url = "http://xmlsoft.org/sources/libxml2-2.9.2.tar.gz"
+ version('2.9.4', 'ae249165c173b1ff386ee8ad676815f5')
version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788')
variant('python', default=False, description='Enable Python support')
@@ -44,13 +45,16 @@ class Libxml2(Package):
def install(self, spec, prefix):
if '+python' in spec:
- python_args = ["--with-python=%s" % spec['python'].prefix,
- "--with-python-install-dir=%s" % site_packages_dir]
+ python_args = [
+ '--with-python={0}'.format(spec['python'].prefix),
+ '--with-python-install-dir={0}'.format(site_packages_dir)
+ ]
else:
- python_args = ["--without-python"]
+ python_args = ['--without-python']
- configure("--prefix=%s" % prefix,
- *python_args)
+ configure('--prefix={0}'.format(prefix), *python_args)
make()
- make("install")
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/lz4/package.py b/var/spack/repos/builtin/packages/lz4/package.py
new file mode 100644
index 0000000000..de7e566e70
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lz4/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Lz4(Package):
+ """LZ4 is lossless compression algorithm, providing compression speed
+ at 400 MB/s per core, scalable with multi-cores CPU. It also features
+ an extremely fast decoder, with speed in multiple GB/s per core,
+ typically reaching RAM speed limits on multi-core systems."""
+
+ homepage = "http://cyan4973.github.io/lz4/"
+ url = "https://github.com/Cyan4973/lz4/archive/r131.tar.gz"
+
+ version('131', '42b09fab42331da9d3fb33bd5c560de9')
+
+ # depends_on('valgrind', type='test')
+
+ def install(self, spec, prefix):
+ make()
+ if self.run_tests:
+ make('test') # requires valgrind to be installed
+ make('install', 'PREFIX={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/lzma/package.py b/var/spack/repos/builtin/packages/lzma/package.py
new file mode 100644
index 0000000000..23d697ffe8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lzma/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Lzma(Package):
+ """LZMA Utils are legacy data compression software with high compression
+ ratio. LZMA Utils are no longer developed, although critical bugs may be
+ fixed as long as fixing them doesn't require huge changes to the code.
+
+ Users of LZMA Utils should move to XZ Utils. XZ Utils support the legacy
+ .lzma format used by LZMA Utils, and can also emulate the command line
+ tools of LZMA Utils. This should make transition from LZMA Utils to XZ
+ Utils relatively easy."""
+
+ homepage = "http://tukaani.org/lzma/"
+ url = "http://tukaani.org/lzma/lzma-4.32.7.tar.gz"
+
+ version('4.32.7', '2a748b77a2f8c3cbc322dbd0b4c9d06a')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ if self.run_tests:
+ make('check') # one of the tests fails for me
+ make('install')
diff --git a/var/spack/repos/builtin/packages/lzo/package.py b/var/spack/repos/builtin/packages/lzo/package.py
index 0961bbb58c..172e57d0cd 100644
--- a/var/spack/repos/builtin/packages/lzo/package.py
+++ b/var/spack/repos/builtin/packages/lzo/package.py
@@ -45,5 +45,7 @@ class Lzo(Package):
]
configure(*configure_args)
make()
- make('check')
+ if self.run_tests:
+ make('check')
+ make('test') # more exhaustive test
make('install')
diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py
index 02e9ef5f1e..b4c873a8a1 100644
--- a/var/spack/repos/builtin/packages/nettle/package.py
+++ b/var/spack/repos/builtin/packages/nettle/package.py
@@ -29,14 +29,18 @@ class Nettle(Package):
"""The Nettle package contains the low-level cryptographic library
that is designed to fit easily in many contexts."""
- homepage = "http://www.example.com"
+ homepage = "https://www.lysator.liu.se/~nisse/nettle/"
url = "http://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz"
+ version('3.2', 'afb15b4764ebf1b4e6d06c62bd4d29e4')
version('2.7', '2caa1bd667c35db71becb93c5d89737f')
depends_on('gmp')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py
index a8ab959a62..8b0609f50e 100644
--- a/var/spack/repos/builtin/packages/xz/package.py
+++ b/var/spack/repos/builtin/packages/xz/package.py
@@ -37,6 +37,9 @@ class Xz(Package):
version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py
index 6d799fb05a..6f4d8a5bb8 100644
--- a/var/spack/repos/builtin/packages/zlib/package.py
+++ b/var/spack/repos/builtin/packages/zlib/package.py
@@ -35,7 +35,9 @@ class Zlib(Package):
version('1.2.8', '44d667c142d7cda120332623eab69f40')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
make()
- make("install")
+ if self.run_tests:
+ make('test')
+ make('install')