The target_platform option has always be wrongly named.
This is not the platform we are targeted but how we compile.
This was ok at beginning as specifying how we compile somehow define
for what we compile but this is not a one to one mapping.
It mainly allow to run command in directory containing space.
(Hello, `C:\Program Files\...`)
It would also allow to work on directory containning spaces
(`C:\Users\John Doe`) but xapian configure (at least) expressly doesn't
support it :/
- Run the command without shell=True
- The command must be a list instead of a string.
- All options must also be a list (or an iterable).
When we use `--disable-tools` (ie, when we are cross-compiling), ICU
will build the data only if it detects we are cross-compiling.
This make sens until we cross-compiling for wasm.
Wasm output is a script file with the interpreter in the sdk we have
installed. So ICU's configure can run the test binary and so doesn't detect
we are cross-compiling.
So we have to patch ICU Makefile to make it build the ICU data anyway.
ICU is used to:
- List locales (`locales_tree`)
- Get information about those locales in different languages (`lang_tree`)
- Remove accents (`translit`)
Tracing ICU without custom data, we also load `likelySubtags` and
`metadata`. Not sure why and what happen when missing but let's be
conservatives and include them.
`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`.
- Dependency are installed "striped".
- Our project are build "debugoptimized" by default and "release" when
building release instead of "debug"
We need to update the `base_deps_meta_version` as we are changing how
dependencies are compiled.
SVN checkout can be pretty long to do (especially if icu serveur is pretty
slow).
By downloading an archive on our own server, we avoid a spending too many
time downloading.
The archive is a simple targz of the SVN checkout.
- Disable icuio and layoutex.
- Hardcode UTF8 as charset (we always use utf8 and hardcoding him improve
performances)
- Do not include default utf headers
- Do not use `using namespace icu`
See http://source.icu-project.org/repos/icu/trunk/icu4c/readme.html#RecBuild
for more information about options.
Increment base dependencies version as we are compiling icu differently.
By building kiwix-android on the `android` platform, we can now build
`kiwix-lib` on all `android_<arch>` platforms, and so have all
architectures in the same apk.
Fix#108
This is the big change !!!!
Instead of handling target as primary object and prepare/build targets,
we are handling build steps.
A build step may be a source (preparation) or a build (of the source).
Actualy, a step is a tuple (context, Builder or Source).
The context define the context of the step. It can be :
- 'source', for a Source step
- 'neutral' or the name of a platform for Build step.
Target becomes a "Class only" class.