Merge pull request #535 from kiwix/libzim_android
This commit is contained in:
commit
fce112d4b1
|
@ -16,7 +16,7 @@ RUN apt update -q \
|
|||
# Python (2) is needed to install android-ndk
|
||||
python \
|
||||
# Packaged dependencies
|
||||
libbz2-dev libmagic-dev uuid-dev zlib1g-dev default-jdk \
|
||||
libbz2-dev libmagic-dev uuid-dev zlib1g-dev \
|
||||
libmicrohttpd-dev aria2 libgtest-dev libgl-dev \
|
||||
# Qt packages
|
||||
qt515base qt515webengine qt515svg qt515imageformats qt515wayland \
|
||||
|
|
|
@ -11,9 +11,9 @@ from common import (
|
|||
DESKTOP,
|
||||
)
|
||||
|
||||
if PLATFORM_TARGET.startswith("android_"):
|
||||
TARGETS = ("libkiwix",)
|
||||
elif PLATFORM_TARGET.startswith("iOS") or PLATFORM_TARGET.startswith("macOS"):
|
||||
if (PLATFORM_TARGET.startswith("android_")
|
||||
or PLATFORM_TARGET.startswith("iOS")
|
||||
or PLATFORM_TARGET.startswith("macOS")):
|
||||
TARGETS = ("libzim", "libkiwix")
|
||||
elif PLATFORM_TARGET.startswith("native_"):
|
||||
if OS_NAME == "osx":
|
||||
|
|
|
@ -27,9 +27,7 @@ if os.environ.get('GITHUB_EVENT_NAME') == 'schedule':
|
|||
else:
|
||||
RELEASE = True
|
||||
|
||||
if PLATFORM_TARGET.startswith("android_"):
|
||||
TARGETS = ("libkiwix",)
|
||||
elif PLATFORM_TARGET.startswith("iOS"):
|
||||
if PLATFORM_TARGET.startswith("android_") or PLATFORM_TARGET.startswith("iOS"):
|
||||
TARGETS = ("libzim", "libkiwix")
|
||||
elif PLATFORM_TARGET.startswith("native_"):
|
||||
if OS_NAME == "osx":
|
||||
|
|
|
@ -93,9 +93,16 @@ EXPORT_FILES = {
|
|||
"libzim": (
|
||||
INSTALL_DIR,
|
||||
(
|
||||
"lib/x86_64-linux-gnu/libzim.so.{}".format(main_project_versions["libzim"]),
|
||||
"lib/x86_64-linux-gnu/libzim.so.{}".format(
|
||||
main_project_versions["libzim"][0]
|
||||
"lib/{libprefix}/libzim.so".format(
|
||||
libprefix=LIB_PREFIX.get(PLATFORM_TARGET, "x86_64-linux-gnu"),
|
||||
),
|
||||
"lib/{libprefix}/libzim.so.{version}".format(
|
||||
libprefix=LIB_PREFIX.get(PLATFORM_TARGET, "x86_64-linux-gnu"),
|
||||
version=main_project_versions["libzim"]
|
||||
),
|
||||
"lib/{libprefix}/libzim.so.{version}".format(
|
||||
libprefix=LIB_PREFIX.get(PLATFORM_TARGET, "x86_64-linux-gnu"),
|
||||
version=main_project_versions["libzim"][0]
|
||||
),
|
||||
"lib/libzim.{}.dylib".format(
|
||||
main_project_versions["libzim"][0]
|
||||
|
|
|
@ -12,9 +12,7 @@ from common import (
|
|||
KIWIX_DESKTOP_ONLY,
|
||||
)
|
||||
|
||||
if PLATFORM_TARGET.startswith("android_"):
|
||||
TARGETS = ("libzim", "libkiwix")
|
||||
elif PLATFORM_TARGET.startswith("iOS"):
|
||||
if PLATFORM_TARGET.startswith("android_") or PLATFORM_TARGET.startswith("iOS"):
|
||||
TARGETS = ("libzim", "libkiwix")
|
||||
elif PLATFORM_TARGET.startswith("native_"):
|
||||
if OS_NAME == "osx":
|
||||
|
|
|
@ -29,6 +29,7 @@ class Libzim(Dependency):
|
|||
config_options = []
|
||||
if platformInfo.build == 'android':
|
||||
config_options.append("-DUSE_BUFFER_HEADER=false")
|
||||
config_options.append("-Dstatic-linkage=true")
|
||||
if platformInfo.build == 'iOS':
|
||||
config_options.append("-Db_bitcode=true")
|
||||
if platformInfo.name == 'native_mixed' and option('target') == 'libzim':
|
||||
|
@ -40,3 +41,9 @@ class Libzim(Dependency):
|
|||
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)
|
||||
|
||||
@property
|
||||
def library_type(self):
|
||||
if self.buildEnv.platformInfo.build == 'android':
|
||||
return 'shared'
|
||||
return super().library_type
|
||||
|
|
|
@ -61,7 +61,7 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'COMMON': _fedora_common
|
||||
},
|
||||
'fedora_android': {
|
||||
'COMMON': _fedora_common + ['java-1.8.0-openjdk-devel']
|
||||
'COMMON': _fedora_common
|
||||
},
|
||||
'debian_native_dyn': {
|
||||
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
|
||||
|
@ -94,7 +94,7 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'COMMON': _debian_common,
|
||||
},
|
||||
'debian_android': {
|
||||
'COMMON': _debian_common + ['default-jdk'],
|
||||
'COMMON': _debian_common,
|
||||
},
|
||||
'Darwin_native_dyn': {
|
||||
'COMMON': ['autoconf', 'automake', 'libtool', 'cmake', 'pkg-config'],
|
||||
|
|
Loading…
Reference in New Issue