blob: 51a4e28ee75dbb651c7a919d417120096d069a11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# -*- 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))
|