diff options
author | Bertrand Jacquin <beber@meleeweb.net> | 2006-06-01 22:53:10 +0200 |
---|---|---|
committer | Bertrand Jacquin <beber@meleeweb.net> | 2006-06-01 22:53:10 +0200 |
commit | 6c39ab7a6fff93750d88a93823c2780a426d2cc6 (patch) | |
tree | 655ed0fa9b6e658ed7066b9c4c604c3d65711a0d | |
parent | add gajim 0.10 (diff) | |
download | portage-6c39ab7a6fff93750d88a93823c2780a426d2cc6.tar.xz |
delete java stuff
64 files changed, 0 insertions, 8940 deletions
diff --git a/dev-java/ant-core/Manifest b/dev-java/ant-core/Manifest deleted file mode 100644 index 98802a78..00000000 --- a/dev-java/ant-core/Manifest +++ /dev/null @@ -1,24 +0,0 @@ -MD5 12e124e5bbf9a57c52a65e9b2aa208be ant-core-1.6.5-r13.ebuild 2101 -RMD160 e7d5d187dd248bb6d62f5160b728e86751863a52 ant-core-1.6.5-r13.ebuild 2101 -SHA256 00db84878fe96332d2a679a6d2ac1199bb9fce57216a85279ae70649601bc698 ant-core-1.6.5-r13.ebuild 2101 -MD5 ed7888d5d5fd5a1b9ba7226375c03d8a files/1.6.5-ant 5182 -RMD160 05b60428dbe0d7e25e604d4d8bad8e87d410ae7c files/1.6.5-ant 5182 -SHA256 e76dd6df1349c3a9477041251804bca0e948ca19ee6ec14d8345f093fb149d64 files/1.6.5-ant 5182 -MD5 4383441650437fec5622070e48e4324c files/build.sh-exit-fix.patch.gz 256 -RMD160 5743f4c52c6a403452c8bbb149236d1022ad688b files/build.sh-exit-fix.patch.gz 256 -SHA256 6de26777aa024417a5ac85dd6d7eb8a2ecdce0c011d1ff2904851f306bb83789 files/build.sh-exit-fix.patch.gz 256 -MD5 227dc236d8a61c988826da9fefe72bce files/build.with.native.ecj.diff 791 -RMD160 70437750bc3fe3e78703efdb66fd6f6d04b2b1d9 files/build.with.native.ecj.diff 791 -SHA256 c1f109fd6e12786b2e8dc7c62c3eff7825c6aee66f437a04ed2116e5ebb612b4 files/build.with.native.ecj.diff 791 -MD5 31de0486a830c545c91a089241b3bb9a files/digest-ant-core-1.6.5-r13 268 -RMD160 3a54cfc35c821291722b58076e3524c513ee1dc2 files/digest-ant-core-1.6.5-r13 268 -SHA256 6d25121ad88d0c2a4d0822cff5bb2d50c9f6886369b452882476811f65c1b8f5 files/digest-ant-core-1.6.5-r13 268 -MD5 0b4de1433f5ce7efbfdc0ddc3f554bb0 files/include-nativeEcj.diff 601 -RMD160 73828a0bd25771e746164035f32bb438f7ad3b61 files/include-nativeEcj.diff 601 -SHA256 5eff8e44ceec45855c6109f1091456049e105fb11bf80ac23bd4e6045a3629c5 files/include-nativeEcj.diff 601 -MD5 5dbfa85d95bbf01dfa9479e270ff1836 files/nativeEcj-old.diff 3301 -RMD160 74759ee10f0613852cf9b43c6fa96da94c5cf676 files/nativeEcj-old.diff 3301 -SHA256 b045074bbda232d14edbfea06c20bd8825149782fb2a4a55dc3306c83cb5ad64 files/nativeEcj-old.diff 3301 -MD5 55c7c4182524be3d39439387e8d1e584 files/nativeEcj.diff 1814 -RMD160 5129e77151e0812959f98736788dbd8ce65e2d03 files/nativeEcj.diff 1814 -SHA256 9fdf7022c2504330f009ba987626cf7d9b804fdb1210f7c4665833899a716b51 files/nativeEcj.diff 1814 diff --git a/dev-java/ant-core/files/1.6.5-ant b/dev-java/ant-core/files/1.6.5-ant deleted file mode 100644 index 474683ef..00000000 --- a/dev-java/ant-core/files/1.6.5-ant +++ /dev/null @@ -1,171 +0,0 @@ -#! /bin/bash - -# Copyright 2001-2004 The Apache Software Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Edited for Gentoo Linux -# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/files/1.6.5-ant,v 1.5 2005/12/21 20:45:29 betelgeuse Exp $ - -# Extract launch and ant arguments, (see details below). -ant_exec_args= -no_config=false -use_jikes_default=false -ant_exec_debug=false -show_help=false -for arg in "$@" ; do - if [ "$arg" = "--noconfig" ] ; then - no_config=true - elif [ "$arg" = "--usejikes" ] ; then - use_jikes_default=true - elif [ "$arg" = "--execdebug" ] ; then - ant_exec_debug=true - elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then - show_help=true - ant_exec_args="$ant_exec_args -h" - else - if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then - show_help=true - fi - ant_exec_args="$ant_exec_args \"$arg\"" - fi -done - -# Source/default ant configuration -if $no_config ; then - rpm_mode=false - usejikes=$use_jikes_default -else - # load system-wide ant configuration - if [ -f "/etc/ant.conf" ] ; then - . /etc/ant.conf - fi - - # load user ant configuration - if [ -f "$HOME/.ant/ant.conf" ] ; then - . $HOME/.ant/ant.conf - fi - if [ -f "$HOME/.antrc" ] ; then - . "$HOME/.antrc" - fi - - # provide default configuration values - if [ -z "$rpm_mode" ] ; then - rpm_mode=false - fi - if [ -z "$usejikes" ] ; then - usejikes=$use_jikes_default - fi -fi - -# Always get JAVA_HOME from java-config. -# Use GENTOO_VM to change which VM is used instead. -export JAVA_HOME="$(java-config -g JAVA_HOME)" - -if [ -z $JAVA_HOME ] ; then - echo 'Error: No JDK found!' - echo "Try using java-config script to set your JDK" - echo "Remember that you need a JDK not a JRE" - exit 1 -fi - -ANT_HOME=/usr/share/ant-core - -# set ANT_LIB location -ANT_LIB="${ANT_HOME}/lib" - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - JAVACMD="$JAVA_HOME/bin/java" - else - JAVACMD=`which java 2> /dev/null ` - if [ -z "$JAVACMD" ] ; then - JAVACMD=java - fi - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " We cannot execute $JAVACMD" - exit 1 -fi - -if [ -z "$LOCALCLASSPATH" ] ; then - LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar -else - LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH -fi - -# add in the dependency .jar files -LOCALCLASSPATH="${LOCALCLASSPATH}:`java-config --classpath=log4j,xerces-2,xalan,junit,antlr,bcel,bsh,commons-beanutils-1.6,commons-collections,commons-logging,commons-net,jakarta-oro-2.0,jdepend,jsch,jakarta-regexp-1.3,rhino-1.5,jython,jta,sun-jaf-bin,sun-javamail-bin 2> /dev/null`" - -if [ -n "$JAVA_HOME" ] ; then - if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then - LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar" - fi - - if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then - LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip" - fi - -else - echo "Warning: JAVA_HOME environment variable is not set (or not exported)." - echo " If build fails because sun.* classes could not be found" - echo " you will need to set the JAVA_HOME environment variable" - echo " to the installation directory of java." - echo " Try using java-config script" -fi - -# Allow Jikes support (off by default) -if $usejikes; then - ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" -fi - -# Show script help if requested -if $show_help ; then - echo $0 '[script options] [options] [target [target2 [target3] ..]]' - echo 'Script Options:' - echo ' --help, --h print this message and ant help' - echo ' --noconfig suppress sourcing of /etc/ant.conf,' - echo ' $HOME/.ant/ant.conf, and $HOME/.antrc' - echo ' configuration files' - echo ' --usejikes enable use of jikes by default, unless' - echo ' set explicitly in configuration files' - echo ' --execdebug print ant exec line generated by this' - echo ' launch script' - echo ' ' -fi - -# Execute ant using eval/exec to preserve spaces in paths, -# java options, and ant args -ant_sys_opts= - -if [ -n "$JIKESPATH" ]; then - ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\"" -fi - -# 2002-11-02, karltk@gentoo.org: -# The Blackdown JDK on PPC hiccups with native threads -# -if [ "$(arch)" == "ppc" ] ; then - export THREADS_FLAG="green" -fi - - -ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args" - -if $ant_exec_debug ; then - echo $ant_exec_command -fi -eval $ant_exec_command diff --git a/dev-java/ant-core/files/build.sh-exit-fix.patch.gz b/dev-java/ant-core/files/build.sh-exit-fix.patch.gz Binary files differdeleted file mode 100644 index 541f796d..00000000 --- a/dev-java/ant-core/files/build.sh-exit-fix.patch.gz +++ /dev/null diff --git a/dev-java/ant-core/files/build.with.native.ecj.diff b/dev-java/ant-core/files/build.with.native.ecj.diff deleted file mode 100644 index 12e35961..00000000 --- a/dev-java/ant-core/files/build.with.native.ecj.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- build.sh.orig 2006-02-22 00:24:13.000000000 +0100 -+++ build.sh 2006-02-22 00:26:46.000000000 +0100 -@@ -41,5 +41,5 @@ - ANT_INSTALL="-emacs" - fi - --bootstrap/bin/ant -lib lib/optional "$ANT_INSTALL" $* -+bootstrap/bin/ant -lib lib/optional -Dbuild.compiler=nativeEcj "$ANT_INSTALL" $* - ---- bootstrap.sh.orig 2006-02-22 17:06:18.000000000 +0100 -+++ bootstrap.sh 2006-02-22 17:05:45.000000000 +0100 -@@ -150,7 +150,7 @@ - - echo ... Building Ant Distribution - --"${JAVACMD}" -classpath "${CLASSPATH}" -Dant.home=. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap -+"${JAVACMD}" -classpath "${CLASSPATH}" -Dbuild.compiler=nativeEcj -Dant.home=. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap - ret=$? - if [ $ret != 0 ]; then - echo ... Failed Building Ant Distribution ! diff --git a/dev-java/ant-core/files/digest-ant-core-1.6.5-r13 b/dev-java/ant-core/files/digest-ant-core-1.6.5-r13 deleted file mode 100644 index 6bc546eb..00000000 --- a/dev-java/ant-core/files/digest-ant-core-1.6.5-r13 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 80a7ad191c40b7d8c82533524b282b6b apache-ant-1.6.5-src.tar.bz2 6283500 -RMD160 4680b53cd72d4915b9ca2bbe2131a71fcf505a84 apache-ant-1.6.5-src.tar.bz2 6283500 -SHA256 f3ef501f06bf1dac88981038ebd5311c738bf2d50d220de85c3e6c7656169d59 apache-ant-1.6.5-src.tar.bz2 6283500 diff --git a/dev-java/ant-core/files/include-nativeEcj.diff b/dev-java/ant-core/files/include-nativeEcj.diff deleted file mode 100644 index 8ce085ee..00000000 --- a/dev-java/ant-core/files/include-nativeEcj.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java.orig 2006-03-12 15:59:20.000000000 +0100 -+++ src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java 2006-03-12 15:59:39.000000000 +0100 -@@ -120,6 +120,9 @@ - if (compilerType.equalsIgnoreCase("kjc")) {
- return new Kjc();
- }
-+ if (compilerType.equalsIgnoreCase("nativeEcj")) {
-+ return new NativeEcj();
-+ }
- if (compilerType.equalsIgnoreCase("gcj")) {
- return new Gcj();
- }
diff --git a/dev-java/ant-core/files/nativeEcj-old.diff b/dev-java/ant-core/files/nativeEcj-old.diff deleted file mode 100644 index 4c8d1167..00000000 --- a/dev-java/ant-core/files/nativeEcj-old.diff +++ /dev/null @@ -1,103 +0,0 @@ ---- /dev/null 2005-12-16 14:04:54.000000000 +0100 -+++ src/main/org/apache/tools/ant/taskdefs/compilers/Ecj.java 2006-02-22 16:45:18.000000000 +0100 -@@ -0,0 +1,99 @@ -+/* -+ * Copyright 2001-2005 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ * -+ */ -+ -+package org.apache.tools.ant.taskdefs.compilers; -+ -+ -+import org.apache.tools.ant.BuildException; -+import org.apache.tools.ant.Project; -+import org.apache.tools.ant.types.Commandline; -+import org.apache.tools.ant.types.Path; -+ -+/** -+ * The implementation of the ecj compiler. -+ * This is primarily a cut-and-paste from the jikes. -+ * -+ * @since Ant 1.4 -+ */ -+public class Ecj extends DefaultCompilerAdapter { -+ -+ /** -+ * Performs a compile using the ecj compiler. -+ */ -+ public boolean execute() throws BuildException { -+ Commandline cmd; -+ attributes.log("Using ecj compiler", Project.MSG_VERBOSE); -+ cmd = setupECJCommand(); -+ -+ int firstFileName = cmd.size(); -+ logAndAddFilesToCompile(cmd); -+ -+ return -+ executeExternalCompile(cmd.getCommandline(), firstFileName) == 0; -+ } -+ -+ protected Commandline setupECJCommand() { -+ Commandline cmd = new Commandline(); -+ Path classpath = new Path(project); -+ -+ // ecj doesn't support bootclasspath dir (-bootclasspath) -+ // so we'll emulate it for compatibility and convenience. -+ if (bootclasspath != null) { -+ classpath.append(bootclasspath); -+ } -+ -+ // ecj doesn't support an extension dir (-extdir) -+ // so we'll emulate it for compatibility and convenience. -+ classpath.addExtdirs(extdirs); -+ -+ classpath.append(getCompileClasspath()); -+ -+ // Gcj has no option for source-path so we -+ // will add it to classpath. -+ if (compileSourcepath != null) { -+ classpath.append(compileSourcepath); -+ } else { -+ classpath.append(src); -+ } -+ -+ cmd.setExecutable("ecj-native"); -+ -+ if (destDir != null) { -+ cmd.createArgument().setValue("-d"); -+ cmd.createArgument().setFile(destDir); -+ -+ if (!destDir.exists() && !destDir.mkdirs()) { -+ throw new BuildException("Can't make output directories. " -+ + "Maybe permission is wrong. "); -+ } -+ } -+ -+ cmd.createArgument().setValue("-classpath"); -+ cmd.createArgument().setPath(classpath); -+ -+ if (encoding != null) { -+ cmd.createArgument().setValue("-encoding " + encoding); -+ } -+ if (debug) { -+ cmd.createArgument().setValue("-g"); -+ } -+ -+ addCurrentCompilerArgs(cmd); -+ -+ return cmd; -+ } -+} - diff --git a/dev-java/ant-core/files/nativeEcj.diff b/dev-java/ant-core/files/nativeEcj.diff deleted file mode 100644 index 9f2c4e0f..00000000 --- a/dev-java/ant-core/files/nativeEcj.diff +++ /dev/null @@ -1,52 +0,0 @@ ---- /dev/null 2005-12-16 14:04:54.000000000 +0100 -+++ src/main/org/apache/tools/ant/taskdefs/compilers/NativeEcj.java 2006-03-12 16:20:02.000000000 +0100 -@@ -0,0 +1,49 @@ -+/*
-+ * Copyright 2001-2006 The Apache Software Foundation
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License.
-+ *
-+ */
-+
-+package org.apache.tools.ant.taskdefs.compilers;
-+
-+import org.apache.tools.ant.BuildException;
-+import org.apache.tools.ant.Project;
-+import org.apache.tools.ant.types.Commandline;
-+
-+/**
-+ * Performs a compile using native ecj binary externally.
-+ *
-+ * @since Ant 1.6.5
-+ */
-+public class NativeEcj extends DefaultCompilerAdapter {
-+
-+ /**
-+ * Performs a compile using the native ecj binary externally.
-+ */
-+ public boolean execute() throws BuildException {
-+ attributes.log("Using native ecj compiler binary", Project.MSG_VERBOSE);
-+
-+ Commandline cmd = new Commandline();
-+ cmd.setExecutable("ecj-native");
-+ setupModernJavacCommandlineSwitches(cmd);
-+ int firstFileName = cmd.size();
-+ logAndAddFilesToCompile(cmd);
-+
-+ return
-+ executeExternalCompile(cmd.getCommandline(), firstFileName,
-+ true)
-+ == 0;
-+ }
-+
-+}
diff --git a/dev-java/bcprov/Manifest b/dev-java/bcprov/Manifest deleted file mode 100644 index f065ca38..00000000 --- a/dev-java/bcprov/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -MD5 d32f3ebc25479bfae95221c18f8c817e bcprov-1.31.ebuild 828 -RMD160 44427c685d8ba1ceeff8ece837199cc2e789aa0e bcprov-1.31.ebuild 828 -SHA256 0a5d42095062a28ee66075fec44b76f891ce4ad22521ef6a3e4ea5f5b4f85bf4 bcprov-1.31.ebuild 828 -MD5 41c0dc45f2d148a0f8f9786abd6e6f15 files/build.xml 1538 -RMD160 63124bf64c7e000dc0b45d847f0f194a7d8252a2 files/build.xml 1538 -SHA256 1a6cce51e7e83e06ffcefeff597850df85a4d0d7ca3c333c2441a541c5432fce files/build.xml 1538 -MD5 e3ddef026f5c91a1841a35d84867ee26 files/digest-bcprov-1.31 253 -RMD160 dcbde8ba088df860df933c87b2540b4b3ba18eca files/digest-bcprov-1.31 253 -SHA256 3280794077e6dafca08e182770b1290ebbba36c00dfb44c79cce2ad0f95aa24f files/digest-bcprov-1.31 253 diff --git a/dev-java/bcprov/bcprov-1.31.ebuild b/dev-java/bcprov/bcprov-1.31.ebuild deleted file mode 100644 index 96d57ae2..00000000 --- a/dev-java/bcprov/bcprov-1.31.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit java-pkg-2 - -MY_PN=${PN}-jdk14 -MY_PV=${PV//.} -MY_P=${MY_PN}-${MY_PV} - -DESCRIPTION="The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms" -HOMEPAGE="http://www.bouncycastle.org/" -SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz" - -LICENSE="" -SLOT="0" -KEYWORDS="~x86" -IUSE="doc" - -DEPEND=">=virtual/jdk-1.4* - dev-java/ant-core" -RDEPEND=">=virtual/jre-1.4*" - -S=${WORKDIR}/${MY_P} - -src_unpack() { - unpack ${A} - cp ${FILESDIR}/build.xml ${S} -} - -src_compile() { - local antflags="-Dproject.name=${PN} jar" - - eant ${antflags} || die "Compile failed" - mv docs api -} - -src_install() { - java-pkg_dojar dist/${PN}.jar - - dohtml *.html - use doc && java-pkg_dohtml -r api -} diff --git a/dev-java/bcprov/files/build.xml b/dev-java/bcprov/files/build.xml deleted file mode 100644 index 731be7a5..00000000 --- a/dev-java/bcprov/files/build.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!--- - @author: Saleem Abdulrasool <compnerd@gentoo.org> - @date: 5/9/2005 - @revision: 1.0_alpha - - @notes: Call using the following: ant -f build.xml -Dproject.name=${project name} -Dpackage.name=${package name} ---> - -<project name="Gentoo_Builder" default="jar" basedir="."> - <property name="src" value="src"/> - <property name="build" value="build"/> - <property name="dist" value="dist"/> - - <property name="pkg" value="${package.name}"/> - <property name="jar" value="${project.name}.jar"/> - - <!-- Override any defined properties --> - <property file="build.properties"/> - - <target name="init"> - <tstamp/> - <mkdir dir="${build}"/> - <mkdir dir="${dist}"/> - <mkdir dir="${dist}/doc"/> - </target> - - <target name="compile" depends="init"> - <javac srcdir="${src}" destdir="${build}" classpath="${classpath}"/> - </target> - - <target name="manifest" depends="init"> - <manifest file="${build}/MANIFEST.MF" mode="update"> - <attribute name="Built-By" value="Gentoo Portage"/> - </manifest> - </target> - - <target name="jar" depends="compile,manifest"> - <jar jarfile="${dist}/${jar}" manifest="${build}/MANIFEST.MF"> - <fileset dir="${build}"/> - </jar> - </target> - - <target name="javadoc" depends="compile"> - <javadoc sourcepath="${src}" destdir="${dist}/doc" packagenames="${pkg}"/> - </target> - - <target name="clean"> - <delete dir="${build}"/> - <delete dir="${dist}"/> - </target> -</project> - diff --git a/dev-java/bcprov/files/digest-bcprov-1.31 b/dev-java/bcprov/files/digest-bcprov-1.31 deleted file mode 100644 index e0f2f5f0..00000000 --- a/dev-java/bcprov/files/digest-bcprov-1.31 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 830237b359ad7245ec67a972e58ac098 bcprov-jdk14-131.tar.gz 1800777 -RMD160 eb4eb1ddd676734e70dd186b2552c69c64431a77 bcprov-jdk14-131.tar.gz 1800777 -SHA256 b3ce157c0269b98aaa8bea03d916fa30ebc4acd885199c178078284848f8a0f8 bcprov-jdk14-131.tar.gz 1800777 diff --git a/dev-java/eclipse-ecj/Manifest b/dev-java/eclipse-ecj/Manifest deleted file mode 100644 index 4959efdc..00000000 --- a/dev-java/eclipse-ecj/Manifest +++ /dev/null @@ -1,15 +0,0 @@ -MD5 5e389d2dfeadaacebf22198003c83c7c eclipse-ecj-3.1-r13.ebuild 2215 -RMD160 7566cbc383712ed2dd465a96ff8435a442ad4938 eclipse-ecj-3.1-r13.ebuild 2215 -SHA256 db51383bb5cee685e181d79b7e6de5d2d8e1a7833884b07b8cf00e4f39f81202 eclipse-ecj-3.1-r13.ebuild 2215 -MD5 9054813ccd9e1ea579d536c32022bb6b files/compiler-settings-3.1 255 -RMD160 792c5676c457f0e4e3e5a46a917dfb18ce0f3c38 files/compiler-settings-3.1 255 -SHA256 699604ed6a2100c0f99d0b1f5a28b5b66622ee660143e0444c3e4ef6f87982eb files/compiler-settings-3.1 255 -MD5 f993cb08b51696b9b5616a4aec63be96 files/digest-eclipse-ecj-3.1-r13 280 -RMD160 8bd6587829605bd2101e4a5fb50faa2b8e97ca94 files/digest-eclipse-ecj-3.1-r13 280 -SHA256 b2f4a3feee586f320578797f57e612642ce3e9bcc6a4e3e774239e3d6bcdc5bd files/digest-eclipse-ecj-3.1-r13 280 -MD5 493ac81cee2b66403165937730ad88d1 files/ecj-native-3.1 786 -RMD160 8c0859ec375a503cbe2bd77e5823c99768ccc2a3 files/ecj-native-3.1 786 -SHA256 bf9599db0c82dc6ddc9f159f5db4846046d8b5af0ef26f0ff8f90364a7e0d7e2 files/ecj-native-3.1 786 -MD5 1c7ef4427e381e28daa6b7e777fa89dc files/native-compiler-settings-3.1 185 -RMD160 6870d22e88900acf9cba76c0fef944293138ac86 files/native-compiler-settings-3.1 185 -SHA256 a05dc4ff8ee07b36683f323cb96200471c9fb167f213a19f29dd339ecd177d72 files/native-compiler-settings-3.1 185 diff --git a/dev-java/eclipse-ecj/eclipse-ecj-3.1-r13.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-3.1-r13.ebuild deleted file mode 100644 index a8f8f80c..00000000 --- a/dev-java/eclipse-ecj/eclipse-ecj-3.1-r13.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/eclipse-ecj/eclipse-ecj-3.1-r2.ebuild,v 1.2 2005/12/18 17:27:18 nichoj Exp $ - -inherit eutils flag-o-matic java-pkg-2 java-ant-2 - -MY_PN=${PN##*-} - -DESCRIPTION="Eclipse Compiler for Java" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://dev.gentoo.org/~karltk/projects/java/distfiles/${P}-gentoo-r2.tar.bz2" -LICENSE="EPL-1.0" -KEYWORDS="~amd64 ~x86" -SLOT="3.1" - -IUSE="doc gcj" - -RDEPEND=">=virtual/jre-1.4" -DEPEND="${RDEPEND} - >=virtual/jdk-1.4 - !gcj? ( dev-java/ant-core ) - gcj? ( dev-java/gcj - sys-apps/findutils )" - -src_compile() { - if use gcj ; then - rm -f src/org/eclipse/jdt/core/JDTCompilerAdapter.java - gcj_dojar - - java-pkg_donative src/org || die "failed to compile to native code!" - java-pkg_donative-bin org.eclipse.jdt.internal.compiler.batch.Main \ - ${MY_PN}-native-${SLOT} || die "failed to build native binary!" - else - eant jar $(use_doc) - fi -} - -src_install() { - exeinto /usr/bin - if use gcj ; then - doexe build/${MY_PN}-native-${SLOT} - newexe ${FILESDIR}/${MY_PN}-native-${SLOT} ${MY_PN}-native - fi - - doexe ${MY_PN}-${SLOT} - java-pkg_dojar build/${MY_PN}.jar || die "${MY_PN}.jar not installable" - - dodoc README - use !gcj && use doc && java-pkg_dohtml -r build/doc/api - - insinto /usr/share/java-config-2/compiler - newins ${FILESDIR}/compiler-settings-${SLOT} ${MY_PN}-${SLOT} - use gcj && newins ${FILESDIR}/native-compiler-settings-${SLOT} ${MY_PN}-native-${SLOT} -} - -### -# Helper function -### - -gcj_dojar() { - einfo "Build ${MY_PN}.jar by gcj ..." - mkdir -p ${S}/build/gcj/ - cp -a ${S}/src/org/ ${S}/build/gcj/ - cd ${S}/build/gcj/ - for f in `find org/ -name '*.java'`; do - gcj -Wno-deprecated -C $f - done - find -name '*.class' -or -name '*.properties' -or -name '*.rsc' | \ - xargs fastjar cf ${S}/build/${MY_PN}.jar - cd ${S} -} - -pkg_postinst() { - if use gcj ; then - ewarn "If you set GCJ as your Java SDK:" - ewarn - ewarn "You should enable ${MY_PN}-native-${SLOT} as your Java Compiler!" - ewarn "Otherwise you will encounter errors!" - ewarn - ewarn "If you DO NOT do so you are on your own" - ewarn "and you MUST NOT file bugs!" - fi -} diff --git a/dev-java/eclipse-ecj/files/compiler-settings-3.1 b/dev-java/eclipse-ecj/files/compiler-settings-3.1 deleted file mode 100644 index 272cd648..00000000 --- a/dev-java/eclipse-ecj/files/compiler-settings-3.1 +++ /dev/null @@ -1,7 +0,0 @@ -JAVAC="/usr/bin/ecj-3.1" -PACKAGE="=dev-java/eclipse-ecj-3.1*" -SUPPORTED_TARGET="1.1 1.2 1.3 1.4 1.5" -SUPPORTED_SOURCE="1.3 1.4 1.5" -ANT_BUILD_COMPILER="org.eclipse.jdt.internal.compiler.batch.Main" -ANT_BUILD_COMPILER_DEPS="eclipse-ecj-3.1" -GENERATION="2" diff --git a/dev-java/eclipse-ecj/files/digest-eclipse-ecj-3.1-r13 b/dev-java/eclipse-ecj/files/digest-eclipse-ecj-3.1-r13 deleted file mode 100644 index e7e4bcb6..00000000 --- a/dev-java/eclipse-ecj/files/digest-eclipse-ecj-3.1-r13 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 6d79a571b2e43caef2f963ae3798f3da eclipse-ecj-3.1-gentoo-r2.tar.bz2 543266 -RMD160 a839e8bddae9e5dfe12c33d98557d5d4a1cd1494 eclipse-ecj-3.1-gentoo-r2.tar.bz2 543266 -SHA256 8367945471b97199962148ddaa917d7cc9fb59df094465622d0b0f2ff723a129 eclipse-ecj-3.1-gentoo-r2.tar.bz2 543266 diff --git a/dev-java/eclipse-ecj/files/ecj-native-3.1 b/dev-java/eclipse-ecj/files/ecj-native-3.1 deleted file mode 100644 index c53886df..00000000 --- a/dev-java/eclipse-ecj/files/ecj-native-3.1 +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# wrapper script for ecj-native binary - -# Figure out correct boot classpath -# karltk: this should be handled by the java-pkg eclass in setup-vm -bp="$(java-config --jdk-home)/jre/lib" -if [ ! -z "`java-config --java-version | grep IBM`" ] ; then - # IBM JRE - bootclasspath="${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar:${bp}/server.jar" -elif [ ! -z "`java-config --java-version | grep 'GNU libgcj'`" ] ; then - # GCJ - bootclasspath="$(java-config --jdk-home)/share/java/libgcj-$(${JAVA_HOME}/bin/gcj -dumpversion).jar" -else - # Sun derived JREs (Blackdown, Sun) - bootclasspath="${bp}/rt.jar:${bp}/jsse.jar" -fi - -ecj="/usr/bin/ecj-native-3.1" -if [[ -x ${ecj} ]] ; then - ${ecj} ${BOOTCLASSPATH} -nowarn "${@}" -else - echo "native ecj binary unusable (${ecj})" -fi diff --git a/dev-java/eclipse-ecj/files/native-compiler-settings-3.1 b/dev-java/eclipse-ecj/files/native-compiler-settings-3.1 deleted file mode 100644 index 39f3bd30..00000000 --- a/dev-java/eclipse-ecj/files/native-compiler-settings-3.1 +++ /dev/null @@ -1,6 +0,0 @@ -JAVAC="/usr/bin/ecj-native-3.1" -PACKAGE="=dev-java/eclipse-ecj-3.1*" -SUPPORTED_TARGET="1.1 1.2 1.3 1.4 1.5" -SUPPORTED_SOURCE="1.3 1.4 1.5" -ANT_BUILD_COMPILER="nativeEcj" -GENERATION="2" diff --git a/dev-java/gcj-ecj/Manifest b/dev-java/gcj-ecj/Manifest deleted file mode 100644 index 2132d3c1..00000000 --- a/dev-java/gcj-ecj/Manifest +++ /dev/null @@ -1,12 +0,0 @@ -MD5 8c5a109f3b03fc088835e864c65fd67f files/build.sh 1442 -RMD160 108a6b7984d0e7b153a6c91f12f48266773f5410 files/build.sh 1442 -SHA256 08ebca58936bbbd1918b70d627db05195e0b44ff830b866f7da513c2d22a29b3 files/build.sh 1442 -MD5 f993cb08b51696b9b5616a4aec63be96 files/digest-gcj-ecj-3.1 280 -RMD160 8bd6587829605bd2101e4a5fb50faa2b8e97ca94 files/digest-gcj-ecj-3.1 280 -SHA256 b2f4a3feee586f320578797f57e612642ce3e9bcc6a4e3e774239e3d6bcdc5bd files/digest-gcj-ecj-3.1 280 -MD5 73bd055302b0fde8009c344909984930 files/ecj 236 -RMD160 a5c91c54f0067066af51535d3612f854f08f30e0 files/ecj 236 -SHA256 2e5b00e16d05004541c531eb6122c7d54e66c21a3f4f340b2a214bd1b1619666 files/ecj 236 -MD5 de9a001f48c87fa8ce2548816c773761 gcj-ecj-3.1.ebuild 1102 -RMD160 4ea6c4bd15fb3451fb577e1643e7de6980de4e19 gcj-ecj-3.1.ebuild 1102 -SHA256 298875539b793feda58c5262222f1015e5b8e26194da428779f0dbadcf273d7f gcj-ecj-3.1.ebuild 1102 diff --git a/dev-java/gcj-ecj/files/build.sh b/dev-java/gcj-ecj/files/build.sh deleted file mode 100755 index ac70848c..00000000 --- a/dev-java/gcj-ecj/files/build.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -# Author: Hanno Meyer-Thurow -# Version: 0.2.1 -# -# Use: ecj built by gcj - -# delete old build -rm -rf build/ -mkdir -p build/ -cd build/ - -# leave source clean -cp -af ../src/org/ . - -# delete Compiler Adapter -rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java - -echo "Create Jar file" -for file in `find org/ -name '*.java'` -do - echo "BC $file" - gcj -Wno-deprecated -C $file || exit 1 -done - -find -name '*.class' -or -name '*.properties' -or -name '*.rsc' | \ - xargs fastjar cf gcj-ecj.jar || exit 1 -echo "... done!" - -# refresh build source -rm -rf org/ -cp -af ../src/org/ . - -# delete Compiler Adapter -rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java - -echo -echo -echo "Create native ecj binary" -for file in `find org/ -type f -name '*.java'` -do - echo "NC $file" - gcj -c -g -O2 -Wno-deprecated $file -o ${file/\.java/.o} || exit 1 -done - -for file in `find org/ -type f -name '*.properties'` -do - echo "Resource $file" - gcj -c -g --resource $file $file -o "`dirname $file`"/properties.o || exit 1 -done - -for file in `find org/ -type f -name '*.rsc'` -do - echo "Resource $file" - gcj -c -g --resource $file $file -o ${file/\.rsc/.o} || exit 1 -done - -echo "Collect object files ..." -FILES="" -for file in `find org/ -type f -name '*.o'` -do - FILES="$FILES $file" -done - -echo "Linking object files ..." -gcj --main=org.eclipse.jdt.internal.compiler.batch.Main -o ecj-native \ - -Wl,-Bsymbolic -findirect-dispatch -fjni \ - $FILES || exit 1 -echo "... done!" diff --git a/dev-java/gcj-ecj/files/digest-gcj-ecj-3.1 b/dev-java/gcj-ecj/files/digest-gcj-ecj-3.1 deleted file mode 100644 index e7e4bcb6..00000000 --- a/dev-java/gcj-ecj/files/digest-gcj-ecj-3.1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 6d79a571b2e43caef2f963ae3798f3da eclipse-ecj-3.1-gentoo-r2.tar.bz2 543266 -RMD160 a839e8bddae9e5dfe12c33d98557d5d4a1cd1494 eclipse-ecj-3.1-gentoo-r2.tar.bz2 543266 -SHA256 8367945471b97199962148ddaa917d7cc9fb59df094465622d0b0f2ff723a129 eclipse-ecj-3.1-gentoo-r2.tar.bz2 543266 diff --git a/dev-java/gcj-ecj/files/ecj b/dev-java/gcj-ecj/files/ecj deleted file mode 100755 index ac0939ef..00000000 --- a/dev-java/gcj-ecj/files/ecj +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh -# -# Copyright (c) 2005, Karl Trygve Kalleberg <karltk@gentoo.org> -# Copyright (c) 2005, Gentoo Foundation -# -# Licensed under the GNU General Public License, v2 - -ecj-native -bootclasspath @HOME@/share/java/libgcj-@VER@.jar $@ diff --git a/dev-java/gcj-ecj/gcj-ecj-3.1.ebuild b/dev-java/gcj-ecj/gcj-ecj-3.1.ebuild deleted file mode 100644 index 69fbe737..00000000 --- a/dev-java/gcj-ecj/gcj-ecj-3.1.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -MY_PN=${PN##*-} - -DESCRIPTION="GCJ-flavoured - Eclipse Compiler for Java" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://dev.gentoo.org/~karltk/projects/java/distfiles/eclipse-ecj-${PV}-gentoo-r2.tar.bz2" -LICENSE="EPL-1.0" -KEYWORDS="~amd64 ~x86" -SLOT="0" - -IUSE="" - -RDEPEND="dev-java/gcj" -DEPEND="${RDEPEND}" - -S="${WORKDIR}/eclipse-ecj-3.1" - -pkg_setup() { - if [ ! -e "${JAVA_HOME}"/bin/gcj ]; then - eerror "\$JAVA_HOME points to bad location." - eerror "Point it to the home of dev-java/gcj!" - die - fi -} - -src_unpack() { - unpack ${A} - cp -af ${FILESDIR}/build.sh ${S} || die "build.sh copy failed!" -} - -src_compile() { - cd ${S} || die "cd into ${S} failed!" - ${S}/build.sh || die "make failed!" -} - -src_install() { - exeinto ${JAVA_HOME}/bin/ - doexe build/ecj-native - - sed -e "s:@HOME@:${JAVA_HOME}:g" \ - -e "s:@VER@:`${JAVA_HOME}/bin/gcj -dumpversion`:g" \ - < ${FILESDIR}/ecj \ - > ${D}/${JAVA_HOME}/bin/ecj - - insinto /usr/share/java/ - doins build/gcj-ecj.jar -} diff --git a/dev-java/gcj-jdk/Manifest b/dev-java/gcj-jdk/Manifest deleted file mode 100644 index 7aa5974c..00000000 --- a/dev-java/gcj-jdk/Manifest +++ /dev/null @@ -1,21 +0,0 @@ -MD5 0a1007f8ccd396b937b47762f6129b4c files/clean-Makefile.patch 1048 -RMD160 39f9e5b31a178b711507db744c6dfe3b3d54e9c3 files/clean-Makefile.patch 1048 -SHA256 44dd2bed9794d6b1dbc1833cea2801b823aa2aa8acd32c91dd77ab98df2fefc1 files/clean-Makefile.patch 1048 -MD5 fc9b6dee238a2997c0bfb2e1ced2a921 files/digest-gcj-jdk-4.1.0 265 -RMD160 24da286be55ffea520d491237d17e70bc49759d6 files/digest-gcj-jdk-4.1.0 265 -SHA256 5efa066b3723d3d93a0a0874ac7a710fdef67958b472983653ef2c2182af1fef files/digest-gcj-jdk-4.1.0 265 -MD5 22f2aa59981e40f02782346784e94db7 files/gcj-jdk-4.1 527 -RMD160 759c016c8f3a91074d4754a0720f9ebe8ee8257f files/gcj-jdk-4.1 527 -SHA256 614a3c6e027e14e504315630d9e4b4853a8c195f519a017837e50e30c0408fa8 files/gcj-jdk-4.1 527 -MD5 1c85e59a7ba430c18b99871a60e0d243 files/java.in 199 -RMD160 e0e911b00c0222ae0ebb0d06800e96deff280c3f files/java.in 199 -SHA256 1c4581c39cf6b6ecb71b3d3d4e5f4707c8fc1d32a9ece8709fda85d11fb9cbf4 files/java.in 199 -MD5 fa912633bedbef12ec5ed46652ab326f files/javac.in 210 -RMD160 55bf09e4cd5b5f08ad80928bf439cadbdb6843c0 files/javac.in 210 -SHA256 865e58f662be9ed28e2fec6fa79916234658da0dbe2485e8eed1c28bb9947ab2 files/javac.in 210 -MD5 91dcb318058b4a524b7d38358bd90d29 files/javadoc 69 -RMD160 8ceb4b5707861a0d8ac97c83ae3c07aaba687828 files/javadoc 69 -SHA256 b3f1a9070552bdcb248c577ed0a676a16c8f1b86b38406d20ea54917cb1089d8 files/javadoc 69 -MD5 b0d2d5d0428ad7dea6574cf326247bbb gcj-jdk-4.1.0.ebuild 2285 -RMD160 b02b06fe9e9cfe099c9ee5e860135ace0ea8a5a1 gcj-jdk-4.1.0.ebuild 2285 -SHA256 b0b0b440d15bec2f47043a4d59ce7d33ef8d3c074a3fe2617d7c9f78b51fbec2 gcj-jdk-4.1.0.ebuild 2285 diff --git a/dev-java/gcj-jdk/files/clean-Makefile.patch b/dev-java/gcj-jdk/files/clean-Makefile.patch deleted file mode 100644 index 3e4a4705..00000000 --- a/dev-java/gcj-jdk/files/clean-Makefile.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- Makefile.in.orig 2006-03-11 20:56:27.000000000 +0100 -+++ Makefile.in 2006-03-11 21:02:30.000000000 +0100 -@@ -175,7 +175,6 @@ - taglet_jarfile = /usr/share/java/com-sun-tools-doclets-Taglet-0.7.7.jar - tools_jar_source_files = \ - $(top_builddir)/com/sun/tools/javac/Config.java \ -- com/sun/tools/javac/Main.java \ - sun/rmi/rmic/Main.java - - tools_jar_class_files = $(tools_jar_source_files:.java=.class) -@@ -530,13 +529,13 @@ - libjawt.so: - echo | $(GCJ_BIN_DIR)/gcc$(gcc_suffix) -shared -O2 -fPIC -o libjawt.so -Wl,-soname,libjawt.so -xc - -lgcjawt - --tools.jar: $(tools_jar_class_files) $(javadoc_class_files) -- $(JAR) cMf $@ $(tools_jar_class_files) com/sun/javadoc com/sun/tools/doclets -+tools.jar: $(tools_jar_class_files) -+ $(JAR) cMf $@ $(tools_jar_class_files) - - java: java.c - $(GCJ_BIN_DIR)/gcc$(gcc_suffix) -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" -DARCH="\"$(CPU)\"" -DGCJ_BIN_DIR="\"$(GCJ_BIN_DIR)\"" -o $@ $< - --all-local: java libjawt.so pr13212.so -+all-local: - - install-exec-local: - $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU) diff --git a/dev-java/gcj-jdk/files/digest-gcj-jdk-4.1.0 b/dev-java/gcj-jdk/files/digest-gcj-jdk-4.1.0 deleted file mode 100644 index 754a0c59..00000000 --- a/dev-java/gcj-jdk/files/digest-gcj-jdk-4.1.0 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 fadd7735d12abd6515e91b2af504488b java-gcj-compat-1.0.53.tar.gz 91010 -RMD160 b042d3049e377ef7ca97ff51ca8356956a4d1bfc java-gcj-compat-1.0.53.tar.gz 91010 -SHA256 439fc60e3fe109dc72102f5f1d2b876c47c33d70c54cd46efb1bbcd927e15513 java-gcj-compat-1.0.53.tar.gz 91010 diff --git a/dev-java/gcj-jdk/files/gcj-jdk-4.1 b/dev-java/gcj-jdk/files/gcj-jdk-4.1 deleted file mode 100644 index d4a1b94b..00000000 --- a/dev-java/gcj-jdk/files/gcj-jdk-4.1 +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -VERSION="GCJ @PV@" -JAVA_HOME=/opt/gcj-@PV@ -JDK_HOME=/opt/gcj-@PV@ -JAVAC=${JAVA_HOME}/bin/javac -PATH="${JAVA_HOME}/bin" -ROOTPATH="${JAVA_HOME}/bin" -LDPATH="${JAVA_HOME}/lib" -INFOPATH="${JAVA_HOME}/info" -MANPATH="${JAVA_HOME}/man" -PROVIDES_TYPE="JDK JRE" -PROVIDES_VERSION="1.5" -BOOTCLASSPATH="${JAVA_HOME}/share/java/libgcj-@PV@.jar" -ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH INFOPATH MANPATH" diff --git a/dev-java/gcj-jdk/files/java.in b/dev-java/gcj-jdk/files/java.in deleted file mode 100644 index e9d3fa7e..00000000 --- a/dev-java/gcj-jdk/files/java.in +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# wrapper script for gij as java - -JAVA_PKG_CLASSMAP=${JAVA_PKG_CLASSMAP:="/usr/share/java/classmap.gcjdb"} - -@HOME@/bin/gij \ - -Dgnu.gcj.precompiled.db.path=${JAVA_PKG_CLASSMAP} \ - "${@}" diff --git a/dev-java/gcj-jdk/files/javac.in b/dev-java/gcj-jdk/files/javac.in deleted file mode 100644 index 1d5d2575..00000000 --- a/dev-java/gcj-jdk/files/javac.in +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# wrapper script for ecj-native as javac - -ecj=/usr/bin/ecj-native -if [[ -x ${ecj} ]] ; then - ${ecj} "${@}" -else - echo "native ecj unusable (${ecj})" - echo "merge eclipse-ecj with gcj useflag...?" -fi - diff --git a/dev-java/gcj-jdk/files/javadoc b/dev-java/gcj-jdk/files/javadoc deleted file mode 100755 index 8930da92..00000000 --- a/dev-java/gcj-jdk/files/javadoc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# wrapper for gjdoc as javadoc - -/usr/bin/gjdoc ${1+"${@}"} diff --git a/dev-java/gcj-jdk/gcj-jdk-4.1.0.ebuild b/dev-java/gcj-jdk/gcj-jdk-4.1.0.ebuild deleted file mode 100644 index 6e5b27e9..00000000 --- a/dev-java/gcj-jdk/gcj-jdk-4.1.0.ebuild +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Header: $ - -inherit java-vm-2 - -GCJ_HOME="/opt/gcj-${PV}" -COMPAT="java-gcj-compat-1.0.53" -S="${WORKDIR}/${COMPAT}" - -DESCRIPTION="Java wrappers around GCJ" -HOMEPAGE="http://www.gentoo.org/ ftp://sourceware.org/pub/rhug/" -SRC_URI="ftp://sourceware.org/pub/rhug/${COMPAT}.tar.gz" - -LICENSE="GPL-2" -KEYWORDS="-*" -SLOT="4.1" - -RDEPEND="=dev-java/gcj-${PV} - >=dev-java/java-config-2 - dev-java/gjdoc" - -PDEPEND="dev-java/eclipse-ecj" - -PROVIDE="virtual/jre - virtual/jdk" - -#JAVA_VM_NO_GENERATION1=true - -src_unpack() { - unpack ${A} - cd ${S} - - # some love ... - sed -e "s:^sdk_dir=.*:sdk_dir=:" \ - -e "s:^jre_dir=.*:jre_dir=jre:" \ - -i configure \ - || die "..." - - # a bit more love ... - epatch ${FILESDIR}/clean-Makefile.patch -} - -src_compile() { - # We want to bytecompile with gcj! - JAVAC="gcj -C" ./configure --with-jvm-root-dir=${GCJ_HOME} || die "..." - make || die "..." -} - -src_install() { - dodir ${GCJ_HOME}/bin ${GCJ_HOME}/lib - - # evil compat hacks - insinto ${GCJ_HOME}/lib - doins ${S}/tools.jar - - # create javac wrapper - sed -e "s:@HOME@:${GCJ_HOME}:g" \ - -e "s:@PV@:${PV/_/-}:g" \ - < ${FILESDIR}/javac.in \ - > ${D}${GCJ_HOME}/bin/javac \ - || die "javac wrapper failed" - - # create java wrapper - sed -e "s:@HOME@:${GCJ_HOME}:g" \ - < ${FILESDIR}/java.in \ - > ${D}${GCJ_HOME}/bin/java \ - || die "java wrapper failed" - - # fix permissions - fperms 755 ${GCJ_HOME}/bin/java{,c} - - # copy javadoc wrapper - exeinto ${GCJ_HOME}/bin - doexe ${FILESDIR}/javadoc - - # link jar, javah, rmic, rmiregistry, libjawt - dosym ${GCJ_HOME}/bin/fastjar ${GCJ_HOME}/bin/jar - dosym ${GCJ_HOME}/bin/gjnih ${GCJ_HOME}/bin/javah - dosym ${GCJ_HOME}/bin/grmic ${GCJ_HOME}/bin/rmic - dosym ${GCJ_HOME}/bin/grmiregistry ${GCJ_HOME}/bin/rmiregistry - dosym ${GCJ_HOME}/lib/libgcjawt.so ${GCJ_HOME}/lib/libjawt.so - - set_java_env -} - -pkg_postinst() { - # Set as default VM if none exists - java-vm-2_pkg_postinst - - ewarn "This gcj-jdk ebuild is provided for your convenience, and the use" - ewarn "of this JDK replacement is not supported by the Gentoo Developers." - ewarn - ewarn "You are on your own using this! If you have any interesting news" - ewarn "let us know: http://forums.gentoo.org/viewtopic-t-379693.html" -} diff --git a/dev-java/gcj/Manifest b/dev-java/gcj/Manifest deleted file mode 100644 index 53034b47..00000000 --- a/dev-java/gcj/Manifest +++ /dev/null @@ -1,60 +0,0 @@ -MD5 fed3620378df7a876d6709ddf3f7bbec files/awk/fixlafiles.awk 7865 -RMD160 6283a91bfa309a91f46cbff3c1c4f0d848312ba4 files/awk/fixlafiles.awk 7865 -SHA256 9fccd7f4ee7170a8f05d21777974efc3f23072f501cb7d2a8e9eeea15e541249 files/awk/fixlafiles.awk 7865 -MD5 c672adb59a1f452475ab0a864b9d1bd1 files/awk/scanforssp.awk 5830 -RMD160 43a8c09e4e16d9a78ab4d6263e74a1850f12eb9b files/awk/scanforssp.awk 5830 -SHA256 236a2a7eea1ba540ca3be82b0fe2cdefd9ac76b061440918ffe52664edbbb98a files/awk/scanforssp.awk 5830 -MD5 55c3a3afed4433050c7accc86972bd7c files/classpath/gnu.xml.dom.DocumentBuilderFactory.patch 5564 -RMD160 08c5e1e59a7429eecee345284de6140914677259 files/classpath/gnu.xml.dom.DocumentBuilderFactory.patch 5564 -SHA256 6ce6c570855fd7c72593f163b0bab9a68fab881037f5fb4f5ef098316ef9c844 files/classpath/gnu.xml.dom.DocumentBuilderFactory.patch 5564 -MD5 15699cf22bff4e74c4de5434ec57b662 files/classpath/java.beans.XMLEncoder.patch 195926 -RMD160 e6c24d4d081df17cd799ab94158c340f1964e70a files/classpath/java.beans.XMLEncoder.patch 195926 -SHA256 328e8f747c3aaa7fee41b3971c9f3904d61290239f727b1da8d2f7a5ebcb7f2f files/classpath/java.beans.XMLEncoder.patch 195926 -MD5 e308757d0567adea4a227e7694b183ec files/digest-gcj-4.1.0 238 -RMD160 bb4ab9b5f248ed2ba61203df1505271f65c5b0aa files/digest-gcj-4.1.0 238 -SHA256 7d932988900632eaf60750a93f7ab9d5316d2ccd0e5e7f9e99c68a4e57f11e47 files/digest-gcj-4.1.0 238 -MD5 fd0da2a963987afd9885bba89b3b365b files/digest-gcj-4.1.0_pre20060219 265 -RMD160 47222d74a97f2f01fa08ed453ae66075ca5f180b files/digest-gcj-4.1.0_pre20060219 265 -SHA256 56343963da7c523ee35887c6c4e8888188f639fad75f80bb2cbffc5ec365e7de files/digest-gcj-4.1.0_pre20060219 265 -MD5 3cbbf9a8d98d286197d0aa90ac2bb007 files/fix-java.beans.Encoder.patch 1020 -RMD160 0a6be084905398261fc76120378a37a69ae646c9 files/fix-java.beans.Encoder.patch 1020 -SHA256 6cb2b58ee57d74b9e23f00443cb52bfc9db91a902b2e1b5fb1acacf9e9b0721b files/fix-java.beans.Encoder.patch 1020 -MD5 1acd56209164ab837c5f91723434464e files/fix_libtool_files.sh 1712 -RMD160 01788fd6927a9f7bba4a01ec133d6f3494644fe9 files/fix_libtool_files.sh 1712 -SHA256 6b47fb8fa34920ca9ccb449396b25205ad8fe307c869a50e5c4442971e8d4d15 files/fix_libtool_files.sh 1712 -MD5 e0ebf10eb8bf4542ae57ba591daa68a4 files/gcc-configure-LANG.patch 1686 -RMD160 4ff8355af81705058fd411910dfae94887bcd884 files/gcc-configure-LANG.patch 1686 -SHA256 dc9386b88eac48c282d63d0be7e7be81d4a0a08035a8b97138a61133e057bcea files/gcc-configure-LANG.patch 1686 -MD5 f6eef7e81b209ca3c63c39e319b4a7a5 files/gcc-spec-env.patch 1389 -RMD160 55e3920f2db033629d2846e8a8aef69ef98d4508 files/gcc-spec-env.patch 1389 -SHA256 9d157b7dabd7e0921b1a72d551281a7500351748329c6bd442005d61a470a70d files/gcc-spec-env.patch 1389 -MD5 22f4d6b70fb8c496b688c86e6c05ed7a files/gcj-4.1 517 -RMD160 4f89dc072d62eee571e26ba84d7eda46141d3b49 files/gcj-4.1 517 -SHA256 ec2451c2830416b44eb6ee13189d7c7f8a61551e7c517670e0dddfc979433435 files/gcj-4.1 517 -MD5 1c85e59a7ba430c18b99871a60e0d243 files/java.in 199 -RMD160 e0e911b00c0222ae0ebb0d06800e96deff280c3f files/java.in 199 -SHA256 1c4581c39cf6b6ecb71b3d3d4e5f4707c8fc1d32a9ece8709fda85d11fb9cbf4 files/java.in 199 -MD5 39610569dcf02345fe9b1a81d0b9118c files/javac.in 209 -RMD160 8ff3e1651f5d6e067b6e23a771350c9e1c47bf40 files/javac.in 209 -SHA256 40e6875ad498918e71a2aee6ceca8ec3e9238c93db1b700a8f161eb6e92ad4be files/javac.in 209 -MD5 603d151a8c532ab877ecfe7c6de5e501 files/javadoc 38 -RMD160 0b0bcb2213048e45f4f7d33946d7e0e79d9c4a22 files/javadoc 38 -SHA256 75865f8a71143b9b45e90954f7c19bd0272113b2d500b1f534cae82d8b0a66cd files/javadoc 38 -MD5 0841f6a005cedd36231b74a9f44301d6 files/libjava-include.XMLEncoder.patch 2955 -RMD160 a2ecfe61653a601e81e784e7b80528a3f15109fb files/libjava-include.XMLEncoder.patch 2955 -SHA256 067ee6da1fef8401646c9a526992efd49befb1b2773c50d0103fd5f84088cf12 files/libjava-include.XMLEncoder.patch 2955 -MD5 e3193bdffb435b77a21bfb504ff6f591 files/mkinfodir 7324 -RMD160 96bbe8860ae8c0a50db42fea01cc1c2216bd36c8 files/mkinfodir 7324 -SHA256 0565353e767e253207adb8b5c9be9ba215a628447e075a4dc7bb3183ed099d2a files/mkinfodir 7324 -MD5 ea2cf3df0d89a26d5fdc1a531176e395 files/pro-police-docs.patch 3287 -RMD160 eef412d92bed145db05bffa3a3e54e2ba74ee50d files/pro-police-docs.patch 3287 -SHA256 ec012aed77285545b9d993cba1bc5fdb402c8dc9a17040f48b8b354746ede627 files/pro-police-docs.patch 3287 -MD5 b4f7369619c3f69a6ad86e128c305078 files/rebuild-classmap-db 2234 -RMD160 c74bfa19d2bc735e35288fa0de87e279ab1a9504 files/rebuild-classmap-db 2234 -SHA256 1d35bd7d90522234be92b5c1ac9b35b4e768c5e06d54acef74c0f6c11eaead93 files/rebuild-classmap-db 2234 -MD5 07b57d62aa1a8cd4d1cd37984ebe2053 files/scan_libgcc_linked_ssp.sh 861 -RMD160 c89d7e1f9aa7cea0d39281932dacfc1aec7bab74 files/scan_libgcc_linked_ssp.sh 861 -SHA256 9fe574de3978aad4d62cd10b47879384a4f03a7fb1f17e283daf74aad0e45f3b files/scan_libgcc_linked_ssp.sh 861 -MD5 51dca1dd4a20fe337144db3ef0f2e41d gcj-4.1.0.ebuild 1184 -RMD160 02b601b3cc79b7c772c06453a2843de8107ed28c gcj-4.1.0.ebuild 1184 -SHA256 f290a681fd0bfe2b70a3ff118c4489b6ca3603a8cbaad572e1f84d091dae2163 gcj-4.1.0.ebuild 1184 diff --git a/dev-java/gcj/files/awk/fixlafiles.awk b/dev-java/gcj/files/awk/fixlafiles.awk deleted file mode 100644 index c4798f25..00000000 --- a/dev-java/gcj/files/awk/fixlafiles.awk +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.14 2005/09/24 07:31:28 vapier Exp $ - -# -# Helper functions -# -function printn(string) { - system("echo -n \"" string "\"") -} -function einfo(string) { - system("echo -e \" \\e[32;01m*\\e[0m " string "\"") -} -function einfon(string) { - system("echo -ne \" \\e[32;01m*\\e[0m " string "\"") -} -function ewarn(string) { - system("echo -e \" \\e[33;01m*\\e[0m " string "\"") -} -function ewarnn(string) { - system("echo -ne \" \\e[33;01m*\\e[0m " string "\"") -} -function eerror(string) { - system("echo -e \" \\e[31;01m*\\e[0m " string "\"") -} - -# -# assert(condition, errmsg) -# assert that a condition is true. Otherwise exit. -# -function assert(condition, string) { - if (! condition) { - printf("%s:%d: assertion failed: %s\n", - FILENAME, FNR, string) > "/dev/stderr" - _assert_exit = 1 - exit 1 - } -} - -# -# system(command, return) -# wrapper that normalizes return codes ... -# -function dosystem(command, ret) { - ret = 0 - ret = system(command) - if (ret == 0) - return 1 - else - return 0 -} - -BEGIN { - # - # Get our variables from environment - # - OLDVER = ENVIRON["OLDVER"] - OLDCHOST = ENVIRON["OLDCHOST"] - - if (OLDVER == "") { - eerror("Could not get OLDVER!"); - exit 1 - } - - # Setup some sane defaults - LIBCOUNT = 2 - HAVE_GCC34 = 0 - DIRLIST[1] = "/lib" - DIRLIST[2] = "/usr/lib" - - # - # Walk /etc/ld.so.conf to discover all our library paths - # - pipe = "cat /etc/ld.so.conf | sort 2>/dev/null" - while(((pipe) | getline ldsoconf_data) > 0) { - if (ldsoconf_data !~ /^[[:space:]]*#/) { - if (ldsoconf_data == "") continue - - # Remove any trailing comments - sub(/#.*$/, "", ldsoconf_data) - # Remove any trailing spaces - sub(/[[:space:]]+$/, "", ldsoconf_data) - - # If there's more than one path per line, split - # it up as if they were sep lines - split(ldsoconf_data, nodes, /[:,[:space:]]/) - - # Now add the rest from ld.so.conf - for (x in nodes) { - # wtf does this line do ? - sub(/=.*/, "", nodes[x]) - # Prune trailing / - sub(/\/$/, "", nodes[x]) - - if (nodes[x] == "") continue - - # - # Drop the directory if its a child directory of - # one that was already added ... - # For example, if we have: - # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss - # We really just want to save /usr/lib /usr/libexec - # - CHILD = 0 - for (y in DIRLIST) { - if (nodes[x] ~ "^" DIRLIST[y] "(/|$)") { - CHILD = 1 - break - } - } - if (CHILD) continue - - DIRLIST[++LIBCOUNT] = nodes[x] - } - } - } - close(pipe) - - # - # Get line from gcc's output containing CHOST - # - pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" - if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { - close(pipe) - - # If we fail to get the CHOST, see if we can get the CHOST - # portage thinks we are using ... - pipe = "/usr/bin/portageq envvar 'CHOST'" - assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") - } else { - # Check pre gcc-3.4.x versions - CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) - - if (CHOST == TMP_CHOST || CHOST == "") { - # Check gcc-3.4.x or later - CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); - - if (CHOST == TMP_CHOST || CHOST == "") - CHOST = "" - else - HAVE_GCC34 = 1 - } - } - close(pipe) - - if (CHOST == "") { - eerror("Could not get gcc's CHOST!") - exit 1 - } - - if (OLDCHOST != "") - if (OLDCHOST == CHOST) - OLDCHOST = "" - - GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" - GCCLIBPREFIX_NEW = "/usr/lib/gcc/" - - if (HAVE_GCC34) - GCCLIBPREFIX = GCCLIBPREFIX_NEW - else - GCCLIBPREFIX = GCCLIBPREFIX_OLD - - GCCLIB = GCCLIBPREFIX CHOST - - if (OLDCHOST != "") { - OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST - OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST - } - - # Get current gcc's version - pipe = "gcc -dumpversion" - assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") - close(pipe) - - if (NEWVER == "") { - eerror("Could not get gcc's version!") - exit 1 - } - - # Nothing to do ? - if ((OLDVER == NEWVER) && (OLDCHOST == "")) - exit 0 - - # - # Ok, now let's scan for the .la files and actually fix them up - # - for (x = 1; x <= LIBCOUNT; x++) { - # Do nothing if the target dir is gcc's internal library path - if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || - DIRLIST[x] ~ GCCLIBPREFIX_NEW) - continue - - einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") - - pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" - while (((pipe) | getline la_files) > 0) { - - # Do nothing if the .la file is located in gcc's internal lib path - if (la_files ~ GCCLIBPREFIX_OLD || - la_files ~ GCCLIBPREFIX_NEW) - continue - - CHANGED = 0 - CHOST_CHANGED = 0 - - # See if we need to fix the .la file - while ((getline la_data < (la_files)) > 0) { - if (OLDCHOST != "") { - if ((gsub(OLDGCCLIB1 "[/[:space:]]+", - GCCLIB, la_data) > 0) || - (gsub(OLDGCCLIB2 "[/[:space:]]+", - GCCLIB, la_data) > 0)) { - CHANGED = 1 - CHOST_CHANGED = 1 - } - } - if (OLDVER != NEWVER) { - if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", - GCCLIB "/" NEWVER, la_data) > 0) || - (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", - GCCLIB "/" NEWVER, la_data) > 0)) - CHANGED = 1 - } - } - close(la_files) - - # Do the actual changes in a second loop, as we can then - # verify that CHOST_CHANGED among things is correct ... - if (CHANGED) { - ewarnn(" FIXING: " la_files " ...") - - if (CHANGED) - printn("[") - - # Clear the temp file (removing rather than '>foo' is better - # out of a security point of view?) - dosystem("rm -f " la_files ".new") - - while ((getline la_data < (la_files)) > 0) { - if (OLDCHOST != "") { - tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", - GCCLIB "\\1", "g", la_data) - tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", - GCCLIB "\\1", "g", tmpstr) - - if (la_data != tmpstr) { - printn("c") - la_data = tmpstr - } - - if (CHOST_CHANGED > 0) { - # We try to be careful about CHOST changes outside - # the gcc library path (meaning we cannot match it - # via /GCCLIBPREFIX CHOST/) ... - - # Catch: - # - # dependency_libs=' -L/usr/CHOST/{bin,lib}' - # - gsub("-L/usr/" OLDCHOST "/", - "-L/usr/" CHOST "/", la_data) - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' - # - la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", - "\\1/" CHOST "/", "g", la_data) - } - } - - if (OLDVER != NEWVER) { - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' - # - tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", - GCCLIB "/" NEWVER "\\1", "g", la_data) - tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", - GCCLIB "/" NEWVER "\\1", "g", tmpstr) - - if (la_data != tmpstr) { - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' - # - # in cases where we have gcc34 - tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", - GCCLIBPREFIX "\\1", "g", tmpstr) - tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", - GCCLIBPREFIX "\\1", "g", tmpstr) - printn("v") - la_data = tmpstr - } - } - - print la_data >> (la_files ".new") - } - - if (CHANGED) - print "]" - - close(la_files) - close(la_files ".new") - - assert(dosystem("mv -f " la_files ".new " la_files), - "dosystem(\"mv -f " la_files ".new " la_files "\")") - } - } - - close(pipe) - } -} - -# vim:ts=4 diff --git a/dev-java/gcj/files/awk/scanforssp.awk b/dev-java/gcj/files/awk/scanforssp.awk deleted file mode 100644 index e8a1fe8f..00000000 --- a/dev-java/gcj/files/awk/scanforssp.awk +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Author: Martin Schlemmer <azarah@gentoo.org> -# Contributor: Ned Ludd <solar@gentoo.org> -# Contributor: Natanael Copa <nat@c2i.net> -# Contributor: Carter Smithhart <derheld42@derheld.net> -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/scanforssp.awk,v 1.7 2004/07/15 00:59:02 agriffis Exp $ - - -# Does not seem to be used in this script. -function printn(string) -{ - printf("%s", string) -} - -function einfo(string) -{ - printf(" %s %s%s", "\033[32;01m*\033[0m", string, "\n") -} - -# Does not seem to be used in this script. -function einfon(string) -{ - printf(" %s %s" , "\033[32;01m*\033[0m", string) -} - -function ewarn(string) -{ - printf(" %s %s%s" , "\033[33;01m*\033[0m", string, "\n") -} - -# Does not seem to be used in this script. -function ewarnn(string) -{ - printf("%s %s" , "\032[33;01m*\033[0m", string) -} - -function eerror(string) -{ - printf(" %s %s%s" , "\033[31;01m*\033[0m", string, "\n") -} - - # These are private, else wierd things - # might happen ... -function iself(scan_files, scan_file_pipe, scan_data) { - # Can we open() a file and read() 4 bytes? - scan_file_pipe = ("head -c 4 " scan_files " 2>/dev/null | tail -c 3") - scan_file_pipe | getline scan_data - close(scan_file_pipe) - return ((scan_data == "ELF") ? 0 : 1) -} - -BEGIN { - # Do we have etcat ? - pipe = ("which etcat 2>/dev/null") - if ((((pipe) | getline etcat_data) > 0) && (etcat_data != "")) - auto_etcat = 1 - else - auto_etcat = 0 - - # Fix bug that causes script to fail when pipe is not closed. Closes bug #36792 - close(pipe) - - DIRCOUNT = 0 - # Add the two default library paths - DIRLIST[1] = "/lib" - DIRLIST[2] = "/usr/lib" - - # Walk /etc/ld.so.conf line for line and get any library paths - pipe = ("cat /etc/ld.so.conf 2>/dev/null | sort") - while(((pipe) | getline ldsoconf_data) > 0) { - - if (ldsoconf_data !~ /^[[:space:]]*#/) { - - if (ldsoconf_data == "") continue - - # Remove any trailing comments - sub(/#.*$/, "", ldsoconf_data) - # Remove any trailing spaces - sub(/[[:space:]]+$/, "", ldsoconf_data) - - split(ldsoconf_data, nodes, /[:,[:space:]]/) - - # Now add the rest from ld.so.conf - for (x in nodes) { - - sub(/=.*/, "", nodes[x]) - sub(/\/$/, "", nodes[x]) - - if (nodes[x] == "") continue - - CHILD = 0 - - # Drop the directory if its a child directory of - # one that was already added ... - for (y in DIRLIST) { - - if (nodes[x] ~ "^" DIRLIST[y]) { - - CHILD = 1 - break - } - } - - if (CHILD) continue - - DIRLIST[++DIRCOUNT + 2] = nodes[x] - } - } - } - -# We have no guarantee that ld.so.conf have more library paths than -# the default, and its better scan files only in /lib and /usr/lib -# than nothing at all ... -# -# exit_val = close(pipe) -# if (exit_val != 0) -# print(exit_val " - " ERRNO) -# -# if (DIRCOUNT == 0) { -# eerror("Could not read from /etc/ld.so.conf!") -# exit 1 -# } - - # Correct DIRCOUNT, as we already added /lib and /usr/lib - DIRCOUNT += 2 - - # Add all the dirs in $PATH - split(ENVIRON["PATH"], TMPPATHLIST, ":") - count = asort(TMPPATHLIST, PATHLIST) - for (x = 1;x <= count;x++) { - - ADDED = 0 - - # Already added? - for (dnode in DIRLIST) - if (PATHLIST[x] == DIRLIST[dnode]) - ADDED = 1 - - if (ADDED) - continue - - # Valid? If so, add it ... - if (((PATHLIST[x] != "") && (PATHLIST[x] != "/") && (PATHLIST[x] != "."))) - DIRLIST[++DIRCOUNT] = PATHLIST[x] - - } - - GCCLIBPREFIX = "/usr/lib/gcc-lib/" - - for (x = 1;x <= DIRCOUNT;x++) { - - # Do nothing if the target dir is gcc's internal library path - if (DIRLIST[x] ~ GCCLIBPREFIX) continue - - einfo(" Scanning " ((x <= 9) ? "0"x : x)" of " DIRCOUNT " " DIRLIST[x] "...") - - pipe = ("find " DIRLIST[x] "/ -type f -perm -1 2>/dev/null") - while ( (pipe | getline scan_files) > 0) { - - #print scan_files - # Do nothing if the file is located in gcc's internal lib path ... - if (scan_files ~ GCCLIBPREFIX) continue - # Or if its hardend files ... - if (scan_files ~ "/lib/libgcc-3" ) continue - # Or not a elf image ... - if (iself(scan_files)) continue - - scan_file_pipe = ("readelf -s " scan_files " 2>&1") - while (((scan_file_pipe) | getline scan_data) > 0) { - bad = 0; - if (scan_data ~ /__guard@GCC/ || scan_data ~ /__guard@@GCC/) { - bad = 1; - print - - # 194: 00000000 32 OBJECT GLOBAL DEFAULT UND __guard@GCC_3.0 (3) - # 59: 00008ee0 32 OBJECT GLOBAL DEFAULT 22 __guard@@GCC_3.0 - split(scan_data, scan_data_nodes) - ewarn("Found " scan_data_nodes[8] " in " scan_files "!") - print - } - if (scan_data ~ /readelf: Error: Unable to seek/) { - bad = 1; - print - ewarn("Error executing readelf. Bad block? Filesystem error? in " scan_files) - print - } - - if (bad) { - - if (auto_etcat) { - - # Use etcat that comes with gentoolkit if auto_etcat is true. - etcat_pipe = ("etcat belongs " scan_files) - (etcat_pipe) | getline etcat_belongs - - while(((etcat_pipe) | getline etcat_belongs) > 0) - eerror(etcat_belongs != "" ? "Please emerge '>=" etcat_belongs "'": "") - close(etcat_pipe) - } else { - - eerror("You need to remerge package that above file belongs to!") - eerror("To find out what package it is, please emerge gentoolkit,") - eerror("and then run:") - print - print " # etcat belongs " scan_files - } - - print - - close(scan_file_pipe) - close(pipe) - exit(1) - } - } - close(scan_file_pipe) - } - close(pipe) - } - - exit(0) -} - - -# vim:ts=4 diff --git a/dev-java/gcj/files/classpath/gnu.xml.dom.DocumentBuilderFactory.patch b/dev-java/gcj/files/classpath/gnu.xml.dom.DocumentBuilderFactory.patch deleted file mode 100644 index 668aa40f..00000000 --- a/dev-java/gcj/files/classpath/gnu.xml.dom.DocumentBuilderFactory.patch +++ /dev/null @@ -1,201 +0,0 @@ ---- classpath/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java 2005/07/02 20:32:15 1.2 -+++ classpath/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java 2006/02/23 20:09:13 1.3 -@@ -37,6 +37,7 @@ - - package gnu.xml.dom; - -+import javax.xml.XMLConstants; - import javax.xml.parsers.DocumentBuilder; - import javax.xml.parsers.DocumentBuilderFactory; - import javax.xml.parsers.FactoryConfigurationError; -@@ -59,6 +60,7 @@ - - final DOMImplementation impl; - final DOMImplementationLS ls; -+ private boolean secureProcessing; - - public DomDocumentBuilderFactory() - { -@@ -124,5 +126,26 @@ - // TODO - } - -+ public void setFeature(String name, boolean value) -+ throws ParserConfigurationException -+ { -+ if (name == null) -+ throw new NullPointerException(); -+ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) -+ { -+ secureProcessing = true; -+ return; -+ } -+ throw new ParserConfigurationException(name); -+ } -+ -+ public boolean getFeature(String name) -+ throws ParserConfigurationException -+ { -+ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) -+ return secureProcessing; -+ throw new ParserConfigurationException(name); -+ } -+ - } - ---- classpath/classpath/javax/xml/parsers/DocumentBuilderFactory.java 2005/07/02 20:32:52 1.4 -+++ classpath/classpath/javax/xml/parsers/DocumentBuilderFactory.java 2006/02/23 20:09:13 1.5 -@@ -309,6 +309,7 @@ - /** - * Returns the schema. - * @see #setSchema -+ * @since 1.5 - */ - public Schema getSchema() - { -@@ -318,6 +319,7 @@ - /** - * Sets the schema. - * @see #getSchema -+ * @since 1.5 - */ - public void setSchema(Schema schema) - { -@@ -327,7 +329,7 @@ - /** - * Indicates whether parsers obtained from this factory will be XInclude - * aware. -- * @since 1.3 -+ * @since 1.5 - */ - public boolean isXIncludeAware() - { -@@ -336,11 +338,32 @@ - - /** - * Sets whether parsers obtained from this factory will be XInclude aware. -- * @since 1.3 -+ * @since 1.5 - */ - public void setXIncludeAware(boolean state) - { - xIncludeAware = state; - } -+ -+ /** -+ * Sets the value of the specified feature. -+ * @param name the feature name (URI) -+ * @param value whether to enable the feature or not -+ * @exception ParserConfigurationException if the feature is not -+ * supported. -+ * @since 1.5 -+ */ -+ public abstract void setFeature(String name, boolean value) -+ throws ParserConfigurationException; -+ -+ /** -+ * Returns the value of the specified feature. -+ * @param name the feature name (URI) -+ * @exception ParserConfigurationException if the feature is not -+ * supported. -+ * @since 1.5 -+ */ -+ public abstract boolean getFeature(String name) -+ throws ParserConfigurationException; - - } ---- classpath/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java 2005/07/02 20:32:16 1.2 -+++ classpath/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java 2006/02/23 20:09:13 1.3 -@@ -37,6 +37,7 @@ - - package gnu.xml.libxmlj.dom; - -+import javax.xml.XMLConstants; - import javax.xml.parsers.DocumentBuilder; - import javax.xml.parsers.DocumentBuilderFactory; - import javax.xml.parsers.ParserConfigurationException; -@@ -47,9 +48,11 @@ - * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> - */ - public class GnomeDocumentBuilderFactory --extends DocumentBuilderFactory -+ extends DocumentBuilderFactory - { - -+ private boolean secureProcessing; -+ - public GnomeDocumentBuilderFactory () - { - setNamespaceAware (true); -@@ -91,4 +94,25 @@ - // TODO - } - -+ public void setFeature(String name, boolean value) -+ throws ParserConfigurationException -+ { -+ if (name == null) -+ throw new NullPointerException(); -+ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) -+ { -+ secureProcessing = true; -+ return; -+ } -+ throw new ParserConfigurationException(name); -+ } -+ -+ public boolean getFeature(String name) -+ throws ParserConfigurationException -+ { -+ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) -+ return secureProcessing; -+ throw new ParserConfigurationException(name); -+ } -+ - } ---- classpath/classpath/gnu/xml/dom/JAXPFactory.java 2005/07/02 20:32:15 1.3 -+++ classpath/classpath/gnu/xml/dom/JAXPFactory.java 2006/02/23 20:09:13 1.4 -@@ -49,6 +49,7 @@ - import org.xml.sax.SAXException; - import org.xml.sax.SAXParseException; - -+import javax.xml.XMLConstants; - import javax.xml.parsers.DocumentBuilder; - import javax.xml.parsers.DocumentBuilderFactory; - import javax.xml.parsers.ParserConfigurationException; -@@ -70,6 +71,7 @@ - private static final String FEATURE = "http://xml.org/sax/features/"; - - private SAXParserFactory pf; -+ private boolean secureProcessing; - - /** - * Default constructor. -@@ -138,6 +140,27 @@ - throw new IllegalArgumentException(name); - } - -+ public void setFeature(String name, boolean value) -+ throws ParserConfigurationException -+ { -+ if (name == null) -+ throw new NullPointerException(); -+ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) -+ { -+ secureProcessing = true; -+ return; -+ } -+ throw new ParserConfigurationException(name); -+ } -+ -+ public boolean getFeature(String name) -+ throws ParserConfigurationException -+ { -+ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) -+ return secureProcessing; -+ throw new ParserConfigurationException(name); -+ } -+ - static final class JAXPBuilder - extends DocumentBuilder - implements ErrorHandler diff --git a/dev-java/gcj/files/classpath/java.beans.XMLEncoder.patch b/dev-java/gcj/files/classpath/java.beans.XMLEncoder.patch deleted file mode 100644 index 0358d127..00000000 --- a/dev-java/gcj/files/classpath/java.beans.XMLEncoder.patch +++ /dev/null @@ -1,5525 +0,0 @@ -diff -Nur classpath.orig/gnu/java/beans/encoder/ArrayPersistenceDelegate.java classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java ---- classpath.orig/gnu/java/beans/encoder/ArrayPersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,153 @@ -+/* ArrayPersistenceDelegate.java - A PersistenceDelegate that handles arrays. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.beans.Encoder; -+import java.beans.Expression; -+import java.beans.PersistenceDelegate; -+import java.beans.Statement; -+ -+import java.lang.reflect.Array; -+import java.util.HashMap; -+ -+public class ArrayPersistenceDelegate extends PersistenceDelegate -+{ -+ private static final HashMap NULL_VALUES = new HashMap(); -+ -+ static -+ { -+ NULL_VALUES.put(Boolean.TYPE, Boolean.FALSE); -+ NULL_VALUES.put(Byte.TYPE, Byte.valueOf((byte) 0)); -+ NULL_VALUES.put(Short.TYPE, Short.valueOf((short) 0)); -+ NULL_VALUES.put(Integer.TYPE, Integer.valueOf(0)); -+ NULL_VALUES.put(Long.TYPE, Long.valueOf(0)); -+ NULL_VALUES.put(Float.TYPE, Float.valueOf(0.0f)); -+ NULL_VALUES.put(Double.TYPE, Double.valueOf(0.0)); -+ } -+ -+ protected Expression instantiate(Object oldInstance, Encoder out) -+ { -+ Class type = oldInstance.getClass().getComponentType(); -+ -+ // oldInstance is expected to be an array, then -+ // getClass().getComponentType() should lead -+ // to its component type. -+ assert (type != null); -+ -+ // Not handling primitive types in a special way here -+ // causes that Class.forName("int") is built as an Expression -+ // later which would cause an exception if executed. A special -+ // handling to avoid the execution for primitive types can be -+ // java.beans.Encoder.writeExpression() . -+ return new Expression( -+ oldInstance, -+ Array.class, -+ "newInstance", -+ new Object[] { -+ type, -+ new Integer(Array.getLength(oldInstance)) }); -+ } -+ -+ protected void initialize(Class type, Object oldInstance, Object newInstance, -+ Encoder out) -+ { -+ int length = Array.getLength(oldInstance); -+ -+ // Compares the array value against a prototypical -+ // null value of the array's component type in order to skip -+ // writing the default values of an array. -+ -+ // Note: I have no idea why the persistence delegate for arrays writes -+ // an Expression that reads the value and then writes a Statement that sets -+ // the value. However it turned out that object arrays work better with the -+ // get-Expression and primitive array work fine with the set-Statement. -+ -+ type = type.getComponentType(); -+ if (type.isPrimitive()) -+ { -+ Object nullValue = NULL_VALUES.get(type); -+ -+ for (int i = 0; i < length; i++) -+ { -+ Object oldValue = Array.get(oldInstance, i); -+ -+ if (!oldValue.equals(nullValue)) -+ { -+ out.writeExpression(new Expression(Array.class, "get", -+ new Object[] { oldInstance, -+ Integer.valueOf(i), -+ })); -+ -+ out.writeStatement(new Statement(Array.class, "set", -+ new Object[] { -+ oldInstance, -+ Integer.valueOf(i), -+ oldValue -+ })); -+ } -+ } -+ -+ } -+ else -+ { -+ -+ for (int i = 0; i < length; i++) -+ { -+ Object oldValue = Array.get(oldInstance, i); -+ -+ if (oldValue != null) -+ { -+ out.writeExpression(new Expression(Array.class, "get", -+ new Object[] { oldInstance, -+ Integer.valueOf(i), -+ })); -+ -+ out.writeStatement(new Statement(Array.class, "set", -+ new Object[] { -+ oldInstance, -+ Integer.valueOf(i), -+ oldValue -+ })); -+ } -+ } -+ } -+ -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/ClassPersistenceDelegate.java classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java ---- classpath.orig/gnu/java/beans/encoder/ClassPersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,80 @@ -+/* ClassPersistenceDelegate.java - A PersistenceDelegate for the Class type. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+package gnu.java.beans.encoder; -+ -+import java.beans.Encoder; -+import java.beans.Expression; -+import java.beans.PersistenceDelegate; -+ -+/** <p>The <code>ClassPersistenceDelegate</code> creates -+ * <code>Expression</code> instances which denote class resolutions.</p> -+ * -+ * <p>The class resolution is always the last step when serializing a tree -+ * of objects. Due to the recursive nature of the algorithm we need a way -+ * to end the recursion. This is achieved by the implementation of this -+ * {@link instantiate} method. Arbitrary classes are described with a call -+ * to <code>Class.forName</code>. However for the <code>Class</code> class -+ * we call <code>getClass()</code> on a <code>String.class</code> instance. -+ * This in turn lead to the resolution of the String class which is always -+ * encoded as <code>"".getClass()</code>. Finally the <code>Encoder</code> -+ * treats strings in a special way so that the recursion ends here. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class ClassPersistenceDelegate extends PersistenceDelegate -+{ -+ -+ protected Expression instantiate(Object oldInstance, Encoder out) -+ { -+ Class oldClass = (Class) oldInstance; -+ -+ // Due to the special handling of String instances in the Encoder -+ // this Expression does not lead to further class resolutions. -+ if (oldClass == String.class) -+ return new Expression(oldClass, "", "getClass", null); -+ -+ // This Expression will lead to the class resolution of String.class. -+ if (oldClass == Class.class) -+ return new Expression(oldClass, String.class, "getClass", null); -+ -+ // This Expression will lead to the class resolution of Class.class. -+ return new Expression(oldClass, Class.class, "forName", -+ new Object[] { oldClass.getName() }); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/CollectionPersistenceDelegate.java classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java ---- classpath.orig/gnu/java/beans/encoder/CollectionPersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,84 @@ -+/* CollectionPersistenceDelegate.java - A PersistenceDelegate for Collection subclasses. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.util.Collection; -+import java.beans.Encoder; -+import java.beans.Expression; -+import java.beans.PersistenceDelegate; -+import java.beans.Statement; -+ -+import java.util.Iterator; -+ -+/** <p>A <code>PersistenceDelegate</code> implementation that calls -+ * the no-argument constructor to create the Collection instance and -+ * uses an iterator to add all the objects it reaches through it.</p> -+ * -+ * <p>It is used for <code>Set</code> and <code>List</code> -+ * implementations.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class CollectionPersistenceDelegate extends PersistenceDelegate -+{ -+ -+ protected Expression instantiate(Object oldInstance, Encoder out) -+ { -+ return new Expression( -+ oldInstance, -+ oldInstance.getClass(), -+ "new", -+ null); -+ } -+ -+ protected void initialize(Class type, Object oldInstance, Object newInstance, -+ Encoder out) -+ { -+ Iterator ite = ((Collection) oldInstance).iterator(); -+ -+ while (ite.hasNext()) -+ { -+ out.writeStatement(new Statement(oldInstance, "add", -+ new Object[] { ite.next() })); -+ -+ } -+ -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/Context.java classpath/gnu/java/beans/encoder/Context.java ---- classpath.orig/gnu/java/beans/encoder/Context.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/Context.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,88 @@ -+/* Context.java -- Provides calling context information to ScannerStates. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+/** A <code>Contect</code> object describes the current state -+ * and the call number while processing the original object -+ * tree in the {@link ScanEngine}. -+ * -+ * <p>The class allows to distinguish the different calling states -+ * and is neccessary for the child element skipping feature of -+ * the {@link GenericScannerState}.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class Context -+{ -+ private String state; -+ -+ private int call; -+ -+ Context(String newState, int newCall) -+ { -+ state = newState; -+ call = newCall; -+ } -+ -+ public int hashCode() -+ { -+ int hc = 7; -+ hc = 31 * hc + state.hashCode(); -+ hc = 31 * hc + call; -+ -+ return hc; -+ } -+ -+ public boolean equals(Object o) -+ { -+ if (!(o instanceof Context)) -+ return false; -+ -+ Context that = (Context) o; -+ -+ return state.equals(that.state) -+ && call == that.call; -+ } -+ -+ public String toString() -+ { -+ return "Context [state=" + state + ", call=" + call + "]"; -+ } -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/Array_Get.java classpath/gnu/java/beans/encoder/elements/Array_Get.java ---- classpath.orig/gnu/java/beans/encoder/elements/Array_Get.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/Array_Get.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,62 @@ -+/* Array_Get.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** -+ * Generates an XML element denoting the retrieval of an array value. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class Array_Get extends Element -+{ -+ final String indexAsString; -+ -+ public Array_Get(String newIndexAsString) -+ { -+ indexAsString = newIndexAsString; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("void", "index", indexAsString, isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/ArrayInstantiation.java classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java ---- classpath.orig/gnu/java/beans/encoder/elements/ArrayInstantiation.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,74 @@ -+/* ArrayInstantiation.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.ObjectId; -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting the instantiation of an array. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class ArrayInstantiation extends Element -+{ -+ final String className; -+ -+ final String lengthAsString; -+ -+ public ArrayInstantiation(String newClassName, String newLengthAsString) -+ { -+ className = newClassName; -+ lengthAsString = newLengthAsString; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ ObjectId objectId = getId(); -+ if (objectId.isUnused()) -+ writer.write("array", new String[] { "class", "length" }, -+ new String[] { className, lengthAsString }, isEmpty()); -+ else -+ writer.write("array", new String[] { "id", "class", "length" }, -+ new String[] { objectId.toString(), className, -+ lengthAsString }, isEmpty()); -+ -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/Array_Set.java classpath/gnu/java/beans/encoder/elements/Array_Set.java ---- classpath.orig/gnu/java/beans/encoder/elements/Array_Set.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/Array_Set.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,57 @@ -+/* Array_Set.java -- FIXME: briefly describe file purpose -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+public class Array_Set extends Element -+{ -+ final String indexAsString; -+ -+ public Array_Set(String newIndexAsString) -+ { -+ indexAsString = newIndexAsString; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("void", "index", indexAsString, isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/ClassResolution.java classpath/gnu/java/beans/encoder/elements/ClassResolution.java ---- classpath.orig/gnu/java/beans/encoder/elements/ClassResolution.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/ClassResolution.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,67 @@ -+/* ClassResolution.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting the resolution of a class. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class ClassResolution extends Element -+{ -+ final String className; -+ -+ public ClassResolution(String newClassName) -+ { -+ className = newClassName; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.writeNoChildren("class", className); -+ } -+ -+ public void writeEnd(Writer writer) -+ { -+ writer.writeEndNoChildren(); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/Element.java classpath/gnu/java/beans/encoder/elements/Element.java ---- classpath.orig/gnu/java/beans/encoder/elements/Element.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/Element.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,157 @@ -+/* Element.java -- Base class for object tree elements. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import java.util.Iterator; -+import java.util.LinkedList; -+ -+import gnu.java.beans.encoder.ObjectId; -+import gnu.java.beans.encoder.Writer; -+ -+/** <code>Element</code> is the base class for the object tree elements. -+ * -+ * <p>It provides the neccessary infrastructure every element subclass -+ * needs in order to interact with the {@link gnu.java.beans.encoder.Root} -+ * class.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public abstract class Element -+{ -+ /** -+ * Stores the child elements. -+ */ -+ private LinkedList children = new LinkedList(); -+ -+ /** -+ * An optional ObjectId instance which is needed for certain subclasses -+ * only. -+ */ -+ private ObjectId objectId; -+ -+ /** Sets an {@link gnu.java.beans.encoder.ObjectId} instance in this -+ * <code>Element</code>. -+ * -+ * <p>This can only be done once.</p> -+ * -+ * @param objectId An ObjectId instance. -+ */ -+ public final void initId(ObjectId objectId) -+ { -+ assert (this.objectId == null); -+ assert (objectId != null); -+ -+ this.objectId = objectId; -+ } -+ -+ /** Adds a child element to this <code>Element</code>. -+ * -+ * @param elem The new child. -+ */ -+ public final void addChild(Element elem) -+ { -+ children.add(elem); -+ } -+ -+ /** Removes the child element added last. -+ */ -+ public final void removeLast() -+ { -+ children.removeLast(); -+ } -+ -+ /** Provides access to the child elements via an iterator. -+ * -+ * @return An iterator for the child elements. -+ */ -+ public final Iterator iterator(){ -+ return children.iterator(); -+ } -+ -+ /** Clears all the stored child elements. -+ * -+ */ -+ public final void clear() -+ { -+ children.clear(); -+ } -+ -+ /** Returns whether this element contains child elements. -+ * -+ * <p>This method is useful to decide which formatting variant -+ * for the XML element can be chosen.</p> -+ * -+ * @return Whether the element has child elements. -+ */ -+ public final boolean isEmpty() -+ { -+ return children.isEmpty(); -+ } -+ -+ /** Retrieves the element's {@link gnu.java.beans.encoder.ObjectId} instance -+ * if it has one. -+ * -+ * @return The ObjectId instance or <code>null</code>. -+ */ -+ public final ObjectId getId() -+ { -+ return objectId; -+ } -+ -+ /** Writes the opening XML tag. -+ * -+ * @param writer The writer to be used for XML writing. -+ */ -+ public abstract void writeStart(Writer writer); -+ -+ /** Writes the closing XML tag. -+ * -+ * <p>By default this does <code>writer.writeEnd(children.isEmpty())</code>. -+ * Override if neccessary, for example when using the -+ * {@link gnu.java.beans.encoder.Writer#writeNoChildren}</code> method -+ * variants. -+ * -+ * @param writer The writer to be used for XML writing. -+ */ -+ public void writeEnd(Writer writer) -+ { -+ writer.writeEnd(children.isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/List_Get.java classpath/gnu/java/beans/encoder/elements/List_Get.java ---- classpath.orig/gnu/java/beans/encoder/elements/List_Get.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/List_Get.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,56 @@ -+/* List_Get.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting the retrieval of a list's element. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class List_Get extends Element -+{ -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("object", "get"); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/List_Set.java classpath/gnu/java/beans/encoder/elements/List_Set.java ---- classpath.orig/gnu/java/beans/encoder/elements/List_Set.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/List_Set.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,56 @@ -+/* List_Set.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting the setting of a list's element. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class List_Set extends Element -+{ -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("object", "set"); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/MethodInvocation.java classpath/gnu/java/beans/encoder/elements/MethodInvocation.java ---- classpath.orig/gnu/java/beans/encoder/elements/MethodInvocation.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/MethodInvocation.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,62 @@ -+/* MethodCall.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting a non-static method call. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class MethodInvocation extends Element -+{ -+ final String methodName; -+ -+ public MethodInvocation(String newMethodName) -+ { -+ methodName = newMethodName; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("void", "method", methodName, isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/NullObject.java classpath/gnu/java/beans/encoder/elements/NullObject.java ---- classpath.orig/gnu/java/beans/encoder/elements/NullObject.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/NullObject.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,61 @@ -+/* NullObject.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting the <code>null</code> value. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class NullObject extends Element -+{ -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("null", true); -+ } -+ -+ public void writeEnd(Writer writer) -+ { -+ writer.writeEnd(true); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/ObjectInstantiation.java classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java ---- classpath.orig/gnu/java/beans/encoder/elements/ObjectInstantiation.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,68 @@ -+/* ObjectInstantiation.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.ObjectId; -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting the instantiation of an object. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class ObjectInstantiation extends Element -+{ -+ final String className; -+ -+ public ObjectInstantiation(String newClassName) -+ { -+ className = newClassName; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ ObjectId objectId = getId(); -+ if (objectId.isUnused()) -+ writer.write("object", "class", className, isEmpty()); -+ else -+ writer.write("object", new String[] { "id", "class" }, -+ new String[] { objectId.toString(), className }, isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/ObjectReference.java classpath/gnu/java/beans/encoder/elements/ObjectReference.java ---- classpath.orig/gnu/java/beans/encoder/elements/ObjectReference.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/ObjectReference.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,68 @@ -+/* StringInstantiation.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.ObjectId; -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting referencing an existing object. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class ObjectReference extends Element -+{ -+ final ObjectId id; -+ -+ public ObjectReference(ObjectId newId) -+ { -+ id = newId; -+ -+ // Initializing the Id here is making sure it gets -+ // actually used. This step modifies the Id instance -+ // in other elements. -+ id.init(); -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("object", "idref", id.toString(), isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java ---- classpath.orig/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* PrimitiveInstantiation.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting a primitive data value. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class PrimitiveInstantiation extends Element -+{ -+ final String primitiveName; -+ -+ final String valueAsString; -+ -+ public PrimitiveInstantiation(String newPrimitiveName, String newValueAsString) -+ { -+ primitiveName = newPrimitiveName; -+ valueAsString = newValueAsString; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.writeNoChildren(primitiveName, valueAsString); -+ } -+ -+ public void writeEnd(Writer writer) -+ { -+ writer.writeEndNoChildren(); -+ } -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/StaticFieldAccess.java classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java ---- classpath.orig/gnu/java/beans/encoder/elements/StaticFieldAccess.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,66 @@ -+/* StaticFieldAccess.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** Generates an XML element denoting a static method call. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class StaticFieldAccess extends Element -+{ -+ final String className; -+ -+ final String fieldName; -+ -+ public StaticFieldAccess(String newClassName, String newFieldName) -+ { -+ className = newClassName; -+ fieldName = newFieldName; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("object", new String[] { "class", "field" }, -+ new String[] { className, fieldName }, isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/StaticMethodInvocation.java classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java ---- classpath.orig/gnu/java/beans/encoder/elements/StaticMethodInvocation.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,67 @@ -+/* StaticMethodCall.java -+ -- A class denoting an XML element which makes up a static method call. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+/** -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class StaticMethodInvocation extends Element -+{ -+ final String className; -+ -+ final String methodName; -+ -+ public StaticMethodInvocation(String newClassName, String newMethodName) -+ { -+ className = newClassName; -+ methodName = newMethodName; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.write("void", new String[] { "class", "method" }, -+ new String[] { className, methodName }, isEmpty()); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/elements/StringReference.java classpath/gnu/java/beans/encoder/elements/StringReference.java ---- classpath.orig/gnu/java/beans/encoder/elements/StringReference.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/elements/StringReference.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,63 @@ -+/* StringInstantiation.java -+ -- A class denoting an XML element which retrieves an array element. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder.elements; -+ -+import gnu.java.beans.encoder.Writer; -+ -+public class StringReference extends Element -+{ -+ final String string; -+ -+ public StringReference(String newString) -+ { -+ string = newString; -+ } -+ -+ public void writeStart(Writer writer) -+ { -+ writer.writeNoChildren("string", string); -+ } -+ -+ public void writeEnd(Writer writer) -+ { -+ writer.writeEndNoChildren(); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/GenericScannerState.java classpath/gnu/java/beans/encoder/GenericScannerState.java ---- classpath.orig/gnu/java/beans/encoder/GenericScannerState.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/GenericScannerState.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,257 @@ -+/* GenericScannerState.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.util.HashMap; -+ -+import gnu.java.beans.encoder.elements.ArrayInstantiation; -+import gnu.java.beans.encoder.elements.Array_Get; -+import gnu.java.beans.encoder.elements.Array_Set; -+import gnu.java.beans.encoder.elements.ClassResolution; -+import gnu.java.beans.encoder.elements.Element; -+import gnu.java.beans.encoder.elements.List_Get; -+import gnu.java.beans.encoder.elements.List_Set; -+import gnu.java.beans.encoder.elements.MethodInvocation; -+import gnu.java.beans.encoder.elements.NullObject; -+import gnu.java.beans.encoder.elements.ObjectInstantiation; -+import gnu.java.beans.encoder.elements.ObjectReference; -+import gnu.java.beans.encoder.elements.PrimitiveInstantiation; -+import gnu.java.beans.encoder.elements.StaticFieldAccess; -+import gnu.java.beans.encoder.elements.StaticMethodInvocation; -+import gnu.java.beans.encoder.elements.StringReference; -+ -+/** -+ * This class is a {@link ScannerState} implementation that creates -+ * suitable {@link gnu.java.beans.encoder.elements.Element} instances -+ * for each transition variant. -+ * -+ * <p>Furthermore it can optionally skip a certain number of child -+ * elements. The algorithm can cope with the fact that one -+ * <code>GenericScannerState</code> instance may be called at -+ * different levels of recursions.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+class GenericScannerState extends ScannerState -+{ -+ private int skipElements, initialSkipElements; -+ -+ final Root root; -+ -+ HashMap skipValues; -+ -+ GenericScannerState(Root newRoot) -+ { -+ root = newRoot; -+ } -+ -+ GenericScannerState(Root root, int skipElements) -+ { -+ this(root); -+ this.skipElements = initialSkipElements = skipElements; -+ -+ if (skipElements > 0) -+ skipValues = new HashMap(); -+ } -+ -+ protected void enterImpl(Context ctx) -+ { -+ if (skipValues != null) -+ { -+ Integer skip = (Integer) skipValues.get(ctx); -+ -+ if (skip == null) -+ { -+ skip = Integer.valueOf(initialSkipElements); -+ skipValues.put(ctx, skip); -+ } -+ -+ skipElements = skip.intValue(); -+ } -+ } -+ -+ void methodInvocation(String methodName) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new MethodInvocation(methodName)); -+ } -+ -+ void staticMethodInvocation(String className, String methodName) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new StaticMethodInvocation(className, methodName)); -+ } -+ -+ void staticFieldAccess(String className, String fieldName) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new StaticFieldAccess(className, fieldName)); -+ } -+ -+ void classResolution(String className) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new ClassResolution(className)); -+ } -+ -+ void objectInstantiation(String className, ObjectId objectId) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ Element elem = new ObjectInstantiation(className); -+ elem.initId(objectId); -+ -+ root.addChild(elem); -+ } -+ -+ void primitiveInstantiation(String primitiveName, String valueAsString) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new PrimitiveInstantiation(primitiveName, valueAsString)); -+ } -+ -+ void objectArrayInstantiation(String arrayClassName, String lengthAsString, -+ ObjectId objectId) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ Element elem = new ArrayInstantiation(arrayClassName, lengthAsString); -+ elem.initId(objectId); -+ -+ root.addChild(elem); -+ } -+ -+ void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, -+ ObjectId objectId) -+ { -+ objectArrayInstantiation(arrayClassName, lengthAsString, objectId); -+ } -+ -+ void arraySet(String indexAsString) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new Array_Set(indexAsString)); -+ } -+ -+ void arrayGet(String indexAsString) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new Array_Get(indexAsString)); -+ } -+ -+ void listGet() -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new List_Get()); -+ } -+ -+ void listSet() -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new List_Set()); -+ } -+ -+ void nullObject() -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new NullObject()); -+ } -+ -+ void stringReference(String string) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new StringReference(string)); -+ } -+ -+ void objectReference(ObjectId id) -+ { -+ if (skipValues != null && skipElements > 0) -+ return; -+ -+ root.addChild(new ObjectReference(id)); -+ } -+ -+ void end() -+ { -+ if (skipValues != null) -+ { -+ if (skipElements > 0) -+ skipElements--; -+ else -+ { -+ // Finishes the Element we are constructing. -+ root.end(); -+ } -+ skipValues.put(context(), Integer.valueOf(skipElements)); -+ } -+ else -+ root.end(); -+ -+ } -+ -+ void enter() -+ { -+ -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/IgnoringScannerState.java classpath/gnu/java/beans/encoder/IgnoringScannerState.java ---- classpath.orig/gnu/java/beans/encoder/IgnoringScannerState.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/IgnoringScannerState.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,133 @@ -+/* IgnoringScannerState.java -- A ScannerState that does nothing. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+/** A special {@link ScannerState} implementation that ignores all child -+ * elements. -+ * -+ * <p>Consider the call hierarchy: -+ * <code> -+ * methodInvocation -+ * objectInstantiation -+ * classResolution* -+ * objectInstantiation -+ * classResolution -+ * </code> -+ * </p> -+ * -+ * <p>When the ignoring state is active one can filter the elements of -+ * one level. One has to set up the state machine that a transition -+ * via "class resolution" from a state that was reached via "object -+ * instantation" reaches an <code>IgnoringScannerState</code>.</p> -+ * -+ * <p>Setting the default successor of a <code>IgnoringScannerState</code> -+ * to itself causes all elements of the call hierarchy to be skipped -+ * until another state is reached by going back.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+class IgnoringScannerState extends ScannerState -+{ -+ -+ void methodInvocation(String methodName) -+ { -+ } -+ -+ void staticMethodInvocation(String className, String methodName) -+ { -+ } -+ -+ void staticFieldAccess(String className, String fieldName) -+ { -+ } -+ -+ void classResolution(String className) -+ { -+ } -+ -+ void objectInstantiation(String className, ObjectId objectId) -+ { -+ } -+ -+ void primitiveInstantiation(String primitiveName, String valueAsString) -+ { -+ } -+ -+ void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId) -+ { -+ } -+ -+ void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId) -+ { -+ } -+ -+ void arraySet(String indexAsString) -+ { -+ } -+ -+ void arrayGet(String indexAsString) -+ { -+ } -+ -+ void listGet() -+ { -+ } -+ -+ void listSet() -+ { -+ } -+ -+ void nullObject() -+ { -+ } -+ -+ void stringReference(String string) -+ { -+ } -+ -+ void objectReference(ObjectId id) -+ { -+ } -+ -+ void end() -+ { -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/MapPersistenceDelegate.java classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java ---- classpath.orig/gnu/java/beans/encoder/MapPersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,81 @@ -+/* MapPersistenceDelegate.java -- A PersistenceDelegate for Map subclasses. -+ -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.util.Map; -+import java.beans.Encoder; -+import java.beans.Expression; -+import java.beans.PersistenceDelegate; -+import java.beans.Statement; -+ -+import java.util.Iterator; -+ -+/** -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class MapPersistenceDelegate extends PersistenceDelegate -+{ -+ -+ protected Expression instantiate(Object oldInstance, Encoder out) -+ { -+ return new Expression( -+ oldInstance, -+ oldInstance.getClass(), -+ "new", -+ null); -+ } -+ -+ protected void initialize(Class type, Object oldInstance, Object newInstance, -+ Encoder out) -+ { -+ Map map = (Map) oldInstance; -+ Iterator ite = map.keySet().iterator(); -+ -+ while (ite.hasNext()) -+ { -+ Object key = ite.next(); -+ out.writeStatement(new Statement(oldInstance, "put", -+ new Object[] { key, map.get(key) })); -+ -+ } -+ -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/ObjectId.java classpath/gnu/java/beans/encoder/ObjectId.java ---- classpath.orig/gnu/java/beans/encoder/ObjectId.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/ObjectId.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,132 @@ -+/* ObjectId.java -- Simple object identification mechanism for XML encoding. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.util.HashMap; -+ -+/** -+ * <p> -+ * ObjectId provides an object identification mechanism which gives each object -+ * a name in the form <code><class><Nameindex></code>. -+ * </p> -+ * -+ * <p> -+ * Each id can be in an unused state which means that only one instance of the -+ * object is in use and a special id is not needed. Certain {@link -+ * gnu.java.beans.encoder.elements.Element} subclasses use this feature to find -+ * out whether they write the "id" attribute or not. -+ * </p> -+ * <p> -+ * An <code>ObjectId</code> instance is typically given to multiple objects. -+ * The second user should then invoke the {@link #init} method to generate the -+ * identification string and bring the id in the 'used' state. -+ * </p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class ObjectId -+{ -+ /** -+ * Stores the index an object of a specific type should be given. -+ */ -+ private static HashMap nameIndices = new HashMap(); -+ -+ private String id; -+ -+ private Class klass; -+ -+ ObjectId(Class klass) -+ { -+ this.klass = klass; -+ } -+ -+ public boolean isUnused() -+ { -+ return id == null; -+ } -+ -+ public String toString() -+ { -+ return (id != null) ? id : "<unused id>"; -+ } -+ -+ /** -+ * <p> -+ * Generates a simple Id by concatenating a class name with a self-increasing -+ * number. -+ * </p> -+ */ -+ public void init() -+ { -+ assert (klass != null); -+ -+ if (id != null) -+ return; -+ -+ Integer count = (Integer) nameIndices.get(klass); -+ if (count == null) -+ { -+ count = Integer.valueOf(0); -+ } -+ -+ if (klass.isArray()) -+ { -+ Class ct = klass.getComponentType(); -+ if (ct == Boolean.TYPE) -+ id = "booleanArray" + count.intValue(); -+ else if (ct == Byte.TYPE) -+ id = "byteArray" + count.intValue(); -+ else if (ct == Short.TYPE) -+ id = "shortArray" + count.intValue(); -+ else if (ct == Integer.TYPE) -+ id = "intArray" + count.intValue(); -+ else if (ct == Long.TYPE) -+ id = "longArray" + count.intValue(); -+ else if (ct == Float.TYPE) -+ id = "floatArray" + count.intValue(); -+ else if (ct == Double.TYPE) -+ id = "doubleArray" + count.intValue(); -+ } -+ else -+ id = klass.getName() + count.intValue(); -+ -+ nameIndices.put(klass, Integer.valueOf(count.intValue() + 1)); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java ---- classpath.orig/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,74 @@ -+/* PrimitivePersistenceDelegate.java -+ -- A PersistenceDelegate for primitive data types. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+package gnu.java.beans.encoder; -+ -+import java.beans.Encoder; -+import java.beans.Expression; -+import java.beans.PersistenceDelegate; -+ -+/** -+ * A shared PersistenceDelegate implementation for all primitive types. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class PrimitivePersistenceDelegate extends PersistenceDelegate -+{ -+ -+ protected Expression instantiate(Object oldInstance, Encoder out) -+ { -+ // The implementation relies on the fact that every primitive -+ // wrapper class has a constructor accepting a String argument. -+ // By using these constructors creating a primitive instance -+ // depends on the String class only. -+ return new Expression(oldInstance, oldInstance.getClass(), "new", -+ new Object[] { oldInstance.toString() }); -+ } -+ -+ protected void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) -+ { -+ // This is a hack to make serializing primitive arrays work correctly. -+ // Instead of modifying an existing primitive instance to make it equal -+ // with another instance (which is not possible because primitives are -+ // immutable) we create a new instance. This is against the specification -+ // of the initialize method but make things work fine. -+ out.writeExpression(new Expression(oldInstance, oldInstance.getClass(), "new", -+ new Object[] { oldInstance.toString() })); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/ReportingScannerState.java classpath/gnu/java/beans/encoder/ReportingScannerState.java ---- classpath.orig/gnu/java/beans/encoder/ReportingScannerState.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/ReportingScannerState.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,131 @@ -+/* ReportingScannerState.java -- A state for debugging purposes. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+/** -+ * A <code>ScannerState</code> implementation that prints useful details -+ * about its arguments. Use it when the XML encoding does not work correctly -+ * and you want to find out how things relate to each other. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+class ReportingScannerState extends ScannerState -+{ -+ -+ void methodInvocation(String methodName) -+ { -+ System.out.println("methodInvocation: " + methodName + "()"); -+ } -+ -+ void staticMethodInvocation(String className, String methodName) -+ { -+ System.out.println("staticMethodInvocation: " + className + "." + methodName + "()"); -+ } -+ -+ void staticFieldAccess(String className, String fieldName) -+ { -+ System.out.println("staticFieldAccess: " + className + "." + fieldName); -+ } -+ -+ void classResolution(String className) -+ { -+ System.out.println("classResolution: " + className); -+ } -+ -+ void objectInstantiation(String className, ObjectId objectId) -+ { -+ System.out.println("objectInstantiation: " + className); -+ } -+ -+ void primitiveInstantiation(String primitiveName, String valueAsString) -+ { -+ System.out.println("primitiveInstantiation: (" + primitiveName + ") " + valueAsString); -+ } -+ -+ void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId) -+ { -+ System.out.println("objectArrayInstantiation: new " + arrayClassName + "[" + lengthAsString + "]"); -+ } -+ -+ void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId) -+ { -+ System.out.println("primitiveArrayInstantiation: new " + arrayClassName + "[" + lengthAsString + "]"); -+ } -+ -+ void arraySet(String indexAsString) -+ { -+ System.out.println("arraySet: " + indexAsString); -+ } -+ -+ void arrayGet(String indexAsString) -+ { -+ System.out.println("arrayGet: " + indexAsString); -+ } -+ -+ void listGet() -+ { -+ System.out.println("listGet"); -+ } -+ -+ void listSet() -+ { -+ System.out.println("listSet"); -+ } -+ -+ void nullObject() -+ { -+ System.out.println("nullObject"); -+ } -+ -+ void stringReference(String string) -+ { -+ System.out.println("stringReference: " + string); -+ } -+ -+ void objectReference(ObjectId id) -+ { -+ System.out.println("objectReference: " + id); -+ } -+ -+ void end() -+ { -+ System.out.println("-close"); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/Root.java classpath/gnu/java/beans/encoder/Root.java ---- classpath.orig/gnu/java/beans/encoder/Root.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/Root.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,198 @@ -+/* Root.java -- The root of an object tree. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.beans.XMLEncoder; -+import java.util.Iterator; -+import java.util.Stack; -+ -+import gnu.java.beans.encoder.elements.Element; -+ -+/** <p><code>Root</code> provides a simple interface to a tree of -+ * objects.</p> -+ * -+ * <p>Using an instance of this class a logical representation of -+ * the real object tree that is serialized can be built. When the -+ * actual data should be written as XML <code>Root</code> and -+ * {@link gnu.java.beans.encoder.elements.Element} class can provide -+ * context information which is used to write the best fitting -+ * XML representation.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class Root -+{ -+ private Stack parents = new Stack(); -+ -+ private Element rootElement, current; -+ -+ private boolean started; -+ -+ public Root() -+ { -+ rootElement = current = new RootElement(); -+ } -+ -+ /** <p>Adds another child element to the tree.</p> -+ * -+ * <p>The new element automatically becomes the current -+ * element.</p> -+ * -+ * @param elem The new child element. -+ */ -+ public void addChild(Element elem) -+ { -+ current.addChild(elem); -+ -+ parents.push(current); -+ current = elem; -+ } -+ -+ /** -+ * <p>Marks that the end of the current element -+ * is reached and that no more childs are added to -+ * it.</p> -+ * -+ * <p>The behavior is to return to the nearest parent -+ * element.</p> -+ */ -+ public void end() -+ { -+ current = (Element) parents.pop(); -+ } -+ -+ /** -+ * <p>Goes back to the nearest parent element but -+ * deletes the just created child.</p> -+ * -+ * <p>This is used if something went wrong while -+ * processing the child element's {@link java.beans.Expression} -+ * or {@link java.beans.Statement}.</p> -+ * -+ */ -+ public void deleteLast() -+ { -+ current = (Element) parents.pop(); -+ -+ current.removeLast(); -+ } -+ -+ /** -+ * <p>Traverses the elements in the object tree -+ * and creates their XML representation in the output -+ * stream of the given {@link Writer}.</p> -+ * -+ * <p>Finally the <code>Writer</code> is flushed.</p> -+ * -+ * @param writer The Writer instance that generates the XML representation. -+ */ -+ public void traverse(Writer writer) -+ { -+ if (!started) -+ { -+ writer.writePreamble(); -+ rootElement.writeStart(writer); -+ } -+ started = true; -+ -+ traverse(writer, rootElement.iterator()); -+ -+ rootElement.clear(); -+ -+ writer.flush(); -+ } -+ -+ /** Writes the closing element and closes the {@link Writer} -+ * -+ * @param writer The Writer instance that generates the XML representation. -+ */ -+ public void close(Writer writer) -+ { -+ rootElement.writeEnd(writer); -+ writer.close(); -+ } -+ -+ /** Recursively traverses the object tree. -+ * -+ * @param writer The Writer instance that generates the XML representation. -+ * @param ite An Iterator returning Element instances. -+ */ -+ private void traverse(Writer writer, Iterator ite) -+ { -+ while (ite.hasNext()) -+ { -+ Element e = (Element) ite.next(); -+ e.writeStart(writer); -+ -+ traverse(writer, e.iterator()); -+ -+ e.writeEnd(writer); -+ -+ e.clear(); -+ } -+ } -+ -+ /** <p>A special Element implementation that represents the -+ * encoder's context.</p> -+ * -+ * <p>This element is written only once per Writer.</p> -+ * -+ * <p>It is assumed that this element is never empty to simplify -+ * the implementation.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org); -+ * -+ */ -+ static class RootElement extends Element -+ { -+ public void writeStart(Writer writer) -+ { -+ writer.write("java", new String[] { "version", "class" }, -+ new String[] { System.getProperty("java.version"), -+ XMLEncoder.class.getName() }, false); -+ } -+ -+ public void writeEnd(Writer writer) -+ { -+ writer.writeEnd(false); -+ } -+ -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/ScanEngine.java classpath/gnu/java/beans/encoder/ScanEngine.java ---- classpath.orig/gnu/java/beans/encoder/ScanEngine.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/ScanEngine.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,860 @@ -+/* ScanEngine.java -+ -- Scans the input and generates an object tree that can be written as XML. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.beans.Expression; -+import java.beans.Statement; -+import java.io.OutputStream; -+import java.lang.reflect.Array; -+import java.util.HashMap; -+import java.util.IdentityHashMap; -+import java.util.List; -+import java.util.Stack; -+ -+/** <p>The <code>ScanEngine</code> is the main class of the backend of the -+ * XML persistence algorithm. It scans {@link java.beans.Expression} and -+ * {@link java.beans.Statement} instances and some raw objects via the -+ * {@link #writeObject} method and feeds it to a state machine. The -+ * state machine then constructs and object tree which is finally -+ * written as XML by a {@link Writer} implementation.</p> -+ * -+ * <p>How does it work?</p> -+ * <p>The <code>ScanEngine</code> sits below the {@link java.beans.XMLEncoder} -+ * class and is called by it exclusively. The <code>XMLEncoder</code> sends -+ * interpretive data by invoking {@link #writeExpression}, {@link #writeStatement} -+ * and {@link #writeObject}. The invocations of <code>writeExpression</code> and -+ * <code>writeStatement</code> are usually nested into each other and provide -+ * more information then necessary to generate the XML representation. -+ * Furthermore the meaning of certain <code>Expressions</code> differs -+ * depending on the enclosing elements or the inner elements have to be -+ * simply discarded.</p> -+ * -+ * <p>To cope with this state dependant nature the <code>ScanEngine</code> -+ * contains a state machine which is programmed statically (no adjustments are -+ * needed, all <code>ScanEngine</code> engines use the same setup). The -+ * <code>ScanEngine</code>'s job is to decode the <code>Expression</code>s, -+ * <code>Statement</code>s and certain objects (namely <code>String</code>, -+ * <code>null</code> objects and instances which are repeatedly provided to -+ * the encoder) into 13 low-level (event) methods, which denote the meaning of the -+ * argument. For example an <code>Expression</code> can be an array -+ * instantiation which provokes a call to {@link arrayInstantiation} or -+ * it can be a class resolution leading to a call to {@link #classResolution}. -+ * For the state machione the 13 methods are the distinct way to transit -+ * from one state to another. Whenever the <code>ScanEngine</code> calls -+ * one of the event methods the current's state successor for that event -+ * is fetched from the state machine configuration, the successpr becomes -+ * the current state and then the event method is called in the new current -+ * state. The last step allows the state instance to do something meaningful -+ * to the object tree.</p> -+ * -+ * <p>The state machine knows the concept of returning to the previous -+ * state. This is done using a stack of states which is popped every -+ * time a call to <code>writeStatement</code>, <code>writeExpression</code> -+ * in the <code>XMLEncoder</code> ends by calling the {@link #end} method. -+ * Note that due to the inheritance relationship of <code>Encoder</code> -+ * and <code>XMLEncoder</code> it is impossible for the -+ * <code>ScanEngine</code> itself to decide when an expression or statement -+ * ended. This can only be done in case of {@link #writeObject} calls because -+ * they are not nested.</p> -+ * -+ * <p>When the XML persistence mechanism reaches an object twice (and more) -+ * it should generate an XML element using the "idref" attribute and add -+ * an "id" attribute to its first instantiation. This complicates things a bit -+ * because the first instantiation will always be part of the object tree -+ * as some {@link gnu.java.beans.encoder.elements.Element} subclass instance when the -+ * second and further objects accesses are written. Therefore the {@link ObjectId} -+ * class was introduced which is shared between all the object tree elements -+ * and has the notion of an "unused" state meaning that no identification -+ * is needed. The relationship between an object and its <code>ObjectId</code> -+ * instance is stored in the <code>ScanEngine</code> and gets cleared whenever -+ * the {@link #flush} method is called. This method also writes the currently -+ * built object tree and generates the XML representation.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ */ -+public class ScanEngine -+{ -+ -+ /** Change this to true to let the ScanEngine print state transition -+ * information. -+ */ -+ boolean DEBUG = false; -+ -+ /** -+ * Stores the scanner engine states as values and their names as keys. -+ */ -+ HashMap states = new HashMap(); -+ -+ /** -+ * Stores former scanner state and makes it possible to come back to them. -+ */ -+ Stack parents = new Stack(); -+ -+ /** -+ * The currently active scanner state. -+ */ -+ ScannerState current; -+ -+ /** -+ * The root of an object tree that is later written to XML. -+ */ -+ Root root; -+ -+ /** -+ * The Writer used to generate the XML output. -+ */ -+ Writer writer; -+ -+ /** Stores the relationship between objects and their {@link ObjectId} instance. -+ */ -+ IdentityHashMap objects = new IdentityHashMap(); -+ -+ public ScanEngine(OutputStream os) -+ { -+ // TODO: Provide another Writer implementation (e.g. one that does not use -+ // the XML APIs at all). -+ writer = new StAXWriter(os); -+ root = new Root(); -+ -+ final ScannerState start = current = new GenericScannerState(root);; -+ ScannerState conf; -+ -+ // Use the ReportingScannerState to debug serialization issues. -+ register(ScannerState.DEFAULT_STATE_NAME, new IgnoringScannerState()); -+ -+ register("start", start); -+ -+ // Special dead-end state where all transitions are ignored. -+ register("ignoreAll", new IgnoringScannerState()) -+ .setDefaultSuccessor("ignoreAll"); -+ -+ // Object reference, string reference, null object -+ start.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "simple"); -+ start.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "simple"); -+ start.putSuccessor(ScannerState.TRANSITION_NULL_OBJECT, "simple"); -+ register("simple", new GenericScannerState(root)) -+ .setDefaultSuccessor("ignoreAll"); -+ -+ // Class resolution. -+ start.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "classRes0"); -+ register("classRes0", -+ new GenericScannerState(root)).setDefaultSuccessor("ignoreAll"); -+ -+ // Object instantiation. -+ start.putSuccessor(ScannerState.TRANSITION_OBJECT_INSTANTIATION, -+ "newObj0"); -+ conf = register("newObj0", new GenericScannerState(root)); -+ conf.setDefaultSuccessor("ignoreAll"); -+ -+ // Simply use the start state to encode method invocations inside of -+ // objects. -+ conf.putSuccessor(ScannerState.TRANSITION_METHOD_INVOCATION, "start"); -+ -+ // Primitive instantiations. -+ start.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "newPrimitive0"); -+ register("newPrimitive0", -+ new GenericScannerState(root)).setDefaultSuccessor("ignoreAll"); -+ -+ // Object arrays use the ARRAY_GET transition to create setting the -+ // array values. -+ start.putSuccessor(ScannerState.TRANSITION_OBJECT_ARRAY_INSTANTIATION, -+ "newObjectArray"); -+ conf = register("newObjectArray", new GenericScannerState(root)); -+ conf.putSuccessor(ScannerState.TRANSITION_ARRAY_GET, "newOArrayGet"); -+ conf.putSuccessor(ScannerState.TRANSITION_ARRAY_SET, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "ignoreAll"); -+ -+ // Get here when a value is set in the array. -+ register("newOArrayGet", -+ conf = new GenericScannerState(root)); -+ -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "newOArrayGet_ignoreFirstInteger"); -+ -+ // "newArrayGet_ignoreFirstInteger" is set up mostly identical like the "start" -+ // state. Otherwise things would not behave the same when done inside -+ // arrays. -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "simple"); -+ conf.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "simple"); -+ conf.putSuccessor(ScannerState.TRANSITION_NULL_OBJECT, "simple"); -+ conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "classRes0"); -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_INSTANTIATION, "newObj0"); -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_ARRAY_INSTANTIATION, -+ "newPrimitiveArray"); -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_ARRAY_INSTANTIATION, -+ "newObjectArray"); -+ -+ conf = register("newOArrayGet_ignoreFirstInteger", -+ new GenericScannerState(root, 1)); -+ -+ // In non-int primitive arrays class resolutions can happen -+ // but they should be ignored. -+ conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); -+ -+ // Spurious object and string references occur when setting array -+ // elements. This suppresses them. -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "ignoreAll"); -+ -+ conf.setDefaultSuccessor("start"); -+ -+ // Primitive arrays use the ARRAY_SET transition to create setting the -+ // array values. This turned out to be the only working solution. -+ // When primitive arrays were handled by ARRAY_GET the values in boolean -+ // arrays were always skipped. -+ start.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_ARRAY_INSTANTIATION, -+ "newPrimitiveArray"); -+ conf = register("newPrimitiveArray", new GenericScannerState(root)); -+ conf.putSuccessor(ScannerState.TRANSITION_ARRAY_GET, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_ARRAY_SET, "newPArraySet"); -+ conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "ignoreAll"); -+ -+ conf = register("newPArraySet", new GenericScannerState(root)); -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "newPArraySet_ignoreFirstInteger"); -+ -+ // Primitive arrays ignore all kinds of non-primitive object information. -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, -+ "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_NULL_OBJECT, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ingoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_INSTANTIATION, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_ARRAY_INSTANTIATION, -+ "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_ARRAY_INSTANTIATION, -+ "ignoreAll"); -+ -+ conf = register("newPArraySet_ignoreFirstInteger", -+ new GenericScannerState(root, 1)); -+ -+ // In non-int primitive arrays class resolutions can happen -+ // but they should be ignored. -+ conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); -+ -+ // Spurious object and string references occur when setting array -+ // elements. This suppresses them. -+ conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, -+ "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "ignoreAll"); -+ conf.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "ignoreAll"); -+ conf.setDefaultSuccessor("start"); -+ -+ } -+ -+ /** Registers a <code>ScannerState</code> under a certain name. -+ * -+ * @param name Name of the state -+ * @param state The <code>ScannerState</code> instance. -+ * @return The second argument. -+ */ -+ private ScannerState register(String name, ScannerState state) -+ { -+ state.init(name); -+ -+ states.put(name, state); -+ -+ return state; -+ } -+ -+ /** Generates or returns an id for the given object which can be activated -+ * later if the object is suitable. -+ * -+ * <p>Objects are unsuitable if they are an instance of a primitive wrapper -+ * or String.</p> -+ * -+ * @param value The object to retrieve an id for. -+ * @return The id for the object or <code>null</code>. -+ */ -+ private ObjectId retrieveId(Object value) -+ { -+ Class valueClass = value.getClass(); -+ ObjectId id = null; -+ -+ // Although multiple accesses to Class objects are not handled -+ // through ids we generate one for them, too. This allows us to detect -+ // second time references to such objects in the writeObject method -+ // and handle them in a special way. -+ if (valueClass != String.class -+ && valueClass.getSuperclass() != Number.class -+ && valueClass != Boolean.class) -+ { -+ if ((id = (ObjectId) objects.get(value)) == null) -+ { -+ id = new ObjectId(valueClass); -+ objects.put(value, id); -+ } -+ } -+ -+ return id; -+ } -+ -+ /** Scans the argument and calls one of event methods. See -+ * the introduction of this class for details. -+ * -+ * @param expr The expression to serialize. -+ */ -+ public void writeExpression(Expression expr) -+ { -+ String methodName = expr.getMethodName(); -+ Object[] args = expr.getArguments(); -+ Object target = expr.getTarget(); -+ Object value = null; -+ -+ try -+ { -+ value = expr.getValue(); -+ } -+ catch (Exception e) -+ { -+ throw (InternalError) -+ new InternalError( -+ "The Expression's value should be available at this point.") -+ .initCause(e); -+ } -+ -+ // TODO: What if the value is null? -+ ObjectId id; -+ Class valueClass = value.getClass(); -+ -+ if (target == Array.class) -+ { -+ if (methodName.equals("newInstance")) -+ { -+ id = retrieveId(value); -+ -+ Class ct = (Class) args[0]; -+ -+ if (ct.isPrimitive() || ct == Boolean.class || ct == Byte.class -+ || ct == Short.class || ct == Integer.class || ct == Long.class -+ || ct == Float.class || ct == Double.class) -+ primitiveArrayInstantiation(ct.getName(), -+ args[1].toString(), -+ id); -+ else -+ objectArrayInstantiation(ct.getName(), -+ args[1].toString(), -+ id); -+ -+ return; -+ } -+ else if (methodName.equals("get")) -+ { -+ arrayGet(args[1].toString()); -+ -+ // The encoder does not call the ScanEngine -+ // when an object is serialized that we already know. -+ // We test for this situation and insert the object reference -+ // manually. -+ // Since there is already a workaround for the Class class -+ // in writeObject we have to except it from this behavior. -+ id = (ObjectId) objects.get(value); -+ if (id != null && valueClass != Class.class) -+ { -+ objectReference(id); -+ end(); -+ } -+ -+ return; -+ } -+ else if (methodName.equals("set")) -+ { -+ arraySet(args[1].toString()); -+ return; -+ } -+ } -+ -+ id = retrieveId(value); -+ -+ if (target instanceof Class) -+ { -+ if (methodName.equals("new")) -+ { -+ Class targetClass = (Class) target; -+ -+ // All primitive types have short-hand forms for their -+ // constructors. -+ if (valueClass == Boolean.class) -+ primitiveInstantiation("boolean", args[0].toString()); -+ else if (valueClass == Byte.class) -+ primitiveInstantiation("byte", args[0].toString()); -+ else if (valueClass == Short.class) -+ primitiveInstantiation("short", args[0].toString()); -+ else if (valueClass == Integer.class) -+ primitiveInstantiation("int", args[0].toString()); -+ else if (valueClass == Long.class) -+ primitiveInstantiation("long", args[0].toString()); -+ else if (valueClass == Float.class) -+ primitiveInstantiation("float", args[0].toString()); -+ else if (valueClass == Double.class) -+ primitiveInstantiation("double", args[0].toString()); -+ else -+ objectInstantiation(targetClass.getName(), id); -+ -+ return; -+ } -+ else if (value instanceof Class) -+ { -+ String className = ((Class) value).getName(); -+ -+ // At this point we know that some *static* method will be called. -+ -+ if (methodName.equals("forName")) -+ { -+ // However "Class.forName" represents class resolution and has a -+ // special syntax. -+ classResolution(className); -+ return; -+ } -+ else if (methodName.equals("getField")) -+ { -+ // The same goes for "Class.getField". -+ // Note: The name of the wanted field is given in -+ // the argument array. -+ staticFieldAccess(className, args[0].toString()); -+ return; -+ } -+ else -+ { -+ // If nothing fits it is just a static method -+ // invocation which we decode as such. -+ staticMethodInvocation(className, methodName); -+ return; -+ } -+ } -+ } -+ else if (target instanceof List) -+ { -+ // Special behavior for indexed get and set method for list-style -+ // classes. -+ // The arguments are in the args array but we need them as subelements. -+ if (methodName.equals("get")) -+ { -+ listGet(); -+ return; -+ } -+ else if (methodName.equals("set")) -+ { -+ listSet(); -+ return; -+ } -+ } -+ -+ // If nothing else could be used then this is a normal -+ // method invocation. -+ methodInvocation(methodName); -+ } -+ -+ /** -+ * Ends the current state and returns to the last one. -+ */ -+ public void end() -+ { -+ current.end(); -+ -+ if (DEBUG) System.err.print("back from " + current.getName()); -+ -+ ScannerState oldCurrent = current; -+ current = (ScannerState) parents.pop(); -+ -+ if (DEBUG) System.err.println(" to " + current.getName()); -+ } -+ -+ /** -+ * Returns to the last state and deletes the last element in the object tree. -+ */ -+ public void revoke() -+ { -+ ScannerState oldCurrent = current; -+ current = (ScannerState) parents.pop(); -+ -+ root.deleteLast(); -+ } -+ -+ /** Scans the argument and calls one of event methods. See -+ * the introduction of this class for details. -+ * -+ * @param stmt The statement to serialize. -+ */ -+ public void writeStatement(Statement stmt) -+ { -+ // This is a simplified version of writeExpression. Everything -+ // that would not create something that is embedded in a <void> tag -+ // is left out (instantiation, getters, ...). -+ // TODO: Is this the right thing to do? -+ -+ String methodName = stmt.getMethodName(); -+ Object target = stmt.getTarget(); -+ Object[] args = stmt.getArguments(); -+ -+ if (target == Array.class && methodName.equals("set")) -+ { -+ arraySet(args[1].toString()); -+ return; -+ } -+ -+ if (target instanceof List) -+ { -+ if (methodName.equals("set")) -+ { -+ listSet(); -+ return; -+ } -+ } -+ -+ // If nothing else could be used then this is a normal -+ // method invocation. -+ methodInvocation(methodName); -+ } -+ -+ /** Scans the argument and calls one of event methods. See -+ * the introduction of this class for details. -+ * -+ * @param o The object to serialize. -+ */ -+ public boolean writeObject(Object o) -+ { -+ ObjectId id = null; -+ -+ if (o == null) -+ { -+ // Handle null objects which have a special syntax. -+ nullObject(); -+ end(); -+ } -+ else if (o.getClass() == String.class) -+ { -+ // Handle strings which are treated extremely special -+ // in the encoder (they are never converted into a -+ // Expression). -+ stringReference((String) o); -+ end(); -+ } -+ else if ((id = (ObjectId) objects.get(o)) != null) -+ { -+ // Multiple references to a Class object do not generate -+ // an object reference but we use the id to detect that -+ // situation. -+ if (o.getClass() == Class.class) -+ { -+ classResolution(((Class) o).getName()); -+ end(); -+ return false; -+ } -+ -+ // If our object has a corresponding ObjectId instance -+ // then generate an objectReference. This will -+ // initialize the id (= brings it in the "used" state) -+ // when this is the first referal. -+ objectReference(id); -+ end(); -+ return false; -+ } -+ -+ return true; -+ } -+ -+ /** -+ * Writes the currently constructed object tree out as -+ * XML and clears the object to {@link ObjectId} relations. -+ */ -+ public void flush() -+ { -+ // Make all references unreachable. That means we have to generate -+ // new object ids. -+ objects.clear(); -+ -+ root.traverse(writer); -+ } -+ -+ /** Writes the final bits if the object tree and closes the stream -+ * afterwards. -+ */ -+ public void close() -+ { -+ flush(); -+ root.close(writer); -+ } -+ -+ /** -+ * Does a transition from one state to another using the given event. -+ * -+ * <p>This involves saving the current state, retrieving it's -+ * successor and setting it as the current state.</p> -+ * -+ * @param transition One of {@link ScannerStates]'s transition constants. -+ */ -+ private void transition(int transition) -+ { -+ parents.push(current); -+ -+ String stateName = current.getSuccessor(transition); -+ -+ if (DEBUG) -+ { -+ System.err.println("from state: " + current.getName() + "\n\troute: " -+ + ScannerState.transitionNames[transition] -+ + "\n\t\tto state: " -+ + stateName); -+ } -+ -+ ScannerState newState = (ScannerState) states.get(stateName); -+ -+ newState.enter(new Context(current.getName(), current.getCalls())); -+ -+ assert (newState != null) : "State '" + stateName + "' was not defined."; -+ -+ current = newState; -+ } -+ -+ /** Event method that denotes a (non-static) method invocation. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param methodName The name of the method which is called. -+ */ -+ void methodInvocation(String methodName) -+ { -+ transition(ScannerState.TRANSITION_METHOD_INVOCATION); -+ -+ current.methodInvocation(methodName); -+ } -+ -+ /** Event method that denotes a static method invocation. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param methodName The name of the method which is called. -+ * @param className The name of the class in which the method is called. -+ */ -+ void staticMethodInvocation(String className, String methodName) -+ { -+ transition(ScannerState.TRANSITION_STATIC_METHOD_INVOCATION); -+ -+ current.staticMethodInvocation(className, methodName); -+ } -+ -+ /** Event method that denotes the retrieval of a static field's value. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param fieldName The name of the field whose value is retrieved. -+ * @param className The name of the class in which the method is called. -+ */ -+ void staticFieldAccess(String className, String fieldName) -+ { -+ transition(ScannerState.TRANSITION_STATIC_FIELD_ACCESS); -+ -+ current.staticFieldAccess(className, fieldName); -+ } -+ -+ /** Event method that denotes the resolution of a class. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param className The name of the class in which the method is called. -+ */ -+ void classResolution(String className) -+ { -+ transition(ScannerState.TRANSITION_CLASS_RESOLUTION); -+ -+ current.classResolution(className); -+ } -+ -+ /** Event method that denotes the instantiation of an object. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param className The name of the class in which the method is called. -+ * @param objectId An ObjectId instance which can be activated later. -+ */ -+ void objectInstantiation(String className, ObjectId objectId) -+ { -+ transition(ScannerState.TRANSITION_OBJECT_INSTANTIATION); -+ -+ current.objectInstantiation(className, objectId); -+ } -+ -+ /** Event method that denotes the instantiation of a primitive. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param primitiveName One of "boolean, "byte", "short", "int", "long" -+ * , "float" or "double" -+ * @param valueAsString The value of the primitive as a String. -+ */ -+ void primitiveInstantiation(String primitiveName, String valueAsString) -+ { -+ transition(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION); -+ -+ current.primitiveInstantiation(primitiveName, valueAsString); -+ } -+ -+ /** Event method that denotes the instantiation of an object array. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param arrayClassName The array's class name. -+ * @param objectId An ObjectId instance which can be activated later. -+ * @param lengthAsString The array's length as String. -+ */ -+ void objectArrayInstantiation(String arrayClassName, String lengthAsString, -+ ObjectId objectId) -+ { -+ transition(ScannerState.TRANSITION_OBJECT_ARRAY_INSTANTIATION); -+ -+ current.objectArrayInstantiation(arrayClassName, lengthAsString, objectId); -+ } -+ -+ /** Event method that denotes the instantiation of a primitive array. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param arrayClassName The array's class name. -+ * @param objectId An ObjectId instance which can be activated later. -+ * @param lengthAsString The array's length as String. -+ */ -+ void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, -+ ObjectId objectId) -+ { -+ transition(ScannerState.TRANSITION_PRIMITIVE_ARRAY_INSTANTIATION); -+ -+ current.objectArrayInstantiation(arrayClassName, lengthAsString, objectId); -+ } -+ -+ /** Event method that denotes the setting of a value in an array. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param indexAsString The index to as a String. -+ */ -+ void arraySet(String indexAsString) -+ { -+ transition(ScannerState.TRANSITION_ARRAY_SET); -+ -+ current.arraySet(indexAsString); -+ } -+ -+ /** Event method that denotes the retrieval of a value in an array. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ * -+ * @param indexAsString The index to as a String. -+ */ -+ void arrayGet(String indexAsString) -+ { -+ transition(ScannerState.TRANSITION_ARRAY_GET); -+ -+ current.arrayGet(indexAsString); -+ } -+ -+ /** Event method that denotes the setting of a value in a list. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ */ -+ void listSet() -+ { -+ transition(ScannerState.TRANSITION_LIST_SET); -+ -+ current.listSet(); -+ } -+ -+ /** Event method that denotes the retrieval of a value in a list. -+ * -+ * <p>More details about this method can be found in this -+ * class' introduction.</p> -+ */ -+ void listGet() -+ { -+ transition(ScannerState.TRANSITION_LIST_GET); -+ -+ current.listGet(); -+ } -+ -+ /** Event method that denotes the null value. -+ */ -+ void nullObject() -+ { -+ transition(ScannerState.TRANSITION_NULL_OBJECT); -+ -+ current.nullObject(); -+ } -+ -+ /** Event method that denotes a string. -+ * -+ * @param string The string that should be written. -+ */ -+ void stringReference(String string) -+ { -+ transition(ScannerState.TRANSITION_STRING_REFERENCE); -+ -+ current.stringReference(string); -+ } -+ -+ /** Event method that denotes a reference to an existing object. -+ * -+ * @param id The ObjectId to be used. -+ */ -+ void objectReference(ObjectId id) -+ { -+ transition(ScannerState.TRANSITION_OBJECT_REFERENCE); -+ -+ current.objectReference(id); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/ScannerState.java classpath/gnu/java/beans/encoder/ScannerState.java ---- classpath.orig/gnu/java/beans/encoder/ScannerState.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/ScannerState.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,236 @@ -+/* ScannerState.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.util.HashMap; -+ -+/** <p>Provides the infrastructure for the state machine and the transition -+ * mechanism.</p> -+ * -+ * <p>Each states knows a set of successor. There can be one successor for -+ * every transition variant. Furthermore a state knows about a default -+ * successor which is taken when there is no special setup for a -+ * transition.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public abstract class ScannerState -+{ -+ -+ static final int TRANSITION_METHOD_INVOCATION = 0; -+ -+ static final int TRANSITION_STATIC_METHOD_INVOCATION = 1; -+ -+ static final int TRANSITION_STATIC_FIELD_ACCESS = 2; -+ -+ static final int TRANSITION_CLASS_RESOLUTION = 3; -+ -+ static final int TRANSITION_OBJECT_INSTANTIATION = 4; -+ -+ static final int TRANSITION_PRIMITIVE_INSTANTIATION = 5; -+ -+ static final int TRANSITION_OBJECT_ARRAY_INSTANTIATION = 6; -+ -+ static final int TRANSITION_PRIMITIVE_ARRAY_INSTANTIATION = 7; -+ -+ static final int TRANSITION_ARRAY_SET = 8; -+ -+ static final int TRANSITION_ARRAY_GET = 9; -+ -+ static final int TRANSITION_LIST_SET = 10; -+ -+ static final int TRANSITION_LIST_GET = 11; -+ -+ static final int TRANSITION_NULL_OBJECT = 12; -+ -+ static final int TRANSITION_STRING_REFERENCE = 13; -+ -+ static final int TRANSITION_OBJECT_REFERENCE = 14; -+ -+ static final int TRANSITION_FIRST = 0; -+ -+ static final int TRANSITION_LAST = 14; -+ -+ static final String DEFAULT_STATE_NAME = "default"; -+ -+ String defaultSuccessor = DEFAULT_STATE_NAME; -+ -+ static String[] transitionNames = { "METHOD_INVOCATION", "STATIC_METHOD_INVOCATION", -+ "STATIC_FIELD_ACCESS", "CLASS_RESOLUTION", -+ "OBJECT_INSTANTIATION", -+ "PRIMITIVE_INSTANTIATION", "OBJECT_ARRAY_INSTANTIATION", -+ "PRIMITIVE_ARRAY_INSTANTIATION", -+ "ARRAY_SET", "ARRAY_GET", "LIST_SET", "LIST_GET", -+ "NULL_OBJECT", "STRING_REFERENCE", "OBJECT_REFERENCE" }; -+ -+ /** -+ * Stores the transition setup as the relation -+ * transition->successor's state name. -+ */ -+ HashMap transitions = new HashMap(); -+ -+ int calls; -+ -+ Context context; -+ -+ String name; -+ -+ final void init(String newName) -+ { -+ assert (name == null); -+ -+ name = newName; -+ } -+ -+ final String getName() -+ { -+ return name; -+ } -+ -+ final void enter(Context ctx) -+ { -+ calls++; -+ context = ctx; -+ -+ enterImpl(ctx); -+ } -+ -+ protected void enterImpl(Context ctx) -+ { -+ } -+ -+ final Context context() -+ { -+ return context; -+ } -+ -+ final int getCalls() -+ { -+ return calls; -+ } -+ -+ /** -+ * <p>Stores a successor's state name for a certain transition.</p> -+ * -+ * <p>This method is only used at the configuration time of the state -+ * machine.</p> -+ * -+ * @param transition One of the transition constants. -+ * @param stateName The state name of the successor. -+ */ -+ final void putSuccessor(int transition, String stateName) -+ { -+ assert (transition >= TRANSITION_FIRST && transition <= TRANSITION_LAST) : -+ "Transition identifier '" + transition + "' is unknown."; -+ -+ transitions.put(new Integer(transition), stateName); -+ } -+ -+ /** <p>Retrieves a the state name of a successor for the given transition -+ * constant.</p> -+ * -+ * <p>Returns the default successor's state name if no special setup was -+ * prepared.</p> -+ * -+ * @param transition One of the transition constants. -+ * @return The state name of the successor. -+ */ -+ final String getSuccessor(int transition) -+ { -+ String state = (String) transitions.get(new Integer(transition)); -+ -+ return (state == null) ? defaultSuccessor : state; -+ } -+ -+ /** -+ * Sets the name for the default successor state. -+ * -+ * @param newDefaultSuccessor The default successor's state name. -+ */ -+ final void setDefaultSuccessor(String newDefaultSuccessor) -+ { -+ defaultSuccessor = newDefaultSuccessor; -+ } -+ -+ abstract void methodInvocation(String methodName); -+ -+ abstract void staticMethodInvocation(String className, String methodName); -+ -+ abstract void staticFieldAccess(String className, String fieldName); -+ -+ abstract void classResolution(String className); -+ -+ abstract void objectInstantiation(String className, ObjectId objectId); -+ -+ abstract void primitiveInstantiation(String primitiveName, -+ String valueAsString); -+ -+ abstract void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId); -+ -+ abstract void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId); -+ -+ abstract void arraySet(String indexAsString); -+ -+ abstract void arrayGet(String indexAsString); -+ -+ abstract void listGet(); -+ -+ abstract void listSet(); -+ -+ abstract void nullObject(); -+ -+ abstract void stringReference(String string); -+ -+ abstract void objectReference(ObjectId id); -+ -+ /** -+ * <p>A special event that does not provoke a direct transition.</p> -+ * -+ * <p>Instead the transition is done by the <code>ScanEngine</code>: It goes -+ * back to the previous state and just uses this method to inform the state -+ * about this happening.</p> -+ */ -+ abstract void end(); -+ -+ void enter() -+ { -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/StAXWriter.java classpath/gnu/java/beans/encoder/StAXWriter.java ---- classpath.orig/gnu/java/beans/encoder/StAXWriter.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/StAXWriter.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,233 @@ -+/* StAXWriter.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+import java.io.OutputStream; -+ -+import javax.xml.stream.XMLOutputFactory; -+import javax.xml.stream.XMLStreamException; -+import javax.xml.stream.XMLStreamWriter; -+ -+/** A {@link Writer} implementation based on the StAX API. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public class StAXWriter implements Writer -+{ -+ XMLStreamWriter writer; -+ -+ int indent = 0; -+ -+ public StAXWriter(OutputStream os) -+ { -+ try -+ { -+ XMLOutputFactory factory = XMLOutputFactory.newInstance(); -+ writer = factory.createXMLStreamWriter(os); -+ } -+ catch (XMLStreamException se) -+ { -+ throw (InternalError) -+ new InternalError( -+ "Could not instantiate a streaming XML writer.") -+ .initCause(se); -+ } -+ -+ } -+ -+ public void flush() -+ { -+ if (writer != null) -+ { -+ try -+ { -+ writer.flush(); -+ } -+ catch (XMLStreamException xse) -+ { -+ // TODO: find out -+ } -+ } -+ -+ } -+ -+ public void close() -+ { -+ if (writer != null) -+ { -+ try -+ { -+ writer.close(); -+ } -+ catch (XMLStreamException xse) -+ { -+ // TODO: find out -+ } -+ writer = null; -+ } -+ -+ } -+ -+ public void writePreamble() -+ { -+ try -+ { -+ writer.writeStartDocument("UTF-8", "1.0"); -+ } -+ catch (XMLStreamException xmlse) -+ { -+ -+ } -+ } -+ -+ public void writeEnd(boolean wasEmpty) -+ { -+ try -+ { -+ indent -= 2; -+ -+ if (wasEmpty) -+ return; -+ -+ for (int i = 0; i < indent; i++) -+ writer.writeCharacters(" "); -+ -+ writer.writeEndElement(); -+ -+ writer.writeCharacters("\n"); -+ } -+ catch (XMLStreamException xmlse) -+ { -+ -+ } -+ } -+ -+ public void writeEndNoChildren() -+ { -+ try -+ { -+ writer.writeEndElement(); -+ writer.writeCharacters("\n"); -+ } -+ catch (XMLStreamException xmlse) -+ { -+ -+ } -+ } -+ -+ public void write(String tagName, boolean empty) -+ { -+ write(tagName, null, null, null, empty); -+ } -+ -+ public void write(String tagName, String value) -+ { -+ write(tagName, value, null, null, value == null); -+ } -+ -+ public void writeNoChildren(String tagName, String value) -+ { -+ try -+ { -+ for (int i = 0; i < indent; i++) -+ writer.writeCharacters(" "); -+ -+ writer.writeStartElement(tagName); -+ -+ writer.writeCharacters(value); -+ } -+ catch (XMLStreamException xmlse) -+ { -+ -+ } -+ } -+ -+ public void write(String tagName, String attributeName, -+ String attributeValue, boolean empty) -+ { -+ write(tagName, null, new String[] { attributeName }, -+ new String[] { attributeValue }, empty); -+ } -+ -+ public void write(String tagName, String value, String[] attributeNames, -+ String[] attributeValues, boolean empty) -+ { -+ try -+ { -+ for (int i = 0; i < indent; i++) -+ -+ writer.writeCharacters(" "); -+ -+ if (empty) -+ writer.writeEmptyElement(tagName); -+ else -+ writer.writeStartElement(tagName); -+ -+ if (attributeNames != null) -+ for (int i = 0; i < attributeNames.length; i++) -+ writer.writeAttribute(attributeNames[i], attributeValues[i]); -+ -+ writer.writeCharacters("\n"); -+ -+ indent += 2; -+ -+ if (value != null) -+ { -+ for (int i = 0; i < indent; i++) -+ writer.writeCharacters(" "); -+ -+ writer.writeCharacters(value); -+ -+ writer.writeCharacters("\n"); -+ } -+ } -+ catch (XMLStreamException xmlse) -+ { -+ -+ } -+ } -+ -+ public void write(String tagName, String[] attributeNames, -+ String[] attributeValues, boolean empty) -+ { -+ write(tagName, null, attributeNames, attributeValues, empty); -+ } -+ -+} -diff -Nur classpath.orig/gnu/java/beans/encoder/Writer.java classpath/gnu/java/beans/encoder/Writer.java ---- classpath.orig/gnu/java/beans/encoder/Writer.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/gnu/java/beans/encoder/Writer.java 2006-01-08 20:31:37.000000000 +0100 -@@ -0,0 +1,174 @@ -+/* Writer.java -- Writing interface for XML persistence. -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package gnu.java.beans.encoder; -+ -+/** A <code>Writer</code> represents a simplified interface to an XML -+ * writer that is used for the XML persistence mechanism. -+ * -+ * <p>Its sole purpose is to allow multiple backends which may remove -+ * the need to have certain APIs in the classpath. Eg. it is possible -+ * to write a stripped down XML Writer that does not rely on SAX, StAX -+ * or DOM APIs.</p> -+ * -+ * <p>The caller may assume that every action is done immediately. However -+ * it is possible that the underlying implementation uses buffering streams. -+ * To make sure the data is written call the {@link flush} method.</p> -+ * -+ * <p>The <code>Writer</code> implementation should care about the formatting -+ * of the XML stream making it possible to generate three types of formats using -+ * a special method invocation chain.</p> -+ * -+ * <p>Write -+ * <code> -+ * <element/> -+ * </code> -+ * by issuing <code>write("element", true)</code> (or any of the other -+ * write-variants that allows specifying the <code>isEmpty</code> argument) -+ * and <code>writeEnd(true)</code>.</p> -+ * -+ * <p>Write -+ * <code> -+ * <element>body</element> -+ * </code> -+ * by issuing <code>writeNoChildren("element", "body")</code> and <code>writeNoChildrenEnd()</code>.</p> -+ * -+ * <p> -+ * Write -+ * <code> -+ * <element> -+ * <child1/> -+ * <child2/> -+ * ... -+ * <element/> -+ * </code> -+ * by issuing <code>write("element", false)</code> (or any of the other -+ * write-variants that allows specifying the <code>isEmpty</code> argument) -+ * and <code>writeEnd(false)</code>.</p> -+ * -+ * <p>Note: It is important that the values of <code>isEmpty</code> and -+ * <code>wasEmpty</code> match. Otherwise strange things might happen to -+ * the layout.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * -+ */ -+public interface Writer -+{ -+ // TODO: This interface's design is not the best. Feel free to -+ // improve it as you like. -+ -+ /** Writes the XML preamble. */ -+ void writePreamble(); -+ -+ /** Writes the end of an XML tag. -+ * -+ * <p>If your tag has not generated any body text or child -+ * elements provide <code>true</code> as the argument to generate -+ * more space efficient variant of the tag.>/p> -+ * -+ * @param wasEmpty Whether the tag was empty or not. -+ */ -+ void writeEnd(boolean wasEmpty); -+ -+ /** Writes an XML tag without any attributes. -+ * -+ * @param tagName The name of the tag to write. -+ * @param empty Whether the element has child elements. -+ */ -+ void write(String tagName, boolean empty); -+ -+ /** Writes an XML tag with one attribute name and value. -+ * -+ * @param tagName The name of the tag to write. -+ * @param attributeName The name of attribute. -+ * @param attributeValue The attribute's value. -+ * @param empty Whether the element has child elements. -+ */ -+ void write(String tagName, String attributeName, String attributeValue, boolean empty); -+ -+ /** Writes an XML tag with multiple attributes and a body text. -+ * -+ * @param tagName The name of the tag to write. -+ * @param value The element's body content. -+ * @param attributeNames A set of attribute names. -+ * @param attributeValues A set of attribute values. -+ * @param empty Whether the element has child elements. -+ */ -+ void write(String tagName, String value, String[] attributeNames, -+ String[] attributeValues, boolean empty); -+ -+ /** Writes an XML tag with multiple attributes without a body text. -+ * -+ * @param tagName The name of the tag to write. -+ * @param attributeNames A set of attribute names. -+ * @param attributeValues A set of attribute values. -+ * @param empty Whether the element has child elements. -+ */ -+ void write(String tagName, String[] attributeNames, String[] attributeValues, boolean empty); -+ -+ /** Writes an XML tag with no attributes but with a body text -+ * that may have child elements. -+ * -+ * @param tagName The name of the tag to write. -+ * @param value The element's body content. -+ */ -+ void write(String tagName, String value); -+ -+ /** Writes an XML tag with no attributes but with a body text -+ * that does not have child elements. -+ * -+ * @param tagName The name of the tag to write. -+ * @param value The element's body content. -+ */ -+ void writeNoChildren(String tagName, String value); -+ -+ /** Writes the end of an XML tag that has no child elements. -+ * -+ * <p>Must be used in combination with {@link writeNoChildren} only.</p> -+ */ -+ void writeEndNoChildren(); -+ -+ /** Forces the implementation to write some data. -+ */ -+ void flush(); -+ -+ /** Closes the writer. -+ */ -+ void close(); -+} -diff -Nur classpath.orig/java/beans/DefaultPersistenceDelegate.java classpath/java/beans/DefaultPersistenceDelegate.java ---- classpath.orig/java/beans/DefaultPersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/java/beans/DefaultPersistenceDelegate.java 2006-01-24 17:57:57.000000000 +0100 -@@ -0,0 +1,211 @@ -+/* DefaultPersistenceDelegate.java -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package java.beans; -+ -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+ -+/** <p><code>DefaultPersistenceDelegate</code> is a {@link PersistenceDelegate} -+ * implementation that can be used to serialize objects which adhere to the -+ * Java Beans naming convention.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * @since 1.4 -+ */ -+public class DefaultPersistenceDelegate extends PersistenceDelegate -+{ -+ -+ private String[] constructorPropertyNames; -+ -+ /** Using this constructor the object to be serialized will be instantiated -+ * with the default non-argument constructor. -+ */ -+ public DefaultPersistenceDelegate() -+ { -+ } -+ -+ /** This constructor allows to specify which Bean properties appear -+ * in the constructor. -+ * -+ * <p>The implementation reads the mentioned properties from the Bean -+ * instance and applies it in the given order to a corresponding -+ * constructor.</p> -+ * -+ * @param constructorPropertyNames The properties the Bean's constructor -+ * should be given to. -+ */ -+ public DefaultPersistenceDelegate(String[] constructorPropertyNames) -+ { -+ this.constructorPropertyNames = constructorPropertyNames; -+ } -+ -+ protected boolean mutatesTo(Object oldInstance, Object newInstance) -+ { -+ try -+ { -+ -+ return (constructorPropertyNames != null -+ && constructorPropertyNames.length > 0 -+ && oldInstance.getClass() -+ .getDeclaredMethod("equals", -+ new Class[] { Object.class }) != null) -+ ? oldInstance.equals(newInstance) -+ : super.mutatesTo(oldInstance, newInstance); -+ } -+ catch (NoSuchMethodException nsme) -+ { -+ return super.mutatesTo(oldInstance, newInstance); -+ } -+ } -+ -+ protected Expression instantiate(Object oldInstance, Encoder out) -+ { -+ Object[] args = null; -+ -+ try -+ { -+ // If there are property names in the array, then we create -+ // a corresponding argument array and store every -+ // argument in it. To retrieve an argument object we have -+ // dig up the right property in the bean class' BeanInfo -+ // object. -+ // This is so costly in terms of execution time I better -+ // not think twice about it ... -+ if (constructorPropertyNames != null) -+ { -+ args = new Object[constructorPropertyNames.length]; -+ -+ // Look up the properties of oldInstance's class to find matches for -+ // the -+ // names given in the constructor. -+ PropertyDescriptor[] propertyDescs = Introspector.getBeanInfo( -+ oldInstance.getClass()).getPropertyDescriptors(); -+ -+ for (int i = 0; i < constructorPropertyNames.length; i++) -+ { -+ // Scan the property descriptions for a matching name. -+ for (int j = 0; j < propertyDescs.length; j++) -+ { -+ if (propertyDescs[i].getName().equals( -+ constructorPropertyNames[i])) -+ { -+ Method readMethod = propertyDescs[i].getReadMethod(); -+ -+ args[i] = readMethod.invoke(oldInstance, null); -+ } -+ } -+ } -+ } -+ -+ } -+ catch (IllegalAccessException iae) -+ { -+ out.getExceptionListener().exceptionThrown(iae); -+ } -+ catch (IllegalArgumentException iarge) -+ { -+ out.getExceptionListener().exceptionThrown(iarge); -+ } -+ catch (InvocationTargetException ite) -+ { -+ out.getExceptionListener().exceptionThrown(ite); -+ } -+ catch (IntrospectionException ie) -+ { -+ out.getExceptionListener().exceptionThrown(ie); -+ } -+ -+ return new Expression(oldInstance, oldInstance.getClass(), "new", args); -+ } -+ -+ protected void initialize(Class type, Object oldInstance, Object newInstance, -+ Encoder out) -+ { -+ // Calling the supertype's implementation of initialize makes it -+ // possible that descendants of classes like AbstractHashMap -+ // or Hashtable are serialized correctly. This mechanism grounds on -+ // two other facts: -+ // * Each class which has not registered a special purpose -+ // PersistenceDelegate is handled by a DefaultPersistenceDelegate -+ // instance. -+ // * PersistenceDelegate.initialize() is implemented in a way that it -+ // calls the initialize method of the superclass' persistence delegate. -+ super.initialize(type, oldInstance, newInstance, out); -+ -+ // Suppresses the writing of property setting statements when this delegate -+ // is not used for the exact instance type. By doing so the following code -+ // is called only once per object. -+ if (type != oldInstance.getClass()) -+ return; -+ -+ try -+ { -+ PropertyDescriptor[] propertyDescs = Introspector.getBeanInfo( -+ oldInstance.getClass()).getPropertyDescriptors(); -+ -+ for (int i = 0; i < propertyDescs.length; i++) -+ { -+ Method readMethod = propertyDescs[i].getReadMethod(); -+ Method writeMethod = propertyDescs[i].getWriteMethod(); -+ -+ if (readMethod != null && writeMethod != null) -+ { -+ Object oldValue = readMethod.invoke(oldInstance, null); -+ -+ if (oldValue != null) -+ out.writeStatement(new Statement(oldInstance, -+ writeMethod.getName(), -+ new Object[] { oldValue })); -+ } -+ } -+ } -+ catch (IntrospectionException ie) -+ { -+ out.getExceptionListener().exceptionThrown(ie); -+ } -+ catch (IllegalAccessException iae) -+ { -+ out.getExceptionListener().exceptionThrown(iae); -+ } -+ catch (InvocationTargetException ite) -+ { -+ out.getExceptionListener().exceptionThrown(ite); -+ } -+ } -+} -diff -Nur classpath.orig/java/beans/Encoder.java classpath/java/beans/Encoder.java ---- classpath.orig/java/beans/Encoder.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/java/beans/Encoder.java 2006-01-29 20:11:29.000000000 +0100 -@@ -0,0 +1,432 @@ -+/* Encoder.java -+ Copyright (C) 2005, 2006 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package java.beans; -+ -+import gnu.java.beans.DefaultExceptionListener; -+import gnu.java.beans.encoder.ArrayPersistenceDelegate; -+import gnu.java.beans.encoder.ClassPersistenceDelegate; -+import gnu.java.beans.encoder.CollectionPersistenceDelegate; -+import gnu.java.beans.encoder.MapPersistenceDelegate; -+import gnu.java.beans.encoder.PrimitivePersistenceDelegate; -+ -+import java.util.AbstractCollection; -+import java.util.HashMap; -+import java.util.IdentityHashMap; -+ -+/** -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * @since 1.4 -+ */ -+public class Encoder -+{ -+ -+ /** -+ * An internal DefaultPersistenceDelegate instance that is used for every -+ * class that does not a have a special special PersistenceDelegate. -+ */ -+ private static PersistenceDelegate defaultPersistenceDelegate; -+ -+ private static PersistenceDelegate fakePersistenceDelegate; -+ -+ /** -+ * Stores the relation Class->PersistenceDelegate. -+ */ -+ private static HashMap delegates = new HashMap(); -+ -+ /** -+ * Stores the relation oldInstance->newInstance -+ */ -+ private IdentityHashMap candidates = new IdentityHashMap(); -+ -+ private ExceptionListener exceptionListener; -+ -+ /** -+ * A simple number that is used to restrict the access to writeExpression and -+ * writeStatement. The rule is that both methods should only be used when an -+ * object is written to the stream (= writeObject). Therefore accessCounter is -+ * incremented just before the call to writeObject and decremented afterwards. -+ * Then writeStatement and writeExpression allow execution only if -+ * accessCounter is bigger than zero. -+ */ -+ private int accessCounter = 0; -+ -+ public Encoder() -+ { -+ setupDefaultPersistenceDelegates(); -+ -+ setExceptionListener(null); -+ } -+ -+ /** -+ * Sets up a bunch of {@link PersistenceDelegate} instances which are needed -+ * for the basic working of a {@link Encoder}s. -+ */ -+ private static void setupDefaultPersistenceDelegates() -+ { -+ synchronized (delegates) -+ { -+ if (defaultPersistenceDelegate != null) -+ return; -+ -+ delegates.put(Class.class, new ClassPersistenceDelegate()); -+ -+ PersistenceDelegate pd = new PrimitivePersistenceDelegate(); -+ delegates.put(Boolean.class, pd); -+ delegates.put(Byte.class, pd); -+ delegates.put(Short.class, pd); -+ delegates.put(Integer.class, pd); -+ delegates.put(Long.class, pd); -+ delegates.put(Float.class, pd); -+ delegates.put(Double.class, pd); -+ -+ delegates.put(Object[].class, new ArrayPersistenceDelegate()); -+ -+ pd = new CollectionPersistenceDelegate(); -+ delegates.put(AbstractCollection.class, pd); -+ -+ pd = new MapPersistenceDelegate(); -+ delegates.put(java.util.AbstractMap.class, pd); -+ delegates.put(java.util.Hashtable.class, pd); -+ -+ defaultPersistenceDelegate = new DefaultPersistenceDelegate(); -+ delegates.put(Object.class, defaultPersistenceDelegate); -+ -+ // Creates a PersistenceDelegate implementation which is -+ // returned for 'null'. In practice this instance is -+ // not used in any way and is just here to be compatible -+ // with the reference implementation which returns a -+ // similar instance when calling getPersistenceDelegate(null) . -+ fakePersistenceDelegate = new PersistenceDelegate() -+ { -+ protected Expression instantiate(Object o, Encoder e) -+ { -+ return null; -+ } -+ }; -+ -+ } -+ } -+ -+ protected void writeObject(Object o) -+ { -+ // 'null' has no PersistenceDelegate and will not -+ // create an Expression which has to be cloned. -+ // However subclasses should be aware that writeObject -+ // may be called with a 'null' argument and should -+ // write the proper representation of it. -+ if (o == null) -+ return; -+ -+ PersistenceDelegate pd = getPersistenceDelegate(o.getClass()); -+ -+ accessCounter++; -+ pd.writeObject(o, this); -+ accessCounter--; -+ -+ } -+ -+ /** -+ * Sets the {@link ExceptionListener} instance to be used for reporting -+ * recorable exceptions in the instantiation and initialization sequence. If -+ * the argument is <code>null</code> a default instance will be used that -+ * prints the thrown exception to <code>System.err</code>. -+ */ -+ public void setExceptionListener(ExceptionListener listener) -+ { -+ exceptionListener = (listener != null) -+ ? listener : DefaultExceptionListener.INSTANCE; -+ } -+ -+ /** -+ * Returns the currently active {@link ExceptionListener} instance. -+ */ -+ public ExceptionListener getExceptionListener() -+ { -+ return exceptionListener; -+ } -+ -+ public PersistenceDelegate getPersistenceDelegate(Class type) -+ { -+ // This is not specified but the JDK behaves like this. -+ if (type == null) -+ return fakePersistenceDelegate; -+ -+ // Treats all array classes in the same way and assigns -+ // them a shared PersistenceDelegate implementation tailored -+ // for array instantation and initialization. -+ if (type.isArray()) -+ return (PersistenceDelegate) delegates.get(Object[].class); -+ -+ PersistenceDelegate pd = (PersistenceDelegate) delegates.get(type); -+ -+ return (pd != null) ? pd : (PersistenceDelegate) defaultPersistenceDelegate; -+ } -+ -+ /** -+ * Sets the {@link PersistenceDelegate} instance for the given class. -+ * <p> -+ * Note: Throws a <code>NullPointerException</code> if the argument is -+ * <code>null</code>. -+ * </p> -+ * <p> -+ * Note: Silently ignores PersistenceDelegates for Array types and primitive -+ * wrapper classes. -+ * </p> -+ * <p> -+ * Note: Although this method is not declared <code>static</code> changes to -+ * the {@link PersistenceDelegate}s affect <strong>all</strong> -+ * {@link Encoder} instances. <strong>In this implementation</strong> the -+ * access is thread safe. -+ * </p> -+ */ -+ public void setPersistenceDelegate(Class type, PersistenceDelegate delegate) -+ { -+ // If the argument is null this will cause a NullPointerException -+ // which is expected behavior. -+ -+ // This makes custom PDs for array, primitive types and their wrappers -+ // impossible but this is how the JDK behaves. -+ if (type.isArray() || type.isPrimitive() || type == Boolean.class -+ || type == Byte.class || type == Short.class || type == Integer.class -+ || type == Long.class || type == Float.class || type == Double.class) -+ return; -+ -+ synchronized (delegates) -+ { -+ delegates.put(type, delegate); -+ } -+ -+ } -+ -+ public Object remove(Object oldInstance) -+ { -+ return candidates.remove(oldInstance); -+ } -+ -+ /** -+ * Returns the replacement object which has been created by the encoder during -+ * the instantiation sequence or <code>null</code> if the object has not -+ * been processed yet. -+ * <p> -+ * Note: The <code>String</code> class acts as an endpoint for the -+ * inherently recursive algorithm of the {@link Encoder}. Therefore instances -+ * of <code>String</code> will always be returned by this method. In other -+ * words the assertion: <code> -+ * assert (anyEncoder.get(anyString) == anyString) -+ * </code< -+ * will always hold.</p> -+ * -+ * <p>Note: If <code>null</code> is requested, the result will -+ * always be <code>null</code>.</p> -+ */ -+ public Object get(Object oldInstance) -+ { -+ // String instances are handled in a special way. -+ // No one knows why this is not officially specified -+ // because this is a rather important design decision. -+ return (oldInstance == null) ? null : -+ (oldInstance.getClass() == String.class) ? -+ oldInstance : candidates.get(oldInstance); -+ } -+ -+ /** -+ * <p> -+ * Note: If you call this method not from within an object instantiation and -+ * initialization sequence it will be silently ignored. -+ * </p> -+ */ -+ public void writeStatement(Statement stmt) -+ { -+ // Silently ignore out of bounds calls. -+ if (accessCounter <= 0) -+ return; -+ -+ Object target = stmt.getTarget(); -+ -+ Object newTarget = get(target); -+ if (newTarget == null) -+ { -+ writeObject(target); -+ newTarget = get(target); -+ } -+ -+ Object[] args = stmt.getArguments(); -+ Object[] newArgs = new Object[args.length]; -+ -+ for (int i = 0; i < args.length; i++) -+ { -+ newArgs[i] = get(args[i]); -+ if (newArgs[i] == null || isImmutableType(args[i].getClass())) -+ { -+ writeObject(args[i]); -+ newArgs[i] = get(args[i]); -+ } -+ } -+ -+ Statement newStmt = new Statement(newTarget, stmt.getMethodName(), newArgs); -+ -+ try -+ { -+ newStmt.execute(); -+ } -+ catch (Exception e) -+ { -+ exceptionListener.exceptionThrown(e); -+ } -+ -+ } -+ -+ /** -+ * <p> -+ * Note: If you call this method not from within an object instantiation and -+ * initialization sequence it will be silently ignored. -+ * </p> -+ */ -+ public void writeExpression(Expression expr) -+ { -+ // Silently ignore out of bounds calls. -+ if (accessCounter <= 0) -+ return; -+ -+ Object target = expr.getTarget(); -+ Object value = null; -+ Object newValue = null; -+ -+ try -+ { -+ value = expr.getValue(); -+ } -+ catch (Exception e) -+ { -+ exceptionListener.exceptionThrown(e); -+ return; -+ } -+ -+ -+ newValue = get(value); -+ -+ if (newValue == null) -+ { -+ Object newTarget = get(target); -+ if (newTarget == null) -+ { -+ writeObject(target); -+ newTarget = get(target); -+ -+ // May happen if exception was thrown. -+ if (newTarget == null) -+ { -+ return; -+ } -+ } -+ -+ Object[] args = expr.getArguments(); -+ Object[] newArgs = new Object[args.length]; -+ -+ for (int i = 0; i < args.length; i++) -+ { -+ newArgs[i] = get(args[i]); -+ if (newArgs[i] == null || isImmutableType(args[i].getClass())) -+ { -+ writeObject(args[i]); -+ newArgs[i] = get(args[i]); -+ } -+ } -+ -+ Expression newExpr = new Expression(newTarget, expr.getMethodName(), -+ newArgs); -+ -+ // Fakes the result of Class.forName(<primitiveType>) to make it possible -+ // to hand such a type to the encoding process. -+ if (value instanceof Class && ((Class) value).isPrimitive()) -+ newExpr.setValue(value); -+ -+ // Instantiates the new object. -+ try -+ { -+ newValue = newExpr.getValue(); -+ -+ candidates.put(value, newValue); -+ } -+ catch (Exception e) -+ { -+ exceptionListener.exceptionThrown(e); -+ -+ return; -+ } -+ -+ writeObject(value); -+ -+ } -+ else if(value.getClass() == String.class || value.getClass() == Class.class) -+ { -+ writeObject(value); -+ } -+ -+ } -+ -+ /** Returns whether the given class is an immutable -+ * type which has to be handled differently when serializing it. -+ * -+ * <p>Immutable objects always have to be instantiated instead of -+ * modifying an existing instance.</p> -+ * -+ * @param type The class to test. -+ * @return Whether the first argument is an immutable type. -+ */ -+ boolean isImmutableType(Class type) -+ { -+ return type == String.class || type == Class.class -+ || type == Integer.class || type == Boolean.class -+ || type == Byte.class || type == Short.class -+ || type == Long.class || type == Float.class -+ || type == Double.class; -+ } -+ -+ /** Sets the stream candidate for a given object. -+ * -+ * @param oldObject The object given to the encoder. -+ * @param newObject The object the encoder generated. -+ */ -+ void putCandidate(Object oldObject, Object newObject) -+ { -+ candidates.put(oldObject, newObject); -+ } -+ -+} -diff -Nur classpath.orig/java/beans/Expression.java classpath/java/beans/Expression.java ---- classpath.orig/java/beans/Expression.java 2005-09-23 23:31:04.000000000 +0200 -+++ classpath/java/beans/Expression.java 2006-03-05 23:58:22.000000000 +0100 -@@ -35,16 +35,19 @@ - obligated to do so. If you do not wish to do so, delete this - exception statement from your version. */ - -- - package java.beans; - - /** -- * class Expression -- * -- * An Expression captures the execution of an object method that -- * returns a value. It stores an object, the method to call, and the -- * arguments to pass to the method. -- * -+ * <p>An Expression captures the execution of an object method -+ * that returns a value.</p> -+ * -+ * <p>It stores an object, the method to call, and the arguments to pass to -+ * the method.</p> -+ * -+ * <p>While this class can generally be used to describe method calls it is -+ * part of the XML serialization API.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) - * @since 1.4 - */ - public class Expression extends Statement -@@ -53,38 +56,40 @@ - // yet; - private static final Object UNSET = new Object(); - -- // The value to return. This is equal to unset until getValue is called. -+ // The value to return. This is equal to unset until getValue is called. - private Object value; -- - - /** -- * Constructor -- * -- * Constructs an Expression representing the invocation of -- * object.methodName(arg[0], arg[1], ...); However, it will never -- * be executed. Instead, value will always be returned. -- * -- * @param value The value to return. -- * @param target The object to invoke the method on. -- * @param methodName The object method to invoke. -- * @param arguments An array of arguments to pass to the method. -+ * Constructor Constructs an Expression representing the invocation of -+ * object.methodName(arg[0], arg[1], ...); However, it will never be executed. -+ * Instead, value will always be returned. -+ * -+ * @param value -+ * The value to return. -+ * @param target -+ * The object to invoke the method on. -+ * @param methodName -+ * The object method to invoke. -+ * @param arguments -+ * An array of arguments to pass to the method. - */ - public Expression(Object value, Object target, String methodName, -- Object[] arguments) -+ Object[] arguments) - { - super(target, methodName, arguments); - this.value = value; - } - - /** -- * Constructor -- * -- * Constructs an Expression representing the invocation of -+ * Constructor Constructs an Expression representing the invocation of - * object.methodName(arg[0], arg[1], ...); -- * -- * @param target The object to invoke the method on. -- * @param methodName The object method to invoke. -- * @param arguments An array of arguments to pass to the method. -+ * -+ * @param target -+ * The object to invoke the method on. -+ * @param methodName -+ * The object method to invoke. -+ * @param arguments -+ * An array of arguments to pass to the method. - */ - public Expression(Object target, String methodName, Object[] arguments) - { -@@ -93,15 +98,14 @@ - } - - /** -- * Return the result of executing the method. -- * -- * If the cached value has not yet been set, the method is -- * executed in the same way as Statement.execute(), except that -- * the value is cached, and then returned. If the value has been -+ * Return the result of executing the method. If the cached value has not yet -+ * been set, the method is executed in the same way as Statement.execute(), -+ * except that the value is cached, and then returned. If the value has been - * set, it is returned without executing the method again. -- * -+ * - * @return the result of executing the method. -- * @exception Exception if an error occurs -+ * @exception Exception -+ * if an error occurs - */ - public Object getValue() throws Exception - { -@@ -112,14 +116,15 @@ - - /** - * Set the cached value to be returned by getValue() -- * -- * @param value the value to cache and return. -+ * -+ * @param value -+ * the value to cache and return. - */ - public void setValue(Object value) - { - this.value = value; - } -- -+ - /** - * Return a string representation of this expression. - */ -@@ -127,7 +132,7 @@ - { - String result = super.toString(); - if (value != UNSET) -- return value.getClass().getName() + " " + result; -+ return value.getClass().getName() + "=" + result; - return result; - } - } -diff -Nur classpath.orig/java/beans/PersistenceDelegate.java classpath/java/beans/PersistenceDelegate.java ---- classpath.orig/java/beans/PersistenceDelegate.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/java/beans/PersistenceDelegate.java 2006-01-24 17:57:57.000000000 +0100 -@@ -0,0 +1,90 @@ -+/* java.beans.PersistenceDelegate -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ -+This file is part of GNU Classpath. -+ -+GNU Classpath is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU Classpath is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU Classpath; see the file COPYING. If not, write to the -+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+02110-1301 USA. -+ -+Linking this library statically or dynamically with other modules is -+making a combined work based on this library. Thus, the terms and -+conditions of the GNU General Public License cover the whole -+combination. -+ -+As a special exception, the copyright holders of this library give you -+permission to link this library with independent modules to produce an -+executable, regardless of the license terms of these independent -+modules, and to copy and distribute the resulting executable under -+terms of your choice, provided that you also meet, for each linked -+independent module, the terms and conditions of the license of that -+module. An independent module is a module which is not derived from -+or based on this library. If you modify this library, you may extend -+this exception to your version of the library, but you are not -+obligated to do so. If you do not wish to do so, delete this -+exception statement from your version. */ -+ -+package java.beans; -+ -+/** <p>A <code>PersistenceDelegate</code> describes how a another object -+ * has to constructed and transformed in order to create a complete -+ * replicate.</p> -+ * -+ * <p>For custom classes you will need to implement -+ * <code>PersistenceDelegate</code> in a way that is suitable for them. -+ * To make use of the implementation you have to register it with an -+ * {@link Encoder} using the {Encoder#setPersistenceDelegate} method.</p> -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * @since 1.4 -+ */ -+public abstract class PersistenceDelegate -+{ -+ -+ protected void initialize(Class type, Object oldInstance, Object newInstance, -+ Encoder out) -+ { -+ if (type != Object.class) -+ { -+ type = type.getSuperclass(); -+ -+ PersistenceDelegate pd = out.getPersistenceDelegate(type); -+ -+ pd.initialize(type, oldInstance, newInstance, out); -+ } -+ } -+ -+ public void writeObject(Object oldInstance, Encoder out) -+ { -+ Object streamCandidate = out.get(oldInstance); -+ -+ if (mutatesTo(oldInstance, streamCandidate)) -+ { -+ initialize(oldInstance.getClass(), oldInstance, streamCandidate, out); -+ } -+ else -+ { -+ out.remove(oldInstance); -+ out.writeExpression(instantiate(oldInstance, out)); -+ } -+ } -+ -+ protected boolean mutatesTo(Object oldInstance, Object newInstance) -+ { -+ return (newInstance != null) -+ && oldInstance.getClass() == newInstance.getClass(); -+ } -+ -+ protected abstract Expression instantiate(Object oldInstance, Encoder out); -+} -diff -Nur classpath.orig/java/beans/Statement.java classpath/java/beans/Statement.java ---- classpath.orig/java/beans/Statement.java 2005-09-23 23:31:04.000000000 +0200 -+++ classpath/java/beans/Statement.java 2006-03-05 23:58:32.000000000 +0100 -@@ -1,4 +1,4 @@ --/* java.beans.Statement -+/* Statement.java - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - - This file is part of GNU Classpath. -@@ -42,32 +42,26 @@ - import java.lang.reflect.Constructor; - import java.lang.reflect.Method; - --import java.util.HashMap; --import java.util.WeakHashMap; -- - /** -- * class Statement -- * -- * A Statement captures the execution of an object method. It stores -+ * <p>A Statement captures the execution of an object method. It stores - * the object, the method to call, and the arguments to the method and - * provides the ability to execute the method on the object, using the -- * provided arguments. -+ * provided arguments.</p> - * -+ * @author Jerry Quinn (jlquinn@optonline.net) -+ * @author Robert Schuster (robertschuster@fsfe.org) - * @since 1.4 - */ - public class Statement - { -- /** Nested map for the relation between a class, its instances and their -- * names. -- */ -- private static HashMap classMaps = new HashMap(); -- - private Object target; - private String methodName; - private Object[] arguments; - -- // One or the other of these will get a value after execute is -- // called once, but not both. -+ /** -+ * One or the other of these will get a value after execute is -+ * called once, but not both. -+ */ - private transient Method method; - private transient Constructor ctor; - -@@ -87,76 +81,44 @@ - this.target = target; - this.methodName = methodName; - this.arguments = (arguments != null) ? arguments : new Object[0]; -- storeTargetName(target); -- } -- -- /** Creates a name for the target instance or does nothing if the object's -- * name is already known. This makes sure that there *is* a name for every -- * target instance. -- */ -- private static synchronized void storeTargetName(Object obj) -- { -- Class klass = obj.getClass(); -- WeakHashMap names = (WeakHashMap) classMaps.get(klass); -- -- if ( names == null ) -- { -- names = new WeakHashMap(); -- -- names.put(obj, -- ( klass == String.class ? ("\"" + obj + "\"") : -- (klass.getName() + names.size()) )); -- -- classMaps.put(klass, names); -- -- return; -- } -- -- String targetName = (String) names.get(obj); -- if ( targetName == null ) -- { -- names.put(obj, -- ( klass == String.class ? ("\"" + obj + "\"") : -- (klass.getName() + names.size()) )); -- } -- -- // Nothing to do. The given object was already stored. - } - - /** - * Execute the statement. - * -- * Finds the specified method in the target object and calls it with -- * the arguments given in the constructor. -+ * <p>Finds the specified method in the target object and calls it with -+ * the arguments given in the constructor.</p> - * -- * The most specific method according to the JLS(15.11) is used when -- * there are multiple methods with the same name. -+ * <p>The most specific method according to the JLS(15.11) is used when -+ * there are multiple methods with the same name.</p> - * -- * Execute performs some special handling for methods and -+ * <p>Execute performs some special handling for methods and - * parameters: -+ * <ul> -+ * <li>Static methods can be executed by providing the class as a -+ * target.</li> - * -- * Static methods can be executed by providing the class as a -- * target. -- * -- * The method name new is reserved to call the constructor -+ * <li>The method name new is reserved to call the constructor - * new() will construct an object and return it. Not useful unless -- * an expression :-) -+ * an expression :-)</li> - * -- * If the target is an array, get and set as defined in -+ * <li>If the target is an array, get and set as defined in - * java.util.List are recognized as valid methods and mapped to the -- * methods of the same name in java.lang.reflect.Array. -+ * methods of the same name in java.lang.reflect.Array.</li> - * -- * The native datatype wrappers Boolean, Byte, Character, Double, -+ * <li>The native datatype wrappers Boolean, Byte, Character, Double, - * Float, Integer, Long, and Short will map to methods that have - * native datatypes as parameters, in the same way as Method.invoke. - * However, these wrappers also select methods that actually take -- * the wrapper type as an argument. -+ * the wrapper type as an argument.</li> -+ * </ul> -+ * </p> - * -- * The Sun spec doesn't deal with overloading between int and -+ * <p>The Sun spec doesn't deal with overloading between int and - * Integer carefully. If there are two methods, one that takes an - * Integer and the other taking an int, the method chosen is not - * specified, and can depend on the order in which the methods are -- * declared in the source file. -+ * declared in the source file.</p> - * - * @throws Exception if an exception occurs while locating or - * invoking the method. -@@ -178,8 +140,10 @@ - Integer.TYPE, Long.TYPE, Short.TYPE - }; - -- // Given a wrapper class, return the native class for it. For -- // example, if c is Integer, Integer.TYPE is returned. -+ /** Given a wrapper class, return the native class for it. -+ * <p>For example, if <code>c</code> is <code>Integer</code>, -+ * <code>Integer.TYPE</code> is returned.</p> -+ */ - private Class unwrap(Class c) - { - for (int i = 0; i < wrappers.length; i++) -@@ -188,13 +152,22 @@ - return null; - } - -- // Return true if all args can be assigned to params, false -- // otherwise. Arrays are guaranteed to be the same length. -+ /** Returns <code>true</code> if all args can be assigned to -+ * <code>params</code>, <code>false</code> otherwise. -+ * -+ * <p>Arrays are guaranteed to be the same length.</p> -+ */ - private boolean compatible(Class[] params, Class[] args) - { - for (int i = 0; i < params.length; i++) - { -- // Treat Integer like int if appropriate -+ // Argument types are derived from argument values. If one of them was -+ // null then we cannot deduce its type. However null can be assigned to -+ // any type. -+ if (args[i] == null) -+ continue; -+ -+ // Treat Integer like int if appropriate - Class nativeType = unwrap(args[i]); - if (nativeType != null && params[i].isPrimitive() - && params[i].isAssignableFrom(nativeType)) -@@ -208,14 +181,15 @@ - } - - /** -- * Return true if the method arguments in first are more specific -- * than the method arguments in second, i.e. all args in first can -- * be assigned to those in second. -+ * Returns <code>true</code> if the method arguments in first are -+ * more specific than the method arguments in second, i.e. all -+ * arguments in <code>first</code> can be assigned to those in -+ * <code>second</code>. - * -- * A method is more specific if all parameters can also be fed to -+ * <p>A method is more specific if all parameters can also be fed to - * the less specific method, because, e.g. the less specific method - * accepts a base class of the equivalent argument for the more -- * specific one. -+ * specific one.</p> - * - * @param first a <code>Class[]</code> value - * @param second a <code>Class[]</code> value -@@ -238,8 +212,11 @@ - ? (Class) target : target.getClass(); - Object args[] = (arguments == null) ? new Object[0] : arguments; - Class argTypes[] = new Class[args.length]; -+ -+ // Retrieve type or use null if the argument is null. The null argument -+ // type is later used in compatible(). - for (int i = 0; i < args.length; i++) -- argTypes[i] = args[i].getClass(); -+ argTypes[i] = (args[i] != null) ? args[i].getClass() : null; - - if (target.getClass().isArray()) - { -@@ -333,7 +310,29 @@ - } - if (method == null) - throw new NoSuchMethodException("No matching method for statement " + toString()); -+ -+ // If we were calling Class.forName(String) we intercept and call the -+ // forName-variant that allows a ClassLoader argument. We take the -+ // system classloader (aka application classloader) here to make sure -+ // that application defined classes can be resolved. If we would not -+ // do that the Class.forName implementation would use the class loader -+ // of java.beans.Statement which is <null> and cannot resolve application -+ // defined classes. -+ if (method.equals( -+ Class.class.getMethod("forName", new Class[] { String.class }))) -+ return Class.forName( -+ (String) args[0], true, ClassLoader.getSystemClassLoader()); -+ -+ try { - return method.invoke(target, args); -+ } catch(IllegalArgumentException iae){ -+ System.err.println("method: " + method); -+ -+ for(int i=0;i<args.length;i++){ -+ System.err.println("args[" + i + "]: " + args[i]); -+ } -+ throw iae; -+ } - } - - -@@ -352,9 +351,13 @@ - { - StringBuffer result = new StringBuffer(); - -- Class klass = target.getClass(); -+ String targetName = target.getClass().getName(); -+ if ( targetName.startsWith("java")) -+ { -+ targetName = targetName.substring(targetName.lastIndexOf('.') + 1); -+ } - -- result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); -+ result.append(targetName); - result.append("."); - result.append(methodName); - result.append("("); -@@ -363,11 +366,15 @@ - for (int i = 0; i < arguments.length; i++) - { - result.append(sep); -- result.append(arguments[i].getClass().getName()); -+ result.append( -+ ( arguments[i] == null ) ? "null" : -+ ( arguments[i] instanceof String ) ? "\"" + arguments[i] + "\"" : -+ arguments[i].getClass().getName()); - sep = ", "; - } - result.append(")"); - - return result.toString(); - } -+ - } -diff -Nur classpath.orig/java/beans/XMLEncoder.java classpath/java/beans/XMLEncoder.java ---- classpath.orig/java/beans/XMLEncoder.java 1970-01-01 01:00:00.000000000 +0100 -+++ classpath/java/beans/XMLEncoder.java 2006-01-24 17:57:57.000000000 +0100 -@@ -0,0 +1,267 @@ -+/* XMLEncoder.java -+ Copyright (C) 2004, 2005 Free Software Foundation, Inc. -+ -+ This file is part of GNU Classpath. -+ -+ GNU Classpath is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ GNU Classpath is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with GNU Classpath; see the file COPYING. If not, write to the -+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. -+ -+ Linking this library statically or dynamically with other modules is -+ making a combined work based on this library. Thus, the terms and -+ conditions of the GNU General Public License cover the whole -+ combination. -+ -+ As a special exception, the copyright holders of this library give you -+ permission to link this library with independent modules to produce an -+ executable, regardless of the license terms of these independent -+ modules, and to copy and distribute the resulting executable under -+ terms of your choice, provided that you also meet, for each linked -+ independent module, the terms and conditions of the license of that -+ module. An independent module is a module which is not derived from -+ or based on this library. If you modify this library, you may extend -+ this exception to your version of the library, but you are not -+ obligated to do so. If you do not wish to do so, delete this -+ exception statement from your version. */ -+ -+ -+package java.beans; -+ -+import gnu.java.beans.encoder.ScanEngine; -+ -+import java.io.OutputStream; -+ -+/** -+ * This class uses the {@link PersistenceDelegate} and {@link Encoder} -+ * infrastructure to generate an XML representation of the objects it -+ * serializes. -+ * -+ * @author Robert Schuster (robertschuster@fsfe.org) -+ * @since 1.4 -+ */ -+public class XMLEncoder extends Encoder -+{ -+ Object owner; -+ -+ Exception exception; -+ -+ ScanEngine scanEngine; -+ -+ private int accessCounter = 0; -+ -+ public XMLEncoder(OutputStream os) -+ { -+ scanEngine = new ScanEngine(os); -+ } -+ -+ public void close() -+ { -+ if (scanEngine != null) -+ { -+ scanEngine.close(); -+ scanEngine = null; -+ } -+ } -+ -+ public void flush() -+ { -+ scanEngine.flush(); -+ } -+ -+ public void writeExpression(Expression expr) -+ { -+ // Implementation note: Why is this method overwritten and nearly exactly -+ // reimplemented as in Encoder? -+ // The Encoder class can (and should be) subclassed by users outside of the -+ // java.beans package. While I have doubts that this is possible from an -+ // API design point of view I tried to replicate the Encoder's behavior -+ // in the JDK as exactly as possible. This strictness however made it -+ // extremely complicated to implement the XMLEncoder's backend. Therefore -+ // I decided to copy the Encoder's implementation and make all changes -+ // I needed for a succesfull operation of XMLEncoder. -+ // -+ // The same is true for the writeStatement method. -+ -+ // Silently ignore out of bounds calls. -+ if (accessCounter <= 0) -+ return; -+ -+ scanEngine.writeExpression(expr); -+ -+ -+ Object target = expr.getTarget(); -+ Object value = null; -+ Object newValue = null; -+ -+ try -+ { -+ value = expr.getValue(); -+ } -+ catch (Exception e) -+ { -+ getExceptionListener().exceptionThrown(e); -+ return; -+ } -+ -+ -+ newValue = get(value); -+ -+ if (newValue == null) -+ { -+ Object newTarget = get(target); -+ if (newTarget == null) -+ { -+ writeObject(target); -+ newTarget = get(target); -+ -+ // May happen if exception was thrown. -+ if (newTarget == null) -+ { -+ return; -+ } -+ } -+ -+ Object[] args = expr.getArguments(); -+ Object[] newArgs = new Object[args.length]; -+ -+ for (int i = 0; i < args.length; i++) -+ { -+ newArgs[i] = get(args[i]); -+ if (newArgs[i] == null || isImmutableType(args[i].getClass())) -+ { -+ writeObject(args[i]); -+ newArgs[i] = get(args[i]); -+ } -+ } -+ -+ Expression newExpr = new Expression(newTarget, expr.getMethodName(), -+ newArgs); -+ -+ // Fakes the result of Class.forName(<primitiveType>) to make it possible -+ // to hand such a type to the encoding process. -+ if (value instanceof Class && ((Class) value).isPrimitive()) -+ newExpr.setValue(value); -+ -+ // Instantiates the new object. -+ try -+ { -+ newValue = newExpr.getValue(); -+ -+ putCandidate(value, newValue); -+ } -+ catch (Exception e) -+ { -+ getExceptionListener().exceptionThrown(e); -+ -+ // In Statement.writeExpression we had no possibility to flags -+ // an erroneous state to the ScanEngine without behaving different -+ // to the JDK. -+ scanEngine.revoke(); -+ -+ return; -+ } -+ -+ writeObject(value); -+ -+ } -+ else if(value.getClass() == String.class || value.getClass() == Class.class) -+ { -+ writeObject(value); -+ } -+ -+ scanEngine.end(); -+ } -+ -+ public void writeStatement(Statement stmt) -+ { -+ // In case of questions have a at the implementation note in -+ // writeExpression. -+ -+ scanEngine.writeStatement(stmt); -+ -+ // Silently ignore out of bounds calls. -+ if (accessCounter <= 0) -+ return; -+ -+ Object target = stmt.getTarget(); -+ -+ Object newTarget = get(target); -+ if (newTarget == null) -+ { -+ writeObject(target); -+ newTarget = get(target); -+ } -+ -+ Object[] args = stmt.getArguments(); -+ Object[] newArgs = new Object[args.length]; -+ -+ for (int i = 0; i < args.length; i++) -+ { -+ // Here is the difference to the original writeStatement -+ // method in Encoder. In case that the object is known or -+ // not an immutable we put it directly into the ScanEngine -+ // which will then generate an object reference for it. -+ newArgs[i] = get(args[i]); -+ if (newArgs[i] == null || isImmutableType(args[i].getClass())) -+ { -+ writeObject(args[i]); -+ newArgs[i] = get(args[i]); -+ } -+ else -+ scanEngine.writeObject(args[i]); -+ } -+ -+ Statement newStmt = new Statement(newTarget, stmt.getMethodName(), newArgs); -+ -+ try -+ { -+ newStmt.execute(); -+ } -+ catch (Exception e) -+ { -+ getExceptionListener().exceptionThrown(e); -+ -+ // In Statement.writeStatement we had no possibility to flags -+ // an erroneous state to the ScanEngine without behaving different -+ // to the JDK. -+ scanEngine.revoke(); -+ return; -+ } -+ -+ scanEngine.end(); -+ } -+ -+ public void writeObject(Object o) -+ { -+ accessCounter++; -+ -+ scanEngine.writeObject(o); -+ -+ if (get(o) == null); -+ super.writeObject(o); -+ -+ accessCounter--; -+ } -+ -+ public void setOwner(Object o) -+ { -+ owner = o; -+ } -+ -+ public Object getOwner() -+ { -+ return owner; -+ } -+ -+} diff --git a/dev-java/gcj/files/digest-gcj-4.1.0 b/dev-java/gcj/files/digest-gcj-4.1.0 deleted file mode 100644 index eb3d355a..00000000 --- a/dev-java/gcj/files/digest-gcj-4.1.0 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 88785071f29ed0e0b6b61057a1079442 gcc-4.1.0.tar.bz2 38639061 -RMD160 a0640c52a53b69b0edcf66d9dc9a95d2112e8b41 gcc-4.1.0.tar.bz2 38639061 -SHA256 1159457a0e4c054b709547ae21ff624aebab2033e0d9e5bf46c9cf88b1970606 gcc-4.1.0.tar.bz2 38639061 diff --git a/dev-java/gcj/files/digest-gcj-4.1.0_pre20060219 b/dev-java/gcj/files/digest-gcj-4.1.0_pre20060219 deleted file mode 100644 index 2572483e..00000000 --- a/dev-java/gcj/files/digest-gcj-4.1.0_pre20060219 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 afe7a62dd812d7dbb9542472fc07cbe7 gcc-4.1.0-20060219.tar.bz2 38618939 -RMD160 488805c643b180cb3734cbee084cf0654666a387 gcc-4.1.0-20060219.tar.bz2 38618939 -SHA256 f8462dae0e7adf813766d9931767586f95a47e28facc4e2a82ad5f1147f2856e gcc-4.1.0-20060219.tar.bz2 38618939 diff --git a/dev-java/gcj/files/fix-java.beans.Encoder.patch b/dev-java/gcj/files/fix-java.beans.Encoder.patch deleted file mode 100644 index bd5247ec..00000000 --- a/dev-java/gcj/files/fix-java.beans.Encoder.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- classpath/classpath/java/beans/Encoder.java 2006/01/24 16:57:57 1.2 -+++ classpath/classpath/java/beans/Encoder.java 2006/01/29 19:11:29 1.3 -@@ -1,5 +1,5 @@ - /* Encoder.java -- Copyright (C) 2005, 2006 Free Software Foundation, Inc. -+ Copyright (C) 2005 Free Software Foundation, Inc. - - This file is part of GNU Classpath. - -@@ -38,7 +38,6 @@ - - package java.beans; - --import gnu.java.beans.DefaultExceptionListener; - import gnu.java.beans.encoder.ArrayPersistenceDelegate; - import gnu.java.beans.encoder.ClassPersistenceDelegate; - import gnu.java.beans.encoder.CollectionPersistenceDelegate; -@@ -169,8 +168,13 @@ - */ - public void setExceptionListener(ExceptionListener listener) - { -- exceptionListener = (listener != null) -- ? listener : DefaultExceptionListener.INSTANCE; -+ exceptionListener = (listener != null) ? listener : new ExceptionListener() -+ { -+ public void exceptionThrown(Exception e) -+ { -+ System.err.println("exception thrown: " + e); -+ } -+ }; - } - - /** diff --git a/dev-java/gcj/files/fix_libtool_files.sh b/dev-java/gcj/files/fix_libtool_files.sh deleted file mode 100644 index c144be22..00000000 --- a/dev-java/gcj/files/fix_libtool_files.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.12 2005/01/30 18:45:22 vapier Exp $ - -usage() { -cat << "USAGE_END" -Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>] - - Where <old-gcc-version> is the version number of the - previous gcc version. For example, if you updated to - gcc-3.2.1, and you had gcc-3.2 installed, run: - - # fix_libtool_files.sh 3.2 - - If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu - but you now have CHOST as i686-pc-linux-gnu, run: - - # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu - - Note that if only the CHOST and not the version changed, you can run - it with the current version and the '--oldarch <old-CHOST>' arguments, - and it will do the expected: - - # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu - -USAGE_END - exit 1 -} - -if [[ $2 != "--oldarch" && $# -ne 1 ]] || \ - [[ $2 == "--oldarch" && $# -ne 3 ]] -then - usage -fi - -ARGV1=$1 -ARGV2=$2 -ARGV3=$3 - -source /etc/profile -source /sbin/functions.sh - -if [[ ${EUID} -ne 0 ]] ; then - eerror "${0##*/}: Must be root." - exit 1 -fi - -# make sure the files come out sane -umask 0022 - -if [[ ${ARGV2} == "--oldarch" ]] && [[ -n ${ARGV3} ]] ; then - OLDCHOST=${ARGV3} -else - OLDCHOST= -fi - -AWKDIR="/lib/rcscripts/awk" - -if [[ ! -r ${AWKDIR}/fixlafiles.awk ]] ; then - eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!" - exit 1 -fi - -OLDVER=${ARGV1} - -export OLDVER OLDCHOST - -einfo "Scanning libtool files for hardcoded gcc library paths..." -/bin/gawk -f "${AWKDIR}/fixlafiles.awk" - -# vim:ts=4 diff --git a/dev-java/gcj/files/gcc-configure-LANG.patch b/dev-java/gcj/files/gcc-configure-LANG.patch deleted file mode 100644 index 3ef76ef9..00000000 --- a/dev-java/gcj/files/gcc-configure-LANG.patch +++ /dev/null @@ -1,41 +0,0 @@ -The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in -option parsing, it may break. - -http://bugs.gentoo.org/103483 - ---- configure -+++ configure -@@ -54,6 +54,16 @@ - infodir='${prefix}/info' - mandir='${prefix}/man' - -+# NLS nuisances. -+# Only set these to C if already set. These must not be set unconditionally -+# because not all systems understand e.g. LANG=C (notably SCO). -+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -+# Non-C LC_CTYPE values break the ctype check. -+if test "${LANG+set}" = set; then LANG=C; export LANG; fi -+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -+ - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= -@@ -452,16 +463,6 @@ - esac - done - --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -- - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -rf conftest* confdefs.h - # AIX cpp loses on an empty file, so make sure it contains at least a newline. diff --git a/dev-java/gcj/files/gcc-spec-env.patch b/dev-java/gcj/files/gcc-spec-env.patch deleted file mode 100644 index c2103206..00000000 --- a/dev-java/gcj/files/gcc-spec-env.patch +++ /dev/null @@ -1,39 +0,0 @@ - Add support for external spec file via the GCC_SPECS env var. This - allows us to easily control pie/ssp defaults with gcc-config profiles. - - Original patch by Rob Holland. Extended to support multiple - entries separated by ':' by Kevin F. Quinn - ---- gcc-4/gcc/gcc.c -+++ gcc-4/gcc/gcc.c -@@ -6482,6 +6482,30 @@ - - /* Process any user specified specs in the order given on the command - line. */ -+ /* Add specs listed in GCC_SPECS. Note; in the process of separating -+ * each spec listed, the string is overwritten at token boundaries -+ * (':') with '\0', an effect of strtok_r(). -+ */ -+ GET_ENVIRONMENT (specs_file, "GCC_SPECS"); -+ if (specs_file && (strlen(specs_file) > 0)) -+ { -+ char *spec, *saveptr; -+ for (spec=strtok_r(specs_file,":",&saveptr); -+ spec!=NULL; -+ spec=strtok_r(NULL,":",&saveptr)) -+ { -+ struct user_specs *user = (struct user_specs *) -+ xmalloc (sizeof (struct user_specs)); -+ -+ user->next = (struct user_specs *) 0; -+ user->filename = spec; -+ if (user_specs_tail) -+ user_specs_tail->next = user; -+ else -+ user_specs_head = user; -+ user_specs_tail = user; -+ } -+ } - for (uptr = user_specs_head; uptr; uptr = uptr->next) - { - char *filename = find_a_file (&startfile_prefixes, uptr->filename, diff --git a/dev-java/gcj/files/gcj-4.1 b/dev-java/gcj/files/gcj-4.1 deleted file mode 100644 index 2611a928..00000000 --- a/dev-java/gcj/files/gcj-4.1 +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -VERSION="GCJ @PV@" -JAVA_HOME=/opt/@P@ -JDK_HOME=/opt/@P@ -JAVAC=${JAVA_HOME}/bin/javac -PATH="${JAVA_HOME}/bin" -ROOTPATH="${JAVA_HOME}/bin" -LDPATH="${JAVA_HOME}/lib" -INFOPATH="${JAVA_HOME}/info" -MANPATH="${JAVA_HOME}/man" -PROVIDES_TYPE="JDK JRE" -PROVIDES_VERSION="1.5" -BOOTCLASSPATH="${JAVA_HOME}/share/java/libgcj-@PV@.jar" -ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH INFOPATH MANPATH" diff --git a/dev-java/gcj/files/java.in b/dev-java/gcj/files/java.in deleted file mode 100644 index e9d3fa7e..00000000 --- a/dev-java/gcj/files/java.in +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# wrapper script for gij as java - -JAVA_PKG_CLASSMAP=${JAVA_PKG_CLASSMAP:="/usr/share/java/classmap.gcjdb"} - -@HOME@/bin/gij \ - -Dgnu.gcj.precompiled.db.path=${JAVA_PKG_CLASSMAP} \ - "${@}" diff --git a/dev-java/gcj/files/javac.in b/dev-java/gcj/files/javac.in deleted file mode 100644 index 8628e7ef..00000000 --- a/dev-java/gcj/files/javac.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# wrapper script for ecj-native as javac - -ecj=/usr/bin/ecj-native -if [[ ! -x ${ecj} ]] ; then - echo "ecj unusable (${ecj})" -fi - -${ecj} -bootclasspath @HOME@/share/java/libgcj-@PV@.jar -nowarn "${@}" diff --git a/dev-java/gcj/files/javadoc b/dev-java/gcj/files/javadoc deleted file mode 100755 index 1614fffb..00000000 --- a/dev-java/gcj/files/javadoc +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/usr/bin/gjdoc ${1+"${@}"} diff --git a/dev-java/gcj/files/libjava-include.XMLEncoder.patch b/dev-java/gcj/files/libjava-include.XMLEncoder.patch deleted file mode 100644 index 6bf8fec2..00000000 --- a/dev-java/gcj/files/libjava-include.XMLEncoder.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- gcc-4.1.0/libjava/sources.am.orig 2006-03-06 01:07:56.000000000 +0100 -+++ gcc-4.1.0/libjava/sources.am 2006-03-06 01:13:43.000000000 +0100 -@@ -876,7 +876,37 @@ - classpath/gnu/java/beans/editors/NativeIntEditor.java \ - classpath/gnu/java/beans/editors/NativeLongEditor.java \ - classpath/gnu/java/beans/editors/NativeShortEditor.java \ --classpath/gnu/java/beans/editors/StringEditor.java -+classpath/gnu/java/beans/editors/StringEditor.java \ -+classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java \ -+classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java \ -+classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java \ -+classpath/gnu/java/beans/encoder/Context.java \ -+classpath/gnu/java/beans/encoder/GenericScannerState.java \ -+classpath/gnu/java/beans/encoder/IgnoringScannerState.java \ -+classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java \ -+classpath/gnu/java/beans/encoder/ObjectId.java \ -+classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java \ -+classpath/gnu/java/beans/encoder/ReportingScannerState.java \ -+classpath/gnu/java/beans/encoder/Root.java \ -+classpath/gnu/java/beans/encoder/ScanEngine.java \ -+classpath/gnu/java/beans/encoder/ScannerState.java \ -+classpath/gnu/java/beans/encoder/StAXWriter.java \ -+classpath/gnu/java/beans/encoder/Writer.java \ -+classpath/gnu/java/beans/encoder/elements/Array_Get.java \ -+classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java \ -+classpath/gnu/java/beans/encoder/elements/Array_Set.java \ -+classpath/gnu/java/beans/encoder/elements/ClassResolution.java \ -+classpath/gnu/java/beans/encoder/elements/Element.java \ -+classpath/gnu/java/beans/encoder/elements/List_Get.java \ -+classpath/gnu/java/beans/encoder/elements/List_Set.java \ -+classpath/gnu/java/beans/encoder/elements/MethodInvocation.java \ -+classpath/gnu/java/beans/encoder/elements/NullObject.java \ -+classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java \ -+classpath/gnu/java/beans/encoder/elements/ObjectReference.java \ -+classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java \ -+classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java \ -+classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java \ -+classpath/gnu/java/beans/encoder/elements/StringReference.java - - gnu-java-beans.lo: $(gnu_java_beans_source_files) - @find classpath/lib/gnu/java/beans -name '*.class' > gnu-java-beans.list -@@ -2840,7 +2870,11 @@ - classpath/java/beans/VetoableChangeListenerProxy.java \ - classpath/java/beans/VetoableChangeSupport.java \ - classpath/java/beans/Visibility.java \ --classpath/java/beans/XMLDecoder.java -+classpath/java/beans/XMLDecoder.java \ -+classpath/java/beans/XMLEncoder.java \ -+classpath/java/beans/DefaultPersistenceDelegate.java \ -+classpath/java/beans/PersistenceDelegate.java \ -+classpath/java/beans/Encoder.java - - java_beans_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(java_beans_source_files))) - diff --git a/dev-java/gcj/files/mkinfodir b/dev-java/gcj/files/mkinfodir deleted file mode 100755 index a62840ee..00000000 --- a/dev-java/gcj/files/mkinfodir +++ /dev/null @@ -1,233 +0,0 @@ -#!/bin/bash -# $Id: mkinfodir,v 1.1 2001/09/01 07:56:19 drobbins Exp $ -# Generate the top-level Info node, given a directory of Info files -# and (optionally) a skeleton file. The output will be suitable for a -# top-level dir file. The skeleton file contains info topic names in the -# order they should appear in the output. There are three special -# lines that alter the behavior: a line consisting of just "--" causes -# the next line to be echoed verbatim to the output. A line -# containing just "%%" causes all the remaining filenames (wildcards -# allowed) in the rest of the file to be ignored. A line containing -# just "!!" exits the script when reached (unless preceded by a line -# containing just "--"). Once the script reaches the end of the -# skeleton file, it goes through the remaining files in the directory -# in order, putting their entries at the end. The script will use the -# ENTRY information in each info file if it exists. Otherwise it will -# make a minimal entry. - -# sent by Jeffrey Osier <jeffrey@cygnus.com>, who thinks it came from -# zoo@winternet.com (david d `zoo' zuhn) - -# modified 7 April 1995 by Joe Harrington <jh@tecate.gsfc.nasa.gov> to -# take special flags - -INFODIR=$1 -if [ $# = 2 ] ; then - SKELETON=$2 -else - SKELETON=/dev/null -fi - -skip= - -if [ $# -gt 2 ] ; then - echo usage: $0 info-directory [ skeleton-file ] 1>&2 - exit 1 -elif [ -z "${INFODIR}" ] ; then - INFODIR="%%DEFAULT_INFO_DIR%%" -else - true -fi - -if [ ! -d ${INFODIR} ] ; then - echo "$0: first argument must specify a directory" - exit 1 -fi - -### output the dir header -echo "-*- Text -*-" -echo "This file was generated automatically by $0." -echo "This version was generated on `date`" -echo "by `whoami`@`hostname` for `(cd ${INFODIR}; pwd)`" - -cat << moobler -\$Id: mkinfodir,v 1.1 2001/09/01 07:56:19 drobbins Exp $ -This is the file .../info/dir, which contains the topmost node of the -Info hierarchy. The first time you invoke Info you start off -looking at that node, which is (dir)Top. - -File: dir Node: Top This is the top of the INFO tree - - This (the Directory node) gives a menu of major topics. - Typing "q" exits, "?" lists all Info commands, "d" returns here, - "h" gives a primer for first-timers, - "mEmacs<Return>" visits the Emacs topic, etc. - - In Emacs, you can click mouse button 2 on a menu item or cross reference - to select it. - -* Menu: The list of major topics begins on the next line. - -moobler - -### go through the list of files in the skeleton. If an info file -### exists, grab the ENTRY information from it. If an entry exists -### use it, otherwise create a minimal dir entry. -### -### Then remove that file from the list of existing files. If any -### additional files remain (ones that don't have a skeleton entry), -### then generate entries for those in the same way, putting the info for -### those at the end.... - -infofiles=`(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v '\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$')` - -# echoing gets clobbered by backquotes; we do it the hard way... -lines=`wc $SKELETON | awk '{print $1}'` -line=1 -while [ $lines -ge $line ] ; do - # Read one line from the file. This is so that we can echo lines with - # whitespace and quoted characters in them. - fileline=`awk NR==$line $SKELETON` - - # flag fancy features - if [ ! -z "$echoline" ] ; then # echo line - echo "$fileline" - fileline= - echoline= - elif [ "${fileline}" = "--" ] ; then # should we echo the next line? - echoline=1 - elif [ "${fileline}" = "%%" ] ; then # eliminate remaining files from dir? - skip=1 - elif [ "${fileline}" = "!!" ] ; then # quit now - exit 0 - fi - - # handle files if they exist - for file in $fileline"" ; do # expand wildcards ("" handles blank lines) - - fname= - - if [ -z "$echoline" -a ! -z "$file" ] ; then - - # Find the file to operate upon. Check both possible names. - infoname=`echo $file | sed 's/\.gz$//'` - infoname=`echo $infoname | sed 's/\.info$//'` - noext= - ext= - if [ -f ${INFODIR}/$infoname ] ; then - noext=$infoname - fi - if [ -f ${INFODIR}/${infoname}.info ] ; then - ext=${infoname}.info - fi - if [ -f ${INFODIR}/${infoname}.info.gz ] ; then - ext=${infoname}.info.gz - fi - # If it exists with both names take what was said in the file. - if [ ! -z "$ext" -a ! -z "$noext" ]; then - fname=$file - warn="### Warning: $ext and $noext both exist! Using ${file}. ###" - elif [ ! \( -z "$ext" -a -z "$noext" \) ]; then - # just take the name if it exists only once - fname=${noext}${ext} - fi - - # if we found something and aren't skipping, do the entry - if [ ! -z "$fname" ] ; then - if [ -z "$skip" ] ; then - - if [ ! -z "$warn" ] ; then # issue any warning - echo $warn - warn= - fi - if [ "${fname##*.}" = "gz" ] ; then - entry=`zcat ${INFODIR}/${fname} | sed -e '1,/START-INFO-DIR-ENTRY/d' \ - -e '/END-INFO-DIR-ENTRY/,$d' ` - else - entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ - -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$fname` - fi - if [ ! -z "${entry}" ] ; then - echo "${entry}" - else - echo "* ${infoname}: (${infoname})." - fi - fi - - # remove the name from the directory listing - infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${fname} / /" -e "s/ / /g"` - - fi - - fi - - done - - line=`expr $line + 1` -done - -if [ -z "${infofiles}" ] ; then - exit 0 -elif [ $lines -gt 0 ]; then - echo -fi - -# Sort remaining files by INFO-DIR-SECTION. -prevsect= -filesectdata=`(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | \ - fgrep -v 'INFO-DIR-SECTION Miscellaneous' | \ - sort -t: -k2 -k1 | tr ' ' '_')` -for sectdata in ${filesectdata}; do - file=`echo ${sectdata} | cut -d: -f1` - section=`sed -n -e 's/^INFO-DIR-SECTION //p' ${INFODIR}/${file}` - infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${file} / /" -e "s/ / /g"` - - if [ "${prevsect}" != "${section}" ] ; then - if [ ! -z "${prevsect}" ] ; then - echo "" - fi - echo "${section}" - prevsect="${section}" - fi - infoname=`echo $file | sed 's/\.gz$//'` - infoname=`echo $infoname | sed 's/\.info$//'` - if [ "${file##*.}" = "gz" ] ; then - entry=`zcat ${INFODIR}/$file | sed -e '1,/START-INFO-DIR-ENTRY/d' \ - -e '/END-INFO-DIR-ENTRY/,$d' ` - else - entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ - -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file` - fi - if [ ! -z "${entry}" ] ; then - echo "${entry}" - elif [ ! -d "${INFODIR}/${file}" ] ; then - echo "* ${infoname}: (${infoname})." - fi -done - -# Process miscellaneous files. -for file in ${infofiles}; do - if [ ! -z "${prevsect}" ] ; then - echo "" - echo "Miscellaneous" - prevsect="" - fi - - infoname=`echo $file | sed 's/\.gz$//'` - infoname=`echo $infoname | sed 's/\.info$//'` - if [ "${file##*.}" = "gz" ] ; then - entry=`zcat ${INFODIR}/${file} | sed -e '1,/START-INFO-DIR-ENTRY/d' \ - -e '/END-INFO-DIR-ENTRY/,$d'` - else - entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ - -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file` - fi - - - if [ ! -z "${entry}" ] ; then - echo "${entry}" - elif [ ! -d "${INFODIR}/${file}" ] ; then - echo "* ${infoname}: (${infoname})." - fi -done - diff --git a/dev-java/gcj/files/pro-police-docs.patch b/dev-java/gcj/files/pro-police-docs.patch deleted file mode 100644 index 091ea44e..00000000 --- a/dev-java/gcj/files/pro-police-docs.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: gcc/doc/invoke.texi -=================================================================== -RCS file: /cvsroot/gcc/gcc/gcc/doc/invoke.texi,v -retrieving revision 1.364 -diff -c -3 -p -r1.364 invoke.texi -*** gcc/doc/invoke.texi 21 Nov 2003 11:42:58 -0000 1.364 ---- gcc/doc/invoke.texi 22 Nov 2003 08:12:35 -0000 -*************** in the following sections. -*** 228,234 **** - -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol - -Wparentheses -Wpointer-arith -Wredundant-decls @gol - -Wreturn-type -Wsequence-point -Wshadow @gol -! -Wsign-compare -Wstrict-aliasing @gol - -Wswitch -Wswitch-default -Wswitch-enum @gol - -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol - -Wunknown-pragmas -Wunreachable-code @gol ---- 228,234 ---- - -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol - -Wparentheses -Wpointer-arith -Wredundant-decls @gol - -Wreturn-type -Wsequence-point -Wshadow @gol -! -Wsign-compare -Wstack-protector -Wstrict-aliasing @gol - -Wswitch -Wswitch-default -Wswitch-enum @gol - -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol - -Wunknown-pragmas -Wunreachable-code @gol -*************** in the following sections. -*** 681,686 **** ---- 681,687 ---- - -fshort-double -fshort-wchar @gol - -fverbose-asm -fpack-struct -fstack-check @gol - -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol -+ -fstack-protector -fstack-protector-all @gol - -fargument-alias -fargument-noalias @gol - -fargument-noalias-global -fleading-underscore @gol - -ftls-model=@var{model} @gol -*************** effectively. Often, the problem is that -*** 3014,3019 **** ---- 3015,3024 ---- - complex; GCC will refuse to optimize programs when the optimization - itself is likely to take inordinate amounts of time. - -+ @item -Wstack-protector -+ @opindex Wstack-protector -+ Warn when not issuing stack smashing protection for some reason -+ - @item -Werror - @opindex Werror - Make all warnings into errors. -*************** and grows downwards, you can use the fla -*** 11474,11479 **** ---- 11479,11502 ---- - @option{-fstack-limit-symbol=__stack_limit} and - @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit - of 128KB@. Note that this may only work with the GNU linker. -+ -+ @item -fstack-protector -+ @item -fstack-protector-all -+ @opindex fstack-protector -+ @opindex fstack-protector-all -+ @opindex fno-stack-protector -+ Generate code to protect an application from a stack smashing -+ attack. The features are (1) the insertion of random value next to the -+ frame pointer to detect the integrity of the stack, (2) the reordering -+ of local variables to place buffers after pointers to avoid the -+ corruption of pointers that could be used to further corrupt arbitrary -+ memory locations, (3) the copying of pointers in function arguments to -+ an area preceding local variable buffers to prevent the corruption of -+ pointers that could be used to further corrupt arbitrary memory -+ locations, and the (4) omission of instrumentation code from some -+ functions to decrease the performance overhead. If the integrity -+ would be broken, the program is aborted. If no-stack-protector is -+ specified, instrumentation codes are generated at every functions. - - @cindex aliasing of parameters - @cindex parameters, aliased diff --git a/dev-java/gcj/files/rebuild-classmap-db b/dev-java/gcj/files/rebuild-classmap-db deleted file mode 100755 index e8744e3a..00000000 --- a/dev-java/gcj/files/rebuild-classmap-db +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh - -# set defaults -JAVA_PKG_DB_TOOL=${JAVA_PKG_DB_TOOL:="${JAVA_HOME}/bin/gcj-dbtool"} -JAVA_PKG_CLASSMAP=${JAVA_PKG_CLASSMAP:="/usr/share/java/classmap.gcjdb"} - -# functions -die() { - echo "ERROR: ${@}" - exit 1 -} - -show_help() { - echo "To rebuild your database run:" - echo " '${0} <database file> [ <packages> ]'" - echo - echo - echo " database file: /path/to/file.gcjdb" - echo - echo " packages: comma-separated list of packages from 'java-config -l'" - echo - echo - echo "To print only what would be done run:" - echo " '${0} printonly [ <packages> ]'" - echo - echo " packages: comma-separated list of packages from 'java-config -l'" - echo - echo - echo "To recreate the default database with all packages being checked execute:" - echo " '${0} ${JAVA_PKG_CLASSMAP}'" -} - -check_classpath() { - if [[ "$(java-config --classpath=${2} 2>&1)" =~ "Could not find package" ]] ; then - die "A package missing/mispelled?!" - fi -} - -add_lib() { - echo "register: ${2}" - if [ "${DB_FILE}" != "printonly" ] ; then - ${JAVA_PKG_DB_TOOL} -a ${DB_FILE} ${1} ${2} \ - || die "failed to register jar file" - fi -} - -reg_pkgs() { - local pkg pkgs - for pkg in $(java-config -l | cut -d] -f1 | cut -c2-) - do - pkgs="${pkg},${pkgs}" - done - reg_classpath "${pkgs%,}" -} - -reg_classpath() { - check_classpath - - echo "check package(s) ..." - echo "${@}" - echo - - local jar to - classpath="$(java-config --classpath=${@})" - for jar in ${classpath//:/ } - do - to="$(dirname ${jar})/lib$(basename ${jar}).so" - [[ ( -f ${jar} ) && ( ".jar" == "${jar: -4:4}" ) && ( -f ${to} ) ]] \ - && add_lib ${jar} ${to} - done -} - -# errors -if [[ ( ${#} -lt 1 ) || ( ${#} -ge 3 ) ]] ; then - show_help - exit 1 -fi - -if [[ ! -x ${JAVA_PKG_DB_TOOL} ]] ; then - die "Java database tool unusable!" -fi - -DB_FILE="${1}" - -if [ "${DB_FILE}" != "printonly" ] ; then - if [[ ! -d $(dirname ${DB_FILE}) ]] ; then - die "Path to database file missing?!" - fi - - if [ ".gcjdb" != "${DB_FILE: -6:6}" ] ; then - die "Given file has unknown format?!" - fi -fi - -# start -echo "(re)create database (${DB_FILE})" -if [ "${DB_FILE}" != "printonly" ] ; then - rm -f ${DB_FILE} - ${JAVA_PKG_DB_TOOL} -n ${DB_FILE} -fi - -if [[ -n "${2}" ]] ; then - check_classpath - reg_classpath "${2}" -else - reg_pkgs -fi - -echo "... done!" -exit 0 diff --git a/dev-java/gcj/files/scan_libgcc_linked_ssp.sh b/dev-java/gcj/files/scan_libgcc_linked_ssp.sh deleted file mode 100755 index f8817e21..00000000 --- a/dev-java/gcj/files/scan_libgcc_linked_ssp.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Author: Martin Schlemmer <azarah@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/scan_libgcc_linked_ssp.sh,v 1.3 2004/07/15 00:59:02 agriffis Exp $ - -usage() { -cat << "USAGE_END" -Usage: can_libgcc_linked_ssp.sh - - This scans the system for files that contains the __guard symbol, that was - linked against libgcc. - - -USAGE_END - - exit 1 -} - -if [ "$#" -ne 0 ] -then - usage -fi - -source /etc/profile -source /sbin/functions.sh - -AWKDIR="$(portageq envvar PORTDIR)/sys-devel/gcc/files/awk" - -if [ ! -r "${AWKDIR}/scanforssp.awk" ] -then - eerror "${0##*/}: ${AWKDIR}/scanforssp.awk does not exist!" - exit 1 -fi - -einfo "Scanning system for __guard@GCC symbols..." -/bin/gawk -f "${AWKDIR}/scanforssp.awk" - -exit $? - - -# vim:ts=4 diff --git a/dev-java/gcj/gcj-4.1.0.ebuild b/dev-java/gcj/gcj-4.1.0.ebuild deleted file mode 100644 index d1b596a7..00000000 --- a/dev-java/gcj/gcj-4.1.0.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Header: $ - -inherit gcc-java - -GCJ_HOME="/opt/${P}" - -DESCRIPTION="The GNU Compiler for the Java(tm) Programming Language" -HOMEPAGE="http://gcc.gnu.org/java/" - -LICENSE="GPL-2 LGPL-2.1" -KEYWORDS="-*" -SLOT="4.1" - -src_unpack() { - gcc-java_src_unpack - - echo ${PV/_/-} > "${S}"/gcc/BASE-VER - echo "" > "${S}"/gcc/DATESTAMP - - cd ${S}/libjava/classpath/ - EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \ - EPATCH_MULTI_MSG="fixes/ports from gnu-classpath ..." \ - epatch ${FILESDIR}/classpath/ - - einfo "tweak ports for GCJ ..." - epatch ${FILESDIR}/fix-java.beans.Encoder.patch - - cd ${S} - epatch ${FILESDIR}/libjava-include.XMLEncoder.patch -} - -src_install() { - gcc-java_src_install - - # copy rebuild-classmap-db - exeinto /usr/bin - doexe ${FILESDIR}/rebuild-classmap-db -} - -pkg_postinst() { - ewarn "This gcj ebuild is provided for your convenience, and the use" - ewarn "of this JDK replacement is not supported by the Gentoo Developers." - ewarn "" - ewarn "You are on your own using this! If you have any interesting news" - ewarn "let us know: http://forums.gentoo.org/viewtopic-t-379693.html" -} diff --git a/dev-java/gcj/gcj-4.1.0_pre20060219.ebuild b/dev-java/gcj/gcj-4.1.0_pre20060219.ebuild deleted file mode 100644 index fd8599c6..00000000 --- a/dev-java/gcj/gcj-4.1.0_pre20060219.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Header: $ - -inherit gcc-java - -DESCRIPTION="GCJ: the GCC project's free Java compiler and runtime with the CLASSPATH Java libraries" -HOMEPAGE="http://gcc.gnu.org/java/" - -LICENSE="GPL-2 LGPL-2.1" -KEYWORDS="-*" -SLOT="4.1" - -src_unpack() { - gcc-java_src_unpack - - echo ${SLOT} > "${S}"/gcc/BASE-VER - echo "" > "${S}"/gcc/DATESTAMP -} - -pkg_postinst() { - ewarn "This gcj ebuild is provided for your convenience, and the use" - ewarn "of this JDK replacement is not supported by the Gentoo Developers." - ewarn "" - ewarn "You are on your own using this! If you have any interesting news" - ewarn "let us know: http://forums.gentoo.org/viewtopic-t-379693.html" -} diff --git a/dev-java/gjdoc/Manifest b/dev-java/gjdoc/Manifest deleted file mode 100644 index 779b0b5d..00000000 --- a/dev-java/gjdoc/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -MD5 bc0a9235adbff62eeb2f2020c3a39b42 files/digest-gjdoc-0.7.7 235 -RMD160 76a21bad196c14964e86a66145c0b778f1293103 files/digest-gjdoc-0.7.7 235 -SHA256 e02a20a8d58a42306d2555933a40148d2c424400937f57569cc93c2f2ccba003 files/digest-gjdoc-0.7.7 235 -MD5 04cd3f9e7ac34b976fee4fc13668f938 files/gjdoc 203 -RMD160 52651dad71e125eaf33538caa4d82eab3284c96c files/gjdoc 203 -SHA256 f75372b07b176cd6fcd4b553500b31622bfe7c8c3f793c7a8b685a12ef95d2d4 files/gjdoc 203 -MD5 bfa91211ad71dd77d799279811bea524 gjdoc-0.7.7.ebuild 1507 -RMD160 57b4b3aab3bdb062f18819213514571c6a11cb6b gjdoc-0.7.7.ebuild 1507 -SHA256 916c53e718af668b75508317cd35b364b0a7cbe23aec4003c00f133dd42398ed gjdoc-0.7.7.ebuild 1507 diff --git a/dev-java/gjdoc/files/digest-gjdoc-0.7.7 b/dev-java/gjdoc/files/digest-gjdoc-0.7.7 deleted file mode 100644 index 7229ffbc..00000000 --- a/dev-java/gjdoc/files/digest-gjdoc-0.7.7 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 f9755ee2601f7903360680694747a8c7 gjdoc-0.7.7.tar.gz 731115 -RMD160 118f8f710d22559cbb49eee73377fc733dcf86e3 gjdoc-0.7.7.tar.gz 731115 -SHA256 6cae05c4c49cd7f33650403a2fdbf1248c20751fa11099ca37bd34a4f1a0bd59 gjdoc-0.7.7.tar.gz 731115 diff --git a/dev-java/gjdoc/files/gjdoc b/dev-java/gjdoc/files/gjdoc deleted file mode 100644 index 1bc19274..00000000 --- a/dev-java/gjdoc/files/gjdoc +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [[ -x /usr/bin/gjdoc-native ]] ; then - /usr/bin/gjdoc-native ${1+"${@}"} -else - ${JAVA} -cp "$(java-config --classpath=gjdoc,antlr):$CLASSPATH" gnu.classpath.tools.gjdoc.Main ${1+"${@}"} -fi diff --git a/dev-java/gjdoc/gjdoc-0.7.7.ebuild b/dev-java/gjdoc/gjdoc-0.7.7.ebuild deleted file mode 100644 index 17c097ce..00000000 --- a/dev-java/gjdoc/gjdoc-0.7.7.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit gnuconfig java-pkg-2 libtool - -DESCRIPTION="A javadoc compatible Java source documentation generator." -HOMEPAGE="http://www.gnu.org/software/cp-tools/" -SRC_URI="ftp://ftp.gnu.org/gnu/classpath/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" - -IUSE="gcj source xmldoclet" - -# Refused to emerge with sun-jdk-1.3* complaining about wanting a bigger stack size -DEPEND=">=dev-java/antlr-2.7.1 - !gcj? ( >=virtual/jdk-1.4 ) - source? ( app-arch/zip )" - -RDEPEND="!gcj? ( >=virtual/jre-1.4 ) - gcj? ( dev-java/gcj ) - >=dev-java/antlr-2.7.1" - -src_compile() { - CLASSPATH=. econf \ - --with-antlr-jar=`java-config --classpath=antlr` \ - --disable-dependency-tracking \ - `use_enable xmldoclet` \ - `use_enable gcj native` \ - || die "econf failed" - emake || die "emake failed" -} - -src_install() { - local jars="com-sun-tools-doclets-Taglet gnu-classpath-tools-gjdoc com-sun-javadoc" - for jar in ${jars}; do - java-pkg_newjar ${jar}-${PV}.jar ${jar}.jar - done - - if use gcj; then - # install native gjdoc and libs - make DESTDIR=${D} install-exec || die "Failed to install native gjdoc!" - # move native gjdoc - mv ${D}usr/bin/gjdoc ${D}usr/bin/gjdoc-native - fi - - dobin ${FILESDIR}/gjdoc - dodoc AUTHORS ChangeLog NEWS README - - cd ${S}/docs - make DESTDIR=${D} install || die "Failed to install documentation" - - use source && java-pkg_dosrc "${S}/src"/{com,gnu} -} diff --git a/dev-java/swt/Manifest b/dev-java/swt/Manifest deleted file mode 100644 index cf4c1028..00000000 --- a/dev-java/swt/Manifest +++ /dev/null @@ -1,18 +0,0 @@ -MD5 ad4aa305806513ab198281b6e485fbbc files/SWTMessages.properties 2085 -RMD160 b5fa0ed87e757fd29b316520ff46894a249f62ea files/SWTMessages.properties 2085 -SHA256 33a3ca048da1c6563f10a60212e881227bb47e11a29a4cc7c6ce67ebaf20fb7b files/SWTMessages.properties 2085 -MD5 c964f0ff0b83afdfd76d872821540574 files/build.xml 476 -RMD160 c2cd2ce905d85c464f03cd71478cde8d84344aa1 files/build.xml 476 -SHA256 9a329f77f4df1a7cd6c185a9e37836edfcffd47c2837cda22d1888dee3d356e3 files/build.xml 476 -MD5 cde8d7cd7c1ae4d6e49e5e091f950947 files/digest-swt-3.2_pre4 265 -RMD160 2fd9c488ba7ea74b7125adad2ab12ab62367fa0a files/digest-swt-3.2_pre4 265 -SHA256 5b92258609e71fb1373451dac52ecddabde85e828601ac56f427b473d9b43d10 files/digest-swt-3.2_pre4 265 -MD5 b246c6ca2f33a241ab92d5a8c74da665 files/swt-cairo-0.9.2-amd64.patch 8325 -RMD160 658b6b620cbf202afd438f3d5d7f834444df2c67 files/swt-cairo-0.9.2-amd64.patch 8325 -SHA256 1e21b11b59618036099619fac480d3ed657f0b27fa4cac59230b4866241d641b files/swt-cairo-0.9.2-amd64.patch 8325 -MD5 86a056e193ce8f351e3b12d7f5751861 files/swt-cairo-0.9.2.patch 8692 -RMD160 1f54b2869d37eeec074713959e7e1a87b2451508 files/swt-cairo-0.9.2.patch 8692 -SHA256 fc4b637d6bd1590593f00ded5c1d42c0235cd441751c891ec2608c0bd654bf6c files/swt-cairo-0.9.2.patch 8692 -MD5 9fabc0779d55e2ec7a2967a87926a129 swt-3.2_pre4.ebuild 4637 -RMD160 0f6f315a85423e2d6ab40bd0b7b3acfdb54ba030 swt-3.2_pre4.ebuild 4637 -SHA256 4ae81b6234d9e8a9babda77cfe04057940af5994d024ed9a038a50baf87b0a19 swt-3.2_pre4.ebuild 4637 diff --git a/dev-java/swt/files/SWTMessages.properties b/dev-java/swt/files/SWTMessages.properties deleted file mode 100644 index d3f061bf..00000000 --- a/dev-java/swt/files/SWTMessages.properties +++ /dev/null @@ -1,72 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2005 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -SWT_Yes=Yes -SWT_No=No -SWT_OK=OK -SWT_Cancel=Cancel -SWT_Abort=Abort -SWT_Retry=Retry -SWT_Ignore=Ignore -SWT_Sample=Sample -SWT_A_Sample_Text=A Sample Text -SWT_Selection=Selection -SWT_Current_Selection=Current Selection -SWT_Font=Font -SWT_Color=Color -SWT_Extended_style=Extended style -SWT_Size=Size -SWT_Style=Style -SWT_Save=Save -SWT_Character_set=Character set -SWT_ColorDialog_Title=Colors -SWT_FontDialog_Title=Fonts -SWT_FontSet=Font Set -SWT_NewFont=New Font -SWT_Remove=Remove -SWT_Up=Up -SWT_Down=Down -SWT_Selection=Selection -SWT_Charset_Western=western -SWT_Charset_EastEuropean=eastern -SWT_Charset_SouthEuropean=southern -SWT_Charset_NorthEuropean=northern -SWT_Charset_Cyrillic=cyrillic -SWT_Charset_Arabic=arabic -SWT_Charset_Greek=greek -SWT_Charset_Hebrew=hebrew -SWT_Charset_Turkish=turkish -SWT_Charset_Nordic=nordic -SWT_Charset_Thai=thai -SWT_Charset_BalticRim=baltic rim -SWT_Charset_Celtic=celtic -SWT_Charset_Euro=euro -SWT_Charset_Romanian=romanian -SWT_Charset_SimplifiedChinese=simp. chinese -SWT_Charset_TraditionalChinese=trad. chinese -SWT_Charset_Japanese=japanese -SWT_Charset_Korean=korean -SWT_Charset_Unicode=unicode -SWT_Charset_ASCII=ASCII -SWT_InputMethods=Input Methods -SWT_Password=Password: -SWT_Username=User Name: -SWT_Switch=Switch -SWT_Press=Press -SWT_Open=Open -SWT_Close=Close -SWT_Minimize=Minimize -SWT_Maximize=Maximize -SWT_Restore=Restore -SWT_ShowList=Show List -SWT_Download_File=Download: {0} -SWT_Download_Location=Saving {0} from {1} -SWT_Download_Started=Downloading... -SWT_Download_Status=Download: {0,number,integer} KB of {1,number,integer} KB diff --git a/dev-java/swt/files/build.xml b/dev-java/swt/files/build.xml deleted file mode 100644 index ce887a77..00000000 --- a/dev-java/swt/files/build.xml +++ /dev/null @@ -1,17 +0,0 @@ -<project name="SWT" default="jar" basedir="."> - <property name="src" location="."/> - <property name="build" location="build"/> - - <target name="init"> - <tstamp/> - <mkdir dir="${build}"/> - </target> - - <target name="compile" depends="init" description="Compile the SWT toolset"> - <javac srcdir="${src}" destdir="${build}"/> - </target> - - <target name="jar" depends="compile"> - <jar destfile="swt.jar" basedir="${build}"/> - </target> -</project> diff --git a/dev-java/swt/files/digest-swt-3.2_pre4 b/dev-java/swt/files/digest-swt-3.2_pre4 deleted file mode 100644 index 531007a5..00000000 --- a/dev-java/swt/files/digest-swt-3.2_pre4 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 72c1aaa9a1afb5557c8afed53b0957a6 swt-3.2M4-gtk-linux-x86.zip 2863571 -RMD160 d5d7773ad54c36db6f33e23fb1f3a08c2eea94b1 swt-3.2M4-gtk-linux-x86.zip 2863571 -SHA256 477383f3299a5ab08a505e0c170a0f83abefe1e6de4c720ac567cebbbf4d3133 swt-3.2M4-gtk-linux-x86.zip 2863571 diff --git a/dev-java/swt/files/swt-cairo-0.9.2-amd64.patch b/dev-java/swt/files/swt-cairo-0.9.2-amd64.patch deleted file mode 100644 index c2b6a821..00000000 --- a/dev-java/swt/files/swt-cairo-0.9.2-amd64.patch +++ /dev/null @@ -1,251 +0,0 @@ ---- cairo.c.orig 2005-08-11 15:44:50.000000000 +0000 -+++ cairo.c 2005-09-10 21:45:59.747679632 +0000 -@@ -254,6 +254,62 @@ - } - #endif - -+#ifndef NO_cairo_1font_1options_1create -+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1font_1options_1create) -+ (JNIEnv *env, jclass that) -+{ -+ jlong rc = 0; -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1create_FUNC); -+ rc = (jlong)cairo_font_options_create(); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1create_FUNC); -+ return rc; -+} -+#endif -+ -+#ifndef NO_cairo_1font_1options_1destroy -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1font_1options_1destroy) -+ (JNIEnv *env, jclass that, jint arg0) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1destroy_FUNC); -+ cairo_font_options_destroy((cairo_font_options_t *)arg0); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1destroy_FUNC); -+} -+#endif -+ -+#ifndef NO_cairo_1font_1options_1get_1antialias -+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1font_1options_1get_1antialias) -+ (JNIEnv *env, jclass that, jlong arg0) -+{ -+ jlong rc = 0; -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1get_1antialias_FUNC); -+ rc = (jlong)cairo_font_options_get_antialias((cairo_font_options_t *)arg0); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1get_1antialias_FUNC); -+ return rc; -+} -+#endif -+ -+#ifndef NO_cairo_1font_1options_1set_1antialias -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1font_1options_1set_1antialias) -+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1set_1antialias_FUNC); -+ cairo_font_options_set_antialias((cairo_font_options_t *)arg0, (cairo_antialias_t)arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1set_1antialias_FUNC); -+} -+#endif -+ -+#ifndef NO_cairo_1get_1antialias -+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1get_1antialias) -+ (JNIEnv *env, jclass that, jlong arg0) -+{ -+ jlong rc = 0; -+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1antialias_FUNC); -+ rc = (jlong)cairo_get_antialias((cairo_t *)arg0); -+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1antialias_FUNC); -+ return rc; -+} -+#endif -+ - #ifndef NO_cairo_1get_1current_1point - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1get_1current_1point) - (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2) -@@ -972,12 +1028,14 @@ - #endif - - #ifndef NO_cairo_1reference --JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1reference) -+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1reference) - (JNIEnv *env, jclass that, jlong arg0) - { -+ jlong rc = 0; - Cairo_NATIVE_ENTER(env, that, cairo_1reference_FUNC); -- cairo_reference((cairo_t *)arg0); -+ rc = (jlong)cairo_reference((cairo_t *)arg0); - Cairo_NATIVE_EXIT(env, that, cairo_1reference_FUNC); -+ return rc; - } - #endif - -@@ -1075,6 +1133,16 @@ - } - #endif - -+#ifndef NO_cairo_1set_1antialias -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1antialias) -+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1antialias_FUNC); -+ cairo_set_antialias((cairo_t *)arg0, (cairo_antialias_t)arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1antialias_FUNC); -+} -+#endif -+ - #ifndef NO_cairo_1set_1dash - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1dash) - (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jint arg2, jdouble arg3) -@@ -1123,6 +1191,16 @@ - } - #endif - -+#ifndef NO_cairo_1set_1font_1options -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1font_1options) -+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1font_1options_FUNC); -+ cairo_set_font_options((cairo_t *)arg0, (cairo_font_options_t *)arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1font_1options_FUNC); -+} -+#endif -+ - #ifndef NO_cairo_1set_1font_1size - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1font_1size) - (JNIEnv *env, jclass that, jlong arg0, jdouble arg1) -@@ -1133,6 +1211,16 @@ - } - #endif - -+#ifndef NO_cairo_1get_1font_1options -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1get_1font_1options) -+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1font_1options_FUNC); -+ cairo_get_font_options((cairo_t *)arg0, (cairo_font_options_t *)arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1font_1options_FUNC); -+} -+#endif -+ - #ifndef NO_cairo_1set_1line_1cap - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1line_1cap) - (JNIEnv *env, jclass that, jlong arg0, jint arg1) -@@ -1371,14 +1459,12 @@ - #endif - - #ifndef NO_cairo_1surface_1finish --JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1surface_1finish) -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1finish) - (JNIEnv *env, jclass that, jlong arg0) - { -- jint rc = 0; - Cairo_NATIVE_ENTER(env, that, cairo_1surface_1finish_FUNC); -- rc = (jint)cairo_surface_finish((cairo_surface_t *)arg0); -+ cairo_surface_finish((cairo_surface_t *)arg0); - Cairo_NATIVE_EXIT(env, that, cairo_1surface_1finish_FUNC); -- return rc; - } - #endif - -@@ -1526,11 +1612,11 @@ - - #ifndef NO_cairo_1xlib_1surface_1create_1for_1bitmap - JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1xlib_1surface_1create_1for_1bitmap) -- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3) -+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3, jint arg4) - { - jlong rc = 0; - Cairo_NATIVE_ENTER(env, that, cairo_1xlib_1surface_1create_1for_1bitmap_FUNC); -- rc = (jlong)cairo_xlib_surface_create_for_bitmap((Display *)arg0, (Pixmap)arg1, arg2, arg3); -+ rc = (jlong)cairo_xlib_surface_create_for_bitmap((Display *)arg0, (Pixmap)arg1, (Screen *)arg2, arg3, arg4); - Cairo_NATIVE_EXIT(env, that, cairo_1xlib_1surface_1create_1for_1bitmap_FUNC); - return rc; - } - -=================================================================== -RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c,v -retrieving revision 1.6 -retrieving revision 1.7 -diff -u -r1.6 -r1.7 ---- cairo_stats.c 2005/07/11 21:28:17 1.6 -+++ cairo_stats.c 2005/08/15 20:22:55 1.7 -@@ -24,8 +24,8 @@ - - #ifdef NATIVE_STATS - --int Cairo_nativeFunctionCount = 130; --int Cairo_nativeFunctionCallCount[130]; -+int Cairo_nativeFunctionCount = 138; -+int Cairo_nativeFunctionCallCount[138]; - char * Cairo_nativeFunctionNames[] = { - "cairo_1append_1path", - "cairo_1arc", -@@ -46,10 +46,16 @@ - "cairo_1fill_1preserve", - "cairo_1font_1extents", - "cairo_1font_1extents_1t_1sizeof", -+ "cairo_1font_1options_1create", -+ "cairo_1font_1options_1destroy", -+ "cairo_1font_1options_1get_1antialias", -+ "cairo_1font_1options_1set_1antialias", -+ "cairo_1get_1antialias", - "cairo_1get_1current_1point", - "cairo_1get_1fill_1rule", - "cairo_1get_1font_1face", - "cairo_1get_1font_1matrix", -+ "cairo_1get_1font_1options", - "cairo_1get_1line_1cap", - "cairo_1get_1line_1join", - "cairo_1get_1line_1width", -@@ -114,10 +120,12 @@ - "cairo_1save", - "cairo_1scale", - "cairo_1select_1font_1face", -+ "cairo_1set_1antialias", - "cairo_1set_1dash", - "cairo_1set_1fill_1rule", - "cairo_1set_1font_1face", - "cairo_1set_1font_1matrix", -+ "cairo_1set_1font_1options", - "cairo_1set_1font_1size", - "cairo_1set_1line_1cap", - "cairo_1set_1line_1join", - -=================================================================== -RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h,v -retrieving revision 1.6 -retrieving revision 1.7 -diff -u -r1.6 -r1.7 ---- cairo_stats.h 2005/07/11 21:28:17 1.6 -+++ cairo_stats.h 2005/08/15 20:22:55 1.7 -@@ -50,10 +50,16 @@ - cairo_1fill_1preserve_FUNC, - cairo_1font_1extents_FUNC, - cairo_1font_1extents_1t_1sizeof_FUNC, -+ cairo_1font_1options_1create_FUNC, -+ cairo_1font_1options_1destroy_FUNC, -+ cairo_1font_1options_1get_1antialias_FUNC, -+ cairo_1font_1options_1set_1antialias_FUNC, -+ cairo_1get_1antialias_FUNC, - cairo_1get_1current_1point_FUNC, - cairo_1get_1fill_1rule_FUNC, - cairo_1get_1font_1face_FUNC, - cairo_1get_1font_1matrix_FUNC, -+ cairo_1get_1font_1options_FUNC, - cairo_1get_1line_1cap_FUNC, - cairo_1get_1line_1join_FUNC, - cairo_1get_1line_1width_FUNC, -@@ -118,10 +124,12 @@ - cairo_1save_FUNC, - cairo_1scale_FUNC, - cairo_1select_1font_1face_FUNC, -+ cairo_1set_1antialias_FUNC, - cairo_1set_1dash_FUNC, - cairo_1set_1fill_1rule_FUNC, - cairo_1set_1font_1face_FUNC, - cairo_1set_1font_1matrix_FUNC, -+ cairo_1set_1font_1options_FUNC, - cairo_1set_1font_1size_FUNC, - cairo_1set_1line_1cap_FUNC, - cairo_1set_1line_1join_FUNC, diff --git a/dev-java/swt/files/swt-cairo-0.9.2.patch b/dev-java/swt/files/swt-cairo-0.9.2.patch deleted file mode 100644 index cac280dd..00000000 --- a/dev-java/swt/files/swt-cairo-0.9.2.patch +++ /dev/null @@ -1,256 +0,0 @@ -================================================================== -RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -r1.4 -r1.5 ---- org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c 2005/07/11 21:28:17 1.4 -+++ org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c 2005/08/15 20:22:55 1.5 -@@ -254,6 +254,62 @@ - } - #endif - -+#ifndef NO_cairo_1font_1options_1create -+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1font_1options_1create) -+ (JNIEnv *env, jclass that) -+{ -+ jint rc = 0; -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1create_FUNC); -+ rc = (jint)cairo_font_options_create(); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1create_FUNC); -+ return rc; -+} -+#endif -+ -+#ifndef NO_cairo_1font_1options_1destroy -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1font_1options_1destroy) -+ (JNIEnv *env, jclass that, jint arg0) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1destroy_FUNC); -+ cairo_font_options_destroy((cairo_font_options_t *)arg0); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1destroy_FUNC); -+} -+#endif -+ -+#ifndef NO_cairo_1font_1options_1get_1antialias -+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1font_1options_1get_1antialias) -+ (JNIEnv *env, jclass that, jint arg0) -+{ -+ jint rc = 0; -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1get_1antialias_FUNC); -+ rc = (jint)cairo_font_options_get_antialias((cairo_font_options_t *)arg0); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1get_1antialias_FUNC); -+ return rc; -+} -+#endif -+ -+#ifndef NO_cairo_1font_1options_1set_1antialias -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1font_1options_1set_1antialias) -+ (JNIEnv *env, jclass that, jint arg0, jint arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1set_1antialias_FUNC); -+ cairo_font_options_set_antialias((cairo_font_options_t *)arg0, arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1set_1antialias_FUNC); -+} -+#endif -+ -+#ifndef NO_cairo_1get_1antialias -+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1get_1antialias) -+ (JNIEnv *env, jclass that, jint arg0) -+{ -+ jint rc = 0; -+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1antialias_FUNC); -+ rc = (jint)cairo_get_antialias((cairo_t *)arg0); -+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1antialias_FUNC); -+ return rc; -+} -+#endif -+ - #ifndef NO_cairo_1get_1current_1point - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1get_1current_1point) - (JNIEnv *env, jclass that, jint arg0, jdoubleArray arg1, jdoubleArray arg2) -@@ -309,6 +365,16 @@ - } - #endif - -+#ifndef NO_cairo_1get_1font_1options -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1get_1font_1options) -+ (JNIEnv *env, jclass that, jint arg0, jint arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1font_1options_FUNC); -+ cairo_get_font_options((cairo_t *)arg0, (cairo_font_options_t *)arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1font_1options_FUNC); -+} -+#endif -+ - #ifndef NO_cairo_1get_1line_1cap - JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1get_1line_1cap) - (JNIEnv *env, jclass that, jint arg0) -@@ -972,12 +1038,14 @@ - #endif - - #ifndef NO_cairo_1reference --JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1reference) -+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1reference) - (JNIEnv *env, jclass that, jint arg0) - { -+ jint rc = 0; - Cairo_NATIVE_ENTER(env, that, cairo_1reference_FUNC); -- cairo_reference((cairo_t *)arg0); -+ rc = (jint)cairo_reference((cairo_t *)arg0); - Cairo_NATIVE_EXIT(env, that, cairo_1reference_FUNC); -+ return rc; - } - #endif - -@@ -1075,6 +1143,16 @@ - } - #endif - -+#ifndef NO_cairo_1set_1antialias -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1antialias) -+ (JNIEnv *env, jclass that, jint arg0, jint arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1antialias_FUNC); -+ cairo_set_antialias((cairo_t *)arg0, arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1antialias_FUNC); -+} -+#endif -+ - #ifndef NO_cairo_1set_1dash - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1dash) - (JNIEnv *env, jclass that, jint arg0, jdoubleArray arg1, jint arg2, jdouble arg3) -@@ -1123,6 +1201,16 @@ - } - #endif - -+#ifndef NO_cairo_1set_1font_1options -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1font_1options) -+ (JNIEnv *env, jclass that, jint arg0, jint arg1) -+{ -+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1font_1options_FUNC); -+ cairo_set_font_options((cairo_t *)arg0, (cairo_font_options_t *)arg1); -+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1font_1options_FUNC); -+} -+#endif -+ - #ifndef NO_cairo_1set_1font_1size - JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1font_1size) - (JNIEnv *env, jclass that, jint arg0, jdouble arg1) -@@ -1371,14 +1459,12 @@ - #endif - - #ifndef NO_cairo_1surface_1finish --JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1surface_1finish) -+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1finish) - (JNIEnv *env, jclass that, jint arg0) - { -- jint rc = 0; - Cairo_NATIVE_ENTER(env, that, cairo_1surface_1finish_FUNC); -- rc = (jint)cairo_surface_finish((cairo_surface_t *)arg0); -+ cairo_surface_finish((cairo_surface_t *)arg0); - Cairo_NATIVE_EXIT(env, that, cairo_1surface_1finish_FUNC); -- return rc; - } - #endif - -@@ -1526,11 +1612,11 @@ - - #ifndef NO_cairo_1xlib_1surface_1create_1for_1bitmap - JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1xlib_1surface_1create_1for_1bitmap) -- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3) -+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4) - { - jint rc = 0; - Cairo_NATIVE_ENTER(env, that, cairo_1xlib_1surface_1create_1for_1bitmap_FUNC); -- rc = (jint)cairo_xlib_surface_create_for_bitmap((Display *)arg0, (Pixmap)arg1, arg2, arg3); -+ rc = (jint)cairo_xlib_surface_create_for_bitmap((Display *)arg0, (Pixmap)arg1, (Screen *)arg2, arg3, arg4); - Cairo_NATIVE_EXIT(env, that, cairo_1xlib_1surface_1create_1for_1bitmap_FUNC); - return rc; - } - -=================================================================== -RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c,v -retrieving revision 1.6 -retrieving revision 1.7 -diff -u -r1.6 -r1.7 ---- org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c 2005/07/11 21:28:17 1.6 -+++ org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c 2005/08/15 20:22:55 1.7 -@@ -24,8 +24,8 @@ - - #ifdef NATIVE_STATS - --int Cairo_nativeFunctionCount = 130; --int Cairo_nativeFunctionCallCount[130]; -+int Cairo_nativeFunctionCount = 138; -+int Cairo_nativeFunctionCallCount[138]; - char * Cairo_nativeFunctionNames[] = { - "cairo_1append_1path", - "cairo_1arc", -@@ -46,10 +46,16 @@ - "cairo_1fill_1preserve", - "cairo_1font_1extents", - "cairo_1font_1extents_1t_1sizeof", -+ "cairo_1font_1options_1create", -+ "cairo_1font_1options_1destroy", -+ "cairo_1font_1options_1get_1antialias", -+ "cairo_1font_1options_1set_1antialias", -+ "cairo_1get_1antialias", - "cairo_1get_1current_1point", - "cairo_1get_1fill_1rule", - "cairo_1get_1font_1face", - "cairo_1get_1font_1matrix", -+ "cairo_1get_1font_1options", - "cairo_1get_1line_1cap", - "cairo_1get_1line_1join", - "cairo_1get_1line_1width", -@@ -114,10 +120,12 @@ - "cairo_1save", - "cairo_1scale", - "cairo_1select_1font_1face", -+ "cairo_1set_1antialias", - "cairo_1set_1dash", - "cairo_1set_1fill_1rule", - "cairo_1set_1font_1face", - "cairo_1set_1font_1matrix", -+ "cairo_1set_1font_1options", - "cairo_1set_1font_1size", - "cairo_1set_1line_1cap", - "cairo_1set_1line_1join", - -=================================================================== -RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h,v -retrieving revision 1.6 -retrieving revision 1.7 -diff -u -r1.6 -r1.7 ---- org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h 2005/07/11 21:28:17 1.6 -+++ org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h 2005/08/15 20:22:55 1.7 -@@ -50,10 +50,16 @@ - cairo_1fill_1preserve_FUNC, - cairo_1font_1extents_FUNC, - cairo_1font_1extents_1t_1sizeof_FUNC, -+ cairo_1font_1options_1create_FUNC, -+ cairo_1font_1options_1destroy_FUNC, -+ cairo_1font_1options_1get_1antialias_FUNC, -+ cairo_1font_1options_1set_1antialias_FUNC, -+ cairo_1get_1antialias_FUNC, - cairo_1get_1current_1point_FUNC, - cairo_1get_1fill_1rule_FUNC, - cairo_1get_1font_1face_FUNC, - cairo_1get_1font_1matrix_FUNC, -+ cairo_1get_1font_1options_FUNC, - cairo_1get_1line_1cap_FUNC, - cairo_1get_1line_1join_FUNC, - cairo_1get_1line_1width_FUNC, -@@ -118,10 +124,12 @@ - cairo_1save_FUNC, - cairo_1scale_FUNC, - cairo_1select_1font_1face_FUNC, -+ cairo_1set_1antialias_FUNC, - cairo_1set_1dash_FUNC, - cairo_1set_1fill_1rule_FUNC, - cairo_1set_1font_1face_FUNC, - cairo_1set_1font_1matrix_FUNC, -+ cairo_1set_1font_1options_FUNC, - cairo_1set_1font_1size_FUNC, - cairo_1set_1line_1cap_FUNC, - cairo_1set_1line_1join_FUNC, diff --git a/dev-java/swt/swt-3.2_pre4.ebuild b/dev-java/swt/swt-3.2_pre4.ebuild deleted file mode 100644 index b7b90023..00000000 --- a/dev-java/swt/swt-3.2_pre4.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.2_pre1.ebuild,v 1.8 2006/02/04 06:06:05 compnerd Exp $ - -inherit toolchain-funcs eutils java-pkg-2 - -DESCRIPTION="GTK based SWT Library" -HOMEPAGE="http://www.eclipse.org/swt/" - -MY_ARCH="${ARCH}" -[[ "${MY_ARCH}" == "amd64" ]] && MY_ARCH="x86_64" - -MY_VERSION="3.2M4" -ZIP_FILE="swt-${MY_VERSION}-gtk-linux-${MY_ARCH}.zip" -SRC_URI="http://download.eclipse.org/downloads/drops/S-${MY_VERSION}-200512151506/${ZIP_FILE}" - -SLOT="3" -LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1" -KEYWORDS="~amd64 ~ppc ~x86" - -IUSE="cairo firefox gnome mozilla" -RDEPEND=">=virtual/jre-1.4 - >=x11-libs/gtk+-2.6.8 - dev-libs/atk - || ( virtual/x11 x11-libs/libXtst ) - mozilla? ( firefox? ( >=www-client/mozilla-firefox-1.0.6 ) - !firefox? ( >=www-client/mozilla-1.4 ) ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - cairo? ( >=x11-libs/cairo-1.0.2 )" -DEPEND=">=virtual/jdk-1.4 - gcj? ( dev-java/gcj-jdk ) - ${RDEPEND} - dev-util/pkgconfig - dev-java/ant-core - app-arch/unzip" - -S=${WORKDIR} - -src_unpack() { - unzip -jq "${DISTDIR}/${ZIP_FILE}" "*src.zip" || die "Failed to unzip ${ZIP_FILE}" - unzip -q src.zip - - # Replace the build.xml to allow compilation without Eclipse tasks - cp ${FILESDIR}/build.xml ${S}/build.xml || die "Unable to update build.xml" - mkdir ${S}/src && mv ${S}/org ${S}/src || die "Unable to restructure SWT sources" -} - -src_compile() { - # Identify the AWT path - if [[ ! -z "$(java-config --java-version | grep 'IBM')" ]] ; then - export AWT_LIB_PATH=$JAVA_HOME/jre/bin - elif [[ "$(java-config -f)" =~ "gcj" ]] ; then - export AWT_LIB_PATH=$JAVA_HOME/lib - else - if [[ ${ARCH} == 'x86' ]] ; then - export AWT_LIB_PATH=$JAVA_HOME/jre/lib/i386 - elif [[ ${ARCH} == 'ppc' ]] ; then - export AWT_LIB_PATH=$JAVA_HOME/jre/lib/ppc - else - export AWT_LIB_PATH=$JAVA_HOME/jre/lib/amd64 - fi - fi - - # Identity the XTEST library location - export XTEST_LIB_PATH=/usr/$(get_libdir)/X11 - - # Fix the pointer size for AMD64 - [[ ${ARCH} == 'amd64' ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64 - - einfo "Building AWT library" - emake -f make_linux.mak make_awt || die "Failed to build AWT support" - - einfo "Building SWT library" - emake -f make_linux.mak make_swt || die "Failed to build SWT support" - - # Building this always as azureus does not start without this - echo "Building JAVA-AT-SPI bridge" - emake -f make_linux.mak make_atk || die "Failed to build ATK support" - - if use gnome ; then - einfo "Building GNOME VFS support" - emake -f make_linux.mak make_gnome || die "Failed to build GNOME VFS support" - fi - - if use mozilla || use firefox; then - if use firefox ; then - GECKO_SDK="$(pkg-config firefox-xpcom --variable=libdir)" - else - GECKO_SDK="$(pkg-config mozilla-xpcom --variable=libdir)" - fi - - export GECKO_INCLUDES="-include ${GECKO_SDK}/include/mozilla-config.h \ - -I${GECKO_SDK}/include \ - -I${GECKO_SDK}/include/java \ - -I${GECKO_SDK}/include/xpcom -I${GECKO_SDK}/include/xpcom/include \ - -I${GECKO_SDK}/include/string -I${GECKO_SDK}/include/string/include \ - -I${GECKO_SDK}/include/embed_base -I${GECKO_SDK}/include/embed_base/include \ - -I${GECKO_SDK}/include/embedstring -I${GECKO_SDK}/include/embedstring/include" - export GECKO_LIBS="-L${GECKO_SDK} -lgtkembedmoz" - - if use firefox && has_version '>=www-client/mozilla-firefox-1.5-r11' ; then - export GECKO_INCLUDES="${GECKO_INCLUDES} -I/usr/include/nspr" - else - export GECKO_INCLUDES="${GECKO_INCLUDES} \ - -I${GECKO_SDK}/include/nspr -I${GECKO_SDK}/include/nspr/include" - fi - - einfo "Building the Mozilla component" - emake -f make_linux.mak make_mozilla || die "Failed to build Mozilla support" - fi - - if use cairo ; then - einfo "Building CAIRO support" - emake -f make_linux.mak make_cairo || die "Unable to build CAIRO support" - fi - - einfo "Building JNI libraries" - eant compile || die "Failed to compile JNI interfaces" - - einfo "Creating missing files" - cp ${FILESDIR}/SWTMessages.properties ${S}/build/org/eclipse/swt/internal/ - - einfo "Packing JNI libraries" - eant jar || die "Failed to create JNI jar" -} - -src_install() { - java-pkg_dojar swt.jar - - java-pkg_sointo /usr/$(get_libdir) - java-pkg_doso *.so - - dohtml about.html -} - -pkg_postinst() { - if use cairo; then - ewarn - ewarn "CAIRO Support is experimental! We are not responsible if" - ewarn "enabling support for CAIRO corrupts your Gentoo install," - ewarn "if it blows up your computer, or if it becomes sentient" - ewarn "and chases you down the street yelling random binary!" - ewarn - ebeep 5 - fi -} |