diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2023-04-05 13:16:16 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2023-04-05 13:16:16 +0000 |
commit | 41acfec7a1ce77f8135080f7cc6e8689a1cfe84c (patch) | |
tree | d386d838bc43ed7eb1c3035bad17609a2cac4b46 | |
parent | 41a479ef801eb1f07456637e90afdecce951659b (diff) | |
download | ports-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/Makefile | 8 | ||||
-rw-r--r-- | misc/gedkeeper/files/patch-projects_GKCore_GKCore_GKUtils.cs | 25 |
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() |