Improve poppler checks in configure.ac

Bug #1419263 reported by Alex Valavanis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Alex Valavanis
Inkscape Devlibs
Fix Released
Wishlist
jazzynico

Bug Description

TL;DR: I'd like to bump our Poppler dependency to > 18.4 and tidy up a lot of code. I'll go ahead in the next couple of days, if no objections.

We currently have over 100 lines in configure.ac dedicated just to checking for libpoppler. This creates a maintenance burden, and results in fairly messy conditional builds.

The first problem is that we don't check for the libpoppler private headers (We shouldn't be using these, but that's a separate issue!). This means that the configure script will happily let the user build Inkscape even though failure is inevitable. Instead, the script should output an error message and exit.

Second, we have a lot of output #define variable. Some of these can probably go away:

* HAVE_POPPLER: Use libpoppler for direct PDF import
* HAVE_POPPLER_CAIRO: Use libpoppler-cairo for rendering PDF preview
* HAVE_POPPLER_GLIB: Use libpoppler-glib and Cairo-SVG for PDF import
* [DONE] POPPLER_NEW_GFXFONT: Use GfxFont from Poppler >= 0.8.3
* POPPLER_NEW_ERRORAPI: Use new error API from Poppler >= 0.20.0
* [DONE] POPPLER_NEW_COLOR_SPACE_API: Use color space API from Poppler >= 0.12.2
* POPPLER_EVEN_NEWER_COLOR_SPACE_API: Use even newer color space API from Poppler >= 0.26.0
* POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API: Use even newer new color space API from Poppler >= 0.29.0
* [DONE] POPPLER_NEW_GFXPATCH: GfxPatch no longer uses GfxColor in >= 0.15.1

Our Tracking Dependencies page [1] shows that even the oldest of our supported build environments can cope without some of these (Devlibs = poppler-0.12.1, Debian Wheezy = poppler-0.18.4).

Can I suggest the following:

1. Add a check for the necessary Poppler private headers
2. Bump our dependency level to Poppler >= 0.8.3 [done: lp:inkscape r13917]
3. Get rid of the POPPLER_NEW_GFXFONT test [done: lp:inkscape r13917]
4. Upgrade Devlibs Poppler version to something >= 0.18.4 [done: lp:inkscape-devlibs r56, lp:inkscape r14566, lp:inkscape/0.91.x r13853]
5. Bump our dependency level to Poppler >= 0.18.4
6. Kill the POPPLER_NEW_COLOR_SPACE_API and and POPPLER_NEW_GFXPATCH tests

[1] http://wiki.inkscape.org/wiki/index.php/Tracking_Dependencies

Tags: build pdf
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Setting to "medium". Would be "wishlist", but I think the build failures with missing private headers qualify this as a bug.

tags: added: build pdf
Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Alex Valavanis (valavanisalex)
Changed in inkscape-devlibs:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Poppler dependency >= 0.8.3 in lp:inkscape r13917

description: updated
Revision history for this message
jazzynico (jazzynico) wrote :

Tests in progress with Poppler 0.39.0 and Inkscape trunk rev. 14562.

Changed in inkscape-devlibs:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

First tests successful. Inkscape correctly compiles with Poppler 0.39.0, and importing simple PDF files works as expected.
More tests planned today (with more complex files) and tomorrow (on a different computer).

Note that I had to set both POPPLER_EVEN_NEWER_COLOR_SPACE_API and POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API due to errors in pdf-parser.cpp when using the newer_new version only. Not a very big issue, but it would be cleaner if we could fix it in the code directly.

Revision history for this message
jazzynico (jazzynico) wrote :

Poppler updated (with poppler-0.39.0 and poppler-data-0.4.7) in the devlibs, rev. 56.
Inkscape also updated (changes in builld.xml) in the trunk (rev. 14566) and 0.91.x branch (rev. 13853).

Changed in inkscape-devlibs:
status: In Progress → Fix Released
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Dependency bumped to 0.20.0 and variables tidied in lp:inkscape r14573

Changed in inkscape:
status: Triaged → Fix Committed
milestone: none → 0.92
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.