Blame SOURCES/libmatchbox-1.9-libpng.patch

7f4ef7
diff -up libmatchbox-1.9/configure.ac.jx libmatchbox-1.9/configure.ac
7f4ef7
--- libmatchbox-1.9/configure.ac.jx	2006-08-04 06:32:31.000000000 -0400
7f4ef7
+++ libmatchbox-1.9/configure.ac	2011-11-17 18:29:57.490000763 -0500
7f4ef7
@@ -155,14 +155,14 @@ fi
7f4ef7
 dnl ------ Check for PNG ---------------------------------------------------
7f4ef7
 
7f4ef7
 if test x$enable_png != xno; then
7f4ef7
-  AC_MSG_CHECKING(for libpng12)
7f4ef7
-  if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists libpng12; then 
7f4ef7
+  AC_MSG_CHECKING(for libpng)
7f4ef7
+  if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists libpng; then 
7f4ef7
         AC_MSG_RESULT(yes)
7f4ef7
-        PNG_LIBS=`$PKG_CONFIG --libs libpng12`
7f4ef7
-	PNG_CFLAGS=`$PKG_CONFIG --cflags libpng12`
7f4ef7
+        PNG_LIBS=`$PKG_CONFIG --libs libpng`
7f4ef7
+	PNG_CFLAGS=`$PKG_CONFIG --cflags libpng`
7f4ef7
         AC_DEFINE(USE_PNG, [1], [Use Png])
7f4ef7
 	SUPPORTS_PNG=1
7f4ef7
-	PNG_REQUIRED="libpng12"
7f4ef7
+	PNG_REQUIRED="libpng"
7f4ef7
   else
7f4ef7
 	AC_MSG_RESULT(no)
7f4ef7
         # AC_CHECK_HEADERS(png.h, [ have_png_h="yes" ], [ have_png_h="no" ] )
7f4ef7
diff -up libmatchbox-1.9/libmb/mbpixbuf.c.jx libmatchbox-1.9/libmb/mbpixbuf.c
7f4ef7
--- libmatchbox-1.9/libmb/mbpixbuf.c.jx	2006-07-26 15:12:25.000000000 -0400
7f4ef7
+++ libmatchbox-1.9/libmb/mbpixbuf.c	2011-11-17 18:28:51.981001505 -0500
7f4ef7
@@ -247,7 +247,7 @@ _load_png_file( const char *file,
7f4ef7
     return NULL;
7f4ef7
   }
7f4ef7
 
7f4ef7
-  if ( setjmp( png_ptr->jmpbuf ) ) {
7f4ef7
+  if ( setjmp( png_jmpbuf(png_ptr) ) ) {
7f4ef7
     png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
7f4ef7
     fclose(fd);
7f4ef7
     return NULL;
7f4ef7
@@ -269,8 +269,8 @@ _load_png_file( const char *file,
7f4ef7
       ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA ))
7f4ef7
     png_set_gray_to_rgb(png_ptr);
7f4ef7
  
7f4ef7
-  if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA 
7f4ef7
-       || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA
7f4ef7
+  if ( png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA 
7f4ef7
+       || png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA
7f4ef7
        )
7f4ef7
     *has_alpha = 1;
7f4ef7
   else