# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit nsplugins eutils perl-module toolchain-funcs IUSE="minimal joystick doc" MY_P="freewrl-${PV}" DESCRIPTION="VRML2 and X3D compliant browser" SRC_URI="mirror://sourceforge/freewrl/${MY_P}.tar.gz" HOMEPAGE="http://freewrl.sourceforge.net/" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" S="${WORKDIR}/${MY_P/%-?}" DEPEND=" media-gfx/imagemagick media-libs/libpng media-libs/jpeg media-libs/freetype media-sound/sox net-misc/wget sys-libs/zlib virtual/glut virtual/jdk virtual/opengl virtual/x11 x11-libs/Xaw3d || ( >=dev-java/saxon-bin-7.8 >=dev-java/saxon-7.8 ) >=dev-lang/perl-5.8.2 >=perl-core/Digest-MD5 >=dev-perl/HTML-Parser-2.25 >=perl-core/MIME-Base64-2.11 >=dev-perl/URI-1.04 >=dev-perl/libnet-1.0607 >=dev-perl/libwww-perl-5.47 " src_unpack() { perlinfo unpack ${MY_P}.tar.gz cd ${S} make realclean if ! use minimal; then # FIXME - need to use platform specific patch here # this patch works on Gentoo Linux x86 epatch "${FILESDIR}/enable-plugin.patch" else epatch "${FILESDIR}/disable-plugin.patch" fi epatch "${FILESDIR}/plugin-install.patch" epatch "${FILESDIR}/use-java-home.patch" # enable this for 1.16 and above # epatch "${FILESDIR}/disable-rpm.patch" } src_compile() { cd ${S} perl Makefile.PL make || die "make failed" if ! use minimal; then cd ${S}/Plugin make OPTIMIZER="$CFLAGS -DPIC -fPIC" || die "make failed" fi } src_install() { cd ${S} dodir /usr/$(get_libdir)/${PLUGINS_DIR} make DESTDIR=${D} install || die "make install failed" insinto /usr/$(get_libdir)/${PLUGINS_DIR} doins java/classes/vrml.jar }