diff options
author | wiz <wiz@pkgsrc.org> | 2011-02-01 10:48:14 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-02-01 10:48:14 +0000 |
commit | da66250d83187396f6892c9ae735aad0bdaebda0 (patch) | |
tree | 87c19945ed1f9194f26c23698b9f9ce8ae6b7cf8 /editors | |
parent | d21feee9e38967a6c80a67fede0e610083179e42 (diff) | |
download | pkgsrc-da66250d83187396f6892c9ae735aad0bdaebda0.tar.gz |
Fix build of abiword-plugins with png-1.5.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/abiword/distinfo | 4 | ||||
-rw-r--r-- | editors/abiword/patches/patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp | 45 | ||||
-rw-r--r-- | editors/abiword/patches/patch-plugins_garble_xp_abiword-garble-png.cpp | 15 |
3 files changed, 63 insertions, 1 deletions
diff --git a/editors/abiword/distinfo b/editors/abiword/distinfo index 51a9f49a40f..e016d204952 100644 --- a/editors/abiword/distinfo +++ b/editors/abiword/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.61 2011/01/15 15:07:11 wiz Exp $ +$NetBSD: distinfo,v 1.62 2011/02/01 10:48:14 wiz Exp $ SHA1 (abiword-2.8.6.tar.gz) = 998f69d038000b3fc027d4259548f02d67c8d0df RMD160 (abiword-2.8.6.tar.gz) = caabab25d197f9553ea12376de36fc7f5a771a58 @@ -9,4 +9,6 @@ SHA1 (patch-ac) = a82fd781195e9ff52dbc33258fd4774cd23fe5c9 SHA1 (patch-ad) = 48ff4fcce593f9996e90cce718b2f774b271d5a3 SHA1 (patch-ae) = ec3bb0a00100fea97f46b3a25440d7a4e46e30eb SHA1 (patch-af) = fc6927eb963c4be956825d1656e8957b358ed1ad +SHA1 (patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp) = 65852f6f934c9fdf2aa9bf02d0a2ad66b5c2db09 +SHA1 (patch-plugins_garble_xp_abiword-garble-png.cpp) = c9b4b7030fa038da9ba37b5489d8d8571a0e6c77 SHA1 (patch-sa) = 29ee7e9891b11773217ec73bbda01e2591e78b56 diff --git a/editors/abiword/patches/patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp b/editors/abiword/patches/patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp new file mode 100644 index 00000000000..0efb05dc4f5 --- /dev/null +++ b/editors/abiword/patches/patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp @@ -0,0 +1,45 @@ +$NetBSD: patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp,v 1.1 2011/02/01 10:48:15 wiz Exp $ + +Fix build with png-1.5. + +--- plugins/bmp/xp/ie_impGraphic_BMP.cpp.orig 2009-06-25 04:02:06.000000000 +0000 ++++ plugins/bmp/xp/ie_impGraphic_BMP.cpp +@@ -191,7 +191,10 @@ UT_Error IE_ImpGraphic_BMP::_convertGrap + + /* Clean Up Memory Used */ + +- FREEP(m_pPNGInfo->palette); ++ png_colorp palette; ++ int num_palette; ++ png_get_PLTE( m_pPNG, m_pPNGInfo, &palette, &num_palette ); ++ FREEP(palette); + DELETEP(pBB); + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + +@@ -313,7 +316,7 @@ UT_Error IE_ImpGraphic_BMP::Initialize_P + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); +@@ -332,7 +335,7 @@ UT_Error IE_ImpGraphic_BMP::Initialize_P + UT_Error IE_ImpGraphic_BMP::Convert_BMP_Pallet(UT_ByteBuf* pBB) + { + /* Reset error handling for libpng */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + return UT_ERROR; +@@ -372,7 +375,7 @@ UT_Error IE_ImpGraphic_BMP::Initialize_P + UT_Error IE_ImpGraphic_BMP::Convert_BMP(UT_ByteBuf* pBB) + { + /* Reset error handling for libpng */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + return UT_ERROR; diff --git a/editors/abiword/patches/patch-plugins_garble_xp_abiword-garble-png.cpp b/editors/abiword/patches/patch-plugins_garble_xp_abiword-garble-png.cpp new file mode 100644 index 00000000000..fcaa801b8a9 --- /dev/null +++ b/editors/abiword/patches/patch-plugins_garble_xp_abiword-garble-png.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-plugins_garble_xp_abiword-garble-png.cpp,v 1.1 2011/02/01 10:48:15 wiz Exp $ + +Fix build with png-1.5. + +--- plugins/garble/xp/abiword-garble-png.cpp.orig 2009-09-05 15:34:44.000000000 +0000 ++++ plugins/garble/xp/abiword-garble-png.cpp +@@ -79,7 +79,7 @@ bool abiword_document::garble_png( void* + png_set_strip_alpha( png_ptr ); + png_set_interlace_handling( png_ptr ); + png_set_bgr( png_ptr ); +- rowbytes = info_ptr->rowbytes; ++ rowbytes = png_get_rowbytes( png_ptr, info_ptr ); + png_destroy_read_struct( &png_ptr, &info_ptr, NULL ); + } + |