pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/nim



Module Name:    pkgsrc
Committed By:   pho
Date:           Thu Nov 18 02:23:44 UTC 2021

Modified Files:
        pkgsrc/lang/nim: Makefile

Log Message:
Support PKGSRC_USE_RELRO

Also removed "--skipUserCfg --skipParentCfg" from the invocation of
koch. These flags are automatically passed to nim by koch.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/lang/nim/Makefile

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

Modified files:

Index: pkgsrc/lang/nim/Makefile
diff -u pkgsrc/lang/nim/Makefile:1.21 pkgsrc/lang/nim/Makefile:1.22
--- pkgsrc/lang/nim/Makefile:1.21       Sun May 30 13:45:46 2021
+++ pkgsrc/lang/nim/Makefile    Thu Nov 18 02:23:44 2021
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2021/05/30 13:45:46 ryoon Exp $
+# $NetBSD: Makefile,v 1.22 2021/11/18 02:23:44 pho Exp $
 
 DISTNAME=      nim-1.4.8
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  http://nim-lang.org/download/
 EXTRACT_SUFX=  .tar.xz
@@ -20,14 +21,18 @@ INSTALLATION_DIRS=  bin
 post-patch:
        cd ${WRKSRC}/bin && ${LN} -sf nim-gdb nim-gdb.bash
 
+# nim doesn't honor the environment variable LDFLAGS. In order to
+# support PKGSRC_USE_RELRO, we need to translate the flags to compiler
+# options.
+NIM_FLAGS=     ${LDFLAGS:S/^/--passL:/}
 do-build:
        cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} sh ./build.sh
        printf '#! %s\nexec %s _=%s/nim/bin/nim %s/nim/bin/nim "$$@"\n' \
                "${SH}" "${SETENV}" "${PREFIX}" "${PREFIX}" \
                > ${WRKSRC}/nim-wrapper.sh
        cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./bin/nim c --skipUserCfg --skipParentCfg --parallelBuild:${_MAKE_JOBS_N} koch
-       cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch boot --parallelBuild:${_MAKE_JOBS_N} -d:release --skipUserCfg --skipParentCfg
-       cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch --stable tools --parallelBuild:${_MAKE_JOBS_N} --skipUserCfg --skipParentCfg
+       cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch boot --parallelBuild:${_MAKE_JOBS_N} -d:release ${NIM_FLAGS}
+       cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch --stable tools --parallelBuild:${_MAKE_JOBS_N} ${NIM_FLAGS}
 
 do-install:
        cd ${WRKSRC} && sh ./install.sh ${DESTDIR}${PREFIX}



Home | Main Index | Thread Index | Old Index