public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-emulation/86BoxManagerX/, app-emulation/86BoxManagerX/files/
@ 2023-11-05 17:07 Gonçalo Negrier Duarte
  0 siblings, 0 replies; only message in thread
From: Gonçalo Negrier Duarte @ 2023-11-05 17:07 UTC (permalink / raw
  To: gentoo-commits

commit:     d7a5394b48b06532e2dfddeb8c6da18c453f1682
Author:     Gonçalo Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Sun Nov  5 17:02:32 2023 +0000
Commit:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
CommitDate: Sun Nov  5 17:06:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d7a5394b

app-emulation/86BoxManagerX: fix ebuild

Signed-off-by: Gonçalo Duarte <gonegrier.duarte <AT> gmail.com>

 .../86BoxManagerX/86BoxManagerX-9999.ebuild        | 39 ++++++++++++++++++++--
 ...xManagerX-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 a25e9518c4..59adb868ed 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 0000000000..674fea9a1e
--- /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)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-05 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 17:07 [gentoo-commits] repo/proj/guru:dev commit in: app-emulation/86BoxManagerX/, app-emulation/86BoxManagerX/files/ Gonçalo Negrier Duarte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox