summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-11 09:20:47 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-11 09:20:47 -0800
commit4574f768ef0c020fdc9f7846417db5615e931a6e (patch)
treee3ac29e7e8bbf1ecc6fb625d342389a5958f7f75 /var
parentf40c78a06448bc0c7998b24b3e2161f63a7680bc (diff)
parentf5e8857c5e44719778e531bcc149c9fe228240b3 (diff)
downloadspack-4574f768ef0c020fdc9f7846417db5615e931a6e.tar.gz
spack-4574f768ef0c020fdc9f7846417db5615e931a6e.tar.bz2
spack-4574f768ef0c020fdc9f7846417db5615e931a6e.tar.xz
spack-4574f768ef0c020fdc9f7846417db5615e931a6e.zip
Merge pull request #526 from KineticTheory/develop
Provide instructions for cmake/3.5.0 (plus 2 new variants) and qt/5.4.2
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py39
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py3
2 files changed, 39 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index e20c1e4aeb..cc93c7067c 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -30,6 +30,7 @@ class Cmake(Package):
homepage = 'https://www.cmake.org'
url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz'
+ version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e')
version('3.4.3', '4cb3ff35b2472aae70f542116d616e63')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8')
version('3.3.1', '52638576f4e1e621fed6c3410d3a1b12')
@@ -37,16 +38,48 @@ class Cmake(Package):
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
+ 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')
+
depends_on('ncurses', when='+ncurses')
+ depends_on('qt', when='+qt')
+ depends_on('python@2.7.11:', when='+doc')
+ depends_on('py-sphinx', when='+doc')
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version)
+ def validate(self, spec):
+ """
+ Checks if incompatible versions of qt were specified
+
+ :param spec: spec of the package
+ :raises RuntimeError: in case of inconsistencies
+ """
+
+ if '+qt' in spec and spec.satisfies('^qt@5.4.0'):
+ msg = 'qt-5.4.0 has broken CMake modules.'
+ raise RuntimeError(msg)
def install(self, spec, prefix):
- configure('--prefix=' + prefix,
- '--parallel=' + str(make_jobs),
- '--', '-DCMAKE_USE_OPENSSL=ON')
+ # Consistency check
+ self.validate(spec)
+
+ # configure, build, install:
+ options = ['--prefix=%s' % prefix]
+ options.append('--parallel=%s' % str(make_jobs))
+
+ if '+qt' in spec:
+ options.append('--qt-gui')
+
+ if '+doc' in spec:
+ options.append('--sphinx-html')
+ options.append('--sphinx-man')
+
+ options.append('--')
+ options.append('-DCMAKE_USE_OPENSSL=ON')
+
+ configure(*options)
make()
make('install')
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 91afa420c1..ef5f05601f 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -8,6 +8,9 @@ class Qt(Package):
list_url = 'http://download.qt-project.org/official_releases/qt/'
list_depth = 2
+ version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5',
+ url='http://download.qt-project.org/official_releases/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz')
+
version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6',
url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz')