aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2023-04-05 13:16:16 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2023-04-05 13:16:16 +0000
commit41acfec7a1ce77f8135080f7cc6e8689a1cfe84c (patch)
treed386d838bc43ed7eb1c3035bad17609a2cac4b46
parent41a479ef801eb1f07456637e90afdecce951659b (diff)
downloadports-41acfec7a1ce77f8135080f7cc6e8689a1cfe84c.tar.gz
ports-41acfec7a1ce77f8135080f7cc6e8689a1cfe84c.zip
misc/gedkeeper: the port had been improved (+)
- Make GetTempDir() function Unix-aware, where TMP environment variable is preferred over Windows' TEMP, and fallback to /tmp when it is unset - Change GetAppPath() function to uphold that we do not install the main program in another subdirectory (bin) since the whole project already lives under $DATADIR (Mono/.NET programs are not always hier(7)-conforming) - Fix provided *.desktop file (respect PREFIX and replace badly named startup wrapper script with ours)
-rw-r--r--misc/gedkeeper/Makefile8
-rw-r--r--misc/gedkeeper/files/patch-projects_GKCore_GKCore_GKUtils.cs25
2 files changed, 33 insertions, 0 deletions
diff --git a/misc/gedkeeper/Makefile b/misc/gedkeeper/Makefile
index fe34618f21e3..eeff45f6e590 100644
--- a/misc/gedkeeper/Makefile
+++ b/misc/gedkeeper/Makefile
@@ -1,6 +1,7 @@
PORTNAME= gedkeeper
PORTVERSION= 2.25.0
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= misc
MAINTAINER= danfe@FreeBSD.org
@@ -22,6 +23,11 @@ GH_SUBDIR= projects/GKCommunicator:gkc projects/GKGenetix:gkg
_BUILD_TYPE= Release
DATADIR= ${PREFIX}/lib/${PORTNAME}
+post-patch:
+ @${REINPLACE_CMD} -E '/^(Path|Icon)=/s,/usr,${PREFIX}, ; \
+ /^Exec=/s,gk_run\.sh,${PORTNAME},' \
+ ${WRKSRC}/deploy/gedkeeper.desktop
+
do-build:
cd ${BUILD_WRKSRC} && msbuild projects/GKv2/GEDKeeper2.sln \
/p:Configuration=${_BUILD_TYPE} /p:MonoCS=true \
@@ -51,3 +57,5 @@ do-test:
projects/GKTests/bin/${_BUILD_TYPE}/GKTests.dll
.include <bsd.port.mk>
+
+PATCH_ARGS= -l
diff --git a/misc/gedkeeper/files/patch-projects_GKCore_GKCore_GKUtils.cs b/misc/gedkeeper/files/patch-projects_GKCore_GKCore_GKUtils.cs
new file mode 100644
index 000000000000..7de8d94f966c
--- /dev/null
+++ b/misc/gedkeeper/files/patch-projects_GKCore_GKCore_GKUtils.cs
@@ -0,0 +1,25 @@
+--- projects/GKCore/GKCore/GKUtils.cs.orig 2023-03-27 21:40:19 UTC
++++ projects/GKCore/GKCore/GKUtils.cs
+@@ -1758,7 +1758,11 @@ namespace GKCore
+
+ public static string GetTempDir()
+ {
+- string tempPath = Environment.GetEnvironmentVariable("TEMP");
++ string tempPath;
++ if (SysUtils.IsUnix())
++ tempPath = Environment.GetEnvironmentVariable("TMP") ?? "/tmp";
++ else
++ tempPath = Environment.GetEnvironmentVariable("TEMP");
+ return tempPath + Path.DirectorySeparatorChar;
+ }
+
+@@ -1772,8 +1776,7 @@ namespace GKCore
+
+ public static string GetAppPath()
+ {
+- string result = Path.GetFullPath(Path.Combine(GetBinPath(), @".." + Path.DirectorySeparatorChar));
+- return result;
++ return GetBinPath();
+ }
+
+ public static string GetPluginsPath()