# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
SLOT=0
LICENSE='LGPL-2'
KEYWORDS='~x86'
DESCRIPTION='rubygame is a library for interactive digital media in\
the ruby programming language'
SRC_URI='http://heanet.dl.sourceforge.net/sourceforge/rubygame/rubygame-2.0.1.tar.bz2'
HOMEPAGE='http://rubygame.sourceforge.net'
IUSE='gfx mixer image truetype opengl'
RDEPEND="virtual/ruby
dev-ruby/rake
>=media-libs/libsdl-1.2.7
gfx?( >=media-libs/sdl-gfx-2.0.10 )
image?( >=media-libs/sdl-image-1.2.3 )
mixer?( >=media-libs/sdl-mixer-1.2.7 )
truetype?( >=media-libs/sdl-ttf-2.0.6 )"
src_compile() {
RUBYGAME_CONFIG=""
if use gfx; then RUBYGAME_CONFIG+="--gfx "; else RUBYGAME_CONFIG+="--no-gfx "; fi;
if use image; then RUBYGAME_CONFIG+="--image "; else RUBYGAME_CONFIG+="--no-image "; fi;
if use truetype; then RUBYGAME_CONFIG+="--ttf "; else RUBYGAME_CONFIG+="--no-ttf "; fi;
if use opengl; then RUBYGAME_CONFIG+="--opengl "; else RUBYGAME_CONFIG+="--no-opengl "; fi;
export RUBYGAME_CONFIG || die "export of RUBYGAME_CONFIG failed"
rake build || die "build failed"
}
src_install() {
rake install || die "install failed"
}