From da2e70f537aeead86331abdaf6809b885edc6214d098ff65511c3765b3c88725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Tue, 8 Mar 2022 20:07:14 +0000 Subject: [PATCH] Accepting request 960257 from home:iznogood:branches:Application:Geo Since it seems people care for 15.4 -- lets add the patch pointed out too OBS-URL: https://build.opensuse.org/request/show/960257 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=149 --- gdal-fix-poppler-leap.patch | 46 +++++++++++++++++++++++++++++++++++++ gdal.changes | 8 +++++++ gdal.spec | 4 ++++ 3 files changed, 58 insertions(+) create mode 100644 gdal-fix-poppler-leap.patch diff --git a/gdal-fix-poppler-leap.patch b/gdal-fix-poppler-leap.patch new file mode 100644 index 0000000..5fab923 --- /dev/null +++ b/gdal-fix-poppler-leap.patch @@ -0,0 +1,46 @@ +# +# 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 diff --git a/gdal.changes b/gdal.changes index be5e66d..d66f3e1 100644 --- a/gdal.changes +++ b/gdal.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Mar 8 14:47:15 UTC 2022 - Bjørn Lie + +- Add gdal-fix-poppler-leap.patch: Fix build on Leap 15.4 and + poppler. +- Add fdups macro, BuildRequires already in place, remove + duplicate files. + ------------------------------------------------------------------- Mon Mar 7 20:33:32 UTC 2022 - Bjørn Lie diff --git a/gdal.spec b/gdal.spec index ea0c701..09d44c1 100644 --- a/gdal.spec +++ b/gdal.spec @@ -40,6 +40,8 @@ Source2: https://download.osgeo.org/%{name}/%{version}/%{sourcename}autot Patch0: gdal-perl.patch # PATCH-FIX-UPSTREAM gdal-fix-build-poppler.patch -- Fix build with poppler 22.03.0 and newer Patch1: gdal-fix-build-poppler.patch +# PATCH-FIX-UPSTREAM gdal-fix-poppler-leap.patch -- Fix build on Leap 15.4 and poppler +Patch2: gdal-fix-poppler-leap.patch BuildRequires: KEALib-devel BuildRequires: autoconf @@ -345,6 +347,8 @@ rm -rf %{buildroot}%{_bindir}/*.dox # License doesn't go there rm -f %{buildroot}%{_datadir}/gdal/LICENSE.TXT +%fdupes %{buildroot}%{python3_sitearch} + # avoid PACKAGE redefines sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_config.h