From 46027bea13572edd8b7134733581c12a6c847867 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Thu, 1 Aug 2019 13:22:35 -0400 Subject: 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 --- lib/spack/spack/operating_systems/mac_os.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3-70-g09d2