GNOME Bugzilla – Bug 791212
Port to Meson
Last modified: 2018-02-27 00:22:29 UTC
See patches.
Created attachment 364922 [details] [review] Add Meson support The minimum supported version is 0.44.0, however, because of a bug in earlier versions.
Created attachment 364923 [details] [review] Nuke Autotools support With the fully functional Meson support, Autotools can be removed from the premises.
Created attachment 364924 [details] [review] Add Meson support Removed a redundant dependency.
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.
Review of attachment 364923 [details] [review]: Woo-hoo!
(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.
Created attachment 364937 [details] [review] Add Meson support The minimum supported version is 0.44.0, however, because of a bug in earlier versions.
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.
Created attachment 364939 [details] [review] Remove footprints.png f935f123faa7bc95c7dd6270e2c29216aae5f77c removed the last reference to it. Four years ago.
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.
Created attachment 364941 [details] [review] Add Meson support The minimum supported version is 0.44.0, however, because of a bug in earlier versions.
(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.
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 on attachment 364941 [details] [review] Add Meson support Note Piotr's comment.
Created attachment 364943 [details] [review] Add Meson support The minimum supported version is 0.44.0, however, because of a bug in earlier versions.
Created attachment 364944 [details] [review] Nuke Autotools support With the fully functional Meson support, Autotools can be removed from the premises.
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.
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 on attachment 364943 [details] [review] Add Meson support On freeze until Meson 0.44 is released. ;)
Review of attachment 364945 [details] [review]: So I guess we can forgo this one now? :)
(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!
Created attachment 365119 [details] [review] Add Meson support The minimum supported version is 0.44.0, however, because of a bug in earlier versions.
Created attachment 365120 [details] [review] Nuke Autotools support With the fully functional Meson support, Autotools can be removed from the premises.
The new patches are based on Piotr’s work on the help.
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…
Ernestas, meson 0.44.1 was released this week. https://github.com/mesonbuild/meson/releases
(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?
(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.
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
Created attachment 368777 [details] [review] flatpak: use Meson for building
Created attachment 368778 [details] [review] Nuke Autotools support With the fully functional Meson support, Autotools can be removed from the premises.
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.
Created attachment 368780 [details] [review] Remove footprints.png f935f123faa7bc95c7dd6270e2c29216aae5f77c removed the last reference to it. Four years ago.
Created attachment 368781 [details] [review] Add Meson support The minimum supported version is 0.44.1, however, because of a bug in earlier versions.
Never mind my earlier comment. Ubuntu solved the translation issue.