git: 415aa8df9d22 - main - lang/nim: Update to 1.6.10

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Mon, 28 Nov 2022 17:41:21 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=415aa8df9d225599f057a56617e3becaae6a0a84

commit 415aa8df9d225599f057a56617e3becaae6a0a84
Author:     Neal Nelson <ports@nicandneal.net>
AuthorDate: 2022-11-28 17:34:18 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-11-28 17:40:20 +0000

    lang/nim: Update to 1.6.10
    
    ChangeLog: https://nim-lang.org/blog/2022/11/23/version-1610-released.html
    
    PR:             267984
    MFH:            2022Q4 (bugfixes)
---
 lang/nim/Makefile                          | 15 ++++++++++++---
 lang/nim/distinfo                          |  6 +++---
 lang/nim/files/patch-compiler_nimpaths.nim | 13 +++++++++++++
 lang/nim/pkg-plist                         |  3 +++
 4 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/lang/nim/Makefile b/lang/nim/Makefile
index 93aeac2d05aa..52efcb06fa1c 100644
--- a/lang/nim/Makefile
+++ b/lang/nim/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	nim
-DISTVERSION=	1.6.8
+DISTVERSION=	1.6.10
 CATEGORIES=	lang
 MASTER_SITES=	https://nim-lang.org/download/
 
@@ -19,8 +19,6 @@ USES=		compiler:c11 cpe tar:xz
 
 CPE_VENDOR=	nim-lang
 
-MAKE_JOBS_UNSAFE=	yes
-
 OPTIONS_DEFINE=		DOCS TOOLS
 OPTIONS_DEFAULT=	TOOLS
 OPTIONS_EXCLUDE_powerpc64=	DOCS
@@ -46,6 +44,13 @@ post-patch:
 	@${REINPLACE_CMD} -e s/%%GCC_DEFAULT%%/${GCC_DEFAULT}/ \
 		${WRKSRC}/build.sh ${WRKSRC}/config/nim.cfg
 .endif
+	# Make a fake nimdoc.css so that we can change the expected target
+	# to where it should be, instead of where the nim project hard
+	# code it to be.
+	${MKDIR} ${WRKSRC}/share/doc/nim
+	${LN} -s ${WRKSRC}/doc/nimdoc.css ${WRKSRC}/share/doc/nim/nimdoc.css
+	${MKDIR} ${WRKSRC}/share/nim
+	${LN} -s ${WRKSRC}/tools/dochack ${WRKSRC}/share/nim/dochack
 
 do-build:
 	cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
@@ -93,6 +98,10 @@ do-install-TOOLS-on:
 .for t in ${TLIST}
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/${t} ${STAGEDIR}${PREFIX}/bin
 .endfor
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/nim/dochack
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/dochack/dochack.nim ${STAGEDIR}${PREFIX}/share/nim/dochack
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/dochack/dochack.js ${STAGEDIR}${PREFIX}/share/nim/dochack
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/dochack/fuzzysearch.nim ${STAGEDIR}${PREFIX}/share/nim/dochack
 
 do-test:
 	cd ${WRKSRC} && ${SETENV} ./koch test all -d:release \
diff --git a/lang/nim/distinfo b/lang/nim/distinfo
index 942a5b88c6cc..35a292cdb088 100644
--- a/lang/nim/distinfo
+++ b/lang/nim/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1664352984
-SHA256 (nim-1.6.8.tar.xz) = 0f5b65cdb60f78af41cb075c238983689a1e1f7e25c819f179862c18a484cf57
-SIZE (nim-1.6.8.tar.xz) = 5219880
+TIMESTAMP = 1669300700
+SHA256 (nim-1.6.10.tar.xz) = 13d7702f8b57087babe8cd051c13bc56a3171418ba867b49c6bbd09b29d24fea
+SIZE (nim-1.6.10.tar.xz) = 5216284
diff --git a/lang/nim/files/patch-compiler_nimpaths.nim b/lang/nim/files/patch-compiler_nimpaths.nim
new file mode 100644
index 000000000000..40ee13ff8f4e
--- /dev/null
+++ b/lang/nim/files/patch-compiler_nimpaths.nim
@@ -0,0 +1,13 @@
+--- compiler/nimpaths.nim.orig	2022-11-21 01:04:21 UTC
++++ compiler/nimpaths.nim
+@@ -20,8 +20,8 @@ Unstable API
+ import os, strutils
+ 
+ const
+-  docCss* = "$nimr/doc/nimdoc.css"
+-  docHackNim* = "$nimr/tools/dochack/dochack.nim"
++  docCss* = "$nimr/share/doc/nim/nimdoc.css"
++  docHackNim* = "$nimr/share/nim/dochack/dochack.nim"
+   docHackJs* = docHackNim.changeFileExt("js")
+   docHackJsFname* = docHackJs.lastPathPart
+   theindexFname* = "theindex.html"
diff --git a/lang/nim/pkg-plist b/lang/nim/pkg-plist
index 26ae9d3fdea0..313fe2a9a080 100644
--- a/lang/nim/pkg-plist
+++ b/lang/nim/pkg-plist
@@ -495,6 +495,9 @@ lib/nim/wrappers/pcre.nim
 lib/nim/wrappers/postgres.nim
 lib/nim/wrappers/sqlite3.nim
 lib/nim/wrappers/tinyc.nim
+share/nim/dochack/dochack.nim
+share/nim/dochack/dochack.js
+share/nim/dochack/fuzzysearch.nim
 %%PORTDOCS%%%%DOCSDIR%%/advopt.txt
 %%PORTDOCS%%%%DOCSDIR%%/apis.rst
 %%PORTDOCS%%%%DOCSDIR%%/astspec.txt