diff options
author | wiz <wiz@pkgsrc.org> | 2011-01-17 09:14:15 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-01-17 09:14:15 +0000 |
commit | 2d67b736da704755252de3094f701c82180688d0 (patch) | |
tree | 320e99921adc0610af8df4346fabd6626f8fd977 /geography/gdal-lib | |
parent | febd68a9c7eee71b9cab8c34b51b2f5b2c77c3e6 (diff) | |
download | pkgsrc-2d67b736da704755252de3094f701c82180688d0.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'geography/gdal-lib')
-rw-r--r-- | geography/gdal-lib/distinfo | 3 | ||||
-rw-r--r-- | geography/gdal-lib/patches/patch-ab | 50 |
2 files changed, 52 insertions, 1 deletions
diff --git a/geography/gdal-lib/distinfo b/geography/gdal-lib/distinfo index 4d12d7cb312..50773eced32 100644 --- a/geography/gdal-lib/distinfo +++ b/geography/gdal-lib/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.10 2010/11/15 13:38:31 adam Exp $ +$NetBSD: distinfo,v 1.11 2011/01/17 09:14:15 wiz Exp $ SHA1 (gdal-1.7.3.tar.gz) = 58d4355fe792ad618bb74605dc1a084a0aeb7cb1 RMD160 (gdal-1.7.3.tar.gz) = ce84a12d48c85a58c56a17381aee1c4f2ba08b57 Size (gdal-1.7.3.tar.gz) = 7757684 bytes SHA1 (patch-aa) = 2c017bda45d4ed4fb10f7e70d33b707ca33149d1 +SHA1 (patch-ab) = 77c034b05151a7a300b302b79ba803212db297b1 diff --git a/geography/gdal-lib/patches/patch-ab b/geography/gdal-lib/patches/patch-ab new file mode 100644 index 00000000000..d4208ca9862 --- /dev/null +++ b/geography/gdal-lib/patches/patch-ab @@ -0,0 +1,50 @@ +$NetBSD: patch-ab,v 1.6 2011/01/17 09:14:15 wiz Exp $ + +Fix build with png-1.5. + +--- frmts/png/pngdataset.cpp.orig 2010-11-07 18:28:47.000000000 +0000 ++++ frmts/png/pngdataset.cpp +@@ -1296,7 +1296,7 @@ png_vsi_read_data(png_structp png_ptr, p + * 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_vsi_write_data(png_structp png_ptr, + { + 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 @@ png_vsi_write_data(png_structp png_ptr, + /************************************************************************/ + 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,10 +1338,13 @@ static void png_gdal_error( png_structp + // libpng is generally not built as C++ and so won't honour unwind + // semantics. Ugg. + +- jmp_buf* psSetJmpContext = (jmp_buf*) png_ptr->error_ptr; +- if (psSetJmpContext) ++ if (png_jmpbuf(png_ptr)) + { +- longjmp( *psSetJmpContext, 1 ); ++#if (PNG_LIBPNG_VER < 10500) ++ longjmp( (jmp_buf*) png_ptr->error_ptr, 1 ); ++#else ++ png_longjmp (png_ptr, 1); ++#endif + } + } + |