@dpeukert
updated PKGBUILD to build latest dolphin
cleaned up prepare to be readable
fix build with USE_MGBA=ON, always build a static libmgba from dolphin submodule (also fix conflict with libmgba-git and latest mgba-git package)
disable autoupdate, since this is arch package, it is useless
--- PKGBUILD 2023-04-07 12:36:03.000000000 +0200
+++ dolphin-emu-git/PKGBUILD 2023-05-11 17:36:25.024538054 +0200
@@ -6,15 +6,15 @@
_noguipkgname="$_projectname-emu-nogui"
pkgbase="$_mainpkgname-git"
pkgname=("$pkgbase" "$_noguipkgname-git")
-pkgver='5.0.r19176.gaaedc2827d'
-pkgrel='1'
+pkgver=5.0.r19365.g33c4e84f35
+pkgrel=1
pkgdesc='A Gamecube / Wii emulator'
_pkgdescappend=' - git version'
arch=('x86_64' 'aarch64')
url="https://$_mainpkgname.org"
license=('GPL2')
depends=(
- 'alsa-lib' 'bluez-libs' 'cubeb' 'enet' 'hidapi' 'libevdev' 'libgl' 'libmgba'
+ 'alsa-lib' 'bluez-libs' 'cubeb' 'enet' 'hidapi' 'libevdev' 'libgl'
'libpulse' 'libspng' 'libx11' 'libxi' 'libxrandr' 'lzo' 'mbedtls' 'minizip-ng'
'pugixml' 'qt6-base' 'sfml' 'zlib'
'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libcurl.so' 'libfmt.so'
@@ -27,17 +27,26 @@
"$pkgname-implot::git+https://github.com/epezent/implot.git"
"$pkgname-vma::git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git"
"$pkgname-zlibng::git+https://github.com/zlib-ng/zlib-ng.git"
+ "$pkgname-mgba::git+https://github.com/mgba-emu/mgba.git"
'minizip-ng.diff'
)
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
+ 'SKIP'
'b469597fe9b4e9be6ae9ab0330fe5e3d6b944a73505775ff75f9895ae4843768f3815d4b5b8e227d6d2e87c3f4882d6d7262f9df85be0aaddf46730a7afa16dd')
_sourcedirectory="$pkgname"
prepare() {
+ declare -A submodules=(
+ [implot]="Externals/implot/implot"
+ [vma]="Externals/VulkanMemoryAllocator"
+ [zlibng]="Externals/zlib-ng/zlib-ng"
+ [mgba]="Externals/mGBA/mgba"
+ )
+
cd "$srcdir/$_sourcedirectory/"
if [ -d 'build/' ]; then rm -rf 'build/'; fi
mkdir 'build/'
@@ -45,23 +54,13 @@
# Fix minizip-ng name for Arch
patch --forward -p1 < "$srcdir/minizip-ng.diff"
- # Provide implot submodule
- _implotpath='Externals/implot/implot'
- git submodule init "$_implotpath"
- git config "submodule.$_implotpath.url" "$srcdir/$pkgname-implot/"
- git -c protocol.file.allow=always submodule update "$_implotpath"
-
- # Provide vma submodule
- _vmapath='Externals/VulkanMemoryAllocator'
- git submodule init "$_vmapath"
- git config "submodule.$_vmapath.url" "$srcdir/$pkgname-vma/"
- git -c protocol.file.allow=always submodule update "$_vmapath"
-
- # Provide zlib-ng submodule
- _zlibngpath='Externals/zlib-ng/zlib-ng'
- git submodule init "$_zlibngpath"
- git config "submodule.$_zlibngpath.url" "$srcdir/$pkgname-zlibng/"
- git -c protocol.file.allow=always submodule update "$_zlibngpath"
+ for submod in "${!submodules[@]}"; do
+ path="${submodules[$submod]}"
+
+ git submodule init "$path"
+ git config "submodule.$path.url" "$srcdir/$pkgname-$submod/"
+ git -c protocol.file.allow=always submodule update "$path"
+ done
}
pkgver() {
@@ -72,12 +71,14 @@
build() {
cd "$srcdir/$_sourcedirectory/"
cmake -S '.' -B 'build/' -G Ninja \
- -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DDISTRIBUTOR=archlinux.org \
-DENABLE_TESTS=OFF \
-DUSE_SHARED_ENET=ON \
-DUSE_RETRO_ACHIEVEMENTS=OFF \
+ -DENABLE_AUTOUPDATE=OFF \
+ -DCMAKE_DISABLE_FIND_PACKAGE_LIBMGBA=True \
-Wno-dev
cmake --build 'build/'
}
Pinned Comments
dpeukert commented on 2020-04-10 12:34 (UTC) (edited on 2020-09-26 17:48 (UTC) by dpeukert)
The PKGBUILD for this package is hosted here (contributions are welcome!): https://gitlab.com/dpeukert/pkgbuilds/tree/main/dolphin-emu-git