]> git.pld-linux.org Git - packages/gdal.git/commitdiff
Release 21 (by relup.sh) master auto/th/gdal-3.0.4-21
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 31 Jul 2023 18:21:18 +0000 (20:21 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 31 Jul 2023 18:21:18 +0000 (20:21 +0200)
gcc11.patch [new file with mode: 0644]
gdal-pluginsdir.patch
gdal-poppler.patch [new file with mode: 0644]
gdal-sh.patch [deleted file]
gdal.spec
gdal_tirpcinc.patch [new file with mode: 0644]
jasper.patch [new file with mode: 0644]

diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644 (file)
index 0000000..0f87318
--- /dev/null
@@ -0,0 +1,48 @@
+From 7a18e2669a733ebe3544e4f5c735fd4d2ded5fa3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder@redhat.com>
+Date: Thu, 10 Dec 2020 14:02:44 +0100
+Subject: [PATCH] Add some missing <limits> includes
+
+Otherwise, the builds fails with either gcc11 or recent clang.
+---
+ gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp | 1 +
+ gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp  | 1 +
+ gdal/third_party/LercLib/Lerc2.h                   | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp b/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
+index f59f7d50e2f5..edff5100e1f4 100644
+--- a/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
++++ b/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
+@@ -31,6 +31,7 @@
+ #include "cadobjects.h"
++#include <limits>
+ #include <math.h>
+ #include <algorithm>
+diff --git a/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp b/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
+index 83951fd7e7fc..6ae837da6467 100644
+--- a/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
++++ b/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
+@@ -36,6 +36,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <iostream>
++#include <limits>
+ #include <memory>
+ #include <string>
+diff --git a/gdal/third_party/LercLib/Lerc2.h b/gdal/third_party/LercLib/Lerc2.h
+index feec95529c83..564f928ee672 100644
+--- a/gdal/third_party/LercLib/Lerc2.h
++++ b/gdal/third_party/LercLib/Lerc2.h
+@@ -27,6 +27,7 @@ Contributors:  Thomas Maurer
+ #include <algorithm>
+ #include <cfloat>
+ #include <cmath>
++#include <limits>
+ #include <string>
+ #include <typeinfo>
+ #include "Defines.h"
index fa9ef60b81407cd0fcbb6ea7d40899da5c73e540..51eadc4ae05a71dcb8b707197b040a0cfd3d66a0 100644 (file)
@@ -1,25 +1,9 @@
---- gdal-1.11.2/gcore/gdaldrivermanager.cpp.orig       2015-02-10 13:12:08.000000000 +0100
-+++ gdal-1.11.2/gcore/gdaldrivermanager.cpp    2015-03-01 21:11:24.537623226 +0100
-@@ -686,12 +686,12 @@
-     }
-     else
-     {
--#ifdef GDAL_PREFIX
-+#if 1
-         papszSearchPath = CSLAddString( papszSearchPath,
-     #ifdef MACOSX_FRAMEWORK
-                                         GDAL_PREFIX "/PlugIns");
-     #else
--                                        GDAL_PREFIX "/lib/gdalplugins" );
-+                                        GDAL_LIBDIR "/gdalplugins" );
-     #endif
- #else
-         char szExecPath[1024];
---- gdal-1.11.2/configure.ac.orig      2015-03-01 09:07:33.069445871 +0100
-+++ gdal-1.11.2/configure.ac   2015-03-01 21:13:55.727616880 +0100
-@@ -3812,12 +3812,16 @@
+diff -urNp -x '*.orig' gdal-3.0.4.org/configure.ac gdal-3.0.4/configure.ac
+--- gdal-3.0.4.org/configure.ac        2021-04-02 16:52:15.663388370 +0200
++++ gdal-3.0.4/configure.ac    2021-04-02 16:52:16.026721386 +0200
+@@ -5219,12 +5219,16 @@ dnl ------------------------------------
  
- if test "$prefix" = "NONE" ; then 
+ if test "$prefix" = "NONE" ; then
    GDAL_PREFIX=/usr/local
 +  GDAL_LIBDIR=${GDAL_PREFIX}/lib
  else
  
  dnl ---------------------------------------------------------------------------
  dnl Perl bindings.
+diff -urNp -x '*.orig' gdal-3.0.4.org/gcore/gdaldrivermanager.cpp gdal-3.0.4/gcore/gdaldrivermanager.cpp
+--- gdal-3.0.4.org/gcore/gdaldrivermanager.cpp 2020-01-28 11:18:44.000000000 +0100
++++ gdal-3.0.4/gcore/gdaldrivermanager.cpp     2021-04-02 16:52:16.026721386 +0200
+@@ -745,12 +745,12 @@ void GDALDriverManager::AutoLoadDrivers(
+     }
+     else
+     {
+-#ifdef GDAL_PREFIX
++#if 1
+         papszSearchPath = CSLAddString( papszSearchPath,
+     #ifdef MACOSX_FRAMEWORK
+                                         GDAL_PREFIX "/PlugIns");
+     #else
+-                                        GDAL_PREFIX "/lib/gdalplugins" );
++                                        GDAL_LIBDIR "/gdalplugins" );
+     #endif
+ #else
+         char szExecPath[1024];
diff --git a/gdal-poppler.patch b/gdal-poppler.patch
new file mode 100644 (file)
index 0000000..243c4ce
--- /dev/null
@@ -0,0 +1,74 @@
+From 17e98757e78969a199d1d6318f53d088da192191 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Fri, 18 Feb 2022 22:47:01 +0100
+Subject: [PATCH] PDF: fix build against Poppler > 22.2
+
+---
+ frmts/pdf/pdfdataset.cpp | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/frmts/pdf/pdfdataset.cpp b/frmts/pdf/pdfdataset.cpp
+index 22238bd74822..08f8e31c86a7 100644
+--- a/frmts/pdf/pdfdataset.cpp
++++ b/frmts/pdf/pdfdataset.cpp
+@@ -4101,8 +4101,6 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
+ #ifdef HAVE_POPPLER
+   if(bUseLib.test(PDFLIB_POPPLER))
+   {
+-    GooString* poUserPwd = nullptr;
+-
+     /* Set custom error handler for poppler errors */
+ #if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 85
+     setErrorCallback(PDFDatasetErrorFunction);
+@@ -4136,8 +4134,6 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
+     while( true )
+     {
+         VSIFSeekL(fp, 0, SEEK_SET);
+-        if (pszUserPwd)
+-            poUserPwd = new GooString(pszUserPwd);
+ #if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58
+         auto poStream = new VSIPDFFileStream(fp, pszFilename, std::move(oObj));
+@@ -4145,8 +4141,18 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
+         oObj.getObj()->initNull();
+         auto poStream = new VSIPDFFileStream(fp, pszFilename, oObj.getObj());
+ #endif
++#if POPPLER_MAJOR_VERSION > 22 || (POPPLER_MAJOR_VERSION == 22 && POPPLER_MINOR_VERSION > 2)
++        std::optional<GooString> osUserPwd;
++        if (pszUserPwd)
++            osUserPwd = std::optional<GooString>(pszUserPwd);
++        poDocPoppler = new PDFDoc(poStream, std::optional<GooString>(), osUserPwd);
++#else
++        GooString* poUserPwd = nullptr;
++        if (pszUserPwd)
++            poUserPwd = new GooString(pszUserPwd);
+         poDocPoppler = new PDFDoc(poStream, nullptr, poUserPwd);
+         delete poUserPwd;
++#endif
+         if ( !poDocPoppler->isOk() || poDocPoppler->getNumPages() == 0 )
+         {
+--- gdal-3.0.4/frmts/pdf/pdfdataset.cpp.orig   2022-04-15 17:08:03.072819386 +0200
++++ gdal-3.0.4/frmts/pdf/pdfdataset.cpp        2022-04-15 17:43:26.613241927 +0200
+@@ -4837,7 +4837,11 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
+ #ifdef HAVE_POPPLER
+   if (bUseLib.test(PDFLIB_POPPLER))
+   {
++#if POPPLER_MAJOR_VERSION > 22 || (POPPLER_MAJOR_VERSION == 22 && POPPLER_MINOR_VERSION > 3)
++    std::unique_ptr<GooString> poMetadata = poCatalogPoppler->readMetadata();
++#else
+     GooString* poMetadata = poCatalogPoppler->readMetadata();
++#endif
+     if (poMetadata)
+     {
+ #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72)
+@@ -4851,7 +4855,9 @@ PDFDataset *PDFDataset::Open( GDALOpenIn
+             const char * const apszMDList[2] = { pszContent, nullptr };
+             poDS->SetMetadata(const_cast<char**>(apszMDList), "xml:XMP");
+         }
++#if POPPLER_MAJOR_VERSION < 22 || (POPPLER_MAJOR_VERSION == 22 && POPPLER_MINOR_VERSION < 4)
+         delete poMetadata;
++#endif
+     }
+     /* Read Info object */
diff --git a/gdal-sh.patch b/gdal-sh.patch
deleted file mode 100644 (file)
index 79fd60c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- gdal-1.9.0/configure.ac.orig       2012-01-04 08:03:42.000000000 +0100
-+++ gdal-1.9.0/configure.ac    2012-01-19 20:50:08.902476176 +0100
-@@ -1493,7 +1493,7 @@
-       AC_MSG_CHECKING([libnetcdf version with $ncdump]) 
-       netcdf_version=`$ncdump 2>&1 | grep "netcdf library version" | awk '{gsub(/"/,"");print $4}'`
-       AC_MSG_RESULT([got $netcdf_version])
--      if test "$netcdf_version" != "" -a "${netcdf_version:0:1}" == "4" ; then
-+      if test "$netcdf_version" != "" -a "$(echo ${netcdf_version} | sed 's/^\(.\).*/\1/')" == "4" ; then
-           nc_config=$NETCDF_ROOT"/bin/nc-config"
-       fi
-     fi
index 8795888e9aea826890f4b3206755ba4706e753ba..b60a35f036e8131dbd056d0be7469b9a8a7b01d9 100644 (file)
--- a/gdal.spec
+++ b/gdal.spec
 %if %{with podofo}
 %undefine      with_poppler
 %endif
+
+%{?use_default_jdk}
+
 Summary:       Geospatial Data Abstraction Library
 Summary(pl.UTF-8):     Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
 Name:          gdal
 Version:       3.0.4
-Release:       1
+Release:       21
 License:       BSD-like
 Group:         Libraries
 Source0:       https://github.com/OSGeo/gdal/releases/download/v%{version}/%{name}-%{version}.tar.gz
@@ -61,7 +64,11 @@ Patch2:              %{name}-dds.patch
 Patch3:                %{name}-rasdaman.patch
 Patch4:                %{name}-pluginsdir.patch
 Patch5:                libx32.patch
+Patch6:                %{name}-poppler.patch
 Patch7:                decl.patch
+Patch8:                %{name}_tirpcinc.patch
+Patch9:                jasper.patch
+Patch10:       gcc11.patch
 URL:           http://www.gdal.org/
 # 1.x or 2.x supported
 BuildRequires: CharLS-devel
@@ -85,7 +92,7 @@ BuildRequires:        giflib-devel >= 4.0
 BuildRequires: hdf-devel >= 4.2.5
 BuildRequires: hdf5-devel
 BuildRequires: jasper-devel
-%{?with_java:BuildRequires:    jdk}
+%{?with_java:%buildrequires_jdk}
 %{?with_java:BuildRequires:    jpackage-utils}
 BuildRequires: json-c-devel >= 0.11
 %{?with_kea:BuildRequires:     kealib-devel}
@@ -127,7 +134,7 @@ BuildRequires:      python-setuptools
 BuildRequires: qhull-devel >= 2012
 %{?with_rasdaman:BuildRequires:        rasdaman-devel}
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: rpmbuild(macros) >= 2.021
 BuildRequires: sed >= 4.0
 BuildRequires: sqlite3-devel >= 3.0.0
 BuildRequires: swig-perl
@@ -140,6 +147,7 @@ BuildRequires:      xz-devel
 BuildRequires: zlib-devel >= 1.1.4
 # for ZSTD compression in TIFF
 BuildRequires: zstd-devel
+%{?with_java:Requires:  %{?use_jdk:%{use_jdk}-jre-base}%{!?use_jdk:jre}}
 Requires:      freexl >= 1.0
 Requires:      geos >= 3.1.0
 Requires:      hdf >= 4.2.5
@@ -272,7 +280,11 @@ Moduł Pythona GDAL.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 %patch7 -p1
+%patch8 -p1
+%patch9 -p2
+%patch10 -p2
 
 # need to regenerate (old ones don't support perl 5.10)
 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
@@ -314,6 +326,9 @@ sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' \
       swig/python/scripts/rgb2pct.py
 
 %build
+cp -f /usr/share/gettext/config.rpath .
+
+%if %{with java}
 %ifarch %{x8664}
 jvm_arch=amd64
 %endif
@@ -323,6 +338,21 @@ jvm_arch=i386
 %ifarch x32
 jvm_arch=x32
 %endif
+%ifarch aarch64
+jvm_arch=aarch64
+%endif
+%ifarch %{arm}
+jvm_arch=aarch32
+%endif
+for jvm_type in server client; do
+       for dir in lib jre/lib/$jvm_arch; do
+               if [ -f "%{java_home}/$dir/$jvm_type/libjvm.so" ]; then
+                       jvm_lib="%{java_home}/$dir/$jvm_type"
+                       break
+               fi
+       done
+done
+%endif
 
 %{__libtoolize}
 %{__aclocal} -I m4
@@ -341,7 +371,7 @@ jvm_arch=x32
        %{?with_java:--with-java=%{java_home}} \
        --with-liblzma \
        %{!?with_kea:--without-kea} \
-       %{?with_java:--with-mdb --with-jvm-lib-add-rpath --with-jvm-lib=%{java_home}/jre/lib/$jvm_arch/server} \
+       %{?with_java:--with-mdb --with-jvm-lib-add-rpath --with-jvm-lib="$jvm_lib"} \
        %{?with_mysql:--with-mysql} \
        %{?with_oci:--with-oci --with-oci-include=/usr/include/oracle/client --with-oci-lib=%{_libdir}} \
        %{?with_opencl:--with-opencl} \
diff --git a/gdal_tirpcinc.patch b/gdal_tirpcinc.patch
new file mode 100644 (file)
index 0000000..de5985f
--- /dev/null
@@ -0,0 +1,24 @@
+diff -rupN --no-dereference gdal-3.2.0-fedora/frmts/dods/GNUmakefile gdal-3.2.0-fedora-new/frmts/dods/GNUmakefile
+--- gdal-3.2.0-fedora/frmts/dods/GNUmakefile   2020-10-26 14:05:39.000000000 +0100
++++ gdal-3.2.0-fedora-new/frmts/dods/GNUmakefile       2020-11-12 00:13:52.314881073 +0100
+@@ -4,7 +4,7 @@ include ../../GDALmake.opt
+ OBJ   =       dodsdataset2.o
+-CPPFLAGS      :=       $(CPPFLAGS) $(DODS_INC)
++CPPFLAGS      :=       $(CPPFLAGS) $(DODS_INC) -I/usr/include/tirpc
+ default:      $(OBJ:.o=.$(OBJ_EXT))
+diff -rupN --no-dereference gdal-3.2.0-fedora/ogr/ogrsf_frmts/dods/GNUmakefile gdal-3.2.0-fedora-new/ogr/ogrsf_frmts/dods/GNUmakefile
+--- gdal-3.2.0-fedora/ogr/ogrsf_frmts/dods/GNUmakefile 2020-10-26 14:05:39.000000000 +0100
++++ gdal-3.2.0-fedora-new/ogr/ogrsf_frmts/dods/GNUmakefile     2020-11-12 00:13:52.314881073 +0100
+@@ -5,7 +5,7 @@ include ../../../GDALmake.opt
+ OBJ   =       ogrdodsdriver.o ogrdodsdatasource.o ogrdodslayer.o \
+               ogrdodssequencelayer.o ogrdodsfielddefn.o ogrdodsgrid.o
+-CPPFLAGS      :=      -I..  $(CPPFLAGS) $(DODS_INC) -DDO_NOT_USE_DEBUG_BOOL
++CPPFLAGS      :=      -I..  $(CPPFLAGS) $(DODS_INC) -DDO_NOT_USE_DEBUG_BOOL -I/usr/include/tirpc
+ default:      $(O_OBJ:.o=.$(OBJ_EXT))
diff --git a/jasper.patch b/jasper.patch
new file mode 100644 (file)
index 0000000..773c84f
--- /dev/null
@@ -0,0 +1,128 @@
+From 3c5cb6266a01a607ee7560807465bc833240d793 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 10 Aug 2020 17:26:53 +0200
+Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
+
+---
+ gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
+index 3e668ffe503..2d3f4e46876 100644
+--- a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
++++ b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
+@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
+     /* the JP2 boxes match the ones of the code stream */
+     if (nBands != 0)
+     {
+-        if (nBands != jas_image_numcmpts( psImage ))
++        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
+         {
+             CPLError(CE_Failure, CPLE_AppDefined,
+                      "The number of components indicated in the IHDR box (%d) mismatch "
+@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
+ {
+     int         iFormat;
+-    char        *pszFormatName = nullptr;
++    const char *pszFormatName = nullptr;
+     if (!Identify(poOpenInfo))
+         return nullptr;
+From e236eeaed1be45a4af457565085e3db1f2fc489f Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Tue, 11 Aug 2020 09:26:41 +0200
+Subject: [PATCH] JPEG2000: follow-up fix to build with Jasper 2.0.17 (fixes
+ #2844)
+
+---
+ gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
+index e780d2bcaed..10a4f96f0ee 100644
+--- a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
++++ b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
+@@ -94,13 +94,23 @@ typedef struct {
+ * File stream object.
+ \******************************************************************************/
++// PRIjas_seqent macro is defined since Jasper 2.0.17
++
++#ifndef PRIjas_seqent
+ static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
++#else
++static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
++#endif
+ {
+     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
+     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
+ }
++#ifndef PRIjas_seqent
+ static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
++#else
++static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
++#endif
+ {
+     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
+     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
+From 1562e215c6f53a53efa66263113ecc6e761818d2 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 5 Oct 2020 12:11:52 +0200
+Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
+
+---
+ gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
+ gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
+ 2 files changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
+index 10a4f96f0ee..ebcac4010ce 100644
+--- a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
++++ b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
+@@ -94,22 +94,24 @@ typedef struct {
+ * File stream object.
+ \******************************************************************************/
++#if defined(PRIjas_seqent)
+ // PRIjas_seqent macro is defined since Jasper 2.0.17
+-
+-#ifndef PRIjas_seqent
+-static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
+-#else
+ static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
++#else
++static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
+ #endif
+ {
+     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
+     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
+ }
+-#ifndef PRIjas_seqent
+-static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
+-#else
++#if defined(JAS_INCLUDE_JP2_CODEC)
++// Jasper 2.0.21
++static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
++#elif defined(PRIjas_seqent)
+ static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
++#else
++static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
+ #endif
+ {
+     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
+diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
+index a5a6b258ed9..bd1e7763186 100644
+--- a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
++++ b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
+@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
+         for ( iBand = 0; iBand < nBands; iBand++ )
+         {
+             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
+-            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
++            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
+                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
+             {
+                 CPLError(CE_Failure, CPLE_AppDefined,
This page took 0.20513 seconds and 4 git commands to generate.