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.
Instead of explicitly add the target associated to the toolchain
if we use `build_nodeps` option let add an attribute base ourself on it
to know if we need to add it or not.
This way, we may have other dependency we must not skip.
This is different than `--dont-install-packages` that will try to
compile the dependencies.
`--asumme-packages-installed` will no try to install packages, but will
not try either to compile dependencies.
This commit add a first version code to build a flatpak of kiwix-desktop.
It is mainly based on the PR #254 of @birros (hence he is the author of this commit)
However there is some differences :
- I (@mgautier) create a new builder to run the flatpak build instead of using a new
dependency.
- Use the flatpak platform to install org.kde.Platform and org.kde.Sdk
This code version doesn't correctly work but I wanted to commit the birros' code
without too many modification (even if there is a lot).
If the `dep` is a two char string (as "qt"), the `platform, name = dep`
will split the string and search for 't' dependency in 'q' platform.
So, we have to be sure that the dep is a tuple before splitting it.
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
A metaplatform allow to regroup sereval platform together.
When a target is added to the platform, the target is dispatched/add to
all sub platforms.
As the step (metaplatformName, target) is not really added, we have to
track which steps are really added, so `add_targets` need to return the
list of added targets.
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.
Introduce also a "NeutralEnv", a build environment independent of the
targeted platform. All `Source` now build using the neutralEnv.
Most of toolchains are also using neutralEnv except android_ndk who is
specific to a platform.
As toolchain are neutral, platform specific environment variables are now
set by the platformInfo directly instead of the toolchain.