Embedded libraries

From Inkscape Wiki
Revision as of 21:00, 28 April 2015 by Valavanisalex (talk | contribs) (Added page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Inkscape currently contains embedded code from a number of libraries. This is non-ideal since it introduces a maintenance burden, it makes it harder for us to obtain patches and security fixes from the library developers and can introduce forward-compatibility problems. This page tracks the status of these libraries and our plans for future development. Ultimately, many of these libraries should be removed from the Inkscape codebase.

cxxtest

This library is used to provide unit testing. There's a patch for building against an external copy, but it introduces a few compiler warnings and there's no OSX port of cxxtest available yet [1].

In fact, there's no point in doing this, since we're ultimately going to replace this with the Google or Boost Test framework.

To do:

  • Replace with Google Test
  • Delete cxxtest

2geom

This is maintained by Inkscape developers, and is not yet a stable API. Ultimately, it would be nice to stabilise this and release it as a separate library. In the meantime, we're tracking the possibility of building against an external copy here [2]. This will be useful for testing bleeding-edge 2geom changes.

To do:

  • Add a build flag to Inkscape to enable use of an (unstable) external version of 2geom
  • Stabilise the 2geom API
  • Release packages of 2geom
  • Delete our internal copy of 2geom and use stable external library

Adaptagrams

The Adaptagrams project [3] is used for connectors in Inkscape. It includes three libraries (libavoid/libcola/libvpsc). We haven't introduced any changes to the code, so we should be able to safely use an external set of libraries. Unfortunately, the upstream developers haven't released a stable package yet.

To do:

  • Move our copies of libavoid/libcola and libvpsc to an 'adaptagrams' folder and document the upstream location and license correctly
  • Update our copy of Adaptagrams to the latest upstream version
  • Contact upstream developers to ask for a stable package to be made
  • Add a build flag to enable use of stable external Adaptagrams libraries
  • Delete our embedded copies of the libraries

libcroco

This GNOME library is used for CSS parsing. A request to use an external library is being tracked here [4]. A couple of patches have been submitted to the upstream developers. Once these have been accepted, we can remove our copy of libcroco.

To do:

  • Merge changes from upstream libcroco [Done]
  • Contact upstream developers to encourage quick adoption of our patches
  • Investigate alternative CSS libraries (libcss etc) and update our code if we follow this route
  • Add a build flag to enable use of stable external library (whichever one we finally choose!)
  • Delete our embedded copy of libcroco

libdepixilize

This was a contribution from a GSOC student, which is currently maintained within Inkscape itself.

To do:

  • Add a build flag to Inkscape to enable use of an (unstable) external version of library
  • Stabilise the API
  • Release stable package of library
  • Delete our internal copy of library and use stable external version

libgdl

This GNOME library is used for dockable dialogs. We already build against the external library when using the experimental gtk+ 3 builds. All the important patches have been accepted upstream. We'll delete our internal copy when we finally switch to gtk+ 3 builds. See bug #792115 [5].

To do:

  • Complete Gtk+ 3 migration and disable Gtk+ 2 builds permanently
  • Delete our internal copy of the library

libuemf

This is an EMF file handling library, which is maintained by Inkscape developers [7]. This could ultimately be split out into a separate library.

To do:

  • Add a build flag to Inkscape to enable use of an (unstable) external version of library
  • Stabilise the API
  • Release stable package of library
  • Delete our internal copy of library and use stable external version

livarot

This is a geometry library [8], which is being replaced by our 2geom library and will ultimately be removed

To do:

  • Migrate all remaining Inkscape functionality to use 2geom as documented at the Killing Livarot page
  • Delete our copy of Livarot

potrace

This library is used for tracing functionality. It is fairly widely available in Linux distributions and no changes have been made within our embedded copy. Progress is tracked at [6]

To do:

  • Link to an external version of the library and test
  • Delete our internal copy

GIMP Widgets

We currently use a few widgets from the GIMP widget set. These are available as part of the libgimpwidgets development library, which is available in distros. Unfortunately, GIMP libraries are designed to only work with Gtk+ 2 but will ultimately switch over to Gtk+ 3. As such, we need to maintain our own copy until both GIMP and Inkscape have switched over to Gtk+ 3.

To do:

  • Move all of the stuff we adopted from GIMP to a separate folder
  • Update to the latest upstream version
  • Forward all remaining changes to the upstream GIMP project
  • Await the release of a Gtk+ 3 version of GIMP
  • Await the final switch over of Inkscape to Gtk+ 3
  • Build against external widgets
  • Delete our embedded copies

References

[1] https://bugs.launchpad.net/inkscape/+bug/1094771
[2] https://bugs.launchpad.net/inkscape/+bug/1155947
[3] http://www.adaptagrams.org/
[4] https://bugs.launchpad.net/inkscape/+bug/648246
[5] https://bugs.launchpad.net/inkscape/+bug/792115
[6] https://bugs.launchpad.net/inkscape/+bug/1156664
[7] http://sourceforge.net/projects/libuemf/
[8] http://sourceforge.net/projects/livarot/