This ebuild comes with the hotfix as well, if you want to use it please consider using my overlay instead since it also contains rc init script and config files (from Thilo Bangert overlay).

 

[code]# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit java-utils-2 java-pkg-2 java-ant-2

MY_P=${P/_/}
S=${WORKDIR}/${MY_P}

DESCRIPTION="Open Source Flash Server written in Java"
HOMEPAGE="http://osflash.org/red5"
#SRC_URI="http://red5.fr/release/${PV}/tar/${PN}-${PV}.tar.gz"
SRC_URI="http://red5.nl/installer/red5-0.7.0.tar.gz"
LICENSE="LGPL-2.1"
SLOT="1"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples source"
DEPEND=">=virtual/jdk-1.5
        >=dev-java/ant-core-1.5"
RDEPEND=">=virtual/jdk-1.5"

RED5_HOME=/opt/red5

pkg_setup() {
        enewgroup red5
        enewuser red5 -1 -1 ${RED5_HOME} red5
}

src_compile() {
        echo >> build.properties
        echo "java.target_version=$(java-pkg_get-vm-version)" >> build.properties
        mkdir ${WORKDIR}/ivycache
        echo "ivy.default.ivy.user.dir=${WORKDIR}/ivycache" >> build.properties
        cp ${FILESDIR}/ivysettings.xml ./
        eant
        rm red5.jar
        if has_version ">=virtual/jdk-1.6"; then
                wget http://red5.googlecode.com/svn/trunk/snapshots/070hotfix.zip \
                        || die "Cannot download hotfix"
                unzip 070hotfix.zip
                rm 070hotfix.zip
        else
                wget http://red5.googlecode.com/svn/trunk/snapshots/070hotfix_java5.zip \
                        || die "Cannot download hotfix"
                unzip 070hotfix_java5.zip
                rm 070hotfix_java5.zip
        fi
        wget http://red5.googlecode.com/svn/trunk/repository/jetty/jetty-6.1.8.jar \
                http://red5.googlecode.com/svn/trunk/repository/jetty/jetty-util-6.1.8.jar \
                http://red5.googlecode.com/svn/trunk/repository/jetty/jetty-xbean-6.1.8.jar \
                || die "Cannot download hotfix"
        rm lib/jetty-6.1.7.jar lib/jetty-util-6.1.7.jar lib/jetty-xbean-6.1.7.jar
        mv jetty-6.1.8.jar jetty-util-6.1.8.jar jetty-xbean-6.1.8.jar lib/
}

src_install() {
        newinitd "${FILESDIR}"/red5.initd red5
        newconfd "${FILESDIR}"/red5.confd red5
        doenvd "${FILESDIR}"/21red5

        if ! use source ; then
                rm -rf test
                rm -rf bin
                rm -rf src
                rm -rf swf
                rm -f build.xml
                rm -f build.properties
                rm -f Makefile
        fi
        if use doc ; then
                dodoc doc/*
        fi
        rm -rf doc

        keepdir /var/lib/red5-webapps
        fowners red5:red5 /var/lib/red5-webapps/

        if use examples ; then
                insopts -m0644
                insinto /var/lib/red5-webapps
                doins -r dist/webapps/*
                fowners -R red5:red5 /var/lib/red5-webapps/
        fi

        dosym /var/lib/red5-webapps ${RED5_HOME}/webapps

        insinto /var/lib/red5-webapps
        doins  webapps/red5-default.xml
        fowners red5:red5 /var/lib/red5-webapps/red5-default.xml

        rm -rf webapps

        rm -rf dumps
        rm -rf bin
        rm -rf dist
        rm -rf *.bat

        cp -rp * "${D}/${RED5_HOME}"
        fowners -R red5:red5 ${RED5_HOME}
        fperms 0750 ${RED5_HOME}/red5.sh
}[/code]