mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
sci-libs/gdal: drop 3.9.3-r1, 3.11.4-r1
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1,7 +1,2 @@
|
||||
DIST gdal-3.11.4.tar.xz 9321096 BLAKE2B a6c18830aafc1e6d0d9d702d56b4b65156fa646b3d39615dd09ca753268a6c38c561c7267e4d454dc6343ec8508092f9c82544f60637edb8e66a6d05b6464385 SHA512 81a6cd7b7fd2847bc3f60aa7dbed8e1e3ff18ed54f65ed0a33785510d2412bf3cf73f8cf6ac0c51f9b55d62d2fbf51cb7c6e0acd348487c34c4970726f995891
|
||||
DIST gdal-3.11.4.tar.xz.sig 310 BLAKE2B 94cfd46610c24a3ec4f29ec927a7ab302785357b7affa6461a5967420dbcc39d0c454339b4bc62130768ade0cefee0d5a8f9c1e4a804d531e53470843e2c2a1d SHA512 c77de648186153fa2764ef08c9b9065b7c0fd29fc8c321590f39281b0ec40211b8077b298a56de52bdd065a545821d5ea0b425e2fcd6897efeb169b755ccfb7b
|
||||
DIST gdal-3.12.1.tar.xz 9597108 BLAKE2B 5ab23a8d52411561d47cef8b987d0f06916047823380acb4c2993f69d0fccd3b0360809ff47b8a99132e912fc7ab312498e7ad4ac6be5db5ad3c0dcc540fc2a8 SHA512 921781e95604c2bfd9355352747b208f5ae5efe02394e1f4210486a8dc031c17228069cd7188fe78fcbf1b476b7e40080104954dc670a04f92e7ecb11f27876c
|
||||
DIST gdal-3.9.3.tar.xz 9110460 BLAKE2B 0ae536ff832a3659dd9e56d32f2695b9428c24b1a0d75845c860ce7c78eb462cf78df7e821d814287f4c37ccf79f938256fe662a09c4bd936843a75157f29c8c SHA512 e8d4c8c97946a68775d03ecf1f192d950bf01b7a40ff7bf35a6f535dd08b370a26d5646da84179e4864aa59ebfbceae7e77bbb04b745bdd26fde555f6ae0708e
|
||||
DIST gdalautotest-3.11.4.tar.gz 18587889 BLAKE2B bc26d04e75d9da0a633f436e66f59a5008a3a997c2aa4584eacfbcabec26f25b55a4a3f82c8b76a14720243b4f8a5f9a23118c502402da5f1eeb9954730a333c SHA512 c8f4e4739040f27fa092d132e14ff1196ae9639d8f74b3244d19390a60ee02963574215bc0e48f5163d575e83fc0185480a22eed35a1192c99cbf80f7bb062af
|
||||
DIST gdalautotest-3.12.1.zip 23201461 BLAKE2B 893226fb22c5180c3a99390032cd96392fc9ac8b290c5c31be911fd61bddb435f2f59a192d76496401db4b73aa304e9dac1ab7e2218e94fc531c4b59049bc1c0 SHA512 fb54eddf8b34d4bd9d308ec0e7b3b9947e07b4a0615f688daf933668b0faf4fd44c2bc716cce8045433ca894ff5dde60e75acd42d5a4aa5e2999b9fd5cd4d6a5
|
||||
DIST gdalautotest-3.9.3.tar.gz 17239532 BLAKE2B 991e24ac3181e1ab4837933183520828fc4f5416ce0f3e6e13a12052db301286898eaecd80f8b6765f19876be786b95854c1efef6cccfe02cacedae5f00302e6 SHA512 a9f44065bb5817cdc32995cd57f65f8a588dfaea77d4a5bc2d9ea361ef1423843358d7e31be2e27505b6e991d07b18f0f5c3fd9526cf697c74bc88f558205d61
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
https://bugs.gentoo.org/948810
|
||||
https://github.com/OSGeo/gdal/pull/12773
|
||||
https://github.com/OSGeo/gdal/commit/66f9bf01cfcb58499f69df2670a3ec9d7b77ad5a
|
||||
|
||||
From 66f9bf01cfcb58499f69df2670a3ec9d7b77ad5a Mon Sep 17 00:00:00 2001
|
||||
From: Alfred Wingate <parona@protonmail.com>
|
||||
Date: Tue, 22 Jul 2025 17:04:59 +0300
|
||||
Subject: [PATCH] CMake Java: restore -fno-strict-aliasing
|
||||
|
||||
This was dropped with the move to cmake.
|
||||
|
||||
But swig still struggles with this in java.
|
||||
|
||||
> If you are going to use optimisations turned on with gcc (for example -O2),
|
||||
> ensure you also compile with -fno-strict-aliasing. The GCC optimisations have
|
||||
> become more aggressive from gcc-4.0 onwards and will result in code that fails
|
||||
> with strict aliasing optimisations turned on.
|
||||
|
||||
Bug: https://bugs.gentoo.org/948810
|
||||
See-Also: cd39be5322d5731ae6327b1cec1e54015ab6bc1e
|
||||
See-Also: 211263036085ddb44663137d359e3d99fee77bd7
|
||||
--- a/swig/java/CMakeLists.txt
|
||||
+++ b/swig/java/CMakeLists.txt
|
||||
@@ -5,6 +5,14 @@ if (CMAKE_CXX_FLAGS)
|
||||
string(REPLACE "/WX " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
|
||||
endif ()
|
||||
|
||||
+# Do not remove -fno-strict-aliasing while SWIG generates weird code in upcast methods
|
||||
+# http://trac.osgeo.org/gdal/changeset/16006
|
||||
+#
|
||||
+# https://swig.org//Doc4.3/Java.html#Java_compiling_dynamic
|
||||
+if (NOT MSVC)
|
||||
+ add_compile_options("-fno-strict-aliasing")
|
||||
+endif()
|
||||
+
|
||||
list(APPEND GDAL_SWIG_COMMON_INTERFACE_FILES
|
||||
${PROJECT_SOURCE_DIR}/swig/include/java/callback.i
|
||||
${PROJECT_SOURCE_DIR}/swig/include/java/gdalconst_java.i
|
||||
@@ -1,40 +0,0 @@
|
||||
https://github.com/OSGeo/gdal/pull/13175
|
||||
https://github.com/OSGeo/gdal/issues/13173
|
||||
https://github.com/OSGeo/gdal/commit/a716a6cd5ffd779b30950f046fce91878fc97b9d
|
||||
|
||||
From a716a6cd5ffd779b30950f046fce91878fc97b9d Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Sun, 5 Oct 2025 00:50:51 +0200
|
||||
Subject: [PATCH] Add compatibility with Poppler 25.10 (support for older
|
||||
versions kept)
|
||||
|
||||
Fixes #13173
|
||||
--- a/frmts/pdf/pdfobject.cpp
|
||||
+++ b/frmts/pdf/pdfobject.cpp
|
||||
@@ -1437,7 +1437,12 @@ int64_t GDALPDFStreamPoppler::GetLength(int64_t nMaxSize)
|
||||
|
||||
static char *GooStringToCharStart(GooString &gstr)
|
||||
{
|
||||
- auto nLength = gstr.getLength();
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 10)
|
||||
+ const auto nLength = gstr.size();
|
||||
+#else
|
||||
+ const auto nLength = gstr.getLength();
|
||||
+#endif
|
||||
if (nLength)
|
||||
{
|
||||
char *pszContent = static_cast<char *>(VSI_MALLOC_VERBOSE(nLength + 1));
|
||||
@@ -1514,7 +1519,12 @@ char *GDALPDFStreamPoppler::GetRawBytes()
|
||||
"GDALPDFStreamPoppler::GetRawBytes(): %s", e.what());
|
||||
return nullptr;
|
||||
}
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 10)
|
||||
+ m_nRawLength = gstr.size();
|
||||
+#else
|
||||
m_nRawLength = gstr.getLength();
|
||||
+#endif
|
||||
return GooStringToCharStart(gstr);
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
https://bugs.gentoo.org/904534
|
||||
--- a/ogr/ogrsf_frmts/flatgeobuf/CMakeLists.txt
|
||||
+++ b/ogr/ogrsf_frmts/flatgeobuf/CMakeLists.txt
|
||||
@@ -8,6 +8,7 @@
|
||||
ogrflatgeobufeditablelayer.cpp
|
||||
PLUGIN_CAPABLE
|
||||
NO_DEPS)
|
||||
+set_property(TARGET ogr_FlatGeobuf PROPERTY CXX_STANDARD 17)
|
||||
gdal_standard_includes(ogr_FlatGeobuf)
|
||||
target_include_directories(ogr_FlatGeobuf PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<TARGET_PROPERTY:ogrsf_generic,SOURCE_DIR>)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From ada4fa75910dab127ee4b79256a676da6d4636c0 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Mon, 9 Dec 2024 18:18:31 +0100
|
||||
Subject: [PATCH] PDF: fix build issue on CondaForge build infrastructure (gcc
|
||||
13.3)
|
||||
|
||||
Cf https://github.com/conda-forge/gdal-feedstock/pull/1019#issuecomment-2528710051
|
||||
---
|
||||
frmts/pdf/pdfsdk_headers.h | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/frmts/pdf/pdfsdk_headers.h b/frmts/pdf/pdfsdk_headers.h
|
||||
index 00cc4067fe5b..d2a3a449d124 100644
|
||||
--- a/frmts/pdf/pdfsdk_headers.h
|
||||
+++ b/frmts/pdf/pdfsdk_headers.h
|
||||
@@ -19,6 +19,11 @@
|
||||
|
||||
#ifdef HAVE_POPPLER
|
||||
|
||||
+// The "#define private public" hacks we do below do not play well with the
|
||||
+// sstream header.
|
||||
+// Cf https://github.com/conda-forge/gdal-feedstock/pull/1019#issuecomment-2528710051
|
||||
+#include <sstream>
|
||||
+
|
||||
/* Horrible hack because there's a conflict between struct FlateDecode of */
|
||||
/* include/poppler/Stream.h and the FlateDecode() function of */
|
||||
/* pdfium/core/include/fpdfapi/fpdf_parser.h. */
|
||||
@@ -1,240 +0,0 @@
|
||||
From f6d4e0608dabfd4f2712172bdb604996178eb744 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Thu, 6 Feb 2025 14:41:52 +0100
|
||||
Subject: [PATCH] Build: fix build against Poppler 25.02.00
|
||||
|
||||
Fixes #11804
|
||||
---
|
||||
frmts/pdf/pdfdataset.cpp | 41 ++++++++++++++++++++++++++----
|
||||
frmts/pdf/pdfio.cpp | 17 +++++++++++++
|
||||
frmts/pdf/pdfio.h | 12 +++++++++
|
||||
frmts/pdf/pdfobject.cpp | 6 ++---
|
||||
frmts/pdf/pdfobject.h | 2 +-
|
||||
frmts/pdf/pdfsdk_headers.h | 9 +++++--
|
||||
6 files changed, 76 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/frmts/pdf/pdfdataset.cpp b/frmts/pdf/pdfdataset.cpp
|
||||
--- a/frmts/pdf/pdfdataset.cpp
|
||||
+++ b/frmts/pdf/pdfdataset.cpp
|
||||
@@ -1964,6 +1964,14 @@ CPLErr PDFDataset::ReadPixels(int nReqXOff, int nReqYOff, int nReqXSize,
|
||||
PDFDoc *poDoc = m_poDocPoppler;
|
||||
poSplashOut->startDoc(poDoc);
|
||||
|
||||
+ // Note: Poppler 25.2 is certainly not the lowest version where we can
|
||||
+ // avoid the hack.
|
||||
+#if !(POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2))
|
||||
+#define USE_OPTCONTENT_HACK
|
||||
+#endif
|
||||
+
|
||||
+#ifdef USE_OPTCONTENT_HACK
|
||||
/* EVIL: we modify a private member... */
|
||||
/* poppler (at least 0.12 and 0.14 versions) don't render correctly */
|
||||
/* some PDFs and display an error message 'Could not find a OCG with
|
||||
@@ -1978,6 +1986,7 @@ CPLErr PDFDataset::ReadPixels(int nReqXOff, int nReqYOff, int nReqXSize,
|
||||
OCGs *poOldOCGs = poCatalog->optContent;
|
||||
if (!m_bUseOCG)
|
||||
poCatalog->optContent = nullptr;
|
||||
+#endif
|
||||
try
|
||||
{
|
||||
poDoc->displayPageSlice(poSplashOut, m_iPage, m_dfDPI, m_dfDPI, 0,
|
||||
@@ -1988,14 +1997,19 @@ CPLErr PDFDataset::ReadPixels(int nReqXOff, int nReqYOff, int nReqXSize,
|
||||
{
|
||||
CPLError(CE_Failure, CPLE_AppDefined,
|
||||
"PDFDoc::displayPageSlice() failed with %s", e.what());
|
||||
+
|
||||
+#ifdef USE_OPTCONTENT_HACK
|
||||
/* Restore back */
|
||||
poCatalog->optContent = poOldOCGs;
|
||||
+#endif
|
||||
delete poSplashOut;
|
||||
return CE_Failure;
|
||||
}
|
||||
|
||||
+#ifdef USE_OPTCONTENT_HACK
|
||||
/* Restore back */
|
||||
poCatalog->optContent = poOldOCGs;
|
||||
+#endif
|
||||
|
||||
SplashBitmap *poBitmap = poSplashOut->getBitmap();
|
||||
if (poBitmap->getWidth() != nReqXSize ||
|
||||
@@ -3734,9 +3748,14 @@ void PDFDataset::ExploreLayersPoppler(GDALPDFArray *poArray,
|
||||
}
|
||||
else
|
||||
osCurLayer = std::move(osName);
|
||||
- // CPLDebug("PDF", "Layer %s", osCurLayer.c_str());
|
||||
+ // CPLDebug("PDF", "Layer %s", osCurLayer.c_str());
|
||||
|
||||
- OCGs *optContentConfig = m_poDocPoppler->getOptContentConfig();
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+ const
|
||||
+#endif
|
||||
+ OCGs *optContentConfig =
|
||||
+ m_poDocPoppler->getOptContentConfig();
|
||||
struct Ref r;
|
||||
r.num = poObj->GetRefNum().toInt();
|
||||
r.gen = poObj->GetRefGen();
|
||||
@@ -3772,11 +3791,19 @@ void PDFDataset::FindLayersPoppler(int iPageOfInterest)
|
||||
if (poPages)
|
||||
nPageCount = poPages->GetLength();
|
||||
|
||||
- OCGs *optContentConfig = m_poDocPoppler->getOptContentConfig();
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+ const
|
||||
+#endif
|
||||
+ OCGs *optContentConfig = m_poDocPoppler->getOptContentConfig();
|
||||
if (optContentConfig == nullptr || !optContentConfig->isOk())
|
||||
return;
|
||||
|
||||
- Array *array = optContentConfig->getOrderArray();
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+ const
|
||||
+#endif
|
||||
+ Array *array = optContentConfig->getOrderArray();
|
||||
if (array)
|
||||
{
|
||||
GDALPDFArray *poArray = GDALPDFCreateArray(array);
|
||||
@@ -3812,7 +3839,11 @@ void PDFDataset::FindLayersPoppler(int iPageOfInterest)
|
||||
|
||||
void PDFDataset::TurnLayersOnOffPoppler()
|
||||
{
|
||||
- OCGs *optContentConfig = m_poDocPoppler->getOptContentConfig();
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+ const
|
||||
+#endif
|
||||
+ OCGs *optContentConfig = m_poDocPoppler->getOptContentConfig();
|
||||
if (optContentConfig == nullptr || !optContentConfig->isOk())
|
||||
return;
|
||||
|
||||
diff --git a/frmts/pdf/pdfio.cpp b/frmts/pdf/pdfio.cpp
|
||||
--- a/frmts/pdf/pdfio.cpp
|
||||
+++ b/frmts/pdf/pdfio.cpp
|
||||
@@ -237,23 +237,40 @@ int VSIPDFFileStream::lookChar()
|
||||
/* reset() */
|
||||
/************************************************************************/
|
||||
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+bool VSIPDFFileStream::reset()
|
||||
+#else
|
||||
void VSIPDFFileStream::reset()
|
||||
+#endif
|
||||
{
|
||||
nSavedPos = VSIFTellL(f);
|
||||
bHasSavedPos = TRUE;
|
||||
VSIFSeekL(f, nCurrentPos = nStart, SEEK_SET);
|
||||
nPosInBuffer = -1;
|
||||
nBufferLength = -1;
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+ return true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* unfilteredReset() */
|
||||
/************************************************************************/
|
||||
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION > 2)
|
||||
+bool VSIPDFFileStream::unfilteredReset()
|
||||
+{
|
||||
+ return reset();
|
||||
+}
|
||||
+#else
|
||||
void VSIPDFFileStream::unfilteredReset()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
+#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* close() */
|
||||
diff --git a/frmts/pdf/pdfio.h b/frmts/pdf/pdfio.h
|
||||
--- a/frmts/pdf/pdfio.h
|
||||
+++ b/frmts/pdf/pdfio.h
|
||||
@@ -48,8 +48,20 @@ class VSIPDFFileStream final : public BaseStream
|
||||
virtual int getUnfilteredChar() override;
|
||||
virtual int lookChar() override;
|
||||
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+ virtual bool reset() override;
|
||||
+#else
|
||||
virtual void reset() override;
|
||||
+#endif
|
||||
+
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION > 2)
|
||||
+ virtual bool unfilteredReset() override;
|
||||
+#else
|
||||
virtual void unfilteredReset() override;
|
||||
+#endif
|
||||
+
|
||||
virtual void close() override;
|
||||
|
||||
bool FoundLinearizedHint() const
|
||||
diff --git a/frmts/pdf/pdfobject.cpp b/frmts/pdf/pdfobject.cpp
|
||||
--- a/frmts/pdf/pdfobject.cpp
|
||||
+++ b/frmts/pdf/pdfobject.cpp
|
||||
@@ -979,11 +979,11 @@ class GDALPDFDictionaryPoppler : public GDALPDFDictionary
|
||||
class GDALPDFArrayPoppler : public GDALPDFArray
|
||||
{
|
||||
private:
|
||||
- Array *m_poArray;
|
||||
+ const Array *m_poArray;
|
||||
std::vector<std::unique_ptr<GDALPDFObject>> m_v;
|
||||
|
||||
public:
|
||||
- GDALPDFArrayPoppler(Array *poArray) : m_poArray(poArray)
|
||||
+ GDALPDFArrayPoppler(const Array *poArray) : m_poArray(poArray)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1334,7 +1334,7 @@ std::map<CPLString, GDALPDFObject *> &GDALPDFDictionaryPoppler::GetValues()
|
||||
/* GDALPDFCreateArray() */
|
||||
/************************************************************************/
|
||||
|
||||
-GDALPDFArray *GDALPDFCreateArray(Array *array)
|
||||
+GDALPDFArray *GDALPDFCreateArray(const Array *array)
|
||||
{
|
||||
return new GDALPDFArrayPoppler(array);
|
||||
}
|
||||
diff --git a/frmts/pdf/pdfobject.h b/frmts/pdf/pdfobject.h
|
||||
--- a/frmts/pdf/pdfobject.h
|
||||
+++ b/frmts/pdf/pdfobject.h
|
||||
@@ -405,7 +405,7 @@ class GDALPDFObjectPoppler : public GDALPDFObject
|
||||
virtual int GetRefGen() override;
|
||||
};
|
||||
|
||||
-GDALPDFArray *GDALPDFCreateArray(Array *array);
|
||||
+GDALPDFArray *GDALPDFCreateArray(const Array *array);
|
||||
|
||||
#endif // HAVE_POPPLER
|
||||
|
||||
diff --git a/frmts/pdf/pdfsdk_headers.h b/frmts/pdf/pdfsdk_headers.h
|
||||
--- a/frmts/pdf/pdfsdk_headers.h
|
||||
+++ b/frmts/pdf/pdfsdk_headers.h
|
||||
@@ -51,10 +51,15 @@
|
||||
|
||||
#include <Dict.h>
|
||||
|
||||
-#define private \
|
||||
- public /* Ugly! Catalog::optContent is private but we need it... */
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 2)
|
||||
+#include <Catalog.h>
|
||||
+#else
|
||||
+/* Ugly! Catalog::optContent is private but we need it for ancient Poppler versions. */
|
||||
+#define private public
|
||||
#include <Catalog.h>
|
||||
#undef private
|
||||
+#endif
|
||||
|
||||
#define private public /* Ugly! PDFDoc::str is private but we need it... */
|
||||
#include <PDFDoc.h>
|
||||
@@ -1,61 +0,0 @@
|
||||
From a689e2189ff0a464f3150ed8b2dd5a3cc1194012 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Sun, 4 May 2025 21:00:18 +0200
|
||||
Subject: [PATCH] PDF: Fix build against Poppler 2025.05.0
|
||||
|
||||
---
|
||||
frmts/pdf/pdfio.cpp | 13 +++++++++++++
|
||||
frmts/pdf/pdfio.h | 8 ++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/frmts/pdf/pdfio.cpp b/frmts/pdf/pdfio.cpp
|
||||
index 9bf39f495020..39cb1285ef40 100644
|
||||
--- a/frmts/pdf/pdfio.cpp
|
||||
+++ b/frmts/pdf/pdfio.cpp
|
||||
@@ -77,12 +77,25 @@ BaseStream *VSIPDFFileStream::copy()
|
||||
/************************************************************************/
|
||||
/* makeSubStream() */
|
||||
/************************************************************************/
|
||||
+
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 5)
|
||||
+std::unique_ptr<Stream> VSIPDFFileStream::makeSubStream(Goffset startA,
|
||||
+ bool limitedA,
|
||||
+ Goffset lengthA,
|
||||
+ Object &&dictA)
|
||||
+{
|
||||
+ return std::make_unique<VSIPDFFileStream>(this, startA, limitedA, lengthA,
|
||||
+ std::move(dictA));
|
||||
+}
|
||||
+#else
|
||||
Stream *VSIPDFFileStream::makeSubStream(Goffset startA, bool limitedA,
|
||||
Goffset lengthA, Object &&dictA)
|
||||
{
|
||||
return new VSIPDFFileStream(this, startA, limitedA, lengthA,
|
||||
std::move(dictA));
|
||||
}
|
||||
+#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* getPos() */
|
||||
diff --git a/frmts/pdf/pdfio.h b/frmts/pdf/pdfio.h
|
||||
index f3adf9707ead..e2223bd87fa5 100644
|
||||
--- a/frmts/pdf/pdfio.h
|
||||
+++ b/frmts/pdf/pdfio.h
|
||||
@@ -31,8 +31,16 @@ class VSIPDFFileStream final : public BaseStream
|
||||
|
||||
virtual BaseStream *copy() override;
|
||||
|
||||
+#if POPPLER_MAJOR_VERSION > 25 || \
|
||||
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 5)
|
||||
+ virtual std::unique_ptr<Stream> makeSubStream(Goffset startA, bool limitedA,
|
||||
+ Goffset lengthA,
|
||||
+ Object &&dictA) override;
|
||||
+#else
|
||||
virtual Stream *makeSubStream(Goffset startA, bool limitedA,
|
||||
Goffset lengthA, Object &&dictA) override;
|
||||
+
|
||||
+#endif
|
||||
virtual Goffset getPos() override;
|
||||
virtual Goffset getStart() override;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From f6d4e0608dabfd4f2712172bdb604996178eb744 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Thu, 6 Feb 2025 14:41:52 +0100
|
||||
Subject: [PATCH] Build: fix build against Poppler 25.02.00
|
||||
|
||||
Fixes #11804
|
||||
---
|
||||
autotest/gdrivers/pdf.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/autotest/gdrivers/pdf.py b/autotest/gdrivers/pdf.py
|
||||
index 7b74e9b5384c..373604068ec3 100755
|
||||
--- a/autotest/gdrivers/pdf.py
|
||||
+++ b/autotest/gdrivers/pdf.py
|
||||
@@ -1524,7 +1524,7 @@ def test_pdf_extra_rasters(poppler_or_pdfium):
|
||||
"LAYER_01_NAME=subbyte",
|
||||
], "did not get expected layers"
|
||||
if pdf_is_poppler():
|
||||
- assert cs in (7926, 8177, 8174, 8165, 8172)
|
||||
+ assert cs in (7926, 8177, 8174, 8165, 8172, 8193)
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -1,507 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
inherit cmake distutils-r1 flag-o-matic java-pkg-opt-2 verify-sig
|
||||
|
||||
DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
|
||||
HOMEPAGE="https://gdal.org/"
|
||||
SRC_URI="
|
||||
https://download.osgeo.org/${PN}/${PV}/${P}.tar.xz
|
||||
test? ( https://download.osgeo.org/${PN}/${PV}/${PN}autotest-${PV}.tar.gz )
|
||||
verify-sig? ( https://download.osgeo.org/${PN}/${PV}/${P}.tar.xz.sig )
|
||||
"
|
||||
|
||||
LICENSE="BSD Info-ZIP MIT"
|
||||
SLOT="0/37" # subslot is libgdal.so.<SONAME> (and GDAL_SOVERSION in gdal.cmake)
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||||
IUSE="
|
||||
archive armadillo avif blosc cryptopp +curl cpu_flags_arm_neon cpu_flags_x86_avx
|
||||
cpu_flags_x86_avx2 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1
|
||||
cpu_flags_x86_ssse3 exprtk fits geos gif gml hdf5 heif java jpeg2k jpegxl
|
||||
lerc libaec libdeflate lz4 lzma mongodb +muparser mysql netcdf odbc openexr
|
||||
oracle parquet pdf png postgres python qhull spatialite sqlite test +tools webp
|
||||
xls zstd
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
spatialite? ( sqlite )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
COMMON_DEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/json-c:=
|
||||
dev-libs/libxml2:2=
|
||||
dev-libs/openssl:=
|
||||
media-libs/tiff:=[jpeg]
|
||||
>=sci-libs/libgeotiff-1.5.1-r1:=
|
||||
media-libs/libjpeg-turbo:=
|
||||
>=sci-libs/proj-6.0.0:=[tiff]
|
||||
virtual/minizip:=
|
||||
archive? ( app-arch/libarchive:= )
|
||||
armadillo? ( sci-libs/armadillo:=[lapack] )
|
||||
avif? ( media-libs/libavif:= )
|
||||
blosc? ( dev-libs/c-blosc:= )
|
||||
cryptopp? ( dev-libs/crypto++:= )
|
||||
curl? ( net-misc/curl )
|
||||
fits? ( sci-libs/cfitsio:= )
|
||||
geos? ( >=sci-libs/geos-3.8.0 )
|
||||
gif? ( media-libs/giflib:= )
|
||||
gml? ( >=dev-libs/xerces-c-3.1:= )
|
||||
heif? ( media-libs/libheif:= )
|
||||
hdf5? ( >=sci-libs/hdf5-1.6.4:=[cxx,szip] )
|
||||
java? (
|
||||
>=virtual/jdk-1.8:*
|
||||
)
|
||||
jpeg2k? ( media-libs/openjpeg:2= )
|
||||
jpegxl? ( media-libs/libjxl:= )
|
||||
lerc? ( media-libs/lerc:= )
|
||||
libaec? ( sci-libs/libaec:= )
|
||||
libdeflate? ( app-arch/libdeflate )
|
||||
lz4? ( app-arch/lz4:= )
|
||||
lzma? ( || (
|
||||
app-arch/xz-utils
|
||||
app-arch/lzma
|
||||
) )
|
||||
mongodb? ( dev-libs/mongo-cxx-driver:= )
|
||||
muparser? ( dev-cpp/muParser:= )
|
||||
mysql? ( dev-db/mysql-connector-c:= )
|
||||
netcdf? ( sci-libs/netcdf:= )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
openexr? ( media-libs/openexr:= )
|
||||
oracle? ( dev-db/oracle-instantclient:= )
|
||||
parquet? ( dev-libs/apache-arrow:=[compute,dataset,parquet,lz4?,zlib,zstd?] )
|
||||
pdf? ( app-text/poppler:= )
|
||||
png? ( media-libs/libpng:= )
|
||||
postgres? ( >=dev-db/postgresql-8.4:= )
|
||||
qhull? ( media-libs/qhull:= )
|
||||
spatialite? ( dev-db/spatialite )
|
||||
sqlite? (
|
||||
>=dev-db/sqlite-3.31:3
|
||||
dev-libs/libpcre2:=
|
||||
)
|
||||
webp? ( media-libs/libwebp:= )
|
||||
xls? ( dev-libs/freexl )
|
||||
zstd? ( app-arch/zstd:= )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
java? ( >=virtual/jre-1.8:* )
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
exprtk? ( dev-cpp/exprtk )
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
java? (
|
||||
>=dev-java/ant-1.10.14-r3:0
|
||||
dev-lang/swig
|
||||
)
|
||||
python? (
|
||||
${DISTUTILS_DEPS}
|
||||
dev-lang/swig
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/filelock[${PYTHON_USEDEP}]
|
||||
dev-python/jsonschema[${PYTHON_USEDEP}]
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-env[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
|
||||
parquet? ( dev-python/pyarrow[parquet,${PYTHON_USEDEP}] )
|
||||
)
|
||||
')
|
||||
)
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-evenrouault-20250913 )
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/evenrouault.asc
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
_wstat64 # Windows LFS
|
||||
)
|
||||
|
||||
EPYTEST_PLUGINS=( pytest-env )
|
||||
EPYTEST_RERUNS=5
|
||||
EPYTEST_XDIST=1
|
||||
# distutils_enable_tests unconditionally touches BDEPEND
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-poppler-25.10.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use java && java-pkg-opt-2_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
|
||||
unpack ${P}.tar.xz
|
||||
use test && unpack ${PN}autotest-${PV}.tar.gz
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use test ; then
|
||||
mv "${WORKDIR}"/gdalautotest-${PV} "${S}"/autotest || die
|
||||
fi
|
||||
java-pkg-opt-2_src_prepare
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
local -x BUILD_DIR="${S}_python"
|
||||
# Generate required files with cmake and then use distutils-r1 to generate wheels
|
||||
# https://github.com/OSGeo/gdal/issues/9965#issuecomment-2159222393
|
||||
mycmakeargs+=( -DBUILD_PYTHON_BINDINGS=ON )
|
||||
cmake_src_configure
|
||||
cmake_build python_generated_files
|
||||
cmake_build generate_gdal_version_h
|
||||
sed -E -e "/(library_dirs|include_dirs) =/ { s|${BUILD_DIR}|${cmake_build_dir}| } " \
|
||||
-i "${BUILD_DIR}/swig/python/setup.py" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# sanity check subslot to give a friendly reminder to would-be drive by bumpers
|
||||
local detected_soversion
|
||||
detected_soversion="$(sed -n -e 's/set(GDAL_SOVERSION \(.*\))/\1/p' gdal.cmake)"
|
||||
if [[ "${SLOT#0/}" != "${detected_soversion}" ]]; then
|
||||
die "Subslot ${SLOT#0/} doesn't match upstream specified set(GDAL_SOVERSION ${detected_soversion}) in gdal.cmake."
|
||||
fi
|
||||
|
||||
# ODR violations
|
||||
filter-lto
|
||||
|
||||
local mycmakeargs=(
|
||||
# https://gdal.org/en/stable/development/building_from_source.html
|
||||
|
||||
-DBUILD_APPS=$(usex tools)
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
-DENABLE_GNM=ON
|
||||
-DENABLE_IPO=OFF
|
||||
-DENABLE_PAM=ON # Persistent Auxiliary Metadata (not Pluggable Authentication Modules!)
|
||||
-DOGR_ENABLE_DRIVER_SQLITE=$(usex sqlite)
|
||||
-DGDAL_ENABLE_PLUGINS=OFF
|
||||
-DGDAL_ENABLE_PLUGINS_NO_DEPS=OFF
|
||||
-DGDAL_BUILD_OPTIONAL_DRIVERS=ON
|
||||
-DOGR_BUILD_OPTIONAL_DRIVERS=ON
|
||||
-DGDAL_USE_EXTERNAL_LIBS=ON
|
||||
-DGDAL_USE_INTERNAL_LIBS=OFF
|
||||
-DUSE_CCACHE=OFF
|
||||
-DUSE_PRECOMPILED_HEADERS=OFF
|
||||
|
||||
# bug #844874 and bug #845150
|
||||
-DCMAKE_INSTALL_INCLUDEDIR="include/gdal"
|
||||
|
||||
-DGDAL_FIND_PACKAGE_PROJ_MODE=CONFIG
|
||||
|
||||
# Options here are generally off because of one of:
|
||||
# - Not yet packaged dependencies
|
||||
#
|
||||
# - Off for autotools build and didn't want more churn by
|
||||
# enabling during port to CMake. Feel free to request them
|
||||
# being turned on if useful for you.
|
||||
#
|
||||
# See cmake/helpers/CheckDependentLibraries.cmake for options
|
||||
# *_*_package(Option) -> GDAL_USE_OPTION
|
||||
-DGDAL_USE_ADBCDRIVERMANAGER=OFF
|
||||
-DGDAL_USE_ARCHIVE=$(usex archive)
|
||||
-DGDAL_USE_ARMADILLO=$(usex armadillo)
|
||||
-DGDAL_USE_AVIF=$(usex avif)
|
||||
-DGDAL_USE_ARROW=$(usex parquet)
|
||||
-DGDAL_USE_BASISU=OFF
|
||||
-DGDAL_USE_BLOSC=$(usex blosc)
|
||||
-DGDAL_USE_BRUNSLI=OFF
|
||||
-DGDAL_USE_CRNLIB=OFF
|
||||
-DGDAL_USE_CFITSIO=$(usex fits)
|
||||
-DGDAL_USE_CURL=$(usex curl)
|
||||
-DGDAL_USE_CRYPTOPP=$(usex cryptopp)
|
||||
-DGDAL_USE_DEFLATE=$(usex libdeflate) # complements zlib
|
||||
-DGDAL_USE_ECW=OFF
|
||||
-DGDAL_USE_EXPAT=ON
|
||||
-DGDAL_USE_EXPRTK=$(usex exprtk)
|
||||
-DGDAL_USE_FILEGDB=OFF
|
||||
-DGDAL_USE_FREEXL=$(usex xls)
|
||||
-DGDAL_USE_FYBA=OFF
|
||||
-DGDAL_USE_GEOTIFF=ON
|
||||
-DGDAL_USE_GEOS=$(usex geos)
|
||||
-DGDAL_USE_GIF=$(usex gif)
|
||||
-DGDAL_USE_GTA=OFF
|
||||
-DGDAL_USE_HEIF=$(usex heif)
|
||||
-DGDAL_USE_HDF4=OFF
|
||||
-DGDAL_USE_HDF5=$(usex hdf5)
|
||||
-DGDAL_USE_HDFS=OFF
|
||||
-DGDAL_USE_ICONV=ON # TODO dep
|
||||
-DGDAL_USE_IDB=OFF
|
||||
-DGDAL_USE_JPEG=ON # bug #965329
|
||||
|
||||
# https://gdal.org/build_hints.html#jpeg12
|
||||
# Independent of whether using system libjpeg
|
||||
-DGDAL_USE_JPEG12_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_JSONC=ON
|
||||
-DGDAL_USE_JXL=$(usex jpegxl)
|
||||
-DGDAL_USE_JXL_THREADS=$(usex jpegxl)
|
||||
-DGDAL_USE_KDU=OFF
|
||||
-DGDAL_USE_KEA=OFF
|
||||
-DGDAL_USE_LERC=$(usex lerc)
|
||||
-DGDAL_USE_LIBAEC=$(usex libaec)
|
||||
-DGDAL_USE_LIBKML=OFF
|
||||
-DGDAL_USE_LIBLZMA=$(usex lzma)
|
||||
-DGDAL_USE_LIBQB3=OFF
|
||||
-DGDAL_USE_LIBXML2=ON
|
||||
-DGDAL_USE_LZ4=$(usex lz4) # FIXME
|
||||
-DGDAL_USE_MONGOCXX=$(usex mongodb)
|
||||
-DGDAL_USE_MRSID=OFF
|
||||
-DGDAL_USE_MSSQL_NCLI=OFF
|
||||
-DGDAL_USE_MSSQL_ODBC=OFF
|
||||
-DGDAL_USE_MUPARSER=$(usex muparser)
|
||||
-DGDAL_USE_MYSQL=$(usex mysql)
|
||||
-DGDAL_USE_NETCDF=$(usex netcdf)
|
||||
-DGDAL_USE_ODBC=$(usex odbc)
|
||||
-DGDAL_USE_ODBCCPP=OFF
|
||||
|
||||
# unpackaged
|
||||
-DGDAL_USE_OPENCAD=OFF
|
||||
-DGDAL_USE_OPENCAD_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_OPENDRIVE=OFF
|
||||
-DGDAL_USE_OPENEXR=$(usex openexr)
|
||||
-DGDAL_USE_OPENJPEG=$(usex jpeg2k)
|
||||
-DGDAL_USE_OPENSSL=ON
|
||||
-DGDAL_USE_ORACLE=$(usex oracle)
|
||||
-DGDAL_USE_PARQUET=$(usex parquet)
|
||||
-DGDAL_USE_PCRE2=ON
|
||||
-DGDAL_USE_PDFIUM=OFF
|
||||
|
||||
# Enable internal implementation so that tests pass with the use disabled
|
||||
-DGDAL_USE_PNG=$(usex png)
|
||||
-DGDAL_USE_PNG_INTERNAL=$(usex !png)
|
||||
|
||||
-DGDAL_USE_PODOFO=OFF
|
||||
-DGDAL_USE_POPPLER=$(usex pdf)
|
||||
-DGDAL_USE_POSTGRESQL=$(usex postgres)
|
||||
-DGDAL_USE_QHULL=$(usex qhull)
|
||||
-DGDAL_USE_RASTERLITE2=OFF
|
||||
|
||||
# upstream recommends using the internal implementation
|
||||
# bug #935567
|
||||
-DGDAL_USE_SHAPELIB=OFF
|
||||
-DGDAL_USE_SHAPELIB_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_SPATIALITE=$(usex spatialite)
|
||||
-DGDAL_USE_SQLITE3=$(usex sqlite)
|
||||
-DGDAL_USE_SFCGAL=OFF
|
||||
-DGDAL_USE_TEIGHA=OFF
|
||||
-DGDAL_USE_TIFF=ON
|
||||
-DGDAL_USE_WEBP=$(usex webp)
|
||||
-DGDAL_USE_XERCESC=$(usex gml)
|
||||
-DGDAL_USE_ZLIB=ON
|
||||
-DGDAL_USE_ZSTD=$(usex zstd)
|
||||
|
||||
# Bindings
|
||||
-DBUILD_PYTHON_BINDINGS=OFF # handled separately
|
||||
-DBUILD_JAVA_BINDINGS=$(usex java)
|
||||
# bug #845369
|
||||
-DBUILD_CSHARP_BINDINGS=OFF
|
||||
|
||||
# Handled differently from x86
|
||||
# First checks if the platform supports neon and if it supports the option will be available
|
||||
# See SSE2NEON_COMPILES in CMakeLists.txt and gdal.cmake
|
||||
-DGDAL_ENABLE_ARM_NEON_OPTIMIZATIONS=$(usex cpu_flags_arm_neon)
|
||||
)
|
||||
|
||||
if use x86 || use amd64 ; then
|
||||
mycmakeargs+=(
|
||||
# Check work/gdal-3.5.0_build/CMakeCache.txt after configure
|
||||
# and https://github.com/OSGeo/gdal/blob/master/cmake/helpers/CheckCompilerMachineOption.cmake#L71
|
||||
# Commented out: not (yet?) implemented upstream.
|
||||
#
|
||||
# check_compiler_machine_option(flag <instruction set>) -> -Dtest_<instruction set>
|
||||
-Dtest_avx=$(usex cpu_flags_x86_avx)
|
||||
-Dtest_avx2=$(usex cpu_flags_x86_avx2)
|
||||
-Dtest_sse=$(usex cpu_flags_x86_sse)
|
||||
-Dtest_sse2=$(usex cpu_flags_x86_sse2)
|
||||
#-Dtest_sse3=$(usex cpu_flags_x86_sse3)
|
||||
-Dtest_sse4.1=$(usex cpu_flags_x86_sse4_1)
|
||||
#-Dtest_sse4.2=$(usex cpu_flags_x86_sse4_2)
|
||||
#-Dtest_sse4a=$(usex cpu_flags_x86_sse4a)
|
||||
-Dtest_ssse3=$(usex cpu_flags_x86_ssse3)
|
||||
#-Dtest_fma4=$(usex cpu_flags_x86_fma4)
|
||||
#-Dtest_xop=$(usex cpu_flags_x86_xop)
|
||||
)
|
||||
fi
|
||||
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DUSE_EXTERNAL_GTEST=ON )
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
|
||||
local cmake_build_dir="${BUILD_DIR}"
|
||||
use python && distutils-r1_src_configure
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
pushd "${S}_python/swig/python" >/dev/null || die
|
||||
distutils-r1_python_compile
|
||||
popd >/dev/null || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
local -x PATH="${BUILD_DIR}/apps:${PATH}"
|
||||
local -x LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}"
|
||||
use python && distutils-r1_src_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -x GDAL_DATA="${S}/data"
|
||||
|
||||
# note: testpaths in pytest.ini will fight EPYTEST_IGNORE
|
||||
EPYTEST_IGNORE=(
|
||||
# network-sandbox and deselecting tests turns into whac-a-mole with their interdependencies
|
||||
"gcore/vsis3.py"
|
||||
)
|
||||
|
||||
use !muparser && EPYTEST_IGNORE+=( "gdrivers/vrtpansharpen.py" )
|
||||
use !pdf && EPYTEST_IGNORE+=( "gdrivers/pdf.py" )
|
||||
|
||||
EPYTEST_DESELECT=(
|
||||
# network-sandbox
|
||||
"gcore/tiff_read.py::test_tiff_read_strace_check"
|
||||
"gcore/vsioss.py::test_vsioss_6"
|
||||
"gdrivers/gdalhttp.py::test_http_ssl_verifystatus"
|
||||
"gdrivers/jp2openjpeg.py::test_jp2openjpeg_45"
|
||||
"gdrivers/wms.py::test_wms_8"
|
||||
"ogr/ogr_csv.py::test_ogr_csv_schema_override"
|
||||
"ogr/ogr_geojson.py::test_ogr_geojson_schema_override"
|
||||
"ogr/ogr_gml.py::test_ogr_gml_type_override"
|
||||
"ogr/ogr_gmlas.py::test_ogr_gmlas_billion_laugh"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_coordinate_epoch"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_crs_identification_on_write"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_edges"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_geoarrow"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_geometry_types"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_polygon_orientation"
|
||||
"ogr/ogr_sqlite.py::test_ogr_sqlite_schema_override"
|
||||
"pyscripts/test_validate_geoparquet.py::test_validate_geoparquet_ok"
|
||||
"utilities/test_gdalinfo_lib.py::test_gdalinfo_lib_2"
|
||||
"utilities/test_gdalinfo_lib.py::test_gdalinfo_lib_5"
|
||||
"utilities/test_gdalinfo_lib.py::test_gdalinfo_lib_json_color_table_and_rat"
|
||||
"utilities/test_ogrinfo_lib.py::test_ogrinfo_lib_extent3D"
|
||||
"utilities/test_ogrinfo_lib.py::test_ogrinfo_lib_json_relationships"
|
||||
"utilities/test_ogrinfo_lib.py::test_ogrinfo_lib_json_validate"
|
||||
|
||||
# sandbox interferes with strace?
|
||||
"gcore/basic_test.py::test_basic_test_strace_non_existing_file"
|
||||
|
||||
# Breaks due to other deselects.
|
||||
"ogr/ogr_gpkg.py::test_ogr_gpkg_immutable"
|
||||
"ogr/ogr_gpkg.py::test_ogr_gpkg_nolock"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_read_large_binary_or_string_for_geometry"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_write_arrow_rewind_polygon"
|
||||
"ogr/ogr_parquet.py::test_ogr_parquet_bbox_float32"
|
||||
"ogr/ogr_sqlite.py::test_ogr_sqlite_34"
|
||||
|
||||
# USE="pdf" poppler 25.07?
|
||||
# assert 8191 in (7926, 8177, 8174, 8165, 8172, 8193)
|
||||
"gdrivers/pdf.py::test_pdf_extra_rasters[POPPLER]"
|
||||
)
|
||||
|
||||
if use !armadillo; then
|
||||
EPYTEST_DESELECT+=(
|
||||
# AssertionError: (1634, (3456541.352648813, 5640759.820845713, 0.0))
|
||||
"gcore/transformer.py::test_transformer_tps_precision"
|
||||
)
|
||||
fi
|
||||
|
||||
if use !sqlite; then
|
||||
EPYTEST_DESELECT+=(
|
||||
# implicit sqlite requirement for the test (or the wms (curl) driver)?
|
||||
"gdrivers/ogcapi.py::test_ogr_ogcapi_vector_tiles"
|
||||
# expects sqlite being enabled in a warning message
|
||||
"utilities/test_gdalalg_vector_rasterize.py::test_gdalalg_vector_rasterize"
|
||||
)
|
||||
fi
|
||||
|
||||
pushd "${S}_python/autotest" >/dev/null || die
|
||||
# https://github.com/OSGeo/gdal/tree/v3.11.3/autotest#gdals-tests-are-not-independent
|
||||
# So run directories separately with reruns to maximise chances without excluding every test
|
||||
#
|
||||
# See pytest_dirs in autotest/CMakeLists.txt.
|
||||
# benchmark excluded on purpose as it uses pytest-benchmark
|
||||
# gdrivers excluded as its especially flaky with excluding tests
|
||||
# gnm excluded as you need to exclude 99% of it leaving only one or two tests
|
||||
local failures=()
|
||||
for pytest_dir in alg gcore gdrivers ogr osr pyscripts utilities; do
|
||||
nonfatal epytest ${pytest_dir}
|
||||
[[ ${?} != 0 ]] && failures+=( ${pytest_dir} )
|
||||
done
|
||||
popd >/dev/null || die
|
||||
|
||||
if [[ ${#failures} -gt 0 ]]; then
|
||||
die "pytest failures: ${failures[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x GDAL_RUN_SLOW_TESTS=0
|
||||
local -x GDAL_DOWNLOAD_TEST_DATA=0 # tests relying on downloaded data **may** be skipped
|
||||
|
||||
cmake_src_test
|
||||
|
||||
local -x PATH="${BUILD_DIR}/apps:${PATH}"
|
||||
local -x LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}"
|
||||
use python && distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_install() {
|
||||
pushd "${S}_python/swig/python" >/dev/null || die
|
||||
distutils-r1_python_install
|
||||
popd >/dev/null || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use java; then
|
||||
# Move the native library into the proper place for Gentoo. The
|
||||
# library in ${ED} has already had its RPATH fixed, so we use it
|
||||
# rather than ${BUILD_DIR}/swig/java/libgdalalljni.so.
|
||||
java-pkg_doso "${ED}/usr/$(get_libdir)/jni/libgdalalljni.so"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/jni" || die
|
||||
fi
|
||||
|
||||
use python && distutils-r1_src_install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Check available image and data formats after building with"
|
||||
if use tools; then
|
||||
elog "gdal info --formats"
|
||||
else
|
||||
elog "gdal-config --formats"
|
||||
fi
|
||||
|
||||
if use java; then
|
||||
elog
|
||||
elog "To use the Java bindings, you need to pass the following to java:"
|
||||
elog " -Djava.library.path=$(java-config -i gdal)"
|
||||
fi
|
||||
}
|
||||
@@ -1,302 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
inherit cmake java-pkg-opt-2 python-single-r1
|
||||
|
||||
DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
|
||||
HOMEPAGE="https://gdal.org/"
|
||||
SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.xz"
|
||||
SRC_URI+=" test? ( https://download.osgeo.org/${PN}/${PV}/${PN}autotest-${PV}.tar.gz )"
|
||||
|
||||
LICENSE="BSD Info-ZIP MIT"
|
||||
SLOT="0/35" # subslot is libgdal.so.<SONAME>
|
||||
KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv x86"
|
||||
IUSE="armadillo +curl cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_ssse3 doc fits geos gif gml hdf5 heif java jpeg jpeg2k lerc lzma mysql netcdf odbc ogdi opencl oracle parquet pdf png postgres python spatialite sqlite test webp xls zstd"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
spatialite? ( sqlite )
|
||||
test? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
doc? ( app-text/doxygen )
|
||||
java? (
|
||||
>=dev-java/ant-1.10.14-r3:0
|
||||
dev-lang/swig
|
||||
)
|
||||
python? (
|
||||
dev-lang/swig
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
dev-cpp/gtest
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/json-c:=
|
||||
dev-libs/libpcre2
|
||||
dev-libs/libxml2:2=
|
||||
dev-libs/openssl:=
|
||||
media-libs/tiff
|
||||
>=sci-libs/libgeotiff-1.5.1-r1:=
|
||||
>=sci-libs/proj-6.0.0:=
|
||||
virtual/minizip:=
|
||||
armadillo? ( sci-libs/armadillo:=[lapack] )
|
||||
curl? ( net-misc/curl )
|
||||
fits? ( sci-libs/cfitsio:= )
|
||||
geos? ( >=sci-libs/geos-3.8.0 )
|
||||
gif? ( media-libs/giflib:= )
|
||||
gml? ( >=dev-libs/xerces-c-3.1:= )
|
||||
heif? ( media-libs/libheif:= )
|
||||
hdf5? ( >=sci-libs/hdf5-1.6.4:=[cxx,szip] )
|
||||
java? (
|
||||
>=virtual/jdk-1.8:*[-headless-awt]
|
||||
)
|
||||
jpeg? ( media-libs/libjpeg-turbo:= )
|
||||
jpeg2k? ( media-libs/openjpeg:2= )
|
||||
lerc? ( media-libs/tiff:=[lerc(-)] )
|
||||
lzma? ( || (
|
||||
app-arch/xz-utils
|
||||
app-arch/lzma
|
||||
) )
|
||||
mysql? ( virtual/mysql )
|
||||
netcdf? ( sci-libs/netcdf:= )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
ogdi? ( >=sci-libs/ogdi-4.1.0-r1 )
|
||||
opencl? ( virtual/opencl )
|
||||
oracle? ( dev-db/oracle-instantclient:= )
|
||||
parquet? ( dev-libs/apache-arrow:=[dataset,parquet] )
|
||||
pdf? ( app-text/poppler:= )
|
||||
png? ( media-libs/libpng:= )
|
||||
postgres? ( >=dev-db/postgresql-8.4:= )
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
spatialite? ( dev-db/spatialite )
|
||||
sqlite? ( dev-db/sqlite:3 )
|
||||
webp? ( media-libs/libwebp:= )
|
||||
xls? ( dev-libs/freexl )
|
||||
zstd? ( app-arch/zstd:= )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
java? ( >=virtual/jre-1.8:* )
|
||||
"
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
_wstat64 # Windows LFS
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.6.4-abseil-cpp-20230125.2-c++17.patch
|
||||
"${FILESDIR}"/${PN}-3.9.1-poppler-24.12.patch
|
||||
"${FILESDIR}"/${P}-poppler-25.0{2,5}.patch
|
||||
"${FILESDIR}"/gdal-3.11.3-java-no-strict-aliasing.patch
|
||||
"${FILESDIR}"/gdal-3.11.4-poppler-25.10.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use python || use test ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
|
||||
use java && java-pkg-opt-2_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use test ; then
|
||||
mv "${WORKDIR}"/gdalautotest-${PV} "${S}"/autotest || die
|
||||
PATCHES+=( "${FILESDIR}"/${P}-poppler-autotest-25.02.patch )
|
||||
fi
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_IPO=OFF
|
||||
-DGDAL_USE_EXTERNAL_LIBS=ON
|
||||
-DGDAL_USE_INTERNAL_LIBS=OFF
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
|
||||
# bug #844874 and bug #845150
|
||||
-DCMAKE_INSTALL_INCLUDEDIR="include/gdal"
|
||||
|
||||
# Options here are generally off because of one of:
|
||||
# - Not yet packaged dependencies
|
||||
#
|
||||
# - Off for autotools build and didn't want more churn by
|
||||
# enabling during port to CMake. Feel free to request them
|
||||
# being turned on if useful for you.
|
||||
-DGDAL_USE_ARMADILLO=$(usex armadillo)
|
||||
-DGDAL_USE_ARROW=OFF
|
||||
-DGDAL_USE_BLOSC=OFF
|
||||
-DGDAL_USE_BRUNSLI=OFF
|
||||
-DGDAL_USE_CRNLIB=OFF
|
||||
-DGDAL_USE_CFITSIO=$(usex fits)
|
||||
-DGDAL_USE_CURL=$(usex curl)
|
||||
-DGDAL_USE_CRYPTOPP=OFF
|
||||
-DGDAL_USE_DEFLATE=OFF
|
||||
-DGDAL_USE_ECW=OFF
|
||||
-DGDAL_USE_EXPAT=ON
|
||||
-DGDAL_USE_FILEGDB=OFF
|
||||
-DGDAL_USE_FREEXL=$(usex xls)
|
||||
-DGDAL_USE_FYBA=OFF
|
||||
-DGDAL_USE_GEOTIFF=ON
|
||||
-DGDAL_USE_GEOS=$(usex geos)
|
||||
-DGDAL_USE_GIF=$(usex gif)
|
||||
-DGDAL_USE_GTA=OFF
|
||||
-DGDAL_USE_HEIF=$(usex heif)
|
||||
-DGDAL_USE_HDF4=OFF
|
||||
-DGDAL_USE_HDF5=$(usex hdf5)
|
||||
-DGDAL_USE_HDFS=OFF
|
||||
-DGDAL_USE_ICONV=ON # TODO dep
|
||||
-DGDAL_USE_IDB=OFF
|
||||
-DGDAL_USE_JPEG=$(usex jpeg)
|
||||
|
||||
# https://gdal.org/build_hints.html#jpeg12
|
||||
# Independent of whether using system libjpeg
|
||||
-DGDAL_USE_JPEG12_INTERNAL=ON
|
||||
|
||||
-DGDAL_USE_JSONC=ON
|
||||
-DGDAL_USE_JXL=OFF
|
||||
-DGDAL_USE_KDU=OFF
|
||||
-DGDAL_USE_KEA=OFF
|
||||
-DGDAL_USE_LERC=$(usex lerc)
|
||||
-DGDAL_USE_LIBKML=OFF
|
||||
-DGDAL_USE_LIBLZMA=$(usex lzma)
|
||||
-DGDAL_USE_LIBXML2=ON
|
||||
-DGDAL_USE_LURATECH=OFF
|
||||
-DGDAL_USE_LZ4=OFF
|
||||
-DGDAL_USE_MONGOCXX=OFF
|
||||
-DGDAL_USE_MRSID=OFF
|
||||
-DGDAL_USE_MSSQL_NCLI=OFF
|
||||
-DGDAL_USE_MSSQL_ODBC=OFF
|
||||
-DGDAL_USE_MYSQL=$(usex mysql)
|
||||
-DGDAL_USE_NETCDF=$(usex netcdf)
|
||||
-DGDAL_USE_ODBC=$(usex odbc)
|
||||
-DGDAL_USE_ODBCCPP=OFF
|
||||
-DGDAL_USE_OGDI=$(usex ogdi)
|
||||
-DGDAL_USE_OPENCAD=OFF
|
||||
-DGDAL_USE_OPENCL=$(usex opencl)
|
||||
-DGDAL_USE_OPENEXR=OFF
|
||||
-DGDAL_USE_OPENJPEG=$(usex jpeg2k)
|
||||
-DGDAL_USE_OPENSSL=ON
|
||||
-DGDAL_USE_ORACLE=$(usex oracle)
|
||||
-DGDAL_USE_PARQUET=$(usex parquet)
|
||||
-DGDAL_USE_PCRE2=ON
|
||||
-DGDAL_USE_PDFIUM=OFF
|
||||
-DGDAL_USE_PNG=$(usex png)
|
||||
-DGDAL_USE_PODOFO=OFF
|
||||
-DGDAL_USE_POPPLER=$(usex pdf)
|
||||
-DGDAL_USE_POSTGRESQL=$(usex postgres)
|
||||
-DGDAL_USE_QHULL=OFF
|
||||
-DGDAL_USE_RASTERLITE2=OFF
|
||||
-DGDAL_USE_RDB=OFF
|
||||
-DGDAL_USE_SPATIALITE=$(usex spatialite)
|
||||
-DGDAL_USE_SQLITE3=$(usex sqlite)
|
||||
-DGDAL_USE_SFCGAL=OFF
|
||||
-DGDAL_USE_TEIGHA=OFF
|
||||
-DGDAL_USE_TIFF=ON
|
||||
-DGDAL_USE_TILEDB=OFF
|
||||
-DGDAL_USE_WEBP=$(usex webp)
|
||||
-DGDAL_USE_XERCESC=$(usex gml)
|
||||
-DGDAL_USE_ZLIB=ON
|
||||
-DGDAL_USE_ZSTD=$(usex zstd)
|
||||
|
||||
# Bindings
|
||||
-DBUILD_PYTHON_BINDINGS=$(usex python)
|
||||
-DBUILD_JAVA_BINDINGS=$(usex java)
|
||||
# bug #845369
|
||||
-DBUILD_CSHARP_BINDINGS=OFF
|
||||
|
||||
# Check work/gdal-3.5.0_build/CMakeCache.txt after configure
|
||||
# and https://github.com/OSGeo/gdal/blob/master/cmake/helpers/CheckCompilerMachineOption.cmake#L71
|
||||
# Commented out: not (yet?) implemented upstream.
|
||||
# Also, arm64 stuff is a TODO upstream, but not there (yet?)
|
||||
-Dtest_avx=$(usex cpu_flags_x86_avx)
|
||||
-Dtest_avx2=$(usex cpu_flags_x86_avx2)
|
||||
-Dtest_sse=$(usex cpu_flags_x86_sse)
|
||||
-Dtest_sse2=$(usex cpu_flags_x86_sse2)
|
||||
#-Dtest_sse3=$(usex cpu_flags_x86_sse3)
|
||||
-Dtest_sse4.1=$(usex cpu_flags_x86_sse4_1)
|
||||
#-Dtest_sse4.2=$(usex cpu_flags_x86_sse4_2)
|
||||
#-Dtest_sse4a=$(usex cpu_flags_x86_sse4a)
|
||||
-Dtest_ssse3=$(usex cpu_flags_x86_ssse3)
|
||||
#-Dtest_fma4=$(usex cpu_flags_x86_fma4)
|
||||
#-Dtest_xop=$(usex cpu_flags_x86_xop)
|
||||
)
|
||||
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DUSE_EXTERNAL_GTEST=ON )
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
use doc && cmake_src_compile doc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export GDAL_RUN_SLOW_TESTS=0
|
||||
export GDAL_DOWNLOAD_TEST_DATA=0
|
||||
|
||||
# Two test suites:
|
||||
# 1. autotests (much larger, uses pytest)
|
||||
# 2. Small set of fuzzing tests (no download needed)
|
||||
|
||||
CMAKE_SKIP_TESTS=(
|
||||
# Missing file for test-unit?
|
||||
"test-unit"
|
||||
# requires pytest-benchmark
|
||||
"autotest_benchmark"
|
||||
# network sandbox
|
||||
# TODO: granularly skip network sandbox breaking tests?
|
||||
"autotest_gcore"
|
||||
"autotest_gdrivers"
|
||||
"autotest_utilities"
|
||||
)
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use python && python_optimize
|
||||
|
||||
if use java; then
|
||||
# Move the native library into the proper place for Gentoo. The
|
||||
# library in ${ED} has already had its RPATH fixed, so we use it
|
||||
# rather than ${BUILD_DIR}/swig/java/libgdalalljni.so.
|
||||
java-pkg_doso "${ED}/usr/$(get_libdir)/jni/libgdalalljni.so"
|
||||
rm -rf "${ED}/usr/$(get_libdir)/jni" || die
|
||||
fi
|
||||
|
||||
# TODO: install docs?
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Check available image and data formats after building with"
|
||||
elog "gdalinfo and ogrinfo (using the --formats switch)."
|
||||
|
||||
if use java; then
|
||||
elog
|
||||
elog "To use the Java bindings, you need to pass the following to java:"
|
||||
elog " -Djava.library.path=$(java-config -i gdal)"
|
||||
fi
|
||||
}
|
||||
@@ -26,7 +26,6 @@
|
||||
<flag name="libdeflate">Use <pkg>app-arch/libdeflate</pkg> for faster compression and decompression</flag>
|
||||
<flag name="mongodb">Enable support for MongoDBV3 driver with <pkg>dev-db/mongodb</pkg></flag>
|
||||
<flag name="muparser">Enable support for C++ VRT expressions with <pkg>dev-cpp/muParser</pkg></flag>
|
||||
<flag name="ogdi">Enable support for the open geographic datastore interface (<pkg>sci-libs/ogdi</pkg>)</flag>
|
||||
<flag name="parquet">Enables read/write parquet data format (<pkg>dev-libs/apache-arrow</pkg>)</flag>
|
||||
<flag name="qhull">Enable support for linear interpolation of gdal_grid with <pkg>media-libs/qhull</pkg></flag>
|
||||
<flag name="spatialite">Enable Spatial DBMS over sqlite <pkg>dev-db/spatialite</pkg></flag>
|
||||
|
||||
Reference in New Issue
Block a user