diff options
Diffstat (limited to 'abs/extra/dolphin-emu')
-rw-r--r-- | abs/extra/dolphin-emu/Dolphin_Logo.png | bin | 0 -> 62052 bytes | |||
-rw-r--r-- | abs/extra/dolphin-emu/PKGBUILD | 87 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/__changelog | 2 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/dolphin-emu.desktop | 11 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/dolphin-emu.install | 36 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/dolphin-emu.xml | 18 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/dolphin-emu_games.xml | 7 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/dolphin-emu_scan.sh | 46 | ||||
-rw-r--r-- | abs/extra/dolphin-emu/unistd.diff | 11 |
9 files changed, 218 insertions, 0 deletions
diff --git a/abs/extra/dolphin-emu/Dolphin_Logo.png b/abs/extra/dolphin-emu/Dolphin_Logo.png Binary files differnew file mode 100644 index 0000000..63450da --- /dev/null +++ b/abs/extra/dolphin-emu/Dolphin_Logo.png diff --git a/abs/extra/dolphin-emu/PKGBUILD b/abs/extra/dolphin-emu/PKGBUILD new file mode 100644 index 0000000..2c4d3b6 --- /dev/null +++ b/abs/extra/dolphin-emu/PKGBUILD @@ -0,0 +1,87 @@ +# Maintainer: schuay <jakob.gruber@gmail.com> +# Contributor: Jeremy Newton (Mystro256) +# Special thanks to the contributors of dolphin-emu-svn: for the icon, desktop file and some lines from the PKGBUILD +# Thanks to all that contributed! :) + +pkgname=dolphin-emu +pkgver=3.0 +pkgrel=11 +epoch=1 +pkgdesc="A GameCube and Wii emulator (stable git branch)" +arch=('i686' 'x86_64') +url="http://www.dolphin-emulator.com/" +license=('GPL2') + +makedepends=('git' 'cmake' 'glproto' 'opencl-headers') +depends=('sdl' 'libxxf86vm' 'libao' 'wxgtk' 'wiiuse' 'nvidia-cg-toolkit' \ + 'glew' 'mesa' 'libgl' 'openal' 'portaudio' 'lzo2') + +# Cannot be BUILT with sfml later than 1.6 +# IF YOU NEED SFML>=1.7 FOR SOMETHING ELSE, TRY REMOVING THE CONFLICT +# BELOW AND ONLY TEMPORARY UNINSTALLING SFML TO BUILD/INSTALL DOLPHIN +conflicts=('dolphin-emu-git' 'sfml>=1.7' 'sfml-git') +install="${pkgname}.install" +source=('dolphin-emu.desktop' + 'unistd.diff' + 'Dolphin_Logo.png' + 'dolphin-emu.xml' + 'dolphin-emu_games.xml' + 'dolphin-emu_scan.sh') + +_gitroot=https://code.google.com/p/dolphin-emu/ +_gitname=dolphin-emu-3.0 + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin 3.0 + msg "The local files are updated." + else + git clone "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + msg "Checking out at stable 3.0 branch" + git checkout 3.0 + + msg "GIT checkout done or server timeout" + + patch -Np2 < ${srcdir}/unistd.diff + + mkdir build && cd build + export CXXFLAGS="$CXXFLAGS -fpermissive" + cmake .. -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd "${srcdir}/dolphin-emu-3.0-build/build" + + make DESTDIR=${pkgdir} install + + mkdir -p "${pkgdir}"/usr/share/mythtv/themes/defaultmenu + mkdir -p "${pkgdir}"/usr/LH/bin + + install -Dm644 "${srcdir}/dolphin-emu.desktop" "${pkgdir}/usr/share/applications/dolphin-emu.desktop" + install -Dm644 "${srcdir}/Dolphin_Logo.png" "${pkgdir}/usr/share/pixmaps/dolphin-emu.png" + cp "${srcdir}/dolphin-emu.xml" "${pkgdir}/usr/share/mythtv/themes/defaultmenu" + cp "${srcdir}/dolphin-emu_games.xml" "${pkgdir}/usr/share/mythtv/themes/defaultmenu" + install -m755 "${srcdir}/dolphin-emu_scan.sh" "${pkgdir}/usr/LH/bin" +} + +# vim:set ts=2 sw=2 et: + +md5sums=('feed4580c2e6bfbc7f6c67dad861daae' + 'a463b96d02462b5f6b0894f6ced821ab' + 'd15c51f547b4bd47e510faac40bcc9d6' + 'ab7a9b9cfe03db65c881134c0f02bda0' + '1d03499e0abab56285bc97176d311bf1' + 'af44dd20626ce26d0a07dadc37c20233') diff --git a/abs/extra/dolphin-emu/__changelog b/abs/extra/dolphin-emu/__changelog new file mode 100644 index 0000000..cdd8871 --- /dev/null +++ b/abs/extra/dolphin-emu/__changelog @@ -0,0 +1,2 @@ +6/9/12 -chw- +Added install file, and mythtv menu files. diff --git a/abs/extra/dolphin-emu/dolphin-emu.desktop b/abs/extra/dolphin-emu/dolphin-emu.desktop new file mode 100644 index 0000000..96317d1 --- /dev/null +++ b/abs/extra/dolphin-emu/dolphin-emu.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Dolphin +Categories=Game;Emulator;GTK; +GenericName=GameCube and Wii Emulator +Comment=An emulator for the GameCube and Wii consoles +Exec=dolphin-emu +Icon=dolphin-emu +StartupNotify=false +Name[en_US]=Dolphin diff --git a/abs/extra/dolphin-emu/dolphin-emu.install b/abs/extra/dolphin-emu/dolphin-emu.install new file mode 100644 index 0000000..6acdd50 --- /dev/null +++ b/abs/extra/dolphin-emu/dolphin-emu.install @@ -0,0 +1,36 @@ +post_install() { + mv /usr/share/mythtv/themes/defaultmenu/game.xml /tmp + grep -v -e /mythmenu /tmp/game.xml > /tmp/game.xml.tmp + echo "<!--#Dolphin-Emu-->" >> /tmp/game.xml.tmp + echo " <button>" >> /tmp/game.xml.tmp + echo " <type>MENU_GAME</type>" >> /tmp/game.xml.tmp + echo " <text>Dolphin Emulator</text>" >> /tmp/game.xml.tmp + echo " <action>MENU dolphin-emu.xml</action>" >> /tmp/game.xml.tmp + echo " </button>" >> /tmp/game.xml.tmp + echo "<!--#Dolphin-Emu-->" >> /tmp/game.xml.tmp + echo "" >> /tmp/game.xml.tmp + echo "</mythmenu>" >> /tmp/game.xml.tmp + mv /tmp/game.xml.tmp /usr/share/mythtv/themes/defaultmenu/game.xml +} + +post_upgrade() { + mv /usr/share/mythtv/themes/defaultmenu/game.xml /tmp/game.xml.tmp + sed -e '/\#Dolphin-Emu/,/\#Dolphin-Emu/d' < /tmp/game.xml.tmp > /usr/share/mythtv/themes/defaultmenu/game.xml + mv /usr/share/mythtv/themes/defaultmenu/game.xml /tmp + grep -v -e /mythmenu /tmp/game.xml > /tmp/game.xml.tmp + echo "<!--#Dolphin-Emu-->" >> /tmp/game.xml.tmp + echo " <button>" >> /tmp/game.xml.tmp + echo " <type>MENU_GAME</type>" >> /tmp/game.xml.tmp + echo " <text>Dolphin Emulator</text>" >> /tmp/game.xml.tmp + echo " <action>MENU dolphin-emu.xml</action>" >> /tmp/game.xml.tmp + echo " </button>" >> /tmp/game.xml.tmp + echo "<!--#Dolphin-Emu-->" >> /tmp/game.xml.tmp + echo "" >> /tmp/game.xml.tmp + echo "</mythmenu>" >> /tmp/game.xml.tmp + mv /tmp/game.xml.tmp /usr/share/mythtv/themes/defaultmenu/game.xml +} + +post_remove() { + mv /usr/share/mythtv/themes/defaultmenu/game.xml /tmp/game.xml.tmp + sed -e '/\#Dolphin-Emu/,/\#Dolphin-Emu/d' < /tmp/game.xml.tmp > /usr/share/mythtv/themes/defaultmenu/game.xml +} diff --git a/abs/extra/dolphin-emu/dolphin-emu.xml b/abs/extra/dolphin-emu/dolphin-emu.xml new file mode 100644 index 0000000..5aaf1a1 --- /dev/null +++ b/abs/extra/dolphin-emu/dolphin-emu.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<mythmenu name="GAME"> + + <button> + <type>GAME</type> + <text>Scan for games</text> + <description></description> + <action>EXEC /usr/LH/bin/dolphin-emu_scan.sh</action> + </button> + + <button> + <type>GAME</type> + <text>Play Dolphin Games</text> + <description>Play video games</description> + <action>MENU dolphin-emu_games.xml</action> + </button> + +</mythmenu> diff --git a/abs/extra/dolphin-emu/dolphin-emu_games.xml b/abs/extra/dolphin-emu/dolphin-emu_games.xml new file mode 100644 index 0000000..fdd19d9 --- /dev/null +++ b/abs/extra/dolphin-emu/dolphin-emu_games.xml @@ -0,0 +1,7 @@ +<mythmenu name="DOLPHIN"> + <button> + <type>MENU_DOLPHIN</type> + <text>Please scan for games</text> + <action>UPMENU</action> + </button> +</mythmenu> diff --git a/abs/extra/dolphin-emu/dolphin-emu_scan.sh b/abs/extra/dolphin-emu/dolphin-emu_scan.sh new file mode 100644 index 0000000..804553e --- /dev/null +++ b/abs/extra/dolphin-emu/dolphin-emu_scan.sh @@ -0,0 +1,46 @@ +#!/bin/bash +#---------------------------------------------------------------------------- +. /etc/osd_cat.cfg || { + color=yellow + outline=2 + outlinecolour=black + shadow=0 + shadowcolour=black + font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" +} +#---------------------------------------------------------------------------- +EXTNS=('[eE][lL][fF]' '[dD][oO][lL]' '[gG][cC][mM]' '[iI][sS][oO]' '[cC][iI][sS][oO]' '[gG][cC][zZ]' '[wW][aA][dD]') +DIR=/myth/games/dolphin-emu/roms +rm -fr /tmp/dolphin* +echo -e "Scanning for games." | osd_cat --pos=middle --align=center --delay=2 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +for EXT in ${EXTNS[@]} +do + if [ -d "$DIR" ]; then + cd $DIR + ls *.$EXT >> /tmp/dolphin-emu.games + fi +done +sleep 3 +if [ -s /tmp/dolphin-emu.games ]; then + echo -e "Creating menu." | osd_cat --pos=middle --align=center --delay=2 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & + sleep 3 +else + echo -e "No games detected. Ensure you have your files in $DIR." | osd_cat --pos=middle --align=center --delay=4 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & + sleep 5 + exit 0 +fi + +echo "<mythmenu name=\"DOLPHIN\">" > /tmp/dolphin-emu_games.xml + +while read line +do + echo " <button>" >> /tmp/dolphin-emu_games.xml + echo " <type>MENU_DOLPHIN</type>" >> /tmp/dolphin-emu_games.xml + echo " <text>$(echo "$line" | sed 's/.\{4\}$//')</text>" >> /tmp/dolphin-emu_games.xml + echo " <action>EXEC /usr/bin/dolphin-emu -b -e $DIR/$(echo "$line" | sed "s/'/\\\\'/g" | sed 's/ /\\ /g')</action>" >> /tmp/dolphin-emu_games.xml + echo " </button>" >> /tmp/dolphin-emu_games.xml +done < /tmp/dolphin-emu.games +echo "</mythmenu>" >> /tmp/dolphin-emu_games.xml +sudo mv /tmp/dolphin-emu_games.xml /usr/share/mythtv/themes/defaultmenu/ +echo -e "Menu created." | osd_cat --pos=middle --align=center --delay=2 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +sleep 2 diff --git a/abs/extra/dolphin-emu/unistd.diff b/abs/extra/dolphin-emu/unistd.diff new file mode 100644 index 0000000..2b39063 --- /dev/null +++ b/abs/extra/dolphin-emu/unistd.diff @@ -0,0 +1,11 @@ +--- src/dolphin-emu-3.0/Source/Core/Common/Src/CommonFuncs.h 2012-04-07 10:47:47.595151504 +0200 ++++ src/dolphin-emu-3.0-build/Source/Core/Common/Src/CommonFuncs.h 2012-04-07 10:53:25.371113081 +0200 +@@ -18,6 +18,8 @@ + #ifndef _COMMONFUNCS_H_ + #define _COMMONFUNCS_H_ + ++#include <unistd.h> ++ + #ifdef _WIN32 + #define SLEEP(x) Sleep(x) + #else |