From ece4df37218b37daf26b9889dc0cf73915eae045 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Tue, 31 Mar 2020 13:29:50 +0400 Subject: [PATCH] Added zstd dependency --- kiwixbuild/dependencies/__init__.py | 3 ++- kiwixbuild/dependencies/all_dependencies.py | 2 +- kiwixbuild/dependencies/libzim.py | 2 +- kiwixbuild/dependencies/zstd.py | 22 +++++++++++++++++++++ kiwixbuild/versions.py | 3 ++- 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 kiwixbuild/dependencies/zstd.py diff --git a/kiwixbuild/dependencies/__init__.py b/kiwixbuild/dependencies/__init__.py index 7464bd9..258c38d 100644 --- a/kiwixbuild/dependencies/__init__.py +++ b/kiwixbuild/dependencies/__init__.py @@ -25,5 +25,6 @@ from . import ( xapian, zim_tools, zimwriterfs, - zlib + zlib, + zstd ) diff --git a/kiwixbuild/dependencies/all_dependencies.py b/kiwixbuild/dependencies/all_dependencies.py index d642dcd..4aa1c20 100644 --- a/kiwixbuild/dependencies/all_dependencies.py +++ b/kiwixbuild/dependencies/all_dependencies.py @@ -12,7 +12,7 @@ class AllBaseDependencies(Dependency): class Builder(NoopBuilder): @classmethod def get_dependencies(cls, platformInfo, allDeps): - base_deps = ['zlib', 'lzma', 'xapian-core', 'pugixml', 'libcurl', 'icu4c', 'mustache', 'libmicrohttpd'] + base_deps = ['zlib', 'lzma', 'zstd', 'xapian-core', 'pugixml', 'libcurl', 'icu4c', 'mustache', 'libmicrohttpd'] # zimwriterfs if platformInfo.build not in ('android', 'win32'): base_deps += ['libmagic', 'gumbo'] diff --git a/kiwixbuild/dependencies/libzim.py b/kiwixbuild/dependencies/libzim.py index cba24ad..8869cd0 100644 --- a/kiwixbuild/dependencies/libzim.py +++ b/kiwixbuild/dependencies/libzim.py @@ -14,7 +14,7 @@ class Libzim(Dependency): class Builder(MesonBuilder): test_option = "-t 8" - dependencies = ['zlib', 'lzma', 'xapian-core', 'icu4c'] + dependencies = ['zlib', 'lzma', 'zstd', 'xapian-core', 'icu4c'] strip_option = '' @property diff --git a/kiwixbuild/dependencies/zstd.py b/kiwixbuild/dependencies/zstd.py new file mode 100644 index 0000000..30e67cd --- /dev/null +++ b/kiwixbuild/dependencies/zstd.py @@ -0,0 +1,22 @@ +from .base import ( + Dependency, + ReleaseDownload, + MesonBuilder) + +from kiwixbuild.utils import Remotefile + + + +class zstd(Dependency): + name = 'zstd' + + class Source(ReleaseDownload): + archive = Remotefile('zstd-1.4.4.tar.gz', + '59ef70ebb757ffe74a7b3fe9c305e2ba3350021a918d168a046c6300aeea9315', + 'https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-1.4.4.tar.gz') + + class Builder(MesonBuilder): + subsource_dir = 'build/meson' + build_type = 'release' + strip_option = '' + configure_option = '-Dbin_programs=false -Dbin_contrib=false' diff --git a/kiwixbuild/versions.py b/kiwixbuild/versions.py index 0a0dbff..1ca1bd0 100644 --- a/kiwixbuild/versions.py +++ b/kiwixbuild/versions.py @@ -42,11 +42,12 @@ release_versions = { # This is the "version" of the whole base_deps_versions dict. # Change this when you change base_deps_versions. -base_deps_meta_version = '64' +base_deps_meta_version = '65' base_deps_versions = { 'zlib' : '1.2.8', 'lzma' : '5.2.4', + 'zstd' : '1.4.4', 'uuid' : '1.43.4', 'xapian-core' : '1.4.14', 'mustache' : '3.2',