summaryrefslogtreecommitdiff
blob: 18056f37729134999cdece2f4081c2c292a03ab2 (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
51
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jexcelapi/jexcelapi-2.5.1.ebuild,v 1.1 2005/01/23 14:50:15 luckyduck Exp $

inherit eutils java-pkg

MY_P="${P//-/_}"
MY_P="${MY_P//./_}"

DESCRIPTION="A Java API to read, write, and modify Excel spreadsheets"
HOMEPAGE="http://jexcelapi.sourceforge.net/"
SRC_URI="mirror://sourceforge/jexcelapi/${MY_P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="2.5"
KEYWORDS="~x86 ~amd64"

IUSE="doc jikes"
DEPEND=">=virtual/jdk-1.3
		dev-java/ant-core
		jikes? ( dev-java/jikes )"
RDEPEND=">=virtual/jre-1.3"
RESTRICT="nomirror"

S=${WORKDIR}/${PN}

src_unpack() {
	unpack ${A}

	cd ${S}
	epatch ${FILESDIR}/${PV}-jikes.patch

	rm -rf jxl.jar docs
}

src_compile() {
	local antflags="jxl"
	use doc && antflags="${antflags} docs"
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"

	cd ${S}/build
	ant ${antflags} || die "ant failed"
}

src_install() {
	mv jxl.jar ${PN}.jar
	java-pkg_dojar ${PN}.jar

	java-pkg_dohtml index.html tutorial.html
	use doc && java-pkg_dohtml -r docs/*
}