Commit Graph

70 Commits

Author SHA1 Message Date
e83d2511d7 Add package list for cross-compilation debian to win32. 2017-02-07 14:29:03 +01:00
d9abbb7fe5 Add zlib package list for debian. 2017-02-07 12:19:18 +01:00
796dc8f563 Use 'debian' configuration if we are on 'Ubuntu'.
This is the same configuration. Do not duplicate it.
2017-02-07 12:18:54 +01:00
c705463d51 Add the '-I' to CPPFLAGS env var.
Autotools uses it to found include file (zlib.h).
2017-02-07 12:10:40 +01:00
221849001e This is the gcc package we need to install on Ubuntu, not gcc-5. 2017-02-07 12:09:30 +01:00
82aab2f5dd Properly fail if ninja or meson is not installed. 2017-02-07 12:08:03 +01:00
640750e1ab zlib patch to use std name for lib.
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.
2017-02-07 12:06:41 +01:00
5259568a89 xapian patch to not use hardcoded '-lz' option.
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.
2017-02-07 12:02:44 +01:00
b9c93257a6 Add CTPP2 patch to correctly handle ICONV_SUPPORT variable.
If there is no ICONV_SUPPORT, we must not try to compile stuff relative
to iconv.
2017-02-07 10:47:51 +01:00
85a09520ad Add debian list of packages.
The Ubuntu Trusty distribution is detected as a debian distribution by python3.
2017-02-06 17:36:27 +01:00
0650f110bd Add a Ubuntu to win32 crossenv. 2017-02-06 17:34:12 +01:00
b205526bb2 Do not hardcode binary's name in templates.
This may change from on host platform to another. Use the cross_env.
2017-02-06 17:33:39 +01:00
2451c35d79 Use a CROSS_ENV per host and target, not only target.
Depending of the host, we may have different cross_env.
2017-02-06 17:30:47 +01:00
db5183f952 add .gitignore 2017-02-06 18:28:22 +01:00
b0c35fbc9e Handle zlib dependency ourself.
We now compile zlib if there is no available packages.
2017-02-06 18:27:06 +01:00
390ca29ba3 Generate a correct env for all command, not just for meson.
Other tools also need a correct env.
2017-02-06 18:17:33 +01:00
9f1942a0e1 Do not depends on custom fedora tools for cross-compile.
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.
2017-02-06 15:33:51 +01:00
4adae738d5 Build only one kind of library per build.
There is no need to build the static lib if we are building a dynamically
linked binary. And vice versa for shared lib and statically linked binary.
2017-02-06 15:27:31 +01:00
3c11bc602d No need to add the targetDef in the dependencies as it is already in. 2017-02-06 15:22:14 +01:00
0205371490 Do not fail if the package list is not available.
Just print the message, skip the package install step and continue.
2017-01-31 17:34:40 +01:00
a1a81b9db0 Add ubuntu packages list. 2017-01-31 17:34:35 +01:00
7246d81aa1 Mark dependencies to be skipped even if we skip the packages installation.
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.
2017-01-31 17:34:27 +01:00
1d94429947 Correctly pass arguments to kiwix-tools meson script.
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.
2017-01-31 15:20:12 +01:00
f907eb16e9 Install package when available on system distribution.
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.
2017-01-31 15:20:12 +01:00
ea3ea77256 Correctly remove source duplicates.
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.
2017-01-31 15:17:35 +01:00
14d609d007 Add a new 'run' method to the builder to build everything. 2017-01-31 15:15:38 +01:00
ea86fea926 'fetch' git repository instead of 'pull'.
'git pull' try to change the repo's HEAD and thus, refuse to operate on
a detach branch.
2017-01-30 18:20:48 +01:00
f5dff05a55 Do not use a pre-defined list of Dependency but resolve a dependency graph.
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.
2017-01-30 18:20:48 +01:00
0c046e88fb Separate Icu dependency in two dependency instead of having if switch.
This is better to use two different classes instead of have some methodes
trying to do some introspection to know if we are cross-compiling or not.
2017-01-30 18:20:48 +01:00
b5208e4708 Separate 'Source' and 'Builder' in different classes instead of Mixin.
This allow a better separation between what is common to all builds and
what is specific to a build target.
2017-01-30 18:20:48 +01:00
514a53db2a Use the 'mingw32-cmake' wrapper to launch cmake instead of cmake iteslf.
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.
2017-01-30 18:20:48 +01:00
9cfa11a883 Remove the command decorator and use a simple method.
This way, the command method is part of the Dependency and can access
dependency attributes.
2017-01-30 18:20:48 +01:00
c9626b8bd4 Merge pull request #1 from kiwix/cross_compilation_windows
Cross compilation windows
2017-01-30 18:20:08 +01:00
585f8ae37d Do not compile xapian documentation. 2017-01-30 18:09:35 +01:00
5d710fc774 Do not build static AND shared libs when compiling ICU.
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.
2017-01-30 18:09:35 +01:00
f287cf8b19 Build dir also depends of if we are building static libs or not. 2017-01-30 18:09:35 +01:00
912bd34637 Patch icu : Do not use a specific name for static libs. 2017-01-30 18:09:35 +01:00
a9343f23b4 Update xapian_pkgconfig patch. 2017-01-30 18:09:35 +01:00
ca53171bdc Add patches to cross-compile ctpp2 correctly. 2017-01-30 18:09:35 +01:00
597fd8dbe1 Rename option build_static to build-static. 2017-01-30 18:09:35 +01:00
013c1d36cf CMake now generate verbose makefile.
This is better for debugging.
2017-01-30 18:09:35 +01:00
ffe1c2ae5d Use the last version of microhttpd (0.9.46)
Else, older version of microhttpd needs plibc and it seems far more
complex to cross-compile it (I'm not sure it is still maintained...)
2017-01-30 18:09:35 +01:00
a8c4bff709 Correctly build Icu when cross-compiling.
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.
2017-01-30 18:09:35 +01:00
4089928ed6 There is no UUID dependency when we are compiling to win32. 2017-01-30 18:09:35 +01:00
9670d690e4 Add a setup of buildEnv to cross-compile from fedora to win32. 2017-01-30 18:09:35 +01:00
e5bb2c65c2 We now can run subprocess with a wrapper from cross-compiling. 2017-01-30 18:09:35 +01:00
7cd02ce146 Add a first handling of build_target.
- 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.
2017-01-30 18:09:35 +01:00
70b87c8c53 Add an option to print all logs on stdout. 2017-01-24 13:59:15 +01:00
ea6bf84f2c Always launch a sub command with a specified environment. 2017-01-24 11:47:54 +01:00
0676667fe0 Allow user to specify the working directory.
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.
2017-01-24 11:47:54 +01:00