# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/antlr-3.1.3-r3.ebuild,v 1.1 2013/09/03 21:01:33 tomwij Exp $ EAPI="2" JAVA_PKG_IUSE="source" inherit java-pkg-2 java-ant-2 DESCRIPTION="A parser generator for C++, C#, Java, and Python" HOMEPAGE="http://www.antlr.org/" SRC_URI="https://github.com/${PN}/${PN}4/archive/${PV}.zip" LICENSE="BSD" SLOT="4" KEYWORDS="amd64 ~arm ~ia64 ppc ppc64 x86 ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="gunit" COMMON_DEPEND=">=dev-java/stringtemplate-3.2:0 gunit? ( dev-java/junit:4 )" RDEPEND=">=virtual/jre-1.6 ${COMMON_DEPEND}" DEPEND="${RDEPEND} >=virtual/jdk-1.6" S="${WORKDIR}/${PN}4-${PV}" src_compile() { eant -f build.xml } src_install() { # Single jar like upstream java-pkg_dojar dist/antlr-4.4-complete.jar java-pkg_dolauncher antlr4 --main org.antlr.v4.Tool use gunit && java-pkg_dolauncher gunit --main org.antlr.v4.gunit.Interp use source && java-pkg_dosrc tool/src/main/org \ runtime/Java/src/main/java/org/ } pkg_postinst() { elog "Currently the ebuild only has support for the Java backend." }