[pkg-java] r6043 - in trunk/ant/debian: . patches

mkoch at alioth.debian.org mkoch at alioth.debian.org
Mon Mar 31 18:24:34 UTC 2008


Author: mkoch
Date: 2008-03-31 18:24:33 +0000 (Mon, 31 Mar 2008)
New Revision: 6043

Added:
   trunk/ant/debian/patches/10_ant_native2ascii.patch
Modified:
   trunk/ant/debian/ant-doc.doc-base.2
   trunk/ant/debian/changelog
Log:
ant (1.7.0-5) unstable; urgency=low

  * Fix handling of native2ascii for classpath based VMs.
    Closes: 470584.
  * Fixed Section in ant-doc.doc-base.2 to 'Programming'.

 -- Michael Koch <konqueror at gmx.de>  Mon, 31 Mar 2008 20:14:27 +0200



Modified: trunk/ant/debian/ant-doc.doc-base.2
===================================================================
--- trunk/ant/debian/ant-doc.doc-base.2	2008-03-30 17:05:10 UTC (rev 6042)
+++ trunk/ant/debian/ant-doc.doc-base.2	2008-03-31 18:24:33 UTC (rev 6043)
@@ -3,7 +3,7 @@
 Author: The Apache Ant Development Team
 Abstract: This is the manual of Ant, a system independent (i.e. not shell
  based) build tool that uses XML files as "Makefiles".
-Section: Apps/Programming
+Section: Programming
 
 Format: HTML
 Index: /usr/share/doc/ant-doc/index.html

Modified: trunk/ant/debian/changelog
===================================================================
--- trunk/ant/debian/changelog	2008-03-30 17:05:10 UTC (rev 6042)
+++ trunk/ant/debian/changelog	2008-03-31 18:24:33 UTC (rev 6043)
@@ -1,3 +1,11 @@
+ant (1.7.0-5) unstable; urgency=low
+
+  * Fix handling of native2ascii for classpath based VMs.
+    Closes: 470584.
+  * Fixed Section in ant-doc.doc-base.2 to 'Programming'.
+
+ -- Michael Koch <konqueror at gmx.de>  Mon, 31 Mar 2008 20:14:27 +0200
+
 ant (1.7.0-4) unstable; urgency=low
 
   * Fixed debian/changelog to differenciate between license and copyright.

Added: trunk/ant/debian/patches/10_ant_native2ascii.patch
===================================================================
--- trunk/ant/debian/patches/10_ant_native2ascii.patch	                        (rev 0)
+++ trunk/ant/debian/patches/10_ant_native2ascii.patch	2008-03-31 18:24:33 UTC (rev 6043)
@@ -0,0 +1,67 @@
+--- src/main/org/apache/tools/ant/util/JavaEnvUtils.java.orig
++++ src/main/org/apache/tools/ant/util/JavaEnvUtils.java
+@@ -73,6 +73,9 @@
+     /** Whether this is the Kaffe VM */
+     private static boolean kaffeDetected;
+ 
++    /** Wheter this is a GNU Classpath based VM */
++    private static boolean classpathDetected;
++
+     /** array of packages in the runtime */
+     private static Vector jrePackages;
+ 
+@@ -119,6 +122,13 @@
+         } catch (Throwable t) {
+             // swallow as this simply doesn't seem to be Kaffe
+         }
++	classpathDetected = false;
++	try {
++	    Class.forName("gnu.classpath.Configuration");
++	    classpathDetected = true;
++	} catch (Throwable t) {
++            // swallow as this simply doesn't seem to be GNU classpath based.
++	}
+     }
+ 
+     /**
+@@ -179,6 +189,10 @@
+         return kaffeDetected;
+     }
+ 
++    public static boolean isClasspathBased() {
++        return classpathDetected;
++    }
++
+     /**
+      * Finds an executable that is part of a JRE installation based on
+      * the java.home system property.
+--- src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/KaffeNative2Ascii.java.orig
++++ src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/KaffeNative2Ascii.java
+@@ -32,6 +32,7 @@
+ 
+     // sorted by newest Kaffe version first
+     private static final String[] N2A_CLASSNAMES = new String[] {
++        "gnu.classpath.tools.native2ascii.Native2ASCII",
+         "gnu.classpath.tools.native2ascii.Native2Ascii",
+         // pre Kaffe 1.1.5
+         "kaffe.tools.native2ascii.Native2Ascii",
+--- src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java.orig
++++ src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java
+@@ -38,7 +38,7 @@
+      * vendor
+      */
+     public static String getDefault() {
+-        if (JavaEnvUtils.isKaffe()) {
++        if (JavaEnvUtils.isKaffe() || JavaEnvUtils.isClasspathBased()) {
+             return KaffeNative2Ascii.IMPLEMENTATION_NAME;
+         }
+         return SunNative2Ascii.IMPLEMENTATION_NAME;
+@@ -57,7 +57,7 @@
+     public static Native2AsciiAdapter getAdapter(String choice,
+                                                  ProjectComponent log)
+         throws BuildException {
+-        if ((JavaEnvUtils.isKaffe() && choice == null)
++        if (((JavaEnvUtils.isKaffe() || JavaEnvUtils.isClasspathBased()) && choice == null)
+             || KaffeNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
+             return new KaffeNative2Ascii();
+         } else if (SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {




More information about the pkg-java-commits mailing list