Bug 225672 - graphics/poppler-glib: Build fails with OPENJPEG disabled
Summary: graphics/poppler-glib: Build fails with OPENJPEG disabled
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome mailing list
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2018-02-04 22:23 UTC by VK
Modified: 2018-12-07 18:22 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
Correct OPENJPEG option's function both for MASTER and SLAVES (796 bytes, patch)
2018-02-04 22:23 UTC, VK
no flags Details | Diff
Correct OPENJPEG option's function both for MASTER and SLAVES (2) (576 bytes, patch)
2018-02-04 22:27 UTC, VK
no flags Details | Diff
Working graphics/poppler/Makefile as of r486467 (723 bytes, patch)
2018-12-07 18:22 UTC, Mike Walker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VK freebsd_triage 2018-02-04 22:23:10 UTC
Created attachment 190326 [details]
Correct OPENJPEG option's function both for MASTER and SLAVES

With OPENJPEG option disabled, build of poppler-glib fails.

The problem seems to be in the graphics/poppler (master) conditional that checks whether it's a SLAVE or MASTER build. The conditional is setting OPTIONS-defined CONFIGURE_ARGS only for MASTER (though the comment for the .else section seems to think it's for SLAVES), so for slaves the missing OPENJPEG option does not set --enable-libopenjpeg to none.

As the default for that is "auto", the build fails at configure stage, looking for libopenjpeg:

> configure: error: Install libopenjpeg2 or libopenjpeg1 before trying to build poppler. You can also decide to use the internal unmaintained JPX decoder or none at all. See --help.

This patch extracts the OPENJPEG conditional outside of master-slave check (thus it applies for both), and now poppler, poppler-utils, poppler-data and poppler-glib build fine, with OPENJPEG disabled.

Please note I don't know if this breaks anything functionally, or even if it's the correct thing to do, or it is but CAIRO and CURL options need to be extracted outside of the master-slave conditional as well.

Build tested with Poudriere 11.1 amd64.
Comment 1 VK freebsd_triage 2018-02-04 22:27:34 UTC
Created attachment 190327 [details]
Correct OPENJPEG option's function both for MASTER and SLAVES (2)

Just realized, the comment for .else was ! (not) SLAVE... Reverted the comment in this patch back to what it was.
Comment 2 Mike Walker 2018-12-07 18:22:19 UTC
Created attachment 199938 [details]
Working graphics/poppler/Makefile as of r486467

The patches provided above for this bug did not work for me w/the current version of poppler ( r486467 ). I've attached the patch I was able to use to get everything building with OPENJPEG disabled.

Cheers!
-Mike