summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2017-03-16 17:55:06 -0700
committerGitHub <noreply@github.com>2017-03-16 17:55:06 -0700
commit328b2142f5ea49ce07d6813073f37906b8a9c47d (patch)
treeeb8cdcdadee4c303814e6bcbdcec755dc70ae848 /var
parent4f05fb4b3f236a4ff551b279c5f46a6d3c20f8e3 (diff)
downloadspack-328b2142f5ea49ce07d6813073f37906b8a9c47d.tar.gz
spack-328b2142f5ea49ce07d6813073f37906b8a9c47d.tar.bz2
spack-328b2142f5ea49ce07d6813073f37906b8a9c47d.tar.xz
spack-328b2142f5ea49ce07d6813073f37906b8a9c47d.zip
Fix Qt4 build on Yosemite (10.11) (#3444)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index b795cd17ab..6d77f28846 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import platform
import os
import sys
@@ -186,7 +187,12 @@ class Qt(Package):
config_args.append('-no-phonon')
if '+dbus' in self.spec:
+ dbus = self.spec['dbus'].prefix
config_args.append('-dbus-linked')
+ config_args.append('-I%s/dbus-1.0/include' % dbus.lib)
+ config_args.append('-I%s/dbus-1.0' % dbus.include)
+ config_args.append('-L%s' % dbus.lib)
+ config_args.append('-ldbus-1')
else:
config_args.append('-no-dbus')
@@ -199,25 +205,30 @@ class Qt(Package):
])
if '@4' in self.spec and sys.platform == 'darwin':
+ config_args.append('-cocoa')
+
+ mac_ver = tuple(platform.mac_ver()[0].split('.')[:2])
+ sdkname = 'macosx%s' % '.'.join(mac_ver)
sdkpath = which('xcrun')('--show-sdk-path',
- # XXX(macos): 10.11 SDK fails to configure
- '--sdk', 'macosx10.9',
+ '--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).endwith('-apple'):
+ 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.extend([
- '-platform', 'unsupported/macx-clang',
- ])
+ config_args.append('-platform')
+ if mac_ver >= (10, 9):
+ config_args.append('unsupported/macx-clang-libc++')
+ else:
+ config_args.append('unsupported/macx-clang')
return config_args