Fix Qt4 build on Yosemite (10.11) (#3444)
This commit is contained in:
parent
4f05fb4b3f
commit
328b2142f5
@ -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 @@ def common_config_args(self):
|
||||
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 @@ def common_config_args(self):
|
||||
])
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user