# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PV=${PV:0:5} MY_P=${PN}-${MY_PV} DESCRIPTION="Open source computer assisted translation (CAT) tool written in Java." HOMEPAGE="http://www.omegat.org/" SRC_URI="mirror://sourceforge/omegat/OmegaT_src_${PV}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=virtual/jdk-1.4" RDEPEND=">=virtual/jre-1.4" MY_INSTALL_DIR="/opt/${MY_P}" src_unpack() { cd ${WORKDIR} unpack ${A} # Fix the path for help documents # It's statically set to the user's home directory in the source. local helpPath="\/usr\/share\/doc\/${PF}\/html" sed -i "s/\(.*HELP_DIR.*=.*\"\)docs\(\".*\)/\1$helpPath\2/g" \ src/org/omegat/util/OConsts.java epatch ${FILESDIR}/1.4.5.04-helppath.patch } src_compile() { cd ${WORKDIR} # If javadoc.additionalparam isn't there, we get an error ant "jar" "-Djavadoc.additionalparam=" } src_install() { cd ${WORKDIR} mv dist/OmegaT.jar dist/omegat.jar insinto ${MY_INSTALL_DIR} doins -r dist/* # Startup script exeinto /usr/bin make_startup_script # Docs rm -r release/OmegaT* release/win32* dodoc release/* dohtml -r docs/* # Icons and stuff insinto ${MY_INSTALL_DIR}/share doins images/* # Desktop entry insinto /usr/share/applications make_desktop_file } function make_startup_script() { local file="${PN}" cat > $file < $file <