diff --git a/jna-tests-headless.patch b/jna-tests-headless.patch
new file mode 100644
index 0000000..994170b
--- /dev/null
+++ b/jna-tests-headless.patch
@@ -0,0 +1,10 @@
+--- jna-3.0.4-svn700/build.xml 2008-10-01 12:57:20.000000000 -0400
++++ jna-3.0.4-svn700.orig/build.xml 2008-10-01 12:57:16.000000000 -0400
+@@ -427,6 +427,7 @@
+
+
+
++
+
+
+
diff --git a/jna.spec b/jna.spec
index 4bf2c24..ac31925 100644
--- a/jna.spec
+++ b/jna.spec
@@ -1,6 +1,6 @@
Name: jna
Version: 3.0.4
-Release: 5.svn700%{?dist}
+Release: 7.svn700%{?dist}
Summary: Pure Java access to native libraries
Group: Development/Libraries
@@ -14,6 +14,13 @@ Source0: %{name}-%{version}.svn700.tar.bz2
# This patch is Fedora-specific for now until we get the huge
# JNI library location mess sorted upstream
Patch1: jna-3.0.2-loadlibrary.patch
+# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
+# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
+# and using a complex API like X11 through JNA just increases the potential
+# for problems.
+Patch2: jna-tests-headless.patch
+# https://jna.dev.java.net/issues/show_bug.cgi?id=88
+Patch3: jna-3.0.4-typemapper-accessible.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: java-devel >= 1.6 ant jpackage-utils ant-nodeps
@@ -44,6 +51,8 @@ This package contains the javadocs for %{name}.
%prep
%setup -q -n %{name}-%{version}-svn700
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
+%patch2 -p1 -b .tests-headless
+%patch3 -p1 -b .typemapper-public
# all java binaries must be removed from the sources
find . -name '*.jar' -exec rm -f '{}' \;
@@ -100,6 +109,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Sep 18 2008 Colin Walters - 3.0.4-7.svn700
+- Add patch to make typemapper always accessible
+- Add patch to skip cracktastic X11 test bits which currently fail
+
* Tue Sep 09 2008 Colin Walters - 3.0.4-5.svn700
- Update to upstream SVN r700; drop all now upstreamed patches