summaryrefslogtreecommitdiff
blob: ca50fcb6bee6657057a02fef9fc9494f527bfc28 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jcalendar/jcalendar-1.3.2.ebuild,v 1.2 2007/01/21 18:05:41 flameeyes Exp $

inherit eutils java-pkg-2 java-ant-2

DESCRIPTION="Java date chooser bean for graphically picking a date."
SRC_URI="http://www.toedter.com/download/${P}.zip"
HOMEPAGE="http://www.toedter.com/en/jcalendar/"
LICENSE="LGPL-2.1"
SLOT="1.2"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE="doc source"
COMMON_DEPEND="=dev-java/jgoodies-looks-1.2*"
RDEPEND=">=virtual/jdk-1.4
	${COMMON_DEPEND}"
DEPEND=">=virtual/jdk-1.4
	>=dev-java/ant-core-1.4
	>=app-arch/unzip-5.50-r1
	${COMMON_DEPEND}"

S=${WORKDIR}

# NOTE: build.xml contains no tests

src_unpack() {
	unpack ${A}

	cd ${S}/lib
	rm -f *.jar
	java-pkg_jar-from jgoodies-looks-1.2 looks.jar looks-1.2.2.jar
}

src_compile() {
	# 'javadoc' target removes jcalendar.jar so we must call 'dist' instead
	# to get both jcalendar.jar and javadoc
	local antflags=""
	if use doc ; then
		antflags="dist"
	else
		antflags="jar"
	fi
	eant -f src/build.xml ${antflags}
}

src_install() {
	java-pkg_newjar lib/${P}.jar ${PN}.jar

	dodoc readme.txt
	use doc && java-pkg_dojavadoc doc
	use source && java-pkg_dosrc src/com
}