Commit Graph

567 Commits

Author SHA1 Message Date
Jehan b83450f9e2 configure, meson: the build tool depends on very old glib.
For the build tool, we really don't need a recent GLib. Checking the few
function docs, GLib 2.2 is fine, which (looking at git logs) means any
version after 2002. At this point, it's nearly unneeded to add a minimum
required version, but let's be thorough.

Anyway really no need to block a build if we have an old build GLib,
which is completely enough, as long we have the recent host GLib.
2022-04-01 18:11:55 +02:00
Jehan 1866b4c5f8 configure, tools: colorsvg2png must be built as native build executable. 2022-04-01 18:11:55 +02:00
Jehan e866cb7c9c configure, libgimp: disable GIR build when cross-compiling and…
… add --enable-force-gir-cross-compilation to force it anyway.

Similar to what we already have in the meson build.
2022-04-01 17:33:38 +02:00
Jehan 8a6613bf78 configure: prioritize pkg-config check for libmng.
Make the code similar to the change we made in meson: first pkg-config,
then a basic library check with actual function test.
2022-04-01 17:33:38 +02:00
Jehan ae36d20c41 configure: fix option --enable-windows-installer.
The name of the base source file changed as its format is now ini before
further transformation.
2022-03-29 00:18:31 +02:00
Jehan 1cc7510739 configure, meson: bumping GExiv2 requirement to version 0.14.0.
GExiv2 0.14.0 was released last September. It has been on Debian Testing
since October. The MSYS2 repository for Windows also provides this
version now, and I have bumped the version used in gimp-macos-build. So
let's upgrade the requirement (for the dev branch only) so that we can
finally get rid of all the remaining annoying warnings relative to this
library.
2022-03-18 15:00:59 +01:00
Jehan 871796a126 Issue #7956: Add full BigTiff open/export support to GIMP.
Recent libtiff supports loading BigTiff automatically so we didn't have
anything to do there (as long as a recent libtiff was used). For
creating a BigTIFF though, we simply needed to add a "8" flag to
TIFFOpen/TIFFClientOpen when creating a new image (i.e. using "w8"
mode) as explained here in the "Implementation Strategy" section:
http://www.simplesystems.org/libtiff/BigTIFFProposal.html

What this commit does:

- Explicitly bump our libtiff requirement to version 4.0.0 or higher
  (which is where BigTiff support appeared).
  libtiff 4.0.0 was apparently released on 2011-12-22 and is available
  on all current distributions, so it's probably not a problem.
- Switch to detect libtiff with a pkg-config test (added in libtiff
  commit faf5f3eb before 4.0.0 release, so it's fine) instead of
  function checks.
  (Note: meson was already detecting for libtiff-4 with pkg-config,
  which was obviously wrong since it should have mimicked autotools, but
  well… then changes were minimal on meson)
- Add a new "bigtiff" boolean argument to the "file-tiff-save" PDB
  procedure, FALSE by default. I set this as the first argument as I
  figure that choosing the format you want is quite a major choice.
  Unless I misunderstood something, since BigTIFF is really designed to
  be an evolution of TIFF with a "minimum change strategy", i.e. mostly
  using 64-bit instead of 32-bit offsets, everything which is possible
  in TIFF will be in BigTIFF (and oppositely as well, except of course
  having huge files) so there is no need to have 2 separate procedures.
- Adding this new argument to the GUI dialog as a checkbox.
- Tweak the load and export procedures' documentation strings to make
  clear we support both TIFF and BigTIFF.
  Note: interestingly there doesn't seem to be a separate mimetype for
  BigTIFF so nothing to update on this side.
- Tweak the procedure labels too to mention BigTIFF. Since BigTIFF is
  still a different format (though very closely resembling) from TIFF,
  unlike some others which are just extensions embedded in a TIFF file
  (like GeoTIFF we recently added), I figure it deserves to be
  explicitly cited.
2022-03-11 11:31:53 +01:00
Jehan 64bf8046ff configure.ac, meson.build: post-release version bump to 2.99.11. 2022-02-23 00:28:55 +01:00
Jehan 618e11e602 Release development version GIMP 2.99.10. 2022-02-22 22:30:47 +01:00
Øyvind Kolås ef4e1b86a1 configure, meson, app: depend on GEGL 0.4.36 2022-02-21 23:42:06 +01:00
Jehan ae6c58652e icons, tools: fix the CI when building icon resources with vector icons.
Ok that was a bit of a mess with the 4 build cases (combinations of
meson, autotools, vector and raster icons). I *think* this is now OK.

Basically we still need to build the colorsvg2png tool even when
installing vector icons, just for the purpose of the 2 icons
dialog-question and gimp-wilber-eek which we compile into GLib resources
from PNG images.

Also it looks like I completely forgot to add the subdir meson.build in
icons/Color/.
2022-01-31 22:33:30 +01:00
Jehan bc999325be icons, tools: new colorsvg2png tool to build PNG out of SVG.
Build-time tool, which basically just rasterize SVG images (it doesn't
do anything special like gtk-encode-symbolic-svg which creates special
PNG for GTK to recolor them).

It looks like I had this prepared since 2018 according to file header,
but I just never finished doing it! :P

Basically now PNG icons of the Color icon themes do not need anymore to
be committed in the repository. They will be generated from the SVG
icons.

Also adding a missing icon from the 16px list (the Playground icon for
Preferences dialog was needed in 16x16 as well, yet missing).
2022-01-31 14:52:42 +01:00
Daniel Novomeský 6acb5fde3e configure, meson: bump libjxl dependency to 0.6.1
JPEG XL plug-in always imported all JXL images
in 32-bit float precision in the past.
Now it also supports direct import in 8-bit
and 16-bit integer precision too.
2022-01-01 17:40:52 +01:00
Jehan d5e22ad313 configure, meson, devel-docs: make gi-docgen into an auto option.
Also called "feature" option in meson, so that by default it depends on
auto-detection of the gi-docgen hence won't break the configuration when
the tool is missing (the feature is simply disabled).

Also move the program check into the root meson file, which is anyway
much better to have a better visibility of features, otherwise we'd end
up just having tests everywhere in any possible random directory of the
repo.

Finally add a line in the summary of the configuration step, displaying
the docs generation being enabled or disabled.
2021-12-29 00:58:10 +01:00
Jehan 15b0828eb2 configure: typo fix.
Argh sorry!
2021-12-28 03:35:06 +01:00
Jehan b4578a8d90 configure, meson: depend on GExiv2 0.12.2 or over.
Part of the fix for #5863, which is to depend on newer version of GExiv2
where I contributed new APIs using GError-s instead of GLib warnings for
metadata tag issues.
Now Debian testing packages GExiv2 0.14.0 (and MSYS2 has 0.12.3) so
let's bump the dependency for our dev branch.
2021-12-28 02:04:15 +01:00
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +01:00
Jehan a982809c5f configure, meson, plug-ins: unmaintain WebkitGTK-depending plug-ins.
This is an official way to declare these plug-ins as now
unmaintained/deprecated.
Relevant plug-ins are:

1) help-browser (Displaying the docs): nowadays every desktop machine
   has a browser. Let's just use whatever is the person's default
   browser.
2) web-page (Web screenshot): it looks to me like every browser has this
   feature by default now (I use it all the time in Firefox to get a
   full-page screenshot, never in GIMP), even on mobile, I am told. It's
   nice to have it in GIMP too, but not like absolutely necessary.

On the other hand:

1. It's a hell to build, with a lot of issues. We have regular issues on
   our Flatpak-s. We don't manage to build it on our CI (only locally
   apparently). Also it takes a crazy amount of time (like 90% of CI
   build-time would be webkit).
2. From what I gather, new versions don't work on Windows anymore. Even
   MSYS2 seems to have dropped the ball and don't try anymore.
   Basically we would have a feature disparity from GIMP 3.0 (most
   platform but Windows). We don't know when it will be resolved (if
   ever) as it's been like this for years.

Now why we are keeping the code around instead of just removing
everything is that the topic tree in the help browser is useful and
comfortable to use. Ideally we should get some equivalent to help
browsing the help efficiently in the web docs as well (so basically
menus, web search and alike?). So I am told to keep the code around at
least for now to see if we can figure something out or improve the
situation.
Except for this point, we can consider the WebkitGTK plug-ins as
deprecated from GIMP 3.0 on.
2021-12-22 18:59:07 +01:00
Øyvind Kolås 124239202c app,build: depend on GEGL-0.4.34 2021-12-19 00:59:33 +01:00
Lukas Oberhuber e5157f9894 configure.ac: Correct detection of `xgettext`
On macOS at least, `xgettext` is not being correctly identified because
`AM_GLIB_GNU_GETTEXT` is blowing away `XGETTEXT` variable which then
messes up the version checking.

This moves that macro to after the version check.
2021-12-18 00:15:49 +00:00
Jehan f94abce8b3 configure.ac, meson.build: post-release version bump to 2.99.9. 2021-10-19 18:06:55 +02:00
Jehan 71c2fd63b8 Release development version GIMP 2.99.8. 2021-10-19 14:45:24 +02:00
Daniel Novomesky 7ce0f2d60e Add JPEG XL plug-in 2021-09-27 09:22:24 +02:00
Øyvind Kolås 127bf7abfb configure,meson,app: depend on GEGL-0.4.32 2021-09-05 20:34:59 +02:00
Jehan d707e4cb1a autotools, meson: bump GLib dependency to 2.68.0.
GLib 2.68.0 was released on 2021-03-18 and has finally been added to
Debian testing (now that the release freeze is over!). So dependency
bumps are slowly going to happen again on the development branch.
Actually Debian testing has even 2.68.4, but it's a bit too recent and
2.68.0 is enough to get rid of some of the deprecation issues.
2021-08-26 17:02:15 +02:00
Jehan 0e46fadf43 configure: --enable-check-update now with an "auto" value.
By default, when on "auto", the update check feature will be set
depending on the OS. In particular, on Windows and macOS, it will be ON,
because these are the 2 OSes which we distribute without an update
channel, hence where people used to have very outdated versions of GIMP.

On Linux, *BSD, and so on, distribution provide updates through package
repositories.
2021-08-26 01:25:52 +02:00
Marco Spiess 512fc24694 add msys support 2021-05-27 17:10:19 +02:00
Jehan a181d672ef configure: better libaa detection.
- Use aalib-config (available at least in the last releases of libaa,
  1.4rc5 from 20 years ago!). Especially important as the basic
  AC_CHECK_LIB() test does not work in my tests on Windows builds
  because some more libs are needed.
- Make sure file-aa is also built if AA_LIBS environment variable is
  explicitly set. Prevous code was not working in such case (file-aa was
  not built even with AA_LIBS set).
2021-05-17 13:15:31 +02:00
Jehan 1e53985e4b configure.ac, meson.build: post-release version bump to 2.99.7. 2021-04-26 15:18:46 +02:00
Jehan bf1b405a74 Release development version GIMP 2.99.6. 2021-04-26 12:05:16 +02:00
Jehan cd3333c6d3 meson, configure, plug-ins: image/x-sun-raster is a supported MimeTypes.
Also ".sun" is a possible (and common) file name extension for Sun
Raster images, according to various sources and samples I found (these
samples with .sun extension also opened fine in GIMP, so it's not just a
subvariant which we may not handle or something of the sort). This one
is not so important though as we also register magic bytes for detection
(which is the proper way), but it can still be useful, mostly for
exporting (as we will direct to the SunRaster plug-in if someone tried
to export a file with .sun extension, since no other file format uses
this extension AFAICS).

There is no functional change, I just had a look at this plug-in while
handling !428 and realized this format was not present in the MimeType
list (which is used to generate the desktop file, in order to have
proper mime types, not detection based on extension only, unlike
Windows in !428).
2021-04-04 16:01:58 +02:00
Øyvind Kolås 95900ae6f1 configure,meson,app: depend on GEGL-0.4.30 2021-03-27 20:26:52 +01:00
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 4b39217181 devel-docs: generate Python API (GObject Introspected) documentation.
So much easier to write in autotools! Anyway here it is, also with a new
option --enable-g-ir-doc (by default set to false).
2021-01-29 15:22:36 +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
bartoszek daea111efc autotools: bump GEGL dependency to 0.4.28. 2020-12-20 17:01:00 +00:00
Jehan b19e7796b2 app: s/pango_fc_font_has_char/pango_font_has_char/ (undeprecation). 2020-11-15 17:25:49 +01:00
Jehan 7a50b0940e app: undeprecate some Pango/Harfbuzz calls.
pango_fc_font_lock_face() is deprecated since Pango 1.44.

This may hopefully also fix #5922 as I completely changed the code where
the CRITICAL happened. Yet I left g_return_val_if_fail() to check if the
Harfbuzz font and FreeType face variables are not NULL (because looking
at the code, it looks like these functions returning NULL actually means
there is a bug in the code).

Nevertheless if it turned out that there are non-bug cases where these
could return NULL (for instance a broken font file?), then probably we
should not use g_return_val_if_fail(), but instead address the data
issue in a nicer way.

Bumping harfbuzz dependency to 1.0.5 for hb_ft_font_set_funcs(). Without
configuring the Harfbuzz font with it, hb_ft_font_get_face() always
returns NULL.
Note that it looks like hb_ft_font_lock_face() would actually be better,
but this requires harfbuzz 2.6.5 from last April which is quite recent.
So let's just use the get_face() variant for now.
2020-11-15 17:15:45 +01:00
Sergei Trofimovich cebeb90a87 configure.ac: fix `--with-linux-input` handling with upcoming autoconf-2.70
Upcoming autoconf-2.70 exposes deficiency in configure.ac:

```
$ autoconf-2.70_beta2 && ./configure --host=x86_64-pc-linux-gnu
./configure: line 1430: 5: Bad file descriptor
checking whether  is declared... ./configure: line 1432: ${+y}: bad
```

It happens because macros are called with parameters using insufficient quoting.

More details at https://lists.gnu.org/archive/html/bug-autoconf/2020-10/msg00027.html

The fix only amends `--with-linux-input`. Other cases of underquoting
will need to be handled separately.

Fix-by: Zack Weinberg
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2020-10-26 16:29:01 +00: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 fc25709367 configure: do not show "profile support: yes" when HEIC support is OFF.
Same as previous commit but for autotools, in a separate commit for easy
cherry-pick.
2020-10-22 11:57:12 +02:00
Jehan 22b8cd305c autotools: separate line for HEIC and AVIF support.
Similar to previous commit for meson (separate commit for easy
cherry-pick to gimp-2-10).
2020-10-19 20:15:35 +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 0ec5ee4394 plug-ins: get rid of pygimp!
It's done, all Python plug-ins have been either ported to the new API +
Python 3, or they have been discarded (and moved to gimp-data-extras for
whoever wants to salvage them).
Let's get rid of the outdated pygimp directory (whose code has not been
built in the master branch for years now anyway)! Woohoo!
2020-09-21 18:17:18 +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
Simon McVittie 00024db382 build: Prefer to find libwmf using pkg-config
Traditional -config scripts are awkward for cross-compilation, multilib
systems (lib/lib64), and multiarch systems like Debian; only one copy
of the -config script can be in the PATH. As a result, some OS
distributions are starting to deprecate or even remove them.

pkg-config is designed to be a replacement for traditional -config
scripts, and is cross-compilation-friendly: the PKG_CHECK_MODULES macro
looks for an architecture-specific executable like
x86_64-linux-gnu-pkg-config, which can look in an architecture-specific
search path for library metadata, before falling back to a generic
pkg-config executable.

As a bonus, pkg-config also compares version numbers correctly
(see #2454).

libwmf having pkg-config metadata seems to be a relatively new thing,
so I've kept the -config script code path too, using it if pkg-config
does not find libwmf.

Bug-Debian: https://bugs.debian.org/956183
Signed-off-by: Simon McVittie <smcv@debian.org>
2020-08-26 23:32:32 +00:00
Kevin Cozens 56982e6ce9 Allow building GIMP of without vala.
To build GIMP without vala the arguments "--enable-vala=no --with-vala=no"
must be used during the configuration process. If the --with-vala is not
provided the build process will still try to build some vala based plug-ins.

Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/5389
2020-08-23 11:20:51 +02:00