PATCH FOR LIBPNG 1.5
This commit is contained in:
parent
0a297c5481
commit
68aad6a334
|
@ -0,0 +1,39 @@
|
|||
diff -Nur gdal-1.7.3-fedora/frmts/png/pngdataset.cpp gdal-1.7.3-fedora-png15/frmts/png/pngdataset.cpp
|
||||
--- gdal-1.7.3-fedora/frmts/png/pngdataset.cpp 2010-11-07 23:58:47.000000000 +0530
|
||||
+++ gdal-1.7.3-fedora-png15/frmts/png/pngdataset.cpp 2012-01-10 14:50:25.384124887 +0530
|
||||
@@ -1296,7 +1296,7 @@
|
||||
* instead of an int, which is what fread() actually returns.
|
||||
*/
|
||||
check = (png_size_t)VSIFReadL(data, (png_size_t)1, length,
|
||||
- (png_FILE_p)png_ptr->io_ptr);
|
||||
+ (png_FILE_p)png_get_io_ptr(png_ptr));
|
||||
|
||||
if (check != length)
|
||||
png_error(png_ptr, "Read Error");
|
||||
@@ -1311,7 +1311,7 @@
|
||||
{
|
||||
png_uint_32 check;
|
||||
|
||||
- check = VSIFWriteL(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
|
||||
+ check = VSIFWriteL(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
|
||||
|
||||
if (check != length)
|
||||
png_error(png_ptr, "Write Error");
|
||||
@@ -1322,7 +1322,7 @@
|
||||
/************************************************************************/
|
||||
static void png_vsi_flush(png_structp png_ptr)
|
||||
{
|
||||
- VSIFFlushL( (png_FILE_p)(png_ptr->io_ptr) );
|
||||
+ VSIFFlushL( (png_FILE_p)png_get_io_ptr(png_ptr) );
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
@@ -1338,7 +1338,7 @@
|
||||
// libpng is generally not built as C++ and so won't honour unwind
|
||||
// semantics. Ugg.
|
||||
|
||||
- jmp_buf* psSetJmpContext = (jmp_buf*) png_ptr->error_ptr;
|
||||
+ jmp_buf* psSetJmpContext = (jmp_buf*) png_get_error_ptr(png_ptr);
|
||||
if (psSetJmpContext)
|
||||
{
|
||||
longjmp( *psSetJmpContext, 1 );
|
19
gdal.spec
19
gdal.spec
|
@ -18,9 +18,16 @@ Patch1: %{name}-mysql.patch
|
|||
Patch2: %{name}-bindir.patch
|
||||
Patch3: %{name}-AIS.patch
|
||||
Patch4: %{name}-%{version}-xcompiler.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=693952
|
||||
# http://trac.osgeo.org/gdal/ticket/3694 -- Still present in 1.8 tarball
|
||||
Patch5: %{name}-1.8.0-mitab.patch
|
||||
|
||||
# Allow to use libpng 1.5
|
||||
# http://trac.osgeo.org/gdal/changeset/21526
|
||||
# Not necessary for 1.8 and later
|
||||
Patch6: %{name}-1.7.3-png15.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libtool pkgconfig
|
||||
BuildRequires: python-devel numpy xerces-c-devel
|
||||
|
@ -145,10 +152,15 @@ rm -rf frmts/gtiff/libgeotiff \
|
|||
%patch1 -p0 -b .mysql~
|
||||
%patch2 -p1 -b .bindir~
|
||||
%patch3 -p1 -b .AIS~
|
||||
%patch4 -p1 -b .xcompiler
|
||||
%patch5 -p3 -b .mitab
|
||||
%patch4 -p1 -b .xcompiler~
|
||||
%patch5 -p3 -b .mitab~
|
||||
|
||||
# unpack test cases also.
|
||||
# Only F17 has libpng 1.5
|
||||
%if ! (0%{?fedora} < 17 || 0%{?rhel})
|
||||
%patch6 -p1 -b .png15~
|
||||
%endif
|
||||
|
||||
# Unpack test cases
|
||||
tar -xzf %{SOURCE1}
|
||||
|
||||
set +x
|
||||
|
@ -620,6 +632,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
- Remove elements for grass support --> Will be replaced by plug-in
|
||||
- Remove unnecessary defattr
|
||||
- Correct version number in POM
|
||||
- Allow for libpng 1.5
|
||||
|
||||
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.7.3-11
|
||||
- Rebuild for new libpng
|
||||
|
|
Loading…
Reference in New Issue