Bug 1022747: Add |mach bootstrap| support for DragonFly/DPorts. r=gps

This commit is contained in:
Jan Beich 2014-06-09 22:11:06 +02:00
parent c2a5e1a00c
commit 1d0ee3b48b
2 changed files with 9 additions and 3 deletions

View File

@ -79,9 +79,11 @@ class Bootstrapper(object):
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 '

View File

@ -5,9 +5,10 @@
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',
@ -24,8 +25,11 @@ class FreeBSDBootstrapper(BaseBootstrapper):
'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):