Commit Graph

228 Commits

Author SHA1 Message Date
Jehan 1de810f6de configure, meson: missing OpenRaster MIME type in desktop file.
Adding support for .ora files when Python plug-ins are installed.
2021-02-20 18:48:16 +01:00
Jehan eae3d47e32 devel-docs, meson: g-ir-doc option to generate introspected API docs.
Similar to the --enable-g-ir-doc option I just added on autotools. Also
separate this option from gtk-doc as it is unrelated (not everything
under devel-docs is related to gtk-doc!).
2021-01-29 16:51:47 +01:00
Jehan 82209920a9 devel-docs: Introspected Python libgimp and libgimpui docs generation.
Based on the proposed process proposed by Akkana Peck. Thanks Akk!
For now, it's only in the meson build, which is fairly terrible to use
as soon as we do custom build rules. Here are the list of issues:

- meson does not allow building in subdir (issue 2320 on meson tracker).
  Sure I could make several subdirs with meson in them. But here the
  future goal would be to be able to generate docs for other
  introspected languages, and maybe also other output formats (epub or
  whatnot). For this, since these are basically the same commands which
  are used, the best practice would be to have loops generating one
  target per language/format combination, reusing code rather than ugly
  copy-pasting in subdirectories' meson files).
- custom_target() requires the output parameter to be the complete list
  of generated files. But we have more than a thousand of them. It's not
  practical. Maybe we could try to find a way to generate the list from
  the contents of the .def files which are already exhaustive and exact.
- Install also requires the output list to be complete.
- I temporarily have these docs not generated by default (because the
  gtk-doc option is already crazy slow as it is, making meson near
  unusable for development if it's enabled). If you want to generate the
  docs, the commands are as following (yeah I don't understand what the
  target names are for since meson does not actually create targets with
  these names, so we have to use fake output names instead):

> ninja devel-docs/g-ir-docs/Gimp-python-html
> ninja devel-docs/g-ir-docs/GimpUi-python-html
2021-01-21 16:50:47 +01:00
Jehan 72effc5a57 configure.ac, meson.build: post-release version bump to 2.99.5. 2020-12-22 23:58:16 +01:00
Jehan db996f218d Release development version GIMP 2.99.4. 2020-12-22 23:39:07 +01:00
Øyvind Kolås 2d5aa81456 depend on GEGL-0.4.28 2020-12-20 13:37:08 +01:00
Jehan de91d84906 meson: libjpeg and libtiff are not optional dependencies! 2020-11-17 04:08:15 +01:00
Jehan b19e7796b2 app: s/pango_fc_font_has_char/pango_font_has_char/ (undeprecation). 2020-11-15 17:25:49 +01:00
Michael Natterer c6f6c42e7a configure.ac, meson.build: post-release version bump to 2.99.3 2020-10-25 22:26:18 +01:00
Michael Natterer 71d24f1103 configure.ac, meson.build: bump versions for the 2.99.2 release 2020-10-25 21:25:47 +01:00
Jehan e736b5fa0c meson: do not show "profile support: yes" when HEIC support is OFF.
Note that profile support also affect AVIF but since AVIF support came
anyway after libheif 1.4.0 (which is when color profile support
appeared), there is no way to differentiate there.
Thanks to Darix for noting the miss.
See: https://gitlab.gnome.org/GNOME/gimp/-/issues/5787#note_938976
2020-10-22 11:54:51 +02:00
Jehan cb2268ab21 meson: separate line for HEIC and AVIF support.
libheif pc files provides variables which are actually older than our
minimum libheif requirement (so it's usable generically) to determinate
if libheif was built for HEIC/AVIF support. This is quite useful as we
had our share of annoyance with missing support of some encoder/decoder
even when libheif requirement was alright.

Also adding image/avif (if relevant decoder is present) to list of
supported mimetypes.
2020-10-19 18:56:13 +02:00
Jehan a3498f427a meson: add a `install-extensions` target to meson/ninja. 2020-10-18 01:13:42 +02:00
Jehan e77d9517f7 meson, autotools, CI: simplify plug-in binding build options.
For Python, Lua and Javascript, make the option boolean (with 'yes'
being the default). No need of a warning when not installing the
plug-ins as this would have been disabled explicitly anyway. When
installing the plug-ins, only make interpreter checks as precautionnary
verifications which don't actually change anything (except outputting
some warnings if interpreters are not found). Basically for these 3
bindings, the interpreters are only runtime dependencies anyway. So it
doesn't matter if they are not available at build time. In particular,
we get rid of the 'force' option.

Vala rules do not change as the vala compiler is indeed needed at build
time and current checks work correctly. I just add a "Vala plug-ins"
line in the summary message of the meson configuration, as it was
missing.
2020-10-12 22:10:17 +02:00
Jehan ecbc38f9e9 plug-ins, extension: goat-exercises becomes a GIMP extension.
This is an extension containing a few demo plug-ins. This is good to
demonstrate the extension format. It will also allow to disable these
plug-ins (if at some point, one doesn't want to show these demo
plug-ins anymore).

And finally it deals with the fact that our plug-in code is stupid, as
it just tries to find the first executable with the same name (minus
extension) as the plug-in folder. This doesn't go well on Windows, where
the permission system is non-existent. So our code just ends up trying
to run the first file with a similar name in a plug-in folder. As the C
goat-exercise contains both an exe and the C source (and the system
probably returns files in alphabetic order), GIMP under Windows tries to
run the C source instead of the executable (this obviously doesn't go
well).
We could try to do more complex logics, like not aborting if the first
file run fails and try the next one in the plug-in folder. Or maybe just
rename the C file to another name. But any of these is just in the end
the proof that our plug-in discovery right now is just bogus. The
extension system is explicit, not based on randomly trying out files.
Plug-ins entry points are explicitly listed in the metadata manifest.
2020-10-09 15:30:54 +02:00
Jehan 5de6b2c1ea autotools, meson: bump GEGL dependency to 0.4.27.
Current dev code of GEGL is necessary as it fixes its VAPI dependency
(see gegl!83). Without this, with a recent meson version, Vala plug-in
build fails.

See !334 for some more background.
2020-09-12 15:54:13 +02:00
Jacob Boerema a084032c59 build: (meson) fix CC_VERSION contains backslashes on Windows.
This caused an invalid specifier warning in gimp-version.c and an
incorrect value of COLLECT_GCC reported by gimp -v.
2020-08-22 22:07:22 +00:00
Øyvind Kolås ec746901c3 build, app: depend on GEGL 0.4.26 2020-08-02 22:34:15 +02:00
Jacob Boerema 248d2e95b8 plug-ins: enable screenshot for non x11 targets in meson build.
This also removes screenshot as an option for the meson build
since the autotools build doesn't have that option either.
2020-08-01 22:28:34 +00:00
Félix Piédallu 5c2fd398df Fix python version check (python's sysconfig.get_python_version() returns only major.minor) 2020-07-28 14:41:13 +00:00
Jehan 5c51224594 meson: add image/webp content type.
See previous commit 84c08e55e1. Doing the same for meson.
2020-07-22 19:45:05 +02:00
Félix Piédallu 1a19ac6a3a Try to reenable Print plugin on Windows. Let's see if the CI passes. 2020-07-06 17:49:59 +00:00
Félix Piédallu 979b0bd9b3 Fix GIMP_UNSTABLE macro.
Fixes #5261.
2020-07-06 10:55:05 +02:00
Jehan fae85e704a Issue #5349: meson build with -Dpoppler=false has no effect.
Poppler has not been an optional dependency for years now, because it
was decided that PDF import was considered a granted feature by most
people. So removing the option in the meson build. This option should
not have existed in the first place.
2020-07-05 11:31:22 +02:00
Øyvind Kolås 14765e72b6 meson, autotools, app: depend on GEGL 0.4.24 2020-06-07 21:24:03 +02:00
Øyvind Kolås 529471e1ca meson, autotools, app: depend on babl-0.1.78 2020-06-07 20:33:32 +02:00
Øyvind Kolås d7d0c046f0 app,build: depend on babl-0.1.76 2020-05-27 15:21:09 +02:00
Niels De Graef acf50009f8 Allow building vala plugins 2020-05-26 17:52:52 +00:00
Niels De Graef 0352559efa meson: Allow running tests headless
This commit makes sure we can properly run the tests in a headless
environment, i.e. they don't mess with the user's X display or their
session bus. The latter is also needed for parallel tests as they fail
to simultaneously own the same name on the session bus.

Replaced the "xvfb-run" meson option with the "headless" option, which
is more intuitive (and also more correct, since we now also require
`dbus-run-session` to run the tests, not only `xvfb-run`).

Finally, note that we need a version of `xvfb-run` that supports the
`-d` (`--auto-display`) option. The problem with `--auto-servernum`
which is also regularly used, is that it doesn't shut down cleanly,
returning a non-zero exit code, wich makes the test fail.

Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/5078
2020-05-14 18:31:08 +02:00
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