# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils java-pkg-2 java-utils-2 DESCRIPTION="Java subtitle editor" HOMEPAGE="http://www.panayotis.com/jubler/" SRC_URI="mirror://sourceforge/${PN}/Jubler-fullsrc-3.0.0-rc4.tar.bz2" LICENSE="GPL" SLOT="0" KEYWORDS="~x86" IUSE="nls spell" RDEPEND=">=virtual/jre-1.5 spell? ( app-text/aspell )" DEPEND=">=virtual/jdk-1.5 nls? ( sys-devel/gettext )" S=${WORKDIR}/Jubler-3.0.0-rc4 src_unpack() { java-pkg_ensure-vm-version-sufficient 1.5 unpack ${A} cd ${S}/src cp com/panayotis/jubler/time/TimeFormatter.java com/panayotis/jubler/time/TimeFormatterFactory.java epatch ${FILESDIR}/timeformatter.patch epatch ${FILESDIR}/ffdecode.patch epatch ${FILESDIR}/os.patch cd ${S} epatch ${FILESDIR}/ffdecode_makefile.patch } src_compile() { chmod +x resources/ffmpeg-cvs/configure.patched chmod +x resources/ffmpeg-cvs/build_avopt chmod +x resources/ffmpeg-cvs/clean-diff chmod +x resources/ffmpeg-cvs/unwrap-diff if use nls; then cd resources/i18n sh compile cd ../../src else cd src fi for i in `find . -name '*.java' -print`; do echo "Compiling $i"; ejavac $i; done find . -name '*.class' -print > classes.list find . -name '*icons*' -print >> classes.list find . -name '*.prop*' -print >> classes.list echo "Main-Class: com.panayotis.jubler.Main" > myManifest jar cmf myManifest Jubler.jar @classes.list cd ../resources/ffdecode make linux } src_install() { cd ${S} java-pkg_newjar src/Jubler.jar ${PN}.jar java-pkg_doso resources/ffdecode/libffdecode.so newicon src/icons/frame.png jubler.png newbin ${FILESDIR}/jubler jubler insinto /usr/share/applications doins "${FILESDIR}/jubler.desktop" }