diff --git a/dependencies.py b/dependencies.py index d1ee68a..f0ec13f 100644 --- a/dependencies.py +++ b/dependencies.py @@ -228,6 +228,11 @@ class OpenzimSource(GitClone): git_remote = "https://gerrit.wikimedia.org/r/p/openzim.git" git_dir = "openzim" + def _post_prepare_script(self, context): + context.try_skip(self.git_path) + command = "./autogen.sh" + self.buildEnv.run_command(command, pj(self.git_path, 'zimwriterfs'), context) + class Zimlib(Dependency): name = "zimlib" @@ -238,6 +243,24 @@ class Zimlib(Dependency): subsource_dir = "zimlib" +class Zimwriterfs(Dependency): + name = "zimwriterfs" + extra_packages = ['file', 'gumbo'] + + @property + def dependencies(self): + base_dependencies = ['Zimlib', 'zlib', 'lzma', 'Xapian'] + if self.buildEnv.platform_info.build != 'native': + return base_dependencies + ["Icu_cross_compile"] + else: + return base_dependencies + ["Icu"] + + Source = OpenzimSource + + class Builder(MakeBuilder): + subsource_dir = "zimwriterfs" + + class Kiwixlib(Dependency): name = "kiwix-lib" diff --git a/kiwix-build.py b/kiwix-build.py index e4f0b77..c018fd9 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -82,6 +82,8 @@ PACKAGE_NAME_MAPPERS = { 'lzma': ['xz-devel'], 'icu4c': None, 'zimlib': None, + 'file' : ['file-devel'], + 'gumbo' : ['gumbo-parser-devel'], }, 'fedora_native_static': { 'COMMON': ['gcc-c++', 'cmake', 'automake', 'glibc-static', 'libstdc++-static', 'ccache'],