# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-java/javacup/javacup-0.10k-r1.ebuild,v 1.4 2006/12/07 22:51:24 flameeyes Exp $ inherit java-pkg-2 java-ant-2 eutils DESCRIPTION="CUP Parser Generator for Java" HOMEPAGE="http://www2.cs.tum.edu/projects/cup/" SRC_URI="http://tfkyle.dyndns.org/~kyle/distfiles/javacup-0.11a_beta20060608.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="source" DEPEND=">=virtual/jdk-1.3 source? ( app-arch/zip )" RDEPEND=">=virtual/jre-1.3" S="${WORKDIR}/develop" # XXX: For some reason the ant task this comes with doesn't work - I've no # idea what the problem is or how to fix it src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}/${P}-fix_flex.patch" find . -name "*.class" -exec rm -f {} \; } src_compile() { cp "${FILESDIR}/manifest" ./ # yay bootstrapping cd "${S}/src/java_cup" java -jar "${S}/bin/java-cup-11.jar" "${S}/cup/parser.cup" java -jar "${S}/bin/JFlex.jar" "${S}/flex/Lexer.jflex" mv "${S}/flex/Lexer.java" ./ cd "${S}/src" ejavac -classpath ../bin/JFlex.jar java_cup/*.java java_cup/runtime/*.java ejavac -classpath .:$(java-config -p ant-core) java_cup/anttask/*.java find java_cup -name "*.class" | xargs jar -cvmf ../manifest ${PN}.jar } src_install() { java-pkg_dojar "${S}/src/${PN}.jar" dodoc CHANGELOG README dohtml manual.html use source && java-pkg_dosrc "${S}/src/java_cup" }