[java-gnome] Add (upstreamed) openjdk 1.7 compatibility patch.

abo abo at fedoraproject.org
Sun Dec 18 10:32:08 UTC 2011


commit 4abfc555d053923e270cdff9ff23ce97c00a2ff3
Author: Alexander Boström <abo at root.snowtree.se>
Date:   Sun Dec 18 11:28:30 2011 +0100

    Add (upstreamed) openjdk 1.7 compatibility patch.

 java-gnome-4.1.1-extendsboxed.patch |   29 +++++++++++++++++++++++++++++
 java-gnome.spec                     |   11 ++++++++++-
 2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/java-gnome-4.1.1-extendsboxed.patch b/java-gnome-4.1.1-extendsboxed.patch
new file mode 100644
index 0000000..d383431
--- /dev/null
+++ b/java-gnome-4.1.1-extendsboxed.patch
@@ -0,0 +1,29 @@
+--- java-gnome-4.1.1/src/bindings/org/gnome/glib/Plumbing.java.orig	2011-07-11 06:34:06.000000000 +0200
++++ java-gnome-4.1.1/src/bindings/org/gnome/glib/Plumbing.java	2011-12-15 21:18:02.130046113 +0100
+@@ -153,7 +153,7 @@
+      * Retrieve an array of appropriate Java Boxeds for the given array of
+      * pointers.
+      */
+-    protected static Boxed[] boxedArrayFor(final Class<?> type, final long[] pointers, Boxed[] boxeds) {
++    protected static Boxed[] boxedArrayFor(final Class<? extends Boxed> type, final long[] pointers, Boxed[] boxeds) {
+         if (pointers == null) {
+             return null;
+         }
+@@ -170,7 +170,7 @@
+      * @throw ClassCastException if the GType pointed by given pointer is not
+      *        a GBoxed.
+      */
+-    protected static Boxed boxedFor(Class<?> type, final long pointer) {
++    protected static Boxed boxedFor(Class<? extends Boxed> type, final long pointer) {
+         Boxed proxy;
+ 
+         if (pointer == 0L) {
+@@ -202,7 +202,7 @@
+      * 
+      * @see #boxedFor(Class, long)
+      */
+-    protected static void fillBoxedArray(Class<?> type, Boxed[] boxeds, long[] pointers) {
++    protected static void fillBoxedArray(Class<? extends Boxed> type, Boxed[] boxeds, long[] pointers) {
+         if (pointers == null) {
+             return;
+         }
diff --git a/java-gnome.spec b/java-gnome.spec
index 8904f24..49804ad 100644
--- a/java-gnome.spec
+++ b/java-gnome.spec
@@ -1,7 +1,7 @@
 Summary:	Java GNOME bindings
 Name:		java-gnome
 Version:	4.1.1
-Release:	2%{?dist}
+Release:	3%{?dist}
 URL:		http://java-gnome.sourceforge.net
 Source0:	http://ftp.gnome.org/pub/gnome/sources/java-gnome/4.0/java-gnome-%{version}.tar.xz
 # This is the "Classpath" exception.
@@ -29,6 +29,10 @@ BuildRequires:	jpackage-utils
 Requires:	java >= 1:1.6.0
 Requires:	jpackage-utils
 
+# Java 1.7 compat.
+# http://thread.gmane.org/gmane.comp.gnome.bindings.java.devel/1665/focus=1668
+Patch0:		java-gnome-4.1.1-extendsboxed.patch
+
 %description
 These are the Java bindings for GTK and GNOME! Featuring a robust 
 engineering design, completely generated internals, a lovingly 
@@ -54,6 +58,8 @@ design documentation and sample code.
 %prep
 %setup -q
 
+%patch0 -p1
+
 if find -name '*.class' -o -name '*.jar' | grep . >&2; then
     echo >&2 "Prebuilt binaries found in the sources. See https://fedoraproject.org/wiki/Packaging:Java#Pre-built_JAR_files_.2F_Other_bundled_software for instructions."
     exit 1
@@ -97,6 +103,9 @@ rm -rf %{buildroot}
 %{_javadocdir}/%{name}-%{version}
 
 %changelog
+* Sun Dec 18 2011 Alexander Boström <abo at root.snowtree.se> - 4.1.1-3
+- Add java-gnome-4.1.1-extendsboxed.patch: Java 1.7 compat.
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 4.1.1-2
 - Rebuild for new libpng
 


More information about the scm-commits mailing list