From cef711458e5ec7128ba75c6e8945b22f2275c507 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 4 Jan 2018 16:00:01 +0100 Subject: 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 --- var/spack/repos/builtin/packages/qt/package.py | 49 ++++++++++++++++++---- .../builtin/packages/qt/restore-pc-files.patch | 15 +++++++ 2 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 var/spack/repos/builtin/packages/qt/restore-pc-files.patch diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index fe29ced8a9..3f3defeb8c 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -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 @@ class Qt(Package): 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 @@ class Qt(Package): @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 @@ class Qt(Package): '-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 @@ class Qt(Package): '-no-alsa', ]) + # FIXME: else: -system-xcb ? + if '@4' in self.spec and sys.platform == 'darwin': config_args.append('-cocoa') diff --git a/var/spack/repos/builtin/packages/qt/restore-pc-files.patch b/var/spack/repos/builtin/packages/qt/restore-pc-files.patch new file mode 100644 index 0000000000..35fbaddd43 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/restore-pc-files.patch @@ -0,0 +1,15 @@ +Partially reverts . + +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: \ -- cgit v1.2.3-60-g2f50