# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python class Recipe(recipe.Recipe): name = 'ninja' version = '1.11.1' licenses = [License.Apachev2] btype = BuildType.CUSTOM stype = SourceType.TARBALL url = 'https://github.com/ninja-build/ninja/archive/v%(version)s.tar.gz' tarball_checksum = '31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea' patches = ['ninja/0001-configure.py-Look-for-cl.exe-before-assuming-MSVC.patch'] files_bin = ['bin/ninja'] def configure(self): shell.new_call([self.config.python_exe, 'configure.py', '--bootstrap', '--verbose'], self.build_dir, logfile=self.logfile, env=self.env) async def install(self): ninja = 'ninja' if self.platform == Platform.WINDOWS: ninja += '.exe' bindir = os.path.join (self.config.prefix, "bin") if not os.path.exists(bindir): os.makedirs(bindir) os.replace(os.path.join(self.build_dir, ninja), os.path.join(bindir, ninja))