Much like for images and items. Change the PDB to transmit IDs
instead of names for brush, pattern etc. and refactor a whole
lot of libgimp code to deal with it.
modified: libgimp/gimpplugin-private.h
So procedures can declare args and GimpProcedureDialog show chooser
widgets
Fix so is no error dialog on id_is_valid for resources
Palette.pdb changes and testing
Memory mgt changes
Gradient pdb
Font and Pattern tests
Test brush, palette
Cleanup, remove generator
Rebase, edit docs, install test-dialog.py
Whitespace, and fix failed distcheck
Fix some clang-format, fix fail distcheck
Fix distcheck
Cleanup from review Jehan
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
Meson is apparently able to show different warning depending on the
meson version tests we do in specific code paths.
Since our global required meson is 0.53.0 but on some code paths, we
test for 0.57.0, we must use meson.source_root() on older meson and
meson.project_source_root() on newer one.
Fixes:
> pdb/meson.build:141: WARNING: Project targets '>=0.57.0' but uses feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.
> pdb/meson.build:141: WARNING: Project targets '>=0.57.0' but uses feature deprecated since '0.56.0': meson.build_root. use meson.project_build_root() or meson.global_build_root() instead.
> po-tips/meson.build:5: WARNING: Project targets '>=0.53.0' but uses feature introduced in '0.56.0': meson.project_source_root.
Fix the dependency by making the stamp an actual (yet empty/no-op)
header file which is included by all generated source file. This way, we
ensure that meson rebuild .o files when the .pdb sources are changed.
This is the second solution proposed by eli-schwartz here:
https://github.com/mesonbuild/meson/issues/10196#issuecomment-1080053413
This was introducted in commit 65eff6f150, i.e. together with the
initial port. I have no idea why this is here and if it is about the
stamp-pdbgen, why would we want to remove it. The PDB is a major piece
of our codebase and the simplicity to generate new PDB procedures is a
core feature.
The build now successfully build the PDB files into the source folder
itself. Unfortunately it seems I can't get meson dependencies to work
properly, once more! I added a "sources" argument to the relevant
library() or static_library() but it still uses old versions to build
these. E.g. if I add an error on purpose to a pdb file, the next build
still passes, yet the second-next fails (as it should have before).
Note that I even tested a declare_dependency() with just the "sources"
arguments, because it says "sources to add to targets (or generated
header files that should be built before sources including them are
built)" (so I assume it means that it should be trigger a rebuild,
otherwise it's useless) but it's just not working. I'll investigate
more.
Still going with this for now, because at least generating the PDB
source was a big miss until now. But we should
The `env` option is new (from meson 0.57.0), yet we depend on meson
0.50.0 and bumping the meson requirement is not a possibility (we have
bad experience when we did this for babl).
Instead, implement the new option usage and a workaround which would
work also with older meson.
I could have implemented only the workaround, but it's also nice to
write down the better syntax so that when we actually bump meson
requirement, getting rid of the workaround will just be a matter of
hitting delete and done. Though it also means we must keep both if/else
blocks in sync, so it has its drawbacks.
See the discussion in !506.