After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789994 - [Build] Port to Meson build system
[Build] Port to Meson build system
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2017-11-06 22:41 UTC by Niels De Graef
Modified: 2017-11-22 00:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[Patch] Port Seahorse to Meson (29.61 KB, patch)
2017-11-06 22:45 UTC, Niels De Graef
none Details | Review
[Patch] Configure script for Continuous (5.54 KB, patch)
2017-11-06 22:46 UTC, Niels De Graef
none Details | Review
[Patch] Configure script for Continuous (5.42 KB, patch)
2017-11-09 19:25 UTC, Niels De Graef
none Details | Review

Description Niels De Graef 2017-11-06 22:41:16 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.
Comment 1 Niels De Graef 2017-11-06 22:45:00 UTC
Created attachment 363108 [details] [review]
[Patch] Port Seahorse to Meson
Comment 2 Niels De Graef 2017-11-06 22:46:15 UTC
Created attachment 363109 [details] [review]
[Patch] Configure script for Continuous
Comment 3 Niels De Graef 2017-11-06 22:49:27 UTC
CC'ing Ebassi for the continuous script and since he knows a bit about Meson as well.
Comment 4 Emmanuele Bassi (:ebassi) 2017-11-06 23:01:39 UTC
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.
Comment 5 Niels De Graef 2017-11-09 19:25:39 UTC
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.