summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 549f60e0265e3a4b5fa5314d3f5216fb2d029662 (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
113
114
115
116
117
# Maintainer: Forest Crossman <cyrozap at gmail dot com>
# Contributor: schuay <jakob.gruber@gmail.com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Jeremy Newton (Mystro256) <alexjnewt@gmail.com>

_pkgname=dolphin-emu
pkgname=${_pkgname}-wayland
pkgver=5.0.r17995.8bad821019
pkgrel=1
epoch=1
pkgdesc='A Gamecube / Wii / Triforce emulator, patched with experimental support for Wayland'
arch=(x86_64)
url=https://dolphin-emu.org
license=(GPL2)
depends=(
  alsa-lib
  bluez-libs
  enet
  gcc-libs
  glibc
  hidapi
  libavcodec.so
  libavformat.so
  libavutil.so
  libcurl.so
  libevdev
  libfmt.so
  libgl
  libminiupnpc.so
  libpulse
  libswscale.so
  libudev.so
  libusb-1.0.so
  libx11
  libxi
  libxrandr
  lzo
  mbedtls
  minizip-ng
  pugixml
  qt6-base
  sfml
  zlib
)
makedepends=(
  cmake
  git
  ninja
  python
)
optdepends=('pulseaudio: PulseAudio backend')
options=(!emptydirs)
conflicts=(${_pkgname})
provides=(${_pkgname})
_commit=8bad821019721b9b72701b495da95656ace5fea5
source=(
  dolphin-emu::git+https://github.com/dolphin-emu/dolphin.git#commit=${_commit}
  git+https://github.com/mozilla/cubeb.git
  git+https://github.com/randy408/libspng.git
  git+https://github.com/arsenm/sanitizers-cmake.git
  git+https://github.com/KhronosGroup/SPIRV-Cross.git
  git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
  git+https://github.com/zlib-ng/zlib-ng.git
  dolphin-emu-wayland-support.patch  # Generated by rebasing https://github.com/dolphin-emu/dolphin/pull/8727
  dolphin-emu-wayland.desktop
)
b2sums=('SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'e3dee2a3fb351d6957ba4ba5381a67a1734f9c9135ef9dcd4a3d6eaf85c0357f34c1488add2e6ba4e81a0c70da131ed3db0749bf30c37ea5eb675bf79376ba7f'
        '39ff2c0abb4b05583e3e207380fee5c89f096bd31b7fc26de2efe4ad30915b933440515cb34592f7ee48adf3383641138b21f90cfeba3be822424a1a4583d5ae')

prepare() {
  cd dolphin-emu

  patch -p1 < ${srcdir}/dolphin-emu-wayland-support.patch

  for submodule in Externals/{cubeb/cubeb,libspng/libspng,spirv_cross/SPIRV-Cross,VulkanMemoryAllocator,zlib-ng/zlib-ng}; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../${submodule##*/}
    git -c protocol.file.allow=always submodule update ${submodule}
  done
  cd Externals/cubeb/cubeb
  git submodule init cmake/sanitizers-cmake
  git config submodule.cmake/sanitizers-cmake.url "${srcdir}"/sanitizers-cmake
  git -c protocol.file.allow=always submodule update cmake/sanitizers-cmake
}

pkgver() {
  cd dolphin-emu
  git describe | sed 's/-/.r/; s/-g/./'
}

build() {
  cmake -S dolphin-emu -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DDISTRIBUTOR=archlinux.org \
    -DUSE_MGBA=OFF \
    -DUSE_SHARED_ENET=ON \
    -DENABLE_WAYLAND=ON \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  install -Dm 644 dolphin-emu/Data/51-usb-device.rules -t "${pkgdir}"/usr/lib/udev/rules.d/
  install -Dm 644 dolphin-emu-wayland.desktop -t "${pkgdir}"/usr/share/applications/
  rm -rf "${pkgdir}"/usr/{include,lib/libdiscord-rpc.a}
}

# vim: ts=2 sw=2 et: