aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dolphin-emu/APKBUILD
blob: 38db4143075500a22aece395a0e008e52308beea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=dolphin-emu
_pkgname=dolphin
pkgver=5.0_git20190707
pkgrel=0
_commit="398aa2a9f976169c4ac8228f0969971f3e2ba2f3"
 # 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
	"
# 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/$_pkgname/archive/$_commit.tar.gz
	add-missing-x11-includes.patch
	fix-compilation-without-xrandr-support.patch
	"
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="c6bd84e6840b83d84cadf0e8deb0f34780bc56f642fdf84a5480a9e0600bf677b2ad3214a861771f1108c176c21cd36e6086809c3de9b8572b1f18197e91be4d  dolphin-emu-398aa2a9f976169c4ac8228f0969971f3e2ba2f3.tar.gz
eb7c31b5aa790a0839642da296ded70b543c4e2e7ab910b491367c8258065f0a976fa155e8a782ece745e842a0bf743e7c13d1cf1061255b672d7b7d47fde44a  add-missing-x11-includes.patch
1ed5851dd03db8e76ec9aa8194e4014bc951b1f363133db0dc43098aaab43f507bb9b97e55b50a9d5793b7b5b75cf5100881bdd1d5b80c0ada0192e104099ec4  fix-compilation-without-xrandr-support.patch"