Move dependencies declaration of a target into the builder.

This is the builder that depends on other target, not the target itself.
This commit is contained in:
Matthieu Gautier
2018-05-28 11:44:54 +02:00
parent 7e0b403ccc
commit 115fbfa147
14 changed files with 72 additions and 63 deletions

View File

@ -6,17 +6,17 @@ from .base import (
class Libzim(Dependency):
name = "libzim"
@property
def dependencies(self):
base_dependencies = ['zlib', 'lzma', 'xapian-core']
if self.buildEnv.platform_info.build != 'native':
return base_dependencies + ["icu4c_cross-compile"]
else:
return base_dependencies + ["icu4c"]
class Source(GitClone):
git_remote = "https://github.com/openzim/libzim.git"
git_dir = "libzim"
class Builder(MesonBuilder):
test_option = "-t 8"
@classmethod
def get_dependencies(cls, platformInfo):
base_dependencies = ['zlib', 'lzma', 'xapian-core']
if platformInfo.build != 'native':
return base_dependencies + ["icu4c_cross-compile"]
else:
return base_dependencies + ["icu4c"]