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 779732 - Build with Meson
Build with Meson
Status: RESOLVED FIXED
Product: gom
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Gom Maintainers
Gom Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-07 22:25 UTC by Mathieu Bridon
Modified: 2017-06-21 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Add support for building with Meson (8.08 KB, patch)
2017-03-07 22:25 UTC, Mathieu Bridon
none Details | Review
build: Remove the Autotools build system (35.41 KB, patch)
2017-03-07 22:25 UTC, Mathieu Bridon
none Details | Review
build: Add support for building with Meson (7.64 KB, patch)
2017-03-11 13:07 UTC, Mathieu Bridon
committed Details | Review
build: Remove the Autotools build system (34.83 KB, patch)
2017-06-21 14:50 UTC, Bastien Nocera
committed Details | Review

Description Mathieu Bridon 2017-03-07 22:25:35 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.
Comment 1 Mathieu Bridon 2017-03-07 22:25:40 UTC
Created attachment 347427 [details] [review]
build: Add support for building with Meson
Comment 2 Mathieu Bridon 2017-03-07 22:25:45 UTC
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.
Comment 3 Patrick Griffis (tingping) 2017-03-07 22:34:05 UTC
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.
Comment 4 Jussi Pakkanen 2017-03-07 22:41:36 UTC
> 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.
Comment 5 Bastien Nocera 2017-03-07 23:49:58 UTC
(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
Comment 6 Mathieu Bridon 2017-03-11 12:54:38 UTC
>> @@ +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?
Comment 7 Mathieu Bridon 2017-03-11 13:07:03 UTC
Created attachment 347701 [details] [review]
build: Add support for building with Meson
Comment 8 Mathieu Bridon 2017-03-11 13:07:40 UTC
Thanks for the review everyone!

Latest patch should fix the issues you found. :)
Comment 9 Bastien Nocera 2017-03-11 21:46:16 UTC
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?
Comment 10 Mathieu Bridon 2017-03-12 14:32:54 UTC
> 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?
Comment 11 Bastien Nocera 2017-03-13 12:34:15 UTC
(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 12 Mathieu Bridon 2017-04-29 10:52:29 UTC
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
Comment 13 Bastien Nocera 2017-06-21 14:50:37 UTC
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.
Comment 14 Bastien Nocera 2017-06-21 14:51:17 UTC
Attachment 354162 [details] pushed as 5aeb613 - build: Remove the Autotools build system