Use a standard name libz.(so|a) if we are using mingw (as we do on linux).
This patch somehow deprecate the previous commit (patch) but both patches
are the right thing to do.
We need this one especially for others dependencies using pkg-config.
The generated .pc always use the '-lz' option and so, we need the correct
names for the lib.
zlib may be installed under the libzlibstatic.a or libzlib.dll.so names.
xapian correctly detect those name but use '-lz' option for xapian_inspec
binary.
Fedora provides a set of (powerfull) tools to correctly pass the right
options to compilation tools (configure, cmake, ...)
This is great but we must not use them as we want to cross-compile from
other distribution (ubuntu).
Now, we do not use those tools and we can easily port cross-compilation to
ubuntu.
We have to loop over the dependencies and their packages to know which
dependency we may skip.
So we must not skip the install_packages step too early.
Now that meson.build script add itself the needed link flags to link
static binaries, we don't need to add them by ourself.
Just pass the right option to meson.
By installing distribution packages we avoid us a lot of recompilation.
It also made use standard build, and it's just better :)
We also install all needed packages automatically so user has less work
to do.
Only Fedora packages are listed for now.
Ubuntu packages have to be done.
Duplicate sources must be detected from their classes.
So add a optional arguments key_function to remove_duplicates to use
a custom key to compare elems and use it to remove duplicate sources
using their classes.
By resolving a dependency graph, we avoid us to have a fixed list of
dependencies. This is even more usefull because now, we don't have to track
different dependencies lists dependending of the build_target.
The wrapper provided by Fedora properly configure cmake for
cross-compiling.
We have to check how this work with other distribution or other
cross-compilation target but for now, it's working.
ICU seems to be buggy when generating pkg_config file if we compile static
and shared libs with mingw target.
As icu mingw target definition seems a bit complex it is simpler to just
compile the libs we want.
As side effect, it reduces compilation time a bit.
When cross-compiling, icu need to be build two times :
- Once in 'native' mode.
- Once cross-compiling.
This is needed as the cross-compiling need to launch executable that are
build in the first step.
Icu dependency become a bit more complex as the second compilation needs to
reference the first compilation and that configure options and buildEnv
change.
- No more target_arch but a more generic build-target.
- The buildEnv can now have custom options depending of the target.
Mixins will use those options.
We now specify the working directory instead of the install directory.
So all created files/directories will be under the the working directory.
By default, working dir is the current one.