Permalink
Browse files

tools: fix platform detection on freebsd, sunos

This is a back-port of upstream gyp commit r1482.
  • Loading branch information...
1 parent 22965da commit e5649d4b3d0271c6fc248ac12ff73b6b253a91b7 @bnoordhuis bnoordhuis committed Dec 2, 2012
Showing with 11 additions and 6 deletions.
  1. +11 −6 tools/gyp/pylib/gyp/common.py
@@ -361,13 +361,18 @@ def GetFlavor(params):
'cygwin': 'win',
'win32': 'win',
'darwin': 'mac',
- 'sunos5': 'solaris',
- 'freebsd7': 'freebsd',
- 'freebsd8': 'freebsd',
- 'freebsd9': 'freebsd',
}
- flavor = flavors.get(sys.platform, 'linux')
- return params.get('flavor', flavor)
+
+ if 'flavor' in params:
+ return params['flavor']
+ if sys.platform in flavors:
+ return flavors[sys.platform]
+ if sys.platform.startswith('sunos'):
+ return 'solaris'
+ if sys.platform.startswith('freebsd'):
+ return 'freebsd'
+
+ return 'linux'
def CopyTool(flavor, out_path):

0 comments on commit e5649d4

Please sign in to comment.