Added 1.5 support. Fixes #73319.
authorKarl Trygve Kalleberg <karltk@gentoo.org>
Thu, 30 Dec 2004 15:35:17 +0000 (15:35 +0000)
committerKarl Trygve Kalleberg <karltk@gentoo.org>
Thu, 30 Dec 2004 15:35:17 +0000 (15:35 +0000)
dev-java/bcel/ChangeLog
dev-java/bcel/Manifest
dev-java/bcel/bcel-5.1.ebuild
dev-java/bcel/files/bcel-5.1-gentoo-buildxml.diff [new file with mode: 0644]
dev-java/bcel/files/bcel-5.1-gentoo-src.diff [new file with mode: 0644]

index 0159323e77eec6207a20786138d8e322293cf390..35fd7606904a67b192816136f154a31f37c5f2cd 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-java/bcel
 # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/bcel/ChangeLog,v 1.22 2004/12/23 12:30:37 karltk Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/bcel/ChangeLog,v 1.23 2004/12/30 15:35:17 karltk Exp $
+
+  30 Dec 2004; Karl Trygve Kalleberg <karltk@gentoo.org>
+  +files/bcel-5.1-gentoo-buildxml.diff, +files/bcel-5.1-gentoo-src.diff,
+  bcel-5.1.ebuild:
+  Added support for JDK 1.5, thanks to Jan Brinkmann <luck@the-luckyduck.de>.
+  Fixes #73319.
 
   18 Dec 2004; Markus Rothe <corsair@gentoo.org> bcel-5.1.ebuild:
   added ~ppc64 to KEYWORDS
index fce3468e015ecd51ac82a445c21efe1df6c2eb1b..9d4b1e7c5db1f1acf601d37fdaf1af5703d71cb0 100644 (file)
@@ -1,5 +1,7 @@
-MD5 02fcc82f8cdaef311fe0a103c33c2411 bcel-5.1.ebuild 1149
-MD5 91a40f7e1373e56ce5e610770d4f8ce8 ChangeLog 2083
+MD5 a8e967c132686346c556f4762ae77ec3 bcel-5.1.ebuild 1194
+MD5 0a5a091e23db369f2006b4cc6ceb2b54 ChangeLog 2327
 MD5 a6ec7d7724fbd068ffb39b5be56134ed metadata.xml 157
 MD5 e908f81e51167a747ab8527dacc3ee4e files/digest-bcel-5.1 66
 MD5 88f16b1c12a8814d078c5eb3906d2218 files/bcel-5.1-gentoo.diff 457
+MD5 55afed4e967381f557d9a2247060a3c9 files/bcel-5.1-gentoo-src.diff 3249
+MD5 1e5e81012f73f8d7c465486a622baa4a files/bcel-5.1-gentoo-buildxml.diff 1289
index a10b0bbc57b96c2f250c0478ade12b8eeaa14291..f56d7f00df964bb9f9ab3a8e194553089addded0 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/bcel/bcel-5.1.ebuild,v 1.27 2004/12/23 12:30:37 karltk Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/bcel/bcel-5.1.ebuild,v 1.28 2004/12/30 15:35:17 karltk Exp $
 
 inherit java-pkg eutils
 
@@ -15,29 +15,37 @@ DEPEND=">=virtual/jdk-1.2
        >=dev-java/regexp-1.3-r1
        dev-java/ant-core
        jikes? ( dev-java/jikes )"
-DEP_APPEND="regexp"
+RDEPEND=">=virtual/jre-1.2
+       >=dev-java/regexp-1.3-r1"
 
 src_unpack() {
        unpack ${A}
        unzip -q "${P}-src.zip"
+
        cd ${S}
-       epatch ${FILESDIR}/${P}-gentoo.diff
+       epatch ${FILESDIR}/${P}-gentoo-buildxml.diff
+       epatch ${FILESDIR}/${P}-gentoo-src.diff
+
+       echo "regexp.jar=`java-config -p regexp`" > build.properties
 }
 
 src_compile() {
-       ANT_OPTS="${myc}"
-       CLASSPATH="${CLASSPATH}:`/usr/bin/java-config --classpath=regexp`"
-
-       use jikes && export ANT_OPTS="${ANT_OPTS} -Dbuild.compiler=jikes"
-       ant jar || die "Compile failed during jar target."
-       if use doc ; then
-               echo "Building Javadocs"
-               ant apidocs > /dev/null
+       local antflags="jar"
+
+       if use jikes; then
+               antflags="${antflags} -Dbuild.compiler=jikes"
        fi
+       if use doc; then
+               antflags="${antflags} apidocs"
+       fi
+       ant ${antflags}
 }
 
 src_install() {
-       use doc && java-pkg_dohtml -r docs/
+       if use doc; then
+               java-pkg_dohtml -r docs/
+       fi
+
        dodoc LICENSE.txt
        java-pkg_dojar bin/bcel.jar
 }
diff --git a/dev-java/bcel/files/bcel-5.1-gentoo-buildxml.diff b/dev-java/bcel/files/bcel-5.1-gentoo-buildxml.diff
new file mode 100644 (file)
index 0000000..f064035
--- /dev/null
@@ -0,0 +1,39 @@
+--- build.xml.orig     2004-12-19 18:15:47.840287952 +0100
++++ build.xml  2004-12-19 18:19:13.831972456 +0100
+@@ -58,24 +58,32 @@
+   <!-- Compile the sources -->
+   <target name="compile" depends="init">
+     <mkdir dir="${build.dest}"/>
+-    <javac srcdir="${src.dir}" destdir="${build.dest}" classpath="${class.path}" debug="true"/>
++    <javac srcdir="${src.dir}" 
++          destdir="${build.dest}" 
++          classpath="${class.path}" 
++          debug="off" 
++          target="1.4" 
++          source="1.4">
++      <classpath>
++              <pathelement path="${regexp.jar}"/>
++      </classpath>
++    </javac>
+   </target>
+ 
+   <!-- Just an alias -->
+   <target name="build" depends="compile"/>
+ 
+   <!-- Jar the library -->
+-  <target name="jar" depends="examples">
++  <target name="jar" depends="compile">
+     <jar jarfile="${build.dir}/${name}.jar" 
+          basedir="${build.dest}"
+-       manifest="${basedir}/manifest.txt"
+        includes="org/**,listclass.class"
+     />
+   </target>
+ 
+   <!-- Compile the examples -->
+   <target name="examples" depends="compile">
+-    <javac srcdir="${examples.dir}" destdir="${build.dest}" classpath="${class.path}" />
++    <javac srcdir="${examples.dir}" destdir="${build.dest}" classpath="${class.path}" target="1.4" source="1.4"/>
+   </target>
+ 
+   <!-- Creates the API documentation -->
diff --git a/dev-java/bcel/files/bcel-5.1-gentoo-src.diff b/dev-java/bcel/files/bcel-5.1-gentoo-src.diff
new file mode 100644 (file)
index 0000000..1060fb2
--- /dev/null
@@ -0,0 +1,51 @@
+diff -uprN src.orig/java/org/apache/bcel/verifier/statics/Pass2Verifier.java src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
+--- src.orig/java/org/apache/bcel/verifier/statics/Pass2Verifier.java  2004-12-19 18:28:47.428772488 +0100
++++ src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java       2004-12-19 18:39:36.804052440 +0100
+@@ -345,7 +345,7 @@ public final class Pass2Verifier extends
+ 
+                       for (int i=0; i<atts.length; i++){
+                               if ((! (atts[i] instanceof SourceFile)) &&
+-                                  (! (atts[i] instanceof Deprecated))     &&
++                                  (! (atts[i] instanceof org.apache.bcel.classfile.Deprecated))     &&
+                                   (! (atts[i] instanceof InnerClasses)) &&
+                                   (! (atts[i] instanceof Synthetic))){
+                                       addMessage("Attribute '"+tostring(atts[i])+"' as an attribute of the ClassFile structure '"+tostring(obj)+"' is unknown and will therefore be ignored.");
+@@ -519,7 +519,7 @@ public final class Pass2Verifier extends
+                       for (int i=0; i<atts.length; i++){
+                               if ((! (atts[i] instanceof ConstantValue)) &&
+                                   (! (atts[i] instanceof Synthetic))     &&
+-                                  (! (atts[i] instanceof Deprecated))){
++                                  (! (atts[i] instanceof org.apache.bcel.classfile.Deprecated))){
+                                       addMessage("Attribute '"+tostring(atts[i])+"' as an attribute of Field '"+tostring(obj)+"' is unknown and will therefore be ignored.");
+                               }
+                               if  (! (atts[i] instanceof ConstantValue)){
+@@ -660,7 +660,7 @@ public final class Pass2Verifier extends
+                               if ((! (atts[i] instanceof Code)) &&
+                                   (! (atts[i] instanceof ExceptionTable))     &&
+                                   (! (atts[i] instanceof Synthetic)) &&
+-                                  (! (atts[i] instanceof Deprecated))){
++                                  (! (atts[i] instanceof org.apache.bcel.classfile.Deprecated))){
+                                       addMessage("Attribute '"+tostring(atts[i])+"' as an attribute of Method '"+tostring(obj)+"' is unknown and will therefore be ignored.");
+                               }
+                               if ((! (atts[i] instanceof Code)) &&
+@@ -702,7 +702,7 @@ public final class Pass2Verifier extends
+                               addMessage("SourceFile attribute '"+tostring(obj)+"' has a funny name: remember not to confuse certain parsers working on javap's output. Also, this name ('"+sourcefilename+"') is considered an unqualified (simple) file name only.");
+                       }
+               }
+-              public void visitDeprecated(Deprecated obj){//vmspec2 4.7.10
++              public void visitDeprecated(org.apache.bcel.classfile.Deprecated obj){//vmspec2 4.7.10
+                       checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+ 
+                       String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+diff -uprN src.orig/java/org/apache/bcel/verifier/statics/StringRepresentation.java src/java/org/apache/bcel/verifier/statics/StringRepresentation.java
+--- src.orig/java/org/apache/bcel/verifier/statics/StringRepresentation.java   2004-12-19 18:28:47.429772336 +0100
++++ src/java/org/apache/bcel/verifier/statics/StringRepresentation.java        2004-12-19 18:38:52.087850336 +0100
+@@ -172,7 +172,7 @@ public class StringRepresentation extend
+       public void visitConstantValue(ConstantValue obj){
+               tostring = toString(obj);
+       }
+-      public void visitDeprecated(Deprecated obj){
++      public void visitDeprecated(org.apache.bcel.classfile.Deprecated obj){
+               tostring = toString(obj);
+       }
+       public void visitExceptionTable(ExceptionTable obj){