# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="3" JAVA_PKG_IUSE="doc" inherit eutils java-pkg-2 java-ant-2 git DESCRIPTION="GlueGen is a tool which automatically generates the Java and JNI code necessary to call C libraries" HOMEPAGE="https://gluegen.dev.java.net" EGIT_REPO_URI="http://jogamp.org/git/gluegen.git" EGIT_COMMIT="v2.0-rc2" LICENSE="BSD" SLOT="0" KEYWORDS="" #KEYWORDS="~amd64" RDEPEND=">=virtual/jre-1.6" DEPEND=">=virtual/jdk-1.6 dev-java/ant-core:0 dev-java/ant >=dev-java/junit-4.6 dev-java/ant-antlr dev-java/antlr:0 dev-java/cpptasks:0" IUSE="" EANT_GENTOO_CLASSPATH="ant-antlr" EANT_BUILD_TARGET="all" src_prepare() { p=`pwd` rm -v make/lib/*.jar || die rm -Rf build java-pkg_jar-from --build-only --into make/lib ant-antlr java-pkg_jar-from --build-only --into make/lib ant-core java-pkg_jar-from --build-only --into make/lib cpptasks java-pkg_jar-from --build-only --into make/lib antlr java-pkg_jar-from --build-only --into make/lib junit-4 java-pkg_jar-from --build-only --into make/lib ant-contrib java-ant_rewrite-classpath "make/build.xml" } src_compile() { cd make || die "Unable to enter make directory" local gcp="$(java-pkg_getjars ant-core,junit-4):$(java-config --tools)" eant -lib lib -Dgentoo.classpath="${gcp}" all } src_install() { use doc && dohtml doc/manual cd build || die "Unable to enter build directory" #build copies system antlr.jar here. #So we just need to replace it. java-pkg_jar-from antlr rm "${PN}-rt-natives"*.jar java-pkg_dojar *.jar java-pkg_doso obj/*.so #If we are going to install the source #use source && java-pkg_dosrc src }