The source step (install source) always exists.
The `plaformInfo.name` step may not exists
(On mixed target, we build all deps static and the last project dyn)
So the `native_dyn` doesn't exists for `zim-testing-suite`.
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.
We were assuming that meson project correspond to our projects and so we
were always building them, even if they were already compiled.
(This way, a simple `kiwix-build` is enough to recompile the WIP code of
our project).
However, on the CI, we do not archive the source code/build directory in
the base deps archive. So when we try to compile, the compile step of
meson projects fails because the source are not here.
We have a small workaround for pugixml but as zstd is also meson, it is
time to do something correct.
By default, all projects now try to skip if a build is already present.
Our projects are marked as `force_build` and so, they do not try to skip.
This will build all Make, CMake, QMake dependency being build with -O3.
So all our dependencies will be build with -O3.
Our project (meson) are already build in release when needed.
kiwix-desktop should be build optimized in case of release but we need
to handle it correctly. At least not build in O3 per default as it may
break debug.
We simply do a `git merge --ff-only` instead of a `git reset`. This way:
- No change on the local repository
=> update to `remote/master`
- If you switch branch and local branch is behind `remote/master`
=> fast forward to `remote/master`
- If you switch branch and branches diverge
=> No update of the directory
- On branch master (or a branch behind `origin/master`) with compatible
change in the working tree.
=> update of the directory
- On branch master (or a branch behind `origin/master`) but incompatible
change in the working tree.
=> No update.
This way, sources are keep up-to-date as far as possible.
If we modify the dependency's configure_env, we may change
the dictionary with value of the first platform. Then, when
we use it for the second platform, the previous values are used.
Do not modify the dep_conf_env dictionary and then we are good.
- We should not try to set the cross compilation flags when we use
gradle.
- Fix anyway the setting of tho cross compilation flags for android sdk
platform (the default implementation use the `static` attributes that
doesn't exist for android)
Instead of having the run_command function setting the
env from the buildEnv, this is the dependency that create the
env and then pass it to the run_command function.
This way, each dependency will be able to set a specific env.
First, we don't need to clone all the git repository, we only need a
sub-directory.
Secondly, as we the base_deps archives only archive the sub-directory,
subsequent run of kiwix-build in the ci will try to do a git update on
a non git repository.
By making ourselves a tar archive, we simplify the process.
The archive on download.kiwix.org has been made with :
`tar czf raspberrypy-tools.tar.gz raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64`
`raspberrypi-tools` being a clone of `https://github.com/raspberrypi/tools`
commit sha is 5caa7046982f0539cf5380f94da04b31129ed521
It seems that the downloading of the archive stored on sourceforge
fails sometime.
Use the archive stored in our server (download.kiwix.org) instead.
And also move to the last version of lzma.
Meson use gcc's `-s` option to create the archive.
This option should make gcc meemic `ar` tool but in some version of gcc,
it seems there is a bug and the `-s` option is not taken into account.
See https://github.com/mesonbuild/meson/issues/4138
So, do not try to strip libraries. We will strip the final binaries anyway.
- 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.
kiwix-desktop needs the aria2 binary to download content.
kiwix-desktop will use aria2 throw lib-kiwix so it is somehow a kiwix-lib
dependency, but it is used only by kiwix-desktop.
And we know to install it only on platforms where we are supporting
kiwix-destkop.
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).
On ubuntu, the libcurl package is compiled with libkrb (kerberos).
However, no libkrb5.a is provided and so, we cannot link statically.
As we are not using kerberos, we can (and must) compile ourselves libcurl.
qmake seems to generate wrong "dist" rules for "make".
It try to copy the translation files as if it was in current directory
instead of looking the source dir.
dist archive is usefull with autotools where we want to run autogen before.
Or with meson when meson run tests before making the archive.
With qmake, it seems useless, let's simply archive what is git.