GNOME Bugzilla – Bug 779732
Build with Meson
Last modified: 2017-06-21 14:51:21 UTC
The first patch adds support for building with Meson. The second one removes the support for building with the Autotools. I did the second one out of curiosity, and I find the diffstat pretty nice: 23 files changed, 220 insertions(+), 921 deletions(-) You probably only want to merge the first one though. (at least for now :P) Note that this doesn't handle translations, but Bastien was saying they might get removed as they aren't actually very useful. I'm happy to add them if we decide to keep them.
Created attachment 347427 [details] [review] build: Add support for building with Meson
Created attachment 347428 [details] [review] build: Remove the Autotools build system We build with Meson now, so there's no need for this any more.
Review of attachment 347427 [details] [review]: ::: gom/meson.build @@ +43,3 @@ + dependencies: [gio_dep, glib_dep, gobject_dep, sqlite3_dep], + #c_args: c_args, + link_args: '-Wl,--no-undefined') You can set `default_options: ['b_lundef=true']` in project() @@ +45,3 @@ + link_args: '-Wl,--no-undefined') + +libgom_inc = include_directories('@0@/..'.format(meson.current_source_dir())) This can be simplified to just .. ::: meson.build @@ +1,2 @@ +project( + 'gom', 'c', Meson convention is two spaces for indentation. @@ +1,3 @@ +project( + 'gom', 'c', + version: '0.3.2', Should also set meson_version to the minimum required Meson version, just for clarity. @@ +18,3 @@ +enable_gtkdoc = get_option('enable-gtk-doc') + +gio_dep = dependency('gio-2.0', version: '>= 2.36', required: true) required defaults to true, these can be removed.
> You can set `default_options: ['b_lundef=true']` in project() This is the default so you only need to remove the manual linker argument. > +libgom_inc = include_directories('@0@/..'.format(meson.current_source_dir())) > > This can be simplified to just .. And should be because starting from 0.39.0 the former is an error.
(In reply to Mathieu Bridon from comment #0) > Note that this doesn't handle translations, but Bastien was saying they might > get removed as they aren't actually very useful. I'm happy to add them if we > decide to keep them. Translations are removed in https://bugzilla.gnome.org/show_bug.cgi?id=779714
>> @@ +1,3 @@ >> +project( >> + 'gom', 'c', >> + version: '0.3.2', > > Should also set meson_version to the minimum required Meson version, just for clarity. Hmm, ok... I'm not sure how to know which version is the minimum required though, so maybe I just put 0.38.1, as that's what I have on Fedora 25 where I made these?
Created attachment 347701 [details] [review] build: Add support for building with Meson
Thanks for the review everyone! Latest patch should fix the issues you found. :)
Review of attachment 347701 [details] [review]: Looks good. Could you please open a new bug to change the default build system used in jhbuild to meson?
> Looks good. Could you please open a new bug to change the default build system used in jhbuild to meson? I don't find a Jhbuild moduleset for master, is it the 3.24 one? If so, maybe we should change that after 3.24 is out?
(In reply to Mathieu Bridon from comment #10) > > Looks good. Could you please open a new bug to change the default build system used in jhbuild to meson? > > I don't find a Jhbuild moduleset for master, is it the 3.24 one? If so, > maybe we should change that after 3.24 is out? Probably better then, yes.
Comment on attachment 347701 [details] [review] build: Add support for building with Meson Attachment 347701 [details] pushed as d164622 - build: Add support for building with Meson
Created attachment 354162 [details] [review] build: Remove the Autotools build system We build with Meson now, so there's no need for this any more.
Attachment 354162 [details] pushed as 5aeb613 - build: Remove the Autotools build system