diff --git a/dependencies.py b/dependencies.py index 5bbcf28..6c55f82 100644 --- a/dependencies.py +++ b/dependencies.py @@ -232,7 +232,14 @@ class Icu_cross_compile(Icu): class Libzim(Dependency): name = "libzim" - dependencies = ['zlib', 'lzma'] + + @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" @@ -270,7 +277,7 @@ class Kiwixlib(Dependency): @property def dependencies(self): - base_dependencies = ["xapian-core", "pugixml", "libzim", "zlib", "lzma"] + base_dependencies = ["pugixml", "libzim", "zlib", "lzma"] if self.buildEnv.platform_info.build != 'android': base_dependencies += ['ctpp2'] if self.buildEnv.platform_info.build != 'native': diff --git a/kiwix-build.py b/kiwix-build.py index e8d6e11..1dfd656 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -29,6 +29,7 @@ CROSS_ENV = { 'toolchain_names': ['mingw32_toolchain'], 'root_path': '/usr/i686-w64-mingw32/sys-root/mingw', 'extra_libs': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4', '-lmsvcr90'], + 'extra_cflags': ['-DWIN32'], 'host_machine': { 'system': 'windows', 'cpu_family': 'x86', @@ -39,6 +40,7 @@ CROSS_ENV = { 'fedora_android': { 'toolchain_names': ['android_ndk'], 'extra_libs': [], + 'extra_cflags': [], 'host_machine': { 'system': 'Android', 'cpu_family': 'x86', @@ -50,6 +52,7 @@ CROSS_ENV = { 'toolchain_names': ['mingw32_toolchain'], 'root_path': '/usr/i686-w64-mingw32/', 'extra_libs': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4', '-lmsvcr90'], + 'extra_cflags': ['-DWIN32'], 'host_machine': { 'system': 'windows', 'cpu_family': 'x86', @@ -60,6 +63,7 @@ CROSS_ENV = { 'debian_android': { 'toolchain_names': ['android_ndk'], 'extra_libs': [], + 'extra_cflags': [], 'host_machine': { 'system': 'Android', 'cpu_family': 'x86', @@ -121,13 +125,13 @@ PACKAGE_NAME_MAPPERS = { 'ctpp2': ['libctpp2-dev'], }, 'debian_win32_dyn': { - 'COMMON': ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools', 'ccache'] + 'COMMON': ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools', 'cmake', 'ccache'] }, 'debian_win32_static': { - 'COMMON': ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools', 'ccache'] + 'COMMON': ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools', 'cmake', 'ccache'] }, 'debian_android': { - 'COMMON': ['automake', 'gcc', 'cmake', 'ccache'] + 'COMMON': ['automake', 'gcc', 'cmake', 'ccache', 'default-jdk'] }, } diff --git a/templates/meson_cross_file.txt b/templates/meson_cross_file.txt index 6edddf4..9ea717f 100644 --- a/templates/meson_cross_file.txt +++ b/templates/meson_cross_file.txt @@ -8,6 +8,8 @@ strip = '{toolchain.binaries[STRIP]}' [properties] c_link_args = {extra_libs!r} cpp_link_args = {extra_libs!r} +c_args = {extra_cflags!r} +cpp_args = {extra_cflags!r} [host_machine] cpu_family = '{host_machine[cpu_family]}'