Commit Graph

186 Commits

Author SHA1 Message Date
Alx Sa ab93a1484a meson: Add option to compile Amiga IFF
Code provided by @lillolollo
Since libilbm and libiff are not in all repositories yet, this adds an option so
it is not required when building GIMP.
2023-07-12 22:55:20 +00:00
Jehan 6d2580a421 meson.build: post-release version bump to 2.99.17. 2023-07-05 18:09:54 +02:00
Jehan d3c5536ac8 Release development version GIMP 2.99.16. 2023-07-05 16:00:47 +02:00
Jehan c95b8518fe app, icons: use the Python executable found by pythonmod.find_installation().
We already search for a compatible Python version in the root meson file, no
need to look up Python 3 again in the PATH, each time we run an external Python
script in the build.

This should hopefully fix #9687.
2023-07-04 19:00:55 +02:00
Lukas Oberhuber df4ed9c1ec app: Fix key presses not working on mac
Part fixes #9322. This was making GIMP on MacOS unusable.
2023-07-02 15:57:44 +01:00
Jehan 9ccdd56a36 build: run build/windows/meson.build before app/ plug-ins/ and extensions/.
Fixes:

> ../extensions/goat-exercises/meson.build:12:4: ERROR: Unknown variable "gimp_plugins_rc".
2023-06-27 01:01:50 +02:00
Jehan 2fd25fe6bd build: generate the Windows installer welcome images from the splash screen.
After discussion with Jernej, InnoSetup should now work better with rescaling
a big image properly to the window size, yet the ratio should still matter.
Apparently the welcome image is a hack and this is why it requires specific
ratio images. We don't use the big size yet, but since Jernej told me which
dimensions are expected, I already added the code for it to make it easier
later.

So anyway this code would allow us not to have to commit welcome images each
time, which are basically resized copy in BMP of the splash screen, slowly yet
surely filling up our repository with image duplicates.
After all, we develop a scriptable image editor! We should use it to edit images
and export in expected formats!

I only use this script for the devel installer for now, for testing and see how
it goes.
2023-06-27 00:39:17 +02:00
Øyvind Kolås 7277baea54 meson,app: depend on GEGL-0.4.46 2023-06-26 00:56:58 +02:00
Øyvind Kolås c4734a27b5 meson,app: depend on GEGL 0.4.45 2023-06-13 17:14:03 +02:00
Jehan ebe63c215f INSTALL, meson: remove references to autotools and warning. 2023-05-27 00:33:17 +02:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Niels De Graef 01e960e98e plug-ins/scheme-wrapper: Use GIR for enum values
This allows our script-fu plugins to use the GIMP enum values, just like
all our other plug-ins know them.

In other words:

* Names are consistent with those of other plug-ins
* Introspectable enums are automatically added as they are added to the
  introspection file, without even needing a recompile
* No need to keep track of our enum types anymore, as that is just a
  redundant implementation of introspection in practice. This in turn
  will let us simplify some of the pdb code
2023-05-24 23:19:20 +02:00
Michael Natterer 37dfa24def meson: default to create default binary symlinks only in stable versions 2023-05-23 10:34:47 +02:00
Michael Natterer 0c41856393 meson.build, sanity.c, gui.c: update and sync some dependency versions 2023-05-21 18:56:32 +02:00
Simon Budig bf0cac7e1c meson: bump minimum required versino to avoid a warning 2023-05-21 12:01:52 +02:00
Simon Budig 9e8f5a97d2 meson: add a minimum dependency on exiv2 0.27.4... 2023-05-21 01:58:16 +02:00
Jehan 3862fad8c1 plug-ins: file-fits becomes an optional plug-in.
Let's make cfitsio an optional dependency, showing up in the final configure
output. The file-fits plug-in will just not be built when the dep is missing.
2023-05-15 12:20:53 +02:00
Alx Sa d4f420769c plug-ins: Port FITS plug-in to cfitsio library
Switch to NASA-maintained cfitsio library for loading/exporting FITS images.
This allows us to import compressed FITS files (GZIP, HCOMP, PLIO, RICE) in
8/16/32 bit and float/double precision. It also simplifies export code using
the built-in cfitsio APIs.
2023-05-14 15:05:50 +00:00
Jehan b64f79fed9 devel-docs: don't build reference docs when GIR aren't generated.
This can happens in cross-compilation cases for instance.
2023-05-11 12:46:57 +02:00
Alx Sa 222bef78c7 plug-ins: Initial support for Amiga IFF/ILBM
Imports indexed ILBM, Amiga PBM, and ACBM images.
2023-04-22 21:33:27 -04:00
Jehan 1993f7461a meson: API binding options transformed to features.
- Lua, Javascript and Python were boolean defaulting to true, which was
  installing them even when not available (and if not installed then, it
  would show warnings at each run). Instead I make them features with
  'auto' as default. In this default, we don't install when the
  interpreters are absent.
- These 3 options can still be forced by setting them to 'enabled' (the
  interpreters are not actually necessary during build).
- Vala behavior stay the same (and unlike other binding, you cannot
  force it since it has a build step); it's only renamed to just "vala"
  for consistency of option naming.
2023-04-05 16:46:10 +02:00
Alx Sa 6892ab0530 plug-ins: Add import/export support for QOI file
Allows users to import and export 8 bit, RGB/RGBA Quite Ok Images.
Inspired by Piotr Fusik's work on a plug-in for 2.10.
2023-03-30 18:41:56 +00:00
Jacob Boerema 078cccf4f5 build, meson: fix headless tests not being run with meson
I noticed that in our CI meson job certain tests were skipped, which didn't
happen with autotools.
On examination I noticed these tests check for HAVE_XVFB_RUN. Even though
meson checks for xvfb-run etc, it doesn't set HAVE_XVFB_RUN.

Adding HAVE_XVFB_RUN allows the tests to run without skipping certain parts.
2023-03-26 13:26:57 -04:00
Luca Bacci cfaaec6347 Use ExcHndlSetLogFileNameW ()
This is a Dr.MinGW function
2023-01-24 14:48:44 +00:00
Jehan 48c1d07600 meson: fix cross-building GIMP.
We don't want to fail the build configuration just because we can't test for
runtime dependencies. In such a case, just assume it's good as we at least have
libheif and we can compile.
Fixes:

> ../meson.build:756:2: ERROR: Can not run test applications in this cross environment.
2023-01-24 15:44:50 +01:00
Jehan e4ace369c1 meson: list both AVIF and HEIC mimetype support if the plug-in is built.
Even though, some format support might be missing, since codecs can be added at
runtime, it can always change later without having to touch GIMP. Yet we won't
be able to edit the desktop file when this happens.

See new comments in #9080.
2023-01-23 19:38:19 +01:00
Jehan 706cff2037 meson: VALA language is only needed for the build target.
Without this change, meson outputs this warning:

> meson.build:868: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build
2023-01-23 19:19:10 +01:00
Jehan 7b0064107e Issue #9080: Checking for available libheif codecs at compile-time.
From libheif >= 1.14.0, the pkg-config variable will become bogus and always
return 'yes' so we now need to check for codec avaibility at compile time the
same way we look for these at runtime.

It may seem irrelevant to do these checks since these codecs can be added
anytime later, but it's still very good information for packagers to immediately
see that we have runtime package missing.
2023-01-23 19:01:38 +01:00
Jehan 704c868ca1 meson: add a 'name' arg to the IPC_RMID compile/run test.
It makes for easier to read logs and build files. Also fixing a typo in the
original text from autotools.
2023-01-23 18:33:12 +01:00
Jehan decdb2ba3f meson: Improve C99 compatibility of IPC_RMID check.
See previous commit and !810. Porting the autotools fix we made there to the
meson build too.
2023-01-23 18:13:18 +01:00
Alx Sa 74b32f7c86 build: Add support for OpenMP dependency
Enables general support for OpenMP.
Currently, only the DDS plug-in utilizes it.
2023-01-09 16:41:06 +00:00
Stanislav Grinkov fa9f4e6825 app, build: depend on GLib 2.70
Commit 52d17439 introduced use of g_thread_pool_new_full which is
available only since GLib 2.70
2023-01-09 14:20:21 +00:00
Jehan 8ab38eb883 meson: fix the shared object version.
The current code was wrong, hence was producing wrongly versioned shared
library files. This commit do it the same way as we do it on autotools build,
and additionally compute the library version (since "current:revision:age" gets
transformed into "(current - age).age.revision" by libtool, but meson doesn't
use libtool so we have to do this ourselves).

Now meson and autotools builds produce the same result at least. There are still
some points I'm wondering and which we should handle before GIMP 3.0 release:

* Since meson doesn't use libtool (and no .la files are created), should we
  actually stick to libtool version scheme? It seems like some projects would
  use semver instead. On the other hand libtool version gives a bit more info.
* Also it raises the question on whether we want the API version to be semver at
  all or simply follow GIMP version? It used not to be much of a problem as we
  wouldn't add features (hence new API) on micro version, yet now we can. So
  GIMP program's version could not pass as semantic versioning. On the other
  hand, having a diverging API version (whose minor version would increment
  faster in particular, with regular micro version resets) would be confusing
  too.
* If we keep libtool versioning, I'm thinking we should do it manually. It's
  actually pretty easy with a good docs (or even just following GNU docs:
  https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html),
  and simple to understand whereas the current code logic is very weird and we
  end up with huge current and age values with complicated computation.

Note also that I raise the "Libtool versioning" section near meson.build top and
updated gimp_interface_age to be the same as on autotools currently.
2022-12-12 19:58:17 +01:00
Jehan 04a78154e1 meson: take into account babl's pkg-config name change.
See babl!52 (babl commit b8da847) and gimp#8912.
2022-12-05 14:34:48 +01:00
Jehan 8c5e3887f9 configure.ac, meson.build: post-release version bump to 2.99.15. 2022-11-14 01:20:27 +01:00
Jehan a0811ff614 Release development version GIMP 2.99.14. 2022-11-13 23:04:38 +00:00
Øyvind Kolås 06b481a3ec meson, configure, app: depend on babl 0.1.98 2022-11-13 17:31:32 +01:00
Øyvind Kolås b85032d8b6 meson, configure, app: depend on GEGL 0.4.40 2022-11-13 17:16:49 +01:00
Daniel Novomeský eac694905f plug-ins: metadata import/export for JPEG XL format
Changes require libjxl 0.7.0
2022-10-05 14:15:26 +00:00
Jehan 646bc3e43b Issue #8604: NetBSD does not provide libdl.
The dl*() functions are in libc directly. This probably applies to all
*BSD too. And from what I read, it should even apply to macOS, even
though a libdl is present there (is it bogus?).

So let's make the libdl check proper by only make it mandatory on Linux
(on Windows it was already unchecked too).
2022-09-10 17:42:28 +02:00
Jehan a78651aca4 Issue #8604: Linux Input is enabled even though it is not Linux.
Fix the Linux Input test to correctly only depend on whether or not the
header is present. Having X11 target is not enough (e.g. it breaks the
build for NetBSD and probably on all BSDs).
2022-09-10 14:50:38 +02:00
Jehan fbb5b40345 app, autotools, meson: new GIMP_RELEASE macro.
We were using GIMP_UNSTABLE extensively to differentiate development
from stable code. But there is actually another level of development
code. Basically GIMP_UNSTABLE tells you are on the development branch,
e.g. for current branches, that you are on 2.99.* versions (vs. 2.10).
This depends on the minor version oddness.

GIMP_RELEASE will tell you if it's a release or a in-between-releases
code. This works with the micro version which must be even on release.
Any odd number means you are basically using random git code.

There can be any combination of GIMP_RELEASE and GIMP_UNSTABLE. For
instance 2.99.12 is a release of the unstable branch, whereas 2.10.33 is
development code of the stable branch.

I use this first in the update code as we were using GIMP_UNSTABLE for
both concepts but it made it harder to test. Now:

* GIMP_DEV_VERSIONS_JSON environment variable is only available on
  development code, not on release (whether stable or unstable).
* The weekly check limitation is also only for releases (dev code just
  check at every startup to quickly detect issues and regressions).
* Whether to look on testing website or public website json file depends
  on the code being a release or not.
* Finally only whether to check "DEVELOPMENT" or "STABLE" sections in
  the json file depends on whether we are on stable or unstable
  branches.
2022-09-05 22:16:56 +02:00
Jehan d4f12a843a Issue #8561: unrecognized command-line options '-mmx', '-sse'.
Fixes:

> gcc: error: unrecognized command-line options '-mmx'; did you mean '-mmmx'?
> gcc: error: unrecognized command-line options '-sse'; did you mean '-msse'?
2022-08-31 15:31:00 +02:00
Hanabishi 358ba0991f Cleanup meson symlinks
More elegant solution to avoid platform-dependent executable extension detection
2022-08-31 13:10:13 +00:00
Jehan 99d16a6f31 meson: fix one more deprecation warning when cross-building.
This meson warning was only showing when configuring a cross-compilation
project.

Fixes:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.55.0': meson.has_exe_wrapper. use meson.can_run_host_binaries instead.
2022-08-31 12:42:08 +02:00
Jehan a791151ed0 meson: update the end WARNING about meson being experimental.
Now we call it "extensive testing phase" and encourage packagers to use
meson and report bugs.
2022-08-31 01:40:12 +02:00
Jehan ca230cb770 meson: fix warnings of deprecated features.
Now that we bumped our meson requirement, meson is complaining about
several features now deprecated even in the minimum required meson
version:

s/meson.source_root/meson.project_source_root/ to fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.

s/meson.build_root/meson.project_build_root/ to fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.build_root. use meson.project_build_root() or meson.global_build_root() instead.

Fixing using path() on xdg_email and python ExternalProgram variables:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead

s/get_pkgconfig_variable *(\([^)]*\))/get_variable(pkgconfig: \1)/ to
fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': dependency.get_pkgconfig_variable. use dependency.get_variable(pkgconfig : ...) instead
2022-08-31 01:29:37 +02:00
Jehan dd53de0f0b meson: bump our requirement to meson 0.56.0.
For meson, I want to be particularly careful and not follow the "Debian
testing" rule as it bit us by the past for babl.
But this bump is probably OK:

* Debian stable has meson 0.56.2.
* meson 0.56.0 was released on 2020-10-30.
* GIMP 2.99 is a dev branch with no end release date yet.

This should also fix this warning at configuration time:

> WARNING: Project specifies a minimum meson_version '>=0.53.0' but uses features which were added in newer versions:
>  * 0.55.0: {'Calling "add_dist_script" with File, CustomTarget, Index of CustomTarget, Executable, or ExternalProgram'}

We missed it until now because it was only happening with tarball builds
where gitversion_h could be a files() object, unlike in git builds.
2022-08-31 00:15:36 +02:00
Jehan 9ce27be989 meson: improve/fix previous commit from MR !725.
- Setting an exec_dir variable is an error. As meson docs says, if
  relative, it is installed relatively to prefix anyway: "If this is a
  relative path, it is assumed to be relative to the prefix."
  On the other hand, it would make problems if someone tried to set an
  absolute bindir.
  Moreover it is a lot clearer now. When we want to install in the
  binary directory unconditionally, then get_option('bindir') is the
  meson way, hence the way to go.
- On the other hand, the `gimp-debug-tool` is installed either in bindir
  for Windows or macOS and libexecdir for all other platforms, at least
  that's how it's set in the autotools build. So let's keep both builds
  consistent.
- Make a hopefully clearer description for enable-default-bin option.
  Let's clarify this is just about creating unversionning links pointing
  to versionned files.
- Adding an item in the "Optional Features" part of the summary listing
  during meson configure, for better discovery.

For the ".exe" extension on Windows, I wished we had an $(EXEEXT)
equivalent on meson rather than trying to set it ourselves (are there
other platforms where we must set a different extension?). But I could
not find any.
2022-08-29 15:43:25 +02:00
Hanabishi 879f7b48de Issue #8546: Meson options fixes
- Implement `enable-console-bin` meson option
- Fix wrong `enable-default-bin` behavior in docs
- Implement `enable-default-bin` meson option
2022-08-29 13:41:08 +00:00