summaryrefslogtreecommitdiff
path: root/sci-libs/gdal
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-01-22 10:09:44 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-01-22 10:09:44 +0000
commit09351e78166b5e864197c4456ebae3f89dd0bed9 (patch)
tree41a96399f56ed3aa399006871bfce4430db84aa2 /sci-libs/gdal
parentc8a77dfe4d3d307c1d5dd2650b7297447d8b609d (diff)
gentoo resync : 22.01.2019
Diffstat (limited to 'sci-libs/gdal')
-rw-r--r--sci-libs/gdal/Manifest5
-rw-r--r--sci-libs/gdal/files/gdal-2.3.1-poppler-0.71.0.patch82
-rw-r--r--sci-libs/gdal/files/gdal-2.3.1-poppler-0.72.0.patch58
-rw-r--r--sci-libs/gdal/files/gdal-2.3.1-poppler-0.73.0.patch35
-rw-r--r--sci-libs/gdal/gdal-2.3.1.ebuild9
5 files changed, 187 insertions, 2 deletions
diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
index 6fcaf4eb5a20..caee535a7abb 100644
--- a/sci-libs/gdal/Manifest
+++ b/sci-libs/gdal/Manifest
@@ -7,8 +7,11 @@ AUX gdal-2.3.0-curl.patch 471 BLAKE2B 551c9fba5cd49afef45ae271f20b8440214b06f569
AUX gdal-2.3.0-frmts-nitf38234.patch 421 BLAKE2B d32592e440b459a57a25de39658224db5a871a82955620140a209bab0f84872dd5c67414df16d64cf24d7ad7a180eeaff7eed7e4aef8e6a70f550575538d93ec SHA512 ffcd68e4fc277f37540a81cf200a597da0f3ee42284107724a3b6bdb44ca54459dceefd52e9d946c8b3d8fd9c5153bcdcc30dacf3ebef46180a9d22280e62c2d
AUX gdal-2.3.0-libtiff.patch 306 BLAKE2B 8f2b39c812ceeee94b95102638885d0ff25086dec8196eaf9ae50378abe88809414da370d9b626b05d2daecfd762bf56938e35fd566952fddc18f1c614dfb4c4 SHA512 b793b1f2631a5944a79be58eab530f3cd248b25858f810515875adc71abb8e4abb1c9f9cf87ec45282bf9eca2e3932706110099a330664aadba3724954ca7297
AUX gdal-2.3.1-poppler-0.69.0.patch 12775 BLAKE2B 27fe38cb5db58961e1f9f4aef9eddbf396dd364dd1c14bb61fefe4eb16397b75a56edd1b7e3225ccb30ecb2da1f5a5ddc669c9dd984807d5e92fb76c9b83e0b5 SHA512 84eb0107abc9030e34bd953d1b8218a15c35432c0dc687e4d52b97c66cda44e842b53d2819cd998921fe5e90830ce063aa242fe933f0675b1c649fb1c5e44ecc
+AUX gdal-2.3.1-poppler-0.71.0.patch 2770 BLAKE2B d856ebd2cc1077b39303ca0300ff5a27d1d9981c4f557bb935a0a2ddf7372ef3ae25b59c8f87a103eaf8be0eb467741b1191032889efb5f98a8bb09be1254ab5 SHA512 9c8fc013b191fc579517389928c2d0c4c2f769f188b26fa86b192dc6e7223c799f579095d0765ffe2c6f7158a661b384cb36e92e7bc8c1d5af236d24fe41281d
+AUX gdal-2.3.1-poppler-0.72.0.patch 2377 BLAKE2B c70dbfba879ecba9956b27e56ffe6fcbb076b9f6ed127eedc201c8d47cf527109374e98e2c31107f9ff14dace67556bffeff8651ae01161f2cb9e78732585846 SHA512 985a44492c585c1c8066feb7810b135535ccc87abf86996f64806e53952e7dd96c02649e072a1329aefab80c03d2d6069c829d36c4ea1471493cfb3af26eb69e
+AUX gdal-2.3.1-poppler-0.73.0.patch 906 BLAKE2B c71bf66068f19e80f38907d3f5ffd24e73ae4be99f720cc852ba8aad2f6999a020d59e068ed8a173c6f84e97471c1f6937f82d2519a166282216995cb8db69bb SHA512 0e846ec7c5ddf44144949018ae70063df1043f9dc2730bb189e794ffb40bd91869bd6f5939bd40fc88b18fb53f20151e286610a8db6e9292ba1c5ccc4065148f
DIST gdal-2.3.0.tar.gz 14423820 BLAKE2B 6c67c66b2f68699249ccd4df2cb1e3b7042e94003b730e64bd8b8eec726a32da9485cab29552bd34c23831686ec3e879edd1848a2339c8289580ce282a287992 SHA512 b37e433be0b7a587ea9f9e5e720295e4cd1406f6c8ca770f5fedcd7fdc797e01e576eb887034b38f93f04a4e76c0ce84792bc7d91a49fea4122231a37ace812f
DIST gdal-2.3.1.tar.gz 14450452 BLAKE2B 226ddf80ff8b9e3d420ac717b245a09fe3daa0331931f4d371b62ab9fa9bb0735ca11e1e045398de92d61b68815aa1dc3e7b6568f4853964cf42d188e46e6eb7 SHA512 0c5bb515dd2a9ad3110421b39bd680ce7e9de68e969cf35a7e63118965dbe193d25a7720a525e53af153de3e78f76ccc6983f4dcdfa6ba429d732a7a47a35d57
EBUILD gdal-2.3.0-r2.ebuild 8138 BLAKE2B f11f4a5110a63b6eacac015ce16d05c235776a365d8328ce2046494ec560f6653f9dee26b8c99b536c6452d25e0fb600bfaed4b849b5dea87dea2bf5c0d5752b SHA512 a2cbe076456ad3b151c554b7f72da5fdf52637278b2e06816aede1e5150ee6c8aaf6441fd1be10a90b3bba380d99262c33430df10dfc7a524ea6001feca7bcab
-EBUILD gdal-2.3.1.ebuild 8061 BLAKE2B e8ae8cb8b04b1699e6b03f3f314cb6ea8f328570481834fe9c8db8fc45981a11a9a6ad80284f14fb698cef3a0bd87c48131a2dd4d2e8b9c5a4533e28e1d1ef69 SHA512 5a5d1521960ed475bb50a7a8547bdbb70f9476f5eae056975ae9d2aaf80ebe0336a21321412d76ca3c94dcb11a685a38bd67e193d65607dd94ded883879b02d7
+EBUILD gdal-2.3.1.ebuild 8497 BLAKE2B 263ccfa2d5ec703d0a51adea18f3a4cdfa5d2a8808c04b30f37bc5cb674e8d5c2f2eb578c4942691610a3d509252967b16056a371929a0eb1490ef4922c15f49 SHA512 9fe9e0bbe01a40dcff87ea0aa6004c8f5ca58619227bd76349ed0b85406c23c6f0cef79021a7634cce10fd1072a1f8bc1d6f7e5a6b6c35cb4a1bf5c21d999a29
MISC metadata.xml 1616 BLAKE2B 7167165623c93e069ce77ef80e68e6339fc38354c0db343564ce8ecf3566e0d61b8b5aeb4e6b69e66bf1e8932d18de54b528bf1a2148767efe3b5cf985a31748 SHA512 dca0cb7a8c94a5313aed09f8c28ae35a55de4b0ff8198469b7f9adc8220b29cbd8c3f92db121b944b03c169b302ac8aa95f4342b76510590aff63a5f122c74c1
diff --git a/sci-libs/gdal/files/gdal-2.3.1-poppler-0.71.0.patch b/sci-libs/gdal/files/gdal-2.3.1-poppler-0.71.0.patch
new file mode 100644
index 000000000000..90ee94d06216
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-2.3.1-poppler-0.71.0.patch
@@ -0,0 +1,82 @@
+Description: Add support for Poppler 0.71.0.
+Author: Even Rouault <even.rouault@spatialys.com>
+Origin: https://github.com/OSGeo/gdal/commit/4cc0215b8f2cef3582265cdfaf16589390697706
+Bug: https://github.com/OSGeo/gdal/issues/1121
+Bug-Debian: https://bugs.debian.org/915722
+
+--- a/frmts/pdf/pdfdataset.cpp
++++ b/frmts/pdf/pdfdataset.cpp
+@@ -2593,18 +2593,25 @@ static void PDFDatasetErrorFunctionCommo
+ }
+
+ #ifdef POPPLER_0_20_OR_LATER
+-static void PDFDatasetErrorFunction(CPL_UNUSED void* userData, CPL_UNUSED ErrorCategory eErrCategory,
++
++static void PDFDatasetErrorFunction(void* /* userData*/,
++ ErrorCategory /* eErrCategory */,
+ #ifdef POPPLER_0_23_OR_LATER
+ Goffset nPos,
+ #else
+ int nPos,
+ #endif
+- char *pszMsg)
++#ifdef POPPLER_0_71_OR_LATER
++ const char *pszMsg
++#else
++ char *pszMsg
++#endif
++ )
+ {
+ CPLString osError;
+
+ if (nPos >= 0)
+- osError.Printf("Pos = %d, ", (int)nPos);
++ osError.Printf("Pos = " CPL_FRMT_GUIB ", ", static_cast<GUIntBig>(nPos));
+ osError += pszMsg;
+ PDFDatasetErrorFunctionCommon(osError);
+ }
+@@ -4442,7 +4449,7 @@ GDALDataset *PDFDataset::Open( GDALOpenI
+ #ifdef HAVE_POPPLER
+ if (bUseLib.test(PDFLIB_POPPLER))
+ {
+- PDFRectangle* psMediaBox = poPagePoppler->getMediaBox();
++ const auto* psMediaBox = poPagePoppler->getMediaBox();
+ dfX1 = psMediaBox->x1;
+ dfY1 = psMediaBox->y1;
+ dfX2 = psMediaBox->x2;
+@@ -4780,14 +4787,12 @@ GDALDataset *PDFDataset::Open( GDALOpenI
+ GooString* poMetadata = poCatalogPoppler->readMetadata();
+ if (poMetadata)
+ {
+- char* pszContent = poMetadata->getCString();
++ const char* pszContent = poMetadata->getCString();
+ if (pszContent != nullptr &&
+ STARTS_WITH(pszContent, "<?xpacket begin="))
+ {
+- char *apszMDList[2];
+- apszMDList[0] = pszContent;
+- apszMDList[1] = nullptr;
+- poDS->SetMetadata(apszMDList, "xml:XMP");
++ const char * const apszMDList[2] = { pszContent, nullptr };
++ poDS->SetMetadata(const_cast<char**>(apszMDList), "xml:XMP");
+ }
+ delete poMetadata;
+ }
+--- a/frmts/pdf/pdfio.h
++++ b/frmts/pdf/pdfio.h
+@@ -58,6 +58,15 @@
+ #define makeSubStream_object_type Object*
+ #endif
+
++// Detect Poppler 0.71 that no longer defines GBool
++#ifdef POPPLER_0_69_OR_LATER
++#ifndef initObj
++#define POPPLER_0_71_OR_LATER
++#define GBool bool
++#define gFalse false
++#endif
++#endif
++
+ class VSIPDFFileStream: public BaseStream
+ {
+ public:
diff --git a/sci-libs/gdal/files/gdal-2.3.1-poppler-0.72.0.patch b/sci-libs/gdal/files/gdal-2.3.1-poppler-0.72.0.patch
new file mode 100644
index 000000000000..3302df9100df
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-2.3.1-poppler-0.72.0.patch
@@ -0,0 +1,58 @@
+From b471814ef406582f2b1bc0aabbe430c0026608c7 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sat, 12 Jan 2019 17:21:54 +0100
+Subject: [PATCH] Fix build with poppler-0.72.0
+
+Non-upstreamable patch that breaks backward compatibility.
+---
+ frmts/pdf/pdfdataset.cpp | 4 ++--
+ frmts/pdf/pdfobject.cpp | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/frmts/pdf/pdfdataset.cpp b/frmts/pdf/pdfdataset.cpp
+index 84fe1fe..38b8c30 100644
+--- a/frmts/pdf/pdfdataset.cpp
++++ b/frmts/pdf/pdfdataset.cpp
+@@ -3459,7 +3459,7 @@ void PDFDataset::FindLayersPoppler()
+ #endif
+ if( ocg != nullptr && ocg->getName() != nullptr )
+ {
+- const char* pszLayerName = (const char*)ocg->getName()->getCString();
++ const char* pszLayerName = (const char*)ocg->getName()->c_str();
+ AddLayer(pszLayerName);
+ oLayerOCGMapPoppler[pszLayerName] = ocg;
+ }
+@@ -4787,7 +4787,7 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
+ GooString* poMetadata = poCatalogPoppler->readMetadata();
+ if (poMetadata)
+ {
+- const char* pszContent = poMetadata->getCString();
++ const char* pszContent = poMetadata->c_str();
+ if (pszContent != nullptr &&
+ STARTS_WITH(pszContent, "<?xpacket begin="))
+ {
+diff --git a/frmts/pdf/pdfobject.cpp b/frmts/pdf/pdfobject.cpp
+index 0a5f907..9bed6c1 100644
+--- a/frmts/pdf/pdfobject.cpp
++++ b/frmts/pdf/pdfobject.cpp
+@@ -1061,7 +1061,7 @@ const CPLString& GDALPDFObjectPoppler::GetString()
+ #else
+ GooString* gooString = m_po->getString();
+ #endif
+- return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()),
++ return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->c_str()),
+ static_cast<int>(gooString->getLength())));
+ }
+ else
+@@ -1422,7 +1422,7 @@ char* GDALPDFStreamPoppler::GetBytes()
+ char* pszContent = (char*) VSIMalloc(m_nLength + 1);
+ if (pszContent)
+ {
+- memcpy(pszContent, gstr->getCString(), m_nLength);
++ memcpy(pszContent, gstr->c_str(), m_nLength);
+ pszContent[m_nLength] = '\0';
+ }
+ delete gstr;
+--
+2.20.1
+
diff --git a/sci-libs/gdal/files/gdal-2.3.1-poppler-0.73.0.patch b/sci-libs/gdal/files/gdal-2.3.1-poppler-0.73.0.patch
new file mode 100644
index 000000000000..8529d99e7351
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-2.3.1-poppler-0.73.0.patch
@@ -0,0 +1,35 @@
+From 77ea05388924fcf2a8c9fd4a777c97e4d69f5e17 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 16 Jan 2019 20:52:59 +0100
+Subject: [PATCH] Fix build with poppler-0.73
+
+---
+ gdal/frmts/pdf/pdfsdk_headers.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/frmts/pdf/pdfsdk_headers.h b/frmts/pdf/pdfsdk_headers.h
+index 9150b0f410..574943b41f 100644
+--- a/frmts/pdf/pdfsdk_headers.h
++++ b/frmts/pdf/pdfsdk_headers.h
+@@ -50,7 +50,6 @@
+ #pragma warning( disable : 4244 ) /* conversion from 'const int' to 'Guchar', possible loss of data */
+ #endif
+
+-#include <goo/gtypes.h>
+ #include <goo/GooList.h>
+
+ /* begin of poppler xpdf includes */
+@@ -79,6 +78,10 @@
+
+ /* end of poppler xpdf includes */
+
++/* poppler-0.73 compatibility */
++#define Guchar unsigned char
++#define Guint unsigned int
++
+ #ifdef _MSC_VER
+ #pragma warning( pop )
+ #endif
+--
+2.20.1
+
diff --git a/sci-libs/gdal/gdal-2.3.1.ebuild b/sci-libs/gdal/gdal-2.3.1.ebuild
index 317b386da9e5..9f81394be026 100644
--- a/sci-libs/gdal/gdal-2.3.1.ebuild
+++ b/sci-libs/gdal/gdal-2.3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -83,6 +83,7 @@ PATCHES=(
"${FILESDIR}/${PN}-2.2.3-bashcomp-path.patch" # bug 641866
"${FILESDIR}/${PN}-2.3.0-curl.patch" # bug 659840
"${FILESDIR}/${PN}-2.3.1-poppler-0.69.0.patch"
+ "${FILESDIR}/${PN}-2.3.1-poppler-0.71.0.patch" # bug 674556
)
src_prepare() {
@@ -119,6 +120,11 @@ src_prepare() {
default
+ # not upstreamable, not fixed in 2.4.0 or master as of 2019-01-12:
+ has_version ">=app-text/poppler-0.72.0" && eapply "${FILESDIR}/${PN}-2.3.1-poppler-0.72.0.patch"
+ # not upstreamable, not fixed in 2.4.0 or master as of 2019-01-16:
+ has_version ">=app-text/poppler-0.73.0" && eapply "${FILESDIR}/${PN}-2.3.1-poppler-0.73.0.patch"
+
eautoreconf
}
@@ -311,6 +317,7 @@ src_install() {
fi
doman "${S}"/man/man*/*
+ find "${ED}" -name '*.la' -delete || die
}
pkg_postinst() {