diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2021-10-05 16:19:54 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-09 13:10:52 +0700 |
commit | 684ac84c1eebe40b30e0223fab4b9380d8283d36 (patch) | |
tree | a8c0cfd42fc447fc1110058a0280fd32160d7760 /gis | |
parent | de13cd765719f727d274395cf82bac2085c26579 (diff) |
gis/gdal: Apply upstream patch for the newer poppler.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis')
-rw-r--r-- | gis/gdal/gdal.SlackBuild | 2 | ||||
-rw-r--r-- | gis/gdal/poppler.patch | 32 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gis/gdal/gdal.SlackBuild b/gis/gdal/gdal.SlackBuild index 7b3cbf8bf3ca3..4ee6831d03213 100644 --- a/gis/gdal/gdal.SlackBuild +++ b/gis/gdal/gdal.SlackBuild @@ -82,6 +82,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p2 < $CWD/poppler.patch + # OpenCL, webp, Spatialite and Grass support need special arrangements. # Everything else is handled automatically by configure. WITHLIST="" diff --git a/gis/gdal/poppler.patch b/gis/gdal/poppler.patch new file mode 100644 index 0000000000000..208bec000f260 --- /dev/null +++ b/gis/gdal/poppler.patch @@ -0,0 +1,32 @@ +From 9c09870e374ca21d558101af3f4c09a6164fdfc3 Mon Sep 17 00:00:00 2001 +From: Even Rouault <even.rouault@spatialys.com> +Date: Sun, 26 Sep 2021 22:49:52 +0200 +Subject: [PATCH] Fix build against Poppler master + +--- + gdal/frmts/pdf/pdfdataset.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gdal/frmts/pdf/pdfdataset.cpp b/gdal/frmts/pdf/pdfdataset.cpp +index 9c4c28a6572..50a8154c756 100644 +--- a/gdal/frmts/pdf/pdfdataset.cpp ++++ b/gdal/frmts/pdf/pdfdataset.cpp +@@ -5012,7 +5012,7 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) + #ifdef HAVE_POPPLER + if (bUseLib.test(PDFLIB_POPPLER)) + { +- GooString* poMetadata = poCatalogPoppler->readMetadata(); ++ auto poMetadata = poCatalogPoppler->readMetadata(); + if (poMetadata) + { + #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) +@@ -5026,7 +5026,9 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) + const char * const apszMDList[2] = { pszContent, nullptr }; + poDS->SetMetadata(const_cast<char**>(apszMDList), "xml:XMP"); + } ++#if (POPPLER_MAJOR_VERSION < 21 || (POPPLER_MAJOR_VERSION == 21 && POPPLER_MINOR_VERSION <= 9)) + delete poMetadata; ++#endif + } + + /* Read Info object */ |