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 791212 - Port to Meson
Port to Meson
Status: RESOLVED FIXED
Product: gnome-sudoku
Classification: Applications
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gnome-sudoku-maint
gnome-sudoku-maint
Depends on:
Blocks: 782980
 
 
Reported: 2017-12-04 15:58 UTC by Ernestas Kulik
Modified: 2018-02-27 00:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Meson support (6.81 KB, patch)
2017-12-04 15:58 UTC, Ernestas Kulik
none Details | Review
Nuke Autotools support (25.77 KB, patch)
2017-12-04 15:58 UTC, Ernestas Kulik
none Details | Review
Add Meson support (6.80 KB, patch)
2017-12-04 16:02 UTC, Ernestas Kulik
none Details | Review
Add Meson support (6.63 KB, patch)
2017-12-04 17:37 UTC, Ernestas Kulik
none Details | Review
Remove help (2.66 MB, patch)
2017-12-04 17:38 UTC, Ernestas Kulik
none Details | Review
Remove footprints.png (2.67 KB, patch)
2017-12-04 17:39 UTC, Ernestas Kulik
committed Details | Review
Move symbolic icon to symbolic/ (1.44 KB, patch)
2017-12-04 17:39 UTC, Ernestas Kulik
committed Details | Review
Add Meson support (6.36 KB, patch)
2017-12-04 17:40 UTC, Ernestas Kulik
none Details | Review
Add Meson support (6.37 KB, patch)
2017-12-04 18:34 UTC, Ernestas Kulik
none Details | Review
Nuke Autotools support (25.58 KB, patch)
2017-12-04 18:34 UTC, Ernestas Kulik
none Details | Review
Remove help (2.66 MB, patch)
2017-12-04 18:34 UTC, Ernestas Kulik
accepted-commit_now Details | Review
Add Meson support (6.20 KB, patch)
2017-12-06 14:27 UTC, Ernestas Kulik
committed Details | Review
Nuke Autotools support (25.43 KB, patch)
2017-12-06 14:27 UTC, Ernestas Kulik
committed Details | Review
flatpak: use Meson for building (755 bytes, patch)
2018-02-22 17:50 UTC, Ernestas Kulik
committed Details | Review
Nuke Autotools support (25.43 KB, patch)
2018-02-22 17:50 UTC, Ernestas Kulik
committed Details | Review
Move symbolic icon to symbolic/ (1.44 KB, patch)
2018-02-22 17:50 UTC, Ernestas Kulik
committed Details | Review
Remove footprints.png (2.67 KB, patch)
2018-02-22 17:50 UTC, Ernestas Kulik
committed Details | Review
Add Meson support (6.20 KB, patch)
2018-02-22 17:50 UTC, Ernestas Kulik
committed Details | Review

Description Ernestas Kulik 2017-12-04 15:58:28 UTC
See patches.
Comment 1 Ernestas Kulik 2017-12-04 15:58:33 UTC
Created attachment 364922 [details] [review]
Add Meson support

The minimum supported version is 0.44.0, however, because of a bug in
earlier versions.
Comment 2 Ernestas Kulik 2017-12-04 15:58:42 UTC
Created attachment 364923 [details] [review]
Nuke Autotools support

With the fully functional Meson support, Autotools can be removed from
the premises.
Comment 3 Ernestas Kulik 2017-12-04 16:02:26 UTC
Created attachment 364924 [details] [review]
Add Meson support

Removed a redundant dependency.
Comment 4 Michael Catanzaro 2017-12-04 16:50:43 UTC
Review of attachment 364924 [details] [review]:

Wow, thanks!

Be sure to update the JHBuild moduleset when you push this. Then I'll make a new release right away so distros can tell us what's wrong with it.

::: config.h.meson
@@ +1,1 @@
+#mesondefine GETTEXT_PACKAGE

Having a config.h.meson is a bit overkill for just three variables, especially when it's a totally standard template. I think you don't need it: just remove the input: 'config.h.meson' argument to configure_file() in the toplevel meson.build.

::: data/meson.build
@@ +9,3 @@
+  install_dir: join_paths(datadir, 'applications'),
+  po_dir: '../po',
+  type: 'desktop')

The style used in epiphany and gnome-chess is to have the closing parentheses on its own on the following line:

  type: 'desktop'
)

If you're OK with switching to that style, that's what I'd prefer, for consistency between my modules.

@@ +21,3 @@
+  install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
+
+install_data('footprints.png',

Hm, pretty sure this file has been unused for several years. You should remove it in a separate commit.

@@ +34,3 @@
+
+install_data('icons/hicolor/scalable/gnome-sudoku.svg',
+  'icons/hicolor/scalable/gnome-sudoku-symbolic.svg',

It would be better to install this one in symbolic rather than scalable. scalable was the old location for symbolic icons.

::: help/meson.build
@@ +33,3 @@
+]
+
+gnome.yelp('gnome-sudoku',

You can delete the entire help directory. I removed the Help link from the app menu a while back, because the help is  totally obsolete and was confusing people.

::: meson.build
@@ +26,3 @@
+gio = dependency('gio-2.0', version: '>= @0@'.format(glib_version))
+glib = dependency('glib-2.0', version: '>= @0@'.format(glib_version))
+gtk = dependency('gtk+-3.0', version: '>= @0@'.format(gtk_version))

I would hardcode the gtk and qqwing versions here, because they're only used it one place.
Comment 5 Michael Catanzaro 2017-12-04 16:50:52 UTC
Review of attachment 364923 [details] [review]:

Woo-hoo!
Comment 6 Ernestas Kulik 2017-12-04 17:05:36 UTC
(In reply to Michael Catanzaro from comment #4)
> ::: config.h.meson
> @@ +1,1 @@
> +#mesondefine GETTEXT_PACKAGE
> 
> Having a config.h.meson is a bit overkill for just three variables,
> especially when it's a totally standard template. I think you don't need it:
> just remove the input: 'config.h.meson' argument to configure_file() in the
> toplevel meson.build.

I was torn between using that and adding global arguments. Your suggestion sounds good, too.

> ::: data/meson.build
> @@ +9,3 @@
> +  install_dir: join_paths(datadir, 'applications'),
> +  po_dir: '../po',
> +  type: 'desktop')
> 
> The style used in epiphany and gnome-chess is to have the closing
> parentheses on its own on the following line:
> 
>   type: 'desktop'
> )
> 
> If you're OK with switching to that style, that's what I'd prefer, for
> consistency between my modules.

Yeah, I’m fine with switching to it.

> @@ +21,3 @@
> +  install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
> +
> +install_data('footprints.png',
> 
> Hm, pretty sure this file has been unused for several years. You should
> remove it in a separate commit.

All right.

> @@ +34,3 @@
> +
> +install_data('icons/hicolor/scalable/gnome-sudoku.svg',
> +  'icons/hicolor/scalable/gnome-sudoku-symbolic.svg',
> 
> It would be better to install this one in symbolic rather than scalable.
> scalable was the old location for symbolic icons.

Will do.

> ::: help/meson.build
> @@ +33,3 @@
> +]
> +
> +gnome.yelp('gnome-sudoku',
> 
> You can delete the entire help directory. I removed the Help link from the
> app menu a while back, because the help is  totally obsolete and was
> confusing people.

I’m more than ready to remove something. :)

> ::: meson.build
> @@ +26,3 @@
> +gio = dependency('gio-2.0', version: '>= @0@'.format(glib_version))
> +glib = dependency('glib-2.0', version: '>= @0@'.format(glib_version))
> +gtk = dependency('gtk+-3.0', version: '>= @0@'.format(gtk_version))
> 
> I would hardcode the gtk and qqwing versions here, because they're only used
> it one place.

Yeah, makes sense.
Comment 7 Ernestas Kulik 2017-12-04 17:37:13 UTC
Created attachment 364937 [details] [review]
Add Meson support

The minimum supported version is 0.44.0, however, because of a bug in
earlier versions.
Comment 8 Ernestas Kulik 2017-12-04 17:38:58 UTC
Created attachment 364938 [details] [review]
Remove help

2baeb7c47d17f659c632e6c0ee6e3fb4fd880c02 removed it temporarily; but,
since it hasn’t been updated much, this commit removes it for good.
Comment 9 Ernestas Kulik 2017-12-04 17:39:09 UTC
Created attachment 364939 [details] [review]
Remove footprints.png

f935f123faa7bc95c7dd6270e2c29216aae5f77c removed the last reference to
it. Four years ago.
Comment 10 Ernestas Kulik 2017-12-04 17:39:22 UTC
Created attachment 364940 [details] [review]
Move symbolic icon to symbolic/

scalable/ is no longer used to store symbolic icons. This commit moves
the icon in-tree and changes its installation directory.
Comment 11 Ernestas Kulik 2017-12-04 17:40:22 UTC
Created attachment 364941 [details] [review]
Add Meson support

The minimum supported version is 0.44.0, however, because of a bug in
earlier versions.
Comment 12 Ernestas Kulik 2017-12-04 17:43:21 UTC
(In reply to Ernestas Kulik from comment #11)
> Created attachment 364941 [details] [review] [review]
> Add Meson support
> 
> The minimum supported version is 0.44.0, however, because of a bug in
> earlier versions.

The ordering is a bit messed up now, but the removals, etc. follow this patch.

Also added “-include config.h” as a project-wide argument now, since that bit was repeating in lib/meson.build and src/meson.build.
Comment 13 Piotr Drąg 2017-12-04 18:00:22 UTC
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..90b3ab2
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext('gnome-sudoku')


Please use the glib preset here (like in https://git.gnome.org/browse/epiphany/tree/po/meson.build).
Comment 14 Michael Catanzaro 2017-12-04 18:03:48 UTC
Comment on attachment 364941 [details] [review]
Add Meson support

Note Piotr's comment.
Comment 15 Ernestas Kulik 2017-12-04 18:34:11 UTC
Created attachment 364943 [details] [review]
Add Meson support

The minimum supported version is 0.44.0, however, because of a bug in
earlier versions.
Comment 16 Ernestas Kulik 2017-12-04 18:34:23 UTC
Created attachment 364944 [details] [review]
Nuke Autotools support

With the fully functional Meson support, Autotools can be removed from
the premises.
Comment 17 Ernestas Kulik 2017-12-04 18:34:45 UTC
Created attachment 364945 [details] [review]
Remove help

2baeb7c47d17f659c632e6c0ee6e3fb4fd880c02 removed it temporarily; but,
since it hasn’t been updated much, this commit removes it for good.
Comment 18 Ernestas Kulik 2017-12-04 18:37:13 UTC
Hopefully the last of spam.

Resolved issues:
  - Added preset argument to i18n.gettext() call
  - Removed references to help in code and appstream data
  - Reverted POTFILES.in -> POTFILES rename
Comment 19 Michael Catanzaro 2017-12-04 23:37:06 UTC
Comment on attachment 364943 [details] [review]
Add Meson support

On freeze until Meson 0.44 is released. ;)
Comment 20 Piotr Drąg 2017-12-05 16:25:08 UTC
Review of attachment 364945 [details] [review]:

So I guess we can forgo this one now? :)
Comment 21 Ernestas Kulik 2017-12-05 16:32:03 UTC
(In reply to Piotr Drąg from comment #20)
> Review of attachment 364945 [details] [review] [review]:
> 
> So I guess we can forgo this one now? :)

Yup. I’ll mark it as obsolete. ;) Thanks for working on that!
Comment 22 Ernestas Kulik 2017-12-06 14:27:34 UTC
Created attachment 365119 [details] [review]
Add Meson support

The minimum supported version is 0.44.0, however, because of a bug in
earlier versions.
Comment 23 Ernestas Kulik 2017-12-06 14:27:45 UTC
Created attachment 365120 [details] [review]
Nuke Autotools support

With the fully functional Meson support, Autotools can be removed from
the premises.
Comment 24 Ernestas Kulik 2017-12-06 14:28:45 UTC
The new patches are based on Piotr’s work on the help.
Comment 25 Ernestas Kulik 2017-12-10 18:36:27 UTC
Update: a fix that landed before the new Meson release broke everything again. This means that we’ll need to depend on 0.44.1…
Comment 26 Jeremy Bicha 2018-02-22 01:50:21 UTC
Ernestas, meson 0.44.1 was released this week.

https://github.com/mesonbuild/meson/releases
Comment 27 Ernestas Kulik 2018-02-22 07:47:20 UTC
(In reply to Jeremy Bicha from comment #26)
> Ernestas, meson 0.44.1 was released this week.
> 
> https://github.com/mesonbuild/meson/releases

Thanks, Jeremy, I’ll take a look at this later today. Will it be all right to change the build system this late in the cycle?
Comment 28 Jeremy Bicha 2018-02-22 10:02:43 UTC
(In reply to Ernestas Kulik from comment #27)
> Thanks, Jeremy, I’ll take a look at this later today. Will it be all right
> to change the build system this late in the cycle?

In this particular case, Ubuntu's gnome-sudoku has a translation problem and I'm hoping that switching to meson would fix it (but that's just a blind guess). https://launchpad.net/bugs/1734545

I think it's generally ok to add meson support even late if you keep autotools available. One way to do that is to add all the meson.build (and help/LINGUAS) files to EXTRA_DIST in Makefile.am and still use autotools to build the release tarballs.
Comment 29 Ernestas Kulik 2018-02-22 17:49:39 UTC
The following fixes have been pushed:
4503762 flatpak: use Meson for building
39d0a64 Nuke Autotools support
ed3cc2e Move symbolic icon to symbolic/
3422a70 Remove footprints.png
d425839 Add Meson support
Comment 30 Ernestas Kulik 2018-02-22 17:50:02 UTC
Created attachment 368777 [details] [review]
flatpak: use Meson for building
Comment 31 Ernestas Kulik 2018-02-22 17:50:08 UTC
Created attachment 368778 [details] [review]
Nuke Autotools support

With the fully functional Meson support, Autotools can be removed from
the premises.
Comment 32 Ernestas Kulik 2018-02-22 17:50:13 UTC
Created attachment 368779 [details] [review]
Move symbolic icon to symbolic/

scalable/ is no longer used to store symbolic icons. This commit moves
the icon in-tree and changes its installation directory.
Comment 33 Ernestas Kulik 2018-02-22 17:50:17 UTC
Created attachment 368780 [details] [review]
Remove footprints.png

f935f123faa7bc95c7dd6270e2c29216aae5f77c removed the last reference to
it. Four years ago.
Comment 34 Ernestas Kulik 2018-02-22 17:50:23 UTC
Created attachment 368781 [details] [review]
Add Meson support

The minimum supported version is 0.44.1, however, because of a bug in
earlier versions.
Comment 35 Jeremy Bicha 2018-02-27 00:22:29 UTC
Never mind my earlier comment. Ubuntu solved the translation issue.