Bug#706419: cofoja: fails to build with OpenJDK 7
Colin Watson
cjwatson at ubuntu.com
Tue Apr 30 00:03:58 UTC 2013
Package: cofoja
Version: 1.0~r139-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch saucy
cofoja fails to build with OpenJDK 7, because the "unmappable character"
diagnostics that were warnings in OpenJDK 6 are now errors. These start
with:
[javac] /build/buildd/cofoja-1.0~r139/src/com/google/java/contract/AllowUnusedImport.java:30: error: unmappable character for encoding ASCII
[javac] * @author nhat.minh.le at huoc.org (Nhat Minh L??)
This can be fixed by forcing the encoding, as in the following patch. I
don't know if it's strictly necessary to touch all these javac
invocations, but figured it was better to be safe.
* Force source file encoding to UTF-8.
diff -Nru cofoja-1.0~r139/debian/patches/encoding cofoja-1.0~r139/debian/patches/encoding
--- cofoja-1.0~r139/debian/patches/encoding 1970-01-01 01:00:00.000000000 +0100
+++ cofoja-1.0~r139/debian/patches/encoding 2013-04-30 00:54:07.000000000 +0100
@@ -0,0 +1,54 @@
+Description: Force encoding to UTF-8
+Author: Colin Watson <cjwatson at ubuntu.com>
+Forwarded: no
+Last-Update: 2013-04-30
+
+Index: b/build.xml
+===================================================================
+--- a/build.xml
++++ b/build.xml
+@@ -93,7 +93,7 @@
+ <mkdir dir="${obj.dir}/tmp@{stage}" />
+ <mkdir dir="${obj.dir}/stage@{stage}" />
+ <javac srcdir="${src.dir}" destdir="${obj.dir}/tmp@{stage}"
+- debug="true" includeantruntime="false">
++ debug="true" includeantruntime="false" encoding="UTF-8">
+ <classpath refid="base.class.path" />
+ <compilerarg value="-processorpath" />
+ <compilerarg value="@{bootstrappath}:${asm.jar}" />
+@@ -148,7 +148,7 @@
+ <mkdir dir="${obj.dir}/bare" />
+ <javac srcdir="${src.dir}" destdir="${obj.dir}/bare"
+ debug="${debug}"
+- includeantruntime="false">
++ includeantruntime="false" encoding="UTF-8">
+ <classpath refid="base.class.path" />
+ </javac>
+ </target>
+@@ -165,7 +165,7 @@
+ <requirejar property="bootstrap.jar" />
+ <mkdir dir="${obj.dir}/build" />
+ <javac srcdir="${build.dir}" destdir="${obj.dir}/build"
+- debug="true" includeantruntime="false">
++ debug="true" includeantruntime="false" encoding="UTF-8">
+ <classpath>
+ <path refid="base.class.path" />
+ <pathelement path="${java.class.path}" />
+@@ -202,7 +202,7 @@
+ <requirejar property="junit.jar" />
+ <mkdir dir="${obj.dir}/test" />
+ <javac srcdir="${test.dir}" destdir="${obj.dir}/test"
+- debug="true" includeantruntime="false">
++ debug="true" includeantruntime="false" encoding="UTF-8">
+ <classpath>
+ <path refid="test.class.path" />
+ <pathelement path="${obj.dir}/stage2" />
+@@ -216,7 +216,7 @@
+
+ <target name="buildtest2" depends="buildtest1,stage2">
+ <javac srcdir="${test.dir}" destdir="${obj.dir}/test"
+- debug="true" includeantruntime="false">
++ debug="true" includeantruntime="false" encoding="UTF-8">
+ <classpath>
+ <path refid="test.class.path" />
+ <pathelement path="${obj.dir}/stage2" />
diff -Nru cofoja-1.0~r139/debian/patches/series cofoja-1.0~r139/debian/patches/series
--- cofoja-1.0~r139/debian/patches/series 2013-04-10 14:50:48.000000000 +0100
+++ cofoja-1.0~r139/debian/patches/series 2013-04-30 00:51:48.000000000 +0100
@@ -1 +1,2 @@
remove_version_from_generated_jar
+encoding
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the pkg-java-maintainers
mailing list