GNOME Bugzilla – Bug 616729
Vala Bindings
Last modified: 2010-04-25 18:14:18 UTC
Created attachment 159482 [details] [review] vala bindings patch Champlain and Ethos officially ship Vala bindings. I would like to create vala plugins whithout the need of addtional vapi files. The attached patch adds the installation of emerillon's vala binding (disabled by default). The autogenerated file 'emerillon.vapi' was copied from Tomaž's emerillon-plugins git clone. http://gitorious.org/~quikee/emerillion/quikees-emerillon-plugins/
Couldn't the .vapi file be autogenerated at buildtime? Or are soem custom changes included in it?
Created attachment 159512 [details] [review] additional patch to generate the vapi file The vapi files was generated with vala's introspection tools. In theory, you can generate vala bindings from introspection data at buildtime, but this process does not seem to work reliably at the moment. I don't know of any project that uses it. It still needs more love :-) But I agree that the file should be regeneratable. emerillon.vapi includes customisations. Mostly hiding private symbols. The attached second patch (applies on top of the first one) adds all config files that are needed and a script (one line) to regenerate the vapi file. All customisations are defined in emerillon/emerillon.metadata. Docu: http://live.gnome.org/Vala/Bindings
Thank you for the patches! Pushed to master. I've changed the configure check to detect vala at buildtime instead of hardcoding yes or no. Hope you don't mind :)
I don't mind. :-) Thanks.
Created attachment 159520 [details] [review] patch Hm, I think your new check is not correct. libvala is only used by vala developers and not a dependancy of any vala application (only the compiler). Hardly anybody installs it. What about checking for the Vala compiler? -> patch
Hmm, if we require the compiler we require also libvala (as it is it's dependency). The pkgconfig file for libvala provides us with the path to vala-gen-introspect. Maybe we should check for both?
libvala is only needed to create compiler and tools that work with or generate vala code. The only packages that depend on it on my system are valac and vala-tools. I created several Vala applications and plugins and I never installed libvala-dev on my system. i.e. Emerillon will not depend on libvala. Vala adds no additional runtime requirements to an applications. Is calls just the unmodified C libraries. The vapi files are only used at compile time. A vala developer (on Debian) only needs to install 'valac' and no additional packages. The package valac also provides the vapi files for most of the GNOME stack. A user that runs a compiled Vala application (or plugin) will not need any additional dependencies (no vala or vapi files). It behaves as it was written in C. That's the beauty of Vala :-)
Pushed as f80d42ba0c97d1c7babb76f6f55c7328d8dc1f7b