# Copyright 1999-2007 Gentoo Foundation# Distributed under the terms of the GNU General Public License v2# $Header: $inherit eutilsSLOT=0LICENSE='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/rubydev-ruby/rake>=media-libs/libsdl-1.2.7gfx?( >=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() { sitelibdir=$(/usr/bin/ruby -r rbconfig -e 'print Config::CONFIG["sitedir"]'); archlibdir=$(/usr/bin/ruby -r rbconfig -e 'print Config::CONFIG["archdir"]'); 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; RUBYGAME_CONFIG+=" --sitearchdir ${D}/${archlibdir} --sitelibdir ${D}/${sitelibdir}" export RUBYGAME_CONFIG || die "export of RUBYGAME_CONFIG failed" rake build || die "build failed"}src_install() { rake install || die "install failed"}