The main thing is to add the `-march` option when needed.
Ie, '-march=armv7-a` for arm.
Other compiler (arm64, x86, ...) don't support the march option so
we must not provide it.
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.
We need to be able to build libzim as shared lib while using all
other dependencies statically (to not have libxapian.so, ... to distribute)
This add a new platform (static=False) that make all dependencies being
build in a static platform.
- Print the name of the module instead of the builder.
- Do not try to build the kiwix-desktop dependencies in the flatpak.
- Correct the path of the created flatpak.
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.
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.
We new release of a project is made, projects dependending of it are
rebuild and republish to keep the binaries up-to-date.
To avoid overwrite the already build archives and silent the fact that
new archives are available, we need to have a extra build version.
`release_versions[project]` has to be set each time a dependency of
`project` is bump but the project version has not changed.
If the `project` version changes, the `release_versions[project]`
has to be cleared.
If we don't want to release this version again, remove project from
`release_versions`.
See kiwix/kiwix-tools#222
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.
The CI is using ubuntu artful and the deb package is compiled with another
compiler that gcc-4.8 (used in other project CI).
As we compile everything with gcc-4.8, we must compile our own ctpp2.
We build with gcc-5 because of zimSplit using ofstream.swap method.
Latest version of zimSplit doesn't use it anymore so let's compile
everything with default gcc.
See openzim/zim-tools@a959609839
We also explicitly set the list of package to install per job, so
less packages are installed.
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.
- 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.
Enable `--no-daemon` : Using the daemon make gradle keep "configuration"
(like plugin path). If gradle installation path change, it will break
kiwix-android build.
Enable `--build-cache` : This is not the case by default :/
This should greatly improve compilation speed.
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.
Sometime the root_path is dependent of the target platform and sometime
not. But sometime dependent of the build arch :/
[TODO] We should move the cross_file generation to the PlatformInfo 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.
Those dependencies are used for bittorent and metalink.
For now, we don't support those features (we should in the future).
However, it seems that if development package are installed on the system,
libaria will try to link with libsqlite3 and libxml3 anyway.
We have to investigate this, but it breaks static build of kiwix-tools.
As we are not using those feature for now, let's just explicitly
compile libaria2 without sqlite3 and libxml2.
libaria2 use xz to configure its source.
If we compile the xz tool, libaria2 will use the compiled binary.
However, on cross compilation, xz will be compiled for the target platform
and run on the host platform. And so, it will fails.
As we do not use those tools at all, lets not compile them.
Make kiwix-build installable using pip.
Module is now called `kiwixbuild` because `kiwix-build` is not a valid
python identifier.
Also split toolchains in separated directory.