From eca07d3c684e9a712330fb1554d357c637563e79 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 1 Dec 2016 09:47:05 -0700 Subject: [PATCH] Add patch to fix build with jasper 2.0; Avoid duplicate unpacking of source --- gdal-uchar.patch | 12 ++++++++++++ gdal.spec | 9 +++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 gdal-uchar.patch diff --git a/gdal-uchar.patch b/gdal-uchar.patch new file mode 100644 index 0000000..db56b9c --- /dev/null +++ b/gdal-uchar.patch @@ -0,0 +1,12 @@ +diff -up gdal-2.1.2-fedora/frmts/jpeg2000/jpeg2000_vsil_io.cpp.uchar~ gdal-2.1.2-fedora/frmts/jpeg2000/jpeg2000_vsil_io.cpp +--- gdal-2.1.2-fedora/frmts/jpeg2000/jpeg2000_vsil_io.cpp.uchar~ 2016-12-01 09:14:51.768247534 -0700 ++++ gdal-2.1.2-fedora/frmts/jpeg2000/jpeg2000_vsil_io.cpp 2016-12-01 09:15:14.503375681 -0700 +@@ -209,7 +209,7 @@ static void JPEG2000_VSIL_jas_stream_ini + /* The buffer must be large enough to accommodate maximum + putback. */ + assert(bufsize > JAS_STREAM_MAXPUTBACK); +- stream->bufbase_ = JAS_CAST(uchar *, buf); ++ stream->bufbase_ = JAS_CAST(unsigned char *, buf); + stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK; + } + } else { diff --git a/gdal.spec b/gdal.spec index 4b6c584..640a961 100644 --- a/gdal.spec +++ b/gdal.spec @@ -67,6 +67,8 @@ Patch1: %{name}-g2clib.patch Patch2: %{name}-jni.patch # Fix bash-completion install dir Patch3: %{name}-completion.patch +# Fix uchar type +Patch4: %{name}-uchar.patch # Fedora uses Alternatives for Java Patch8: %{name}-1.9.0-java.patch @@ -281,10 +283,7 @@ This package contains HTML and PDF documentation for GDAL. %global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\.so$ %prep -%setup -q -n %{name}-%{version}-fedora - -# Unpack tests to the same directory -%setup -q -D -a 1 -n %{name}-%{version}-fedora +%setup -q -n %{name}-%{version}-fedora -a 1 # Delete bundled libraries rm -rf frmts/zlib @@ -299,6 +298,7 @@ rm -r frmts/grib/degrib18/g2clib-1.0.4 %patch1 -p1 -b .g2clib~ %patch2 -p1 -b .jni~ %patch3 -p1 -b .completion~ +%patch4 -p1 -b .uchar~ %patch8 -p1 -b .java~ %patch9 -p1 -b .zlib~ @@ -838,6 +838,7 @@ popd %changelog * Thu Dec 01 2016 Orion Poplawski - 2.1.2-3 - Rebuild for jasper 2.0 +- Add patch to fix build with jasper 2.0 * Wed Nov 23 2016 David Tardon - 2.1.2-2 - rebuild for poppler 0.49.0