Bug 790750 - Add OpenBSD backend to mozboot; r=gps DONTBUILD

This commit is contained in:
Landry Breuil 2012-09-13 17:22:13 -07:00
parent 1a8267d453
commit cc09789768
3 changed files with 32 additions and 0 deletions

View File

@ -32,6 +32,7 @@ REPOSITORY_PATHS = [
'mozboot/centos.py', 'mozboot/centos.py',
'mozboot/fedora.py', 'mozboot/fedora.py',
'mozboot/mint.py', 'mozboot/mint.py',
'mozboot/openbsd.py',
'mozboot/osx.py', 'mozboot/osx.py',
'mozboot/ubuntu.py', 'mozboot/ubuntu.py',
] ]

View File

@ -11,6 +11,7 @@ from mozboot.centos import CentOSBootstrapper
from mozboot.fedora import FedoraBootstrapper from mozboot.fedora import FedoraBootstrapper
from mozboot.mint import MintBootstrapper from mozboot.mint import MintBootstrapper
from mozboot.osx import OSXBootstrapper from mozboot.osx import OSXBootstrapper
from mozboot.openbsd import OpenBSDBootstrapper
from mozboot.ubuntu import UbuntuBootstrapper from mozboot.ubuntu import UbuntuBootstrapper
@ -60,6 +61,10 @@ class Bootstrapper(object):
args['minor'] = minor args['minor'] = minor
args['point'] = point args['point'] = point
elif sys.platform.startswith('openbsd'):
cls = OpenBSDBootstrapper
args['version'] = platform.uname()[2]
if cls is None: if cls is None:
raise NotImplementedError('Bootstrap support is not yet available ' raise NotImplementedError('Bootstrap support is not yet available '
'for your OS.') 'for your OS.')

View File

@ -0,0 +1,26 @@
# 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/.
import os
from mozboot.base import BaseBootstrapper
class OpenBSDBootstrapper(BaseBootstrapper):
def __init__(self, version):
BaseBootstrapper.__init__(self)
def install_system_packages(self):
# we use -z because there's no other way to say "any autoconf-2.13"
self.run_as_root(['pkg_add', '-z',
'mercurial',
'llvm',
'autoconf-2.13',
'yasm',
'gtk+2',
'libIDL',
'gmake',
'gtar',
'wget',
'unzip',
'zip'])