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
Родитель 1a8267d453
Коммит cc09789768
3 изменённых файлов: 32 добавлений и 0 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -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'])