The `source_dir` is automatically infer from the name of the dependency.
As the ctpp2 source is use in two dependencies (ctpp2 and ctpp2c), if
we use the default source_dir, kiwix-build will use one name and the
other dependency will not find the source directory.
By forcing the `source_dir`, both dependencies will use the same directory.
It seems that shutil.copytree on travis fails to copy symlinks to
directory. It is probably due to last travis changes.
Let's keep the symlinks as they are.
We are using `ctpp2c` when building kiwix-lib to compile embedded resources.
As `ctpp2c` will be used in the host machine, it always need to be
compiled for the host (native).
But we still want tho ctpp2 library compiled for the target platform.
As we don't want handle the conflict between two dynamic lib with the same
name but for two different platforms, we build ctpp2c statically.
On android platform, we load the ICU data as external data, not embeded
in the kiwix-lib.
So we need to generate correctly the dat file and use it in kiwix-android.
We don't need all the ICU data and we need to reduce binaries' size
(Especially for android where we have a limit of 50Mo per APK).
By removing unwanted ICU data, we reduce a lot the data size and so
the final binaries' size.
There is also some "problems" to compile the `ja.txt` collfiles,
the "resource compiler" crashes.
As we don't need it, we also remove it.
ICU doesn't provide data sources in their release archives but directly
pre-compiled data.
As we need to compile ourselves our data to remove unwanted data, we need
to get the sources directly from the SVN.
The custom app to build must be specified as an option when running
kiwix-build.
In the same way, the zim file to download must be specified in the
`info.json` (`zim_url` key) or given as option.
Previous script (from kiwix repository) created a APK with all architecture embeded.
Now, we generated a APK per architecture. It simplify the build process and
generate smaller APKs.
The dependencies of libzim were missing.
If we run a single run to compile everything everything run correctly
as zlib and lzma will be installed because of kiwix-lib (and other)
dependencies.
The OpenZim source contains the zimlib source but also the zimwriterfs
source.
There is no zimwriterfs dependency for now but it is better to separate
source from the dependency for latter commit.
There is a bug in 56_1 version when compiling resource.
This is fixed in 58_2.
However the last version 58_2 use _create_local and _free_locale symbols on
Windows and we need to add the right libs to the compilation command.
On recent version of the NDK (r13b), `exec_elf.h` has been removed for
API level >= 20. On 64 bits, we need the API level 21, and then,
a defined (ELF64_ST_INFO) is missing.
We readd it where (and if) we need it.