summaryrefslogtreecommitdiff
blob: 2c61c01ef26daecba0cfb5064736c5be1e1c40e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/jabref/jabref-1.6.ebuild,v 1.2 2005/01/01 16:22:26 eradicator Exp $

inherit java-pkg

DESCRIPTION="GUI frontend for BibTeX, written in Java"
HOMEPAGE="http://jabref.sourceforge.net/"
SRC_URI="mirror://sourceforge/jabref/JabRef-${PV}-src.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~sparc ~ppc ~amd64"
IUSE="jikes"

DEPEND=">=virtual/jdk-1.4
	>=dev-java/ant-1.4.1
	jikes? ( dev-java/jikes )"
RDEPEND=">=virtual/jre-1.4
	>=dev-java/antlr-2.7.3
	>=dev-java/jgoodies-looks-bin-1.2.2
	>=dev-java/commons-logging-1.0.4
	>=dev-java/commons-httpclient-2"

src_unpack() {
	unpack ${A}
	cd ${S}/lib
	rm -f *.jar

	java-pkg_jar-from antlr
	java-pkg_jar-from jgoodies-looks-bin jgoodies-looks-bin.jar looks-1.2.2.jar
	java-pkg_jar-from commons-logging commons-logging.jar
	java-pkg_jar-from commons-httpclient commons-httpclient.jar commons-httpclient-2.0.jar
}


src_compile() {
	local antflags="compile unjarlib jars"
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
	ant ${antflags} || die "compile problem"
}

src_install() {
	java-pkg_dojar build/lib/${PN}.jar

	echo "#!/bin/sh" > ${PN}
	echo "cd /usr/share/${PN}" >> ${PN}
	echo '${JAVA_HOME}'/bin/java -jar lib/${PN}.jar '$*' >> ${PN}

	dobin ${PN}
}