# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit java-pkg DESCRIPTION="Java Bindings for OpenGL." HOMEPAGE="https://jogl.dev.java.net/" # These are nightly snapshots from cvs! AT="jogl-1.1.0-b04-src.tar.gz" SRC_URI="https://games-binaries.dev.java.net/build/jogl/${AT}" LICENSE="BSD" SLOT="0" KEYWORDS="~x86" IUSE="doc" S="${WORKDIR}/jogl" DEPEND=">=dev-java/ant-1.5.3 >=dev-java/antlr-2.7.2 >=virtual/jdk-1.4 virtual/opengl" RDEPEND=">=virtual/jdk-1.4 virtual/opengl" src_compile() { # Clear the classpath CLASSPATH="." # This property is needed for JOGL's build.xml ANTLR="-Dantlr.jar=/usr/share/antlr/lib/antlr.jar" # build.xml is located inside the make directory cd make # Ant is called by its main class because it is needed to run it with the modified # classpath. The wrapper script has its own mechanism to handle the classpath and # would override any changes. ant ${ANTLR} linux || { eerror "Compiling jogl failed. Please make sure that ant was built with antlr support!" eerror " Make sure that antlr is emerged, then re-emerge ant." die } # Build documentation if the doc use flag is set if [ `use doc` ]; then einfo "Building documentation" ant ${ANTLR} javadoc || { eerror "Failed to build documentation." die } fi } src_install() { # Install the jogl main library as a Java package java-pkg_dojar build/jogl.jar # Install the native library dolib.so build/obj/libjogl.so # Install the documentation if the doc USE flag is set if [ `use doc` ]; then dohtml -r javadoc_public/* fi }