summaryrefslogtreecommitdiff
blob: 8575c83e800b9fb09a86809a9f81b39080578dfb (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
52
53
54
55
56
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/higlayout/higlayout-1.0-r1.ebuild,v 1.4 2007/10/27 14:01:14 angelos Exp $

inherit java-pkg-2

DESCRIPTION="Java Swing layout manager that's powerful and easy to use"

HOMEPAGE="http://www.autel.cz/dmi/tutorial.html"
SRC_URI="http://www.autel.cz/dmi/HIGLayout${PV}.zip"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE="doc examples source"
DEPEND=">=virtual/jdk-1.4
	app-arch/unzip
	source? ( app-arch/zip )"
RDEPEND=">=virtual/jre-1.4"

S="${WORKDIR}"

src_unpack() {
	unpack ${A}
	cd "${S}"

	mkdir classes api
	cd tutorial
	for d in *.GIF;
	do
		mv $d $(basename $d .GIF).gif
	done
}

src_compile() {
	ejavac -d classes src/cz/autel/dmi/*.java || die "failed to compile sources"
	jar -cf higlayout.jar -C classes cz || die "failed to create .jar"
	if use doc; then
		javadoc -author -version -d api src/cz/autel/dmi/*.java \
			|| die "javadoc failed"
	fi
}

src_install() {
	java-pkg_dojar ${PN}.jar
	dodoc *.txt
	if use doc; then
		dohtml -r tutorial
		java-pkg_dojavadoc api
	fi
	if use examples; then
		dodir /usr/share/doc/${PF}/examples
		insinto /usr/share/doc/${PF}/examples
		doins examples/*
	fi
	use source && java-pkg_dosrc src/cz
}