# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 inherit eutils git DESCRIPTION="Self-contained Super Nintendo emulation core" HOMEPAGE="https://github.com/Themaister/libsnes" SRC_URI="" EGIT_REPO_URI="git://github.com/Themaister/${PN}.git" EGIT_COMMIT="v${PV/./}" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~x86" IUSE="profile_accuracy +profile_compatibility profile_performance" REQUIRED_USE="^^ ( profile_accuracy profile_compatibility profile_performance )" RDEPEND="" DEPEND=">=sys-devel/gcc-4.4 !dev-games/snes9x-libsnes" src_prepare() { epatch "${FILESDIR}"/${PN}-0.82-makefile.patch # Set accuracy/performance profile if use profile_accuracy; then sed -i -e 's/^\(profile := \).*$/\1accuracy/' Makefile || die 'sed failed' elif use profile_compatibility; then sed -i -e 's/^\(profile := \).*$/\1compatibility/' Makefile || die 'sed failed' elif use profile_performance; then sed -i -e 's/^\(profile := \).*$/\1performance/' Makefile || die 'sed failed' fi } src_install() { dolib.so out/libsnes.so || die "libsnes.so install failed" dolib.a out/libsnes.a || die "libsnes.a install failed" insinto /usr/include doins snes/libsnes/libsnes.hpp || die "libsnes.hpp install failed" }