Ejemplo n.º 1
0
 def _download_and_build_via_cmake(self, url: str, cmake_flags: list):
     pwd = os.getcwd()
     file_path = utils.download_file(url)
     extracted_folder = utils.extract_file(file_path)
     os.chdir(extracted_folder)
     self._build_via_cmake(cmake_flags)
     os.chdir(pwd)
Ejemplo n.º 2
0
 def _download_and_build_via_configure(self, url: str, compiler_flags: list, executable='./configure',
                                       use_platform_flags=True):
     pwd = os.getcwd()
     file_path = utils.download_file(url)
     extracted_folder = utils.extract_file(file_path)
     os.chdir(extracted_folder)
     self._build_via_configure(compiler_flags, executable, use_platform_flags)
     os.chdir(pwd)
Ejemplo n.º 3
0
 def _download_and_build_via_meson(self, url: str, compiler_flags: list,
                                   build_system=get_supported_build_system_by_name('ninja')):
     pwd = os.getcwd()
     file_path = utils.download_file(url)
     extracted_folder = utils.extract_file(file_path)
     os.chdir(extracted_folder)
     self._build_via_meson(compiler_flags, build_system)
     os.chdir(pwd)
Ejemplo n.º 4
0
 def _download_and_build_via_python3(self, url: str):
     pwd = os.getcwd()
     file_path = utils.download_file(url)
     extracted_folder = utils.extract_file(file_path)
     os.chdir(extracted_folder)
     python3_line = ['python3', 'setup.py', 'install']
     subprocess.call(python3_line)
     os.chdir(pwd)
Ejemplo n.º 5
0
    def build_openssl(self, version, have_shared=False):
        compiler_flags = ['no-tests']
        if not have_shared:
            compiler_flags.append('no-shared')

        platform = self.platform()
        if platform.name() == 'android':
            compiler_flags.append('no-asm')

        # compiler_flags.append('--openssldir={0}'.format(self.prefix_path_))
        compiler_flags.append('--libdir=lib')

        url = '{0}openssl-{1}.{2}'.format(self.OPENSSL_SRC_ROOT, version, self.ARCH_OPENSSL_EXT)
        # download
        pwd = os.getcwd()
        file_path = utils.download_file(url)
        extracted_folder = utils.extract_file(file_path)
        os.chdir(extracted_folder)
        build_command_configure(compiler_flags, self.prefix_path_, './config',
                                get_supported_build_system_by_name('single_make'))
        os.chdir(pwd)