Commit Graph

49 Commits

Author SHA1 Message Date
lillolollo 3c6cf7fb3f Meson add suggested warning flags from Massimo 2020-03-17 17:52:26 +00:00
Jehan 9032df515b meson: change option relocatable-bundle = yes|no|platform-default
As discussed in patch !208. Now that the feature is implemented as a
meson combo, let's have (hopefully) clearer values than
enabled|disabled|auto.
2020-03-17 18:48:54 +01:00
Jan Tojnar 564d35fd2e meson: relocatable-bundle should not be a feature
When we build GIMP with `-Dauto_features=enabled` to ensure we have
fully-featured GIMP and to have it warn us when we are missing some
optional dependency, Meson also enables relocatable bundle.

This is unexpected since being relocatable is a binary property rather
than a feature. This patch switches it option to a combo type to make
it ignore auto_features option.
2020-03-17 16:59:10 +00:00
Ell 52ae7d180a configure.ac, meson: require glib >= 2.56.2
GLib 2.56.0 and 2.56.1 have a Windows-specific bug we were testing
for, so let's just bump to 2.56.2.
2020-03-08 12:28:33 +02:00
Ell 401745e62a Makefile.am, meson.build: require GEGL >= 0.4.23 2020-02-20 13:02:54 +02:00
Øyvind Kolås ab5ed1575c meson,app,autotools: depend on GEGL-0.4.22 2020-02-18 22:02:30 +01:00
Jehan b79e147923 meson, data: create/install gimp-release file with meson too. 2020-02-14 00:58:42 +01:00
Jehan 0c1205f4c5 meson.build: store GIMP_BUILD_REVISION as an int macro. 2020-02-06 22:11:41 +01:00
Jehan 89d6ee2f34 meson: same option for meson -Dcheck-update=false as previous commit.
Separate commit for easy cherry-picking.
2020-02-06 21:21:17 +01:00
Oleksii Samorukov 5d0b0ad467 Fix meson build on macos 2020-01-18 23:39:34 +01:00
Øyvind Kolås ab7c119c07 meson,app,autotools: depend on babl 0.1.74 and GEGL 0.4.20 2020-01-17 17:01:22 +01:00
Michael Natterer 4dfcffe4f7 Remove all checks for finite() and isfinite()
and simply use isfinite() everywhere, it's part of C99.
2020-01-05 16:36:18 +01:00
Jehan f89692c25f meson: add json-glib as dependency in meson files too.
Done on a separate commit to make cherry-picking easily to gimp-2-10
without all the meson changes.
2019-12-13 17:51:44 +01:00
Jehan 0dd4feaafd meson: new build id and revision also in meson configuration. 2019-12-11 21:59:11 +01:00
Jehan 44df9f2193 meson: use explicitly python3 when calling it.
Anyway meson is based itself on python3 so it has to be present. Just
using `python` may be any python (2 included).

Of course, it would be ok most of the time, but with the Fedora 31 CI,
apparently just `python` is not found.
2019-11-24 20:52:22 +01:00
Jan Tojnar 4b8bb5e057
meson: Warn when git is missing in non-dist builds
8b5060349a fixes the issue of version headers
not being available when building out of VCS tarball (without .git directory)
but we were getting `unknown (unsupported)` version still. Turns out the version
silently fell back to `unknown` when git was not available.

Let's warn the user when this is the case.
2019-11-21 19:20:26 +01:00
Jehan 8b5060349a meson: allow non-dist non-git builds but mark them unsupported.
Reported by Jan Tojnar as a comment to commit e4c7fc23 that builds from
simple archives of the repo contents (without the .git tree) are
currently broken. Well this is normal, as we only support builds from
release versions or from the repository where we can extract a git hash.
Any other kind of nightly build can be from any commit out of thousands
and is maintenance hell.

To be nice though, let's unbreak such builds, but they will be clearly
marked as unsupported (warning at configure time + the extract commit
hash will now be labelled "unknown (unsupported)", which will be a
visible string in About and on unstable version canvases).
Basically do so at your own risk.

Also generate INSTALL all the time (not sure why it was only generated
in non-git case).
2019-11-21 12:38:25 +01:00
Jehan 9a043d0fc9 Issue #4251: (meson) dbus-glib-1 not required.
As written in previous commit, this is not a dependency since commit
c4460e84.
2019-11-16 19:26:58 +01:00
Jehan ea379ef5a9 meson: fix CC_VERSION.
The way we use CC_VERSION macro is to give information on the compiler
used during build. This information may be useful when debugging in
particular. So we can't just use `cc.version()` which only gives a
version number, not even the name of the compiler.

Restore the logics of autotools where we were using the result of `cc
-v` (for gcc and clang) and testing various CLI options for other
compilers.

Also this test may fail on meson because of various bugs, which I now
reported and provided patch for (hopefully soon merged). In particular,
when using ccache, the command run fails (also I have to change newlines
in C-style `\n` myself as meson's set_quoted() creates broken header
when newlines are present).

If it fails, let's at least store the compiler name + its version, still
more useful than version only.
2019-11-14 20:47:01 +01:00
Salamandar e4c7fc2334 Change logic to detect .git directory on repositories (or file on submodules) 2019-11-14 14:14:53 +00:00
Félix Piédallu 9cd0584e90 Add script to install files in the dist tarball.
Add a check inside Meson to detect if we're building from a git clone
or a dist tarball.
(in thie later, don't generated INSTALL.in and git-version.h)
2019-11-14 12:25:07 +01:00
Félix Piédallu 86c5720375 Use variables for minvers, partly fixes #4132. 2019-11-14 11:39:59 +01:00
Jehan 324d62c863 meson: update the broken libheif test (similarly to autotools). 2019-11-13 12:52:43 +01:00
Jehan f9752f39b0 meson: add a libmypaint < 1.4.0 warning.
Same as what I did for the configure script. Note that I break commits
in 2 to make the autotools commits easily backportable to gimp-2-10,
i.e. without any meson files.
2019-11-12 17:21:25 +01:00
Jehan 59dcd29f1e meson: fix HAVE_LIBHEIF_1_4_0 macro.
It was typoed as HAVE_LIBHEIF_4_1_0 so profile support was never
working for HEIF format.

Also add warnings and better output, similar to configure script one.
2019-11-12 15:58:06 +01:00
Jehan 9772b7162c meson: remove duplicate line.
finite() was searched twice.
2019-11-07 15:46:37 +01:00
Jehan 235b40e965 Issue #4189: Missing warnings on meson build.
We want to see deprecation warnings. Otherwise we'll just never fix them
if we are not constantly reminded of their existence.
2019-11-06 17:16:26 +01:00
Jehan fdf5c7edce meson: add -Wformat to common cflags.
This fixes the following warning during GIR generation:
> cc1: warning: -Wformat-security ignored without -Wformat [-Wformat-security]

And anyway it is useless to set -Wformat-security if -Wformat is not set
as well, so if we want one, let's have both.
2019-11-06 12:54:04 +01:00
Ell 6ea003902d meson: fix last commit 2019-10-28 08:48:46 +02:00
Ell 0ce7c25dd4 meson: improve host cpu detection
See gegl@6bcf95fd0f32cf5e8b1ddbe17b14d9ad049bded8.
2019-10-28 08:01:19 +02:00
Øyvind Kolås f0077265b4 configure, meson, app: depend on gegl-0.4.18 2019-10-27 01:37:24 +02:00
Ell f7c487f535 meson: use "debugoptimized" as the default build type
... to match the default autotools behavior.
2019-10-25 17:27:28 +03:00
Jehan 286de59494 meson: wrong pangocairo minimum requirement. 2019-10-24 12:47:37 +02:00
Jehan b8d8424ae0 app, libgimp*: (meson) fix all the generated `*-enums.c`.
More of the files were wrong, or at least not absolutely identical to
the files generated by the autotools. I am not doing any code change
other than trying to make both build systems produce identical files
(except for slight differences on 2 files not worth the effort) even
though maybe some things can be improved (especially on the include
list). Maybe to be improved later.

Also fixing 2 of the previously autotools-generated files because of
space typos which should have been committed earlier.

Finally it is to be noted that there is no logics to copy the generated
files back to the source directory in the meson rules. I am not sure
anyway this is really worth it and maybe we should just stop tracking
these generated files eventually.
2019-10-19 22:32:29 +02:00
Jehan 5d79fba823 libgimpwidgets: (meson) fix gimpwidgetsenums.c generation.
Noticed by Massimo.
gimp_type_set_translation_domain() calls were missing.
Also make so that the output is exactly similar (even whitespaces) as
the autotools one, making it easier to diff, hence maintain.
2019-10-19 17:51:21 +02:00
Jehan fb0ea13626 meson: add a big fat "experimental" warning at end of meson configure.
It should be clear that the autotools build is still the officially
mandated one for all finale builds (i.e. packaging). Our meson builds
still have bugs (some we know of and are trying to fix, others that we
will probably discover soon) so packagers should be well aware that they
should not use meson (though we highly encourage it for developers so
that bugs can be found).

Adding this warning as someone was asking on a bug report whether
autotools were still being supported (while it's the opposite: meson is
still not officially stable and autotools is still our main build
system).
2019-10-14 18:41:20 +02:00
Jehan fca64f5f66 meson: add an `install-icons` meson target.
We want to be able to install icons only in a quick command when
testing/developing.
Also I realize that Legacy icons are not even installed with meson
build, which is bad! Even though legacy, we want to keep them (at least
for the time being), just as we do with autotools.
2019-10-12 13:25:31 +02:00
Jehan 1046430df1 meson: add a special target `install-libgimp*` for all libgimp*.
For instance, we can install libgimpwidgets with:
> ninja install-libgimpwidgets

A special target had been previously added only for libgimp.
2019-10-12 12:25:55 +02:00
luzpaz 44d10e458c Fix various typos
Found via `codespell` (v1.17.0.dev0)
2019-09-21 17:10:46 +00:00
Jehan 7806021a41 meson: minor formatting fixes. 2019-09-21 15:12:08 +02:00
Jehan 738dab0fce meson: fix relocatable-bundle feature and mypaint-brushes dependency.
It must not be a boolean but a `feature` option, with `auto` by default.
`auto` value mean enabled for macOS and Win32, and disabled for other
cases. This default logics disappeared in the meson build.

Also the mypaint-brushes package is a mandatory dependency, which must
always be checked. Absence is fatale.
Finally properly set the MYPAINT_BRUSHES_DIR macro depending on the
proper relocatable case.
2019-09-21 14:21:00 +02:00
Jehan b327e0ff2f meson: fix several checks.
For pango and libbacktrace, we only need a compilation/link test. No run
is needed.
As for the exchndl (Windows only), this is an optional feature, hence
should not be a fatale check.
2019-09-21 12:36:48 +02:00
Jehan b8c34c41f1 meson: fix glib-networking check when cross-compiling.
3 cases are possible:
- in native build, the test must succeed and is a fatale error.
- in cross-compilation, if no `exe_wrapper` binaries were set in the
  toolchain file, we just bypass the check, yet still output a warning
  so that packagers won't forget to add the dependency.
- in cross-compilation with an `exe_wrapper` (for instance `wine` for a
  win32 target), we run the check. Even if it fails, we don't make it a
  fatale error then simply output a warning as cross-platform execution
  are not always reliable anyway.
2019-09-21 12:29:31 +02:00
Jehan 9ac117b143 meson: iso-codes is an optional dependency. 2019-09-21 00:27:15 +02:00
Ell 4fc345183b app, meson.build: fix a bunch of warnings in C++ files 2019-09-12 20:04:50 +03:00
Salamandar c20a8b732c Enforce libbacktrace tests. Add missing dep in app 2019-09-11 18:02:15 +00:00
Félix Piédallu db8922738f Add meson_install_subdir script 2019-09-11 16:42:04 +02:00
Félix Piédallu 184abdfc94 Print warnings at the end of configuration 2019-09-11 16:42:04 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00