Commit Graph

1588 Commits

Author SHA1 Message Date
Matthieu Gautier c9626b8bd4 Merge pull request #1 from kiwix/cross_compilation_windows
Cross compilation windows
2017-01-30 18:20:08 +01:00
Matthieu Gautier 585f8ae37d Do not compile xapian documentation. 2017-01-30 18:09:35 +01:00
Matthieu Gautier 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
Matthieu Gautier f287cf8b19 Build dir also depends of if we are building static libs or not. 2017-01-30 18:09:35 +01:00
Matthieu Gautier 912bd34637 Patch icu : Do not use a specific name for static libs. 2017-01-30 18:09:35 +01:00
Matthieu Gautier a9343f23b4 Update xapian_pkgconfig patch. 2017-01-30 18:09:35 +01:00
Matthieu Gautier ca53171bdc Add patches to cross-compile ctpp2 correctly. 2017-01-30 18:09:35 +01:00
Matthieu Gautier 597fd8dbe1 Rename option build_static to build-static. 2017-01-30 18:09:35 +01:00
Matthieu Gautier 013c1d36cf CMake now generate verbose makefile.
This is better for debugging.
2017-01-30 18:09:35 +01:00
Matthieu Gautier 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
Matthieu Gautier 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
Matthieu Gautier 4089928ed6 There is no UUID dependency when we are compiling to win32. 2017-01-30 18:09:35 +01:00
Matthieu Gautier 9670d690e4 Add a setup of buildEnv to cross-compile from fedora to win32. 2017-01-30 18:09:35 +01:00
Matthieu Gautier e5bb2c65c2 We now can run subprocess with a wrapper from cross-compiling. 2017-01-30 18:09:35 +01:00
Matthieu Gautier 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
Matthieu Gautier 70b87c8c53 Add an option to print all logs on stdout. 2017-01-24 13:59:15 +01:00
Matthieu Gautier ea6bf84f2c Always launch a sub command with a specified environment. 2017-01-24 11:47:54 +01:00
Matthieu Gautier 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
Matthieu Gautier 576a368b21 Fix the install name of the static lib for ctpp2.
Patch came unchanged from the debian packaging of ctpp2.
2017-01-24 11:47:54 +01:00
Matthieu Gautier 59f2222ef7 Do not remove the file and fail if there is no sha256 specified.
This allow us to change the dependency version to change and make
the checksum latter.
2017-01-10 15:30:37 +01:00
Matthieu Gautier e1ad05783e Allow specification of a exact url for remote files. 2017-01-10 15:29:26 +01:00
Matthieu Gautier 607167bc45 Compile in a different directory than the source dir.
Fixes kiwix/kiwix-tools#4.
2017-01-09 14:01:09 +01:00
Matthieu Gautier fc8b059473 Patch CTPP2 do not modify the source dir. 2017-01-09 13:57:10 +01:00
Matthieu Gautier 1c9b6cd1c9 kiwix-build can apply several patches to the same project. 2017-01-09 13:54:58 +01:00
Matthieu Gautier 7cb8207e11 Be sure that the cwd exists before running the command. 2017-01-09 11:36:23 +01:00
Matthieu Gautier edecfb34f9 Allow dependencies to override the make target at compilation and install.
This allow UUID dependency to just override the target instead of
overwrite the all function.
2017-01-09 11:35:30 +01:00
Matthieu Gautier cf6d16e6b2 Rename variable SOURCE_DIR and ARCHIVE_DIR to lowercase. 2017-01-09 11:09:50 +01:00
Matthieu Gautier cd82a1b117 Add a README 2017-01-04 23:57:48 +01:00
Matthieu Gautier 1d0caa848c Add a LICENSE file 2017-01-04 23:41:14 +01:00
Matthieu Gautier d26d6f46cd Use a buildEnv to handle all kind of configuration stuff.
No real functional change but a first step to have a different buildEnv
to handle crosscompilation.
2017-01-04 23:37:14 +01:00
Matthieu Gautier ea725d0951 Meson compile command (ninja) also need a proper environment.
The ninja command may relaunch meson if meson files have changed.
As we need a proper environment (PKG_CONFIG_PATH, PATH) to let meson
configure properly, we also need to pass the environment to ninja.
2017-01-03 11:50:18 +01:00
Matthieu Gautier c60040e92c Let's meson found the compile_resource.py script.
Add the INSTALL_DIR/bin dir to the path and allow meson to found installed
binaries.
2016-12-23 13:09:24 +01:00
Matthieu Gautier c8e7610ca9 Set the patch paths relative to the script, not the cwd.
This way, we can run the script from everywhere.
2016-12-23 13:08:09 +01:00
Matthieu Gautier 1e97beeafb Meson version of kiwix-lib and kiwix-tools are on master now. 2016-12-22 13:49:56 +01:00
Matthieu Gautier 59ad736645 Add installation of missing hpp when compiling/installing pugixml. 2016-12-22 13:49:56 +01:00
Matthieu Gautier b819c97bf8 Temporary change the git_remote for zimlib.
zimlib doesn't use github but gerrit to handle changes.
As this patches to review, there is no meson branche for now.

Use a personal fork for now. As soon as the meson scripts have been
integrated in openzim repository, we should revert this commit.
2016-12-22 13:49:56 +01:00
Matthieu Gautier feca176523 Install in and use the correct libdir; and other compatibility fixes.
Ubuntu on 64 bits install lib in lib/x86_64-linux-gnu and meson correctly
detect this.
Thus it install libs (zimlib, kiwix) in this directory. However we
look for pkgconfig files in $INTALL_DIR/lib64. And so, the lib is not
found.

We could force meson to install in $INSTALL_DIR/lib64 all the time but
it is just better to follow the correct convention on Ubuntu.

Reuse the algorithm used in meson to correctly detect the libprefix,
use it and force all build script (autotools, cmake, meson) to install there.

In the same way, ninja may be called ninja-build depending of the distribution.
Or depending of how meson is installed, we may have to launch meson or meson.py.
So we detect the command to launch to try to be as most as possible portable.
2016-12-22 13:49:56 +01:00
Matthieu Gautier eb06ca840b Add a script to build all projects and dependencies for kiwix-tools.
This script download and compile all depedencies and subproject for
kiwix-tools.

Ideally it should be as simple as run the script with the install dir as
argument.

This script compile a dynamic or a static build of kiwix-tools (kiwix-serve)

This as been tested on Fedora.
2016-12-22 13:49:56 +01:00