GNOME Bugzilla – Bug 783234
Port to meson
Last modified: 2017-10-16 11:35:20 UTC
https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
https://git.gnome.org/browse/gnome-boxes/log/?h=wip/feborges/meson
Created attachment 354152 [details] [review] data: Add DBus activable service file We were generating the dbus service file from within the Makefile. With the port to meson, it is more sane to have an service.in file instead.
Created attachment 354153 [details] [review] Port to meson
Review of attachment 354153 [details] [review]: ::: vapi/uuid.vapi @@ +1,1 @@ +/* libuuid Vala Bindings Why do you need a copy of the uuid bindings? btw, glib now has g_uuid_string_random() so you could get rid of that dependency (probably as a different bug).
Created attachment 354494 [details] [review] Port to meson
(In reply to Marc-Andre Lureau from comment #4) > Review of attachment 354153 [details] [review] [review]: > > ::: vapi/uuid.vapi > @@ +1,1 @@ > +/* libuuid Vala Bindings > > Why do you need a copy of the uuid bindings? > > btw, glib now has g_uuid_string_random() so you could get rid of that > dependency (probably as a different bug). That's right. I proposed the patches at Bug 784204, and I updated the meson patch accordingly. Thanks for taking a look at it, elmarco.
Review of attachment 354152 [details] [review]: ack
Review of attachment 354494 [details] [review]: Great stuff! Comments below: * I assume you tested this, including all the build options. What about the installed tests? I know they probably need update since vbenes just gave up on those. :( * I'm not so sure why we need to move libgd under subprojects? If that's needed, would be nice to document the need in the commit log. * If this was based on my experimental branch, I wouldn't mind a bit of attribution in the commit log. :) ::: meson.build @@ +2,3 @@ + ['vala', 'c'], + version: '3.25.3', + license: 'GPL2+', Boxes is under LGPL. :)
(In reply to Zeeshan Ali (Khattak) from comment #8) > Review of attachment 354494 [details] [review] [review]: > > Great stuff! Comments below: > > * I assume you tested this, including all the build options. What about the > installed tests? I know they probably need update since vbenes just gave up > on those. :( I will check it out and update accordingly. :) > * I'm not so sure why we need to move libgd under subprojects? If that's > needed, would be nice to document the need in the commit log. Sure. Meson recently started to support the subproject() utility, which handles git submodules in a clearer way, see http://mesonbuild.com/Subprojects.html
Comment on attachment 354152 [details] [review] data: Add DBus activable service file Attachment 354152 [details] pushed as 19e1942 - data: Add DBus activable service file
Created attachment 356357 [details] [review] Port to meson This has been based in the outdated work of Zeeshan Ali in wip/meson, and in the recent port of GNOME Clocks to meson. libgd was moved into the subprojects/ directory so we can benefit from meson the subproject() utility.
Since we are just past the release 3.26[0], the new 6 months cycle shall give us plenty of time to test the new build system, and to file and fix build related bugs. My planing is to make a gradual transition by merging the meson build code[1] and keep it working simultaneously with the current autotools machinery. At some point in the cycle we should decide whether the meson build is good enough and finally drop autotools entirely (making jhbuild build from meson by default, for instance). This way I encourage you to try the new build with its different options in order to stress it as much as possible. A normal Boxes build under meson should require $meson_version >= 0.40, and the following instructions: $ meson build $ cd build $ ninja $ ./build/src/gnome-boxes # To run from the build dir Or $ sudo ninja install # To install it against the system [0] https://git.gnome.org/browse/gnome-boxes/log/?h=gnome-3-26 [1] https://git.gnome.org/browse/gnome-boxes/log/?h=wip/feborges/meson
Created attachment 360128 [details] [review] build: Specify install_dir This way jhbuild can build out of the source tree.
Comment on attachment 360128 [details] [review] build: Specify install_dir Attachment 360128 [details] pushed as 3dbd182 - build: Specify install_dir
Created attachment 361324 [details] [review] build: Install the custom osinfo database with Meson
We weren't installing Boxes' extension to the osinfo database.
Created attachment 361325 [details] [review] build: Install the custom osinfo database with Meson Sorry! Copy/paste embarassment with spaces before parentheses.
Created attachment 361326 [details] [review] build: Install QEMU source & disk.img with Meson
Review of attachment 361325 [details] [review]: Thanks! We could use meson's foreach here, example: osinfo_db = [ ['debian-1.0.xml', 'gnome-boxes/osinfo/os/debian.org'], ['fedora-1.xml', 'gnome-boxes/osinfo/os/fedoraproject.org'], ['ubuntu-4.10.xml', 'gnome-boxes/osinfo/os/ubuntu.com'], ] foreach os: osinfo_db install_data (os[0], install_dir : join_paths (data_dir, os[1])) endforeach ::: data/osinfo/meson.build @@ +1,2 @@ +install_data ('debian-1.0.xml', + install_dir : join_paths (get_option ('datadir'), 'gnome-boxes/osinfo/os/debian.org')) $data_dir is already defined in ../../meson.build
Review of attachment 361326 [details] [review]: Feel free to push it after addressing my comments. ::: data/meson.build @@ +52,3 @@ +install_data ('QEMU_Session', + install_dir : join_paths (get_option ('datadir'), 'gnome-boxes/sources')) same. data_dir was already defined.
(In reply to Felipe Borges from comment #19) > Review of attachment 361325 [details] [review] [review]: > > [...] > > We could use meson's foreach here, example: > > osinfo_db = [ > ['debian-1.0.xml', 'gnome-boxes/osinfo/os/debian.org'], > ['fedora-1.xml', 'gnome-boxes/osinfo/os/fedoraproject.org'], > ['ubuntu-4.10.xml', 'gnome-boxes/osinfo/os/ubuntu.com'], > ] > > foreach os: osinfo_db > install_data (os[0], install_dir : join_paths (data_dir, os[1])) > endforeach Oh, that's nice. > ::: data/osinfo/meson.build > @@ +1,2 @@ > +install_data ('debian-1.0.xml', > + install_dir : join_paths (get_option ('datadir'), > 'gnome-boxes/osinfo/os/debian.org')) > > $data_dir is already defined in ../../meson.build Oops, sorry.
Created attachment 361415 [details] [review] build: Install the custom osinfo database with Meson
Created attachment 361416 [details] [review] build: Install QEMU source & disk.img with Meson
Review of attachment 361415 [details] [review]: thanks!
Review of attachment 361416 [details] [review]: lgtm
Comment on attachment 361416 [details] [review] build: Install QEMU source & disk.img with Meson Thanks, Felipe! Pushed to master.