mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-28 05:49:33 +00:00
Add a support to compile libzim for wasm.
`icu4c_wasm.patch` is build by : - Copying config.sub from liblzma source as new version of config.sub there knows about wasm architecture. - Copying `mh-linux` on `mh-unknown` as specified in (origin) `mh-unknown`. This is because icu4c configure doesn't detect `emscripten` platform and "fallback" to `mh-unknown`.
This commit is contained in:
@ -19,7 +19,7 @@ class Libzim(Dependency):
|
||||
@classmethod
|
||||
def get_dependencies(cls, platformInfo, allDeps):
|
||||
deps = ['lzma', 'zstd', 'xapian-core', 'icu4c']
|
||||
if platformInfo.build != 'flatpak':
|
||||
if platformInfo.name not in ('flatpak', 'wasm'):
|
||||
deps.append('zim-testing-suite')
|
||||
return deps
|
||||
|
||||
@ -37,7 +37,9 @@ class Libzim(Dependency):
|
||||
if platformInfo.name == "flatpak":
|
||||
config_options.append("--wrap-mode=nodownload")
|
||||
config_options.append("-Dtest_data_dir=none")
|
||||
else:
|
||||
if platformInfo.name == "wasm":
|
||||
config_options.append("-Dexamples=false")
|
||||
if platformInfo.name not in ("flatpak", "wasm"):
|
||||
zim_testing_suite = get_target_step('zim-testing-suite', 'source')
|
||||
config_options.append('-Dtest_data_dir={}'.format(zim_testing_suite.source_path))
|
||||
return " ".join(config_options)
|
||||
|
Reference in New Issue
Block a user