Skip to content
Snippets Groups Projects
Commit 1ec3c14d authored by Michael Kuhn's avatar Michael Kuhn Committed by Adam J. Stewart
Browse files

Improve qt (#4309)

- Introduce an opengl variant that is enabled by default. Disabling it
  allows building qt for X forwarding etc.
- Depend on fontconfig and freetype to make use of system fonts.
  Otherwise qt can not find any fonts.
- libx11 is required when libxcb is used.
- Set MAKEFLAGS to parallelize qmake compilation.
parent f06c23ef
Branches
Tags
No related merge requests found
...@@ -62,6 +62,8 @@ class Qt(Package): ...@@ -62,6 +62,8 @@ class Qt(Package):
description="Build with D-Bus support.") description="Build with D-Bus support.")
variant('phonon', default=False, variant('phonon', default=False,
description="Build with phonon support.") description="Build with phonon support.")
variant('opengl', default=True,
description="Build with OpenGL support.")
patch('qt3krell.patch', when='@3.3.8b+krellpatch') patch('qt3krell.patch', when='@3.3.8b+krellpatch')
...@@ -93,6 +95,8 @@ class Qt(Package): ...@@ -93,6 +95,8 @@ class Qt(Package):
depends_on("libmng") depends_on("libmng")
depends_on("jpeg") depends_on("jpeg")
depends_on("icu4c") depends_on("icu4c")
depends_on("fontconfig")
depends_on("freetype")
# FIXME: # FIXME:
# depends_on("freetype", when='@5.8:') and '-system-freetype' # depends_on("freetype", when='@5.8:') and '-system-freetype'
# -system-harfbuzz # -system-harfbuzz
...@@ -104,12 +108,12 @@ class Qt(Package): ...@@ -104,12 +108,12 @@ class Qt(Package):
# 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')
depends_on("libx11", when=sys.platform != 'darwin')
# Webkit # Webkit
depends_on("flex", when='+webkit', type='build') depends_on("flex", when='+webkit', type='build')
depends_on("bison", when='+webkit', type='build') depends_on("bison", when='+webkit', type='build')
depends_on("gperf", when='+webkit') depends_on("gperf", when='+webkit')
depends_on("fontconfig", when='+webkit')
# Multimedia # Multimedia
# depends_on("gstreamer", when='+multimedia') # depends_on("gstreamer", when='+multimedia')
...@@ -151,6 +155,7 @@ def url_for_version(self, version): ...@@ -151,6 +155,7 @@ def url_for_version(self, version):
return url return url
def setup_environment(self, spack_env, run_env): def setup_environment(self, spack_env, run_env):
spack_env.set('MAKEFLAGS', '-j{0}'.format(make_jobs))
run_env.set('QTDIR', self.prefix) run_env.set('QTDIR', self.prefix)
def setup_dependent_environment(self, spack_env, run_env, dependent_spec): def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
...@@ -192,12 +197,15 @@ def common_config_args(self): ...@@ -192,12 +197,15 @@ def common_config_args(self):
'-prefix', self.prefix, '-prefix', self.prefix,
'-v', '-v',
'-opensource', '-opensource',
'-opengl', '-{0}opengl'.format('' if '+opengl' in self.spec else 'no-'),
'-release', '-release',
'-shared', '-shared',
'-confirm-license', '-confirm-license',
'-openssl-linked', '-openssl-linked',
'-optimized-qmake', '-optimized-qmake',
'-fontconfig',
'-system-freetype',
'-I{0}/freetype2'.format(self.spec['freetype'].prefix.include),
'-no-pch' '-no-pch'
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment