pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

nim: pass CFLAGS and LDFLAGS to nim



Module Name:	pkgsrc-wip
Committed By:	arcathrax <ivan%ivanpollak.com@localhost>
Pushed By:	arcathrax
Date:		Mon Nov 2 13:06:35 2026 +0100
Changeset:	a80d3e2767bb4bccc41e98985cf64aa55f30c96f

Modified Files:
	nim/Makefile

Log Message:
nim: pass CFLAGS and LDFLAGS to nim

Nim doesn't care about CFLAGS and LDFLAGS env variables but rather has its own
--passC/--passL options to pass variables to the C Compiler or to the linker.

Find out more here:
https://nim-lang.org/docs/nimc.html

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a80d3e2767bb4bccc41e98985cf64aa55f30c96f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 nim/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diffs:
diff --git a/nim/Makefile b/nim/Makefile
index 27502534ec..fe0f949039 100644
--- a/nim/Makefile
+++ b/nim/Makefile
@@ -57,8 +57,8 @@ USE_LANGUAGES= c
 # Nim doesn't automatically passes LDFLAGS/CFLAGS variables to the compiler
 # but rather uses its own --passL/--passC flags. The two lines below translate
 # the flags so the nim compiler actually uses them.
-# NIM_FLAGS=	${LDFLAGS:S/^/--passL:/}
-# NIM_FLAGS+=	${CFLAGS:S/^/--passC:/}
+NIM_FLAGS=	${LDFLAGS:S/^/--passL:/}
+NIM_FLAGS+=	${CFLAGS:S/^/--passC:/}
 
 post-extract:
 	# TODO: csources for cross-building?
@@ -84,8 +84,9 @@ do-build:
 
 	cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch \
 		boot \
+		-d:release \
 		--parallelBuild:${_MAKE_JOBS_N} \
-		-d:release
+		${NIM_FLAGS}
 
 	# Build docs
 	# cd ${WRKSRC} && ./koch \
@@ -95,7 +96,9 @@ do-build:
 	# Build tools
 	cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch \
 		tools \
-		--parallelBuild:${_MAKE_JOBS_N}
+		-d:release \
+		--parallelBuild:${_MAKE_JOBS_N} \
+		${NIM_FLAGS}
 
 
 do-install:


Home | Main Index | Thread Index | Old Index