Re: GIR-based vala bindings



Il giorno mer, 16/03/2011 alle 23.26 +0100, Jiří Techet ha scritto:
> thanks a lot for looking into this! I wasn't aware of the possibility
> to generate vala bindings from girs (well, I don't use vala by myself)
> - this will simplify things like making identical overrides separately
> for vala and girs and the annoying renaming of all the vala files
> after every release to have the correct -0.version suffix. Perfect!

I'm glad you like it :D

> > Now I'm stuck on some autoconf/automake issues (because my leak of
> > knowledge about them).
> > In particular, I need that at the moment of GIR files generation,
> > the .pc files in the $top_builddir are the ones that will be installed
> > (champlain-0.10.pc).
> 
> Aren't they? They should be generated when you run ./configure and
> should exist all the time during make. What's the problem?

No, the configure simply substitute the version number in
champlain.pc.in and champlain-gtk.pc.in generating champlain.pc and
champlain-gtk.pc.
The make step copies champlain.pc and champlain-gtk.pc respectively in
champlain-version.pc and champlain-gtk-version.pc.
So when it is generating the GIRs into the make step in champlain and
champlain-gtk subdirectories, the .pc files are still champlain.pc and
champlain-gtk.pc.


> > Another problem is that I can't set the PKG_BUILD_PATH to $top_builddir
> > in champlain-gtk/Makefile.am to make g-ir-scanner find the not yet
> > installed .pc files.
> 
> What happens? Could you post here what you're putting into the
> makefiles to see what you are trying to achieve?

I'm thinking of export PKG_BUILD_PATH=$top_builddir somewhere inside
HAVE_INSTROSPECTION if, because champlain-gtk depends on champlain.

champlain-gtk/Makefile.am:
---
if HAVE_INTROSPECTION

-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=
$(top_builddir)/champlain
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/champlain

introspection_sources =
$(libchamplain_gtk_@CHAMPLAIN_API_VERSION@_la_SOURCES)

GtkChamplain-@CHAMPLAIN_API_VERSION@.gir:
libchamplain-gtk-@CHAMPLAIN_API_VERSION@.la
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_NAMESPACE = GtkChamplain
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_VERSION =
@CHAMPLAIN_API_VERSION@
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_LIBS =
libchamplain-gtk-@CHAMPLAIN_API_VERSION@.la
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_PACKAGES = gobject-2.0 gtk
+-3.0
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_FILES =
$(introspection_sources)
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_INCLUDES = Clutter-1.0
Gtk-3.0 Champlain-@CHAMPLAIN_API_VERSION@
GtkChamplain_@CHAMPLAIN_API_VERSION_NORM@_gir_CFLAGS = \
	$(SOUP_CFLAGS) $(GTK_CFLAGS) $(DEPS_CFLAGS) \
	-I$(top_srcdir) -I$(top_builddir)\
	-DCHAMPLAIN_COMPILATION -DCHAMPLAIN_GTK_COMPILATION

INTROSPECTION_GIRS += GtkChamplain-@CHAMPLAIN_API_VERSION@.gir

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(gir_DATA) $(typelib_DATA)

endif
---

Any ideas?


Cheers
Lorenzo




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]