Passing:
--library=clutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@
to g-ir-scanner, when building Cogl was causing g-ir-scanner to
link the introspection program against the installed clutter library,
if it existed or fail otherwise. Instead copy the handling from
the json/ directory where we link against the convenience library
to scan, and do the generation of the typelib later in the
main clutter/directory.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1594
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
When building Clutter with introspection enabled everything stops
at Cogl GIR generation because it depends on the installed library
to work. Since we still require some changes in the API to be able
to build the GIR and the typelib for Cogl we should disable the
generation of the GIR as well.
Currently, the introspection data for Cogl is built right into
Clutter's own typelib. This makes functions like:
cogl_path_round_rectangle()
Appear as:
Clutter.cogl_path_round_rectangle()
It should be possible, instead, to have a Cogl namespace and:
Cogl.path_round_rectangle()
This means building introspection data for Cogl alone. Unfortunately,
there are three types defined in Cogl that confuse the introspection
scanner, and make it impossible to build a typelib:
COGLint
COGLuint
COGLenum
These three types should go away before 1.0, substituted by int,
unsigned int and proper enumeration types. For this reason, we can
just set up the GIR build and wait until the last moment to create
the typelib. Once that has been done, we will be able to safely
remove the Cogl API from the Clutter GIR and typelib and let
people import Cogl if they want to use the Cogl API via introspection.
COGL should ship its own pkg-config file, obviously still pointing
to Clutter's compiler flags and linking options, for COGL-specific
variables that might be queried at configure time.
For instance, it's easier (and less verbose) to do:
PKG_CHECK_EXISTS([cogl-gl-1.0],
[has_gl_backend=yes],
[has_gl_backend=no])
Than doing:
AC_MSG_CHECKING([for GL support in COGL])
cogl_backend=`$PKG_CONFIG --variable=cogl clutter-0.9`
if test x$cogl_backend = xgl; then
has_gl_backend=yes
AC_MSG_RESULT([found])
else
has_gl_backend=no
AC_MSG_RESULT([not found])
fi
The main COGL header file is generated at configure time. If something
changes in the template, though, the file will not be regenerated.
Adding cogl.h to the BUILT_SOURCES list will allow the regeneration to
happen.
* clutter/cogl/Makefile.am (EXTRA_DIST): Distribute cogl.h.in
instead of cogl.h
(DIST_SUBDIRS): Added common folder
* clutter/cogl/gl/Makefile.am (libclutter_cogl_la_SOURCES): Remove
cogl-defines.h and use the right location for cogl-defines.gl.h
(EXTRA_DIST): Distribute cogl-defines.h.in
* clutter/cogl/gles/Makefile.am (libclutter_cogl_la_SOURCES):
Remove cogl-defines.h and use the right location for
cogl-defines.gles.h
(EXTRA_DIST): Distribute cogl-defines.h.in
* clutter/Makefile.am (DIST_SUBDIRS): Add fruity
* clutter/cogl/Makefile.am:
* clutter/cogl/gl/Makefile.am:
* clutter/cogl/gles/Makefile.am:
* clutter/json/Makefile.am:
* clutter/pango/Makefile.am: Fix the visibility of all the
symbols, for the main library and the statically linked ones.
* clutter/cogl/Makefile.am:
* clutter/cogl/cogl.h:
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl.c:
Begin poplulating cogl GLES code.
* configure.ac:
* clutter/egl/clutter-event-egl.c:
* clutter/egl/clutter-stage-egl.c:
* clutter/egl/clutter-stage-egl.h:
* clutter/egl/clutter-backend-egl.c:
* clutter/egl/clutter-backend-egl.h:
* clutter/egl/clutter-egl.h:
Add initial EGL/X backend work mostly ported from backend branch.
Builds but untested as yet.
* clutter/glx/clutter-stage-glx.c:
Only include XFixes Header if we have have it.
* clutter/clutter-behaviour.c: (clutter_behaviour_apply):
* clutter/clutter-behaviour.h:
Add clutter_behaviour_is_applied()