diff -ubBdNw -U5 -r mingw32-3.3.1.20030804.1.orig/debian/patches/ada-configure-sys_wait.patch mingw32-3.3.1.20030804.1/debian/patches/ada-configure-sys_wait.patch
--- mingw32-3.3.1.20030804.1.orig/debian/patches/ada-configure-sys_wait.patch	1970-01-01 01:00:00.000000000 +0100
+++ mingw32-3.3.1.20030804.1/debian/patches/ada-configure-sys_wait.patch	2004-07-04 14:42:04.000000000 +0200
@@ -0,0 +1,7 @@
+--- gcc.orig/auto-host.h	2004-07-04 14:40:11.000000000 +0200
++++ gcc/auto-host.h	2004-07-04 14:40:55.000000000 +0200
+@@ -30,3 +30,3 @@
+ /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+-#define HAVE_SYS_WAIT_H 1
++/* #undef HAVE_SYS_WAIT_H */
+ 
diff -ubBdNw -U5 -r mingw32-3.3.1.20030804.1.orig/debian/patches/ada-src-calendar.patch mingw32-3.3.1.20030804.1/debian/patches/ada-src-calendar.patch
--- mingw32-3.3.1.20030804.1.orig/debian/patches/ada-src-calendar.patch	1970-01-01 01:00:00.000000000 +0100
+++ mingw32-3.3.1.20030804.1/debian/patches/ada-src-calendar.patch	2004-07-04 14:43:09.000000000 +0200
@@ -0,0 +1,48 @@
+diff -r -ubBdNw gcc-3.3.1-20030804-1.orig/gcc/ada/4wcalend.adb gcc-3.3.1-20030804-1/gcc/ada/4wcalend.adb
+--- gcc-3.3.1-20030804-1.orig/gcc/ada/4wcalend.adb	2002-10-24 09:04:56.000000000 +0200
++++ gcc-3.3.1-20030804-1/gcc/ada/4wcalend.adb	2004-07-03 17:55:48.000000000 +0200
+@@ -318,13 +318,13 @@
+       --  in (as a result of checks being off in the caller, or for other
+       --  erroneous or bounded error cases).
+ 
+-      if        not Year   'Valid
+-        or else not Month  'Valid
+-        or else not Day    'Valid
+-        or else not Seconds'Valid
+-      then
+-         raise Constraint_Error;
+-      end if;
++--        if        not Year   'Valid
++--          or else not Month  'Valid
++--          or else not Day    'Valid
++--          or else not Seconds'Valid
++--        then
++--           raise Constraint_Error;
++--        end if;
+ 
+       if Seconds = 0.0 then
+          Int_Secs := 0;
+diff -r -ubBdNw gcc-3.3.1-20030804-1.orig/gcc/ada/a-calend.adb gcc-3.3.1-20030804-1/gcc/ada/a-calend.adb
+--- gcc-3.3.1-20030804-1.orig/gcc/ada/a-calend.adb	2002-10-24 09:05:18.000000000 +0200
++++ gcc-3.3.1-20030804-1/gcc/ada/a-calend.adb	2004-07-03 14:58:31.000000000 +0200
+@@ -411,13 +411,13 @@
+       --  in (as a result of checks being off in the caller, or for other
+       --  erroneous or bounded error cases).
+ 
+-      if        not Year   'Valid
+-        or else not Month  'Valid
+-        or else not Day    'Valid
+-        or else not Seconds'Valid
+-      then
+-         raise Constraint_Error;
+-      end if;
++--        if        not Year   'Valid
++--          or else not Month  'Valid
++--          or else not Day    'Valid
++--          or else not Seconds'Valid
++--        then
++--           raise Constraint_Error;
++--        end if;
+ 
+       --  Check for Day value too large (one might expect mktime to do this
+       --  check, as well as the basi checks we did with 'Valid, but it seems
diff -ubBdNw -U5 -r mingw32-3.3.1.20030804.1.orig/debian/rules mingw32-3.3.1.20030804.1/debian/rules
--- mingw32-3.3.1.20030804.1.orig/debian/rules	2004-07-04 14:13:49.000000000 +0200
+++ mingw32-3.3.1.20030804.1/debian/rules	2004-07-04 19:45:29.000000000 +0200
@@ -5,14 +5,18 @@
 # Created 30 Jan 2001, by Ron Lee <ron@debian.org>
 
 #export DH_VERBOSE=1
 #export DH_COMPAT=2
 
+# set this to 1 if you want to include support for Ada
+include_ada=0
+
 package=mingw32
 version=3.3.1
 release=$(version)-20030804-1
 upstream_packages=gcc-core-$(release) gcc-g++-$(release)
+languages=c,c++
 
 target=i586-mingw32msvc
 
 top_dir:=$(shell pwd)
 upstream_src_dir=$(top_dir)/upstream
@@ -22,30 +26,55 @@
 build_src_gcc=$(build_src)/gcc-$(release)
 build_objs=$(build_dir)/objs
 
 man1dir=usr/share/man/man1
 
+download_url=http://belnet.dl.sourceforge.net/sourceforge/mingw
+
+config_patches=
+src_patches=
+
+ifeq ($(include_ada),1)
+upstream_packages +=gcc-ada-$(release)
+# can not use += operator since it adds a space 
+languages :=$(languages),ada
+config_patches +=ada-configure-sys_wait.patch
+src_patches +=ada-src-calendar.patch
+endif
 
 build : build-stamp
 
 configure-stamp : unpack-stamp
 	dh_testdir
 	mkdir -p $(build_objs)
 	cd $(build_objs)							\
 		&& $(build_src_gcc)/configure -v				\
 					--prefix=/usr				\
 					--target=$(target)			\
-					--enable-languages=c,c++		\
+					--enable-languages=$(languages)		\
 					--enable-threads			\
 					--disable-multilib			\
 					--enable-version-specific-runtime-libs
+	@cd $(build_objs) 								\
+		&& for f in $(config_patches) ; do			\
+			echo "applying $$f";					\
+			patch -p0 < $(patch_dir)/$$f;			\
+		   done;
 	touch $@
 
 build-stamp : configure-stamp
 	dh_testdir
 	cd $(build_objs) && $(MAKE)
 
+ifeq ($(include_ada),1)
+# call some extra targets to compile gnattools, why are these not called 
+# by the default build target?
+	cd $(build_objs) && $(MAKE) -C gcc gnatlib cross-gnattools
+	cd $(build_objs) && $(MAKE)
+	/usr/bin/i586-mingw32msvc-ranlib $(build_objs)/gcc/ada/rts/*.a
+endif
+
 	touch $@
 
 
 install : install-stamp
 
@@ -80,10 +109,15 @@
 	mkdir -p $(build_src)
 
 	# unpack upstream tarballs
 	@cd $(build_src) \
 		&& for f in $(upstream_packages) ; do				\
+			if [ ! -r $(upstream_src_dir)/$$f-src.tar.gz \
+			     -a ! -r $(upstream_src_dir)/$$f-src.tar.bz2 ]; then	\
+				echo "downloading $$f"; \
+				wget -O $(upstream_src_dir)/$$f-src.tar.gz $(download_url)/$$f-src.tar.gz; \
+			fi; \
 			echo "unpacking $$f";					\
 			if [ -r $(upstream_src_dir)/$$f-src.tar.gz ]; then	\
 				tar zxf $(upstream_src_dir)/$$f-src.tar.gz;	\
 			elif [ -r $(upstream_src_dir)/$$f-src.tar.bz2 ]; then	\
 				tar jxf $(upstream_src_dir)/$$f-src.tar.bz2;	\
@@ -91,10 +125,16 @@
 				echo " *** Error: Failed to unpack $$f";	\
 				exit 1;						\
 			fi;							\
 		   done;
 
+	@cd $(build_src) 								\
+		&& for f in $(src_patches) ; do				\
+			echo "applying $$f";					\
+			patch -p0 < $(patch_dir)/$$f;			\
+		   done;
+
 	touch $@
 
 
 clean:
 	dh_testdir
@@ -125,11 +165,12 @@
 		/usr/lib/compilercache/compilercache /usr/lib/compilercache/$(target)-cc  \
 		/usr/lib/compilercache/compilercache /usr/lib/compilercache/$(target)-g++ \
 		/usr/lib/compilercache/compilercache /usr/lib/compilercache/$(target)-gcc
 
 	dh_strip -Xusr/$(target)/lib                         \
-		 -Xusr/lib/gcc-lib/$(target)/$(version)/lib
+		 -Xusr/lib/gcc-lib/$(target)/$(version)/lib		\
+		 -Xusr/lib/gcc-lib/$(target)/$(version)/ada
 	$(target)-strip --strip-debug 	debian/$(package)/usr/$(target)/lib/*.a
 	$(target)-strip --strip-debug 	debian/$(package)/usr/lib/gcc-lib/$(target)/$(version)/*.{a,o}
 
 # Ugh, the source package was built on a billbox.  Fix some stray executables.
 
