# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="An advanced NES, GB/GBC/GBA, TurboGrafx16, SuperGrafx, and Lynx emulator." HOMEPAGE="http://mednafen.com/" SRC_URI="http://mednafen.com/releases/${PN}-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" # FIXME: An X use flag would also be appropriate if SDL is set -X and +directfb or similar IUSE="opengl" # FIXME: To use SDL framebuffer "-vdriver 1" should be set at runtime. # Is there a way to do this automatically for -opengl use flag? RDEPEND="opengl? ( virtual/opengl ) sys-libs/zlib media-libs/libsndfile dev-libs/libcdio media-libs/libsamplerate media-libs/sdl-net media-libs/libsdl media-libs/libvorbis" # The following likely still applies to Mednafen as it uses FCE Ultra code. # Because of code generation bugs, FCEUltra now depends on a version # of gcc greater than or equal to GCC 3.2.2. DEPEND="${RDEPEND} >=sys-devel/gcc-3.2.2" S=${WORKDIR}/${PN} src_compile() { egamesconf \ --disable-dependency-tracking \ $(use_with opengl) || die "egamesconf failed" emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS README NEWS TODO ChangeLog prepalldocs dohtml Documentation/* prepgamesdirs }