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
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import platform
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -186,7 +187,12 @@ def common_config_args(self):
|
|||||||
config_args.append('-no-phonon')
|
config_args.append('-no-phonon')
|
||||||
|
|
||||||
if '+dbus' in self.spec:
|
if '+dbus' in self.spec:
|
||||||
|
dbus = self.spec['dbus'].prefix
|
||||||
config_args.append('-dbus-linked')
|
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:
|
else:
|
||||||
config_args.append('-no-dbus')
|
config_args.append('-no-dbus')
|
||||||
|
|
||||||
@ -199,25 +205,30 @@ def common_config_args(self):
|
|||||||
])
|
])
|
||||||
|
|
||||||
if '@4' in self.spec and sys.platform == 'darwin':
|
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',
|
sdkpath = which('xcrun')('--show-sdk-path',
|
||||||
# XXX(macos): 10.11 SDK fails to configure
|
'--sdk', sdkname,
|
||||||
'--sdk', 'macosx10.9',
|
|
||||||
output=str)
|
output=str)
|
||||||
config_args.extend([
|
config_args.extend([
|
||||||
'-sdk', sdkpath.strip(),
|
'-sdk', sdkpath.strip(),
|
||||||
])
|
])
|
||||||
use_clang_platform = False
|
use_clang_platform = False
|
||||||
if self.spec.compiler.name == 'clang' and \
|
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
|
use_clang_platform = True
|
||||||
# No one uses gcc-4.2.1 anymore; this is clang.
|
# No one uses gcc-4.2.1 anymore; this is clang.
|
||||||
if self.spec.compiler.name == 'gcc' and \
|
if self.spec.compiler.name == 'gcc' and \
|
||||||
str(self.spec.compiler.version) == '4.2.1':
|
str(self.spec.compiler.version) == '4.2.1':
|
||||||
use_clang_platform = True
|
use_clang_platform = True
|
||||||
if use_clang_platform:
|
if use_clang_platform:
|
||||||
config_args.extend([
|
config_args.append('-platform')
|
||||||
'-platform', 'unsupported/macx-clang',
|
if mac_ver >= (10, 9):
|
||||||
])
|
config_args.append('unsupported/macx-clang-libc++')
|
||||||
|
else:
|
||||||
|
config_args.append('unsupported/macx-clang')
|
||||||
|
|
||||||
return config_args
|
return config_args
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user