diff -u exult-1.2/debian/changelog exult-1.2/debian/changelog
--- exult-1.2/debian/changelog
+++ exult-1.2/debian/changelog
@@ -1,3 +1,15 @@
+exult (1.2-15.2) unstable; urgency=low
+
+  * Non-maintainer upload to help for libpng transition
+  * Allow building with libpng 1.5. Thanks to Iwamatsu Nobuhiro
+    for the patch. Closes: #649549
+  * Build-Depends on libpng-dev. Closes: #662319
+  * Lintian cleaning:
+    - drop debian/files in clean rule
+    - add build-arch and build-indep build rules
+
+ -- Christian Perrier <bubulle@debian.org>  Thu, 15 Mar 2012 22:21:27 +0100
+
 exult (1.2-15.1) unstable; urgency=low
 
   * Non-maintainer upload to fix l10n and one RC bug
diff -u exult-1.2/debian/control exult-1.2/debian/control
--- exult-1.2/debian/control
+++ exult-1.2/debian/control
@@ -6,7 +6,7 @@
 Build-Depends: debhelper (>= 5), quilt (>= 0.40), flex, bison,
  libsdl1.2-dev (>= 1.2.7+1.2.8cvs20041007-5.1), libsdl-mixer1.2-dev,
  libx11-dev, libgimp2.0-dev (>= 2.2.8-11), libglade2-dev, zlib1g-dev,
- libpng12-dev, autoconf (>= 2.58), automake1.9, libtool, libfreetype6-dev
+ libpng-dev, autoconf (>= 2.58), automake1.9, libtool, libfreetype6-dev
 Standards-Version: 3.8.4
 Homepage: http://exult.sourceforge.net/
 Vcs-Git: git://git.debian.org/git/users/jorda-guest/pkg/exult.git
diff -u exult-1.2/debian/rules exult-1.2/debian/rules
--- exult-1.2/debian/rules
+++ exult-1.2/debian/rules
@@ -45,8 +45,10 @@
 		--enable-gimp-plugin
 	touch configure-stamp
 
-build: configure build-stamp
-build-stamp:
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure
 	dh_testdir
 	$(MAKE) LDFLAGS="-Wl,--as-needed"
 	touch build-stamp
@@ -61,6 +63,7 @@
 	      ltmain.sh missing mkinstalldirs install-sh autoconfig.h.in \
 	      config.status aclocal.m4
 	find . -name Makefile.in -print0 | xargs -0 rm -f
+	rm debian/files || true
 	dh_clean
 	rm -f depcomp
 	rm -f INSTALL
diff -u exult-1.2/debian/patches/series exult-1.2/debian/patches/series
--- exult-1.2/debian/patches/series
+++ exult-1.2/debian/patches/series
@@ -5,0 +6 @@
+06_build-with-libpng1.5
only in patch2:
unchanged:
--- exult-1.2.orig/debian/patches/06_build-with-libpng1.5
+++ exult-1.2/debian/patches/06_build-with-libpng1.5
@@ -0,0 +1,64 @@
+Index: exult-1.2/shapes/pngio.cc
+===================================================================
+--- exult-1.2.orig/shapes/pngio.cc
++++ exult-1.2/shapes/pngio.cc
+@@ -79,7 +79,11 @@
+ 		}
+ 					// Allocate info. structure.
+ 	png_infop info = png_create_info_struct(png);
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((png))))	// Handle errors.
++#else
+ 	if (setjmp(png->jmpbuf))	// Handle errors.
++#endif
+ 		{
+ 		png_destroy_read_struct(&png, &info, 0);
+ 		fclose(fp);
+@@ -89,7 +93,11 @@
+ 					// Indicate we already read something.
+ 	png_set_sig_bytes(png, sizeof(sigbuf));
+ 	png_read_info(png, info);	// Read in image info.
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_uint_32 w, h;
++#else
+ 	unsigned long w, h;
++#endif
+ 	int depth, color, interlace;
+ 	png_get_IHDR(png, info, &w, &h, &depth, &color,
+ 		&interlace, 0, 0);
+@@ -208,7 +216,11 @@
+ 		}
+ 					// Allocate info. structure.
+ 	png_infop info = png_create_info_struct(png);
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((png))))	// Handle errors.
++#else
+ 	if (setjmp(png->jmpbuf))	// Handle errors.
++#endif
+ 		{
+ 		png_destroy_write_struct(&png, &info);
+ 		fclose(fp);
+@@ -306,7 +318,11 @@
+ 		}
+ 					// Allocate info. structure.
+ 	png_infop info = png_create_info_struct(png);
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((png))))	// Handle errors.
++#else
+ 	if (setjmp(png->jmpbuf))	// Handle errors.
++#endif
+ 		{
+ 		png_destroy_read_struct(&png, &info, 0);
+ 		fclose(fp);
+@@ -316,7 +332,11 @@
+ 					// Indicate we already read something.
+ 	png_set_sig_bytes(png, sizeof(sigbuf));
+ 	png_read_info(png, info);	// Read in image info.
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_uint_32 w, h;
++#else
+ 	unsigned long w, h;
++#endif
+ 	int depth, color, interlace;
+ 	png_get_IHDR(png, info, &w, &h, &depth, &color,
+ 		&interlace, 0, 0);
