[oe-commits] Martin Jansa : abiword: fix build with libpng-1.5 from oe-core

git at git.openembedded.org git at git.openembedded.org
Wed Dec 26 08:16:24 UTC 2012


Module: meta-openembedded.git
Branch: master
Commit: 28c25eb268b4f40a2c16a249d7a9fb7d8a94909a
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=28c25eb268b4f40a2c16a249d7a9fb7d8a94909a

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Sat Dec 22 17:56:43 2012 +0100

abiword: fix build with libpng-1.5 from oe-core

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../recipes-gnome/abiword/abiword/libpng15.patch   |  102 ++++++++++++++++++++
 meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb  |    6 +-
 2 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/meta-gnome/recipes-gnome/abiword/abiword/libpng15.patch b/meta-gnome/recipes-gnome/abiword/abiword/libpng15.patch
new file mode 100644
index 0000000..0fc93c5
--- /dev/null
+++ b/meta-gnome/recipes-gnome/abiword/abiword/libpng15.patch
@@ -0,0 +1,102 @@
+Imported from gentoo
+
+$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.
+
+--- a/plugins/bmp/xp/ie_impGraphic_BMP.cpp.orig	2009-06-25 04:02:06.000000000 +0000
++++ b/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;
+
+$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.
+
+--- a/plugins/garble/xp/abiword-garble-png.cpp.orig	2009-09-05 15:34:44.000000000 +0000
++++ b/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 );
+ 	}
+ 
+$NetBSD: patch-af,v 1.12 2011/01/15 15:07:11 wiz Exp $
+
+Fix build with png-1.5.
+
+--- a/src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp.orig	2009-07-01 04:02:04.000000000 +0000
++++ b/src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp
+@@ -185,7 +185,7 @@ UT_Error IE_ImpGraphic_GdkPixbuf::import
+ /** needed for the stejmp context */
+ UT_Error IE_ImpGraphic_GdkPixbuf::_png_write(GdkPixbuf * pixbuf)
+ {
+-	if (setjmp(m_pPNG->jmpbuf))
++	if (setjmp(png_jmpbuf(m_pPNG)))
+ 	{
+ 		DELETEP(m_pPngBB);
+ 		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+@@ -446,7 +446,7 @@ UT_Error IE_ImpGraphic_GdkPixbuf::Initia
+ 	 * 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);
+$NetBSD: patch-ae,v 1.21 2011/01/15 15:07:11 wiz Exp $
+
+Fix build with png-1.5.
+
+--- a/src/af/util/xp/ut_png.cpp.orig	2008-02-24 03:33:07.000000000 +0000
++++ b/src/af/util/xp/ut_png.cpp
+@@ -71,7 +71,7 @@ bool UT_PNG_getDimensions(const UT_ByteB
+ 	 * 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(png_ptr->jmpbuf))
++	if (setjmp(png_jmpbuf(png_ptr)))
+ 	{
+ 		/* Free all of the memory associated with the png_ptr and info_ptr */
+ 		png_destroy_read_struct(&png_ptr, &info_ptr, static_cast<png_infopp>(NULL));
diff --git a/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb b/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb
index c4bf344..a2cd1cc 100644
--- a/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb
+++ b/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb
@@ -13,7 +13,9 @@ SRC_URI = "http://www.abisource.com/downloads/${BPN}/${PV}/source/${BP}.tar.gz \
            file://autogen-common.sh \
            file://nodolt.patch \
            file://fix.no.undefined.param.patch \
-           file://abiword.fix.glib-2.32.patch"
+           file://abiword.fix.glib-2.32.patch \
+           file://libpng15.patch \
+"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=ecd3ac329fca77e2d0e412bec38e1c20"
 
@@ -23,7 +25,7 @@ SRC_URI[sha256sum] = "d99089a63a6cfc1a6a4a026be9278028d47d224088d24b1853acb67e95
 #want 2.x from 2.x.y for the installation directory
 SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
 
-PR = "r7"
+PR = "r8"
 
 inherit autotools pkgconfig
 





More information about the Openembedded-commits mailing list