Commit Graph

22 Commits

Author SHA1 Message Date
Matthieu Gautier 01655d3ce0 Use icu4c pre-compiled using MSVC2022 on Windows 2024-08-28 20:10:52 +02:00
Matthieu Gautier 294c34ca80 Fix extract of meson archive.
Previous commit was removing the meson_archive.

Fix #723
2024-08-21 10:02:33 +02:00
Matthieu Gautier edf1e4ce03 Fix pkg_config template for icu4c on Windows.
We must use `/` separator.
Meson post-process output of pkg-config. If we use `\`,  it miss-interpret it
and libdir is broken.
2024-08-20 18:15:24 +02:00
Matthieu Gautier 00363fdc8c Use prebuilt icu on Windows 2024-08-20 17:07:45 +02:00
Matthieu Gautier b589496076 Do not use custom data for icu4c on Windows.
Meson build system of ICU seems to not support custom data on Windows.
So let's use the default data on Windows.
2024-08-15 14:03:55 +02:00
Matthieu Gautier 0e0ac010bb Build icu4c using meson on Windows. 2024-06-07 15:36:58 +02:00
Matthieu Gautier c0ec9c44b8 Rename option `--target-platform` to `--config`
The target_platform option has always be wrongly named.
This is not the platform we are targeted but how we compile.

This was ok at beginning as specifying how we compile somehow define
for what we compile but this is not a one to one mapping.
2024-02-05 18:03:11 +01:00
Matthieu Gautier 5a1175cf2d Format our code with black 2024-02-05 11:41:09 +01:00
Matthieu Gautier c99a9bd91f Run the command without using shell=True.
It mainly allow to run command in directory containing space.
(Hello, `C:\Program Files\...`)
It would also allow to work on directory containning spaces
(`C:\Users\John Doe`) but xapian configure (at least) expressly doesn't
support it :/

- Run the command without shell=True
- The command must be a list instead of a string.
- All options must also be a list (or an iterable).
2023-12-01 11:11:24 +01:00
Matthieu Gautier 2a5a5c3a42 Correctly build ICU data when building for wasm.
When we use `--disable-tools` (ie, when we are cross-compiling), ICU
will build the data only if it detects we are cross-compiling.

This make sens until we cross-compiling for wasm.
Wasm output is a script file with the interpreter in the sdk we have
installed. So ICU's configure can run the test binary and so doesn't detect
we are cross-compiling.

So we have to patch ICU Makefile to make it build the ICU data anyway.
2023-11-02 17:33:51 +01:00
Matthieu Gautier beadc3b16c Use custom data.
ICU is used to:
- List locales (`locales_tree`)
- Get information about those locales in different languages (`lang_tree`)
- Remove accents (`translit`)

Tracing ICU without custom data, we also load `likelySubtags` and
`metadata`. Not sure why and what happen when missing but let's be
conservatives and include them.
2023-11-02 11:14:04 +01:00
Matthieu Gautier 717dcd801d Move to ICU 73.2 2023-11-02 11:14:04 +01:00
Matthieu Gautier 180fb249f6 Add a support to compile libzim for wasm.
`icu4c_wasm.patch` is build by :
 - Copying config.sub from liblzma source as new version of config.sub there
   knows about wasm architecture.
 - Copying `mh-linux` on `mh-unknown` as specified in (origin) `mh-unknown`.
   This is because icu4c configure doesn't detect `emscripten` platform and
   "fallback" to `mh-unknown`.
2022-11-16 16:37:05 +01:00
Matthieu Gautier 505961be4c Build in release mode.
- 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.
2019-02-19 17:23:14 +01:00
Matthieu Gautier 0f389f7cc9 Get icu sources from an archive instead of svn.
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.
2018-07-11 11:00:55 +02:00
Matthieu Gautier 1109b6b155 Better compilation of icu4c.
- 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.
2018-06-11 18:05:10 +02:00
Matthieu Gautier db82455f03 Be able to build multi-arch android apk.
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
2018-06-06 17:41:12 +02:00
Matthieu Gautier c8c0192675 Simplify cross-compilation
Now we can make reference to build step in another target platform, we can
simplify cross-compilation fo libmagic and icu4c.
2018-05-31 11:30:26 +02:00
Matthieu Gautier 041826d0e8 Move from target logic to steps logic.
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.
2018-05-31 11:25:59 +02:00
Matthieu Gautier 754df8df1d Make the platform responsible to create the buildenv.
It is now the platform who is responsible to:
- correctly add the toolchains as needed
- setup the cross environment
- create the cross files.
2018-05-31 11:25:54 +02:00
Matthieu Gautier 115fbfa147 Move dependencies declaration of a target into the builder.
This is the builder that depends on other target, not the target itself.
2018-05-31 11:14:31 +02:00
Matthieu Gautier 53585b838a Split the dependencies.py file into several parts. 2018-05-22 16:43:37 +02:00