From 77137e09087129c04965fca3e91bfa4332d8d1ab Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 22 Feb 2017 12:30:25 +0100 Subject: [PATCH] Add lzma dependency. --- dependencies.py | 19 +++++++++++++++---- kiwix-build.py | 6 +++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dependencies.py b/dependencies.py index f630e71..6248be9 100644 --- a/dependencies.py +++ b/dependencies.py @@ -16,8 +16,6 @@ from utils import Remotefile, pj, SkipCommand # exist in your "distri" (linux/mac) ? # If not, we need to compile them here # ************************************* -# Zlib -# LZMA # aria2 # Argtable # MSVirtual @@ -42,6 +40,19 @@ class zlib(Dependency): return "-DINSTALL_PKGCONFIG_DIR={}".format(pj(self.buildEnv.install_dir, self.buildEnv.libprefix, 'pkgconfig')) +class lzma(Dependency): + name = 'lzma' + version = '5.0.4' + + class Source(ReleaseDownload): + archive = Remotefile('xz-5.0.4.tar.bz2', + '5cd9b060d3a1ad396b3be52c9b9311046a1c369e6062aea752658c435629ce92') + + class Builder(MakeBuilder): + @property + def configure_option(self): + return "--disable-assembler" + class UUID(Dependency): name = 'uuid' version = "1.43.4" @@ -77,7 +88,7 @@ class Xapian(Dependency): @property def dependencies(self): - deps = ['zlib'] + deps = ['zlib', 'lzma'] if self.buildEnv.build_target == 'win32': return deps return deps + ['UUID'] @@ -196,7 +207,7 @@ class Zimlib(Dependency): class Kiwixlib(Dependency): name = "kiwix-lib" - dependencies = ['zlib'] + dependencies = ['zlib', 'lzma'] @property def dependencies(self): diff --git a/kiwix-build.py b/kiwix-build.py index 8a0e985..371fdba 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -84,22 +84,26 @@ PACKAGE_NAME_MAPPERS = { 'pugixml': None, # ['pugixml-devel'] but package doesn't provide pkg-config file 'libmicrohttpd': ['libmicrohttpd-devel'], 'zlib': ['zlib-devel'], + 'lzma': ['xz-devel'], 'icu4c': None, 'zimlib': None, }, 'fedora_native_static': { 'COMMON': ['gcc-c++', 'cmake', 'automake', 'glibc-static', 'libstdc++-static', 'ccache'], - 'zlib': ['zlib-devel', 'zlib-static'] + 'zlib': ['zlib-devel', 'zlib-static'], + 'lzma': ['xz-devel', 'xz-static'] # Either there is no packages, or no static or too old }, 'fedora_win32_dyn': { 'COMMON': ['mingw32-gcc-c++', 'mingw32-bzip2', 'mingw32-win-iconv', 'mingw32-winpthreads', 'wine', 'ccache'], 'zlib': ['mingw32-zlib'], + 'lzma': ['mingw32-xz-libs'], 'libmicrohttpd': ['mingw32-libmicrohttpd'], }, 'fedora_win32_static': { 'COMMON': ['mingw32-gcc-c++', 'mingw32-bzip2-static', 'mingw32-win-iconv-static', 'mingw32-winpthreads-static', 'wine', 'ccache'], 'zlib': ['mingw32-zlib-static'], + 'lzma': ['mingw32-xz-libs-static'], 'libmicrohttpd': None, # ['mingw32-libmicrohttpd-static'] packaging dependecy seems buggy, and some static lib are name libfoo.dll.a and # gcc cannot found them. },