+ Provide two new variants for cmake:
1) +qt - build the cmake-gui Qt application. - adds a dependency on Qt. 2) +sphinxbuild - build the html CMake documentation. - adds a dependency on python and py-sphinx
This commit is contained in:
parent
21181075b4
commit
8174489787
1 changed files with 22 additions and 4 deletions
|
@ -37,16 +37,34 @@ class Cmake(Package):
|
||||||
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
|
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
|
||||||
|
|
||||||
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
|
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
|
||||||
|
variant('qt', default=False, description='Enables the build of cmake-gui')
|
||||||
|
variant('sphinxbuild', default=False, description='Enables the generation of html and man page documentation')
|
||||||
|
|
||||||
depends_on('ncurses', when='+ncurses')
|
depends_on('ncurses', when='+ncurses')
|
||||||
|
depends_on('qt', when='+qt')
|
||||||
|
depends_on('python@2.7.11:', when='+sphinxbuild')
|
||||||
|
depends_on('py-sphinx', when='+sphinxbuild')
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
"""Handle CMake's version-based custom URLs."""
|
"""Handle CMake's version-based custom URLs."""
|
||||||
return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version)
|
return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version)
|
||||||
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure('--prefix=' + prefix,
|
|
||||||
'--parallel=' + str(make_jobs),
|
options = ['--prefix=%s' % prefix]
|
||||||
'--', '-DCMAKE_USE_OPENSSL=ON')
|
options.append('--parallel=%s' % str(make_jobs))
|
||||||
|
|
||||||
|
if '+qt' in spec:
|
||||||
|
options.append('--qt-gui')
|
||||||
|
|
||||||
|
if '+sphinxbuild' in spec:
|
||||||
|
options.append('--sphinx-html')
|
||||||
|
options.append('--sphinx-man')
|
||||||
|
|
||||||
|
options.append('--')
|
||||||
|
options.append('-DCMAKE_USE_OPENSSL=ON')
|
||||||
|
|
||||||
|
configure(*options)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
make('install')
|
make('install')
|
||||||
|
|
Loading…
Reference in a new issue