# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="3" inherit eutils flag-o-matic games subversion DESCRIPTION="Free. open source emulator for Nintendo GameCube and Wii" HOMEPAGE="http://www.dolphin-emu.com/" SRC_URI="" ESVN_REPO_URI="http://dolphin-emu.googlecode.com/svn/trunk/" ESVN_PROJECT="dolphin-emu-read-only" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~ppc ~ppc64" IUSE="doc openal opencl -nowx portaudio" RESTRICT="" RDEPEND="dev-libs/lzo >=media-libs/glew-1.5 media-libs/jpeg media-libs/libao >=media-libs/libsdl-1.2[joystick] net-wireless/bluez sys-libs/zlib x11-libs/cairo x11-libs/libXxf86vm x11-libs/libXext >=x11-libs/wxGTK-2.8 virtual/opengl openal? ( media-libs/openal ) portaudio? ( media-libs/portaudio )" DEPEND="${RDEPEND} dev-util/scons dev-util/pkgconfig media-gfx/nvidia-cg-toolkit" src_compile() { cd "${S}" # run "scons -h" to get a complete list of options local sconsopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }") scons ${sconsopts} \ nowx=$(use nowx && echo "true" || echo "false") \ opencl=$(use opencl && echo "true" || echo "false") \ shared_glew=true \ shared_lzo=true \ shared_sdl=true \ shared_zlib=true \ shared_sfml=false \ shared_soil=false \ verbose=false \ || die "scons build failed" } src_install() { # set source directories local bindir="${S}/Binary/$(uname -s)-$(uname -m)" if use nowx; then local binary="${PN}-nogui" else local binary="${PN}" fi # set destination directories local destdir="${GAMES_DATADIR}/${PN}" insinto "${destdir}" exeinto "${destdir}" # install developer documentation if use doc; then doins -r "${S}/docs" fi dodoc Readme.txt # install application doins -r "${bindir}"/{sys,plugins} || die "failed to install data" if [ -d "${bindir}"/lib ]; then doins "${bindir}"/lib/* || die "failed to install libraries" fi doexe "${bindir}/${binary}" || die "failed to install binary" # create bin wrapper games_make_wrapper "${PN}" "${destdir}/${binary}" "${destdir}" # create menu entry for GUI builds if ! use nowx; then doicon "${S}/Source/Core/DolphinWX/resources/Dolphin.xpm" || die make_desktop_entry "${PN}" "Dolphin" "Dolphin" "Game;Emulator" fi prepgamesdirs # set shared permissions on user folder # removed and the doins moved above once ~/.dolphin-emu support is fixed # Note: this must come after prepagmesdir because of permissions insopts "-g games -o nobody -m660" diropts "-g games -o nobody -m770" insinto "${destdir}" doins -r "${bindir}"/user || die "failed to install user data" } pkg_postinst() { echo if ! use portaudio; then ewarn "If you need to use your microphone for a game, rebuild with USE=portaudio" echo fi if use nowx; then ewarn "Note: It is not currently possible to configure Dolphin without the GUI." ewarn "Rebuild with USE=-nowx to enable the GUI if needed." echo fi # commented out to preserve user dir permissions #games_pkg_postinst }