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 793016 - Port to meson
Port to meson
Status: RESOLVED FIXED
Product: swell-foop
Classification: Applications
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: swell-foop-maint
swell-foop-maint
Depends on:
Blocks:
 
 
Reported: 2018-01-29 22:40 UTC by Robert Roth
Modified: 2018-02-09 03:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial patch (6.57 KB, patch)
2018-01-30 10:12 UTC, Robert Roth
accepted-commit_now Details | Review

Description Robert Roth 2018-01-29 22:40:47 UTC
For faster builds and less build-related files.
Comment 1 Robert Roth 2018-01-30 10:12:09 UTC
Created attachment 367624 [details] [review]
Initial patch

Complains a bit on desktop file generation, as swell-foop is still using intltool, and not gettext.
Comment 2 Michael Catanzaro 2018-01-30 14:40:21 UTC
Review of attachment 367624 [details] [review]:

Nice!

I'd recommend going ahead and deleting the Autotools build system now... no good can come of releasing with two build systems.

::: data/meson.build
@@ +42,3 @@
+# Gschema
+install_data('org.gnome.swell-foop.gschema.xml',
+  install_dir: join_paths(get_option('datadir'), 'appdata'),

Wrong install dir!

::: meson.build
@@ +1,1 @@
+project('swell-foop', ['c','vala'],

Do you really have to add 'c' for some reason?

@@ +17,3 @@
+glib_min_version = '2.36'
+gtk_min_version = '3.12'
+clutter_min_version = '1.14.0'

Personally, I don't declare variables for min versions that are only used in one place, but up to you.

@@ +29,3 @@
+# Libraries
+valac = meson.get_compiler('vala')
+cc = meson.get_compiler('c')

These are unused... are they just to check if the compilers are available? I guess that's fine, but not under a # Libraries comment.
Comment 3 Robert Roth 2018-01-30 15:52:54 UTC
(In reply to Michael Catanzaro from comment #2)
> Review of attachment 367624 [details] [review] [review]:
> 
> Nice!
> 
> I'd recommend going ahead and deleting the Autotools build system now... no
> good can come of releasing with two build systems.
> 
I wanted to keep both for building 3.28, and delete in the next cycle, but if this works, I'm ok with dropping autotools. This is my first meson port, I didn't want to drop autotools (something I can make a release with) right away.

> +install_data('org.gnome.swell-foop.gschema.xml',
> +  install_dir: join_paths(get_option('datadir'), 'appdata'),
> 
> Wrong install dir!
Good catch.

> 
> ::: meson.build
> @@ +1,1 @@
> +project('swell-foop', ['c','vala'],
> 
> Do you really have to add 'c' for some reason?
I tried with vala only, and meson complained that I have to add c to the project languages too.

> 
> @@ +17,3 @@
> +glib_min_version = '2.36'
> +gtk_min_version = '3.12'
> +clutter_min_version = '1.14.0'
> 
> Personally, I don't declare variables for min versions that are only used in
> one place, but up to you.
Indeed, some min_version variables can be dropped, glib_min_version is used in the dependency and in valac --target-version.
> 
> @@ +29,3 @@
> +# Libraries
> +valac = meson.get_compiler('vala')
> +cc = meson.get_compiler('c')
> 
> These are unused... are they just to check if the compilers are available? I
> guess that's fine, but not under a # Libraries comment.
Well, blaming mostly for the copy-paste, but yes, it is for checking the existence of compilers. At first I didn't have valac, and it did fail there, so I think I'll leave them for compiler checking, and remove cc in case removing c from langauges works.

Thanks for your comments, highly appreciated by a rookie meson builder :)
Comment 4 Robert Roth 2018-01-30 18:11:12 UTC
Pushed the meson build with the proposed fixes to master, gschema installed in the proper directory, and less variables for minimum versions only used once.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 5 Luciano Santos 2018-02-08 23:31:09 UTC
Can someone please edit meson.build? My git skills are very poor and I'm afraid I don't permission.

-  license: 'GPLv3+',
+  license: 'GPLv2+',
Comment 6 Robert Roth 2018-02-09 03:09:08 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.