diff --git a/cerbero-uninstalled b/cerbero-uninstalled index 6c74173..6a906df 100755 --- a/cerbero-uninstalled +++ b/cerbero-uninstalled @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import os diff --git a/cerbero/bootstrap/linux.py b/cerbero/bootstrap/linux.py index 6d81516..d154ddf 100644 --- a/cerbero/bootstrap/linux.py +++ b/cerbero/bootstrap/linux.py @@ -96,8 +96,25 @@ class OpenSuseBootstraper (UnixBootstraper): 'xorg-x11-libXv-devel', 'Mesa-devel', 'python-devel', 'patterns-openSUSE-devel_rpm_build', 'wget', 'glib-networking'] +class ArchBootstraper (UnixBootstraper): + + tool = 'sudo pacman -S %s --needed' + packages = ['intltool', 'cmake', 'doxygen', 'gtk-doc', + 'libtool', 'bison', 'flex', 'automake', 'autoconf', 'make', + 'curl', 'gettext', 'alsa-lib', 'yasm', 'gperf', + 'docbook-xsl', 'transfig', 'libxrender', + 'libxv', 'mesa', 'python2', 'wget', 'glib-networking'] + + def __init__(self, config): + UnixBootstraper.__init__(self, config) + if self.config.arch == Architecture.X86_64: + self.packages.append('gcc-multilib') + else: + self.packages.append('gcc') + def register_all(): register_bootstraper(Distro.DEBIAN, DebianBootstraper) register_bootstraper(Distro.REDHAT, RedHatBootstraper) register_bootstraper(Distro.SUSE, OpenSuseBootstraper) + register_bootstraper(Distro.ARCH, ArchBootstraper) diff --git a/cerbero/enums.py b/cerbero/enums.py index a67510c..0bfa6e2 100644 --- a/cerbero/enums.py +++ b/cerbero/enums.py @@ -41,6 +41,7 @@ class Distro: REDHAT = 'redhat' SUSE = 'suse' WINDOWS = 'windows' + ARCH = 'arch' OS_X = 'osx' ANDROID = 'android' @@ -59,6 +60,7 @@ class DistroVersion: FEDORA_17 = 'fedora_17' FEDORA_18 = 'fedora_18' REDHAT_6 = 'redhat_6' + ARCH_ROLLING = 'rolling' OPENSUSE_12_1 = 'opensuse_12_1' WINDOWS_XP = 'windows_xp' WINDOWS_VISTA = 'windows_vista' diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py index 74db11a..4f19805 100644 --- a/cerbero/utils/__init__.py +++ b/cerbero/utils/__init__.py @@ -167,6 +167,9 @@ def system_info(): # FIXME Fill this raise FatalError("Distribution OpenSuse '%s' " "not supported" % str(d)) + elif "ARCH" in pplatform.release(): + distro = Distro.ARCH + distro_version = DistroVersion.ARCH_ROLLING else: raise FatalError("Distribution '%s' not supported" % str(d)) elif platform == Platform.WINDOWS: