# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=dolphin-emu _pkgname=dolphin pkgver=5.0_git20190915 pkgrel=0 _commit="82fd7f576e1dff6b616ff088955c18aa76ed45d5" # Upstream doesn't actively support non 64-bit platforms and they're too slow # to emulate any games anyway arch="x86_64 aarch64" url="https://dolphin-emu.org" pkgdesc="A Gamecube / Wii emulator" license="GPL-2.0-or-later" depends="mbedtls" makedepends=" cmake ninja mesa-dev mesa-egl ffmpeg-dev libevdev-dev eudev-dev pugixml-dev zlib-dev lzo-dev libpng-dev sfml-dev libusb-dev miniupnpc-dev mbedtls-dev curl-dev hidapi-dev libx11-dev qt5-qtbase-dev libxi-dev bluez-dev pulseaudio-dev vulkan-headers libxrandr-dev " # The following dependencies are required, but atm not supported for using system wide libraries # minizip-dev xxhash-dev soundtouch-dev gtest-dev source="$pkgname-$_commit.tar.gz::https://github.com/dolphin-emu/dolphin/archive/$_commit.tar.gz" subpackages="$pkgname-doc $pkgname-lang" builddir="$srcdir/$_pkgname-$_commit" prepare() { default_prepare # Make sure we never use non-system libraries except the ones that are not # supported being used system-wide by removing them from the Externals # folder KEEP_SOURCES=" Bochs_disasm FreeSurround cpp-optparse fmt glslang imgui xxhash minizip soundtouch cubeb gtest picojson enet " # Move the libraries we want to keep out of the externals folder for s in $KEEP_SOURCES; do mv -v "Externals/$s" . done # Remove the rest rm -r Externals/* # Move them back for s in $KEEP_SOURCES; do mv -v "$s" "Externals/" done mkdir "$builddir"/build } build() { cd "$builddir"/build cmake "$builddir" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_GENERATOR=Ninja \ -DUSE_DISCORD_PRESENCE=OFF \ -DUSE_SHARED_ENET=ON \ -DDISTRIBUTOR="alpinelinux.org" ninja } check() { CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" ninja -C build install install -Dm 644 Data/51-usb-device.rules -t "$pkgdir"/usr/lib/udev/rules.d/ } sha512sums="b14ea3d1c0d939a9a02ab8021155f30fd1bc36cc0cf55917f33ae5f230972527c8e5e0ab6fbbd1ee8aba11d15ed9433e0cca9ee165baea268e615f055918a083 dolphin-emu-82fd7f576e1dff6b616ff088955c18aa76ed45d5.tar.gz"