# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit autotools eutils games DESCRIPTION="" HOMEPAGE="" SRC_URI="${P}.zip" LICENSE="GPL-2 public-domain" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="alsa cdio ffmpeg nls openal opengl oss pulseaudio sdl sdl2" RDEPEND="dev-libs/glib:2= x11-libs/gtk+:3= x11-libs/libX11:0= x11-libs/libXext:0= x11-libs/libXtst:0= x11-libs/libXv:0= sys-libs/zlib:0= alsa? ( media-libs/alsa-lib:0= ) cdio? ( dev-libs/libcdio:0= ) ffmpeg? ( virtual/ffmpeg:0= ) nls? ( virtual/libintl:0= ) openal? ( media-libs/openal:0= ) opengl? ( virtual/opengl:0= x11-libs/libXxf86vm:0= ) pulseaudio? ( media-sound/pulseaudio:0= ) !sdl2? ( media-libs/libsdl:0= !media-libs/libsdl2 ) sdl2? ( media-libs/libsdl2:0= )" DEPEND="${RDEPEND} nls? ( sys-devel/gettext:0 ) dev-util/intltool:0 x11-proto/videoproto:0 x86? ( dev-lang/nasm:0 )" REQUIRED_USE="?? ( alsa openal oss pulseaudio sdl )" # it's only the .po file check that fails :) RESTRICT=test S=${WORKDIR}/${PN} src_prepare() { epatch_user eautoreconf } src_configure() { local sound_backend if use alsa; then sound_backend=alsa elif use oss; then sound_backend=oss elif use pulseaudio; then sound_backend=pulseaudio elif use sdl; then sound_backend=sdl elif use openal; then sound_backend=openal else sound_backend=null fi local myeconfargs=( $(use_enable nls) $(use_enable cdio libcdio) $(use_enable opengl) $(use_enable ffmpeg ccdda) --enable-sound=${sound_backend} # pcsxr appends 'games' already, no point in /usr/games here --libdir=/usr/$(get_libdir) ) egamesconf "${myeconfargs[@]}" } src_install() { default prune_libtool_files --all }