Installing Higan places the needed system files and templates under /usr/share/{P}, whereas the binary by default looks in ~/.local/share/higan/. This results in a lot of user interaction to even get Higan to function at all. Our options would be: * Patch the source to look in a system-wide directory (e.g. /usr/share/higan) * Copy the needed files from /usr/share/higan/ into ~/.local/share/higan/ Doing a quick grep in the source, I only see the home directory mentioned in two files: ***** $ grep -Ri '.local/share' higan-9a625c545ca89b094d5c1da40bbfa5d07156a4aa/{higan-ui,nall}/ higan-9a625c545ca89b094d5c1da40bbfa5d07156a4aa/higan-ui/higan-ui.hpp: extern string settings; // ~/.local/share/higan/ higan-9a625c545ca89b094d5c1da40bbfa5d07156a4aa/higan-ui/higan-ui.hpp: extern string templates; // ~/.local/share/higan/Systems/ higan-9a625c545ca89b094d5c1da40bbfa5d07156a4aa/nall/path.hpp:// /home/username/.local/share/ higan-9a625c545ca89b094d5c1da40bbfa5d07156a4aa/nall/path.hpp: result = {Path::user(), ".local/share/"}; ***** So, I think it may be favourable to patch the source to look in /usr/share/higan as a system-wide default rather than in a home directory. Further, for "systems", "controllers", and other templates, I think it makes more sense to have one copy shared amongst all users instead of duplicating those files into home directories.
Here is the corresponding bug in higan's tracker: https://github.com/higan-emu/higan/issues/181
Created attachment 757587 [details, diff] Patch Higan to look in a system-wide location for templates My modified ebuild places the template files in /usr/share/higan. The "temporary_directory.patch" modifies the creation of paths.bml to search for templates in that system-wide location instead of a user's home directory.
Created attachment 757588 [details] Modified ebuild that includes that patch and changes the insinto targets My modified ebuild includes the "template_directory.patch" and also changes the "insinto" targets from /usr/share/{P} locations to /usr/share/{PN} locations.
I have tested this new ebuild and the patch, and they work in my setup. However, there may be a better approach, and I'm certainly open to feedback.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3cb59332d973d7cabe4c3eb10da86cfedc49044 commit f3cb59332d973d7cabe4c3eb10da86cfedc49044 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-01-03 11:35:52 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-01-03 12:12:54 +0000 games-emulation/higan: add 116_pre20210818, use system paths Closes: https://bugs.gentoo.org/828108 Thanks-to: Nathan Zachary Signed-off-by: Ionen Wolkens <ionen@gentoo.org> games-emulation/higan/Manifest | 1 + .../higan/files/higan-116_pre20210818-paths.patch | 44 ++++++++ games-emulation/higan/higan-116_pre20210818.ebuild | 122 +++++++++++++++++++++ 3 files changed, 167 insertions(+)
Sorry for the wait, this been on my TODO for a while. Doesn't feel perfect but went with similar approach as Arch and Void which passively change defaults rather than force, and added an elog to explain the changes (see patch+elog for details). An alternative some other distros have used is a wrapper that copy/update everything in ~/.local on startup but I'd rather not duplicate nor overwrite files in users' $HOME. That aside, I don't use/know current higan well (only used several years ago and don't recognize it), so better suggestions are welcome if something's off. Also bumped to latest snapshot and modernized ebuild a bit while at it, not that there's been many changes since the last snapshot.
No need to apologise at all, Ionen; thank you very much for your help with the commit! Cheers, Nathan Zachary