From 80e00480c06c8ee69d9476fa9173e5257ce74657 Mon Sep 17 00:00:00 2001 From: Namgo Date: Tue, 3 Oct 2023 10:18:00 -0400 Subject: [PATCH] find data files and update to 2.11.2 --- .../patches/find-data-files.patch | 50 +++++++++++++++++++ .../patches/missing-include.patch | 10 ---- srcpkgs/EmulationStation/template | 8 +-- 3 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 srcpkgs/EmulationStation/patches/find-data-files.patch delete mode 100644 srcpkgs/EmulationStation/patches/missing-include.patch diff --git a/srcpkgs/EmulationStation/patches/find-data-files.patch b/srcpkgs/EmulationStation/patches/find-data-files.patch new file mode 100644 index 0000000000000..b4e693d2df49d --- /dev/null +++ b/srcpkgs/EmulationStation/patches/find-data-files.patch @@ -0,0 +1,50 @@ +From d083efb4ab45275940c02bc72e23d334fe596fe7 Mon Sep 17 00:00:00 2001 +From: Justin Kinnaird +Date: Sun, 17 Nov 2019 11:35:21 -0600 +Subject: [PATCH 1/2] feat: do resource lookups in standard directories + +For Linux, this includes the following directories: +* /.local/share/ +* /usr/local/share/ +* /usr/share/ +--- + es-core/src/resources/ResourceManager.cpp | 18 ++++++++++++++++++ + +diff --git a/es-core/src/resources/ResourceManager.cpp b/es-core/src/resources/ResourceManager.cpp +index 9f5014e432..7fd54acea5 100644 +--- a/es-core/src/resources/ResourceManager.cpp ++++ b/es-core/src/resources/ResourceManager.cpp +@@ -3,6 +3,10 @@ + #include "utils/FileSystemUtil.h" + #include + ++#ifndef APPDATANAME ++#define APPDATANAME "EmulationStation" ++#endif ++ + auto array_deleter = [](unsigned char* p) { delete[] p; }; + auto nop_deleter = [](unsigned char* /*p*/) { }; + +@@ -27,6 +31,20 @@ std::string ResourceManager::getResourcePath(const std::string& path) const + { + std::string test; + ++ // check in standard AppData locations ++#if defined(__linux__) ++ test = Utils::FileSystem::getHomePath() + "/.local/share/" + APPDATANAME + "/resources/" + &path[2]; ++ if (Utils::FileSystem::exists(test)) ++ return test; ++ ++ test = std::string("/usr/local/share/") + APPDATANAME + "/resources/" + &path[2]; ++ if (Utils::FileSystem::exists(test)) ++ return test; ++ ++ test = std::string("/usr/share/") + APPDATANAME + "/resources/" + &path[2]; ++ if (Utils::FileSystem::exists(test)) ++ return test; ++#endif + // check in homepath + test = Utils::FileSystem::getHomePath() + "/.emulationstation/resources/" + &path[2]; + if(Utils::FileSystem::exists(test)) + + diff --git a/srcpkgs/EmulationStation/patches/missing-include.patch b/srcpkgs/EmulationStation/patches/missing-include.patch deleted file mode 100644 index 63bc8687be4fe..0000000000000 --- a/srcpkgs/EmulationStation/patches/missing-include.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/es-core/src/utils/TimeUtil.h -+++ b/es-core/src/utils/TimeUtil.h -@@ -3,6 +3,7 @@ - #define ES_CORE_UTILS_TIME_UTIL_H - - #include -+#include - - namespace Utils - { diff --git a/srcpkgs/EmulationStation/template b/srcpkgs/EmulationStation/template index fbc9c34e3e686..fbcc4ae3b59b9 100644 --- a/srcpkgs/EmulationStation/template +++ b/srcpkgs/EmulationStation/template @@ -1,6 +1,6 @@ # Template file for 'EmulationStation' pkgname=EmulationStation -version=2.9.4 +version=2.11.2 revision=1 _pugixml_version=1.10 create_wrksrc=yes @@ -15,8 +15,8 @@ license="MIT" homepage="https://github.com/RetroPie/EmulationStation" distfiles="https://github.com/RetroPie/EmulationStation/archive/v${version}.tar.gz https://github.com/zeux/pugixml/releases/download/v1.10/pugixml-${_pugixml_version}.tar.gz" -checksum="79452f6c1e8aaebe98c19708b3587a0a45330bf20b3301d556285d5cd756fa4a - 55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a" +checksum="6b632fe68bad5c3e0567e3bb171fe18ad7b2f8b1531d1297a7a91be95bf8734a +55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a" post_extract() { mv EmulationStation-$version/* . @@ -25,5 +25,7 @@ post_extract() { } post_install() { + vmkdir /usr/share/EmulationStation/ + vcopy resources/ /usr/share/EmulationStation/resources vlicense LICENSE.md }