···
1
-
diff --git a/configure b/configure
2
-
index d199975..66d903b 100755
5
-
@@ -734,7 +734,7 @@ def configure_library(lib, output):
6
-
# libpath needs to be provided ahead libraries
8
-
output['libraries'] += (
9
-
- filter(None, map(str.strip, pkg_cflags.split('-L'))))
10
-
+ pkg_libpath.split())
12
-
default_libs = getattr(options, shared_lib + '_libname')
13
-
default_libs = map('-l{0}'.format, default_libs.split(','))
14
-
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
15
-
index c002b11..fefb765 100644
16
-
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
17
-
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
18
-
@@ -446,10 +446,17 @@ class XcodeSettings(object):
20
-
def _XcodeSdkPath(self, sdk_root):
21
-
if sdk_root not in XcodeSettings._sdk_path_cache:
22
-
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
23
-
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
25
-
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
27
-
+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
28
-
+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
30
-
+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
32
-
+ # if this fails it's because xcodebuild failed, which means
33
-
+ # the user is probably on a CLT-only system, where there
34
-
+ # is no valid SDK root
35
-
+ XcodeSettings._sdk_path_cache[sdk_root] = None
37
-
return XcodeSettings._sdk_path_cache[sdk_root]
39
-
def _AppendPlatformVersionMinFlags(self, lst):
40
-
@@ -572,10 +579,12 @@ class XcodeSettings(object):
41
-
framework_root = sdk_root
44
-
- config = self.spec['configurations'][self.configname]
45
-
- framework_dirs = config.get('mac_framework_dirs', [])
46
-
- for directory in framework_dirs:
47
-
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
49
-
+ if 'SDKROOT' in self._Settings():
50
-
+ config = self.spec['configurations'][self.configname]
51
-
+ framework_dirs = config.get('mac_framework_dirs', [])
52
-
+ for directory in framework_dirs:
53
-
+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
55
-
self.configname = None
57
-
@@ -826,10 +835,12 @@ class XcodeSettings(object):
58
-
sdk_root = self._SdkPath()
61
-
- config = self.spec['configurations'][self.configname]
62
-
- framework_dirs = config.get('mac_framework_dirs', [])
63
-
- for directory in framework_dirs:
64
-
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
66
-
+ if 'SDKROOT' in self._Settings():
67
-
+ config = self.spec['configurations'][self.configname]
68
-
+ framework_dirs = config.get('mac_framework_dirs', [])
69
-
+ for directory in framework_dirs:
70
-
+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
72
-
is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
73
-
if sdk_root and is_extension:
74
-
@@ -1032,7 +1043,11 @@ class XcodeSettings(object):
75
-
sdk_root = self._SdkPath(config_name)
78
-
- return l.replace('$(SDKROOT)', sdk_root)
80
-
+ if self._SdkPath():
81
-
+ return l.replace('$(SDKROOT)', sdk_root)
85
-
def AdjustLibraries(self, libraries, config_name=None):
86
-
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
87
-
@@ -1248,7 +1263,7 @@ def XcodeVersion():
89
-
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
91
-
- raise GypError("No Xcode or CLT version detected!")
93
-
# The CLT has no build information, so we return an empty string.
94
-
version_list = [version, '']
95
-
version = version_list[0]