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 635287 - Specify packages when generating GIR
Specify packages when generating GIR
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.23.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 639436 (view as bug list)
Depends on:
Blocks: 622664 623526 635330
 
 
Reported: 2010-11-19 17:40 UTC by Ken VanDine
Modified: 2011-10-18 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Include <package/> tag in generated GIR (1.66 KB, patch)
2010-11-19 18:43 UTC, Ken VanDine
none Details | Review
Include <package/> tag in generated GIR (1.62 KB, patch)
2010-11-19 18:56 UTC, Ken VanDine
none Details | Review
Add exported packages and C include information to GIRs (2.42 KB, patch)
2010-11-20 06:13 UTC, Evan Nemerson
none Details | Review
add package and C include information to the gir file (needed by vala) (3.09 KB, patch)
2010-12-04 10:43 UTC, Abderrahim Kitouni
reviewed Details | Review
patch against the 2-24 branch (3.14 KB, patch)
2011-10-18 20:26 UTC, Ken VanDine
none Details | Review

Description Ken VanDine 2010-11-19 17:40:53 UTC
GIR supports a <package/> tag which is used to map GIR name to pkg-config name.

Until vala finishes transitioning completely to GIR, it can't map the GIR name to the pkg name for solving dependencies.
Comment 1 Ken VanDine 2010-11-19 18:43:16 UTC
Created attachment 174879 [details] [review]
Include <package/> tag in generated GIR

Specify pkg-config name when generating GIR files, used for mapping GIR
name to pkg-config names
Comment 2 Ken VanDine 2010-11-19 18:49:21 UTC
Comment on attachment 174879 [details] [review]
Include <package/> tag in generated GIR

This patch is against the 2.24 branch
Comment 3 Ken VanDine 2010-11-19 18:56:25 UTC
Created attachment 174880 [details] [review]
Include <package/> tag in generated GIR

Specify pkg-config name when generating GIR files, used for mapping GIR
name to pkg-config names
Comment 4 Ken VanDine 2010-11-19 18:56:51 UTC
Comment on attachment 174880 [details] [review]
Include <package/> tag in generated GIR

This patch is against master
Comment 5 Evan Nemerson 2010-11-20 06:13:11 UTC
Created attachment 174900 [details] [review]
Add exported packages and C include information to GIRs

Ken's patch is, I think, not quite right (though close). This patch will use EXPORT_PACKAGES instead of PACKAGES (pass --pkg-export instead of --pkg passed to g-ir-scanner).

This patch will will also set the C include file... I know it wasn't part of the original bug report, but I believe Ken's motivation was to get Gtk-3.0.gir working with Vala, and setting the C include is important for Vala.
Comment 6 Abderrahim Kitouni 2010-12-03 23:26:40 UTC
Review of attachment 174900 [details] [review]:

I also have a patch for this :-)
(I beleive it does the right thing regarding including gdk but I'm not using EXPORT_PACKAGES like Evan's patch, I'll fix this and attach it)

::: gtk/Makefile.am
@@ +907,2 @@
 Gtk-3.0.gir: $(INTROSPECTION_SCANNER) $(gtktargetlib) $(top_builddir)/gdk/Gdk-3.0.gir Makefile
+Gtk_3_0_gir_SCANNERFLAGS = --warn-all --add-include-path=$(top_builddir)/gdk --c-include="gtk/gtk.h"

This won't work if you don't have gtk already installed. The correct thing to do is to use --include-uninstalled
Comment 7 Abderrahim Kitouni 2010-12-04 10:43:47 UTC
Created attachment 175829 [details] [review]
add package and C include information to the gir file (needed by vala)

I've tried to clean things a bit, (e.g. using --identifier-prefix 
instead of the deprecated --strip-prefix etc.) I hope I haven't 
overlooked anything.
Comment 8 Bastien Nocera 2011-01-13 16:38:06 UTC
*** Bug 639436 has been marked as a duplicate of this bug. ***
Comment 9 Colin Walters 2011-01-13 16:44:18 UTC
Review of attachment 175829 [details] [review]:

There's more things mixed in this patch; can you separate these out?

* Use --warn-all 
  Seems OK to me
* Drop --add-include-path=../gdk
  why??
* Use --include-uninstalled
  Looks right
Comment 10 Iain Lane 2011-07-18 09:17:46 UTC
This was applied to master as e62b68fe62ce2f0b67ae2ed5a510895156f38c66. Can attachment 174879 [details] [review] from comment #2 be applied to gtk-2-24 too?
Comment 11 Michael Biebl 2011-10-18 06:26:06 UTC
(In reply to comment #10)
> This was applied to master as e62b68fe62ce2f0b67ae2ed5a510895156f38c66. Can
> attachment 174879 [details] [review] from comment #2 be applied to gtk-2-24 too?

Any comments why this commit can't be applied to the gtk-2-24 branch?
Comment 12 Ken VanDine 2011-10-18 20:26:53 UTC
Created attachment 199364 [details] [review]
patch against the 2-24 branch

This is the latest version of the patch we have in ubuntu for the 2-24 branch, anyone opposed to merging this?