Example #1
0
    def get_system_libs(self):
        platform = self.platform()
        platform_name = platform.name()
        arch = platform.architecture()
        dep_libs = []

        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'DEBIAN':
                dep_libs = [
                    'git', 'gcc', 'g++', 'yasm', 'pkg-config', 'libtool',
                    'rpm', 'git', 'autogen', 'autoconf', 'automake', 'cmake',
                    'make', 'ninja-build', 'libz-dev', 'libbz2-dev',
                    'libpcre3-dev', 'libasound2-dev', 'freetype-dev',
                    'libfreetype6-dev', 'libpng12-dev', 'libdrm-dev',
                    'libdri2-dev', 'libump-dev', 'libudev-dev',
                    'liblircclient-dev'
                ]
            elif distribution == 'RHEL':
                dep_libs = [
                    'git', 'gcc', 'gcc-c++', 'yasm', 'pkgconfig', 'libtool',
                    'rpm-build', 'git', 'autogen', 'autoconf', 'automake',
                    'cmake', 'make', 'ninja-build', 'zlib-devel',
                    'bzip2-devel', 'pcre-devel', 'alsa-lib-devel',
                    'freetype-devel', 'libfreetype6-devel', 'libpng12-devel',
                    'libdrm-devel', 'libdri2-devel', 'libump-devel',
                    'libudev-devel', 'liblircclient-devel'
                ]
                # x86_64 arch
                # Centos 7 no packages: libtoolize, libdri2-devel, libump-devel
                # Debian 8.7 no packages: libdri2-dev, libump-dev,
        elif platform_name == 'windows':
            if arch.bit() == 64:
                dep_libs = [
                    'git', 'make', 'mingw-w64-x86_64-gcc',
                    'mingw-w64-x86_64-yasm', 'mingw-w64-x86_64-ninja',
                    'mingw-w64-x86_64-make', 'mingw-w64-x86_64-cmake',
                    'mingw-w64-x86_64-freetype'
                ]
            elif arch.name() == 'i386':
                dep_libs = [
                    'git', 'make', 'mingw-w64-i686-gcc', 'mingw-w64-i686-yasm',
                    'mingw-w64-i686-ninja', 'mingw-w64-i686-make',
                    'mingw-w64-i686-cmake', 'mingw-w64-i686-freetype'
                ]
        elif platform_name == 'macosx':
            dep_libs = ['git', 'yasm', 'make', 'ninja', 'freetype']
        elif platform_name == 'freebsd':
            dep_libs = [
                'gcc', 'git', 'make', 'cmake', 'autoconf', 'automake',
                'libtool', 'alsa-lib', 'ninja', 'yasm', 'freetype2'
            ]
        elif platform_name == 'android':
            dep_libs = []
        else:
            raise NotImplemented("Unknown platform: '%s'" % platform_name)

        device_specific_libs = self.device_.system_libs(platform)
        dep_libs.extend(device_specific_libs)
        return dep_libs
Example #2
0
    def get_system_libs(self):
        platform = self.platform_
        platform_name = platform.name()
        dep_libs = []

        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'DEBIAN':
                dep_libs = ['gcc', 'g++', 'git', 'make', 'autoconf', 'libtool', 'pkg-config', 'gettext', 'cmake',
                            'libcairo2-dev', 'libssl-dev', 'libblkid-dev',
                            'libmount-dev', 'libdrm-dev', 'libsoup2.4-dev', 'libudev-dev', 'libjpeg-dev', 'cmake',
                            # 'freeglut3-dev',
                            # 'libegl1-mesa-dev',
                            'zlib1g-dev', 'libffi-dev', 'yasm', 'nasm', 'bison', 'flex', 'libxrandr-dev',
                            'libfaac-dev', 'libfaad-dev', 'libgdk-pixbuf2.0-dev', 'libasound2-dev',
                            'ninja-build', 'intltool', 'liborc-0.4-dev', 'libxml2-dev', 'libx264-dev',
                            'libmp3lame-dev', 'librtmp-dev', 'libproxy-dev']
            elif distribution == 'RHEL':
                dep_libs = ['gcc', 'gcc-c++', 'git', 'make', 'autoconf', 'libtool', 'cairo-gobject-devel',
                            'libmount-devel', 'openssl-devel',
                            'libxcb-devel', 'libdrm-devel', 'libsoup-devel', 'libx264-devel',  # 'libpciaccess-devel',
                            'libudev-devel', 'libjpeg-turbo-devel', 'zlib-devel', 'libffi-devel', 'pcre-devel', 'yasm',
                            'nasm', 'bison', 'flex', 'alsa-lib-devel', 'ninja-build', 'lame-devel', 'librtmp-devel',
                            'gdk-pixbuf2-devel',
                            'libproxy-devel']
        else:
            raise NotImplemented("Unknown platform '%s'" % platform_name)

        return dep_libs
Example #3
0
    def __get_system_libs(self):
        platform = self.platform_
        platform_name = platform.name()
        arch = platform.arch()
        dep_libs = []

        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'DEBIAN':
                dep_libs = ['git', 'gcc', 'g++', 'yasm', 'pkg-config', 'libtool', 'rpm',
                            'autogen', 'autoconf',
                            'cmake', 'make', 'ninja-build',
                            'libz-dev', 'libbz2-dev', 'lz4-dev',
                            'qt5']
            elif distribution == 'RHEL':
                dep_libs = ['git', 'gcc', 'gcc-c++', 'yasm', 'pkgconfig', 'libtool', 'rpm-build',
                            'autogen', 'autoconf',
                            'cmake', 'make', 'ninja-build',
                            'zlib-devel', 'bzip2-devel', 'lz4-devel',
                            'qt5-qtbase-devel', 'qt5-linguist']
        elif platform_name == 'windows':
            if arch.name() == 'x86_64':
                dep_libs = ['git', 'make', 'mingw-w64-x86_64-gcc', 'mingw-w64-x86_64-yasm',
                            'mingw-w64-x86_64-ninja', 'mingw-w64-x86_64-make', 'mingw-w64-x86_64-cmake',
                            'mingw-w64-x86_64-qt5']
            elif arch.name() == 'i386':
                dep_libs = ['git', 'make', 'mingw-w64-i686-gcc', 'mingw-w64-i686-yasm',
                            'mingw-w64-i686-ninja', 'mingw-w64-i686-make', 'mingw-w64-i686-cmake',
                            'mingw-w64-i686-qt5']
        elif platform_name == 'macosx':
            dep_libs = ['git', 'yasm', 'make', 'ninja', 'cmake', 'qt5']
        else:
            raise NotImplemented("Unknown platform '%s'" % platform_name)

        return dep_libs
Example #4
0
def get_x11_libs(platform_name: str) -> list:
    dep_libs = []
    if platform_name == 'linux':
        distribution = system_info.linux_get_dist()
        if distribution == 'DEBIAN':
            dep_libs = ['libx11-dev', 'xorg-dev', 'xutils-dev', 'xserver-xorg', 'xinit']
        elif distribution == 'RHEL':
            dep_libs = ['libX11-devel', 'xorg-x11-server-devel', 'xorg-x11-server-source', 'xorg-x11-xinit']
    return dep_libs
Example #5
0
    def install_system(self):
        dep_libs = self.get_system_libs()
        for lib in dep_libs:
            self._install_package(lib)

        # post install step
        platform = self.platform()
        platform_name = platform.name()
        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'RHEL':
                subprocess.call(['ln', '-sf', '/usr/bin/ninja-build', '/usr/bin/ninja'])
Example #6
0
    def get_system_libs(self, repo_build=False):
        platform = self.platform_
        platform_name = platform.name()
        ar = platform.architecture()
        dep_libs = []

        current_system = None
        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'DEBIAN':
                current_system = Debian()
                dep_libs.extend(current_system.get_required_exec())
                dep_libs.extend(current_system.get_build_exec())
            elif distribution == 'RHEL':
                current_system = RedHat()
                dep_libs.extend(current_system.get_required_exec())
                dep_libs.extend(current_system.get_build_exec())
            elif distribution == 'ARCH':
                current_system = Arch()
                dep_libs.extend(current_system.get_required_exec())
                dep_libs.extend(current_system.get_build_exec())
        elif platform_name == 'freebsd':
            current_system = FreeBSD()
            dep_libs.extend(current_system.get_required_exec())
            dep_libs.extend(current_system.get_build_exec())
        elif platform_name == 'macosx':
            current_system = MacOSX()
            dep_libs.extend(current_system.get_required_exec())
            dep_libs.extend(current_system.get_build_exec())
        elif platform_name == 'windows':
            if ar.bit() == 64:
                current_system = Windows64()
                dep_libs.extend(current_system.get_required_exec())
            elif ar.bit() == 32:
                current_system = Windows32()
                dep_libs.extend(current_system.get_required_exec())

        if not current_system:
            raise NotImplementedError("Unknown platform '%s'" % platform_name)

        if repo_build:
            dep_libs.extend(current_system.get_gst_repo_libs())
        else:
            dep_libs.extend(current_system.get_gst_build_libs())

        return dep_libs
Example #7
0
    def get_system_libs(self):
        platform = self.platform_
        platform_name = platform.name()
        ar = platform.architecture()
        dep_libs = []

        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'DEBIAN':
                deb = Debian()
                dep_libs.extend(deb.get_required_exec())
                dep_libs.extend(deb.get_build_exec())
                dep_libs.extend(deb.get_gst_build_libs())
            elif distribution == 'RHEL':
                red = RedHat()
                dep_libs.extend(red.get_required_exec())
                dep_libs.extend(red.get_build_exec())
                dep_libs.extend(red.get_gst_build_libs())
            elif distribution == 'ARCH':
                arch = Arch()
                dep_libs.extend(arch.get_required_exec())
                dep_libs.extend(arch.get_build_exec())
                dep_libs.extend(arch.get_gst_build_libs())
        elif platform_name == 'freebsd':
            freebsd = FreeBSD()
            dep_libs.extend(freebsd.get_required_exec())
            dep_libs.extend(freebsd.get_build_exec())
            dep_libs.extend(freebsd.get_gst_build_libs())
        elif platform_name == 'macosx':
            mac = MacOSX()
            dep_libs.extend(mac.get_required_exec())
            dep_libs.extend(mac.get_build_exec())
        elif platform_name == 'windows':
            if ar.bit() == 64:
                win = Windows64()
                dep_libs.extend(win.get_required_exec())
            elif ar.bit() == 32:
                win = Windows32()
                dep_libs.extend(win.get_required_exec())
        else:
            raise NotImplementedError("Unknown platform '%s'" % platform_name)

        return dep_libs
Example #8
0
    def install_system(self, with_nvidia, with_mongo, with_gstreamer,
                       repo_build):
        dep_libs = self.get_system_libs(with_nvidia=with_nvidia,
                                        with_mongo=with_mongo,
                                        with_gstreamer=with_gstreamer,
                                        repo_build=repo_build)
        for lib in dep_libs:
            self._install_package(lib)

        # post install step
        platform = self.platform()
        platform_name = platform.name()
        if platform_name == 'linux':
            distribution = system_info.linux_get_dist()
            if distribution == 'RHEL':
                subprocess.call(
                    ['ln', '-sf', '/usr/bin/ninja-build', '/usr/bin/ninja'])
        elif platform_name == 'freebsd':
            subprocess.call(['dbus-uuidgen', '--ensure'])