diff --git a/kiwixbuild/dependencies/all_dependencies.py b/kiwixbuild/dependencies/all_dependencies.py index 3755875..45dacef 100644 --- a/kiwixbuild/dependencies/all_dependencies.py +++ b/kiwixbuild/dependencies/all_dependencies.py @@ -13,12 +13,12 @@ class AllBaseDependencies(Dependency): @classmethod def get_dependencies(cls, platformInfo, allDeps): base_deps = ['zlib', 'lzma', 'zstd', 'xapian-core', 'pugixml', 'libcurl', 'icu4c', 'mustache', 'libmicrohttpd'] - # zimwriterfs from zim-tools - if platformInfo.build not in ('android', 'win32'): - base_deps += ['libmagic', 'gumbo'] - # zimtools - if platformInfo.build not in ('android','iOS'): + # We do not build zimtools at all on "android" and "iOS" + if platformInfo.build not in ('android', 'iOS'): base_deps += ['docoptcpp'] + if platformInfo.build != 'win32': + # zimwriterfs + base_deps += ['libmagic', 'gumbo'] return base_deps diff --git a/kiwixbuild/dependencies/zim_tools.py b/kiwixbuild/dependencies/zim_tools.py index ed03041..0ad17f5 100644 --- a/kiwixbuild/dependencies/zim_tools.py +++ b/kiwixbuild/dependencies/zim_tools.py @@ -12,12 +12,18 @@ class ZimTools(Dependency): git_dir = "zim-tools" class Builder(MesonBuilder): - dependencies = ['libzim', 'docoptcpp'] + @classmethod + def get_dependencies(cls, platformInfo, allDeps): + base_deps = ['libzim', 'docoptcpp'] + if platformInfo.build != 'win32': + base_deps += ['libmagic', 'gumbo'] + return base_deps @property def configure_option(self): base_option = "" - if self.buildEnv.platformInfo.build not in ('android', 'win32'): + # We don't build zimwriterfs on win32, and so we don't have magic + if self.buildEnv.platformInfo.build != 'win32': base_option += " -Dmagic-install-prefix={buildEnv.install_dir}" if self.buildEnv.platformInfo.static: base_option += " -Dstatic-linkage=true"