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 775950 - Add Meson build support in grilo core
Add Meson build support in grilo core
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: core
git master
Other All
: Normal enhancement
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2016-12-11 15:44 UTC by Juan A. Suarez Romero
Modified: 2017-02-14 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
doc: put manpages in doc/man (3.53 KB, patch)
2016-12-11 15:44 UTC, Juan A. Suarez Romero
committed Details | Review
core: include @filename@ in file-production (942 bytes, patch)
2016-12-11 15:44 UTC, Juan A. Suarez Romero
committed Details | Review
build: add Meson build support (19.30 KB, patch)
2016-12-11 15:44 UTC, Juan A. Suarez Romero
none Details | Review
build: add Meson build support (21.64 KB, patch)
2016-12-11 17:44 UTC, Juan A. Suarez Romero
none Details | Review
build: add Meson build support (21.67 KB, patch)
2017-02-14 09:07 UTC, Juan A. Suarez Romero
none Details | Review
build: add Meson build support (21.72 KB, patch)
2017-02-14 09:56 UTC, Juan A. Suarez Romero
none Details | Review
build: add Meson build support (21.74 KB, patch)
2017-02-14 10:13 UTC, Juan A. Suarez Romero
none Details | Review
build: add Meson build support (21.74 KB, patch)
2017-02-14 10:17 UTC, Juan A. Suarez Romero
none Details | Review
build: add Meson build support (21.74 KB, patch)
2017-02-14 10:22 UTC, Juan A. Suarez Romero
committed Details | Review

Description Juan A. Suarez Romero 2016-12-11 15:44:21 UTC
Meson build is a fast and modern build tool, and GNOME is moving torwards using it.

So let's add support in Grilo too.
Comment 1 Juan A. Suarez Romero 2016-12-11 15:44:26 UTC
Created attachment 341761 [details] [review]
doc: put manpages in doc/man

Put all manpage files together.
Comment 2 Juan A. Suarez Romero 2016-12-11 15:44:31 UTC
Created attachment 341762 [details] [review]
core: include @filename@ in file-production

Small fix for an include that is in the wrong place.
Comment 3 Juan A. Suarez Romero 2016-12-11 15:44:37 UTC
Created attachment 341763 [details] [review]
build: add Meson build support
Comment 4 Juan A. Suarez Romero 2016-12-11 17:44:55 UTC
Created attachment 341767 [details] [review]
build: add Meson build support
Comment 5 Victor Toso 2017-02-13 14:56:25 UTC
Review of attachment 341761 [details] [review]:

Looks good
Comment 6 Victor Toso 2017-02-13 14:57:08 UTC
Review of attachment 341762 [details] [review]:

sure
Comment 7 Victor Toso 2017-02-13 15:21:06 UTC
Review of attachment 341767 [details] [review]:

Looks good otherwise. Fast as usual. Super great, really.

::: doc/grilo/meson.build
@@ +22,3 @@
+	'quick-start.xml',
+	'writing-apps.xml',
+        'overview.xml',

You are using a mix of tabs and spaces here. I would suggest to keep only spaces instead of spaces to keep consistency.

::: doc/man/meson.build
@@ +10,3 @@
+    'grl-inspect-0.3.1',
+    'grl-launch-0.3.1',
+]

Can we use the 'grilo-test-ui-@0@'.format(grl_majorminor) (for the others too)

::: src/grl-metadata-key.h
@@ +128,3 @@
 
+/* END CORE KEYS */
+

Shouldn't it be in a different patch?

::: tools/grilo-inspect/generate_core_keys.py
@@ +34,3 @@
+
+finput.close()
+foutput.close()

I would suggest to introduce this as a preparatory patch and perhaps changing the $(AWK) line in tools/grilo-inspect/Makefile.am to use this (or not, it is simple enough there but it does not make usage of /* BEGIN/END */)

Not a requirement, just a suggestion :)
Comment 8 Juan A. Suarez Romero 2017-02-13 15:54:36 UTC
Review of attachment 341767 [details] [review]:

::: doc/grilo/meson.build
@@ +22,3 @@
+	'quick-start.xml',
+	'writing-apps.xml',
+        'overview.xml',

Sure. My fault.

::: doc/man/meson.build
@@ +10,3 @@
+    'grl-inspect-0.3.1',
+    'grl-launch-0.3.1',
+]

Uhm... That would return 'grilo-test-ui-0.3', not 'grilo-test-ui-0.3.1'. So we would need also to rename the manpages. And fix also the Makefile.am

Is it fine for you?

::: src/grl-metadata-key.h
@@ +128,3 @@
 
+/* END CORE KEYS */
+

I kept in this patch because this is used by generate_core_keys.py, which is invoked in Meson when building grl-inspect.

For the autotools version the own Makefile uses the old version, which doesn't requires this change.

::: tools/grilo-inspect/generate_core_keys.py
@@ +34,3 @@
+
+finput.close()
+foutput.close()

The reason why I'm not using this script in Makefile is because it would introduce a new dependency: python.

This is not a problem with Meson, because python is required by Meson itself.

Said that, do you mind if we leave this change for a future improvement?
Comment 9 Juan A. Suarez Romero 2017-02-13 17:24:32 UTC
Comment on attachment 341761 [details] [review]
doc: put manpages in doc/man

Attachment 341761 [details] pushed as 000303d - doc: put manpages in doc/man
Comment 10 Juan A. Suarez Romero 2017-02-13 17:25:51 UTC
Comment on attachment 341762 [details] [review]
core: include @filename@ in file-production

Attachment 341762 [details] pushed as 5940808 - core: include @filename@ in file-production
Comment 11 Victor Toso 2017-02-13 18:30:53 UTC
(In reply to Juan A. Suarez Romero from comment #8)
> ::: doc/man/meson.build
> @@ +10,3 @@
> +    'grl-inspect-0.3.1',
> +    'grl-launch-0.3.1',
> +]
> 
> Uhm... That would return 'grilo-test-ui-0.3', not 'grilo-test-ui-0.3.1'. So
> we would need also to rename the manpages. And fix also the Makefile.am
> 
> Is it fine for you?

I think it would make sense to not have to bump the meson.build every release so I was fine with an extra variable; But I don't think it is bad idea to bound the manual to major and minor values only too.

> 
> ::: src/grl-metadata-key.h
> @@ +128,3 @@
>  
> +/* END CORE KEYS */
> +
> 
> I kept in this patch because this is used by generate_core_keys.py, which is
> invoked in Meson when building grl-inspect.
> 
> For the autotools version the own Makefile uses the old version, which
> doesn't requires this change.
> 
> ::: tools/grilo-inspect/generate_core_keys.py
> @@ +34,3 @@
> +
> +finput.close()
> +foutput.close()
> 
> The reason why I'm not using this script in Makefile is because it would
> introduce a new dependency: python.

Yeah but as far as I understood, it would be for build time only.

> This is not a problem with Meson, because python is required by Meson itself.
> 
> Said that, do you mind if we leave this change for a future improvement?

Sure, not a problem at all. The awk line is quite simple to follow there too :)
Comment 12 Victor Toso 2017-02-14 07:52:03 UTC
(In reply to Victor Toso from comment #11)
> (In reply to Juan A. Suarez Romero from comment #8)
> > ::: doc/man/meson.build
> > @@ +10,3 @@
> > +    'grl-inspect-0.3.1',
> > +    'grl-launch-0.3.1',
> > +]
> > 
> > Uhm... That would return 'grilo-test-ui-0.3', not 'grilo-test-ui-0.3.1'. So
> > we would need also to rename the manpages. And fix also the Makefile.am
> > 
> > Is it fine for you?
> 
> I think it would make sense to not have to bump the meson.build every
> release so I was fine with an extra variable; But I don't think it is bad
> idea to bound the manual to major and minor values only too.

This is also an improvement that we can do later on, if needed.
Comment 13 Juan A. Suarez Romero 2017-02-14 09:07:10 UTC
Created attachment 345706 [details] [review]
build: add Meson build support
Comment 14 Victor Toso 2017-02-14 09:46:40 UTC
Review of attachment 345706 [details] [review]:

Other than that, looks great!

::: tools/grilo-test-ui/meson.build
@@ +17,3 @@
+        'flickr-oauth.c',
+        'flickr-oauth.h',
+    ]

I think you also need to cdata.set('HAVE_OAUTH', true) otherwise it will be ignored due #ifdefs
Comment 15 Juan A. Suarez Romero 2017-02-14 09:56:04 UTC
Created attachment 345710 [details] [review]
build: add Meson build support
Comment 16 Juan A. Suarez Romero 2017-02-14 10:13:23 UTC
Created attachment 345714 [details] [review]
build: add Meson build support
Comment 17 Juan A. Suarez Romero 2017-02-14 10:17:57 UTC
Created attachment 345715 [details] [review]
build: add Meson build support
Comment 18 Juan A. Suarez Romero 2017-02-14 10:22:48 UTC
Created attachment 345716 [details] [review]
build: add Meson build support
Comment 19 Juan A. Suarez Romero 2017-02-14 10:29:36 UTC
Attachment 345716 [details] pushed as 4538c07 - build: add Meson build support