# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 EGIT_REPO_URI="https://git01.codeplex.com/pcsxr" inherit games git-r3 cmake-utils DESCRIPTION="PCSX-Reloaded: a fork of PCSX, the discontinued Playstation emulator" HOMEPAGE="http://pcsxr.codeplex.com" LICENSE="GPL-2" SLOT="0" KEYWORDS="" IUSE="alsa cdio openal opengl oss pulseaudio +sdl-sound" RDEPEND="x11-libs/gtk+:3 media-libs/libsdl sys-libs/zlib app-arch/bzip2 x11-libs/libXv x11-libs/libXtst alsa? ( media-libs/alsa-lib ) openal? ( media-libs/openal ) opengl? ( virtual/opengl x11-libs/libXxf86vm ) pulseaudio? ( >=media-sound/pulseaudio-0.9.16 ) cdio? ( dev-libs/libcdio )" DEPEND="${RDEPEND} !games-emulation/pcsx !games-emulation/pcsx-df x86? ( dev-lang/nasm )" REQUIRED_USE="^^ ( alsa openal oss pulseaudio sdl-sound )" CMAKE_BUILD_TYPE=Release CMAKE_USE_DIR="${S}/pcsxr" CMAKE_MIN_VERSION="3.4.0" pkg_setup() { use alsa && sound_backend="alsa" use pulseaudio && sound_backend="pulse" use oss && sound_backend="oss" use openal && sound_backend="openal" use sdl-sound && sound_backend="sdl" elog "Using ${sound_backend} sound" games_pkg_setup } src_prepare() { # fix plugin path for i in $(grep -irl 'games/psemu' *); do sed -i "$i" \ -e "s:games/psemu:psemu:g" \ || die "sed failed" done cmake-utils_src_prepare } src_configure() { local mycmakeargs=( "-DSND_BACKEND=${sound_backend}" $(cmake-utils_use_build opengl OPENGL) $(cmake-utils_use_use cdio LIBCDIO) "-DCMAKE_BUILD_TYPE=Release" ) cmake-utils_src_configure } src_install() { cmake-utils_src_install prepgamesdirs }