From bb868a10ef7e2e7428fd089c9e6da14638379f49 Mon Sep 17 00:00:00 2001 From: Permaine Cheung Date: Jan 09 2008 14:00:09 +0000 Subject: make Java 6's javac understand -source 1.1 as well --- diff --git a/ant.spec b/ant.spec index 4e02041..c625b76 100644 --- a/ant.spec +++ b/ant.spec @@ -55,7 +55,7 @@ Name: ant Version: 1.7.0 -Release: %{jpprelease}.2%{?dist} +Release: %{jpprelease}.3%{?dist} Epoch: 0 Summary: Ant build tool for java Summary(it): Tool per la compilazione di programmi java @@ -73,6 +73,7 @@ Patch2: apache-ant-1.7.0-javah.patch # Fix some places where copies of classes are included in the wrong jarfiles Patch4: apache-ant-jars.patch Patch5: apache-ant-bz163689.patch +Patch6: apache-ant-r529855.patch Requires: jaxp_parser_impl Requires: jpackage-utils >= 0:1.6 @@ -616,6 +617,9 @@ Javadoc pour %{name}. #%patch5 -p1 -b .orig #%endif +# Patch to make Java 6's javac understand -source 1.2 +%patch6 -p0 + # clean jar files find . -name "*.jar" -exec rm -f {} \; @@ -1365,6 +1369,10 @@ fi # ----------------------------------------------------------------------------- %changelog +* Wed Jan 09 2008 Permaine Cheung - 0:1.7.0-1jpp.3 +- make Java 6's javac understand -source 1.1 as well (patch from bodewig + on the ant mailing list) + * Tue Aug 14 2007 Permaine Cheung - 0:1.7.0-1jpp.2 - Enable building commons-net subpackage diff --git a/apache-ant-r529855.patch b/apache-ant-r529855.patch new file mode 100644 index 0000000..0c0b9d6 --- /dev/null +++ b/apache-ant-r529855.patch @@ -0,0 +1,18 @@ +Index: src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java +=================================================================== +--- src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java (revision 529854) ++++ src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java (revision 529855) +@@ -321,10 +321,10 @@ + if (attributes.getSource() != null && !assumeJava13()) { + cmd.createArgument().setValue("-source"); + String source = attributes.getSource(); +- if ((assumeJava14() || assumeJava15()) +- && (source.equals("1.1") || source.equals("1.2"))) { ++ if (source.equals("1.1") || source.equals("1.2")) { + // support for -source 1.1 and -source 1.2 has been +- // added with JDK 1.4.2 - and isn't present in 1.5.0 either ++ // added with JDK 1.4.2 - and isn't present in 1.5.0 ++ // or 1.6.0 either + cmd.createArgument().setValue("1.3"); + } else { + cmd.createArgument().setValue(source);