qt: add 5.10.0, fix macOS build, clean-up comments/TODOs (#6766)
* qt: add 5.10.0, fix macOS build, clean-up comments/TODOs * qt: fix pkgconfig files * qt: restore-pc-files.patch * add version constraint to the patch * qt: adjust url_for_version for 5.10.0
This commit is contained in:
parent
70d589a14e
commit
cef711458e
@ -36,6 +36,7 @@ class Qt(Package):
|
||||
list_url = 'http://download.qt.io/archive/qt/'
|
||||
list_depth = 3
|
||||
|
||||
version('5.10.0', 'c5e275ab0ed7ee61d0f4b82cd471770d')
|
||||
version('5.9.1', '77b4af61c49a09833d4df824c806acaf')
|
||||
version('5.9.0', '9c8bc8b828c2b56721980368266df9d9')
|
||||
version('5.8.0', 'a9f2494f75f966e2f22358ec367d8f41')
|
||||
@ -66,6 +67,10 @@ class Qt(Package):
|
||||
variant('opengl', default=False,
|
||||
description="Build with OpenGL support.")
|
||||
|
||||
# fix installation of pkgconfig files
|
||||
# see https://github.com/Homebrew/homebrew-core/pull/5951
|
||||
patch('restore-pc-files.patch', when='@5.9: platform=darwin')
|
||||
|
||||
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
|
||||
|
||||
# see https://bugreports.qt.io/browse/QTBUG-57656
|
||||
@ -96,12 +101,24 @@ class Qt(Package):
|
||||
depends_on("libmng")
|
||||
depends_on("jpeg")
|
||||
depends_on("icu4c")
|
||||
depends_on("fontconfig")
|
||||
depends_on("fontconfig", when=(sys.platform != 'darwin')) # (Unix only)
|
||||
depends_on("freetype")
|
||||
# FIXME:
|
||||
# depends_on("freetype", when='@5.8:') and '-system-freetype'
|
||||
# -system-harfbuzz
|
||||
# -system-pcre
|
||||
|
||||
# Core options:
|
||||
# -doubleconversion [system/qt/no]
|
||||
# -iconv [posix/sun/gnu/no] (Unix only)
|
||||
# -pcre [system/qt]
|
||||
|
||||
# Gui, printing, widget options:
|
||||
# -harfbuzz [system/qt/no]
|
||||
# -xkbcommon-x11 [system/qt/no]
|
||||
# -system-xkbcommon
|
||||
|
||||
# Database options:
|
||||
# -sqlite [system/qt]
|
||||
|
||||
# Qt3D options:
|
||||
# -assimp [system/qt/no]
|
||||
|
||||
# QtQml
|
||||
depends_on("python", when='@5.7.0:', type='build')
|
||||
@ -121,6 +138,17 @@ class Qt(Package):
|
||||
# depends_on("pulse", when='+multimedia')
|
||||
# depends_on("flac", when='+multimedia')
|
||||
# depends_on("ogg", when='+multimedia')
|
||||
# -pulseaudio [auto] (Unix only)
|
||||
# -alsa [auto] (Unix only)
|
||||
|
||||
# Webengine options:
|
||||
# -webengine-alsa [auto] (Linux only)
|
||||
# -webengine-pulseaudio [auto] (Linux only)
|
||||
# -webengine-embedded-build [auto] (Linux only)
|
||||
# -webengine-icu [system/qt] (Linux only)
|
||||
# -webengine-ffmpeg [system/qt] (Linux only)
|
||||
# -webengine-opus [system/qt] (Linux only)
|
||||
# -webengine-webp [system/qt] (Linux only)
|
||||
|
||||
use_xcode = True
|
||||
|
||||
@ -146,7 +174,9 @@ def url_for_version(self, version):
|
||||
elif version >= Version('2.1'):
|
||||
url += 'x11-'
|
||||
|
||||
if version >= Version('4.0'):
|
||||
if version >= Version('5.10.0'):
|
||||
url += 'src-'
|
||||
elif version >= Version('4.0'):
|
||||
url += 'opensource-src-'
|
||||
elif version >= Version('3'):
|
||||
url += 'free-'
|
||||
@ -198,6 +228,7 @@ def patch(self):
|
||||
|
||||
@property
|
||||
def common_config_args(self):
|
||||
# incomplete list is here http://doc.qt.io/qt-5/configure-options.html
|
||||
config_args = [
|
||||
'-prefix', self.prefix,
|
||||
'-v',
|
||||
@ -208,12 +239,14 @@ def common_config_args(self):
|
||||
'-confirm-license',
|
||||
'-openssl-linked',
|
||||
'-optimized-qmake',
|
||||
'-fontconfig',
|
||||
'-system-freetype',
|
||||
'-I{0}/freetype2'.format(self.spec['freetype'].prefix.include),
|
||||
'-no-pch'
|
||||
]
|
||||
|
||||
if sys.platform != 'darwin':
|
||||
config_args.append('-fontconfig')
|
||||
|
||||
if '@:5.7.1' in self.spec:
|
||||
config_args.append('-no-openvg')
|
||||
else:
|
||||
@ -255,6 +288,8 @@ def common_config_args(self):
|
||||
'-no-alsa',
|
||||
])
|
||||
|
||||
# FIXME: else: -system-xcb ?
|
||||
|
||||
if '@4' in self.spec and sys.platform == 'darwin':
|
||||
config_args.append('-cocoa')
|
||||
|
||||
|
15
var/spack/repos/builtin/packages/qt/restore-pc-files.patch
Normal file
15
var/spack/repos/builtin/packages/qt/restore-pc-files.patch
Normal file
@ -0,0 +1,15 @@
|
||||
Partially reverts <https://codereview.qt-project.org/#/c/140954/>.
|
||||
|
||||
diff --git i/qtbase/mkspecs/features/qt_module.prf w/qtbase/mkspecs/features/qt_module.prf
|
||||
index bb28af97..36bb6483 100644
|
||||
--- i/qtbase/mkspecs/features/qt_module.prf
|
||||
+++ w/qtbase/mkspecs/features/qt_module.prf
|
||||
@@ -245,7 +245,7 @@ load(qt_installs)
|
||||
load(qt_targets)
|
||||
|
||||
# this builds on top of qt_common
|
||||
-!internal_module:!lib_bundle:if(unix|mingw) {
|
||||
+!internal_module:if(unix|mingw) {
|
||||
CONFIG += create_pc
|
||||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||
host_build: \
|
Loading…
Reference in New Issue
Block a user