pkgsrc-WIP-changes archive

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

nim: move NIM_FLAGS in front of custom functions



Module Name:	pkgsrc-wip
Committed By:	arcathrax <ivan%ivanpollak.com@localhost>
Pushed By:	arcathrax
Date:		Sun Nov 1 21:02:42 2026 +0100
Changeset:	6bcf0633e41752f56f1bcfe0b20d01c4856bfed3

Modified Files:
	nim/Makefile

Log Message:
nim: move NIM_FLAGS in front of custom functions

Done because this will result in better readability. Variables are now all defined in front of the functions.

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

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

diffstat:
 nim/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diffs:
diff --git a/nim/Makefile b/nim/Makefile
index 5bd51276f2..5755e3730f 100644
--- a/nim/Makefile
+++ b/nim/Makefile
@@ -51,6 +51,12 @@ SUBST_STAGE.paths=	pre-configure
 SUBST_FILES.paths=	config/nim.cfg
 SUBST_SED.paths=	-e 's,/usr/pkg,${PREFIX},g'
 
+# 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:/}
+
 post-extract:
 	# TODO: csources for cross-building?
 	# ${MV} ${WRKSRC}/csources_v2-${C2VERSION_TAG} ${WRKSRC}/csources_v2
@@ -64,12 +70,6 @@ post-extract:
 	${MKDIR} ${WRKSRC}/dist/atlas/dist
 	${MV} ${WRKSRC}/sat-${SAT_TAG} ${WRKSRC}/dist/atlas/dist/sat
 
-# 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:/}
-
 do-build:
 	# build nim csource
 	cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} sh ./build.sh


Home | Main Index | Thread Index | Old Index