diff options
author | Gonçalo Duarte <gonegrier.duarte@gmail.com> | 2023-11-05 17:02:32 +0000 |
---|---|---|
committer | Gonçalo Duarte <gonegrier.duarte@gmail.com> | 2023-11-05 17:06:19 +0000 |
commit | d7a5394b48b06532e2dfddeb8c6da18c453f1682 (patch) | |
tree | 341cdb2e4729d461c7964928a950b4a9fad4481a /app-emulation | |
parent | games-util/HeroicGamesLauncher-bin: add 2.10.0, drop 2.9.1 (diff) | |
download | guru-d7a5394b48b06532e2dfddeb8c6da18c453f1682.tar.gz guru-d7a5394b48b06532e2dfddeb8c6da18c453f1682.tar.bz2 guru-d7a5394b48b06532e2dfddeb8c6da18c453f1682.zip |
app-emulation/86BoxManagerX: fix ebuild
Signed-off-by: Gonçalo Duarte <gonegrier.duarte@gmail.com>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/86BoxManagerX/86BoxManagerX-9999.ebuild | 39 | ||||
-rw-r--r-- | app-emulation/86BoxManagerX/files/86BoxManagerX-9999-save-config-user-directory.patch | 28 |
2 files changed, 64 insertions, 3 deletions
diff --git a/app-emulation/86BoxManagerX/86BoxManagerX-9999.ebuild b/app-emulation/86BoxManagerX/86BoxManagerX-9999.ebuild index a25e9518c..59adb868e 100644 --- a/app-emulation/86BoxManagerX/86BoxManagerX-9999.ebuild +++ b/app-emulation/86BoxManagerX/86BoxManagerX-9999.ebuild @@ -12,16 +12,48 @@ DEPEND="app-emulation/86Box dev-dotnet/dotnet-sdk-bin " +QA_PRESTRIPPED=" + /opt/86BoxManagerX/createdump + /opt/86BoxManagerX/libSystem.Globalization.Native.so + /opt/86BoxManagerX/libSystem.IO.Compression.Native.so + /opt/86BoxManagerX/libSystem.Native.so + /opt/86BoxManagerX/libSystem.Net.Security.Native.so + /opt/86BoxManagerX/libSystem.Security.Cryptography.Native.OpenSsl.so + /opt/86BoxManagerX/libclrjit.so + /opt/86BoxManagerX/libcoreclr.so + /opt/86BoxManagerX/libcoreclrtraceptprovider.so + /opt/86BoxManagerX/libdbgshim.so + /opt/86BoxManagerX/libhostfxr.so + /opt/86BoxManagerX/libhostpolicy.so + /opt/86BoxManagerX/libmscordaccore.so + /opt/86BoxManagerX/libmscordbi.so + /opt/86BoxManagerX/libHarfBuzzSharp.so + /opt/86BoxManagerX/libMono.Unix.so + /opt/86BoxManagerX/libSkiaSharp.so + /opt/86BoxManagerX/86Manager +" + LICENSE="MIT" SLOT="0" +PATCHES=( + # Save the config in user directory preventing permission denied error + # https://github.com/RetBox/86BoxManagerX/pull/1 + "${FILESDIR}/86BoxManagerX-9999-save-config-user-directory.patch" +) + src_unpack() { - git-r3_src_unpack + git-r3_checkout cd "${S}" + # Need internet access dotnet publish 86BoxManager -r linux-x64 } -src_compile () { +src_prepare() { + default +} + +src_compile() { dotnet publish 86BoxManager -r linux-x64 -c Release --self-contained true -o 86BoxManagerX } @@ -29,7 +61,8 @@ src_install() { #Install binary and alias command insinto /opt && doins -r "${WORKDIR}/${P}/86BoxManagerX" insinto /opt/bin/ && doins "${FILESDIR}/86BoxManagerX" - fperms +x /opt/86BoxManagerX/86Manager /opt/bin/86BoxManagerX /opt/86BoxManagerX/*.dll + fperms +x /opt/86BoxManagerX/86Manager /opt/bin/86BoxManagerX + find /opt/86BoxManagerX/ -name "*.dll" -exec fperms +x {} + #Icon and Desktop File doicon "${FILESDIR}/86BoxManagerX.png" diff --git a/app-emulation/86BoxManagerX/files/86BoxManagerX-9999-save-config-user-directory.patch b/app-emulation/86BoxManagerX/files/86BoxManagerX-9999-save-config-user-directory.patch new file mode 100644 index 000000000..674fea9a1 --- /dev/null +++ b/app-emulation/86BoxManagerX/files/86BoxManagerX-9999-save-config-user-directory.patch @@ -0,0 +1,28 @@ +diff --git a/86BoxManager.Core/Registry/Configs.cs b/86BoxManager.Core/Registry/Configs.cs +index c61e99a..be25067 100644 +--- a/86BoxManager.Core/Registry/Configs.cs ++++ b/86BoxManager.Core/Registry/Configs.cs +@@ -1,3 +1,4 @@ ++using System; + using System.IO; + using System.Text; + using Newtonsoft.Json; +@@ -18,11 +19,13 @@ static Configs() + { + Formatting = Formatting.Indented + }; +- var ass = typeof(Configs).Assembly; +- var loc = IOPath.GetFullPath(ass.Location); +- var dir = IOPath.GetDirectoryName(loc) ?? string.Empty; +- BoxConfigName = IOPath.Combine(dir, "86Box.json"); +- VmxConfigName = IOPath.Combine(dir, "86BoxVMs.json"); ++ ++ var userConfigDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.Create); ++ var appConfigDir = IOPath.Combine(userConfigDir, "86BoxManager"); ++ if (!Directory.Exists(appConfigDir)) Directory.CreateDirectory(appConfigDir); ++ ++ BoxConfigName = IOPath.Combine(appConfigDir, "86Box.json"); ++ VmxConfigName = IOPath.Combine(appConfigDir, "86BoxVMs.json"); + } + + private static void WriteJson(string fileName, object obj) |