Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Description: support newer libpng

--- libtwin-13.05.03.15.06-g287d16c.orig/configure.ac
+++ libtwin-13.05.03.15.06-g287d16c/configure.ac
@@ -1,4 +1,4 @@
-dnl
+d3nl
 dnl Twin - A Tiny Window System
 dnl Copyright © 2003 Keith Packard, Noah Levitt
 dnl All rights reserved.
@@ -119,7 +119,7 @@ AC_ARG_ENABLE(png,
 
 if test "x$twin_png" = "xyes"
 then
-	PKG_CHECK_MODULES(PNG, libpng12, twin_png="yes", twin_png="no")
+	PKG_CHECK_MODULES([PNG], [libpng], twin_png="yes", twin_png="no")
 fi
 
 AC_SUBST(PNG_CFLAGS)
--- libtwin-13.05.03.15.06-g287d16c.orig/libtwin/twin_png.c
+++ libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.c
@@ -38,6 +38,15 @@
 #define DEBUG(fmt...)
 #endif
 
+#ifndef int_p_NULL
+#define int_p_NULL NULL
+#endif
+
+#ifndef png_infopp_NULL
+#define png_infopp_NULL NULL
+#endif
+
+
 typedef struct  _twin_png_priv {
 	int	fd;
 } twin_png_priv_t;
@@ -115,7 +124,11 @@ twin_pixmap_t *twin_png_to_pixmap(const
 	if (ctype == PNG_COLOR_TYPE_PALETTE)
 		png_set_palette_to_rgb(png);
 	if (ctype == PNG_COLOR_TYPE_GRAY && depth < 8)
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+		png_set_expand_gray_1_2_4_to_8(png);
+#else
 		png_set_gray_1_2_4_to_8(png);
+#endif
 	if (png_get_valid(png, info, PNG_INFO_tRNS))
 		png_set_tRNS_to_alpha(png);
 
