--- ilmbase-1.0.1.orig/HalfTest/testBitPatterns.cpp
+++ ilmbase-1.0.1/HalfTest/testBitPatterns.cpp
@@ -305,9 +305,11 @@
     testBits (floatPosQNan1(),
 	      "0 11111 1111111111",			// nan
 	      "0 11111111 11111111110000000000000");	// nan
+#ifndef __mc68000__
     testBits (floatPosQNan2(),
 	      "0 11111 1010101010",			// nan
 	      "0 11111111 10101010100000000000000");	// nan
+#endif
 
     //
     // Numbers close to -1.0
@@ -473,12 +475,14 @@
     testBits (floatNegInfinity(),
 	      "1 11111 0000000000",			// +infinity
 	      "1 11111111 00000000000000000000000");	// +infinity
+#ifndef __mc68000__
     testBits (floatNegQNan1(),
 	      "1 11111 1111111111",			// nan
 	      "1 11111111 11111111110000000000000");	// nan
     testBits (floatNegQNan2(),
 	      "1 11111 1010101010",			// nan
 	      "1 11111111 10101010100000000000000");	// nan
+#endif
 
     cout << "ok\n\n" << flush;
 }
--- ilmbase-1.0.1.orig/HalfTest/testClassification.cpp
+++ ilmbase-1.0.1/HalfTest/testClassification.cpp
@@ -156,8 +156,10 @@
     testClass (-0.3,			1,   1,   0,   0,   0,   0,   1);
     testClass (-HALF_MAX,		1,   1,   0,   0,   0,   0,   1);
     testClass (floatNegInfinity(),	0,   0,   0,   0,   0,   1,   1);
+#ifndef __mc68000__
     testClass (floatNegQNan1(),		0,   0,   0,   0,   1,   0,   1);
     testClass (floatNegQNan2(),		0,   0,   0,   0,   1,   0,   1);
+#endif
 
     cout << "\n";
 
--- ilmbase-1.0.1.orig/debian/control
+++ ilmbase-1.0.1/debian/control
@@ -0,0 +1,38 @@
+Source: ilmbase
+Section: libs
+Priority: optional
+Maintainer: Adeodato Simó <dato@net.com.org.es>
+Build-Depends: autotools-dev, debhelper
+Standards-Version: 3.7.3
+Homepage: http://www.openexr.com
+Vcs-Bzr: http://people.debian.org/~adeodato/code/packages/ilmbase
+
+Package: libilmbase6
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: several utility libraries from ILM used by OpenEXR
+ IlmBase are a set of utility libraries released by ILM, and used in
+ their OpenEXR implementation. Included in this package you can find:
+ .
+  * libHalf: a class (Half) for manipulating "half" values (16-bit
+    floating point format) as if they were a built-in C++ data type.
+ .
+  * libIlmThread: a thread abstraction library on top of pthreads.
+ .
+  * libImath: a math library with support for matrices, 2d- and
+    3d-transformations, solvers for linear/quadratic/cubic equations,
+    and more.
+ .
+  * libIex: an exception handling library.
+
+Package: libilmbase-dev
+Architecture: any
+Section: libdevel
+Depends: libilmbase6 (= ${binary:Version}), ${shlibs:Depends}
+Replaces: libopenexr-dev (<< 1.6)
+Conflicts: libopenexr-dev (<< 1.6)
+Description: development files for IlmBase
+ This package provides the development files for IlmBase, a set of
+ utility libraries relesaed by ILM and used by OpenEXR. Install this
+ package if you want to compile a program that makes use of these
+ libraries.
--- ilmbase-1.0.1.orig/debian/compat
+++ ilmbase-1.0.1/debian/compat
@@ -0,0 +1 @@
+5
--- ilmbase-1.0.1.orig/debian/libilmbase-dev.install
+++ ilmbase-1.0.1/debian/libilmbase-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/lib/*.a
+debian/tmp/usr/lib/*.so
+debian/tmp/usr/include/OpenEXR
+debian/tmp/usr/lib/pkgconfig/IlmBase.pc
--- ilmbase-1.0.1.orig/debian/rules
+++ ilmbase-1.0.1/debian/rules
@@ -0,0 +1,120 @@
+#! /usr/bin/make -f
+
+NO_MAKE_CHECK_ARCHES := arm
+
+###
+
+# Configure arguments
+
+confflags = --prefix=/usr
+
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+confflags += --build $(DEB_BUILD_GNU_TYPE)
+
+# Only specify --host when cross-compiling
+ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+    confflags += --host $(DEB_HOST_GNU_TYPE)
+endif
+
+###
+
+# Directory to make the build on
+
+objdir = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
+
+###
+
+# CFLAGS
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+###
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+
+	ln -sf /usr/share/misc/config.sub .
+	ln -sf /usr/share/misc/config.guess .
+
+	-mkdir $(objdir)
+	cd $(objdir) && \
+	env CFLAGS="$(CFLAGS)" PTHREAD_LIBS=-lpthread ../configure $(confflags)
+
+	touch $@
+
+#
+
+build: build-stamp
+build-stamp: configure-stamp
+	cd $(objdir) && \
+	$(MAKE) all
+ifeq (,$(filter $(DEB_BUILD_ARCH),$(NO_MAKE_CHECK_ARCHES)))
+	cd $(objdir) && \
+	$(MAKE) check
+endif
+
+	touch $@
+
+#
+
+clean:
+	dh_testdir
+	dh_testroot
+
+	rm -f configure-stamp build-stamp install-stamp
+	rm -f config.guess config.sub
+	rm -rf $(objdir)
+
+	dh_clean
+
+#
+
+install: install-stamp
+install-stamp:
+	dh_testdir
+	dh_testroot
+	dh_clean
+	dh_installdirs
+	cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	dh_install --list-missing
+	touch $@ 
+
+#
+
+binary: binary-arch
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog
+	dh_installdocs AUTHORS NEWS README
+	dh_installexamples
+	dh_installmime
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs -V 'libilmbase6'
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-indep:
+	@echo "Nothing to do."
+
+#
+
+.PHONY: configure build clean install binary binary-arch binary-indep
--- ilmbase-1.0.1.orig/debian/copyright
+++ ilmbase-1.0.1/debian/copyright
@@ -0,0 +1,44 @@
+Debianized by Adeodato Simó <dato@net.com.org.es>	2007-11-01
+
+The sources of IlmBase can be downloaded from:
+
+    http://download.savannah.gnu.org/releases/openexr
+
+And the project homepage is:
+
+    http://www.openexr.com
+
+Upstream authors:
+
+    Florian Kainz <kainz@ilm.com>
+    Rod Bogart <rgb@ilm.com>
+    Drew Hess <dhess@ilm.com>
+    Bill Anderson <wja@ilm.com>
+    Wojciech Jarosz <wjarosz@ucsd.edu>
+
+Copyright and license terms:
+
+  - The sources of IlmBase are:
+
+    | Copyright (C) 2002, 2005, 2006, 2007 Industrial Light & Magic,
+    | a division of Lucas Digital Ltd. LLC
+
+    And licensed under the terms of the BSD license. On Debian systems, the
+    full text of the BSD License is available in /usr/share/common-licenses/BSD.
+
+  - The file Imath/ImathPlatform.h contains code which is:
+
+    | Copyright (C) 2001 Boost.org
+
+    Under the following license:
+
+    | Permission to copy, use, modify, sell and and distribute this
+    | software is granted provided this copyright notice appears in all
+    | copies. This software is provided "as is" without express or implied
+    | warranty, and with no claim as to its suitability for any purpose.
+
+  - The packaging scripts in the debian/ subdirectory are:
+
+    | Copyright (c) 2007  Adeodato Simó
+
+    And licensed under the same terms of IlmBase itself.
--- ilmbase-1.0.1.orig/debian/watch
+++ ilmbase-1.0.1/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://download.savannah.gnu.org/releases/openexr/ilmbase-(.+).tar.gz
--- ilmbase-1.0.1.orig/debian/libilmbase6.install
+++ ilmbase-1.0.1/debian/libilmbase6.install
@@ -0,0 +1,9 @@
+debian/tmp/usr/lib/libIex.so.6
+debian/tmp/usr/lib/libIex.so.6.*
+debian/tmp/usr/lib/libHalf.so.6
+debian/tmp/usr/lib/libHalf.so.6.*
+debian/tmp/usr/lib/libImath.so.6
+debian/tmp/usr/lib/libImath.so.6.*
+debian/tmp/usr/lib/libIlmThread.so.6
+debian/tmp/usr/lib/libIlmThread.so.6.*
+debian/overrides/libilmbase6	usr/share/lintian/overrides
--- ilmbase-1.0.1.orig/debian/changelog
+++ ilmbase-1.0.1/debian/changelog
@@ -0,0 +1,40 @@
+ilmbase (1.0.1-2+nmu2~bpo40+1) etch-backports; urgency=low
+
+  * Backport testing version for backports.org
+
+ -- Micah Anderson <micah@debian.org>  Fri, 16 Jan 2009 21:18:34 +0000
+
+ilmbase (1.0.1-2+nmu2) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Apply workaround proposed by Andreas Metzler to correctly
+    link to libpthread. (Closes: #492357)
+
+ -- Frank Lichtenheld <djpig@debian.org>  Mon, 11 Aug 2008 18:28:06 -0300
+
+ilmbase (1.0.1-2+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix NaN handling in the testsuite for m68k. (Closes: #478548)
+  * Approved by maintainer per #478548.
+
+ -- Stephen R. Marenka <smarenka@debian.org>  Thu, 29 May 2008 14:40:04 -0500
+
+ilmbase (1.0.1-2) unstable; urgency=medium
+
+  * Replace and Conflict libopenexr-dev (<< 1.6). (Closes: #451913)
+
+  * Disable the testsuite in arm for now, see:
+    http://lists.debian.org/debian-arm/2007/11/msg00004.html
+
+  * Other changes:
+    + bump Standard-Version to 3.7.3 (no changes needed).
+    + use canonical URL in copyright and control (s/.org/.com/).
+
+ -- Adeodato Simó <dato@net.com.org.es>  Sun, 17 Feb 2008 14:07:41 +0100
+
+ilmbase (1.0.1-1) unstable; urgency=low
+
+  * Initial release. (Closes: #448883)
+
+ -- Adeodato Simó <dato@net.com.org.es>  Thu, 01 Nov 2007 18:01:15 +0100
--- ilmbase-1.0.1.orig/debian/overrides/libilmbase6
+++ ilmbase-1.0.1/debian/overrides/libilmbase6
@@ -0,0 +1 @@
+libilmbase6: package-name-doesnt-match-sonames libHalf6 libIex6 libIlmThread6 libImath6
