[SCM] advanced 3D real time strategy game engine branch, master, updated. debian/0.81.2.1+dfsg1-4-5-ga6c6a92

Jan Dittberner jandd at debian.org
Thu May 27 22:32:04 UTC 2010


The following commit has been merged in the master branch:
commit a6c6a928c3aadc509c0c0c1da1c135b74fde827c
Author: Jan Dittberner <jandd at debian.org>
Date:   Thu May 27 23:47:32 2010 +0200

    add debian/patches/0004-fix-gcj-4.4-compilation.patch to support builds with gcj-4.4

diff --git a/debian/changelog b/debian/changelog
index fd9d00d..65bc969 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ spring (0.81.2.1+dfsg1-5) UNRELEASED; urgency=low
       AI/Skirmish/HughAI/CMakeLists.txt
     - use -classpath instead of -cp
   * refresh debian/patches/0001-Minor-spelling-fix.patch
+  * add debian/patches/0004-fix-gcj-4.4-compilation.patch to support
+    builds with gcj-4.4
 
  -- Jan Dittberner <jandd at debian.org>  Thu, 27 May 2010 21:10:29 +0200
 
diff --git a/debian/patches/0004-fix-gcj-4.4-compilation.patch b/debian/patches/0004-fix-gcj-4.4-compilation.patch
new file mode 100644
index 0000000..fcc2528
--- /dev/null
+++ b/debian/patches/0004-fix-gcj-4.4-compilation.patch
@@ -0,0 +1,43 @@
+Author: Jan Dittberner <jandd at debian.org>
+Subject: gcj-4.4 does not have full support for generics, this patch replaces
+ incompatible generics code from the awk templates
+
+--- a/AI/Interfaces/Java/bin/java_wrappCallbackOO.awk
++++ b/AI/Interfaces/Java/bin/java_wrappCallbackOO.awk
+@@ -73,7 +73,7 @@
+ 	} else {
+ 		# is class
+ 		interfacesPref_h = " implements "
+-		implementedInterfacesPart_h = "Comparable<" javaClassName_h ">";
++		implementedInterfacesPart_h = "Comparable";
+ 		if (isOrHasInterface_h != 0) {
+ 			# has interface
+ 			implementedInterfacesPart_h = isOrHasInterface_h ", " implementedInterfacesPart_h;
+@@ -335,7 +335,7 @@
+ 	# print compareTo(other) method
+ 	{
+ 		print("\t" "@Override") >> outFile_c;
+-		print("\t" "public int compareTo(" clsNameExternal_c " other) {") >> outFile_c;
++		print("\t" "public int compareTo(Object other) {") >> outFile_c;
+ 		print("\t\t" "final int BEFORE = -1;") >> outFile_c;
+ 		print("\t\t" "final int EQUAL  =  0;") >> outFile_c;
+ 		print("\t\t" "final int AFTER  =  1;") >> outFile_c;
+@@ -344,14 +344,14 @@
+ 		print("") >> outFile_c;
+ 
+ 		if (isClbRootCls) {
+-			print("\t\t" "if (this.teamId < other.teamId) return BEFORE;") >> outFile_c;
+-			print("\t\t" "if (this.teamId > other.teamId) return AFTER;") >> outFile_c;
++			print("\t\t" "if (this.teamId < ((" clsNameExternal_c ") other).teamId) return BEFORE;") >> outFile_c;
++			print("\t\t" "if (this.teamId > ((" clsNameExternal_c ") other).teamId) return AFTER;") >> outFile_c;
+ 			print("\t\t" "return EQUAL;") >> outFile_c;
+ 		} else {
+ 			for (ai=0; ai < size_addInds; ai++) {
+ 				addIndName = additionalClsIndices[clsId_c "#" ai];
+-				print("\t\t" "if (this.get" capitalize(addIndName) "() < other.get" capitalize(addIndName) "()) return BEFORE;") >> outFile_c;
+-				print("\t\t" "if (this.get" capitalize(addIndName) "() > other.get" capitalize(addIndName) "()) return AFTER;") >> outFile_c;
++				print("\t\t" "if (this.get" capitalize(addIndName) "() < ((" clsNameExternal_c ") other).get" capitalize(addIndName) "()) return BEFORE;") >> outFile_c;
++				print("\t\t" "if (this.get" capitalize(addIndName) "() > ((" clsNameExternal_c ") other).get" capitalize(addIndName) "()) return AFTER;") >> outFile_c;
+ 			}
+ 			print("\t\t" "return this." myClassVar ".compareTo(other." myClassVar ");") >> outFile_c;
+ 		}
diff --git a/debian/patches/series b/debian/patches/series
index 605d1df..ba700ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Minor-spelling-fix.patch
 0002-use-Debian-java-libs.patch
 0003-fix-cmake-2_8-java-build.patch
+0004-fix-gcj-4.4-compilation.patch

-- 
advanced 3D real time strategy game engine



More information about the Pkg-games-commits mailing list