diff --git a/misc/gedkeeper/Makefile b/misc/gedkeeper/Makefile index fe34618f21e3..eeff45f6e590 100644 --- a/misc/gedkeeper/Makefile +++ b/misc/gedkeeper/Makefile @@ -1,53 +1,61 @@ PORTNAME= gedkeeper PORTVERSION= 2.25.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= misc MAINTAINER= danfe@FreeBSD.org COMMENT= Personal genealogical database editor WWW= http://gedkeeper.net/ LICENSE= GPLv3+ BUILD_DEPENDS= msbuild:devel/msbuild LIB_DEPENDS= libgdiplus.so:x11-toolkits/libgdiplus USES= desktop-file-utils mono shared-mime-info USE_GITHUB= yes GH_ACCOUNT= Serg-Norseman GH_PROJECT= GEDKeeper GKCommunicator:gkc GKGenetix:gkg GH_TAGNAME= 261a8d8:gkc 3f4a681:gkg 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 \ /p:TargetFrameworkVersion=v4.6.2 do-install: ${PRINTF} '#!/bin/sh\n\nexec mono ${DATADIR}/GEDKeeper2.exe\ "$$@"\n' > ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${PORTNAME} @${MKDIR} ${STAGEDIR}${DATADIR} cd ${INSTALL_WRKSRC} && ${CP} -a backgrounds bin/ externals \ locales plugins samples scripts themes ${STAGEDIR}${DATADIR} @${RM} ${STAGEDIR}${DATADIR}/scripts/readme.txt ${INSTALL_DATA} ${INSTALL_WRKSRC}/deploy/gedkeeper.desktop \ ${STAGEDIR}${PREFIX}/share/applications/ ${INSTALL_DATA} ${INSTALL_WRKSRC}/deploy/gedkeeper.png \ ${STAGEDIR}${PREFIX}/share/pixmaps @${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages ${INSTALL_DATA} ${INSTALL_WRKSRC}/deploy/application-x-gedkeeper.xml \ ${STAGEDIR}${PREFIX}/share/mime/packages @${MKDIR} ${STAGEDIR}${PREFIX}/share/metainfo ${INSTALL_DATA} ${INSTALL_WRKSRC}/deploy/gedkeeper.appdata.xml \ ${STAGEDIR}${PREFIX}/share/metainfo do-test: cd ${TEST_WRKSRC} && TEMP=/tmp nunit-console \ projects/GKTests/bin/${_BUILD_TYPE}/GKTests.dll .include + +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()