Tue, 14 Nov 2023 02:42:32 -0600
Replace the old appdata file with an appstream metainfo file
Also moved the stuff in pidgin/meson.build that was touching files pidgin/data
to pidgin/data/meson.build since that already existed.
Testing Done:
Ran the unit tests a lot.
Reviewed at https://reviews.imfreedom.org/r/2800/
|
41485
74a04628357f
Remove some no longer necessary meson options
Gary Kramlich <grim@reaperworld.com>
parents:
41066
diff
changeset
|
1 | subdir('icons') |
|
41066
00e6bda3ef95
Add a Meson devenv configuration.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
39034
diff
changeset
|
2 | |
|
00e6bda3ef95
Add a Meson devenv configuration.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
39034
diff
changeset
|
3 | devenv.prepend('XDG_DATA_DIRS', meson.current_source_dir()) |
|
42499
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
4 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
5 | if host_machine.system() == 'windows' |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
6 | subdir_done() |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
7 | endif |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
8 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
9 | i18n = import('i18n') |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
10 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
11 | ############################################################################### |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
12 | # MetaInfo file |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
13 | ############################################################################### |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
14 | metainfo_base = 'im.pidgin.Pidgin3.metainfo.xml' |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
15 | metainfo_file = meson.current_source_dir() / metainfo_base |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
16 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
17 | appstreamcli_exe = find_program('appstreamcli', required: false) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
18 | if appstreamcli_exe.found() |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
19 | test( |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
20 | 'validate pidgin3 metainfo file', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
21 | appstreamcli_exe, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
22 | args: ['validate', '--no-net', '--pedantic', metainfo_file], |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
23 | ) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
24 | endif |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
25 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
26 | i18n.merge_file( |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
27 | input: metainfo_file, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
28 | output: metainfo_base, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
29 | type: 'xml', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
30 | po_dir: meson.project_source_root() / 'po', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
31 | install: true, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
32 | install_dir: get_option('datadir') / 'metainfo', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
33 | ) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
34 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
35 | ############################################################################### |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
36 | # Desktop file |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
37 | ############################################################################### |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
38 | PIDGIN_DESKTOP_FILE = 'im.pidgin.Pidgin3.desktop' |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
39 | desktop_file_in = configure_file( |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
40 | input : f'@PIDGIN_DESKTOP_FILE@.in.in', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
41 | output : f'@PIDGIN_DESKTOP_FILE@.in', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
42 | configuration : conf, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
43 | ) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
44 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
45 | i18n.merge_file( |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
46 | input : desktop_file_in, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
47 | output : PIDGIN_DESKTOP_FILE, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
48 | po_dir : meson.project_source_root() / 'po', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
49 | type : 'desktop', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
50 | install : true, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
51 | install_dir : get_option('datadir') / 'applications', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
52 | ) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
53 | |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
54 | desktop_file_validate_exe = find_program('desktop-file-validate', required: false) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
55 | if desktop_file_validate_exe.found() |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
56 | test( |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
57 | 'validate pidgin3 desktop file', |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
58 | desktop_file_validate_exe, |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
59 | args: [meson.current_build_dir() / PIDGIN_DESKTOP_FILE], |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
60 | ) |
|
294a948bab87
Replace the old appdata file with an appstream metainfo file
Gary Kramlich <grim@reaperworld.com>
parents:
41485
diff
changeset
|
61 | endif |