# # spec file # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # From cbcfe2c8c5507ea00ef7371029ff94d0bf6f4a77 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 8 Jan 2022 14:25:09 +0100 Subject: [PATCH] frmts/pdf/GNUmakefile: force c++17 with Poppler > 21 (fixes #5071) --- gdal/frmts/pdf/GNUmakefile | 6 ++++++ 1 file changed, 6 insertions(+) Index: gdal-3.4.1/frmts/pdf/GNUmakefile =================================================================== --- gdal-3.4.1.orig/frmts/pdf/GNUmakefile +++ gdal-3.4.1/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 %changelog