Description: Fix building with libpng 1.5
 The upstream code FTBFS with libpng1.5.  The patch fixes this.
Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Last-Update: 2012-03-19
Index: libmatchbox-1.9/libmb/mbpixbuf.c
===================================================================
--- libmatchbox-1.9.orig/libmb/mbpixbuf.c	2006-07-26 20:12:25.000000000 +0100
+++ libmatchbox-1.9/libmb/mbpixbuf.c	2012-03-20 22:57:32.909288562 +0000
@@ -247,7 +247,11 @@
     return NULL;
   }
 
+#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
+  if ( setjmp( png_jmpbuf ( png_ptr ) ) ) {
+#else
   if ( setjmp( png_ptr->jmpbuf ) ) {
+#endif
     png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
     fclose(fd);
     return NULL;
@@ -269,8 +273,8 @@
       ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA ))
     png_set_gray_to_rgb(png_ptr);
  
-  if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA 
-       || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA
+  if ( color_type == PNG_COLOR_TYPE_RGB_ALPHA
+       || color_type == PNG_COLOR_TYPE_GRAY_ALPHA
        )
     *has_alpha = 1;
   else
