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 785033 - Port to meson build system
Port to meson build system
Status: RESOLVED FIXED
Product: geocode-glib
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: geocode-glib maintainer(s)
geocode-glib maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-07-17 17:09 UTC by Zeeshan Ali
Modified: 2017-07-18 15:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add meson build support (19.62 KB, patch)
2017-07-17 17:09 UTC, Zeeshan Ali
none Details | Review
Drop autotools support (17.55 KB, patch)
2017-07-17 17:09 UTC, Zeeshan Ali
none Details | Review
Add meson build support (19.52 KB, patch)
2017-07-17 19:36 UTC, Zeeshan Ali
none Details | Review
Drop autotools support (17.55 KB, patch)
2017-07-17 19:36 UTC, Zeeshan Ali
none Details | Review
Add meson build support (19.46 KB, patch)
2017-07-18 11:17 UTC, Zeeshan Ali
none Details | Review
Drop autotools support (17.55 KB, patch)
2017-07-18 11:17 UTC, Zeeshan Ali
none Details | Review
Add meson build support (19.31 KB, patch)
2017-07-18 12:34 UTC, Zeeshan Ali
none Details | Review
Drop autotools support (17.55 KB, patch)
2017-07-18 12:34 UTC, Zeeshan Ali
none Details | Review
Add meson build support (19.31 KB, patch)
2017-07-18 14:42 UTC, Zeeshan Ali
committed Details | Review
Drop autotools support (17.55 KB, patch)
2017-07-18 14:42 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2017-07-17 17:09:31 UTC
Let's join the party, shall we?
Comment 1 Zeeshan Ali 2017-07-17 17:09:36 UTC
Created attachment 355771 [details] [review]
Add meson build support

While this patch adds support to build geocode-glib with meson build
system, it doesn't remove the autotools support.
Comment 2 Zeeshan Ali 2017-07-17 17:09:42 UTC
Created attachment 355772 [details] [review]
Drop autotools support

We can now build geocode-glib with meson.
Comment 3 Bastien Nocera 2017-07-17 17:20:26 UTC
Review of attachment 355771 [details] [review]:

I've not tested the build. Comparing the installed files for both methods would also be good to do.

::: geocode-glib/geocode-glib.c
@@ +28,3 @@
 #include <langinfo.h>
 #include <geocode-glib/geocode-glib-private.h>
+#include <config.h>

If it needed to be included here, it would need to be near as the first include.

Why is it needed here?

::: meson.build
@@ +17,3 @@
+conf.set_quoted('PACKAGE_TARNAME', 'geocode-glib')
+conf.set_quoted('PACKAGE_STRING', 'geocode-glib ' + gclib_version)
+conf.set_quoted('PACKAGE_URL', 'https://wiki.gnome.org/Apps/Boxes')

Nope.

::: meson_options.txt
@@ +3,3 @@
+       description: 'Build & install test programs')
+option('disable-introspection',
+        type: 'boolean', value: false,

This should probably be a tristate, true/false/auto, with auto the default.

@@ +6,3 @@
+        description: 'Whether to disable the introspection generation')
+option('enable-gtk-doc',
+       type: 'boolean', value: false,

I'd rather this was true by default.
Comment 4 Zeeshan Ali 2017-07-17 19:33:30 UTC
Review of attachment 355771 [details] [review]:

::: geocode-glib/geocode-glib.c
@@ +28,3 @@
 #include <langinfo.h>
 #include <geocode-glib/geocode-glib-private.h>
+#include <config.h>

Because we no longer define PACKAGE_VERSION from CFLAGS. I think this is better way than doing that but if you disagree, I can go that way.

::: meson_options.txt
@@ +3,3 @@
+       description: 'Build & install test programs')
+option('disable-introspection',
+        type: 'boolean', value: false,

Don't see much point in that. If you don't disable gir through this option, it's the same as auto: meson only enables gir build if g-ir-scanner is available. I copied this from json-glib since i thought it makes more sense but again, if you still disagree, I'll change it.
Comment 5 Zeeshan Ali 2017-07-17 19:36:48 UTC
Created attachment 355777 [details] [review]
Add meson build support

While this patch adds support to build geocode-glib with meson build
system, it doesn't remove the autotools support.
Comment 6 Zeeshan Ali 2017-07-17 19:36:56 UTC
Created attachment 355778 [details] [review]
Drop autotools support

We can now build geocode-glib with meson.
Comment 7 Bastien Nocera 2017-07-17 21:51:57 UTC
(In reply to Zeeshan Ali (Khattak) from comment #4)
> Review of attachment 355771 [details] [review] [review]:
> 
> ::: geocode-glib/geocode-glib.c
> @@ +28,3 @@
>  #include <langinfo.h>
>  #include <geocode-glib/geocode-glib-private.h>
> +#include <config.h>
> 
> Because we no longer define PACKAGE_VERSION from CFLAGS. I think this is
> better way than doing that but if you disagree, I can go that way.

Right, then this needs to be at the top of the includes, before any system includes as:
#include "config.h"

> ::: meson_options.txt
> @@ +3,3 @@
> +       description: 'Build & install test programs')
> +option('disable-introspection',
> +        type: 'boolean', value: false,
> 
> Don't see much point in that. If you don't disable gir through this option,
> it's the same as auto: meson only enables gir build if g-ir-scanner is
> available.

Ha, double negative.

> I copied this from json-glib since i thought it makes more sense
> but again, if you still disagree, I'll change it.
Comment 8 Zeeshan Ali 2017-07-18 10:30:36 UTC
(In reply to Bastien Nocera from comment #7)
> (In reply to Zeeshan Ali (Khattak) from comment #4)
> > Review of attachment 355771 [details] [review] [review] [review]:
> > 
> > ::: meson_options.txt
> > @@ +3,3 @@
> > +       description: 'Build & install test programs')
> > +option('disable-introspection',
> > +        type: 'boolean', value: false,
> > 
> > Don't see much point in that. If you don't disable gir through this option,
> > it's the same as auto: meson only enables gir build if g-ir-scanner is
> > available.
> 
> Ha, double negative.

i-e you want me to change it?
Comment 9 Zeeshan Ali 2017-07-18 11:17:32 UTC
Created attachment 355815 [details] [review]
Add meson build support

While this patch adds support to build geocode-glib with meson build
system, it doesn't remove the autotools support.
Comment 10 Zeeshan Ali 2017-07-18 11:17:40 UTC
Created attachment 355816 [details] [review]
Drop autotools support

We can now build geocode-glib with meson.
Comment 11 Bastien Nocera 2017-07-18 11:50:46 UTC
(In reply to Zeeshan Ali (Khattak) from comment #8)
> (In reply to Bastien Nocera from comment #7)
> > (In reply to Zeeshan Ali (Khattak) from comment #4)
> > > Review of attachment 355771 [details] [review] [review] [review] [review]:
> > > 
> > > ::: meson_options.txt
> > > @@ +3,3 @@
> > > +       description: 'Build & install test programs')
> > > +option('disable-introspection',
> > > +        type: 'boolean', value: false,
> > > 
> > > Don't see much point in that. If you don't disable gir through this option,
> > > it's the same as auto: meson only enables gir build if g-ir-scanner is
> > > available.
> > 
> > Ha, double negative.
> 
> i-e you want me to change it?

No, enabled by default, but optional if absent is fine by me.
Comment 12 Zeeshan Ali 2017-07-18 12:34:47 UTC
Created attachment 355822 [details] [review]
Add meson build support

While this patch adds support to build geocode-glib with meson build
system, it doesn't remove the autotools support.
Comment 13 Zeeshan Ali 2017-07-18 12:34:57 UTC
Created attachment 355823 [details] [review]
Drop autotools support

We can now build geocode-glib with meson.
Comment 14 Zeeshan Ali 2017-07-18 14:42:52 UTC
Created attachment 355838 [details] [review]
Add meson build support

Fixed version in main meson.build
Comment 15 Zeeshan Ali 2017-07-18 14:42:59 UTC
Created attachment 355839 [details] [review]
Drop autotools support

We can now build geocode-glib with meson.
Comment 16 Zeeshan Ali 2017-07-18 14:46:42 UTC
Attachment 355838 [details] pushed as 2095bdc - Add meson build support
Attachment 355839 [details] pushed as 3c74d75 - Drop autotools support
Comment 17 Hussam Al-Tayeb 2017-07-18 15:12:53 UTC
the meson build is installing /usr/lib/libgeocode-glib.so without /usr/lib/libgeocode-glib.so.0
Is that intentional?
Comment 18 Zeeshan Ali 2017-07-18 15:39:47 UTC
(In reply to Hussam Al-Tayeb from comment #17)
> the meson build is installing /usr/lib/libgeocode-glib.so without
> /usr/lib/libgeocode-glib.so.0
> Is that intentional?

I was missing the soversion in the library() call. I pushed the fix to git master now.