Mac: Fix ninja build (issue #922)

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1192 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-04-09 17:47:14 +00:00
parent d19bb1d2b5
commit f0cdfd8dd2
3 changed files with 91 additions and 55 deletions

View File

@@ -22,7 +22,7 @@ patches = [
'path': '../third_party/zlib/',
},
{
# http://code.google.com/p/gyp/issues/detail?id=443
# http://code.google.com/p/chromiumembedded/issues/detail?id=443
'name': 'message_loop_443',
'path': '../base/',
},
@@ -32,8 +32,7 @@ patches = [
'path': '../third_party/WebKit/Source/',
},
{
# https://code.google.com/p/chromiumembedded/issues/detail?id=505
# https://code.google.com/p/chromiumembedded/issues/detail?id=899
# http://code.google.com/p/chromiumembedded/issues/detail?id=899
'name': 'webkit_features',
'path': '../third_party/WebKit/Source/WebKit/chromium/',
},
@@ -42,6 +41,11 @@ patches = [
'name': 'webkit_933',
'path': '../third_party/WebKit/Source/WebKit/chromium/src/',
},
{
# http://code.google.com/p/gyp/issues/detail?id=331
'name': 'gyp_331',
'path': '../tools/gyp/pylib/',
},
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364',

View File

@@ -0,0 +1,22 @@
Index: gyp/generator/ninja.py
===================================================================
--- gyp/generator/ninja.py (revision 1602)
+++ gyp/generator/ninja.py (working copy)
@@ -662,7 +662,16 @@
for path in copy['files']:
# Normalize the path so trailing slashes don't confuse us.
path = os.path.normpath(path)
- basename = os.path.split(path)[1]
+ (parent_path, basename) = os.path.split(path)
+
+ # Xcode uses .lproj directories for localized resources. Add a special
+ # case to maintain the localization directory component if present.
+ if parent_path != '':
+ parent_basename = os.path.basename(parent_path)
+ (parent_root, parent_ext) = os.path.splitext(parent_basename)
+ if parent_ext == '.lproj':
+ basename = os.path.join(parent_basename, basename)
+
src = self.GypPathToNinja(path, env)
dst = self.GypPathToNinja(os.path.join(copy['destination'], basename),
env)