Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cmake.py « packages - github.com/mono/bockbuild.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a970692c63ecd15be0f98567c1aae88ce2a8f3b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from distutils.version import LooseVersion, StrictVersion


class SystemCMake (Package):

    def __init__(self):
        Package.__init__(self, 'cmake', 'system', sources=None)
        cmake_path = which('cmake')
        if cmake_path is None:
            error('cmake not found in PATH')
        self.cmake_path = cmake_path
        cmake_version_str = backtick('%s --version' % self.cmake_path)[0].split(' ')[2]
        cmake_version = StrictVersion(cmake_version_str)
        self.version = str(cmake_version)

    def build(self):
        pass

    def install(self):
        self.sh('mkdir -p "%{staged_prefix}/bin"')
        self.sh('ln -s -F %{cmake_path} "%{staged_prefix}/bin/cmake"')

SystemCMake()