Esempio n. 1
0
    def configure(self):
        self.cross_configure("--disable-nls", "--enable-lto", "--enable-ld=yes", "--without-zlib")

        # After configuring we need to ice python, but we need
        # to ensure we do it using the built version of Python, not
        # this Python
        xyz.ensure_dir("gdb")
        with xyz.chdir("gdb"):
            self.cmd("{devtree_dir_abs}/{host}/bin/python3", "{root_dir_abs}/ice/ice.py", "stdlib")
Esempio n. 2
0
    def install(self):
        with xyz.chdir(self.config['build_dir']), xyz.umask(0o22):
            self.cmd('make', 'install_root={install_dir_abs}', 'install')

        self.rmtree('{eprefix_dir}', 'bin')
        self.rmtree('{eprefix_dir}', 'lib', 'gconv')
        self.rmtree('{eprefix_dir}', 'sbin')
        self.rmtree('{prefix_dir}', 'share', 'zoneinfo')
        self.rmtree('{prefix_dir}', 'share', 'i18n')
        self.rmtree('{prefix_dir}', 'share', 'locale')
        self.rmtree('{prefix_dir}', 'etc')
        self.strip_info_dir()

        for f in ['libc.so', 'libpthread.so']:
            fixup_so_file(self.j('{eprefix_dir}', 'lib', f))
Esempio n. 3
0
    def install(self):
        with xyz.chdir(self.config['build_dir']), xyz.umask(0o022):
            self.cmd('make', 'DESTDIR={install_dir_abs}',
                        'bininstall', 'inclinstall', 'libainstall', 'libinstall')

        for root, _, files in os.walk(self.config['install_dir']):
            for f in files:
                if not (f.endswith('.pyc') or f.endswith('.pyo')):
                    continue
                with open(os.path.join(root, f), 'r+b') as outf:
                    outf.seek(4)
                    outf.write(struct.pack('I', xyz.BASE_TIME))

        # Remove lib2to3
        self.rmtree('{install_dir}', 'noprefix', 'lib', 'python3.3', 'lib2to3')

        for f in ['2to3', 'idle3', 'pydoc3', 'pyvenv']:
            bin_fn = self.j('{install_dir}', 'noprefix', '{host}', 'bin', f)
            os.unlink(bin_fn)
Esempio n. 4
0
 def install(self):
     install_dir = self.j('{install_dir_abs}', '{host}', 'bin')
     with xyz.chdir(self.config['build_dir']):
         self.ensure_dir(install_dir)
         shutil.copy('st-util', install_dir)