# Maintainer: Jeremy Newton (Mystro256)
# 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=6
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' 'glew1.6' 'mesa' 'libgl')
provides=("dolphin-emu=${pkgver}-${pkgrel}")
# 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-no-svn-config-dir-svn' 'dolphin-emu-git' 'dolphin-emu-svn' 'dolphin-emu-svn-bin' 'dolphin-emu-svn-bin' 'sfml>=1.7' 'sfml-git')
source=('dolphin-emu.desktop'
'Dolphin_Logo.png'
'sse4.2_fix.patch')
sha512sums=('cf4eeb7befb638acf9fd5cf1ef140b0d9fc630ef42d8e472d43882d9ec609990315a9929e8e2c7e387d750cf3c100904a3adf28a38d33c27a143da044cdab523'
'0306a521a1c072dc4ccf09c1ce6f7754ea581898f537d806e9716bfa404c4119f4b8f3dfd7fbf76ef11c0c03620333525a9166e4270ebad6f7756cdc547886d7'
'd0c787722be8f69205b0e6ed0bf79195c7a8b4a83ef0a4234955cd9caa64fed42e42ca0cfff7e71976d3b071fe650cd02fd8ad1af048d47f0c4d44065899f3e7')
build() {
cd "${srcdir}"
msg "Checking git...."
if [ -d dolphin-emu-3.0 ] ; then
# To avoid any conflict, grab a fresh clone
msg "Removing old files"
rm -R -f dolphin-emu-3.0
fi
msg "Cloning from GIT"
git clone https://code.google.com/p/dolphin-emu/ dolphin-emu-3.0
cd dolphin-emu-3.0
#Checkout at the STABLE 3.0 Branch of the git
msg "Checking out at stable 3.0 branch"
git checkout 3.0
msg "GIT checkout done or server timeout"
# Apply SSE4.2 bugfix patch
patch -Np1 -i "${srcdir}/sse4.2_fix.patch"
# Detect SSE 4.2 support
if $(grep sse4_2 /proc/cpuinfo > /dev/null); then
SSE4_2="-msse4.2"
else
SSE4_2=""
fi
mkdir Build && cd Build
export CFLAGS="-march=native -mtune=native ${SSE4_2} -O3 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
export CXXFLAGS="-march=native -mtune=native ${SSE4_2} -O3 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j8
}
package() {
cd "${srcdir}/dolphin-emu-3.0/Build"
make DESTDIR="${pkgdir}/" install
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"
}