I've recently started to create a Cairo wrapper extension.
The final goal of this extension is to provide an almost 1:1 API mapping between the Cairo C library and the PHP extension so that it becomes possible to do Cairo prototyping using PHP with an option to port code to C later with only minimal modifications.
I've made pretty good progress so far already but i've also spotted some areas where pecl-gen is still missing some usefull features.
Two things i've already added to CodeGen_PECL 1.0.1 are
- pkg-config support in generated config.m4 files
- support for conditional compilation of extension functions
and there is more to come like e.g conditional constant definitions.
You can watch my progress on the Cairo Wrapper Extension projects site.