vcpkg/ports/gdal/0009-poppler-cxx17.patch
Kai Pastor d4422c3beb
[poppler,gdal] Major update to poppler; poppler feature for gdal (#22720)
* Major update to port poppler

* Fixup usage requirements via main pc file

* Add usage based on FindPkgConfig

* Export unofficial cmake config

* uwp is unsupported

* [gdal] Add poppler feature

* [gdal] Update poppler dependency

* [gdal] Add patch for poppler C++17 API

* Disable ENABLE_RELOCATABLE

* Update to 22.02.0 from poppler gitlab

* Update versions

* [skip actions] CI with gdal tools

* Revert "[skip actions] CI with gdal tools"

* Modify feature name for private API

* Update versions

* Add license field to gdal manifest

* Add port name to unofficial namespace

* Rectify poppler version number

* Update versions

* poppler[fontconfig] doesn't build for MSVC

* Update versions

Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2022-02-17 17:03:04 -08:00

18 lines
597 B
Diff

diff --git a/gdal/frmts/pdf/GNUmakefile b/gdal/frmts/pdf/GNUmakefile
index aa42769477fc..56c2cd775d05 100644
--- a/gdal/frmts/pdf/GNUmakefile
+++ b/gdal/frmts/pdf/GNUmakefile
@@ -11,6 +11,12 @@ LD_SHARED = $(LD) -bundle
endif
ifeq ($(HAVE_POPPLER),yes)
+# Poppler 2022.1 requires c++17
+ifeq ($(shell test $(POPPLER_MAJOR_VERSION) -gt 21; echo $$?),0)
+CXX := $(subst -std=c++11,,${CXX})
+CXX := $(subst -std=c++14,,${CXX})
+CXX := ${CXX} -std=c++17
+endif
CPPFLAGS += -DHAVE_POPPLER -DPOPPLER_MAJOR_VERSION=$(POPPLER_MAJOR_VERSION) -DPOPPLER_MINOR_VERSION=$(POPPLER_MINOR_VERSION)
endif