Exemplo n.º 1
0
def install_orange_pi_h3():
    subprocess.call(['modprobe', 'mali'])
    pwd = os.getcwd()
    script_dir = os.path.dirname(os.path.realpath(__file__))
    try:
        cloned_dir = utils.git_clone(
            'https://github.com/linux-sunxi/sunxi-mali.git')
        os.chdir(cloned_dir)
        subprocess.call(['make', 'config'])
        subprocess.call(['make', 'install'])
        os.chdir(pwd)
        shutil.rmtree(cloned_dir)
    except Exception as ex:
        os.chdir(pwd)
        raise ex

    try:
        cloned_dir = utils.git_clone(
            'https://github.com/fastogt/libvdpau-sunxi.git')
        os.chdir(cloned_dir)
        subprocess.call(['make', 'install'])
        os.chdir(pwd)
        shutil.rmtree(cloned_dir)
    except Exception as ex:
        os.chdir(pwd)
        raise ex

    with open('/etc/udev/rules.d/50-mali.rules', 'w') as f:
        f.write('KERNEL=="mali", MODE="0660", GROUP="video"\n'
                'KERNEL=="ump", MODE="0660", GROUP="video"')

    with open('/etc/asound.conf', 'w') as f:
        f.write('pcm.!default {\n'
                'type hw\n'
                'card 1\n'
                '}\n'
                'ctl.!default {\n'
                'type hw\n'
                'card 1\n'
                '}')

    standart_egl_path = '/usr/lib/arm-linux-gnueabihf/mesa-egl/'
    if os.path.exists(standart_egl_path):
        shutil.move(standart_egl_path,
                    '/usr/lib/arm-linux-gnueabihf/.mesa-egl/')

    lirc_conf_path = os.path.join(script_dir, 'hardware/lirc/hardware.conf')
    if os.path.exists(LIRC_FOLDER):
        dst = os.path.join(LIRC_FOLDER, 'hardware.conf')
        shutil.copy(lirc_conf_path, dst)
Exemplo n.º 2
0
    def build_libmemcached(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/libmemcached.git', abs_dir_path)
            os.chdir(cloned_dir)

            bootstrap_policy = run_command.CommonPolicy(print_message)
            bootstrap_libmemcached = ['sh', 'bootstrap.sh']
            run_command.run_command_cb(bootstrap_libmemcached,
                                       bootstrap_policy)

            configure_libmemcached = [
                './configure', '--prefix={0}'.format(prefix_path),
                '--disable-shared', '--enable-static', '--enable-sasl'
            ]
            configure_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(configure_libmemcached,
                                       configure_policy)

            make_libmemcached = ['make', 'install']  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_libmemcached, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 3
0
    def build_rocksdb(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/rocksdb.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DFAIL_ON_WARNINGS=OFF')
            common_cmake_line.append('-DPORTABLE=ON')
            common_cmake_line.append('-DWITH_TESTS=OFF')
            common_cmake_line.append('-DWITH_SNAPPY=ON')
            common_cmake_line.append('-DWITH_ZLIB=ON')
            common_cmake_line.append('-DWITH_LZ4=ON')
            common_cmake_line.append('-DROCKSDB_INSTALL_ON_WINDOWS=ON')
            common_cmake_line.append('-DWITH_TOOLS=OFF')
            common_cmake_line.append('-DWITH_GFLAGS=OFF')
            common_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 4
0
    def build_common(self):
        pwd = os.getcwd()
        cmake_project_root_abs_path = '..'
        if not os.path.exists(cmake_project_root_abs_path):
            raise utils.BuildError('invalid cmake_project_root_path: %s' %
                                   cmake_project_root_abs_path)

        # project static options
        prefix_args = '-DCMAKE_INSTALL_PREFIX={0}'.format(self.prefix_path_)

        cmake_line = [
            'cmake', cmake_project_root_abs_path, '-GUnix Makefiles',
            '-DCMAKE_BUILD_TYPE=RELEASE', prefix_args
        ]
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/common.git', pwd)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DQT_ENABLED=OFF')
            common_cmake_line.append('-DJSON_ENABLED=ON')
            common_cmake_line.append('-DBUILD_WITH_FPIC=ON')
            subprocess.call(common_cmake_line)
            subprocess.call(['make', 'install'])
            os.chdir(self.build_dir_path_)
            # shutil.rmtree(cloned_dir)
        except Exception as ex:
            os.chdir(self.build_dir_path_)
            raise ex
Exemplo n.º 5
0
 def _clone_and_build_via_configure(self, url: str, compiler_flags: list, executable='./configure',
                                    use_platform_flags=True, branch=None, remove_dot_git=True):
     pwd = os.getcwd()
     cloned_dir = utils.git_clone(url, branch, remove_dot_git)
     os.chdir(cloned_dir)
     self._build_via_configure(compiler_flags, executable, use_platform_flags)
     os.chdir(pwd)
Exemplo n.º 6
0
    def build_libssh2(self, cmake_line, prefix_path, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/topilski/libssh2.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            libssh2_cmake_line = list(cmake_line)
            libssh2_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            libssh2_cmake_line.append('-DCRYPTO_BACKEND=OpenSSL')
            libssh2_cmake_line.append('-DENABLE_ZLIB_COMPRESSION=ON')
            libssh2_cmake_line.append('-DBUILD_EXAMPLES=OFF')
            libssh2_cmake_line.append('-DBUILD_TESTING=OFF')
            libssh2_cmake_line.append('-DOPENSSL_USE_STATIC_LIBS=ON')
            libssh2_cmake_line.append('-DZLIB_USE_STATIC=ON')
            libssh2_cmake_line.append(
                '-DOPENSSL_ROOT_DIR={0}'.format(prefix_path))
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(libssh2_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 7
0
    def build_rocksdb(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/rocksdb.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DFAIL_ON_WARNINGS=OFF')
            common_cmake_line.append('-DPORTABLE=ON')
            common_cmake_line.append('-DWITH_TESTS=OFF')
            common_cmake_line.append('-DWITH_SNAPPY=ON')
            common_cmake_line.append('-DWITH_ZLIB=ON')
            common_cmake_line.append('-DWITH_LZ4=ON')
            common_cmake_line.append('-DROCKSDB_INSTALL_ON_WINDOWS=ON')
            common_cmake_line.append('-DWITH_TOOLS=OFF')
            common_cmake_line.append('-DWITH_GFLAGS=OFF')
            common_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 8
0
    def build_jsonc(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/json-c.git', abs_dir_path)
            os.chdir(cloned_dir)

            autogen_policy = run_command.CommonPolicy(print_message)
            autogen_jsonc = ['sh', 'autogen.sh']
            run_command.run_command_cb(autogen_jsonc, autogen_policy)

            configure_jsonc = [
                './configure', '--prefix={0}'.format(prefix_path),
                '--disable-shared', '--enable-static'
            ]
            configure_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(configure_jsonc, configure_policy)

            make_jsonc = ['make', 'install']  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_jsonc, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 9
0
    def build_upscaledb(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/upscaledb.git', abs_dir_path)
            os.chdir(cloned_dir)
            bootstrap_policy = run_command.CommonPolicy(print_message)
            bootstrap_upscaledb = ['sh', 'bootstrap.sh']
            run_command.run_command_cb(bootstrap_upscaledb, bootstrap_policy)

            configure_upscaledb = [
                './configure', '--prefix={0}'.format(prefix_path),
                '--disable-remote', '--enable-static-boost',
                '--disable-shared', '--disable-java', '--disable-simd',
                '--disable-encryption'
            ]
            configure_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(configure_upscaledb, configure_policy)

            make_install_upscaledb = ['make', 'install']  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_install_upscaledb, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 10
0
    def build_libssh2(self, cmake_line, prefix_path, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/topilski/libssh2.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            libssh2_cmake_line = list(cmake_line)
            libssh2_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            libssh2_cmake_line.append('-DCRYPTO_BACKEND=OpenSSL')
            libssh2_cmake_line.append('-DENABLE_ZLIB_COMPRESSION=ON')
            libssh2_cmake_line.append('-DBUILD_EXAMPLES=OFF')
            libssh2_cmake_line.append('-DBUILD_TESTING=OFF')
            libssh2_cmake_line.append('-DOPENSSL_USE_STATIC_LIBS=ON')
            libssh2_cmake_line.append('-DZLIB_USE_STATIC=ON')
            libssh2_cmake_line.append('-DOPENSSL_ROOT_DIR={0}'.format(prefix_path))
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(libssh2_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 11
0
    def build_snappy(self):
        pwd = os.getcwd()
        cmake_project_root_abs_path = '..'
        if not os.path.exists(cmake_project_root_abs_path):
            raise utils.BuildError('invalid cmake_project_root_path: %s' % cmake_project_root_abs_path)

        # project static options
        prefix_args = '-DCMAKE_INSTALL_PREFIX={0}'.format(self.prefix_path_)

        cmake_line = ['cmake', cmake_project_root_abs_path, '-GNinja', '-DCMAKE_BUILD_TYPE=RELEASE',
                      '-DBUILD_SHARED_LIBS=OFF', '-DSNAPPY_BUILD_TESTS=OFF',
                      prefix_args]
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/snappy.git', pwd)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            snappy_cmake_line = list(cmake_line)
            subprocess.call(snappy_cmake_line)
            subprocess.call(['ninja', 'install'])
            os.chdir(self.build_dir_path_)
            # shutil.rmtree(cloned_dir)
        except Exception as ex:
            os.chdir(self.build_dir_path_)
            raise ex
Exemplo n.º 12
0
    def build_ffmpeg(self):
        ffmpeg_platform_args = ['--disable-doc', '--pkg-config-flags=--static',
                                '--disable-programs', '--enable-openssl',
                                '--disable-opencl', '--disable-encoders',
                                '--disable-lzma', '--disable-iconv',
                                '--disable-shared', '--enable-static',
                                '--disable-debug', '--disable-jni', '--enable-postproc', '--enable-filter=yadif',
                                '--enable-avfilter', '--enable-avcodec', '--enable-avdevice', '--enable-avformat',
                                '--enable-swscale', '--enable-swresample',
                                '--extra-version=static']  # '--extra-cflags=--static'
        platform_name = self.platform_.name()
        if platform_name == 'linux':
            ffmpeg_platform_args.extend(['--disable-libxcb'])
        elif platform_name == 'windows':
            ffmpeg_platform_args = ffmpeg_platform_args
        elif platform_name == 'macosx':
            ffmpeg_platform_args.extend(['--cc=clang', '--cxx=clang++', '--disable-libxcb'])

        pwd = os.getcwd()
        compiler_flags = self.device_.ffmpeg_compile_info()
        compiler_flags.extend_flags(ffmpeg_platform_args)
        cloned_dir = utils.git_clone('https://github.com/fastogt/ffmpeg.git', pwd)
        os.chdir(cloned_dir)
        utils.build_command_configure(compiler_flags, g_script_path, self.prefix_path_)
        os.chdir(pwd)
Exemplo n.º 13
0
 def build_qscintilla(self):
     cloned_dir = utils.git_clone(
         'https://github.com/topilski/qscintilla.git')
     qsci_src_path = os.path.join(cloned_dir, 'src')
     os.chdir(qsci_src_path)
     self._build_via_cmake([])
     os.chdir(self.build_dir_path_)
Exemplo n.º 14
0
 def _clone_and_build_via_python3(self, url: str, branch=None,
                                  remove_dot_git=True):
     pwd = os.getcwd()
     cloned_dir = utils.git_clone(url, branch, remove_dot_git)
     os.chdir(cloned_dir)
     python3_line = ['python3', 'setup.py', 'install']
     subprocess.call(python3_line)
     os.chdir(pwd)
Exemplo n.º 15
0
    def build_hiredis(self):
        pwd = os.getcwd()
        cloned_dir = utils.git_clone('https://github.com/fastogt/hiredis.git', pwd)
        os.chdir(cloned_dir)

        make_hiredis = ['make', 'PREFIX={0}'.format(self.prefix_path_), 'install']
        subprocess.call(make_hiredis)
        os.chdir(pwd)
Exemplo n.º 16
0
 def _clone_and_build_via_meson(self,
                                url: str,
                                meson_flags: list,
                                branch=None,
                                remove_dot_git=True):
     pwd = os.getcwd()
     cloned_dir = utils.git_clone(url, branch, remove_dot_git)
     os.chdir(cloned_dir)
     self._build_via_meson(meson_flags)
     os.chdir(pwd)
Exemplo n.º 17
0
    def build_hiredis(self):
        try:
            cloned_dir = utils.git_clone('[email protected]:fastogt/hiredis.git')
            os.chdir(cloned_dir)

            make_hiredis = ['make', 'LIBSSH2_ENABLED=ON', 'OPENSSL_ROOT_DIR={0}'.format(self.prefix_path_),
                            'PREFIX={0}'.format(self.prefix_path_), 'install']
            subprocess.call(make_hiredis)
        except Exception as ex:
            raise ex
        finally:
            os.chdir(self.build_dir_path_)
Exemplo n.º 18
0
    def build_lmdb(self):
        try:
            cloned_dir = utils.git_clone('[email protected]:fastogt/lmdb.git')
            os.chdir(cloned_dir)

            os.chdir('libraries/liblmdb')
            make_lmdb = ['make', 'install_static_lib', 'prefix={0}'.format(self.prefix_path_)]  # FIXME
            subprocess.call(make_lmdb)
        except Exception as ex:
            raise ex
        finally:
            os.chdir(self.build_dir_path_)
Exemplo n.º 19
0
    def build_libev(self):
        libev_compiler_flags = utils.CompileInfo([], ['--with-pic', '--disable-shared', '--enable-static'])

        pwd = os.getcwd()
        cloned_dir = utils.git_clone('https://github.com/fastogt/libev.git', pwd)
        os.chdir(cloned_dir)

        autogen_libev = ['sh', 'autogen.sh']
        subprocess.call(autogen_libev)

        utils.build_command_configure(libev_compiler_flags, g_script_path, self.prefix_path_)
        os.chdir(pwd)
Exemplo n.º 20
0
    def build_libmemcached(self):
        try:
            cloned_dir = utils.git_clone('[email protected]:fastogt/libmemcached.git')
            os.chdir(cloned_dir)

            bootstrap_libmemcached = ['sh', 'bootstrap.sh']
            subprocess.call(bootstrap_libmemcached)

            self._build_via_configure(['--disable-shared', '--enable-static', '--enable-sasl'])
        except Exception as ex:
            raise ex
        finally:
            os.chdir(self.build_dir_path_)
Exemplo n.º 21
0
    def build_lmdb(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/lmdb.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.chdir('libraries/liblmdb')
            make_lmdb = ['make', 'install_static_lib', 'prefix={0}'.format(prefix_path)]  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_lmdb, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 22
0
    def build_hiredis(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/hiredis.git', abs_dir_path)
            os.chdir(cloned_dir)

            make_hiredis = ['make', 'LIBSSH2_ENABLED=ON', 'OPENSSL_ROOT_DIR={0}'.format(prefix_path),
                            'PREFIX={0}'.format(prefix_path), 'install']
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_hiredis, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 23
0
    def build_jsonc(self):
        jsonc_compiler_flags = utils.CompileInfo(
            [], ['--disable-shared', '--enable-static'])

        pwd = os.getcwd()
        cloned_dir = utils.git_clone('https://github.com/fastogt/json-c.git',
                                     pwd)
        os.chdir(cloned_dir)

        autogen_jsonc = ['sh', 'autogen.sh']
        subprocess.call(autogen_jsonc)

        utils.build_command_configure(jsonc_compiler_flags, g_script_path,
                                      self.prefix_path_)
        os.chdir(pwd)
        shutil.rmtree(cloned_dir)
Exemplo n.º 24
0
    def build_libev(self, prefix_path):
        libev_compiler_flags = utils.CompileInfo(
            [], ['--with-pic', '--disable-shared', '--enable-static'])

        pwd = os.getcwd()
        cloned_dir = utils.git_clone('https://github.com/fastogt/libev.git',
                                     pwd)
        os.chdir(cloned_dir)

        autogen_policy = run_command.CommonPolicy(print_message)
        autogen_libev = ['sh', 'autogen.sh']
        run_command.run_command_cb(autogen_libev, autogen_policy)

        utils.build_command_configure(libev_compiler_flags, g_script_path,
                                      prefix_path)
        os.chdir(pwd)
        shutil.rmtree(cloned_dir)
Exemplo n.º 25
0
    def build_unqlite(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/unqlite.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 26
0
    def build_lmdb(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/lmdb.git',
                                         abs_dir_path)
            os.chdir(cloned_dir)

            os.chdir('libraries/liblmdb')
            make_lmdb = [
                'make', 'install_static_lib', 'prefix={0}'.format(prefix_path)
            ]  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_lmdb, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 27
0
    def build_qscintilla(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/qscintilla.git', abs_dir_path)
            qsci_src_path = os.path.join(cloned_dir, 'Qt4Qt5')
            os.chdir(qsci_src_path)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            qscintilla_cmake_line = list(cmake_line)
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(qscintilla_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 28
0
    def build_forestdb(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/forestdb.git', abs_dir_path, None, False)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            forestdb_cmake_line = list(cmake_line)
            forestdb_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(forestdb_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 29
0
    def build_unqlite(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/unqlite.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 30
0
    def build_hiredis(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/hiredis.git', abs_dir_path)
            os.chdir(cloned_dir)

            make_hiredis = [
                'make', 'LIBSSH2_ENABLED=ON',
                'OPENSSL_ROOT_DIR={0}'.format(prefix_path),
                'PREFIX={0}'.format(prefix_path), 'install'
            ]
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_hiredis, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 31
0
    def build_qscintilla(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/qscintilla.git', abs_dir_path)
            qsci_src_path = os.path.join(cloned_dir, 'Qt4Qt5')
            os.chdir(qsci_src_path)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            qscintilla_cmake_line = list(cmake_line)
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(qscintilla_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 32
0
    def build_forestdb(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('[email protected]:fastogt/forestdb.git',
                                         abs_dir_path, None, False)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            forestdb_cmake_line = list(cmake_line)
            forestdb_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(forestdb_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 33
0
    def build_leveldb(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/leveldb.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            common_cmake_line.append('-DLEVELDB_BUILD_TESTS=OFF')
            common_cmake_line.append('-DLEVELDB_BUILD_BENCHMARKS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 34
0
    def build_common(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/common.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DQT_ENABLED=ON')
            common_cmake_line.append('-DJSON_ENABLED=ON')
            common_cmake_line.append('-DSNAPPY_USE_STATIC=ON')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 35
0
    def build_cpuid(self):
        cpuid_compiler_flags = ['--disable-shared', '--enable-static']

        pwd = os.getcwd()
        cloned_dir = utils.git_clone(generate_fastogt_git_path('libcpuid'))
        os.chdir(cloned_dir)

        platform_name = self.platform_name()
        if platform_name == 'macosx':
            libtoolize_cpuid = ['glibtoolize']
        else:
            libtoolize_cpuid = ['libtoolize']
        subprocess.call(libtoolize_cpuid)

        autoreconf_cpuid = ['autoreconf', '--install']
        subprocess.call(autoreconf_cpuid)

        self._build_via_configure(cpuid_compiler_flags)

        os.chdir(pwd)
Exemplo n.º 36
0
    def build_snappy(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/snappy.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            snappy_cmake_line = list(cmake_line)
            snappy_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            snappy_cmake_line.append('-DSNAPPY_BUILD_TESTS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(snappy_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 37
0
    def build_common(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/common.git', abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DQT_ENABLED=ON')
            common_cmake_line.append('-DJSON_ENABLED=ON')
            common_cmake_line.append('-DSNAPPY_USE_STATIC=ON')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 38
0
    def build_leveldb(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('[email protected]:fastogt/leveldb.git',
                                         abs_dir_path)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            common_cmake_line = list(cmake_line)
            common_cmake_line.append('-DBUILD_SHARED_LIBS=OFF')
            common_cmake_line.append('-DLEVELDB_BUILD_TESTS=OFF')
            common_cmake_line.append('-DLEVELDB_BUILD_BENCHMARKS=OFF')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(common_cmake_line, cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 39
0
    def build_jsonc(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/json-c.git', abs_dir_path)
            os.chdir(cloned_dir)

            autogen_policy = run_command.CommonPolicy(print_message)
            autogen_jsonc = ['sh', 'autogen.sh']
            run_command.run_command_cb(autogen_jsonc, autogen_policy)

            configure_jsonc = ['./configure', '--prefix={0}'.format(prefix_path), '--disable-shared',
                               '--enable-static']
            configure_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(configure_jsonc, configure_policy)

            make_jsonc = ['make', 'install']  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_jsonc, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 40
0
    def build_libmemcached(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/libmemcached.git', abs_dir_path)
            os.chdir(cloned_dir)

            bootstrap_policy = run_command.CommonPolicy(print_message)
            bootstrap_libmemcached = ['sh', 'bootstrap.sh']
            run_command.run_command_cb(bootstrap_libmemcached, bootstrap_policy)

            configure_libmemcached = ['./configure', '--prefix={0}'.format(prefix_path), '--disable-shared',
                                      '--enable-static', '--enable-sasl']
            configure_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(configure_libmemcached, configure_policy)

            make_libmemcached = ['make', 'install']  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_libmemcached, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 41
0
    def build_upscaledb(self, prefix_path):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone('https://github.com/fastogt/upscaledb.git', abs_dir_path)
            os.chdir(cloned_dir)
            bootstrap_policy = run_command.CommonPolicy(print_message)
            bootstrap_upscaledb = ['sh', 'bootstrap.sh']
            run_command.run_command_cb(bootstrap_upscaledb, bootstrap_policy)

            configure_upscaledb = ['./configure', '--prefix={0}'.format(prefix_path), '--disable-remote',
                                   '--enable-static-boost', '--disable-shared', '--disable-java', '--disable-simd',
                                   '--disable-encryption']
            configure_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(configure_upscaledb, configure_policy)

            make_install_upscaledb = ['make', 'install']  # FIXME
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(make_install_upscaledb, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex
Exemplo n.º 42
0
    def build_fastonosql_core(self, cmake_line, make_install):
        abs_dir_path = self.build_dir_path_
        try:
            cloned_dir = utils.git_clone(
                'https://github.com/fastogt/fastonosql_core.git', abs_dir_path,
                None, False)
            os.chdir(cloned_dir)

            os.mkdir('build_cmake_release')
            os.chdir('build_cmake_release')
            fastonosql_core_cmake_line = list(cmake_line)
            fastonosql_core_cmake_line.append('-DJSONC_USE_STATIC=ON')
            fastonosql_core_cmake_line.append('-DSNAPPY_USE_STATIC=ON')
            fastonosql_core_cmake_line.append('-DOPENSSL_USE_STATIC_LIBS=ON')
            cmake_policy = run_command.CmakePolicy(print_message)
            make_policy = run_command.CommonPolicy(print_message)
            run_command.run_command_cb(fastonosql_core_cmake_line,
                                       cmake_policy)
            run_command.run_command_cb(make_install, make_policy)
            os.chdir(abs_dir_path)
        except Exception as ex:
            os.chdir(abs_dir_path)
            raise ex