[BACK]Return to patch-media_webrtc_trunk_tools_gyp_pylib_gyp_generator_mozmake.py CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / www / firefox24 / patches

File: [cvs.NetBSD.org] / pkgsrc / www / firefox24 / patches / Attic / patch-media_webrtc_trunk_tools_gyp_pylib_gyp_generator_mozmake.py (download)

Revision 1.1, Sun Nov 3 04:51:59 2013 UTC (9 years, 2 months ago) by ryoon
Branch: MAIN
CVS Tags: pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4

Import firefox24-24.1.0 as www/firefox24.

Mozilla Firefox is a free, open-source and cross-platform web browser
for Windows, Linux, MacOS X and many other operating systems.

It is fast and easy to use, and offers many advantages over other web
browsers, such as tabbed browsing and the ability to block pop-up
windows.

Firefox also offers excellent bookmark and history management, and it
can be extended by developers using industry standards such as XML,
CSS, JavaScript, C++, etc. Many extensions are available.

This package tracks 24 extended support release branch.

$NetBSD: patch-media_webrtc_trunk_tools_gyp_pylib_gyp_generator_mozmake.py,v 1.1 2013/11/03 04:51:59 ryoon Exp $

--- media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.orig	2013-05-11 19:19:44.000000000 +0000
+++ media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
@@ -9,6 +9,7 @@ import collections
 import gyp
 import gyp.common
 import sys
+import platform
 import os
 import re
 import shlex
@@ -111,20 +112,34 @@ def ensure_directory_exists(path):
 
 def GetFlavor(params):
   """Returns |params.flavor| if it's set, the system's default flavor else."""
+  system = platform.system().lower()
   flavors = {
-    'win32': 'win',
-    'darwin': 'mac',
-    'sunos5': 'solaris',
-    'freebsd7': 'freebsd',
-    'freebsd8': 'freebsd',
+    'microsoft': 'win',
+    'windows'  : 'win',
+    'darwin'   : 'mac',
+    'sunos'    : 'solaris',
+    'dragonfly': 'bsd',
+    'freebsd'  : 'bsd',
+    'netbsd'   : 'bsd',
+    'openbsd'  : 'bsd',
   }
-  flavor = flavors.get(sys.platform, 'linux')
-  return params.get('flavor', flavor)
+
+  if 'flavor' in params:
+    return params['flavor']
+  if system.startswith('cygwin'):
+    return 'win'
+  if system in flavors:
+    return flavors[system]
+
+  return 'linux'
 
 
 def CalculateVariables(default_variables, params):
+  flavor = GetFlavor(params)
+  if flavor == 'bsd':
+    flavor = platform.system().lower()
   generator_flags = params.get('generator_flags', {})
-  default_variables['OS'] = generator_flags.get('os', GetFlavor(params))
+  default_variables['OS'] = generator_flags.get('os', flavor)
 
 
 def CalculateGeneratorInputInfo(params):