GNOME Bugzilla – Bug 789994
[Build] Port to Meson build system
Last modified: 2017-11-22 00:14:38 UTC
I've been holding this off for quite some time, but I think the code to port our build system to Meson is now mature enough to be included in the main repository. Differences with the Autotools build: * All resources are now contained in a gresource.xml file in /data. This also means that the UI resources for PGP are included, even if you don't want them. I would like to change this in the future to module-specific resources (i.e. SSH ui files for SSH). This would also finally allow us to use GtkTemplates. * Valac is a hard requirement (--disable-valac doesn't work in autotools anyway) * Use the libsecret package, rather than libsecret-unstable. * The LDAP checks aren't as thorough, but I believe these were mostly aimed at very old Unix distributions. If these problems would arise again, I wouldn't mind re-implementing them for Meson. If all goes well, I would like to drop Autotools rather sooner than later, since maintaining has been a real eye-sore for the last couple of months.
Created attachment 363108 [details] [review] [Patch] Port Seahorse to Meson
Created attachment 363109 [details] [review] [Patch] Configure script for Continuous
CC'ing Ebassi for the continuous script and since he knows a bit about Meson as well.
Review of attachment 363108 [details] [review]: ::: meson.build @@ +1,3 @@ +project('seahorse', ['vala', 'c'], + version: '3.20.0', + meson_version: '>= 0.39', You probably want 0.42. There's no point in requiring an older version of Meson. @@ +16,3 @@ +with_keyservers = get_option('keyservers-support') +with_key_sharing = get_option('key-sharing') +strict_mode = get_option('strict-mode') There's no need to have a "strict mode" option. Meson has a `Werror` build option. @@ +24,3 @@ + +seahorse_prefix = get_option('prefix') +po_dir = join_paths(meson.source_root(), 'po') You can replace this with: po_dir = files('po') to avoid the absolute path. @@ +42,3 @@ +# Use more warnings +warning_flags = [ + '-Wall', `-Wall` is included in Meson's `warning_level=1`. @@ +65,3 @@ + +# Strict mode +if strict_mode Depending on what you mean with "strict mode", you should either use the `buildtype` Meson option - either `debug` or `release`, depending on whether you want to get more warnings during release or during development. @@ +67,3 @@ +if strict_mode + add_project_arguments([ + '-Werror', Meson has a `Werror` option already. @@ +71,3 @@ + '-DGTK_DISABLE_DEPRECATED', + '-DGDK_DISABLE_DEPRECATED', + '-DGDK_PIXBUF_DISABLE_DEPRECATED', These are all pointless: GLib, GDK, and GTK do not use them any more. If you don't want deprecation warnings, use `*_DISABLE_DEPRECATION_WARNINGS` instead; otherwise, you'll get deprecation warnings by default.
Created attachment 363309 [details] [review] [Patch] Configure script for Continuous Thanks so much, Emmanuele! I incorporated your remarks (except for using files('po') since that didn't work) and landed the Meson support on master. I updated the patch for Continuous as well.