--- powder-110.orig/support/bmp2c/bmp2c.cpp
+++ powder-110/support/bmp2c/bmp2c.cpp
@@ -2,6 +2,7 @@
 //
 
 #include "stdafx.h"
+#include <string.h>
 
 #include <iostream>
 #include <fstream>
--- powder-110.orig/support/encyclopedia2c/encyclopedia2c.cpp
+++ powder-110/support/encyclopedia2c/encyclopedia2c.cpp
@@ -4,6 +4,8 @@
 #include "stdafx.h"
 #include <iostream>
 #include <fstream>
+#include <string.h>
+#include <stdlib.h>
 
 using namespace std;
 
--- powder-110.orig/support/map2c/map2c.cpp
+++ powder-110/support/map2c/map2c.cpp
@@ -4,6 +4,8 @@
 #include "stdafx.h"
 #include <iostream>
 #include <fstream>
+#include <string.h>
+#include <stdlib.h>
 
 // Portability crap
 #ifndef WIN32
--- powder-110.orig/debian/changelog
+++ powder-110/debian/changelog
@@ -0,0 +1,47 @@
+powder (110-2) unstable; urgency=low
+
+  * Added the XS-Autobuild: yes header to debian/control.
+  * Added a note about autobuilding to debian/copyright.
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Wed, 04 Mar 2009 12:29:02 +0100
+
+powder (110-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fix debian/copyright.
+  * Bump debhelper version.
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Fri, 20 Feb 2009 15:44:58 +0100
+
+powder (109-1) unstable; urgency=low
+
+  * New upstream version.
+  * Apply patch to fix the crashing bug. (Closes: #492506)
+    Thanks to Chris Carr and Jeff Lait.
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Fri, 09 Jan 2009 10:28:44 +0100
+
+powder (107-1) unstable; urgency=low
+
+  * New upstream version.
+  * Bump standards version.
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Tue, 05 Aug 2008 15:31:52 +0200
+
+powder (106-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Thu, 03 Jul 2008 12:12:39 +0200
+
+powder (105-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Wed, 14 May 2008 07:37:51 +0200
+
+powder (104-1) unstable; urgency=low
+
+  * Initial release. (Closes: #469476)
+
+ -- Gürkan Sengün <gurkan@phys.ethz.ch>  Mon, 03 Mar 2008 16:14:38 +0100
--- powder-110.orig/debian/copyright
+++ powder-110/debian/copyright
@@ -0,0 +1,86 @@
+This package was debianized by Gürkan Sengün <gurkan@phys.ethz.ch> on
+Mon, 03 Mar 2008 16:14:38 +0100.
+
+It was downloaded from http://www.zincland.com/powder/
+
+Upstream Author:
+
+    Jeff Lait <jmlait@zincland.com>
+
+Copyright:
+
+    Copyright (C) 2003-2009 Jeff Lait
+
+License:
+
+    All rights reserved.
+
+    Note
+    The Adam Bolt tileset are copyright by Adam Bolt and are licensed
+    separately.  Other tilesets are creations of the respective creators -
+    download the latest artpack for details.
+
+    Information about the Mersenne Twister can be found at:
+    http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
+
+    Execution
+    You are allowed to execute the POWDER binary, either by running it in
+    an emulator or on hardware.
+
+    Duplication
+    You are allowed to duplicate the POWDER distribution provided you:
+    1) Keep the distribution intact.  This means keeping this license.
+    2) Do not charge for the act of duplication, nor for the medium of
+       duplication above the rate which you paid to acquire it.
+    3) Do not add to the distribution in a manner which obscures the
+       original author.
+    4) Do not modify the POWDER binary nor accompanying files.  This
+       includes, but is not limited to, the removal of any licensing or
+       copyright information embedded in the files.
+
+    An exception is made when duplicating to a cartridge or similar device
+    for purpose of executing the binary on hardware.  In this case, the
+    binary alone needs to be duplicated (as that is all that is practical)
+    An exception is made for patching the binary to run on certain
+    platforms.
+
+    Transfer
+    You are free to transfer copies of POWDER to others, provided they
+    remain unaltered, and the transfer is performed without payment.  You
+    are encouraged to instead show people to the author's current web site
+    where the latest version may be acquired.
+
+    Reverse Engineering
+    You are strongly discouraged from reverse engingeering the POWDER
+    binary.  If you have questions about how an algorithm worked, contact
+    the author who will likely freely answer.  If would like the source,
+    check the download site where it is available.
+
+    Disclaimer
+    Neither the author, nor anyone associated with the distribution of
+    this binary to your system, is responsible for any damage done to your
+    computer, console, or handheld.  This includes, but is not limited
+    to, loss of data, work, time, or hardware.  
+
+    In some, or all, places, a limitation of liability may not be
+    possible.  It is your responsibility to verify that within your
+    jurisdiction the above disclaimer fully exempts the author from all
+    liability.  If it does not, all earlier rights of execution,
+    duplication, and transfer are rescinded.
+
+    ALL CAPS
+    THIS SECTION OF THE LICENSING AGREEMENT IS WRITTEN IN ALL CAPS TO MAKE
+    IT APPEAR MORE LEGAL.  IT ISN'T.  INSTEAD, IT IS JUST A FRIENDLY
+    REMINDER TO ENJOY POWDER AND TO CONTACT THE AUTHOR IF YOU PLAY IT.
+    EVEN IF YOU HATE THE GAME.  POWDER IS A LABOUR OF LOVE WHICH HAS PAID
+    FOR ITSELF IN THE AUTHOR'S OWN ENJOYMENT, YET THERE IS NO REASON WHY
+    IT CANNOT EARN EVEN MORE DIVIDENDS OF HAPPINESS BY BRINGING JOY TO THE
+    LIVES OF OTHERS.
+
+Autobuilding:
+
+    According the license there are no problems to build this software on
+    several architectures automatically and distributing it.
+
+The Debian packaging is Copyright (C) 2008, Gürkan Sengün <gurkan@phys.ethz.ch> and
+is licensed under the GNU GPL 3, see `/usr/share/common-licenses/GPL-3'.
--- powder-110.orig/debian/powder.install
+++ powder-110/debian/powder.install
@@ -0,0 +1 @@
+powder usr/games
--- powder-110.orig/debian/compat
+++ powder-110/debian/compat
@@ -0,0 +1 @@
+7
--- powder-110.orig/debian/rules
+++ powder-110/debian/rules
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	sh -ex ./buildall.sh
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	rm -f *.o */*.o */*/*.o rooms/*.cpp rooms/allrooms.h gfx/*.c gfx/*/*.c
+	rm -f license.cpp glbdef.cpp glbdef.h encyclopedia.cpp encyclopedia.h
+	rm -f credits.cpp
+	rm -f powder port/linux/powder support/bmp2c/bmp2c support/encyclopedia2c/encyclopedia2c support/enummaker/enummaker support/map2c/map2c support/tile2c/tile2c support/txt2c/txt2c port/linux/libstdc++.a
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_install
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- powder-110.orig/debian/powder.6
+++ powder-110/debian/powder.6
@@ -0,0 +1,22 @@
+.TH POWDER 6 "March  3, 2008"
+.SH NAME
+powder \- graphical dungeon crawling game
+.SH SYNOPSIS
+.B powder
+.SH DESCRIPTION
+This manual page documents briefly the
+.B powder
+command.
+.PP
+\fBpowder\fP is a graphical dungeon crawling game.
+.SH OPTIONS
+This program has no options.
+.SH SEE ALSO
+.BR nethack (6),
+.BR kq (6).
+.br
+.SH AUTHOR
+powder was written by Jeff Lait.
+.PP
+This manual page was written by G\[:u]rkan Seng\[:u]n <gurkan@phys.ethz.ch>,
+for the Debian project (but may be used by others).
--- powder-110.orig/debian/control
+++ powder-110/debian/control
@@ -0,0 +1,19 @@
+Source: powder
+Section: non-free/games
+Priority: optional
+Maintainer: Gürkan Sengün <gurkan@phys.ethz.ch>
+Build-Depends: debhelper (>= 7), libsdl1.2-dev
+Homepage: http://www.zincland.com/powder/
+XS-Autobuild: yes
+Standards-Version: 3.8.0
+
+Package: powder
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Graphical dungeon crawling game
+ This is a roguelike originally developed specifically for the Gameboy
+ Advance (GBA). It is not a port of an existing roguelike as the controls
+ of the GBA are very different from the traditional keyboard, and the screen
+ imposes some additional limitations. It is built around replayability and
+ long term ergonomics, not short term learning. It uses actual graphic tiles
+ (16x16) rather than the traditional characters.
--- powder-110.orig/debian/docs
+++ powder-110/debian/docs
@@ -0,0 +1,2 @@
+CREDITS.TXT
+README.TXT
--- powder-110.orig/debian/menu
+++ powder-110/debian/menu
@@ -0,0 +1,2 @@
+?package(powder):needs="X11" section="Games/Adventure"\
+  title="Powder" command="/usr/games/powder"
--- powder-110.orig/debian/manpages
+++ powder-110/debian/manpages
@@ -0,0 +1 @@
+debian/powder.6
