Commit Graph

9 Commits

Author SHA1 Message Date
Jehan 3da0cdc03d desktop: removing autotools-only test files.
These are implemented directly in the meson build files.
2023-05-27 00:16:47 +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
Niels De Graef f663d26ab5 Migrate from intltool to gettext
intltool has long been dead upstream. Let's not poke the dead corpse,
please.

This commit is quite large, but that's mostly since trying to support a
hybrid of both gettext and intltool with both Meson and Autotools was
really hard, so I stopped trying.

Due to gettext relying on quite some things being at the exactly right
place in the autotools build (like `ABOUT-NLS` and `config.rpath`) we
really needed to cleanup the `autogen.sh` to only call `aclocal` and
`autoreconf`. No more strange magic; I tried to do it without changing
too much in the file, and things just broke. If people want to do
something more custom, they can just change the script directly. This
change also uncovered some problems in our `configure.ac`, like using
deprecated macros.

The following major changes happened:

* meson: Changed `custom_target()` to `i18n.merge_file()` for all
  supported file types
* Added `.its` and `.loc`  files for the GIMP-specific XML formats, so
  that gettext understands them
* For the `.isl` (Window installer stuff) file, there's no easy way to
  do this in gettext, so instead we start from an XML file (again with
  its own ITS rules etc), translate that with gettext, and then use
  `xsltproc` with a bit of magic to output the .isl file for each
  language
* the `po*/Makefile.in.in` files are migrated to `Makevars` files,
  which gettext natively understands.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8028
2022-06-25 10:25:49 +02:00
Jehan 920041c3a0 desktop: gimp-data-extras AppStream was moved to the appropriate repo.
See the commit 28467cb on the gimp-data-extras repo where I moved this
data in. Not sure why this metadata file was ever pushed to the main
repo as it is obviously for the data-extras package (or else I am
missing some information!).

The old 2017 report where it was originally added:
https://bugzilla.gnome.org/show_bug.cgi?id=763398
2022-05-04 23:00:00 +02:00
Jehan 1691d9b8bc desktop: fix the data-extras AppStream file.
appstreamcli was returning the error:

> E: gimp-data-extras:3: cid-is-not-rdns gimp-data-extras

Apparently non-desktop component must absolutely follow the schema with
a unique identifier with 3 parts or more.

As advised in the spec, let's use the main desktop component ID, adding
a specific subpart.

Also use underscore rather than hyphen for maximum compatibility.
See: https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

Finally for addons, share/metainfo/ is the recommended install path.
See: https://freedesktop.org/software/appstream/docs/sect-Metadata-Addon.html
2022-05-03 22:33:27 +02:00
Jehan 73f1f944c5 desktop: use appstreamcli for testing instead of appstream-util.
As told to us, this is the reference AppStream file testing tool, and it
understands more of the spec.

Also since commit 73e2e701da, appstream-util chokes on newer url types
from the spec. These tags are now supported both in appstream-util and
appstreamcli source code, except that appstreamcli had release 0.15.3,
available in Debian testing, whereas there were apparently no recent
appstream-glib/util release (and none since 2020). So for these various
reasons, let's go with the appstreamcli tool.

The only downside is that appstream package (where appstreamcli lives)
is not available on MSYS2, but since it's only an optional test tool for
XML files which should be common on all platforms, it's probably
acceptable.
2022-05-03 21:48:28 +02:00
Jehan 36f103c95f desktop: install a scalable GIMP icon too.
The source is still desktop/src/gimp.svg.
2021-07-06 11:21:37 +02:00
Jehan 1a3efe09f8 desktop: make validate-desktop a unit test.
Instead of a target, let's make it a test. Also I realize it already
existed as desktop_file test. But it's simpler to run it directly (no
need of an external script).

Note: I still leave the test-desktop.sh script as it is used for the
autotools test.
2021-06-18 21:00:38 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00