Bug 241772 - graphics/gdal will not compile with poppler 0.82 after update
Summary: graphics/gdal will not compile with poppler 0.82 after update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
Depends on:
Reported: 2019-11-07 05:19 UTC by russo
Modified: 2019-11-07 05:44 UTC (History)
1 user (show)

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

Patch combining two upstream fixes to GDAL to allow it to compile with poppler 0.82 (1.34 KB, text/plain)
2019-11-07 05:19 UTC, russo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description russo 2019-11-07 05:19:01 UTC
Created attachment 208931 [details]
Patch combining two upstream fixes to GDAL to allow it to compile with poppler 0.82

Poppler was updated a few days ago to 0.82.0, after which gdal from ports (version 2.4.2_3) will not compile with poppler support enabled.  The specific issue is a compilation error about two functions in pdfdataset.cpp being declared "override" but not overriding any base class function.

Turns out this issue was addressed in GDAL's development branch specifically to allow it to compile with poppler 0.82.0, and these fixes were also back-ported to the 3.0 release branch, but the fix has not been backported to the branch associated with the 2.4 version present in FreeBSD ports.  Neither has it been back-ported to 2.5.  But the fixes are simple, are easy to find in github, are still applicable to 2.4, and are easy to apply as a patch in the ports tree.

Commits 20c3fc7c and 94dacee in the GDAL project github repo point to the patches needed to restore function in the FreeBSD port.  I have combined these into the attached patch, which simply adds a const keyword in two places if and only if poppler of a late enough version is being used.  Dropping this file into the files directory of the gdal port restores the ability to build with poppler.

Direct links to GDAL git commits that I combined to create this patch:
Comment 1 Tobias C. Berner freebsd_committer 2019-11-07 05:44:44 UTC
Non-Default options unfortunately do not get tested, so we did not catch that.

Thanks for the fix.
Comment 2 commit-hook freebsd_committer 2019-11-07 05:44:47 UTC
A commit references this bug:

Author: tcberner
Date: Thu Nov  7 05:44:09 UTC 2019
New revision: 516938
URL: https://svnweb.freebsd.org/changeset/ports/516938

  graphics/gdal: fix build of poppler option after poppler-0.82

  PR:		241772
  Submitted by:	russo@bogodyn.org