Merge pull request #526 from KineticTheory/develop

Provide instructions for cmake/3.5.0 (plus 2 new variants) and qt/5.4.2
This commit is contained in:
Todd Gamblin 2016-03-11 09:20:47 -08:00
commit 4574f768ef
2 changed files with 39 additions and 3 deletions

View File

@ -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')

View File

@ -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')