summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Meyer-Thurow <h.mth@web.de>2006-02-23 16:20:19 +0100
committerBertrand Jacquin <beber@meleeweb.net>2006-02-23 16:20:19 +0100
commitb0ef5392fd32ec4111b93c578c59b84b9f4a0ec8 (patch)
treedd1d664b20f70e8402662e9aa8b51f5fca302a88
parentRevert "Grisbi: now in portage, delete" (diff)
downloadportage-b0ef5392fd32ec4111b93c578c59b84b9f4a0ec8.tar.xz
Java: GCJ work
Overlay from http://geki.ath.cx/hacks/gcj-overlay-2.tar.bz2
-rw-r--r--dev-java/ant-core/Manifest15
-rw-r--r--dev-java/ant-core/ant-core-1.6.5-r2.ebuild78
-rw-r--r--dev-java/ant-core/files/1.6.5-ant169
-rw-r--r--dev-java/ant-core/files/build.sh-exit-fix.patch11
-rw-r--r--dev-java/ant-core/files/digest-ant-core-1.6.5-r23
-rw-r--r--dev-java/ant-core/files/gcj-ecj.patch143
-rw-r--r--dev-java/ant-tasks/Manifest9
-rw-r--r--dev-java/ant-tasks/ant-tasks-1.6.5.ebuild109
-rw-r--r--dev-java/ant-tasks/files/digest-ant-tasks-1.6.53
-rw-r--r--dev-java/ant-tasks/files/gcj-ecj.patch143
-rw-r--r--dev-java/gcj-ecj/Manifest12
-rwxr-xr-xdev-java/gcj-ecj/files/build.sh69
-rw-r--r--dev-java/gcj-ecj/files/digest-gcj-ecj-3.13
-rwxr-xr-xdev-java/gcj-ecj/files/ecj8
-rw-r--r--dev-java/gcj-ecj/gcj-ecj-3.1.ebuild52
-rw-r--r--dev-java/gcj/Manifest33
-rw-r--r--dev-java/gcj/files/awk/fixlafiles.awk314
-rw-r--r--dev-java/gcj/files/awk/scanforssp.awk225
-rw-r--r--dev-java/gcj/files/digest-gcj-4.1.0_pre200602193
-rw-r--r--dev-java/gcj/files/fix_libtool_files.sh72
-rw-r--r--dev-java/gcj/files/gcc-configure-LANG.patch41
-rw-r--r--dev-java/gcj/files/gcc-spec-env.patch39
-rw-r--r--dev-java/gcj/files/gcj.env5
-rwxr-xr-xdev-java/gcj/files/mkinfodir233
-rw-r--r--dev-java/gcj/files/pro-police-docs.patch74
-rwxr-xr-xdev-java/gcj/files/scan_libgcc_linked_ssp.sh42
-rw-r--r--dev-java/gcj/gcj-4.1.0_pre20060219.ebuild27
-rw-r--r--eclass/gcc-java.eclass340
-rw-r--r--net-p2p/azureus/Manifest18
-rw-r--r--net-p2p/azureus/azureus-2.4.0.0.ebuild99
-rw-r--r--net-p2p/azureus/files/azureus-gentoo-2.4.0.0.sh65
-rw-r--r--net-p2p/azureus/files/azureus-java.beans.XMLEncoder.patch24
-rw-r--r--net-p2p/azureus/files/azureus.desktop8
-rw-r--r--net-p2p/azureus/files/azureus.pngbin0 -> 743 bytes
-rw-r--r--net-p2p/azureus/files/digest-azureus-2.4.0.03
-rw-r--r--sys-libs/db/Manifest15
-rw-r--r--sys-libs/db/db-4.4.20.ebuild131
-rw-r--r--sys-libs/db/files/db-4.4-jarlocation.patch16
-rw-r--r--sys-libs/db/files/db-4.4-libtool.patch47
-rw-r--r--sys-libs/db/files/db-gcj.patch11
-rw-r--r--sys-libs/db/files/digest-db-4.4.203
41 files changed, 2715 insertions, 0 deletions
diff --git a/dev-java/ant-core/Manifest b/dev-java/ant-core/Manifest
new file mode 100644
index 00000000..cb4f7ae0
--- /dev/null
+++ b/dev-java/ant-core/Manifest
@@ -0,0 +1,15 @@
+MD5 0f26c6e18fef6650b998a813483bdc9a ant-core-1.6.5-r2.ebuild 2046
+RMD160 7cb5dac991b97af3c31f0cb4ab82c1c26b052ef7 ant-core-1.6.5-r2.ebuild 2046
+SHA256 f0eca38a737735498e7ef4dc85f7ba18b2f22cf6d5854a79514cb90ad766d85f ant-core-1.6.5-r2.ebuild 2046
+MD5 851886c1a13240befce87e1577f057f1 files/1.6.5-ant 5063
+RMD160 82bfc6233cbb7e8f05099af12564a2cc27c2b53c files/1.6.5-ant 5063
+SHA256 d9a45d747aae54531f3cc4018e1d17d1dc6bacbc64051d50f1d217dce376b942 files/1.6.5-ant 5063
+MD5 ea37e3a5b2edbe1b1fca02ba48c4ea47 files/build.sh-exit-fix.patch 345
+RMD160 4c4cfdfb1b13b9cc55f279a5765afda6da9f6f4d files/build.sh-exit-fix.patch 345
+SHA256 bafac89599d2d5bbb8f17060e39922a01891826251925e39be2df38170d88e2b files/build.sh-exit-fix.patch 345
+MD5 31de0486a830c545c91a089241b3bb9a files/digest-ant-core-1.6.5-r2 268
+RMD160 3a54cfc35c821291722b58076e3524c513ee1dc2 files/digest-ant-core-1.6.5-r2 268
+SHA256 6d25121ad88d0c2a4d0822cff5bb2d50c9f6886369b452882476811f65c1b8f5 files/digest-ant-core-1.6.5-r2 268
+MD5 088a62691ccd652637b52e0ce56ce892 files/gcj-ecj.patch 5170
+RMD160 8f3aca3faafb87597cd85af616cf687e2e6c161a files/gcj-ecj.patch 5170
+SHA256 983729b9873b7fb4f2a5bb0d664e594968413f62aeb214ca5a5a8b362f44bc75 files/gcj-ecj.patch 5170
diff --git a/dev-java/ant-core/ant-core-1.6.5-r2.ebuild b/dev-java/ant-core/ant-core-1.6.5-r2.ebuild
new file mode 100644
index 00000000..bc0d6f23
--- /dev/null
+++ b/dev-java/ant-core/ant-core-1.6.5-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/ant-core-1.6.5-r2.ebuild,v 1.2 2006/02/05 11:05:30 blubb Exp $
+
+inherit java-pkg eutils toolchain-funcs
+
+MY_PN=${PN/-core}
+
+MY_PV=${PV/_/}
+
+DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files."
+HOMEPAGE="http://ant.apache.org/"
+SRC_URI="mirror://apache/ant/source/apache-${MY_PN}-${PV}-src.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc gcj source"
+
+DEPEND="virtual/libc
+ !<dev-java/ant-1.5.4-r2
+ >=virtual/jdk-1.4
+ !<dev-java/ant-tasks-${PV}
+ source? ( app-arch/zip )"
+RDEPEND=">=virtual/jdk-1.4
+ >=dev-java/java-config-1.2"
+
+S="${WORKDIR}/apache-ant-${MY_PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # Patch build.sh to die with non-zero exit code in case of errors.
+ # This patch may be useful for all ant versions.
+ epatch ${FILESDIR}/build.sh-exit-fix.patch
+ use gcj && epatch ${FILESDIR}/gcj-ecj.patch
+}
+
+src_compile() {
+ addwrite "/proc/self/maps"
+ if [[ $(tc-arch) == "ppc" ]] ; then
+ # We're compiling _ON_ PPC
+ export THREADS_FLAG="green"
+ fi
+
+
+ local myc
+ myc="${myc} -Ddist.dir=${D}/usr/share/${PN}"
+ myc="${myc} -Djavac.target=1.4"
+ echo $CLASSPATH
+ CLASSPATH="." ./build.sh -Ddist.dir=${D}/usr/share/${PN} || die
+
+ use doc && ./build.sh dist_javadocs
+}
+
+src_install() {
+ newbin ${FILESDIR}/${PV/_*}-ant ant || die "failed to install wrapper"
+
+ dodir /usr/share/${PN}/bin
+ for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do
+ dobin ${S}/src/script/${each}
+ dosym /usr/bin/${each} /usr/share/${PN}/bin/${each}
+ done
+
+ dodir /etc/env.d
+ echo "ANT_HOME=\"/usr/share/${PN}\"" > ${D}/etc/env.d/20ant
+
+ java-pkg_dojar build/lib/ant.jar
+ java-pkg_dojar build/lib/ant-launcher.jar
+
+ use source && java-pkg_dosrc src/main/*
+
+ dodoc README WHATSNEW KEYS
+ use doc && dohtml welcome.html
+ use doc && java-pkg_dohtml -r docs/*
+ use doc && java-pkg_dohtml -r dist/docs/manual/api/*
+}
diff --git a/dev-java/ant-core/files/1.6.5-ant b/dev-java/ant-core/files/1.6.5-ant
new file mode 100644
index 00000000..8b7755b4
--- /dev/null
+++ b/dev-java/ant-core/files/1.6.5-ant
@@ -0,0 +1,169 @@
+#! /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
+
+
+if [ -z $JAVA_HOME ] ; then
+ if [ -f $HOME/.gentoo/java-env ] ; then
+ source $HOME/.gentoo/java-env
+ else
+ JAVA_HOME=`java-config --jdk-home`
+ CLASSPATH=`java-config --classpath`:${CLASSPATH}
+ fi
+fi
+
+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"
+
+JAVACMD="`java-config --java`"
+
+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 b/dev-java/ant-core/files/build.sh-exit-fix.patch
new file mode 100644
index 00000000..53170617
--- /dev/null
+++ b/dev-java/ant-core/files/build.sh-exit-fix.patch
@@ -0,0 +1,11 @@
+--- build.sh.orig 2003-04-16 11:28:29.000000000 +0200
++++ build.sh 2003-07-02 16:10:06.000000000 +0200
+@@ -18,7 +18,7 @@
+
+ if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
+ echo Bootstrap FAILED
+- exit
++ exit 1
+ fi
+
+ LOCALCLASSPATH=lib/xercesImpl.jar:lib/xml-apis.jar:bootstrap/lib/ant.jar
diff --git a/dev-java/ant-core/files/digest-ant-core-1.6.5-r2 b/dev-java/ant-core/files/digest-ant-core-1.6.5-r2
new file mode 100644
index 00000000..6bc546eb
--- /dev/null
+++ b/dev-java/ant-core/files/digest-ant-core-1.6.5-r2
@@ -0,0 +1,3 @@
+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/gcj-ecj.patch b/dev-java/ant-core/files/gcj-ecj.patch
new file mode 100644
index 00000000..98debf5b
--- /dev/null
+++ b/dev-java/ant-core/files/gcj-ecj.patch
@@ -0,0 +1,143 @@
+--- 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=ecj "$ANT_INSTALL" $*
+
+--- bootstrap.sh.orig 2006-02-22 17:06:18.000000000 +0100
++++ bootstrap.sh 2006-02-22 17:05:45.000000000 +0100
+@@ -126,7 +126,7 @@
+
+ echo ... Compiling Ant Classes
+
+-"${JAVAC}" $BOOTJAVAC_OPTS -d ${CLASSDIR} ${TOOLS}/bzip2/*.java ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
++${JAVAC} $BOOTJAVAC_OPTS -d ${CLASSDIR} ${TOOLS}/bzip2/*.java ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
+ ${TOOLS}/ant/util/regexp/RegexpMatcher.java \
+ ${TOOLS}/ant/util/regexp/RegexpMatcherFactory.java \
+ ${TOOLS}/ant/types/*.java \
+@@ -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=ecj -Dant.home=. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo ... Failed Building Ant Distribution !
+--- src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java.orig 2006-02-22 16:43:17.000000000 +0100
++++ src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java 2006-02-22 16:43:41.000000000 +0100
+@@ -120,6 +120,9 @@
+ if (compilerType.equalsIgnoreCase("kjc")) {
+ return new Kjc();
+ }
++ if (compilerType.equalsIgnoreCase("ecj")) {
++ return new Ecj();
++ }
+ if (compilerType.equalsIgnoreCase("gcj")) {
+ return new Gcj();
+ }
+--- /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");
++
++ 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-tasks/Manifest b/dev-java/ant-tasks/Manifest
new file mode 100644
index 00000000..ee153de9
--- /dev/null
+++ b/dev-java/ant-tasks/Manifest
@@ -0,0 +1,9 @@
+MD5 720eb8fe7b1a68dfa1edeb0fdbd0f340 ant-tasks-1.6.5.ebuild 3393
+RMD160 17fd2d9fa69dc60b09a3bf938e3399648e7165d7 ant-tasks-1.6.5.ebuild 3393
+SHA256 0f8bcf8b6fec802fcaa43541e7d687416bfbf310fd888a205bb3d230c4606ce3 ant-tasks-1.6.5.ebuild 3393
+MD5 31de0486a830c545c91a089241b3bb9a files/digest-ant-tasks-1.6.5 268
+RMD160 3a54cfc35c821291722b58076e3524c513ee1dc2 files/digest-ant-tasks-1.6.5 268
+SHA256 6d25121ad88d0c2a4d0822cff5bb2d50c9f6886369b452882476811f65c1b8f5 files/digest-ant-tasks-1.6.5 268
+MD5 088a62691ccd652637b52e0ce56ce892 files/gcj-ecj.patch 5170
+RMD160 8f3aca3faafb87597cd85af616cf687e2e6c161a files/gcj-ecj.patch 5170
+SHA256 983729b9873b7fb4f2a5bb0d664e594968413f62aeb214ca5a5a8b362f44bc75 files/gcj-ecj.patch 5170
diff --git a/dev-java/ant-tasks/ant-tasks-1.6.5.ebuild b/dev-java/ant-tasks/ant-tasks-1.6.5.ebuild
new file mode 100644
index 00000000..4e61d372
--- /dev/null
+++ b/dev-java/ant-tasks/ant-tasks-1.6.5.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-tasks/ant-tasks-1.6.5.ebuild,v 1.4 2005/09/10 16:01:53 axxo Exp $
+
+inherit java-pkg eutils
+
+MY_PV=${PV/_/}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Apache ANT Optional Tasks Jar Files"
+HOMEPAGE="http://ant.apache.org/"
+SRC_URI="mirror://apache/ant/source/apache-ant-${PV}-src.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~ppc64"
+IUSE="gcj javamail noantlr nobcel nobeanutils nobsh nobsf nocommonsnet nocommonslogging nojdepend nojsch nojython nolog4j nooro noregexp norhino noxalan noxerces"
+
+RDEPEND=">=virtual/jre-1.4
+ =dev-java/ant-core-${PV}*
+ !dev-java/ant-optional
+ >=dev-java/junit-3.8
+ !nolog4j? ( >=dev-java/log4j-1.2.8 )
+ !noxerces? ( >=dev-java/xerces-2.6.2-r1 )
+ !noxalan? ( >=dev-java/xalan-2.5.2 )
+ !nobsh? ( >=dev-java/bsh-1.2-r7 )
+ !nobsf? ( >=dev-java/bsf-2.3.0-r2 )
+ !noantlr? ( >=dev-java/antlr-2.7.2 )
+ !nobeanutils? ( =dev-java/commons-beanutils-1.6* )
+ !nocommonslogging? ( >=dev-java/commons-logging-1.0.3 )
+ !nocommonsnet? ( >=dev-java/commons-net-1.1.0 )
+ !nobcel? ( >=dev-java/bcel-5.1 )
+ !nooro? ( >=dev-java/jakarta-oro-2.0.8-r1 )
+ !norhino? ( =dev-java/rhino-1.5* )
+ !nojdepend? ( >=dev-java/jdepend-2.6 )
+ !nojsch? ( >=dev-java/jsch-0.1.12 )
+ !noregexp? ( >=dev-java/jakarta-regexp-1.3-r2 )
+ !nojython? ( >=dev-java/jython-2.1-r5 )
+ javamail? ( >=dev-java/sun-javamail-bin-1.3 )"
+DEPEND=">=virtual/jdk-1.4
+ >=dev-java/java-config-1.2
+ ${RDEPEND}"
+
+S="${WORKDIR}/apache-ant-${MY_PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ use gcj && epatch ${FILESDIR}/gcj-ecj.patch
+}
+
+src_compile() {
+ addwrite "/proc/self/maps"
+ export JAVA_HOME=${JDK_HOME}
+ if [ `arch` == "ppc" ] ; then
+ # We're compiling _ON_ PPC
+ export THREADS_FLAG="green"
+ fi
+
+ local p="ant-core,junit" libs
+ use noantlr || p="${p},antlr"
+ use nobcel || p="${p},bcel"
+ use nobeanutils || p="${p},commons-beanutils-1.6"
+ use nobsh || p="${p},bsh"
+ use nobsf || p="${p},bsf-2.3"
+ use nocommonslogging || p="${p},commons-logging"
+ use nocommonsnet || p="${p},commons-net"
+ use nojdepend || p="${p},jdepend"
+ use nojsch || p="${p},jsch"
+ use nojython || p="${p},jython"
+ use nolog4j || p="${p},log4j"
+ use nooro || p="${p},jakarta-oro-2.0"
+ use noregexp || p="${p},jakarta-regexp-1.3"
+ use norhino || p="${p},rhino-1.5"
+ use noxalan || p="${p},xalan"
+ use noxerces || p="${p},xerces-2"
+
+ use javamail && p="${p},sun-javamail-bin,sun-jaf-bin"
+
+ local ant_flags=""
+ use gcj && ant_flags="-Dbuild.compiler=ecj"
+ CLASSPATH="." ant -Dant.install=${ANT_HOME} -lib $(java-pkg_getjars ${p}) ${ant_flags} \
+ || die "build failed"
+}
+
+src_install() {
+ dodir /usr/share/ant-core/lib
+ for jar in build/lib/ant-*.jar; do
+ [[ "$(basename ${jar})" == "ant-launcher.jar" ]] && continue
+ java-pkg_dojar ${jar}
+ dosym /usr/share/${PN}/lib/$(basename ${jar}) /usr/share/ant-core/lib/
+ done
+}
+
+pkg_postinst() {
+ local noset=false
+ for x in ${IUSE} ; do
+ if [ "${x:0:2}" == "no" ] ; then
+ use ${x} && noset=true
+ fi
+ done
+ if [ ${noset} == "true" ]; then
+ ewarn "You have disabled some of the ant tasks. Be advised that this may"
+ ewarn "break building some of the Java packages!!"
+ ewarn ""
+ ewarn "We can only offer very limited support in cases where dev-java/ant-tasks"
+ ewarn "has been build with essential features disabled."
+ fi
+}
diff --git a/dev-java/ant-tasks/files/digest-ant-tasks-1.6.5 b/dev-java/ant-tasks/files/digest-ant-tasks-1.6.5
new file mode 100644
index 00000000..6bc546eb
--- /dev/null
+++ b/dev-java/ant-tasks/files/digest-ant-tasks-1.6.5
@@ -0,0 +1,3 @@
+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-tasks/files/gcj-ecj.patch b/dev-java/ant-tasks/files/gcj-ecj.patch
new file mode 100644
index 00000000..98debf5b
--- /dev/null
+++ b/dev-java/ant-tasks/files/gcj-ecj.patch
@@ -0,0 +1,143 @@
+--- 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=ecj "$ANT_INSTALL" $*
+
+--- bootstrap.sh.orig 2006-02-22 17:06:18.000000000 +0100
++++ bootstrap.sh 2006-02-22 17:05:45.000000000 +0100
+@@ -126,7 +126,7 @@
+
+ echo ... Compiling Ant Classes
+
+-"${JAVAC}" $BOOTJAVAC_OPTS -d ${CLASSDIR} ${TOOLS}/bzip2/*.java ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
++${JAVAC} $BOOTJAVAC_OPTS -d ${CLASSDIR} ${TOOLS}/bzip2/*.java ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
+ ${TOOLS}/ant/util/regexp/RegexpMatcher.java \
+ ${TOOLS}/ant/util/regexp/RegexpMatcherFactory.java \
+ ${TOOLS}/ant/types/*.java \
+@@ -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=ecj -Dant.home=. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo ... Failed Building Ant Distribution !
+--- src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java.orig 2006-02-22 16:43:17.000000000 +0100
++++ src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java 2006-02-22 16:43:41.000000000 +0100
+@@ -120,6 +120,9 @@
+ if (compilerType.equalsIgnoreCase("kjc")) {
+ return new Kjc();
+ }
++ if (compilerType.equalsIgnoreCase("ecj")) {
++ return new Ecj();
++ }
+ if (compilerType.equalsIgnoreCase("gcj")) {
+ return new Gcj();
+ }
+--- /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");
++
++ 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/gcj-ecj/Manifest b/dev-java/gcj-ecj/Manifest
new file mode 100644
index 00000000..2132d3c1
--- /dev/null
+++ b/dev-java/gcj-ecj/Manifest
@@ -0,0 +1,12 @@
+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
new file mode 100755
index 00000000..ac70848c
--- /dev/null
+++ b/dev-java/gcj-ecj/files/build.sh
@@ -0,0 +1,69 @@
+#!/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
new file mode 100644
index 00000000..e7e4bcb6
--- /dev/null
+++ b/dev-java/gcj-ecj/files/digest-gcj-ecj-3.1
@@ -0,0 +1,3 @@
+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
new file mode 100755
index 00000000..ac0939ef
--- /dev/null
+++ b/dev-java/gcj-ecj/files/ecj
@@ -0,0 +1,8 @@
+#! /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
new file mode 100644
index 00000000..69fbe737
--- /dev/null
+++ b/dev-java/gcj-ecj/gcj-ecj-3.1.ebuild
@@ -0,0 +1,52 @@
+# 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/Manifest b/dev-java/gcj/Manifest
new file mode 100644
index 00000000..dc71adf5
--- /dev/null
+++ b/dev-java/gcj/Manifest
@@ -0,0 +1,33 @@
+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 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 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 945aa82a30248c06ff7ddee5cebb60de files/gcj.env 114
+RMD160 3c32c8473d78954eaca7bf2c3d8afe6fa556ffa1 files/gcj.env 114
+SHA256 ee70893f85c1f25836a6f7b5e44bc8ce3f1d4c59949a075ca148968ed5a270bb files/gcj.env 114
+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 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 92741bd0fe4bb590f70249639164585e gcj-4.1.0_pre20060219.ebuild 757
+RMD160 4224c08e15cb38c233992fb788b15761c6f66e11 gcj-4.1.0_pre20060219.ebuild 757
+SHA256 278c84a4a256e45bcf37fc2f2030b44512cf806b379de36c87f24ebd614e3495 gcj-4.1.0_pre20060219.ebuild 757
diff --git a/dev-java/gcj/files/awk/fixlafiles.awk b/dev-java/gcj/files/awk/fixlafiles.awk
new file mode 100644
index 00000000..c4798f25
--- /dev/null
+++ b/dev-java/gcj/files/awk/fixlafiles.awk
@@ -0,0 +1,314 @@
+# 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
new file mode 100644
index 00000000..e8a1fe8f
--- /dev/null
+++ b/dev-java/gcj/files/awk/scanforssp.awk
@@ -0,0 +1,225 @@
+# 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/digest-gcj-4.1.0_pre20060219 b/dev-java/gcj/files/digest-gcj-4.1.0_pre20060219
new file mode 100644
index 00000000..2572483e
--- /dev/null
+++ b/dev-java/gcj/files/digest-gcj-4.1.0_pre20060219
@@ -0,0 +1,3 @@
+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_libtool_files.sh b/dev-java/gcj/files/fix_libtool_files.sh
new file mode 100644
index 00000000..c144be22
--- /dev/null
+++ b/dev-java/gcj/files/fix_libtool_files.sh
@@ -0,0 +1,72 @@
+#!/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
new file mode 100644
index 00000000..3ef76ef9
--- /dev/null
+++ b/dev-java/gcj/files/gcc-configure-LANG.patch
@@ -0,0 +1,41 @@
+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
new file mode 100644
index 00000000..c2103206
--- /dev/null
+++ b/dev-java/gcj/files/gcc-spec-env.patch
@@ -0,0 +1,39 @@
+ 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.env b/dev-java/gcj/files/gcj.env
new file mode 100644
index 00000000..6b3ed0a8
--- /dev/null
+++ b/dev-java/gcj/files/gcj.env
@@ -0,0 +1,5 @@
+PATH="/opt/@P@/bin"
+ROOTPATH="/opt/@P@/bin"
+MANPATH="/opt/@P@/man"
+INFOPATH="/opt/@P@/info"
+LDPATH="/opt/@P@/lib"
diff --git a/dev-java/gcj/files/mkinfodir b/dev-java/gcj/files/mkinfodir
new file mode 100755
index 00000000..a62840ee
--- /dev/null
+++ b/dev-java/gcj/files/mkinfodir
@@ -0,0 +1,233 @@
+#!/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
new file mode 100644
index 00000000..091ea44e
--- /dev/null
+++ b/dev-java/gcj/files/pro-police-docs.patch
@@ -0,0 +1,74 @@
+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/scan_libgcc_linked_ssp.sh b/dev-java/gcj/files/scan_libgcc_linked_ssp.sh
new file mode 100755
index 00000000..f8817e21
--- /dev/null
+++ b/dev-java/gcj/files/scan_libgcc_linked_ssp.sh
@@ -0,0 +1,42 @@
+#!/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_pre20060219.ebuild b/dev-java/gcj/gcj-4.1.0_pre20060219.ebuild
new file mode 100644
index 00000000..fd8599c6
--- /dev/null
+++ b/dev-java/gcj/gcj-4.1.0_pre20060219.ebuild
@@ -0,0 +1,27 @@
+# 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/eclass/gcc-java.eclass b/eclass/gcc-java.eclass
new file mode 100644
index 00000000..55b9dca6
--- /dev/null
+++ b/eclass/gcc-java.eclass
@@ -0,0 +1,340 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Header: $
+
+ECLASS=gcc-java
+
+ETYPE="gcc-compiler"
+GCC_LANG="java"
+
+# get the version parsing functions.
+inherit versionator gnuconfig libtool
+
+EXPORT_FUNCTIONS src_unpack src_compile src_test src_install
+
+gcc-java_src_unpack() {
+ gcj_src_unpack
+}
+gcc-java_src_compile() {
+ gcj_src_compile
+}
+gcc-java_src_test() {
+ gcj_src_test
+}
+gcc-java_src_install() {
+ gcj_src_install
+}
+
+IUSE="nogtk cairo"
+
+RDEPEND="virtual/libc
+ >=sys-libs/zlib-1.1.4
+ !nogtk? ( >=x11-libs/gtk+-2.8
+ cairo? ( >=x11-libs/cairo-1.0.2 ) )
+ >=media-libs/libart_lgpl-2.1
+ >=sys-libs/ncurses-5.2-r2
+ nls? ( sys-devel/gettext )"
+
+DEPEND="${RDEPEND}
+ >=sys-apps/texinfo-4.2-r4
+ >=sys-devel/bison-1.875
+ >=sys-devel/binutils-2.16.1"
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+GCC_RELEASE_VER=$(get_version_component_range 1-3)
+GCC_BRANCH_VER=$(get_version_component_range 1-2)
+GCCMAJOR=$(get_version_component_range 1)
+GCCMINOR=$(get_version_component_range 2)
+GCCMICRO=$(get_version_component_range 3)
+[[ ${BRANCH_UPDATE:-notset} == "notset" ]] && BRANCH_UPDATE=$(get_version_component_range 4)
+
+# According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex.
+# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)?
+GCC_CONFIG_VER=${GCC_CONFIG_VER:-"$(replace_version_separator 3 '-')"}
+
+# Pre-release support
+if [[ ${PV} != ${PV/_pre/-} ]] ; then
+ PRERELEASE=${PV/_pre/-}
+fi
+# make _alpha and _beta ebuilds automatically use a snapshot
+if [[ ${PV} != ${PV/_alpha/} ]] ; then
+ SNAPSHOT=${GCC_BRANCH_VER}-${PV##*_alpha}
+elif [[ ${PV} != ${PV/_beta/} ]] ; then
+ SNAPSHOT=${GCC_BRANCH_VER}-${PV##*_beta}
+fi
+export GCC_FILESDIR=${GCC_FILESDIR:-${FILESDIR}}
+
+GCC_VAR_TYPE=${GCC_VAR_TYPE:-versioned}
+GCC_LIB_COMPAT_ONLY="false"
+GCC_TARGET_NO_MULTILIB=${GCC_TARGET_NO_MULTILIB:-false}
+
+#---->> S + SRC_URI essentials <<----
+
+# This function sets the source directory depending on whether we're using
+# a prerelease, snapshot, or release tarball. To use it, just set S with:
+#
+# S="$(gcc_get_s_dir)"
+
+gcc_get_s_dir() {
+ if [[ -n ${PRERELEASE} ]] ; then
+ GCC_S=${WORKDIR}/gcc-${PRERELEASE}
+ elif [[ -n ${SNAPSHOT} ]] ; then
+ GCC_S=${WORKDIR}/gcc-${SNAPSHOT}
+ else
+ GCC_S=${WORKDIR}/gcc-${GCC_RELEASE_VER}
+ fi
+
+ echo "${GCC_S}"
+}
+
+# This function handles the basics of setting the SRC_URI for a gcc ebuild.
+# To use, set SRC_URI with:
+#
+# SRC_URI="$(get_gcc_src_uri)"
+#
+# Other than the variables normally set by portage, this function's behavior
+# can be altered by setting the following:
+#
+# SNAPSHOT
+# If set, this variable signals that we should be using a snapshot
+# of gcc from ftp://sources.redhat.com/pub/gcc/snapshots/. It is
+# expected to be in the format "YYYY-MM-DD". Note that if the ebuild
+# has a _pre suffix, this variable is ignored and the prerelease
+# tarball is used instead.
+#
+# BRANCH_UPDATE
+# If set, this variable signals that we should be using the main
+# release tarball (determined by ebuild version) and applying a
+# CVS branch update patch against it. The location of this branch
+# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
+# Just like with SNAPSHOT, this variable is ignored if the ebuild
+# has a _pre suffix.
+#
+# PATCH_VER
+# PATCH_GCC_VER
+# This should be set to the version of the gentoo patch tarball.
+# The resulting filename of this tarball will be:
+# gcc-${PATCH_GCC_VER:-${GCC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
+
+gentoo_urls() {
+ local devspace="HTTP~lv/GCC/URI HTTP~eradicator/gcc/URI HTTP~vapier/dist/URI
+ HTTP~halcy0n/patches/URI"
+ devspace=${devspace//HTTP/http:\/\/dev.gentoo.org\/}
+ echo mirror://gentoo/$1 ${devspace//URI/$1}
+}
+
+get_gcc_src_uri() {
+ export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}}
+
+ # Set where to download gcc itself depending on whether we're using a
+ # prerelease, snapshot, or release tarball.
+ if [[ -n ${PRERELEASE} ]] ; then
+ GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/prerelease-${PRERELEASE}/gcc-${PRERELEASE}.tar.bz2"
+ elif [[ -n ${SNAPSHOT} ]] ; then
+ GCC_SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.bz2"
+ else
+ GCC_SRC_URI="mirror://gnu/gcc/gcc-${PV}/gcc-${GCC_RELEASE_VER}.tar.bz2"
+ # we want all branch updates to be against the main release
+ [[ -n ${BRANCH_UPDATE} ]] && \
+ GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2)"
+ fi
+
+ # various gentoo patches
+ [[ -n ${PATCH_VER} ]] && \
+ GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2)"
+
+ echo "${GCC_SRC_URI}"
+}
+
+S=$(gcc_get_s_dir)
+SRC_URI=$(get_gcc_src_uri)
+
+#create_vanilla_specs_file() {
+# pushd ${WORKDIR}/build/gcc > /dev/null
+# einfo "Creating a vanilla gcc specs file"
+# ./xgcc -dumpspecs > ${WORKDIR}/build/vanilla.specs
+# popd > /dev/null
+#}
+
+#guess_patch_type_in_dir() {
+# [[ -n $(ls "$1"/*.bz2 2>/dev/null) ]] \
+# && EPATCH_SUFFIX="patch.bz2" \
+# || EPATCH_SUFFIX="patch"
+#}
+
+gcj_src_unpack() {
+ local release_version="Gentoo ${PVR}"
+
+ gcc_quick_unpack
+
+ cd ${S:=$(gcc_get_s_dir)}
+
+ version_string="${version_string} (${release_version})"
+ einfo "patching gcc version: ${version_string}"
+ gcc_version_patch "${version_string}"
+
+ # Misdesign in libstdc++ (Redhat)
+ if [[ ${GCCMAJOR} -ge 3 ]] && [[ -e ${S}/libstdc++-v3/config/cpu/i486/atomicity.h ]] ; then
+ cp -pPR "${S}"/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
+ fi
+
+ # Fixup libtool to correctly generate .la files with portage
+ cd "${S}"
+ elibtoolize --portage --shallow --no-uclibc
+
+ gnuconfig_update
+
+ # update configure files
+ einfo "Fixing misc issues in configure files"
+ for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do
+ ebegin " Updating ${f/${S}\/}"
+ patch "${f}" "${GCC_FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \
+ || die "Please file a bug about this"
+ eend $?
+ done
+
+ ./contrib/gcc_update --touch &> /dev/null
+
+}
+
+gcj_src_test() {
+ cd "${WORKDIR}"/build
+ make check || ewarn "check failed and that sucks :("
+}
+
+
+
+# gcc_quick_unpack will unpack the gcc tarball and patches in a way that is
+# consistant with the behavior of get_gcc_src_uri. The only patch it applies
+# itself is the branch update if present.
+#
+gcc_quick_unpack() {
+ pushd ${WORKDIR} > /dev/null
+ export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}}
+
+ if [[ -n ${GCC_A_FAKEIT} ]] ; then
+ unpack ${GCC_A_FAKEIT}.tar.bz2
+ mv ${GCC_A_FAKEIT} "${S}"
+ elif [[ -n ${PRERELEASE} ]] ; then
+ unpack gcc-${PRERELEASE}.tar.bz2
+ elif [[ -n ${SNAPSHOT} ]] ; then
+ unpack gcc-${SNAPSHOT}.tar.bz2
+ else
+ unpack gcc-${GCC_RELEASE_VER}.tar.bz2
+ # We want branch updates to be against a release tarball
+ if [[ -n ${BRANCH_UPDATE} ]] ; then
+ pushd ${S:-"$(gcc_get_s_dir)"} > /dev/null
+ epatch ${DISTDIR}/gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
+ popd > /dev/null
+ fi
+ fi
+
+ [[ -n ${PATCH_VER} ]] && \
+ unpack gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2
+
+ popd > /dev/null
+}
+
+
+# Try to apply some stub patches so that gcc won't error out when
+# passed parameters like -fstack-protector but no ssp is found
+do_gcc_stub() {
+ local v stub_patch=""
+ for v in ${GCC_RELEASE_VER} ${GCC_BRANCH_VER} ; do
+ stub_patch=${GCC_FILESDIR}/stubs/gcc-${v}-$1-stub.patch
+ if [[ -e ${stub_patch} ]] ; then
+ EPATCH_SINGLE_MSG="Applying stub patch for $1 ..." \
+ epatch "${stub_patch}"
+ return 0
+ fi
+ done
+}
+
+# This function allows us to gentoo-ize gcc's version number and bugzilla
+# URL without needing to use patches.
+gcc_version_patch() {
+ [[ -z $1 ]] && die "no arguments to gcc_version_patch"
+
+ sed -i -e "s~\(const char version_string\[\] = \"\).*\(\".*\)~\1$1\2~" \
+ -e 's~http:\/\/gcc\.gnu\.org\/bugs\.html~http:\/\/bugs\.gentoo\.org\/~' ${S}/gcc/version.c || die "failed to update version.c with Gentoo branding."
+}
+
+fix_libtool_libdir_paths() {
+ local dirpath
+ for archive in $* ; do
+ dirpath=$(dirname ${archive} | sed -e "s:^${D}::")
+ sed -i ${archive} -e "s:^libdir.*:libdir=\'${dirpath}\':"
+ done
+}
+
+gcj_src_compile() {
+ local conf
+
+ # GCC must be built from an alternate (tmp) directory
+
+ mkdir -p ${WORKDIR}/build
+ pushd ${WORKDIR}/build >/dev/null
+
+ # global configure defaults from toolchain.eclass
+ conf="--with-system-zlib \
+ --disable-checking \
+ --disable-werror \
+ --disable-libunwind-exceptions \
+ --enable-nls --without-included-gettext"
+
+ # our build specific configuration
+ conf="--prefix=/opt/${PN}-${GCC_BRANCH_VER} \
+ --with-languages=c++,java \
+ $(use_enable !nogtk java-awt gtk) \
+ $(use_enable cairo gtk-cairo) \
+ --disable-gtktest \
+ --disable-glibtest \
+ --disable-libarttest \
+ --disable-multilib \
+ --disable-maintainer-mode \
+ --disable-libada \
+ --enable-threads=posix \
+ ${conf}"
+
+ echo
+ einfo "Configuring GCC with: ${conf//--/\n\t--} ${@} ${EXTRA_ECONF}"
+ echo
+
+
+ ${S}/configure ${conf} || die "configure failed!"
+
+ make || die "make failed!"
+
+ popd >/dev/null
+}
+
+gcj_src_install() {
+ einfo "Installing GCJ ..."
+ pushd ${WORKDIR}/build >/dev/null
+
+ make DESTDIR="${D}" install || die "install failed!"
+
+ # Punt some tools which are really only useful while building gcc
+ #rm -r "${D}${LIBEXECPATH}"/install-tools
+ # This one comes with binutils
+ find "${D}" -name libiberty.a -exec rm -f {} \;
+
+ # Now do the fun stripping stuff
+ env RESTRICT="" STRIP=${CHOST}-strip prepstrip "${D}${BINPATH}" "${D}${LIBEXECPATH}"
+ env RESTRICT="" STRIP=${CTARGET}-strip prepstrip "${D}${LIBPATH}"
+
+ # create env file
+ mkdir -p "${D}"/etc/env.d/
+ sed -e "s:@P@:${PN}-${GCC_BRANCH_VER}:g" \
+ < ${FILESDIR}/gcj.env \
+ > "${D}"etc/env.d/99gcj \
+ || die "build of env file failed!"
+
+ popd >/dev/null
+}
diff --git a/net-p2p/azureus/Manifest b/net-p2p/azureus/Manifest
new file mode 100644
index 00000000..819af7c8
--- /dev/null
+++ b/net-p2p/azureus/Manifest
@@ -0,0 +1,18 @@
+MD5 3486acb372bc3a7e35eccfe6dd973c66 azureus-2.4.0.0.ebuild 3060
+RMD160 ca3198c8f4eeab878856d6c9a00c64fcc5c4902b azureus-2.4.0.0.ebuild 3060
+SHA256 a49b5f797f0d7b37972097ab86b2b8502fb5060894384d9e4b8d941ad7d4721a azureus-2.4.0.0.ebuild 3060
+MD5 b7dc949ae21b0bd296bd187de5587cb1 files/azureus-gentoo-2.4.0.0.sh 1649
+RMD160 8746118f1426fbda7ef680b6df927211c314673d files/azureus-gentoo-2.4.0.0.sh 1649
+SHA256 3dbc1df04f6fac5f3c92e65ec6f0ccc0b98a93abb92fa0a09e4d8844bbc9a669 files/azureus-gentoo-2.4.0.0.sh 1649
+MD5 59cc507e2e00f3a7c52e6e555ef187f0 files/azureus-java.beans.XMLEncoder.patch 924
+RMD160 5b5137ec5880fe100a87e16710244aedb504934e files/azureus-java.beans.XMLEncoder.patch 924
+SHA256 c09184a45a96101fe1ebd9ae919adabf62623e7445c5783289f57463eeb16a85 files/azureus-java.beans.XMLEncoder.patch 924
+MD5 70c17db47c9a596929112714f82ac010 files/azureus.desktop 153
+RMD160 817c8e44b1068b5030b19d5f61a516f560fd4e92 files/azureus.desktop 153
+SHA256 6eb562481d31292ed0ab9cf16f88c9385318b4c3a3c015fd26238624e1fe9f7c files/azureus.desktop 153
+MD5 2d3136c60488dd51bef012cbcb59201b files/azureus.png 743
+RMD160 234517f80f6306ef4cf3704de59473a00efb50ab files/azureus.png 743
+SHA256 951bcf1bbd46d049740f50be4d1cd41bbac0892ca40b83891db6a2beff9f6a30 files/azureus.png 743
+MD5 497f8a2bf6381748bb47e98cbeec8a1d files/digest-azureus-2.4.0.0 262
+RMD160 ee0c23f350b5c49ac514f69ae02e80741b57b9a1 files/digest-azureus-2.4.0.0 262
+SHA256 a8f0b5d51f50afe16bbe6ea05c78b32b5c43f6f2c63080b0ce3f798e5ad6fb19 files/digest-azureus-2.4.0.0 262
diff --git a/net-p2p/azureus/azureus-2.4.0.0.ebuild b/net-p2p/azureus/azureus-2.4.0.0.ebuild
new file mode 100644
index 00000000..2be21f4f
--- /dev/null
+++ b/net-p2p/azureus/azureus-2.4.0.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/azureus/azureus-2.3.0.6-r1.ebuild,v 1.1 2006/01/02 21:24:54 betelgeuse Exp $
+
+inherit eutils java-pkg
+
+DESCRIPTION="Azureus - Java BitTorrent Client"
+HOMEPAGE="http://azureus.sourceforge.net/"
+SRC_URI="mirror://sourceforge/azureus/Azureus_${PV}_source.zip"
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="gcj source"
+
+RDEPEND=">=virtual/jre-1.4
+ gcj? ( dev-java/gcj )
+ >=dev-java/eclipse-ecj-3.1-r2
+ >dev-java/swt-3.2_pre1
+ >=dev-java/log4j-1.2.8
+ >=dev-java/commons-cli-1.0
+ dev-java/junit
+ !net-p2p/azureus-bin"
+DEPEND=">=virtual/jdk-1.4
+ ${RDEPEND}
+ >=dev-java/ant-core-1.6.2
+ >=app-arch/unzip-5.0"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ mkdir ${S}
+ cd ${S}
+ unpack ${A}
+
+ use gcj && epatch ${FILESDIR}/${PN}-java.beans.XMLEncoder.patch
+
+ #removing osx files and entries
+ rm -fr org/gudy/azureus2/ui/swt/osx org/gudy/azureus2/ui/swt/test org/gudy/azureus2/platform/macosx/access
+
+ mkdir -p build/libs
+ cd build/libs
+ java-pkg_jar-from log4j
+ java-pkg_jar-from commons-cli-1
+ java-pkg_jar-from swt-3
+ java-pkg_jar-from junit
+}
+
+src_compile() {
+ use gcj && ant_extra_opts="-Dbuild.compiler=ecj"
+
+ # Fails to build on amd64 without this
+ use amd64 && export ANT_OPTS="${ANT_OPTS} -Xmx1g"
+
+ ant -q -q ${ant_extra_opts} jar \
+ || die "ant build failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/Azureus2.jar || die "dojar failed"
+
+ # copying the shell script to run the app
+ newbin ${FILESDIR}/azureus-gentoo-${PV}.sh azureus \
+ || die "Creating launcher failed."
+
+ doicon "${FILESDIR}/azureus.png"
+ domenu "${FILESDIR}/azureus.desktop"
+ use source && java-pkg_dosrc ${S}/{com,org}
+}
+
+pkg_postinst() {
+ echo
+ einfo "Due to the nature of the portage system, we recommend"
+ einfo "that users check portage for new versions of Azureus"
+ einfo "instead of attempting to use the auto-update feature."
+ einfo "You can disable auto-update in"
+ einfo "Tools->Options...->Interface->Start"
+ echo
+ einfo "After running azureus for the first time, configuration"
+ einfo "options will be placed in ~/.Azureus/gentoo.config"
+ einfo "It is recommended that you modify this file rather than"
+ einfo "the azureus startup script directly."
+ echo
+ einfo "As of this version, the new ui type 'console' is supported,"
+ einfo "and this may be set in ~/.Azureus/gentoo.config."
+ echo
+ ewarn "If you are upgrading, and the menu in azureus has entries like"
+ ewarn "\"!MainWindow.menu.transfers!\" then you have a stray"
+ ewarn "MessageBundle.properties file,"
+ ewarn "and you may safely delete ~/.Azureus/MessagesBundle.properties"
+ echo
+ einfo "It's recommended to use sun-java in version 1.5 or later."
+ einfo "If you'll notice any problems running azureus and you've"
+ einfo "got older java, try to upgrade it. Just remember not to set"
+ einfo "a 1.5 jdk as the system jdk or things will break."
+ echo
+ ewarn "Please, do not run azureus as root!"
+ ewarn "Azureus has not been developed for multi-user environments!"
+}
diff --git a/net-p2p/azureus/files/azureus-gentoo-2.4.0.0.sh b/net-p2p/azureus/files/azureus-gentoo-2.4.0.0.sh
new file mode 100644
index 00000000..86b55cb9
--- /dev/null
+++ b/net-p2p/azureus/files/azureus-gentoo-2.4.0.0.sh
@@ -0,0 +1,65 @@
+#! /bin/bash
+#
+# Copyright (c) 2005, Petteri Räty <betelgeuse@gentoo.org>
+# Copyright (c) 2004, Jochen Maes <sejo@gentoo.org>
+# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
+# Copyright (c) 2004, Gentoo Foundation
+#
+# Licensed under the GNU General Public License, v2
+
+# The Azureus config dir has moved
+olddotazudir="${HOME}/.Azureus"
+oldgentoocfg="${olddotazudir}/gentoo.config"
+dotazudir="${HOME}/.azureus"
+gentoocfg="${dotazudir}/gentoo.config"
+
+if [[ -f "${oldgentoocfg}" && -f "${gentoocfg}" ]]; then
+ cat > /dev/stderr <<END
+You have gentoo.config files in both
+${dotazudir} and
+${olddotazudir}
+${olddotazudir} is deprecated and you can delete this directory.
+
+END
+fi
+
+if [[ -f "${gentoocfg}" ]] ; then
+ . "${gentoocfg}"
+ echo "using ${gentoocfg}"
+elif [[ -f "${oldgentoocfg}" ]]; then
+ . "${oldgentoocfg}"
+ echo "using ${oldgentoocfg}"
+else
+ if [[ ! -e "${dotazudir}" ]] ; then
+ mkdir "${dotazudir}"
+ echo "Creating ${dotazudir}"
+ fi
+
+ # Setup defaults
+ UI_OPTIONS="--ui=swt"
+
+ echo "Creating ${gentoocfg}"
+
+ # Create the config file
+ cat > "${gentoocfg}" <<END
+# User Interface options:
+# console - console based
+# swt - swt (GUI) based
+#
+# When selecting just 1, use '--ui=<ui>'
+# When selecting multiple, use '--uis=<ui>,<ui>'
+UI_OPTIONS="${UI_OPTIONS}"
+
+# Options you want to pass to the java binary
+JAVA_OPTIONS=""
+END
+
+fi
+
+#cd "${dotazudir}"
+
+CLASSPATH="$(java-config -p junit,log4j,commons-cli-1,swt-3,azureus)"
+exec ${JAVA} -cp "${CLASSPATH}" \
+ -Djava.library.path=$(java-config -i swt-3) \
+ -Dazureus.install.path="${dotazudir}" \
+ ${JAVA_OPTIONS} org.gudy.azureus2.ui.common.Main ${UI_OPTIONS} "${@}"
diff --git a/net-p2p/azureus/files/azureus-java.beans.XMLEncoder.patch b/net-p2p/azureus/files/azureus-java.beans.XMLEncoder.patch
new file mode 100644
index 00000000..8854d433
--- /dev/null
+++ b/net-p2p/azureus/files/azureus-java.beans.XMLEncoder.patch
@@ -0,0 +1,24 @@
+--- azureus/org/gudy/azureus2/ui/console/multiuser/UserManager.java~ 2005-09-06 08:44:54.000000000 -0700
++++ azureus/org/gudy/azureus2/ui/console/multiuser/UserManager.java 2005-12-17 12:06:13.000000000 -0800
+@@ -23,7 +23,7 @@
+ package org.gudy.azureus2.ui.console.multiuser;
+
+ import java.beans.XMLDecoder;
+-import java.beans.XMLEncoder;
++// import java.beans.XMLEncoder;
+ import java.io.BufferedInputStream;
+ import java.io.BufferedOutputStream;
+ import java.io.File;
+@@ -159,9 +159,9 @@
+ List users = new ArrayList( usersMap.values() );
+ config.setUsers(users);
+
+- XMLEncoder encoder = new XMLEncoder( new BufferedOutputStream( out ) );
+- encoder.writeObject(config);
+- encoder.close();
++ // XMLEncoder encoder = new XMLEncoder( new BufferedOutputStream( out ) );
++ // encoder.writeObject(config);
++ // encoder.close();
+ }
+
+ public static UserManager getInstance(PluginInterface pi)
diff --git a/net-p2p/azureus/files/azureus.desktop b/net-p2p/azureus/files/azureus.desktop
new file mode 100644
index 00000000..7a45c5e9
--- /dev/null
+++ b/net-p2p/azureus/files/azureus.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Azureus
+Comment=Azureus BitTorrent Client
+Exec=azureus
+Icon=azureus.png
+Terminal=0
+Categories=Application;Network;
+Type=Application
diff --git a/net-p2p/azureus/files/azureus.png b/net-p2p/azureus/files/azureus.png
new file mode 100644
index 00000000..9ece3a94
--- /dev/null
+++ b/net-p2p/azureus/files/azureus.png
Binary files differ
diff --git a/net-p2p/azureus/files/digest-azureus-2.4.0.0 b/net-p2p/azureus/files/digest-azureus-2.4.0.0
new file mode 100644
index 00000000..6256a5c8
--- /dev/null
+++ b/net-p2p/azureus/files/digest-azureus-2.4.0.0
@@ -0,0 +1,3 @@
+MD5 cb0390f3e1d158453fca980c92050a56 Azureus_2.4.0.0_source.zip 5235489
+RMD160 63aae0ad115be529d6abf51ddf8bba139ac439e5 Azureus_2.4.0.0_source.zip 5235489
+SHA256 1190c7281433ef9bdb32c3aac52d2c0fd31ff13114a2c569d31ccb1cc0d69d70 Azureus_2.4.0.0_source.zip 5235489
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
new file mode 100644
index 00000000..154d3f6f
--- /dev/null
+++ b/sys-libs/db/Manifest
@@ -0,0 +1,15 @@
+MD5 b586b4c999eabcfb2f0400b6f4e6bb54 db-4.4.20.ebuild 3040
+RMD160 7ac536750979c8a59097257c61dfabf0c8382cb2 db-4.4.20.ebuild 3040
+SHA256 73bcff44bc067cab8cbcd5af5b1398ea049315622360f36d4df217e0deee4f34 db-4.4.20.ebuild 3040
+MD5 6835dc7cf78fd7126ade8458f237eab0 files/db-4.4-jarlocation.patch 599
+RMD160 0981160a48833f126fa10e30eea2a394206895e4 files/db-4.4-jarlocation.patch 599
+SHA256 c48eb518efd9ae1a7a9a6990b90c5748ba5682aaac7d20b48e82c6bc03fc698f files/db-4.4-jarlocation.patch 599
+MD5 01f6ce9181e5e748014b1dc5e747e3bd files/db-4.4-libtool.patch 1817
+RMD160 989536933036b8ea7d4bf55420c49ebad76d703b files/db-4.4-libtool.patch 1817
+SHA256 7b47ab059b5e9a775e024f6f2562eea136e870a32748675664e5a5315b871b21 files/db-4.4-libtool.patch 1817
+MD5 0a96d2ecafcb6cb417f066eab310a447 files/db-gcj.patch 471
+RMD160 22d87058153eeacd66ff0a6e0b46218e0364922a files/db-gcj.patch 471
+SHA256 1109212e73539e7edb221ebee1cc8dfd298826279c66224d915fd98336bee51b files/db-gcj.patch 471
+MD5 9e579cc4d94c823e2c62958b145611a2 files/digest-db-4.4.20 232
+RMD160 23d35939865d9a314fb1ecd52bac27fa7084a6c3 files/digest-db-4.4.20 232
+SHA256 9bc163de0955b21f721a8353cbb6e5accb99452f76135d69933df56237c0f68b files/digest-db-4.4.20 232
diff --git a/sys-libs/db/db-4.4.20.ebuild b/sys-libs/db/db-4.4.20.ebuild
new file mode 100644
index 00000000..499bb349
--- /dev/null
+++ b/sys-libs/db/db-4.4.20.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils gnuconfig db flag-o-matic
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [ "${PATCHNO}" == "${PV}" ]; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S=${WORKDIR}/${MY_P}/build_unix
+DESCRIPTION="Berkeley DB"
+HOMEPAGE="http://www.sleepycat.com/"
+SRC_URI="ftp://ftp.sleepycat.com/releases/${MY_P}.tar.gz"
+for (( i=1 ; i<=$PATCHNO ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.sleepycat.com/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="DB"
+SLOT="4.4"
+KEYWORDS="~amd64 ~ia64 ~m68k ~ppc ~sparc ~x86"
+IUSE="tcltk gcj java doc nocxx bootstrap"
+
+DEPEND="tcltk? ( >=dev-lang/tcl-8.4 )
+ java? ( virtual/jdk )"
+RDEPEND="tcltk? ( dev-lang/tcl )
+ java? ( virtual/jre )"
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ cd ${WORKDIR}/${MY_P}
+ for (( i=1 ; i<=$PATCHNO ; i++ ))
+ do
+ epatch ${DISTDIR}/patch.${MY_PV}.${i}
+ done
+ epatch ${FILESDIR}/${PN}-${SLOT}-libtool.patch
+ epatch ${FILESDIR}/${PN}-${SLOT}-jarlocation.patch
+ use gcj && epatch ${FILESDIR}/${PN}-gcj.patch
+
+ gnuconfig_update "${S}/../dist"
+
+ sed -i -e "s,\(ac_compiler\|\${MAKEFILE_CC}\|\${MAKEFILE_CXX}\|\$CC\)\( *--version\),\1 -dumpversion,g" ${S}/../dist/configure
+}
+
+src_compile() {
+ addwrite /proc/self/maps
+
+ local myconf=""
+
+ use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+
+ use bootstrap \
+ && myconf="${myconf} --disable-cxx" \
+ || myconf="${myconf} $(use_enable !nocxx cxx)"
+
+ use tcltk \
+ && myconf="${myconf} --enable-tcl --with-tcl=/usr/$(get_libdir)" \
+ || myconf="${myconf} --disable-tcl"
+
+ myconf="${myconf} $(use_enable java)"
+ if use java && [[ -n ${JAVAC} ]] ; then
+ export PATH=`dirname ${JAVAC}`:${PATH}
+ export JAVAC=`basename ${JAVAC}`
+ fi
+
+ [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
+
+ # the entire testsuite needs the TCL functionality
+ if use tcltk && has test $FEATURES ; then
+ myconf="${myconf} --enable-test"
+ else
+ myconf="${myconf} --disable-test"
+ fi
+
+ replace-flags "-O?" "-O1"
+
+ ../dist/configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --datadir=/usr/share \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --libdir=/usr/$(get_libdir) \
+ --enable-compat185 \
+ --without-uniquename \
+ --enable-rpc \
+ --host=${CHOST} \
+ ${myconf} || die "configure failed"
+
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ einstall libdir="${D}/usr/$(get_libdir)" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ mv ${D}/usr/bin/berkeley_db_svc ${D}/usr/sbin/berkeley_db44_svc
+
+ if use java; then
+ mkdir -p ${D}/usr/share/db
+ cat <<EOF >${D}/usr/share/db/package.env
+DESCRIPTION=The java bindings for berkeley db version ${MY_PV}
+CLASSPATH=:/usr/lib/db-${SLOT}.jar
+EOF
+ fi
+}
+
+pkg_postinst () {
+ db_fix_so
+}
+
+pkg_postrm () {
+ db_fix_so
+}
diff --git a/sys-libs/db/files/db-4.4-jarlocation.patch b/sys-libs/db/files/db-4.4-jarlocation.patch
new file mode 100644
index 00000000..c0d689f4
--- /dev/null
+++ b/sys-libs/db/files/db-4.4-jarlocation.patch
@@ -0,0 +1,16 @@
+diff -ur db-4.1.25.old/dist/Makefile.in db-4.1.25/dist/Makefile.in
+--- db-4.1.25.old/dist/Makefile.in 2003-10-18 02:15:45.000000000 -0700
++++ db-4.1.25/dist/Makefile.in 2003-10-18 02:13:47.000000000 -0700
+@@ -107,9 +107,9 @@
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+ JAVA_RPCDIR= $(srcdir)/rpc_server/java
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
+-rpc_jarfile= dbsvc.jar
++libj_jarfile= db-4.4.jar
++libj_exjarfile= dbexamples-4.4.jar
++rpc_jarfile= dbsvc-4.4.jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.4-libtool.patch b/sys-libs/db/files/db-4.4-libtool.patch
new file mode 100644
index 00000000..3d86b88f
--- /dev/null
+++ b/sys-libs/db/files/db-4.4-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-gcj.patch b/sys-libs/db/files/db-gcj.patch
new file mode 100644
index 00000000..673e160f
--- /dev/null
+++ b/sys-libs/db/files/db-gcj.patch
@@ -0,0 +1,11 @@
+--- db-4.4.20/dist/Makefile.in.orig 2006-02-23 00:43:11.000000000 +0100
++++ db-4.4.20/dist/Makefile.in 2006-02-23 00:47:27.000000000 +0100
+@@ -1801,7 +1801,7 @@
+ # Java API build rules.
+ ##################################################
+ db_java_wrap@o@: $(srcdir)/libdb_java/db_java_wrap.c
+- $(CC) $(CFLAGS) $?
++ $(CC) -I$(JAVA_HOME)/lib/gcc/$(CHOST)/4.1.0-pre20060219/include/ $(CFLAGS) $?
+
+ ##################################################
+ # Tcl API build rules.
diff --git a/sys-libs/db/files/digest-db-4.4.20 b/sys-libs/db/files/digest-db-4.4.20
new file mode 100644
index 00000000..b3e83bed
--- /dev/null
+++ b/sys-libs/db/files/digest-db-4.4.20
@@ -0,0 +1,3 @@
+MD5 33851f01b455cca48aa601956de93c6f db-4.4.20.tar.gz 8112163
+RMD160 1e62a7583c8064f1e8533e188db4644d6d047f66 db-4.4.20.tar.gz 8112163
+SHA256 56442966cf51a6eb81272f4ab4cec929dcb695a5081b187215afdc7cf7629a57 db-4.4.20.tar.gz 8112163