[OE-core] [PATCH] libmatchbox: fix build against libpng15

Marko Lindqvist cazfi74 at gmail.com
Wed Dec 5 22:33:14 UTC 2012


Signed-off-by: Marko Lindqvist <cazfi74 at gmail.com>
---
 .../libmatchbox/files/libpng15.patch               |   34 ++++++++++++++++++++
 .../libmatchbox/libmatchbox_1.9.bb                 |    6 ++--
 2 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-graphics/libmatchbox/files/libpng15.patch

diff --git a/meta/recipes-graphics/libmatchbox/files/libpng15.patch b/meta/recipes-graphics/libmatchbox/files/libpng15.patch
new file mode 100644
index 0000000..a463d9e
--- /dev/null
+++ b/meta/recipes-graphics/libmatchbox/files/libpng15.patch
@@ -0,0 +1,34 @@
+diff -Nurd libmatchbox-1.9/libmb/mbpixbuf.c libmatchbox-1.9/libmb/mbpixbuf.c
+--- libmatchbox-1.9/libmb/mbpixbuf.c	2006-07-26 22:12:25.000000000 +0300
++++ libmatchbox-1.9/libmb/mbpixbuf.c	2012-12-06 00:08:28.645988727 +0200
+@@ -224,6 +224,7 @@
+   png_structp png_ptr;
+   png_infop info_ptr;
+   png_bytep *row_pointers;
++  png_byte ct;
+ 
+   if ((fd = fopen( file, "rb" )) == NULL) return NULL;
+ 
+@@ -247,7 +248,7 @@
+     return NULL;
+   }
+ 
+-  if ( setjmp( png_ptr->jmpbuf ) ) {
++  if ( setjmp( png_jmpbuf( png_ptr ) ) ) {
+     png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
+     fclose(fd);
+     return NULL;
+@@ -268,9 +269,11 @@
+   if (( color_type == PNG_COLOR_TYPE_GRAY )||
+       ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA ))
+     png_set_gray_to_rgb(png_ptr);
++
++  ct = png_get_color_type(png_ptr, info_ptr);
+  
+-  if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA 
+-       || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA
++  if ( ct == PNG_COLOR_TYPE_RGB_ALPHA 
++       || ct == PNG_COLOR_TYPE_GRAY_ALPHA
+        )
+     *has_alpha = 1;
+   else
diff --git a/meta/recipes-graphics/libmatchbox/libmatchbox_1.9.bb b/meta/recipes-graphics/libmatchbox/libmatchbox_1.9.bb
index 2fcd1b0..559f9b5 100644
--- a/meta/recipes-graphics/libmatchbox/libmatchbox_1.9.bb
+++ b/meta/recipes-graphics/libmatchbox/libmatchbox_1.9.bb
@@ -1,12 +1,14 @@
 require libmatchbox.inc
 
-PR = "r10"
+PR = "r11"
 
 SRC_URI = "http://downloads.yoctoproject.org/releases/matchbox/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
            file://16bppfixes.patch \
            file://configure_fixes.patch \
            file://check.m4 \
-           file://matchbox-start-fix.patch"
+           file://matchbox-start-fix.patch \
+           file://libpng15.patch \
+"
 
 SRC_URI[md5sum] = "465fa15c43bf0091a3810e7702fe143f"
 SRC_URI[sha256sum] = "f7054f93c57ba6b758d0e4f47d4d2dd96a7fe487e1157eb70a4d642910275aea"
-- 
1.7.10.4





More information about the Openembedded-core mailing list