[cairo] Splitting the cairo backends up so they can be in separate packages?

Stuart Axon stuaxo2 at yahoo.com
Mon Dec 9 19:56:22 UTC 2019


I'll see if I can build one libcairo under a different name with one backend, then go from there :)
I've got some ideas of varying sanity for how libcairo.so might work, maintaining backwards compatibility, but have to see if I get far enough along to test them first.

S++ 

    On Saturday, December 7, 2019, 8:07:06 AM GMT, Uli Schlachter <psychon at znc.in> wrote:  
 
 Hi,

On 06.12.19 18:13, Stuart Axon wrote:
[...]>  I was wondering how hard it would be to split up cairo by
backend, would it be feasible to build it so there instead of
libcairo.so, there is libcairo-${backend}.so, e.g.
> libcairo-image.so
> libcairo-xcb.solibcairo-pdf.so
> etc..?

something like this was already proposed before, but I do not remember
the details. The proposal "back then" was to have one libcairo.so
containing "cairo core" and the backends in extra files. The problem
with this idea is the interface between libcairo.so and the backends: It
would need to be public. And thus, it would need to be (semi-)stable.

This idea basically turns all of cairo's internals into public ABI (and
perhaps even public API, but that is avoidable).


Alternatively, you could compile cairo with just the image backend and
call this one libcairo-image.so etc. This would mean that the different
cairo backends are not interoperable, I think.

> Any idea what I would need to change to make it build like this ?

If you want to go down that route, you would have to change the build
system to note give all symbols hidden visibility by default and make
the "slim_hidden_def" not do whatever it does. Afterwards, I think you
could just split the source into multiple .so files as you prefer.

Cheers,
Uli
-- 
- He wants the impossible...!
- That's the short definition of 'captain'.
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20191209/1e9157b5/attachment.html>


More information about the cairo mailing list