Bug 1022747: Add |mach bootstrap| support for DragonFly/DPorts. r=gps
authorJan Beich <jbeich@tormail.org>
Mon, 09 Jun 2014 22:11:06 +0200
changeset 187804 fa517a284edce98f9971ea3554c5a53621eecc2a
parent 187803 86e63257f6ed2caf38e93cab7af7820e503b8a81
child 187805 08974ed008745de213b15d83fda7f84e21bae139
push id26934
push userryanvm@gmail.com
push dateTue, 10 Jun 2014 04:45:09 +0000
treeherdermozilla-central@9dc0ffca10f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1022747
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1022747: Add |mach bootstrap| support for DragonFly/DPorts. r=gps
python/mozboot/mozboot/bootstrap.py
python/mozboot/mozboot/freebsd.py
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -74,19 +74,21 @@ class Bootstrapper(object):
 
             cls = OSXBootstrapper
             args['version'] = osx_version
 
         elif sys.platform.startswith('openbsd'):
             cls = OpenBSDBootstrapper
             args['version'] = platform.uname()[2]
 
-        elif sys.platform.startswith('freebsd'):
+        elif sys.platform.startswith('dragonfly') or \
+             sys.platform.startswith('freebsd'):
             cls = FreeBSDBootstrapper
             args['version'] = platform.release()
+            args['flavor']  = platform.system()
 
         if cls is None:
             raise NotImplementedError('Bootstrap support is not yet available '
                                       'for your OS.')
 
         self.instance = cls(**args)
 
 
--- a/python/mozboot/mozboot/freebsd.py
+++ b/python/mozboot/mozboot/freebsd.py
@@ -1,36 +1,40 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from mozboot.base import BaseBootstrapper
 
 class FreeBSDBootstrapper(BaseBootstrapper):
-    def __init__(self, version):
+    def __init__(self, version, flavor):
         BaseBootstrapper.__init__(self)
         self.version = int(version.split('.')[0])
+        self.flavor  = flavor.lower()
 
         self.packages = [
             'autoconf213',
             'dbus-glib',
             'gmake',
             'gstreamer-plugins',
             'gtk2',
             'libGL',
             'mercurial',
             'pkgconf',
             'pulseaudio',
             'v4l_compat',
             'yasm',
             'zip',
         ]
 
+        if self.flavor == 'dragonfly':
+            self.packages.append('unzip')
+
         # gcc in base is too old
-        if self.version < 9:
+        if self.flavor == 'freebsd' and self.version < 9:
             self.packages.append('gcc')
 
     def pkg_install(self, *packages):
         if self.which('pkg'):
             command = ['pkg', 'install']
         else:
             command = ['pkg_add', '-Fr']