GNOME Bugzilla – Bug 711030
Add introspection to cerbero builds to enable bindings to Python and other languages
Last modified: 2018-11-03 10:17:13 UTC
gstreamer-devel discussion thread: http://gstreamer-devel.966125.n4.nabble.com/gobject-introspection-in-cerbero-tt4662888.html
I have this working for me in my sandbox and hope to offer patches under this bug. Andoni has suggested working this into a 'variant' in cerbero.
Note also that this should only be activated for the non-crosscompile variants. g-i doesn't (sadly) support cross-compilation yet.
Created attachment 267170 [details] [review] [PATCH 1/4] cerbero: add a variant called 'gi' for enabling
Created attachment 267171 [details] [review] [PATCH 2/4] gobject-introspection: add recipe
Created attachment 267172 [details] [review] [PATCH 3/4] cerbero: add typelib category to FilesProvider
Created attachment 267173 [details] [review] [PATCH 4/4] recipes: add support for gobject-introspection
I got pulled away for a while, but I'm back to this now. Here's what I have in a nutshell: 1) Implemented a variant called 'gi'. I am working in Precise, but I intend for the additions to be benign/no-op for any system that doesn't enable the gi variant. 2) Added a recipe for building gobject-introspection itself. 3) Added support for a new file type called 'typelib' to FilesProvider. 4) Updated various recipes to insert either '--disable-introspection' or '--enable-introspection' into the configure options depending on whether gi is enabled, and added entries to recipes for typelib files so that they can be available for packages. I don't have typelibs propagated out to all the relevant packages yet, but gi works within a cerbero shell (verified with Python). I add the line 'variants.gi = True' to my cerbero/config/linux.config to enable it all. Feedback appreciated.
I have rebased your commits on top of master and changed a few things to handle gi in a more generic way: * Add --{enable|disable}-introspection automatically for Autotools projects if gi is enabled. * List typelibs unconditionally in recipes and list files in the typelib category handler depending in the variant. * Add dep in gobject-introspection automatically based on the existance of the typelib category in the recipe. I think that makes the final result much cleaner and easier to maintain. Everything is in https://github.com/ylatuya/cerbero/commits/gi pending to do a rebuild from scratch to check that everything looks good :)
Thanks Andoni, I've looked over your improvements in github, all good ideas.
Pygobject recipe of cerbero is at version 2.28 This version is too old to compile against gobject-introspection 1.39 i.e. pygi-info.c:165:14: error: use of undeclared identifier 'GI_INFO_TYPE_ERROR_DOMAIN' case GI_INFO_TYPE_ERROR_DOMAIN:
Andoni, Mark, shall we push this to master ?
(In reply to comment #11) Edward, this has been improved in Andoni's github repo since I put up the attached patches. I will contact Andoni to see what the plan might be for getting it in shape to push and how I might help.
I need to fix gir support for OS X universal before merging, which is straightforward but I didn't not have time to do it yet
The lasts commits in the 'gi' branch should add support for universal builds. I would be great if someone else could validate it before merging.
(In reply to comment #14) FWIW I can build from your github gi branch in Precise and use gi in python to access GObject, Gst, GstVideo. This requires a few tweaks (an updated yasm, commenting-out dvb and pulse elements) which are pretty typical in my recent experience building cerbero master on Precise. So, sanity checks OK for me. I don't have access to a Mac for verifying universal builds.
Andoni, ok if I squash some commits from your branch regarding the various recipe addition (instead of having add this, then update this again, then update this again really), and update some recipes to their latest version? * gobject-introspection => 1.40.0 * pygobject => 3.12.1
Sure, go ahead, it's better if can have all the recipes changes in a single commit
Rebased/Squashed/Tested and pushed everything Thanks :)
Re-opening since the "universal" support is actually causing quite a few issues and essentially doesn't work.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/cerbero/issues/1.