Commit Graph

102 Commits

Author SHA1 Message Date
Matthieu Gautier 86c1547f88 Allow kiwix-build to build android APK.
Previous script (from kiwix repository) created a APK with all architecture embeded.
Now, we generated a APK per architecture. It simplify the build process and
generate smaller APKs.
2017-04-24 15:26:51 +02:00
Matthieu Gautier 56862b09d6 Add (and use) the utility function `add_execution_right`. 2017-04-24 14:53:50 +02:00
Matthieu Gautier a49fb15964 BuildEnv.run_command now take a str as input instead of a file object.
We can get a str from a file object. The contrary is more difficult.
2017-04-24 14:53:50 +02:00
Matthieu Gautier 73669f59c8 Use the `urllib.request.urlopen`'s `context` argument only if available.
The `context` argument has been added to python 3.4.3 version.
We must not use it for older version.

Fix #31
2017-04-17 12:09:10 +02:00
Matthieu Gautier 57ac912824 Add missing installation of packages on debian. 2017-04-12 01:44:34 +02:00
Matthieu Gautier 6a24b38169 Add WIN32 flag definition.
When switching to c++11, the WIN32 flags is no more automatically defined.
So let's define it in the meson crossfile itself.
2017-04-11 16:57:51 +02:00
Julian Harty 103a6aa5db Added the Debian automake package to the dependencies. 2017-04-08 22:44:08 +02:00
Matthieu Gautier bea2d13feb Add a option to compile the dependencies only of a target.
This is useful to generate directory (and archive) of dependencies for
a particular target.
2017-04-08 21:34:25 +02:00
Matthieu Gautier e816979d51 Limit the choice of the targets argument to target we know about.
By limiting the choices in the argument parser, we catch argument error
at parsing and we can provide useful output (the names of dependencies
we can handle) to user in the help or in the error message.
2017-04-08 18:19:42 +02:00
Matthieu Gautier 308cfa6986 Use dependency names as reference instead of class names.
Class names are implementation names.
Using the dependency names is better as it surprise less the user.
2017-04-08 18:19:17 +02:00
Matthieu Gautier 81796e7125 Add a option to skip the source installation.
It make the kiwix-build.py script run a bit father.
2017-04-08 17:58:26 +02:00
Matthieu Gautier 3d9ab94195 Add Zimwriterfs dependency.
Now kiwix-build.py can compile zimwriterfs.
2017-03-28 10:10:12 +02:00
Matthieu Gautier b62388bae1 Allow a dependency to declare extra_packages to install.
This is different from declaring a dependency as dependency may be build
by kiwix-build.py.
2017-03-28 10:10:12 +02:00
Matthieu Gautier fa17b5e200 Add the lib64 path to LDFLAGS. 2017-03-28 10:10:12 +02:00
Matthieu Gautier 9d45158f42 Add print of current directory for command in the log file. 2017-03-28 10:10:12 +02:00
Matthieu Gautier 411f861b13 Move log dir in a subdir of BUILD_* 2017-03-13 13:18:14 +01:00
Matthieu Gautier 600f1b55aa Add the android ndk toolchains and compile android on travis. 2017-03-13 13:18:14 +01:00
Matthieu Gautier e3c0c5db82 Toolchains now can have a builder and a source. 2017-03-13 13:18:14 +01:00
Matthieu Gautier 940cea290d Use a 'extra_libs' key instead of 'properties'.
'properties' is too close of the meson definition and we need to duplicate
the entries for 'c_link_args' and 'cpp_link_args'.

By using 'extra_libs' we have a more functional definition of what we want.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 29bba313bc [API change] Use just one option to specify the build target.
There is no more option for static or share build. This value is
integrated in the build-target.
2017-03-13 13:18:14 +01:00
Matthieu Gautier c31a29488a [API Change] User can specify the target to build.
This is a API change, the working directory is set using the
--working-dir option, not as an argument.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 6d69f056a4 Rewrite how we set environment. (Simpler way to write the same thing) 2017-03-13 13:18:14 +01:00
Matthieu Gautier 00acba9ee9 Add the notion of toolschain.
- For now, only the win32 is here.
- There no more nativeBuilEnv as the buildEnv can launch command without
  using the toolschain.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 77137e0908 Add lzma dependency. 2017-03-13 13:18:14 +01:00
Matthieu Gautier 843964e55e Check if packages are installed before trying to install them.
This avoid to ask to user its (sudo) password if all packages are already
installed.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 759812c41d Factorize how we create working directories. 2017-03-13 13:18:14 +01:00
Matthieu Gautier ffee068fd0 Split the too long kiwix-build.py file into several smaller ones. 2017-03-13 13:18:14 +01:00
Matthieu Gautier 5b60295fb9 Add installation of `ccache` package 2017-03-13 11:50:02 +01:00
Matthieu Gautier cff9642c23 Use ccache if available.
If ccache is availble, use it. It can improve a lot the compilation time.
We do not change the meson_cross_file.txt as, for now, meson doesn't
support ccache when cross-compiling.
2017-03-13 11:50:02 +01:00
Matthieu Gautier 7b293575de Lower case the distname (only on linux distribution)
Cases are (should be) not important here. Let's lower it.
2017-03-13 11:50:02 +01:00
Chris Li 1364704e1e Support flag --no_cert_check (#13)
Support flag --no_cert_check, with batched download and write file to disk
2017-03-07 16:52:02 -05:00
Matthieu Gautier 2b4a7726ea Update xapian dependency to 1.4.2.
The patch `xapian_no_hardcode_lz.patch` is not necessary anymore.

Fix #15.
2017-03-06 18:29:22 +01:00
Matthieu Gautier bfc08574ce Change the displayed version of e2fsprogs (uuid) also.
Changing the archive to get is nice, it is better to also change the
version.
2017-02-13 17:56:14 +01:00
Matthieu Gautier a7af69de28 Update our e2fsprogs dependency to 1.43.4.
Use the last version is always better.
More over, it should fix compilation on macOS.

Fix #9.
2017-02-13 17:41:29 +01:00
Matthieu Gautier d78bc45be1 Properly fail in travis if sub-script fail.
Make `kiwix-build.py` also fail if sub-command fail instead of just print
an error message and quit.

`kiwix-deploy.py` is far more simple and already fails miserably if a
sub-command fails.
2017-02-13 11:53:40 +01:00
Matthieu Gautier 85db545feb Do not fail if we are running on Darwin platform.
Fixes #7.
2017-02-13 09:55:59 +01:00
Matthieu Gautier f8f9ed5bce We do not use `_targets_env`, remove it. 2017-02-13 09:53:10 +01:00
Matthieu Gautier 5919e28a2f Packages need to be install before we look to binaries installed by them.
In setup_win32, we search where gcc compilers are installed. We need
to have them installed before.
2017-02-07 14:30:53 +01:00
Matthieu Gautier e83d2511d7 Add package list for cross-compilation debian to win32. 2017-02-07 14:29:03 +01:00
Matthieu Gautier d9abbb7fe5 Add zlib package list for debian. 2017-02-07 12:19:18 +01:00
Matthieu Gautier 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
Matthieu Gautier 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
Matthieu Gautier 221849001e This is the gcc package we need to install on Ubuntu, not gcc-5. 2017-02-07 12:09:30 +01:00
Matthieu Gautier 82aab2f5dd Properly fail if ninja or meson is not installed. 2017-02-07 12:08:03 +01:00
Matthieu Gautier 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
Matthieu Gautier 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
Matthieu Gautier 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
Matthieu Gautier 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
Matthieu Gautier 0650f110bd Add a Ubuntu to win32 crossenv. 2017-02-06 17:34:12 +01:00
Matthieu Gautier 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