Add patch to fix build with jasper 2.0; Avoid duplicate unpacking of source

This commit is contained in:
Orion Poplawski 2016-12-01 09:47:05 -07:00
parent 64af99f708
commit eca07d3c68
2 changed files with 17 additions and 4 deletions

12
gdal-uchar.patch Normal file
View File

@ -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 {

View File

@ -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 <orion@cora.nwra.com> - 2.1.2-3
- Rebuild for jasper 2.0
- Add patch to fix build with jasper 2.0
* Wed Nov 23 2016 David Tardon <dtardon@redhat.com> - 2.1.2-2
- rebuild for poppler 0.49.0