summaryrefslogtreecommitdiff
blob: ab86698f77e23c59f1f918c2314a14f50580ac00 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/htmlparser/htmlparser-1.3.ebuild,v 1.4 2005/02/06 01:45:30 luckyduck Exp $

inherit java-pkg

DESCRIPTION="HTML Parser is a Java library used to parse HTML in either a linear or nested fashion."

HOMEPAGE="http://htmlparser.sourceforge.net/"
MY_P=${P/-}
MY_P=${MY_P//./_}
SRC_URI="mirror://sourceforge/htmlparser/${MY_P}.zip"
LICENSE="LGPL-2.1"
SLOT="${PV}"
KEYWORDS="x86 amd64"
IUSE="doc"
DEPEND=">=virtual/jdk-1.4
		app-arch/unzip
		dev-java/ant"
RDEPEND=">=virtual/jre-1.4"

S=${WORKDIR}/${MY_P}

src_unpack() {
	unpack ${A}
	cd ${S}
	rm -rf lib docs
	unzip src.zip
}

src_compile() {
	local antflags="jar"
	use doc && antflags="${antflags} javadoc"
	ant ${antflags} || die "failed to compile"
}

src_install() {
	java-pkg_dojar release/${MY_P}/lib/htmlparser.jar
	dodoc readme.txt
	use doc && java-pkg_dohtml -r docs/
}