diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2019-08-01 13:22:35 -0400 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-08-01 10:22:35 -0700 |
commit | 46027bea13572edd8b7134733581c12a6c847867 (patch) | |
tree | 64a0e7e91d1812b7984ea1503ad5641dccf72dd8 | |
parent | 4ff14bd0b239bc6eabfd9d668b09d28699889f7b (diff) | |
download | spack-46027bea13572edd8b7134733581c12a6c847867.tar.gz spack-46027bea13572edd8b7134733581c12a6c847867.tar.bz2 spack-46027bea13572edd8b7134733581c12a6c847867.tar.xz spack-46027bea13572edd8b7134733581c12a6c847867.zip |
Fix QT4 build for mac (#10944)
This updates the Spack QT package to enable building qt version 4 on
MacOS.
This includes the following changes to the qt package:
* add version 4.8.7
* add option to build with or without shared libs
* add options to disable tools, ssl, sql, and freetype support
* add qt4-tools patch when building qt@4+tools
* add option to build as a framework (only available on MacOS)
* replace qt4-el-capitan patch with qt4-mac patch (which includes the
edits from qt4-el-capitan)
* apply qt4-pcre-include-conflict.patch only for version 4.8.6
(rather than all 4.x versions)
* apply qt4-gcc-and-webkit.patch for 4.x versions before 4.8.7 and
create a separate qt4-gcc-and-webkit-487.patch for version 4.8.7
* update patch function for qt@4 on MacOS to update configure
variables relevant to Spack (e.g. PREFIX)
* add option to build freetype with Spack, as a vendored dependency
of QT, or not at all (default is to build with Spack)
This includes the following edits outside of the qt package:
* Update MacOS version utility function to return all parts of the
Mac version (rather than just the first two)
* gettext package: implement "libs"
* python package: add gettext as a dependency
9 files changed, 898 insertions, 207 deletions
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py index a95640ec8a..7ebd1ce8d2 100644 --- a/lib/spack/spack/operating_systems/mac_os.py +++ b/lib/spack/spack/operating_systems/mac_os.py @@ -14,7 +14,7 @@ from spack.util.executable import Executable def macos_version(): """temporary workaround to return a macOS version as a Version object """ - return Version('.'.join(py_platform.mac_ver()[0].split('.')[:2])) + return Version(py_platform.mac_ver()[0]) def macos_sdk_path(): @@ -46,7 +46,7 @@ class MacOs(OperatingSystem): "10.13": "highsierra", "10.14": "mojave"} - mac_ver = '.'.join(py_platform.mac_ver()[0].split('.')[:2]) + mac_ver = str(macos_version().up_to(2)) name = mac_releases.get(mac_ver, "macos") super(MacOs, self).__init__(name, mac_ver) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index c665f50914..bd608c99bb 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -85,3 +85,11 @@ class Gettext(AutotoolsPackage): config_args.append('--with-included-libunistring') return config_args + + @property + def libs(self): + return find_libraries( + ["libasprintf", "libgettextlib", "libgettextpo", "libgettextsrc", + "libintl"], + root=self.prefix, recursive=True + ) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 028dd35c0e..5c49b1af1e 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -107,6 +107,7 @@ class Python(AutotoolsPackage): variant('tix', default=False, description='Build Tix module') depends_on('pkgconfig@0.9.0:', type='build') + depends_on('gettext') # Optional dependencies # See detect_modules() in setup.py for details diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 59c80c521f..20f24e2f2c 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -4,10 +4,12 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * -import platform +from spack.operating_systems.mac_os import macos_version import os import sys +MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None + class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" @@ -17,6 +19,8 @@ class Qt(Package): list_url = 'http://download.qt.io/archive/qt/' list_depth = 3 + phases = ['configure', 'build', 'install'] + version('5.11.3', '859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d') version('5.11.2', 'c6104b840b6caee596fa9a35bc5f57f67ed5a99d6a36497b6fe66f990a53ca81') version('5.10.0', 'c5e275ab0ed7ee61d0f4b82cd471770d') @@ -30,6 +34,7 @@ class Qt(Package): version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6') version('5.3.2', 'febb001129927a70174467ecb508a682') version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8') + version('4.8.7', 'd990ee66bf7ab0c785589776f35ba6ad') version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb') version('4.8.5', '1864987bdbb2f58f8ae8b350dfdbe133') version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009') @@ -44,12 +49,24 @@ class Qt(Package): description="Build the Webkit extension") variant('examples', default=False, description="Build examples.") + variant('framework', default=False, + description="Build as a macOS Framework package.") + variant('tools', default=True, + description="Build tools, including Qt Designer.") variant('dbus', default=False, description="Build with D-Bus support.") variant('phonon', default=False, description="Build with phonon support.") variant('opengl', default=False, description="Build with OpenGL support.") + variant('sql', default=True, + description="Build with SQL support.") + variant('shared', default=True, + description='Build shared libraries.') + variant('ssl', default=True, + description="Build with OpenSSL support.") + variant('freetype', default='spack', description='Freetype2 support', + values=('spack', 'qt', 'none'), multi=False) # fix installation of pkgconfig files # see https://github.com/Homebrew/homebrew-core/pull/5951 @@ -70,15 +87,17 @@ class Qt(Package): # https://github.com/spack/spack/issues/1517 patch('qt5-pcre.patch', when='@5:') - patch('qt4-corewlan-new-osx.patch', when='@4') - patch('qt4-pcre-include-conflict.patch', when='@4') - patch('qt4-el-capitan.patch', when='@4') - - # Allow Qt's configure script to build the webkit option with more - # recent versions of gcc. - # https://github.com/spack/spack/issues/9205 - # https://github.com/spack/spack/issues/9209 - patch('qt4-gcc-and-webkit.patch', when='@4') + patch('qt4-pcre-include-conflict.patch', when='@4.8.6') + patch('qt4-tools.patch', when='@4+tools') + if not MACOS_VERSION: + # Allow Qt's configure script to build the webkit option with more + # recent versions of gcc. + # https://github.com/spack/spack/issues/9205 + # https://github.com/spack/spack/issues/9209 + patch('qt4-gcc-and-webkit.patch', when='@4:4.8.6') + patch('qt4-gcc-and-webkit-487.patch', when='@4.8.7') + else: + patch('qt4-mac.patch', when='@4.8.7') # Fix build failure with newer versions of GCC patch('https://github.com/qt/qtbase/commit/a52d7861edfb5956de38ba80015c4dd0b596259b.patch', @@ -91,84 +110,55 @@ class Qt(Package): patch('qt4-gcc8.3-asm-volatile-fix.patch', when='@4') patch('qt5-gcc8.3-asm-volatile-fix.patch', when='@5.0.0:5.12.1') + # Build-only dependencies depends_on("pkgconfig", type='build') - # Use system openssl for security. - depends_on("openssl@:1.0", when='@:5.9') - depends_on("openssl") - depends_on("glib", when='@4:') - depends_on("gtkplus", when='+gtk') + depends_on("flex", when='+webkit', type='build') + depends_on("bison", when='+webkit', type='build') + depends_on("python", when='@5.7.0:', type='build') + + # Dependencies, then variant- and version-specific dependencies + depends_on("icu4c") + depends_on("jpeg") + depends_on("libmng") + depends_on("libtiff") depends_on("libxml2") depends_on("zlib") - depends_on("dbus", when='@4:+dbus') - depends_on("libtiff") + depends_on("freetype", when='freetype=spack') + depends_on("gperf", when='+webkit') + depends_on("gtkplus", when='+gtk') + depends_on("openssl", when='+ssl') + depends_on("sqlite", when='+sql', type=('build', 'run')) + depends_on("libpng@1.2.57", when='@3') - depends_on("libpng", when='@4:') - depends_on("libmng") - depends_on("jpeg") - depends_on("icu4c") - depends_on("fontconfig", when=(sys.platform != 'darwin')) # (Unix only) - depends_on("freetype") - depends_on("sqlite", type=('build', 'run')) depends_on("pcre+multibyte", when='@5.0:5.8') - depends_on("pcre2+multibyte", when='@5.9:') - depends_on("double-conversion", when='@5.7:') - depends_on("harfbuzz", when='@5:') - - # 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') - - # OpenGL hardware acceleration - depends_on("gl@3.2:", when='@4:+opengl') - # xcb is Linux-specific - depends_on("libxcb", when=sys.platform != 'darwin') - depends_on("xcb-util-image", when=sys.platform != 'darwin') - depends_on("xcb-util-keysyms", when=sys.platform != 'darwin') - depends_on("xcb-util-wm", when=sys.platform != 'darwin') - depends_on("xcb-util-renderutil", when=sys.platform != 'darwin') - depends_on("libxkbcommon", when=sys.platform != 'darwin') depends_on("inputproto", when='@:5.8') - depends_on("libx11", when=sys.platform != 'darwin') + depends_on("openssl@:1.0", when='@:5.9+ssl') - if sys.platform != 'darwin': - depends_on("libxext", when='@3:4.99') + depends_on("glib", when='@4:') + depends_on("libpng", when='@4:') + depends_on("dbus", when='@4:+dbus') + depends_on("gl@3.2:", when='@4:+opengl') - # Webkit - depends_on("flex", when='+webkit', type='build') - depends_on("bison", when='+webkit', type='build') - depends_on("gperf", when='+webkit') + depends_on("harfbuzz", when='@5:') + depends_on("double-conversion", when='@5.7:') + depends_on("pcre2+multibyte", when='@5.9:') - # Multimedia - # depends_on("gstreamer", when='+multimedia') - # 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) + # Non-macOS dependencies and special macOS constraints + if MACOS_VERSION is None: + depends_on("fontconfig") + depends_on("libx11") + depends_on("libxcb") + depends_on("libxkbcommon") + depends_on("xcb-util-image") + depends_on("xcb-util-keysyms") + depends_on("xcb-util-renderutil") + depends_on("xcb-util-wm") + depends_on("libxext", when='@3:4.99') + conflicts('+framework', + msg="QT cannot be built as a framework except on macOS.") + else: + conflicts('platform=darwin', when='@4.8.6', + msg="QT 4 for macOS is only patched for 4.8.7") use_xcode = True @@ -219,32 +209,91 @@ class Qt(Package): def setup_dependent_package(self, module, dependent_spec): module.qmake = Executable(join_path(self.spec.prefix.bin, 'qmake')) + @when('@4 platform=darwin') + def patch(self): + ogl = self.spec['opengl'] if '+opengl' in self.spec else None + deployment_target = str(MACOS_VERSION.up_to(2)) + + patches = { + 'MACOSX_DEPLOYMENT_TARGET': deployment_target, + 'PREFIX': self.prefix, + 'OPENGL_INCDIR': ogl.prefix.include if ogl else "", + 'OPENGL_LIBS': ogl.libs.ld_flags if ogl else "", + } + + def repl(match): + # Replace the original config variable value with the one chosen + # here if it is mentioned in 'patches'; otherwise return the + # original value. + return patches.get(match.group(1), match.group(0)) + + files_to_filter = [ + "configure", + "mkspecs/common/mac.conf", + "mkspecs/common/unix.conf", + "mkspecs/common/gcc-base-macx.conf", + "mkspecs/common/gcc-base.conf", + "qmake/generators/unix/unixmake.cpp", + "qmake/qmake.pri", + "src/tools/bootstrap/bootstrap.pro" + ] + if '%clang' in self.spec: + files_to_filter += [ + "mkspecs/unsupported/macx-clang-libc++/qmake.conf", + "mkspecs/common/clang.conf" + ] + elif '%gcc' in self.spec: + files_to_filter += [ + "mkspecs/common/g++-macx.conf", + "mkspecs/darwin-g++/qmake.conf" + ] + + # Filter inserted configure variables + filter_file(r'@([a-zA-Z0-9_]+)@', repl, *files_to_filter) + + # Remove debug build + files_to_filter = [ + "src/3rdparty/webkit/Source/WebKit.pri", + "src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro", + "src/imports/qimportbase.pri", + "src/plugins/qpluginbase.pri", + "src/qbase.pri", + "tools/designer/src/components/lib/lib.pro", + "tools/designer/src/lib/lib.pro", + "tools/designer/src/plugins/activeqt/activeqt.pro", + "tools/designer/src/plugins/plugins.pri", + "tools/designer/src/uitools/uitools.pro", + ] + filter_file(r'(\+=.*)debug_and_release', r'\1', *files_to_filter) + + @when('@4') # *NOT* darwin/mac def patch(self): - if self.spec.satisfies('@4'): - # Fix qmake compilers in the default mkspec - filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', - 'mkspecs/common/g++-base.conf') - filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', - 'mkspecs/common/g++-base.conf') - - # Necessary to build with GCC 6 and other modern compilers - # http://stackoverflow.com/questions/10354371/ - filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98', - 'mkspecs/common/gcc-base.conf') - - filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', - 'mkspecs/common/g++-unix.conf') - elif self.spec.satisfies('@5:'): - # Fix qmake compilers in the default mkspec - filter_file('^QMAKE_COMPILER .*', 'QMAKE_COMPILER = cc', - 'qtbase/mkspecs/common/g++-base.conf') - filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', - 'qtbase/mkspecs/common/g++-base.conf') - filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', - 'qtbase/mkspecs/common/g++-base.conf') - - filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', - 'qtbase/mkspecs/common/g++-unix.conf') + # Fix qmake compilers in the default mkspec + filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', + 'mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', + 'mkspecs/common/g++-base.conf') + + # Necessary to build with GCC 6 and other modern compilers + # http://stackoverflow.com/questions/10354371/ + filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98', + 'mkspecs/common/gcc-base.conf') + + filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', + 'mkspecs/common/g++-unix.conf') + + @when('@5') + def patch(self): + # Fix qmake compilers in the default mkspec + filter_file('^QMAKE_COMPILER .*', 'QMAKE_COMPILER = cc', + 'qtbase/mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', + 'qtbase/mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', + 'qtbase/mkspecs/common/g++-base.conf') + + filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', + 'qtbase/mkspecs/common/g++-unix.conf') @property def common_config_args(self): @@ -255,16 +304,38 @@ class Qt(Package): '-opensource', '-{0}opengl'.format('' if '+opengl' in self.spec else 'no-'), '-release', - '-shared', '-confirm-license', - '-openssl-linked', '-optimized-qmake', - '-system-freetype', - '-I{0}/freetype2'.format(self.spec['freetype'].prefix.include), '-no-pch', - '-system-sqlite' ] + if self.spec.variants['freetype'].value == 'spack': + config_args.extend([ + '-system-freetype', + '-I{0}/freetype2'.format(self.spec['freetype'].prefix.include) + ]) + elif self.spec.variants['freetype'].value == 'qt': + config_args.append('-qt-freetype') + else: + config_args.append('-no-freetype') + + if '+ssl' in self.spec: + config_args.append('-openssl-linked') + else: + config_args.append('-no-openssl') + + if '+sql' in self.spec: + config_args.append('-system-sqlite') + else: + comps = ['db2', 'ibase', 'oci', 'tds', 'mysql', 'odbc', 'psql', + 'sqlite', 'sqlite2'] + config_args.extend("-no-sql-" + component for component in comps) + + if '+shared' in self.spec: + config_args.append('-shared') + else: + config_args.append('-static') + if self.spec.satisfies('@5:'): config_args.append('-system-harfbuzz') config_args.append('-system-pcre') @@ -272,7 +343,7 @@ class Qt(Package): if self.spec.satisfies('@5.7:'): config_args.append('-system-doubleconversion') - if sys.platform != 'darwin': + if not MACOS_VERSION: config_args.append('-fontconfig') if '@:5.7.1' in self.spec: @@ -295,8 +366,8 @@ class Qt(Package): if '~examples' in self.spec: config_args.extend(['-nomake', 'examples']) - if '@4' in self.spec and '~phonon' in self.spec: - config_args.append('-no-phonon') + if '~tools' in self.spec: + config_args.extend(['-nomake', 'tools']) if '+dbus' in self.spec: dbus = self.spec['dbus'].prefix @@ -307,7 +378,10 @@ class Qt(Package): else: config_args.append('-no-dbus') - if '@5:' in self.spec and sys.platform == 'darwin': + if MACOS_VERSION: + config_args.append('-{0}framework'.format( + '' if '+framework' in self.spec else 'no-')) + if '@5:' in self.spec and MACOS_VERSION: config_args.extend([ '-no-xinput2', '-no-xcb-xlib', @@ -317,39 +391,13 @@ class Qt(Package): # FIXME: else: -system-xcb ? - if '@4' in self.spec and sys.platform == 'darwin': - config_args.append('-cocoa') - - mac_ver = Version(platform.mac_ver()[0]) - sdkname = 'macosx{0}'.format(mac_ver.up_to(2)) - sdkpath = which('xcrun')('--show-sdk-path', - '--sdk', sdkname, - output=str) - config_args.extend([ - '-sdk', sdkpath.strip(), - ]) - use_clang_platform = False - if self.spec.compiler.name == 'clang' and \ - str(self.spec.compiler.version).endswith('-apple'): - use_clang_platform = True - # No one uses gcc-4.2.1 anymore; this is clang. - if self.spec.compiler.name == 'gcc' and \ - str(self.spec.compiler.version) == '4.2.1': - use_clang_platform = True - if use_clang_platform: - config_args.append('-platform') - if mac_ver >= Version('10.9'): - config_args.append('unsupported/macx-clang-libc++') - else: - config_args.append('unsupported/macx-clang') - return config_args # Don't disable all the database drivers, but should # really get them into spack at some point. @when('@3') - def configure(self): + def configure(self, spec, prefix): # A user reported that this was necessary to link Qt3 on ubuntu. # However, if LD_LIBRARY_PATH is not set the qt build fails, check # and set LD_LIBRARY_PATH if not set, update if it is set. @@ -358,7 +406,7 @@ class Qt(Package): else: os.environ['LD_LIBRARY_PATH'] = os.pathsep + os.getcwd() + '/lib' - configure('-prefix', self.prefix, + configure('-prefix', prefix, '-v', '-thread', '-shared', @@ -366,36 +414,53 @@ class Qt(Package): '-fast') @when('@4') - def configure(self): - configure('-fast', - '-{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), - *self.common_config_args) + def configure(self, spec, prefix): + config_args = self.common_config_args + + config_args.extend([ + '-fast', + '-no-declarative-debug', + '-{0}gtkstyle'.format('' if '+gtk' in spec else 'no-'), + '-{0}webkit'.format('' if '+webkit' in spec else 'no-'), + '-{0}phonon'.format('' if '+phonon' in spec else 'no-'), + '-arch', str(spec.architecture.target), + ]) + + if '~examples' in self.spec: + config_args.extend(['-nomake', 'demos']) + + if MACOS_VERSION: + sdkpath = which('xcrun')('--show-sdk-path', output=str).strip() + config_args.extend([ + '-cocoa', + '-platform', 'unsupported/macx-clang-libc++', + '-sdk', sdkpath]) + + configure(*config_args) @when('@5.0:5.6') - def configure(self): - webkit_args = [] if '+webkit' in self.spec else ['-skip', 'qtwebkit'] + def configure(self, spec, prefix): + webkit_args = [] if '+webkit' in spec else ['-skip', 'qtwebkit'] configure('-no-eglfs', '-no-directfb', - '-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'), + '-{0}gtkstyle'.format('' if '+gtk' in spec else 'no-'), *(webkit_args + self.common_config_args)) @when('@5.7:') - def configure(self): + def configure(self, spec, prefix): config_args = self.common_config_args - if not sys.platform == 'darwin': + if not MACOS_VERSION: config_args.extend([ '-system-xcb', ]) - if '~webkit' in self.spec: + if '~webkit' in spec: config_args.extend([ '-skip', 'webengine', ]) - if '~opengl' in self.spec and self.spec.satisfies('@5.10:'): + if '~opengl' in spec and spec.satisfies('@5.10:'): config_args.extend([ '-skip', 'webglplugin', ]) @@ -406,15 +471,16 @@ class Qt(Package): # https://wiki.qt.io/QtWayland config_args.extend(['-skip', 'wayland']) - if self.spec.satisfies('@5.7'): + if spec.satisfies('@5.7'): config_args.extend(['-skip', 'virtualkeyboard']) configure('-no-eglfs', '-no-directfb', - '-{0}gtk'.format('' if '+gtk' in self.spec else 'no-'), + '-{0}gtk'.format('' if '+gtk' in spec else 'no-'), *config_args) - def install(self, spec, prefix): - self.configure() + def build(self, spec, prefix): make() + + def install(self, spec, prefix): make("install") diff --git a/var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch b/var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch deleted file mode 100644 index a4b652e401..0000000000 --- a/var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Nr -U5 qt-everywhere-opensource-src-4.8.6/src/plugins/bearer/corewlan/corewlan.pro qt-everywhere-opensource-src-4.8.6.corewlan-new-osx/src/plugins/bearer/corewlan/corewlan.pro ---- qt-everywhere-opensource-src-4.8.6/src/plugins/bearer/corewlan/corewlan.pro 2014-04-10 14:37:12.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.6.corewlan-new-osx/src/plugins/bearer/corewlan/corewlan.pro 2015-12-02 12:21:34.608585392 -0500 -@@ -3,9 +3,9 @@ - - QT = core network - LIBS += -framework Foundation -framework SystemConfiguration - - contains(QT_CONFIG, corewlan) { -- isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") { -+ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, ".*MacOSX10\.([6789]|1[0123])\.sdk") { - LIBS += -framework CoreWLAN -framework Security - } - } - - HEADERS += qcorewlanengine.h \ diff --git a/var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch b/var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch deleted file mode 100644 index 35f154d3b0..0000000000 --- a/var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 27aa46933bb32a88c310fe5918a49a3f34d65dfe Mon Sep 17 00:00:00 2001 -From: Mike McQuaid <mike@mikemcquaid.com> -Date: Sun, 13 Sep 2015 11:55:59 +0100 -Subject: [PATCH] Fix El Capitan build. - ---- - src/gui/painting/qpaintengine_mac.cpp | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp -index 4aa0668..63b646d 100644 ---- a/src/gui/painting/qpaintengine_mac.cpp -+++ b/src/gui/painting/qpaintengine_mac.cpp -@@ -340,13 +340,7 @@ CGColorSpaceRef QCoreGraphicsPaintEngine::macDisplayColorSpace(const QWidget *wi - } - - // Get the color space from the display profile. -- CGColorSpaceRef colorSpace = 0; -- CMProfileRef displayProfile = 0; -- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile); -- if (err == noErr) { -- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile); -- CMCloseProfile(displayProfile); -- } -+ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID); - - // Fallback: use generic DeviceRGB - if (colorSpace == 0) --- -2.3.8 (Apple Git-58) - diff --git a/var/spack/repos/builtin/packages/qt/qt4-gcc-and-webkit-487.patch b/var/spack/repos/builtin/packages/qt/qt4-gcc-and-webkit-487.patch new file mode 100644 index 0000000000..ee3a6cd524 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt4-gcc-and-webkit-487.patch @@ -0,0 +1,20 @@ +--- a/configure.orig 2018-09-18 07:02:33.866633000 +1000 ++++ b/configure 2018-09-18 07:05:21.935194000 +1000 +@@ -7708,7 +7708,7 @@ + + # Check gcc's version + case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in +- 4*) ++ [4-8]*) + ;; + 3.4*) + canBuildQtXmlPatterns="no" +@@ -7729,7 +7729,7 @@ + *-g++*) + # Check gcc's version + case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in +- 5*|4*|3.4*) ++ [4-8]*|3.4*) + ;; + 3.3*) + canBuildWebKit="no" diff --git a/var/spack/repos/builtin/packages/qt/qt4-mac.patch b/var/spack/repos/builtin/packages/qt/qt4-mac.patch new file mode 100644 index 0000000000..d163f41894 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt4-mac.patch @@ -0,0 +1,631 @@ +diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp +index 4aa0668..63b646d 100644 +--- a/src/gui/painting/qpaintengine_mac.cpp ++++ b/src/gui/painting/qpaintengine_mac.cpp +@@ -340,13 +340,7 @@ CGColorSpaceRef QCoreGraphicsPaintEngine::macDisplayColorSpace(const QWidget *wi + } + + // Get the color space from the display profile. +- CGColorSpaceRef colorSpace = 0; +- CMProfileRef displayProfile = 0; +- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile); +- if (err == noErr) { +- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile); +- CMCloseProfile(displayProfile); +- } ++ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID); + + // Fallback: use generic DeviceRGB + if (colorSpace == 0) +diff -r -u a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm +--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm 2015-05-07 10:14:43.000000000 -0400 ++++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm 2019-03-20 09:30:22.000000000 -0400 +@@ -73,6 +73,9 @@ + ** + ****************************************************************************/ + ++// Needed for macOS 10.13 (High Sierra) ++#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 1 ++ + #include <private/qcore_mac_p.h> + #include <qaction.h> + #include <qwidget.h> +diff -r -u a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm +--- a/src/gui/text/qfontengine_coretext.mm 2015-05-07 10:14:43.000000000 -0400 ++++ b/src/gui/text/qfontengine_coretext.mm 2019-03-20 09:30:22.000000000 -0400 +@@ -886,7 +886,7 @@ + + QFixed QCoreTextFontEngine::emSquareSize() const + { +- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont))); ++ return QFixed(int(CTFontGetUnitsPerEm(ctfont))); + } + + QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const +diff -r -u a/config.tests/unix/compile.test b/config.tests/unix/compile.test +--- a/config.tests/unix/compile.test 2015-05-07 10:14:42.000000000 -0400 ++++ b/config.tests/unix/compile.test 2019-03-20 09:30:21.000000000 -0400 +@@ -73,7 +73,7 @@ + rm -f "$EXE" "${EXE}.exe" + + echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache" +-"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" ++"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release app_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CXXFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CXXFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" + + if [ "$VERBOSE" = "yes" ]; then + $MAKE +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/configure qt-everywhere-opensource-src-4.8.7/configure +--- qt-everywhere-opensource-src-4.8.7.orig/configure 2019-04-04 15:44:58.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/configure 2019-04-04 16:50:38.000000000 -0400 +@@ -3472,9 +3472,8 @@ + # auto-detect support for -Xarch on the mac + if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then + if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then +- CFG_MAC_XARCH=no +- else +- CFG_MAC_XARCH=yes ++ echo >&2 "error: -Xarch flag support is required to build on macOS." ++ exit 1 + fi + fi + +@@ -5013,8 +5012,8 @@ + # Avoid overriding the default configuration settings when building with clang/libc++ + ;; + *) +- # For all other configurations require a minimum of 10.5 +- echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile" ++ # For all other configurations require a minimum of 10.13 ++ echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile" + ;; + esac + +@@ -5025,20 +5024,11 @@ + EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)" + EXTRA_OBJS="qsettings_mac.o qcore_mac.o" + EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\"" +- if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64 +- X86_CFLAGS="-arch i386" +- X86_LFLAGS="-arch i386" +- EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS" +- EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS" +- EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS" +- fi +- if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64 +- PPC_CFLAGS="-arch ppc" +- PPC_LFLAGS="-arch ppc" +- EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS" +- EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS" +- EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS" +- fi ++ ARCH_CFLAGS="-arch x86_64" ++ ARCH_LFLAGS="-arch x86_64" ++ EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS" ++ EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS" ++ EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS" + if [ '!' -z "$CFG_SDK" ]; then + echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile" + echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile" +@@ -7224,19 +7214,7 @@ + + # set the global Mac deployment target. This is overridden on an arch-by-arch basis + # in some cases, see code further down +-case "$PLATFORM,$CFG_MAC_COCOA" in +-*macx-clang-libc++,yes) +- # Avoid overriding the default configuration setting when building with clang/libc++ +- ;; +-macx*,yes) +- # Cocoa +- QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5 +- ;; +-macx*,no) +- # gcc, Carbon +- QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4 +- ;; +-esac ++QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET @MACOSX_DEPLOYMENT_TARGET@ + + # disable Qt 3 support on VxWorks, Symbian and INTEGRITY + case "$XPLATFORM" in +@@ -7515,7 +7493,6 @@ + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI" + fi + +- + if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then + #On Mac we implicitly link against libz, so we + #never use the 3rdparty stuff. +@@ -7975,39 +7952,19 @@ + QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off" + fi + +-# On Mac, set the minimum deployment target for the different architechtures +-# using the Xarch compiler option when supported (10.5 and up). On 10.4 the +-# deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET +-# env. variable. ++# On Mac, set the minimum deployment target for the different architectures + if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ]; then + case "$PLATFORM" in + *macx-clang-libc++) + # Avoid overriding the default settings when building clang/libc++. + ;; + *) +- if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then +- QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" +- QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" +- QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" +- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4" +- fi +- if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then +- QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" +- QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" +- QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" +- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4" +- fi + if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then +- QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5" +- fi +- if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then +- QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5" ++ QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" ++ QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" ++ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" ++ QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" ++ QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" + fi + ;; + esac +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/clang.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/clang.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/clang.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/clang.conf 2019-04-04 15:59:33.000000000 -0400 +@@ -2,8 +2,8 @@ + # Qmake configuration for Clang on Linux and Mac + # + +-QMAKE_CC = clang +-QMAKE_CXX = clang++ ++QMAKE_CC = cc ++QMAKE_CXX = c++ + + QMAKE_LINK = $$QMAKE_CXX + QMAKE_LINK_SHLIB = $$QMAKE_CXX +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/g++-base.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/g++-base.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/g++-base.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/g++-base.conf 2019-04-04 15:59:15.000000000 -0400 +@@ -8,14 +8,14 @@ + # you can use the manual test in tests/manual/mkspecs. + # + +-QMAKE_CC = gcc ++QMAKE_CC = cc + + QMAKE_LINK_C = $$QMAKE_CC + QMAKE_LINK_C_SHLIB = $$QMAKE_CC + + QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g + +-QMAKE_CXX = g++ ++QMAKE_CXX = c++ + + QMAKE_LINK = $$QMAKE_CXX + QMAKE_LINK_SHLIB = $$QMAKE_CXX +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base-macx.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base-macx.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base-macx.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base-macx.conf 2019-04-04 15:47:55.000000000 -0400 +@@ -29,12 +29,21 @@ + QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF + QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG + QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +-QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS ++QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS + QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86 + QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 + QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC + QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 + ++QMAKE_OBJECTIVE_CXXFLAGS = $$QMAKE_CXXFLAGS ++QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON = $$QMAKE_CXXFLAGS_WARN_ON ++QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF = $$QMAKE_CXXFLAGS_WARN_OFF ++QMAKE_OBJECTIVE_CXXFLAGS_DEBUG = $$QMAKE_CXXFLAGS_DEBUG ++QMAKE_OBJECTIVE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE ++QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS ++QMAKE_OBJECTIVE_CXXFLAGS_X86 = $$QMAKE_CXXFLAGS_X86 ++QMAKE_OBJECTIVE_CXXFLAGS_X86_64 = $$QMAKE_CXXFLAGS_X86_64 ++ + QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86 + QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 + QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base.conf 2019-04-04 16:00:32.000000000 -0400 +@@ -42,7 +42,7 @@ + QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses + QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden + +-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS ++QMAKE_CXXFLAGS += -std=gnu++98 $$QMAKE_CFLAGS + QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS + QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON + QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/mac.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/mac.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/mac.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/mac.conf 2019-04-04 15:50:20.000000000 -0400 +@@ -9,15 +9,14 @@ + QMAKE_LIBDIR = + QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] + QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +-QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \ +- /System/Library/Frameworks/AGL.framework/Headers/ ++QMAKE_INCDIR_OPENGL = @OPENGL_INCDIR@ + + QMAKE_FIX_RPATH = install_name_tool -id + + QMAKE_LFLAGS_RPATH = + + QMAKE_LIBS_DYNLOAD = +-QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL ++QMAKE_LIBS_OPENGL = @OPENGL_LIBS@ + QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL + QMAKE_LIBS_THREAD = + +@@ -38,7 +37,6 @@ + QMAKE_DEL_DIR = rmdir + QMAKE_CHK_DIR_EXISTS = test -d + QMAKE_MKDIR = mkdir -p +-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 # overridden to 10.5 for Cocoa on the compiler command line +- ++QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ + + include(unix.conf) +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/debug.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/debug.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/debug.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/debug.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -3,6 +3,7 @@ + QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG + QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_DEBUG ++QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_DEBUG + QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG + QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG + !debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(debug, release) +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/default_post.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/default_post.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/default_post.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/default_post.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -1,5 +1,5 @@ + load(default_post) +-!no_objective_c:CONFIG += objective_c ++!no_objective_c:CONFIG += split_sources objective_c objective_cxx + + # Pick a suitable default architecture for qmake-based applications. + # If the Qt package contains one of x86 and x86_64, pick that one. If it +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/objective_c.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_c.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/objective_c.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_c.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -1,23 +1,18 @@ +- +-for(source, SOURCES) { +- contains(source,.*\\.mm?$) { +- warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) +- SOURCES -= $$source +- OBJECTIVE_SOURCES += $$source +- } +-} ++# Add compiler directives for Objective C (.m) only ++# ++# OBJECTIVE_C_SOURCES has already been set in "split_sources" + + isEmpty(QMAKE_OBJECTIVE_CC):QMAKE_OBJECTIVE_CC = $$QMAKE_CC + + OBJECTIVE_C_OBJECTS_DIR = $$OBJECTS_DIR + isEmpty(OBJECTIVE_C_OBJECTS_DIR):OBJECTIVE_C_OBJECTS_DIR = . +-isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .mm .m ++isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .m + + objective_c.dependency_type = TYPE_C + objective_c.variables = QMAKE_OBJECTIVE_CFLAGS +-objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} ++objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} + objective_c.output = $$OBJECTIVE_C_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} +-objective_c.input = OBJECTIVE_SOURCES ++objective_c.input = OBJECTIVE_C_SOURCES + objective_c.name = Compile ${QMAKE_FILE_IN} + silent:objective_c.commands = @echo objective-c ${QMAKE_FILE_IN} && $$objective_c.commands + QMAKE_EXTRA_COMPILERS += objective_c +diff -N -r -u qt-orig/mkspecs/features/mac/objective_cxx.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_cxx.prf +--- qt-orig/mkspecs/features/mac/objective_cxx.prf 1969-12-31 19:00:00.000000000 -0500 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_cxx.prf 2019-03-29 09:52:51.000000000 -0400 +@@ -0,0 +1,18 @@ ++# Add compiler directives for Objective C (.mm) only ++# ++# OBJECTIVE_CXX_SOURCES has already been set in "split_sources" ++ ++isEmpty(QMAKE_OBJECTIVE_CXX):QMAKE_OBJECTIVE_CXX = $$QMAKE_CC ++ ++OBJECTIVE_CXX_OBJECTS_DIR = $$OBJECTS_DIR ++isEmpty(OBJECTIVE_CXX_OBJECTS_DIR):OBJECTIVE_CXX_OBJECTS_DIR = . ++isEmpty(QMAKE_EXT_OBJECTIVE_CXX):QMAKE_EXT_OBJECTIVE_CXX = .mm ++ ++objective_cxx.dependency_type = TYPE_C ++objective_cxx.variables = QMAKE_OBJECTIVE_CXXFLAGS ++objective_cxx.commands = $$QMAKE_OBJECTIVE_CXX -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CXXFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} ++objective_cxx.output = $$OBJECTIVE_CXX_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} ++objective_cxx.input = OBJECTIVE_CXX_SOURCES ++objective_cxx.name = Compile ${QMAKE_FILE_IN} ++silent:objective_cxx.commands = @echo objective-cxx ${QMAKE_FILE_IN} && $$objective_cxx.commands ++QMAKE_EXTRA_COMPILERS += objective_cxx +diff -N -r -u qt-orig/mkspecs/features/mac/split_sources.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/split_sources.prf +--- qt-orig/mkspecs/features/mac/split_sources.prf 1969-12-31 19:00:00.000000000 -0500 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/split_sources.prf 2019-03-29 09:52:51.000000000 -0400 +@@ -0,0 +1,52 @@ ++# move Objective C and C++ files from SOURCES to OBJECTIVE_SOURCES ++ ++for(source, SOURCES) { ++ contains(source,.*\\.m$) { ++ warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) ++ SOURCES -= $$source ++ OBJECTIVE_SOURCES += $$source ++ } else { ++ contains(source,.*\\.mm$) { ++ warning(Objective-C++ source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) ++ SOURCES -= $$source ++ OBJECTIVE_SOURCES += $$source ++ } ++ } ++} ++ ++# move C and C++ files from OBJECTIVE_SOURCES to SOURCES ++ ++for(source, OBJECTIVE_SOURCES) { ++ contains(source,.*\\.c$) { ++ warning(C source \'$$source\' found in SOURCES but should be in SOURCES) ++ OBJECTIVE_SOURCES -= $$source ++ SOURCES += $$source ++ } else { ++ contains(source,.*\\.cc$) { ++ warning(C++ source \'$$source\' found in SOURCES but should be in SOURCES) ++ OBJECTIVE_SOURCES -= $$source ++ SOURCES += $$source ++ } else { ++ contains(source,.*\\.cpp$) { ++ warning(C++ source \'$$source\' found in SOURCES but should be in SOURCES) ++ OBJECTIVE_SOURCES -= $$source ++ SOURCES += $$source ++ } ++ } ++ } ++} ++ ++# split Objective C and C++ sources into their own variables ++ ++for(source, OBJECTIVE_SOURCES) { ++ contains(source,.*\\.mm$) { ++ OBJECTIVE_CXX_SOURCES += $$source ++ } else { ++ contains(source,.*\\.m$) { ++ OBJECTIVE_C_SOURCES += $$source ++ } else { ++ warning(Source \'$$source\' was found in OBJECTIVE_SOURCES but its file extension is not a typical objective C (\'.m\') or C++ (\'.mm\') extension; assuming Objective C.) ++ OBJECTIVE_C_SOURCES += $$source ++ } ++ } ++} +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/sdk.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/sdk.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/sdk.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/sdk.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -2,6 +2,7 @@ + !macx-xcode:!macx-pbuilder { + QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK + QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK ++ QMAKE_OBJECTIVE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK + QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK + QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK + } +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -2,6 +2,7 @@ + } else { + QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86 + QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86 ++ QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86 + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86 + QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86 + } +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86_64.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86_64.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86_64.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86_64.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -2,6 +2,7 @@ + } else { + QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86_64 + QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86_64 ++ QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86_64 + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86_64 + QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86_64 + } +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/release.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/release.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/release.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/release.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -2,6 +2,7 @@ + QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE + QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_RELEASE ++QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_RELEASE + QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE + QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE +-!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) +\ No newline at end of file ++!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/unix/hide_symbols.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/unix/hide_symbols.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/unix/hide_symbols.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/unix/hide_symbols.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -1,4 +1,5 @@ + QMAKE_CFLAGS += $$QMAKE_CFLAGS_HIDESYMS + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_HIDESYMS + QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS ++QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS + QMAKE_LFLAGS += $$QMAKE_LFLAGS_HIDESYMS +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_off.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_off.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_off.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_off.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -1,4 +1,5 @@ + CONFIG -= warn_on + QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_OFF + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_OFF +-QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF +\ No newline at end of file ++QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF ++QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_on.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_on.prf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_on.prf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_on.prf 2019-04-04 15:47:55.000000000 -0400 +@@ -2,4 +2,4 @@ + QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_ON + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_ON + QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_ON +- ++QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang/qmake.conf qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang/qmake.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang/qmake.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang/qmake.conf 2019-04-04 16:10:40.000000000 -0400 +@@ -13,6 +13,13 @@ + include(../../common/gcc-base-macx.conf) + include(../../common/clang.conf) + ++QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ ++ ++QMAKE_CFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET ++QMAKE_CXXFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET ++QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET ++QMAKE_LFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET ++ + QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} + QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang-libc++/qmake.conf qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang-libc++/qmake.conf +--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang-libc++/qmake.conf 2015-05-07 10:14:42.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang-libc++/qmake.conf 2019-04-04 16:10:36.000000000 -0400 +@@ -13,10 +13,11 @@ + include(../../common/gcc-base-macx.conf) + include(../../common/clang.conf) + +-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 # Libc++ is available from 10.7 onwards ++QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ + + QMAKE_CFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET + QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET ++QMAKE_OBJECTIVE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET + QMAKE_LFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET + + QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/qmake/qmake.pri qt-everywhere-opensource-src-4.8.7/qmake/qmake.pri +--- qt-everywhere-opensource-src-4.8.7.orig/qmake/qmake.pri 2019-04-04 15:46:06.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/qmake/qmake.pri 2019-04-04 15:47:55.000000000 -0400 +@@ -135,7 +135,7 @@ + SOURCES += qfilesystemengine_unix.cpp qfilesystemiterator_unix.cpp qfsfileengine_unix.cpp + mac { + SOURCES += qcore_mac.cpp qsettings_mac.cpp +- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) ++ QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ + LIBS += -framework ApplicationServices + } + } else:win32 { +diff -r -u qt-everywhere-opensource-src-4.8.7.orig/src/tools/bootstrap/bootstrap.pro qt-everywhere-opensource-src-4.8.7/src/tools/bootstrap/bootstrap.pro +--- qt-everywhere-opensource-src-4.8.7.orig/src/tools/bootstrap/bootstrap.pro 2019-04-04 16:54:09.000000000 -0400 ++++ qt-everywhere-opensource-src-4.8.7/src/tools/bootstrap/bootstrap.pro 2019-04-04 16:54:16.000000000 -0400 +@@ -103,7 +103,7 @@ + else:win32:SOURCES += ../../corelib/tools/qlocale_win.cpp + + macx: { +- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) ++ QMAKE_MACOSX_DEPLOYMENT_TARGET = @QMAKE_MACOSX_DEPLOYMENT_TARGET@ + SOURCES += ../../corelib/kernel/qcore_mac.cpp + LIBS += -framework CoreServices -framework ApplicationServices + } +diff -r -u a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp +--- a/tools/macdeployqt/shared/shared.cpp 2015-05-07 10:14:40.000000000 -0400 ++++ b/tools/macdeployqt/shared/shared.cpp 2019-03-20 09:30:21.000000000 -0400 +@@ -141,7 +141,7 @@ + state = DylibName; + continue; + } else if (part < parts.count() && parts.at(part).endsWith(".framework")) { +- info.installName += "/" + (qtPath + "lib/").simplified(); ++ info.installName += "/" + (qtPath + "Frameworks/").simplified(); + info.frameworkDirectory = info.installName; + state = FrameworkName; + continue; +diff -r -u a/tools/qtconfig/main.cpp b/tools/qtconfig/main.cpp +--- a/tools/qtconfig/main.cpp 2015-05-07 10:14:41.000000000 -0400 ++++ b/tools/qtconfig/main.cpp 2019-03-20 09:30:22.000000000 -0400 +@@ -51,6 +51,13 @@ + { + Q_INIT_RESOURCE(qtconfig); + ++ const QByteArray graphicsSystem = qgetenv("QT_GRAPHICSSYSTEM"); ++ if (graphicsSystem.isNull() || graphicsSystem.isEmpty()) { ++ // force native graphics mode unless the user set one via QT_GRAPHICSSYSTEM. ++ // We have to use QT_GRAPHICSSYSTEM because that will override any previous ++ // settings stored in our own settings store. ++ qputenv("QT_GRAPHICSSYSTEM", "Native"); ++ } + QApplication app(argc, argv); + + QTranslator translator; +diff -r -u a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp +--- a/tools/qtconfig/mainwindow.cpp 2015-05-07 10:14:41.000000000 -0400 ++++ b/tools/qtconfig/mainwindow.cpp 2019-03-20 09:30:22.000000000 -0400 +@@ -227,6 +227,7 @@ + connect(ui->rtlExtensionsCheckBox, SIGNAL(toggled(bool)), SLOT(somethingModified())); + connect(ui->inputStyleCombo, SIGNAL(activated(int)), SLOT(somethingModified())); + connect(ui->inputMethodCombo, SIGNAL(activated(int)), SLOT(somethingModified())); ++ connect(ui->graphicsSystemCombo, SIGNAL(activated(int)), SLOT(somethingModified())); + connect(ui->guiStyleCombo, SIGNAL(activated(QString)), SLOT(styleSelected(QString))); + connect(ui->familySubstitutionCombo, SIGNAL(activated(QString)), SLOT(substituteSelected(QString))); + connect(ui->tunePaletteButton, SIGNAL(clicked()), SLOT(tunePalette())); +@@ -416,7 +417,26 @@ + ui->inputMethodCombo->hide(); + ui->inputMethodLabel->hide(); + #endif +- ++#ifdef Q_OS_MAC ++ ui->graphicsSystemCombo->setToolTip(tr("Select the graphicsssystem to be used by default.\n" ++ "Native: use native CoreGraphics rendering\n" ++ "Raster: use raster graphics\n" ++ "OpenGL: use OpenGL (experimental!)\n" ++ "Raster mode is the preferred default except on Mac OS 10.14 and newer where it causes flickering.\n" ++ "Use Native rendering on those newer OS versions (or if you experience other graphics glitches).\n" ++ "Note that Raster mode is not compatible with certain built-in widget styles like CDE or Plastique.")); ++ QStringList graphicsSystems; ++ QString defaultGraphicsSystem = settings.value(QLatin1String("DefaultGraphicsSystem"), QLatin1String("(unset)")).toString(); ++ ++ graphicsSystems << "(unset)" << "Native" << "Raster" << "OpenGL"; ++ ui->graphicsSystemCombo->addItems(graphicsSystems); ++ if (!defaultGraphicsSystem.isNull() && !defaultGraphicsSystem.isEmpty()) { ++ ui->graphicsSystemCombo->setCurrentIndex(graphicsSystems.indexOf(QRegExp(defaultGraphicsSystem, Qt::CaseInsensitive))); ++ } ++#else ++ ui->graphicsSystemLabel->hide(); ++ ui->graphicsSystemCombo->hide(); ++#endif + ui->fontEmbeddingCheckBox->setChecked(settings.value(QLatin1String("embedFonts"), true) + .toBool()); + fontpaths = settings.value(QLatin1String("fontPath")).toStringList(); +@@ -573,6 +593,13 @@ + #if defined(Q_WS_X11) && !defined(QT_NO_XIM) + settings.setValue(QLatin1String("DefaultInputMethod"), ui->inputMethodCombo->currentText()); + #endif ++#ifdef Q_OS_MAC ++ if (ui->graphicsSystemCombo->currentIndex() > 0) { ++ settings.setValue(QLatin1String("DefaultGraphicsSystem"), ui->graphicsSystemCombo->currentText()); ++ } else { ++ settings.remove(QLatin1String("DefaultGraphicsSystem")); ++ } ++#endif + + QString audioSink = settings.value(QLatin1String("audiosink"), QLatin1String("Auto")).toString(); + QString videoMode = settings.value(QLatin1String("videomode"), QLatin1String("Auto")).toString(); diff --git a/var/spack/repos/builtin/packages/qt/qt4-tools.patch b/var/spack/repos/builtin/packages/qt/qt4-tools.patch new file mode 100644 index 0000000000..39ccff2977 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt4-tools.patch @@ -0,0 +1,12 @@ +diff -r -u a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp +--- a/tools/linguist/linguist/messagemodel.cpp 2015-05-07 10:14:39.000000000 -0400 ++++ b/tools/linguist/linguist/messagemodel.cpp 2019-03-20 09:30:21.000000000 -0400 +@@ -183,7 +183,7 @@ + if (ContextItem *c = one->findContext(oc->context())) { + for (int j = 0; j < oc->messageCount(); ++j) { + MessageItem *m = oc->messageItem(j); +- if (c->findMessage(m->text(), m->comment()) >= 0) ++ if (c->findMessage(m->text(), m->comment())) + ++inBoth; + } + } |