Update Package : Qt (Add 'WebKit' Support) (#1455)
* Added the '+webkit' variant to the 'qt' package. * Made 'qmake' an available executable to 'qt' depdendents.
This commit is contained in:
parent
79c20a7edd
commit
6464d6682c
@ -6,7 +6,7 @@
|
|||||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||||
# LLNL-CODE-647188
|
# LLNL-CODE-647188
|
||||||
#
|
#
|
||||||
# For details, see https://github.com/llnl/spack # NOQA: ignore=E501
|
# For details, see https://github.com/llnl/spack
|
||||||
# Please also see the LICENSE file for our notice and the LGPL.
|
# Please also see the LICENSE file for our notice and the LGPL.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
class Qt(Package):
|
class Qt(Package):
|
||||||
"""Qt is a comprehensive cross-platform C++ application framework."""
|
"""Qt is a comprehensive cross-platform C++ application framework."""
|
||||||
homepage = 'http://qt.io' # NOQA: ignore=E501
|
homepage = 'http://qt.io'
|
||||||
url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz' # NOQA: ignore=E501
|
url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz'
|
||||||
list_url = 'http://download.qt.io/archive/qt/' # NOQA: ignore=E501
|
list_url = 'http://download.qt.io/archive/qt/'
|
||||||
list_depth = 4
|
list_depth = 4
|
||||||
|
|
||||||
version('5.7.0', '9a46cce61fc64c20c3ac0a0e0fa41b42')
|
version('5.7.0', '9a46cce61fc64c20c3ac0a0e0fa41b42')
|
||||||
@ -48,12 +48,13 @@ class Qt(Package):
|
|||||||
variant('krellpatch', default=False, description="Build with openspeedshop based patch.")
|
variant('krellpatch', default=False, description="Build with openspeedshop based patch.")
|
||||||
variant('mesa', default=False, description="Depend on mesa.")
|
variant('mesa', default=False, description="Depend on mesa.")
|
||||||
variant('gtk', default=False, description="Build with gtkplus.")
|
variant('gtk', default=False, description="Build with gtkplus.")
|
||||||
|
variant('webkit', default=False, description="Build the Webkit extension")
|
||||||
variant('examples', default=False, description="Build examples.")
|
variant('examples', default=False, description="Build examples.")
|
||||||
variant('dbus', default=False, description="Build with D-Bus support.")
|
variant('dbus', default=False, description="Build with D-Bus support.")
|
||||||
|
|
||||||
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
|
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
|
||||||
|
|
||||||
# https://github.com/xboxdrv/xboxdrv/issues/188 # NOQA: ignore=E501
|
# https://github.com/xboxdrv/xboxdrv/issues/188
|
||||||
patch('btn_trigger_happy.patch', when='@5.7.0:')
|
patch('btn_trigger_happy.patch', when='@5.7.0:')
|
||||||
|
|
||||||
patch('qt4-corewlan-new-osx.patch', when='@4')
|
patch('qt4-corewlan-new-osx.patch', when='@4')
|
||||||
@ -62,7 +63,7 @@ class Qt(Package):
|
|||||||
|
|
||||||
# Use system openssl for security.
|
# Use system openssl for security.
|
||||||
depends_on("openssl")
|
depends_on("openssl")
|
||||||
|
depends_on("glib")
|
||||||
depends_on("gtkplus", when='+gtk')
|
depends_on("gtkplus", when='+gtk')
|
||||||
depends_on("libxml2")
|
depends_on("libxml2")
|
||||||
depends_on("zlib")
|
depends_on("zlib")
|
||||||
@ -72,18 +73,24 @@ class Qt(Package):
|
|||||||
depends_on("libpng", when='@4:')
|
depends_on("libpng", when='@4:')
|
||||||
depends_on("libmng")
|
depends_on("libmng")
|
||||||
depends_on("jpeg")
|
depends_on("jpeg")
|
||||||
|
|
||||||
# Webkit
|
|
||||||
# depends_on("gperf")
|
|
||||||
# depends_on("flex", type='build')
|
|
||||||
# depends_on("bison", type='build')
|
|
||||||
# depends_on("ruby", type='build')
|
|
||||||
depends_on("icu4c")
|
depends_on("icu4c")
|
||||||
|
|
||||||
# OpenGL hardware acceleration
|
# OpenGL hardware acceleration
|
||||||
depends_on("mesa", when='@4:+mesa')
|
depends_on("mesa", when='@4:+mesa')
|
||||||
depends_on("libxcb", when=sys.platform != 'darwin')
|
depends_on("libxcb", when=sys.platform != 'darwin')
|
||||||
|
|
||||||
|
# Webkit
|
||||||
|
depends_on("flex", when='+webkit', type='build')
|
||||||
|
depends_on("bison", when='+webkit', type='build')
|
||||||
|
depends_on("gperf", when='+webkit')
|
||||||
|
depends_on("fontconfig", when='+webkit')
|
||||||
|
|
||||||
|
# Multimedia
|
||||||
|
# depends_on("gstreamer", when='+multimedia')
|
||||||
|
# depends_on("pulse", when='+multimedia')
|
||||||
|
# depends_on("flac", when='+multimedia')
|
||||||
|
# depends_on("ogg", when='+multimedia')
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
# URL keeps getting more complicated with every release
|
# URL keeps getting more complicated with every release
|
||||||
url = self.list_url
|
url = self.list_url
|
||||||
@ -115,12 +122,15 @@ def url_for_version(self, version):
|
|||||||
|
|
||||||
return url
|
return url
|
||||||
|
|
||||||
def setup_environment(self, spack_env, env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
env.set('QTDIR', self.prefix)
|
run_env.set('QTDIR', self.prefix)
|
||||||
|
|
||||||
def setup_dependent_environment(self, spack_env, run_env, dspec):
|
def setup_dependent_environment(self, spack_env, run_env, dspec):
|
||||||
spack_env.set('QTDIR', self.prefix)
|
spack_env.set('QTDIR', self.prefix)
|
||||||
|
|
||||||
|
def setup_dependent_package(self, module, ext_spec):
|
||||||
|
module.qmake = Executable(join_path(self.spec.prefix.bin, 'qmake'))
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if self.spec.satisfies('@4'):
|
if self.spec.satisfies('@4'):
|
||||||
# Fix qmake compilers in the default mkspec
|
# Fix qmake compilers in the default mkspec
|
||||||
@ -130,7 +140,7 @@ def patch(self):
|
|||||||
'mkspecs/common/g++-base.conf')
|
'mkspecs/common/g++-base.conf')
|
||||||
|
|
||||||
# Necessary to build with GCC 6 and other modern compilers
|
# Necessary to build with GCC 6 and other modern compilers
|
||||||
# http://stackoverflow.com/questions/10354371/ # NOQA: ignore=E501
|
# http://stackoverflow.com/questions/10354371/
|
||||||
filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98',
|
filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98',
|
||||||
'mkspecs/common/gcc-base.conf')
|
'mkspecs/common/gcc-base.conf')
|
||||||
|
|
||||||
@ -211,7 +221,7 @@ def common_config_args(self):
|
|||||||
# Don't disable all the database drivers, but should
|
# Don't disable all the database drivers, but should
|
||||||
# really get them into spack at some point.
|
# really get them into spack at some point.
|
||||||
|
|
||||||
@when('@3') # NOQA: ignore=F811
|
@when('@3')
|
||||||
def configure(self):
|
def configure(self):
|
||||||
# A user reported that this was necessary to link Qt3 on ubuntu
|
# A user reported that this was necessary to link Qt3 on ubuntu
|
||||||
os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib'
|
os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib'
|
||||||
@ -222,36 +232,40 @@ def configure(self):
|
|||||||
'-release',
|
'-release',
|
||||||
'-fast')
|
'-fast')
|
||||||
|
|
||||||
@when('@4') # NOQA: ignore=F811
|
@when('@4')
|
||||||
def configure(self):
|
def configure(self):
|
||||||
configure('-fast',
|
configure('-fast',
|
||||||
'-no-webkit',
|
'-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'),
|
||||||
'{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'),
|
'-{0}webkit'.format('' if '+webkit' in self.spec else 'no-'),
|
||||||
'-arch', str(self.spec.architecture.target),
|
'-arch', str(self.spec.architecture.target),
|
||||||
*self.common_config_args)
|
*self.common_config_args)
|
||||||
|
|
||||||
@when('@5.0:5.6') # NOQA: ignore=F811
|
@when('@5.0:5.6')
|
||||||
def configure(self):
|
def configure(self):
|
||||||
|
webkit_args = [] if '+webkit' in self.spec else ['-skip', 'qtwebkit']
|
||||||
configure('-no-eglfs',
|
configure('-no-eglfs',
|
||||||
'-no-directfb',
|
'-no-directfb',
|
||||||
'{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'),
|
'-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'),
|
||||||
'-skip', 'qtwebkit',
|
*(webkit_args + self.common_config_args))
|
||||||
*self.common_config_args)
|
|
||||||
|
|
||||||
@when('@5.7:') # NOQA: ignore=F811
|
@when('@5.7:')
|
||||||
def configure(self):
|
def configure(self):
|
||||||
args = self.common_config_args
|
config_args = self.common_config_args
|
||||||
|
|
||||||
if not sys.platform == 'darwin':
|
if not sys.platform == 'darwin':
|
||||||
args.extend([
|
config_args.extend([
|
||||||
'-qt-xcb',
|
'-qt-xcb',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if '~webkit' in self.spec:
|
||||||
|
config_args.extend([
|
||||||
|
'-skip', 'webengine',
|
||||||
|
])
|
||||||
|
|
||||||
configure('-no-eglfs',
|
configure('-no-eglfs',
|
||||||
'-no-directfb',
|
'-no-directfb',
|
||||||
'{0}-gtk'.format('' if '+gtk' in self.spec else '-no'),
|
'-{0}gtk'.format('' if '+gtk' in self.spec else 'no-'),
|
||||||
'-skip', 'webengine',
|
*config_args)
|
||||||
*args)
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
self.configure()
|
self.configure()
|
||||||
|
Loading…
Reference in New Issue
Block a user