# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Nonofficial ebuild by Ycarus. For new version look here : http://gentoo.zugaina.org/
# This ebuild is a small modification of the official jgoodies-look ebuild

inherit java-pkg

DESCRIPTION="JGoodies Looks Library"
DESCRIPTION_FR="Librairie JGoodies Looks"
HOMEPAGE="http://www.jgoodies.com/"
SRC_URI="http://www.jgoodies.com/download/libraries/looks-1_3_rc-20050308.zip"

RESTRICT="nomirror"

LICENSE="BSD"
SLOT="1.3"
KEYWORDS="~x86 ~amd64 ~ppc ~sparc"
IUSE="doc jikes"

DEPEND=">=virtual/jre-1.4
		>=dev-java/ant-core-1.4
		  app-arch/unzip
		jikes? ( >=dev-java/jikes-1.21 )"
RDEPEND=">=virtual/jre-1.4"

S="${WORKDIR}/looks-1.3rc"

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

	rm *.jar
	mkdir ${S}/srcdir
	unzip -d ${S}/srcdir -q looks-1.3rc-src.zip  || die "Unpack Failed"
	cp ${FILESDIR}/${PV}-build.xml ./build.xml
	cp ${FILESDIR}/plastic.txt .
}

src_compile() {
	local antflags="jar"
	use doc && antflags="${antflags} docs"
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
	ant ${antflags} || die "Compile failed"
}

src_install() {
	java-pkg_dojar dist/looks.jar

	dodoc LICENSE.txt RELEASE-NOTES.txt
	if use doc ; then
		java-pkg_dohtml -r build/doc
	fi
}
