def configure(self, toolchain): # append argument --enable-arm-neon for targets supporting NEON if toolchain.arch.startswith( 'aarch64') or '-mfpu=neon' in toolchain.cflags: self.configure_args.append('--enable-arm-neon') return AutotoolsProject.configure(self, toolchain)
def configure(self, toolchain): if re.match('(arm.*|aarch64)-apple-darwin', toolchain.arch) is not None: # for building SDL2 with autotools, several workarounds are # required: # * out-of-tree build is not supported # * needs CFLAGS adjustment to enable Objective-C and ARC # * SDL_config.h needs to be replaced with SDL_config_iphoneos.h # after running "configure" src = self.unpack(toolchain, out_of_tree=False) configure = [ os.path.join(src, 'configure'), 'CC=' + toolchain.cc, 'CFLAGS=' + toolchain.cflags + ' -x objective-c -fobjc-arc', 'CPPFLAGS=' + toolchain.cppflags + ' ' + self.cppflags, 'LDFLAGS=' + toolchain.ldflags, 'LIBS=' + toolchain.libs, 'AR=' + toolchain.ar, 'STRIP=' + toolchain.strip, '--host=' + toolchain.arch, '--prefix=' + toolchain.install_prefix, ] + self.configure_args subprocess.check_call(configure, cwd=src, env=toolchain.env) shutil.copyfile(os.path.join(src, 'include/SDL_config_iphoneos.h'), os.path.join(src, 'include/SDL_config.h')) return src else: return AutotoolsProject.configure(self, toolchain)
def configure(self, toolchain): build = AutotoolsProject.configure(self, toolchain) comment_re = re.compile(r'^\w+_MODULES\s*\+=\s*(?:type1|cff|cid|pfr|type42|winfonts|pcf|bdf|lzw|bzip2|psaux|psnames)\s*$') modules_cfg = os.path.join(build, 'modules.cfg') tmp = modules_cfg + '.tmp' with open(modules_cfg) as src: with open(tmp, 'w') as dest: for line in src: if comment_re.match(line): line = '# ' + line dest.write(line) os.rename(tmp, modules_cfg) return build
def configure(self, toolchain): build = AutotoolsProject.configure(self, toolchain) comment_re = re.compile( r"^\w+_MODULES\s*\+=\s*(?:type1|cff|cid|pfr|type42|winfonts|pcf|bdf|lzw|bzip2|psaux|psnames)\s*$" ) modules_cfg = os.path.join(build, "modules.cfg") tmp = modules_cfg + ".tmp" with open(modules_cfg) as src: with open(tmp, "w") as dest: for line in src: if comment_re.match(line): line = "# " + line dest.write(line) os.rename(tmp, modules_cfg) return build
def configure(self, toolchain): # append argument --enable-arm-neon for targets supporting NEON if toolchain.actual_arch.startswith('aarch64') or '-mfpu=neon' in toolchain.cflags: self.configure_args.append('--enable-arm-neon') return AutotoolsProject.configure(self, toolchain)
def configure(self, toolchain): # disable usage of pthreads for Win32 builds if 'mingw' in toolchain.actual_arch: self.configure_args.append('--enable-pthreads=no') return AutotoolsProject.configure(self, toolchain)
def configure(self, toolchain, *args, **kwargs): # disable usage of pthreads for Win32 builds if 'mingw' in toolchain.actual_arch: self.configure_args.append('--enable-pthreads=no') return AutotoolsProject.configure(self, toolchain, *args, **kwargs)