diff --git a/debian/changelog b/debian/changelog
index 9a80cf3..31155ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+lwjgl (2.4.2+dfsg-3) unstable; urgency=low
+
+ * Fixes FTBFS on powerpc, armel and sh4. (Closes: #584985)
+ * Removed trailing CRs from patches.
+
+ -- Gabriele Giacone <1o5g4r8o@gmail.com> Fri, 11 Jun 2010 21:06:59 +0200
+
lwjgl (2.4.2+dfsg-2) unstable; urgency=low
* Fixed clean target. Fixes FTBFS.
diff --git a/debian/patches/00nomacosx b/debian/patches/00nomacosx
index 2431eef..b855740 100644
--- a/debian/patches/00nomacosx
+++ b/debian/patches/00nomacosx
@@ -1,179 +1,99 @@
Description: Removes references to macosx-related classes.
Author: Gabriele Giacone <1o5g4r8o@gmail.com>
---- a/build.xml
-+++ b/build.xml
-@@ -234,7 +234,7 @@
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
--
\ No newline at end of file
-
-+
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-@@ -298,13 +298,13 @@
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
--
\ No newline at end of file
-
-+
\ No newline at end of file
-
-
\ No newline at end of file
-
- lwjgl.java.windows.version = ${lwjgl.java.windows.version}
\ No newline at end of file
-
- lwjgl.native.windows.version = ${lwjgl.native.windows.version}
\ No newline at end of file
-
---- a/platform_build/build-applet.xml
-+++ b/platform_build/build-applet.xml
-@@ -1,7 +1,7 @@
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
--
\ No newline at end of file
-
-+
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
---- a/src/java/org/lwjgl/MacOSXSysImplementation.java
-+++ b/src/java/org/lwjgl/MacOSXSysImplementation.java
-@@ -33,7 +33,7 @@ package org.lwjgl;
-
\ No newline at end of file
-
- import java.awt.Toolkit;
\ No newline at end of file
-
-
\ No newline at end of file
-
--import com.apple.eio.FileManager;
\ No newline at end of file
-
-+//import com.apple.eio.FileManager;
\ No newline at end of file
-
-
\ No newline at end of file
-
- /**
\ No newline at end of file
-
- *
\ No newline at end of file
-
-@@ -55,7 +55,7 @@ final class MacOSXSysImplementation extends J2SESysImplementation {
-
\ No newline at end of file
-
- public boolean openURL(String url) {
\ No newline at end of file
-
- try {
\ No newline at end of file
-
-- FileManager.openURL(url);
\ No newline at end of file
-
-+// FileManager.openURL(url);
\ No newline at end of file
-
- return true;
\ No newline at end of file
-
- } catch (Exception e) {
\ No newline at end of file
-
- LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
\ No newline at end of file
-
---- a/src/java/org/lwjgl/opengl/MacOSXDisplay.java
-+++ b/src/java/org/lwjgl/opengl/MacOSXDisplay.java
-@@ -54,9 +54,9 @@ import org.lwjgl.BufferUtils;
- import org.lwjgl.LWJGLException;
\ No newline at end of file
-
- import org.lwjgl.LWJGLUtil;
\ No newline at end of file
-
-
\ No newline at end of file
-
--import com.apple.eawt.Application;
\ No newline at end of file
-
--import com.apple.eawt.ApplicationAdapter;
\ No newline at end of file
-
--import com.apple.eawt.ApplicationEvent;
\ No newline at end of file
-
-+//import com.apple.eawt.Application;
\ No newline at end of file
-
-+//import com.apple.eawt.ApplicationAdapter;
\ No newline at end of file
-
-+//import com.apple.eawt.ApplicationEvent;
\ No newline at end of file
-
-
\ No newline at end of file
-
- final class MacOSXDisplay implements DisplayImplementation {
\ No newline at end of file
-
- private static final int PBUFFER_HANDLE_SIZE = 24;
\ No newline at end of file
-
-@@ -77,11 +77,11 @@ final class MacOSXDisplay implements DisplayImplementation {
- try {
\ No newline at end of file
-
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
\ No newline at end of file
-
- public Object run() throws Exception {
\ No newline at end of file
-
-- Application.getApplication().addApplicationListener(new ApplicationAdapter() {
\ No newline at end of file
-
-+/* Application.getApplication().addApplicationListener(new ApplicationAdapter() {
\ No newline at end of file
-
- public final void handleQuit(ApplicationEvent event) {
\ No newline at end of file
-
- doHandleQuit();
\ No newline at end of file
-
- }
\ No newline at end of file
-
-- });
\ No newline at end of file
-
-+ }); */
\ No newline at end of file
-
- return null;
\ No newline at end of file
-
- }
\ No newline at end of file
-
- });
\ No newline at end of file
-
+--- a/build.xml
++++ b/build.xml
+@@ -234,7 +234,7 @@
+
+
+
+-
++
+
+
+
+@@ -298,13 +298,13 @@
+
+
+
+-
++
+
+ lwjgl.java.windows.version = ${lwjgl.java.windows.version}
+ lwjgl.native.windows.version = ${lwjgl.native.windows.version}
+--- a/platform_build/build-applet.xml
++++ b/platform_build/build-applet.xml
+@@ -1,7 +1,7 @@
+
+
+
+-
++
+
+
+
+--- a/src/java/org/lwjgl/MacOSXSysImplementation.java
++++ b/src/java/org/lwjgl/MacOSXSysImplementation.java
+@@ -33,7 +33,7 @@
+
+ import java.awt.Toolkit;
+
+-import com.apple.eio.FileManager;
++//import com.apple.eio.FileManager;
+
+ /**
+ *
+@@ -55,7 +55,7 @@
+
+ public boolean openURL(String url) {
+ try {
+- FileManager.openURL(url);
++// FileManager.openURL(url);
+ return true;
+ } catch (Exception e) {
+ LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
+--- a/src/java/org/lwjgl/opengl/MacOSXDisplay.java
++++ b/src/java/org/lwjgl/opengl/MacOSXDisplay.java
+@@ -54,9 +54,9 @@
+ import org.lwjgl.LWJGLException;
+ import org.lwjgl.LWJGLUtil;
+
+-import com.apple.eawt.Application;
+-import com.apple.eawt.ApplicationAdapter;
+-import com.apple.eawt.ApplicationEvent;
++//import com.apple.eawt.Application;
++//import com.apple.eawt.ApplicationAdapter;
++//import com.apple.eawt.ApplicationEvent;
+
+ final class MacOSXDisplay implements DisplayImplementation {
+ private static final int PBUFFER_HANDLE_SIZE = 24;
+@@ -77,11 +77,11 @@
+ try {
+ AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public Object run() throws Exception {
+- Application.getApplication().addApplicationListener(new ApplicationAdapter() {
++/* Application.getApplication().addApplicationListener(new ApplicationAdapter() {
+ public final void handleQuit(ApplicationEvent event) {
+ doHandleQuit();
+ }
+- });
++ }); */
+ return null;
+ }
+ });
diff --git a/debian/patches/01allarchs b/debian/patches/01allarchs
index 142c46b..3faa8c5 100644
--- a/debian/patches/01allarchs
+++ b/debian/patches/01allarchs
@@ -1,82 +1,74 @@
-Description: To build on all archs
-Author: Gabriele Giacone <1o5g4r8o@gmail.com>
-
---- a/platform_build/linux_ant/build.xml
-+++ b/platform_build/linux_ant/build.xml
-@@ -1,17 +1,22 @@
-
-
-
-+
-+
-+
-
-
-
-
-
-+
-
-
-
-
-
-
-+
-
-
-
-@@ -41,6 +46,7 @@
-
-
-
-+
-
-
-
-@@ -58,9 +64,12 @@
-
-
-
-+
-+
-+
-+
-
--
--
-+
-
-
-
-@@ -114,4 +123,30 @@
-
-
-
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-
+Description: To build on all archs
+Author: Gabriele Giacone <1o5g4r8o@gmail.com>
+
+--- a/platform_build/linux_ant/build.xml
++++ b/platform_build/linux_ant/build.xml
+@@ -6,12 +6,14 @@
+
+
+
++
+
+
+
+
+
+
++
+
+
+
+@@ -41,6 +43,7 @@
+
+
+
++
+
+
+
+@@ -58,9 +61,12 @@
+
+
+
++
++
++
++
+
+-
+-
++
+
+
+
+@@ -114,4 +120,30 @@
+
+
+
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
+
diff --git a/debian/patches/02systemjinput b/debian/patches/02systemjinput
index 60e4672..bd80ced 100644
--- a/debian/patches/02systemjinput
+++ b/debian/patches/02systemjinput
@@ -1,39 +1,23 @@
Description: To find system jinput libraries
Author: Gabriele Giacone <1o5g4r8o@gmail.com>
---- a/build.xml
-+++ b/build.xml
-@@ -340,7 +340,7 @@
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
--
\ No newline at end of file
-
-+
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-@@ -481,7 +481,7 @@
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
--
\ No newline at end of file
-
-+
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
-
\ No newline at end of file
-
+--- a/build.xml
++++ b/build.xml
+@@ -340,7 +340,7 @@
+
+
+
+-
++
+
+
+
+@@ -481,7 +481,7 @@
+
+
+
+-
++
+
+
+