diff options
author | Mastergatto | 2023-06-18 13:35:12 +0200 |
---|---|---|
committer | Mastergatto | 2023-06-18 13:35:12 +0200 |
commit | 2b4486092f639532182dacd47fe68d68541e0477 (patch) | |
tree | 93133c99f04b9e779aa799ecb68c0b1f4e04861f | |
parent | c9dd646f85062a0cb6273334fe47ad484da2f9d9 (diff) | |
download | aur-2b4486092f639532182dacd47fe68d68541e0477.tar.gz |
Clang and lld are now required for building Ares. Settings files location has changed from /home/mastergatto/.config to /home/mastergatto/.local/share, will copy old settings to new location.
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | ares-paths.patch | 52 | ||||
-rw-r--r-- | ares.install | 14 |
4 files changed, 67 insertions, 23 deletions
@@ -1,13 +1,16 @@ pkgbase = ares-emu-git pkgdesc = Multi-system emulator by Near with experimental Nintendo 64 and PlayStation support. (git version) - pkgver = 131.r29.gd40b890d8 + pkgver = 132.r129.g5f9804fb6 pkgrel = 1 url = https://ares-emu.net/ + install = ares.install arch = x86_64 arch = i686 license = ISC makedepends = mesa makedepends = git + makedepends = clang + makedepends = lld depends = gtk3 depends = libao depends = libgl @@ -23,6 +26,6 @@ pkgbase = ares-emu-git source = git+https://github.com/ares-emulator/ares.git source = ares-paths.patch sha256sums = SKIP - sha256sums = 5805cfea308e46b0a209613d4693f3bb15ebb750436fc80d478437e464b6bf52 + sha256sums = 223501d18e42f5285f7051ed9e874b159361337a55a9e0da91b0375ce66d156b pkgname = ares-emu-git @@ -1,20 +1,21 @@ # Maintainer: Snowstorm64 pkgname=ares-emu-git -pkgver=131.r29.gd40b890d8 +pkgver=132.r129.g5f9804fb6 pkgrel=1 -pkgdesc="Multi-system emulator by Near with experimental Nintendo 64 and PlayStation support. (git version)" +pkgdesc="Cross-platform, open source, multi-system emulator by Near and Ares team, focusing on accuracy and preservation. (git version)" arch=(x86_64 i686) url="https://ares-emu.net/" license=("ISC") depends=(gtk3 libao libgl libpulse libudev.so=1-64 libxv openal sdl2 vulkan-driver vulkan-icd-loader) -makedepends=(mesa git) +makedepends=(mesa git clang lld) provides=(ares-emu) conflicts=(ares-emu) +install=ares.install source=("git+https://github.com/ares-emulator/ares.git" "ares-paths.patch") sha256sums=("SKIP" - "5805cfea308e46b0a209613d4693f3bb15ebb750436fc80d478437e464b6bf52") + "223501d18e42f5285f7051ed9e874b159361337a55a9e0da91b0375ce66d156b") pkgver() { cd "${srcdir}/ares" @@ -22,12 +23,13 @@ pkgver() { } prepare() { - # Patch Ares so that it can look for its files that are installed system-wide here + # Patch Ares so that it can look for its resources, that are installed in its shared data directory patch -Np1 -i "${srcdir}/ares-paths.patch" } build() { - make -C "${srcdir}/ares/desktop-ui" hiro=gtk3 + # If you want to build with gcc, edit to use g++ instead of clang++ + make -C "${srcdir}/ares/desktop-ui" hiro=gtk3 compiler=clang++ } package() { @@ -36,7 +38,8 @@ package() { install -Dm 644 "${srcdir}/ares/desktop-ui/resource/ares.png" -t "${pkgdir}/usr/share/icons/hicolor/256x256/apps/" install -Dm 644 "${srcdir}/ares/desktop-ui/resource/ares.desktop" -t "${pkgdir}/usr/share/applications/" - # Also install the shaders in Ares' shared directory + # Also install shaders and databases in Ares' shared data directory install -dm 755 "${pkgdir}/usr/share/ares" cp -dr --no-preserve=ownership "${srcdir}/ares/ares/Shaders/" "${pkgdir}/usr/share/ares/Shaders/" + cp -dr --no-preserve=ownership "${srcdir}/ares/mia/Database/" "${pkgdir}/usr/share/ares/Database/" } diff --git a/ares-paths.patch b/ares-paths.patch index bd81e2c16fe8..b56594c29858 100644 --- a/ares-paths.patch +++ b/ares-paths.patch @@ -1,20 +1,44 @@ diff --git a/ares/desktop-ui/desktop-ui.cpp b/ares/desktop-ui/desktop-ui.cpp -@@ -23,15 +23,15 @@ - // ship with the executable. - // On Windows, this allows settings from to be carried over - // from previous versions (pre-portable) -- location = {Path::userData(), "ares/", name}; -+ location = {Path::sharedData(), "ares/", name}; +@@ -26,10 +26,20 @@ + location = {Path::userData(), "ares/", name}; if(inode::exists(location)) return location; - // On non-windows platforms, after exhausting other options, - // default to userData, on Windows, default to program dir +- // On non-windows platforms, after exhausting other options, +- // default to userData, on Windows, default to program dir ++ // On non-windows platforms, this time check the shared ++ // data directory, on Windows, default to program dir, // this ensures Portable mode is the default on Windows platforms. #if !defined(PLATFORM_WINDOWS) -- directory::create({Path::userData(), "ares/"}); -- return {Path::userData(), "ares/", name}; -+ directory::create({Path::userSettings(), "ares/"}); -+ return {Path::userSettings(), "ares/", name}; ++ string shared_location = {Path::sharedData(), "ares/", name}; ++ if(inode::exists(shared_location)) return shared_location; ++ ++ // XXX: Change settings.bml location to match Ares' default behavior. ++ if(directory::exists({Path::userSettings(), "ares/"})) { ++ file::copy({Path::userSettings(), "ares/settings.bml"}, {Path::userData(), "ares/settings.bml"}); ++ } ++ ++ // On non-windows platforms, after exhausting other options, ++ // default to userData. + directory::create({Path::userData(), "ares/"}); + return {Path::userData(), "ares/", name}; #else - return {Path::program(), name}; - #endif + +diff --git a/ares/mia/mia.cpp b/ares/mia/mia.cpp +@@ -26,10 +26,15 @@ + location = {Path::userData(), "ares/", name}; + if(inode::exists(location)) return location; + +- // On non-windows platforms, after exhausting other options, +- // default to userData, on Windows, default to program dir ++ // On non-windows platforms, this time check the shared ++ // data directory, on Windows, default to program dir + // this ensures Portable mode is the default on Windows platforms. + #if !defined(PLATFORM_WINDOWS) ++ string shared_location = {Path::sharedData(), "ares/", name}; ++ if(inode::exists(shared_location)) return shared_location; ++ ++ // On non-windows platforms, after exhausting other options, ++ // default to userData + directory::create({Path::userData(), "ares/"}); + return {Path::userData(), "ares/", name}; + #else diff --git a/ares.install b/ares.install new file mode 100644 index 000000000000..f92e5ab49ad8 --- /dev/null +++ b/ares.install @@ -0,0 +1,14 @@ +post_upgrade() { + if [ $(vercmp $2 132.r129.g5f9804fb6-1) -lt 0 ]; then cat << EOF +******************************************************************************** +* Wanting to be as close as possible to Ares vanilla, the location * +* of settings files has been changed from * +* $XDG_CONFIG_HOME (likely ~/.config/ares/settings.bml) to the default * +* $XDG_DATA_HOME (likely ~/.local/share/ares/settings.bml). * +* Ares will attempt to copy this file to the new location but success is not * +* guaranteed, so please check whether the settings are successfully copied. * +* After which, the file in old location can be safely removed. * +******************************************************************************** +EOF +fi +} |