pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/nim Support PKGSRC_USE_RELRO
details: https://anonhg.NetBSD.org/pkgsrc/rev/a42f68a00bf1
branches: trunk
changeset: 769644:a42f68a00bf1
user: pho <pho%pkgsrc.org@localhost>
date: Thu Nov 18 02:23:44 2021 +0000
description:
Support PKGSRC_USE_RELRO
Also removed "--skipUserCfg --skipParentCfg" from the invocation of
koch. These flags are automatically passed to nim by koch.
diffstat:
lang/nim/Makefile | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 79dc5587cf6f -r a42f68a00bf1 lang/nim/Makefile
--- a/lang/nim/Makefile Thu Nov 18 02:05:18 2021 +0000
+++ b/lang/nim/Makefile Thu Nov 18 02:23:44 2021 +0000
@@ -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 @@
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