pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/nodejs Disable W^X for node itself and the mksnap...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6a7f7e9c92f3
branches:  trunk
changeset: 351786:6a7f7e9c92f3
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Aug 27 18:12:01 2016 +0000

description:
Disable W^X for node itself and the mksnapshot binary used during
bootstrap.

diffstat:

 lang/nodejs/Makefile.common |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r b15cf200d5c9 -r 6a7f7e9c92f3 lang/nodejs/Makefile.common
--- a/lang/nodejs/Makefile.common       Sat Aug 27 18:11:12 2016 +0000
+++ b/lang/nodejs/Makefile.common       Sat Aug 27 18:12:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.9 2016/07/09 13:03:53 wiz Exp $
+# $NetBSD: Makefile.common,v 1.10 2016/08/27 18:12:01 joerg Exp $
 # used by lang/nodejs/Makefile
 # used by lang/nodejs4/Makefile
 
@@ -47,6 +47,15 @@
 
 TEST_TARGET=           check
 
+.if defined(TOOLS_PLATFORM.paxctl)
+post-configure:
+       ${SED} 's|call do_cmd,link)|call do_cmd,link)\${.newline}       ${TOOLS_PLATFORM.paxctl} +m $$@|' \
+           < ${WRKSRC}/out/deps/v8/tools/gyp/mksnapshot.target.mk \
+           > ${WRKSRC}/out/deps/v8/tools/gyp/mksnapshot.target.mk.tmp
+       ${MV} ${WRKSRC}/out/deps/v8/tools/gyp/mksnapshot.target.mk.tmp \
+             ${WRKSRC}/out/deps/v8/tools/gyp/mksnapshot.target.mk
+.endif
+
 pre-install:
        ${FIND} ${WRKSRC}/deps/npm -name '*.orig' | ${XARGS} ${RM} -f
        ${CHMOD} -R g-w ${WRKSRC}
@@ -54,6 +63,9 @@
 post-install:
        cd ${DESTDIR}${PREFIX} && ${SETENV} ${BASH} \
                ./lib/node_modules/npm/scripts/relocate.sh ${PREFIX}/bin/node
+.if defined(TOOLS_PLATFORM.paxctl)
+       ${TOOLS_PLATFORM.paxctl} +m ${DESTDIR}${PREFIX}/bin/node
+.endif
 
 .if ${OPSYS} != "Darwin"
 .include "../../devel/libexecinfo/buildlink3.mk"



Home | Main Index | Thread Index | Old Index