GNOME Bugzilla – Bug 635287
Specify packages when generating GIR
Last modified: 2011-10-18 20:26: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.
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 on attachment 174879 [details] [review] Include <package/> tag in generated GIR This patch is against the 2.24 branch
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 on attachment 174880 [details] [review] Include <package/> tag in generated GIR This patch is against master
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.
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
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.
*** Bug 639436 has been marked as a duplicate of this bug. ***
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
This was applied to master as e62b68fe62ce2f0b67ae2ed5a510895156f38c66. Can attachment 174879 [details] [review] from comment #2 be applied to gtk-2-24 too?
(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?
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?