Bug 79592 - Add GIR support
Summary: Add GIR support
Status: NEW
Alias: None
Product: Wocky
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/ca...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2014-06-03 14:37 UTC by Guillaume Desmottes
Modified: 2014-06-06 11:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2014-06-03 14:37:43 UTC
In order to try using Tartan with Gabble I quickly added GIR support to Wocky. There are plenty of warnings to fix but that's a start.

http://cgit.collabora.com/git/user/cassidy/wocky/log/?h=gir
Comment 1 Simon McVittie 2014-06-03 14:45:18 UTC
+dist_gir_DATA = Wocky-1.gir

Why is this distributed in tarballs? (If there's no good reason, don't.)

+CLEANFILES += \
+ $(dist_gir_DATA) \

Please don't delete distributed files in "make clean".

> introspect all files

Can we use some variables rather than duplicating the file list?

Telepathy officially requires GNU make, so $(patsubst %,$(srcdir)/%,$(some_SOURCES)) is OK.
Comment 2 Simon McVittie 2014-06-03 14:46:05 UTC
Looks good other than that.
Comment 3 Guillaume Desmottes 2014-06-03 14:51:22 UTC
(In reply to comment #1)
> +dist_gir_DATA = Wocky-1.gir
> 
> Why is this distributed in tarballs? (If there's no good reason, don't.)

> +CLEANFILES += \
> + $(dist_gir_DATA) \
> 
> Please don't delete distributed files in "make clean".

I just cargo-culted introspection.am from tp-glib. Tartan needs the gir files to be installed but I guess we could not distribute it for now and tweak GI_TYPELIB_PATH manually.

> > introspect all files
> 
> Can we use some variables rather than duplicating the file list?
> 
> Telepathy officially requires GNU make, so $(patsubst
> %,$(srcdir)/%,$(some_SOURCES)) is OK.

I considered using "Wocky_1_gir_FILES = $(libwocky_la_SOURCES)" which worked but that included -internal and -protected headers, which may be ok for now tbh.
Comment 4 Simon McVittie 2014-06-03 15:07:59 UTC
(In reply to comment #3)
> I considered using "Wocky_1_gir_FILES = $(libwocky_la_SOURCES)" which worked
> but that included -internal and -protected headers, which may be ok for now
> tbh.

You can use #ifndef __GI_SCANNER__ to hide those, if you need to.

gtk-doc's /*<private_header>*/ rune might also work.
Comment 5 Guillaume Desmottes 2014-06-06 11:53:48 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I considered using "Wocky_1_gir_FILES = $(libwocky_la_SOURCES)" which worked
> > but that included -internal and -protected headers, which may be ok for now
> > tbh.
> 
> You can use #ifndef __GI_SCANNER__ to hide those, if you need to.
> 
> gtk-doc's /*<private_header>*/ rune might also work.

Ah good idea! I've done that.

What's your opinion regarding distributing the gir file or not?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.