summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiota2023-11-05 09:53:29 -0800
committerxiota2023-11-05 09:53:29 -0800
commit163b1923655aa3a860c0bd1709ac5123bca37176 (patch)
treec19d0b75da8e9ab224154fa39cb07f242e3f967a
parent2a3f8c85184b22f7d164670ffc2479d8e66f8b0a (diff)
downloadaur-163b1923655aa3a860c0bd1709ac5123bca37176.tar.gz
5.0.r20303
-rw-r--r--.SRCINFO62
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD277
3 files changed, 250 insertions, 93 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bb267d5ffdd4..d4f4da178865 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,27 +1,63 @@
pkgbase = dolphin-emu-debugfast-git
- pkgdesc = A Gamecube / Wii / Triforce emulator, Git version with DebugFast
- pkgver = 4.0.r9442.gb968a90
+ pkgdesc = A Gamecube / Wii / Triforce emulator
+ pkgver = 5.0.r20303.gec69ed2173
pkgrel = 1
- url = http://dolphin-emu.org
+ url = https://github.com/dolphin-emu/dolphin
arch = x86_64
license = GPL2
makedepends = cmake
makedepends = git
+ makedepends = ninja
+ makedepends = python
+ depends = alsa-lib
depends = bluez-libs
depends = enet
- depends = ffmpeg
- depends = libao
+ depends = gcc-libs
+ depends = glibc
+ depends = hidapi
+ depends = libavcodec.so
+ depends = libavformat.so
+ depends = libavutil.so
+ depends = libcurl.so
depends = libevdev
- depends = miniupnpc
- depends = portaudio
+ depends = libgl
+ depends = libminiupnpc.so
+ depends = libpulse
+ depends = libsfml-network.so
+ depends = libsfml-system.so
+ depends = libswscale.so
+ depends = libudev.so
+ depends = libusb-1.0.so
+ depends = libx11
+ depends = libxi
+ depends = libxrandr
+ depends = lzo
+ depends = minizip-ng
+ depends = pugixml
+ depends = qt6-base
+ depends = qt6-svg
depends = sfml
- depends = soundtouch
- depends = xdg-utils
- depends = wxgtk
+ depends = cubeb
+ depends = fmt
+ depends = libspng
+ depends = mbedtls2
+ optdepends = chaotic-interfere: chaotic-aur interference tracker
optdepends = pulseaudio: PulseAudio backend
+ provides = dolphin-emu
+ conflicts = dolphin-emu
options = !emptydirs
- source = git+https://github.com/dolphin-emu/dolphin.git
- md5sums = SKIP
+ options = !lto
+ source = dolphin-emu::git+https://github.com/dolphin-emu/dolphin.git
+ source = zlib-ng::git+https://github.com/zlib-ng/zlib-ng.git
+ source = epezent.implot::git+https://github.com/epezent/implot.git
+ source = gpuopen-librariesandsdks.vulkanmemoryallocator::git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
+ source = mgba-emu.mgba::git+https://github.com/mgba-emu/mgba.git
+ source = retroachievements.rcheevos::git+https://github.com/RetroAchievements/rcheevos.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = dolphin-emu-debugfast-git
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..018a3de08144
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index 03d03aec8908..a55d6a76e829 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,99 +1,216 @@
-# $Id$
-# Maintainer: Kerrick Staley <kerrick@kerrickstaley.com>
+# Maintainer:
+# Contributor: Kerrick Staley <kerrick@kerrickstaley.com>
# Contributor: schuay <jakob.gruber@gmail.com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Jeremy Newton (Mystro256) <alexjnewt@gmail.com>
-pkgname=dolphin-emu-debugfast-git
-pkgver=4.0.r9442.gb968a90
-pkgver() {
- cd dolphin
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
-}
+: ${_debugfast:=false}
+
+_pkgname="dolphin-emu"
+pkgname="$_pkgname-debugfast-git"
+pkgver=5.0.r20303.gec69ed2173
pkgrel=1
-pkgdesc='A Gamecube / Wii / Triforce emulator, Git version with DebugFast'
-arch=('x86_64')
-url='http://dolphin-emu.org'
-license=('GPL2')
+pkgdesc='A Gamecube / Wii / Triforce emulator'
+arch=(x86_64)
+url="https://dolphin-emu.org"
+license=(GPL2)
+depends=(
+ # extra/dolphin-emu
+ alsa-lib
+ bluez-libs
+ enet
+ gcc-libs
+ glibc
+ hidapi
+ libavcodec.so
+ libavformat.so
+ libavutil.so
+ libcurl.so
+ libevdev
+ libgl
+ libminiupnpc.so
+ libpulse
+ libsfml-network.so
+ libsfml-system.so
+ libswscale.so
+ libudev.so
+ libusb-1.0.so
+ libx11
+ libxi
+ libxrandr
+ lzo
+ minizip-ng
+ pugixml
+ qt6-base
+ qt6-svg
+ sfml
+
+ ## dolphin-emu-git
+ #libmgba
+ #zlib-ng
+ cubeb
+ fmt
+ libspng
+ mbedtls2
+)
+makedepends+=(
+ cmake
+ git
+ ninja
+ python
+)
+optdepends=(
+ 'chaotic-interfere: chaotic-aur interference tracker'
+ 'pulseaudio: PulseAudio backend'
+)
-makedepends=('cmake' 'git')
-depends=('bluez-libs' 'enet' 'ffmpeg' 'libao' 'libevdev' 'miniupnpc'
- 'portaudio' 'sfml' 'soundtouch' 'xdg-utils' 'wxgtk')
-optdepends=('pulseaudio: PulseAudio backend')
+options=(!emptydirs !lto)
+
+if [ x"$pkgname" == x"$_pkgname" ] ; then
+ # normal package
+ :
+else
+ # git package
+ url="https://github.com/dolphin-emu/dolphin"
+
+ provides=("$_pkgname")
+ conflicts=("$_pkgname")
+
+ _pkgsrc="$_pkgname"
+ source=("$_pkgname"::"git+$url.git")
+ sha256sums+=('SKIP')
+
+ pkgver() {
+ cd "$_pkgsrc"
+ git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+ }
+fi
+
+_source_dolphin_emu() {
+ source+=(
+ #'bylaws.libadrenotools'::'git+https://github.com/bylaws/libadrenotools.git'
+ #'curl'::'git+https://github.com/curl/curl.git'
+ #'dolphin-emu.ext-win-ffmpeg'::'git+https://github.com/dolphin-emu/ext-win-ffmpeg.git'
+ #'dolphin-emu.ext-win-qt'::'git+https://github.com/dolphin-emu/ext-win-qt.git'
+ #'fmtlib.fmt'::'git+https://github.com/fmtlib/fmt.git'
+ #'google.googletest'::'git+https://github.com/google/googletest.git'
+ #'khronosgroup.spirv-cross'::'git+https://github.com/KhronosGroup/SPIRV-Cross.git'
+ #'libsdl-org.sdl'::'git+https://github.com/libsdl-org/SDL.git'
+ #'libusb'::'git+https://github.com/libusb/libusb.git'
+ #'lz4'::'git+https://github.com/lz4/lz4.git'
+ #'mozilla.cubeb'::'git+https://github.com/mozilla/cubeb.git'
+ #'randy408.libspng'::'git+https://github.com/randy408/libspng.git'
+
+ 'zlib-ng'::'git+https://github.com/zlib-ng/zlib-ng.git'
+
+ 'epezent.implot'::'git+https://github.com/epezent/implot.git'
+ 'gpuopen-librariesandsdks.vulkanmemoryallocator'::'git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git'
+ 'mgba-emu.mgba'::'git+https://github.com/mgba-emu/mgba.git'
+ 'retroachievements.rcheevos'::'git+https://github.com/RetroAchievements/rcheevos.git'
+ )
+ sha256sums+=(
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+ #'SKIP'
+
+ 'SKIP'
+
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ )
+
+ _prepare_dolphin_emu() (
+ cd "${srcdir:?}/$_pkgsrc"
+ local -A _submodules=(
+ #['bylaws.libadrenotools']='Externals/libadrenotools'
+ #['curl']='Externals/curl/curl'
+ #['dolphin-emu.ext-win-ffmpeg']='Externals/FFmpeg-bin'
+ #['dolphin-emu.ext-win-qt']='Externals/Qt'
+ #['fmtlib.fmt']='Externals/fmt/fmt'
+ #['google.googletest']='Externals/gtest'
+ #['khronosgroup.spirv-cross']='Externals/spirv_cross/SPIRV-Cross'
+ #['libsdl-org.sdl']='Externals/SDL/SDL'
+ #['libusb']='Externals/libusb/libusb'
+ #['lz4']='Externals/lz4/lz4'
+ #['mozilla.cubeb']='Externals/cubeb/cubeb'
+ #['randy408.libspng']='Externals/libspng/libspng'
+
+ ['epezent.implot']='Externals/implot/implot'
+ ['gpuopen-librariesandsdks.vulkanmemoryallocator']='Externals/VulkanMemoryAllocator'
+ ['mgba-emu.mgba']='Externals/mGBA/mgba'
+ ['retroachievements.rcheevos']='Externals/rcheevos/rcheevos'
+ ['zlib-ng']='Externals/zlib-ng/zlib-ng'
+ )
+ _submodule_update
+ )
+}
-options=('!emptydirs')
+_submodule_update() {
+ for key in ${!_submodules[@]} ; do
+ git submodule init "${_submodules[${key}]}"
+ git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}"
+ git -c protocol.file.allow=always submodule update "${_submodules[${key}]}"
+ done
+}
-source=('git+https://github.com/dolphin-emu/dolphin.git')
-md5sums=('SKIP')
+_source_dolphin_emu
prepare() {
- cd dolphin
-
- # Compatibility with miniupnpc 1.9.20150730, which requires a new ttl argument.
- sed 's/upnpDiscover(2000, nullptr, nullptr, 0, 0, \&upnperror)/upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, \&upnperror)/' -i Source/Core/Core/NetPlayServer.cpp
-
- # Change "dolphin-emu" to "dolphin-emu-debugfast" in a bunch of files
- sed -ri 's/dolphin-emu/dolphin-emu-debugfast/g' \
- CMakeLists.txt \
- Source/Core/DolphinWX/CMakeLists.txt \
- Source/Core/DolphinWX/Info.plist.in \
- Data/dolphin-emu.desktop \
- Languages/{gettextize,po.props,po.rules}
- sed -ri '/^URL: /! s/dolphin-emu/dolphin-emu-debugfast/g' \
- Installer/dolphin-emu.spec
-
- # Change name in .desktop file
- sed -ri 's/Name=Dolphin Emulator/Name=DebugFast Dolphin Emulator/' Data/dolphin-emu.desktop
-
- # Turn on debug mode in .desktop file
- sed -ri 's/^Exec=.*/& -d/' Data/dolphin-emu.desktop
-
- # Add text "DebugFast" to icon
- _edit_svg
-
- # Move files so they don't conflict with regular dolphin-emu
- mv Data/dolphin-emu{,-debugfast}.desktop
- mv Data/dolphin-emu{,-debugfast}.svg
- mv Data/dolphin-emu{,-debugfast}.png
- mv Data/dolphin-emu{,-debugfast}.6
- mv Data/dolphin-emu{,-debugfast}-nogui.6
- mv Installer/dolphin-emu{,-debugfast}.spec
- mv Languages/po/dolphin-emu{,-debugfast}.pot
-}
+ _prepare_dolphin_emu
-_edit_svg() {
- text_tag=$(cat <<'EOF'
-<text x="1024" y="1536"
- font-size="240"
- font-family="Verdana"
- text-anchor="middle"
- font-weight="bold"
- fill="#E02020"
->DebugFast</text>
-EOF
-)
- text_tag_one_line="$(echo "$text_tag" | tr '\n' ' ')"
- sed -ri "s|</svg>|$text_tag_one_line\n&|" Data/dolphin-emu.svg
+ # Fix version string
+ local _pkgver=$(pkgver)
+ sed -Ez \
+ -e 's@\n\s+execute_process\([^\(\)]+\bdescribe [^\(\)]*--dirty\b[^\(\)]+\)@\n\nset(DOLPHIN_WC_DESCRIBE "'"${_pkgver:?}"'")@' \
+ -i "${srcdir:?}/$_pkgsrc/CMake/ScmRevGen.cmake"
+
+ # Fix minizip-ng name for Arch
+ sed -E -e 's@(pkgconfig\(MINIZIP minizip)([^a-z]+)@\1-ng\2@' \
+ -i "${srcdir:?}/$_pkgsrc/CMakeLists.txt"
}
build() {
- cd dolphin
-
- mkdir -p build && cd build
-
- # -DFASTLOG='TRUE' enables DebugFast
- cmake .. \
- -DCMAKE_INSTALL_PREFIX='/usr' \
- -DCMAKE_CXX_FLAGS='-fno-pie' \
- -DENABLE_LTO='TRUE' \
- -DENABLE_SDL='TRUE' \
- -DUSE_SHARED_ENET='TRUE' \
- -DFASTLOG='TRUE'
- make
+ local _cmake_options=(
+ -B build
+ -S "$_pkgname"
+ -G Ninja
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX='/usr'
+ -DDISTRIBUTOR='aur.chaotic.cx'
+ -DENABLE_AUTOUPDATE=OFF
+ # -DENABLE_ANALYTICS=OFF # ON is opt-in
+ # -DUSE_SYSTEM_LIBS=ON # AUTO
+ -DUSE_SYSTEM_LIBMGBA=OFF
+
+ -DENABLE_LTO=OFF # segfault when on
+ -DENABLE_TESTS=OFF
+ -Wno-dev
+ )
+
+ if [ x"${_debugfast::1}" == "xt" ] ; then
+ _cmake_options+=(-DFASTLOG=ON)
+ fi
+
+ cmake "${_cmake_options[@]}"
+ cmake --build build
}
package() {
- cd dolphin/build
+ DESTDIR="${pkgdir:?}" cmake --install build
+
+ install -Dm644 "${srcdir:?}/$_pkgsrc/Data/51-usb-device.rules" \
+ -t "${pkgdir:?}/usr/lib/udev/rules.d/"
- make DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir:?}"/usr/{include,lib/libdiscord-rpc.a}
}