ninja.recipe 887 Bytes
Newer Older
1 2 3 4
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python

class Recipe(recipe.Recipe):
    name = 'ninja'
5
    version = '1.8.2'
6 7
    licenses = [License.Apachev2]
    btype = BuildType.CUSTOM
8 9
    stype = SourceType.TARBALL
    url = 'https://github.com/ninja-build/ninja/archive/v%(version)s.tar.gz'
10
    tarball_checksum = '86b8700c3d0880c2b44c2ff67ce42774aaf8c28cbf57725cb881569288c1c6f4'
11
    patches = ['ninja/0001-configure.py-Look-for-cl.exe-before-assuming-MSVC.patch']
12 13 14 15 16
    deps = []

    files_bin = ['bin/ninja']

    def configure(self):
17
        shell.call(self.config.python_exe + ' ./configure.py --bootstrap', self.build_dir)
18 19

    def install(self):
20 21 22 23 24
        ninja = 'ninja'
        if self.platform == Platform.WINDOWS:
            ninja += '.exe'
        os.replace(os.path.join(self.build_dir, ninja),
                   os.path.join (self.config.prefix, "bin", ninja))