Make libzim use the test data dire downloaded with zim-testing-tool.
This commit is contained in:
parent
2d3c5ed4c7
commit
9d90568204
|
@ -2,7 +2,7 @@ from .base import (
|
||||||
Dependency,
|
Dependency,
|
||||||
GitClone,
|
GitClone,
|
||||||
MesonBuilder)
|
MesonBuilder)
|
||||||
from kiwixbuild._global import option
|
from kiwixbuild._global import option, get_target_step
|
||||||
|
|
||||||
class Libzim(Dependency):
|
class Libzim(Dependency):
|
||||||
name = "libzim"
|
name = "libzim"
|
||||||
|
@ -20,12 +20,14 @@ class Libzim(Dependency):
|
||||||
@property
|
@property
|
||||||
def configure_option(self):
|
def configure_option(self):
|
||||||
platformInfo = self.buildEnv.platformInfo
|
platformInfo = self.buildEnv.platformInfo
|
||||||
|
zim_testing_suite = get_target_step('zim-testing-suite', platformInfo.name)
|
||||||
|
config_options = ['-Dtest_data_dir={}'.format(zim_testing_suite.source_path)]
|
||||||
if platformInfo.build == 'android':
|
if platformInfo.build == 'android':
|
||||||
return "-DUSE_BUFFER_HEADER=false"
|
config_options.append("-DUSE_BUFFER_HEADER=false")
|
||||||
if platformInfo.build == 'iOS':
|
if platformInfo.build == 'iOS':
|
||||||
return "-Db_bitcode=true"
|
config_options.append("-Db_bitcode=true")
|
||||||
if platformInfo.name == 'native_mixed' and option('target') == 'libzim':
|
if platformInfo.name == 'native_mixed' and option('target') == 'libzim':
|
||||||
return "-Dstatic-linkage=true"
|
config_options.append("-Dstatic-linkage=true")
|
||||||
if platformInfo.name == "flatpak":
|
if platformInfo.name == "flatpak":
|
||||||
return "--wrap-mode=nodownload"
|
config_options.append("--wrap-mode=nodownload")
|
||||||
return ""
|
return " ".join(config_options)
|
||||||
|
|
Loading…
Reference in New Issue