public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/kealib] rawhide: Add kealib-gdal313.patch
Date: Tue, 23 Jun 2026 06:11:47 GMT [thread overview]
Message-ID: <178219510712.1.16390143405079104802.rpms-kealib-834a6d9ee3d4@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/kealib
Branch : rawhide
Commit : 834a6d9ee3d4b40ed4f43dcae5d5e7538d6f6288
Author : Sandro Mani <manisandro@gmail.com>
Date : 2026-06-23T08:11:36+02:00
Stats : +195/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/kealib/c/834a6d9ee3d4b40ed4f43dcae5d5e7538d6f6288?branch=rawhide
Log:
Add kealib-gdal313.patch
---
diff --git a/kealib-gdal313.patch b/kealib-gdal313.patch
new file mode 100644
index 0000000..eb80317
--- /dev/null
+++ b/kealib-gdal313.patch
@@ -0,0 +1,192 @@
+diff -rupN --no-dereference kealib-1.6.2/gdal/keaband.cpp kealib-1.6.2-new/gdal/keaband.cpp
+--- kealib-1.6.2/gdal/keaband.cpp 2025-04-28 10:56:15.000000000 +0200
++++ kealib-1.6.2-new/gdal/keaband.cpp 2026-06-23 08:05:04.530741672 +0200
+@@ -464,7 +464,11 @@ const char *KEARasterBand::GetMetadataIt
+ }
+
+ // get all the metadata as a CSLStringList - not thread safe
++#ifdef HAVE_METADATA_CSLCONST_LIST
++CSLConstList KEARasterBand::GetMetadata(const char *pszDomain)
++#else
+ char **KEARasterBand::GetMetadata(const char *pszDomain)
++#endif
+ {
+ // only deal with 'default' domain - no geolocation etc
+ if( ( pszDomain != nullptr ) && ( *pszDomain != '\0' ) )
+@@ -477,7 +481,11 @@ char **KEARasterBand::GetMetadata(const
+ }
+
+ // set the metadata as a CSLStringList
++#ifdef HAVE_METADATA_CSLCONST_LIST
++CPLErr KEARasterBand::SetMetadata(CSLConstList papszMetadata, const char *pszDomain)
++#else
+ CPLErr KEARasterBand::SetMetadata(char **papszMetadata, const char *pszDomain)
++#endif
+ {
+ CPLMutexHolderD( &m_hMutex );
+ // only deal with 'default' domain - no geolocation etc
+diff -rupN --no-dereference kealib-1.6.2/gdal/keaband.h kealib-1.6.2-new/gdal/keaband.h
+--- kealib-1.6.2/gdal/keaband.h 2026-06-23 08:05:04.524917687 +0200
++++ kealib-1.6.2-new/gdal/keaband.h 2026-06-23 08:05:04.531633097 +0200
+@@ -52,6 +52,12 @@
+ #else
+ #pragma message ("HAVE_SETVALUE_CPLERR not present")
+ #endif
++#if (GDAL_VERSION_MAJOR > 3) || ((GDAL_VERSION_MAJOR == 3) && (GDAL_VERSION_MINOR >= 13))
++ #define HAVE_METADATA_CSLCONST_LIST
++ #pragma message ("defining HAVE_METADATA_CSLCONST_LIST")
++#else
++ #pragma message ("HAVE_METADATA_CSLCONST_LIST not present")
++#endif
+
+ #include "keadataset.h"
+
+@@ -91,8 +97,13 @@ public:
+ // virtual methods for handling the metadata
+ CPLErr SetMetadataItem (const char *pszName, const char *pszValue, const char *pszDomain="");
+ const char *GetMetadataItem (const char *pszName, const char *pszDomain="");
+- char **GetMetadata(const char *pszDomain="");
+- CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="");
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList GetMetadata(const char *pszDomain="") override;
++ CPLErr SetMetadata(CSLConstList papszMetadata, const char *pszDomain="") override;
++#else
++ char **GetMetadata(const char *pszDomain="") override;
++ CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="") override;
++#endif
+
+ // virtual methods for the no data value
+ double GetNoDataValue(int *pbSuccess=nullptr);
+diff -rupN --no-dereference kealib-1.6.2/gdal/keacopy.cpp kealib-1.6.2-new/gdal/keacopy.cpp
+--- kealib-1.6.2/gdal/keacopy.cpp 2026-06-23 08:05:04.525108733 +0200
++++ kealib-1.6.2-new/gdal/keacopy.cpp 2026-06-23 08:05:04.531786439 +0200
+@@ -33,6 +33,7 @@
+ #include "libkea/KEAImageIO.h"
+ #include "libkea/KEAAttributeTable.h"
+ #include "libkea/KEAAttributeTableInMem.h"
++#include "keaband.h" // for HAVE_METADATA_CSLCONST_LIST
+
+ // Support functions for CreateCopy()
+
+@@ -282,7 +283,11 @@ void CopyRAT(GDALRasterBand *pBand, keal
+ // or band index to copy a band's metadata
+ void CopyMetadata( GDALMajorObject *pObject, kealib::KEAImageIO *pImageIO, int nBand)
+ {
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList ppszMetadata = pObject->GetMetadata();
++#else
+ char **ppszMetadata = pObject->GetMetadata();
++#endif
+ if( ppszMetadata != nullptr )
+ {
+ char *pszName;
+diff -rupN --no-dereference kealib-1.6.2/gdal/keadataset.cpp kealib-1.6.2-new/gdal/keadataset.cpp
+--- kealib-1.6.2/gdal/keadataset.cpp 2026-06-23 08:05:04.525365116 +0200
++++ kealib-1.6.2-new/gdal/keadataset.cpp 2026-06-23 08:05:04.532356447 +0200
+@@ -214,7 +214,11 @@ int KEADataset::Identify( GDALOpenInfo *
+ GDALDataset *KEADataset::Create( const char * pszFilename,
+ int nXSize, int nYSize, int nBands,
+ GDALDataType eType,
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList papszParmList )
++#else
+ char ** papszParmList )
++#endif
+ {
+ GDALDriverH hDriver = GDALGetDriverByName( "KEA" );
+ if( ( hDriver == nullptr ) || !GDALValidateCreationOptions( hDriver, papszParmList ) )
+@@ -335,7 +339,12 @@ GDALDataset *KEADataset::Create( const c
+ }
+
+ GDALDataset *KEADataset::CreateCopy( const char * pszFilename, GDALDataset *pSrcDs,
+- int bStrict, char ** papszParmList,
++ int bStrict,
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList papszParmList,
++#else
++ char ** papszParmList,
++#endif
+ GDALProgressFunc pfnProgress, void *pProgressData )
+ {
+ GDALDriverH hDriver = GDALGetDriverByName( "KEA" );
+@@ -796,7 +805,11 @@ const char *KEADataset::GetMetadataItem
+ }
+
+ // get the whole metadata as CSLStringList - note may be thread safety issues
+-char **KEADataset::GetMetadata(const char *pszDomain)
++#ifdef HAVE_METADATA_CSLCONST_LIST
++CSLConstList KEADataset::GetMetadata(const char *pszDomain)
++#else
++char ** KEADataset::GetMetadata(const char *pszDomain)
++#endif
+ {
+ // only deal with 'default' domain - no geolocation etc
+ if( ( pszDomain != nullptr ) && ( *pszDomain != '\0' ) )
+@@ -806,7 +819,11 @@ char **KEADataset::GetMetadata(const cha
+ }
+
+ // set the whole metadata as a CSLStringList
++#ifdef HAVE_METADATA_CSLCONST_LIST
++CPLErr KEADataset::SetMetadata(CSLConstList papszMetadata, const char *pszDomain)
++#else
+ CPLErr KEADataset::SetMetadata(char **papszMetadata, const char *pszDomain)
++#endif
+ {
+ CPLMutexHolderD( &m_hMutex );
+ // only deal with 'default' domain - no geolocation etc
+@@ -839,7 +856,11 @@ CPLErr KEADataset::SetMetadata(char **pa
+ return CE_None;
+ }
+
++#ifdef HAVE_METADATA_CSLCONST_LIST
++CPLErr KEADataset::AddBand(GDALDataType eType, CSLConstList papszOptions)
++#else
+ CPLErr KEADataset::AddBand(GDALDataType eType, char **papszOptions)
++#endif
+ {
+ // process any creation options in papszOptions
+ unsigned int nimageBlockSize = kealib::KEA_IMAGE_CHUNK_SIZE;
+diff -rupN --no-dereference kealib-1.6.2/gdal/keadataset.h kealib-1.6.2-new/gdal/keadataset.h
+--- kealib-1.6.2/gdal/keadataset.h 2026-06-23 08:05:04.525641999 +0200
++++ kealib-1.6.2-new/gdal/keadataset.h 2026-06-23 08:05:04.533053893 +0200
+@@ -51,9 +51,18 @@ public:
+ static GDALDataset *Create( const char * pszFilename,
+ int nXSize, int nYSize, int nBands,
+ GDALDataType eType,
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList papszParmList );
++#else
+ char ** papszParmList );
++#endif
+ static GDALDataset *CreateCopy( const char * pszFilename, GDALDataset *pSrcDs,
+- int bStrict, char ** papszParmList,
++ int bStrict,
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList papszParmList,
++#else
++ char ** papszParmList,
++#endif
+ GDALProgressFunc pfnProgress, void *pProgressData );
+
+ // virtual methods for dealing with transform and projection
+@@ -75,11 +84,20 @@ public:
+ CPLErr SetMetadataItem (const char *pszName, const char *pszValue, const char *pszDomain="");
+ const char *GetMetadataItem (const char *pszName, const char *pszDomain="");
+
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CSLConstList GetMetadata(const char *pszDomain="") override;
++ CPLErr SetMetadata(CSLConstList papszMetadata, const char *pszDomain="") override;
++#else
+ char **GetMetadata(const char *pszDomain="");
+ CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="");
++#endif
+
+ // virtual method for adding new image bands
++#ifdef HAVE_METADATA_CSLCONST_LIST
++ CPLErr AddBand(GDALDataType eType, CSLConstList papszOptions = NULL) override;
++#else
+ CPLErr AddBand(GDALDataType eType, char **papszOptions = NULL);
++#endif
+ // removing image bands (only after GDAL 2.0)
+ OGRErr DeleteLayer(int iLayer);
+
diff --git a/kealib.spec b/kealib.spec
index f4cb60f..23d7da8 100644
--- a/kealib.spec
+++ b/kealib.spec
@@ -15,6 +15,9 @@ Patch0: kealib-cmakedir.patch
# https://github.com/ubarsc/kealib/commit/db4a900d42babb81d2ac2c397df11ac4eaf46a5a
# https://github.com/ubarsc/kealib/commit/b9cf5d48c0968698d4443d06b080be6e011d6779
Patch1: kealib-gdal312.patch
+# Fix build against gdal-3.13
+# https://github.com/ubarsc/kealib/commit/2b434a3cd671f052ee79ff374fae8ebf1e5ea4fb
+Patch2: kealib-gdal313.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
reply other threads:[~2026-06-23 6:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178219510712.1.16390143405079104802.rpms-kealib-834a6d9ee3d4@fedoraproject.org \
--to=manisandro@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox