pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/npm lang/npm: Set proper env for build/install, e...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d331697e7e38
branches:  trunk
changeset: 382331:d331697e7e38
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Thu Jun 28 11:28:01 2018 +0000

description:
lang/npm: Set proper env for build/install, ensure FAKEHOME is used.

diffstat:

 lang/npm/Makefile                             |   8 ++++----
 lang/npm/PLIST                                |   3 +--
 lang/npm/distinfo                             |   3 ++-
 lang/npm/patches/patch-lib_config_defaults.js |  16 ++++++++++++++++
 4 files changed, 23 insertions(+), 7 deletions(-)

diffs (77 lines):

diff -r b775ace09d9b -r d331697e7e38 lang/npm/Makefile
--- a/lang/npm/Makefile Thu Jun 28 11:18:58 2018 +0000
+++ b/lang/npm/Makefile Thu Jun 28 11:28:01 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2018/05/24 14:14:43 fhajny Exp $
+# $NetBSD: Makefile,v 1.7 2018/06/28 11:28:01 fhajny Exp $
 
 DISTNAME=      npm-6.1.0
 CATEGORIES=    lang
@@ -36,13 +36,13 @@
 .include "../../mk/bsd.prefs.mk"
 
 pre-build:
-       cd ${WRKSRC} && node bin/npm-cli.js install ${WRKDIR}/${MARKED} --no-global --no-timing --no-save
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} node bin/npm-cli.js install ${WRKDIR}/${MARKED} --no-global --no-timing --no-save
 
 do-install:
        ${FIND} ${WRKSRC} -type f -name '*.orig' -delete
-       cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${PREFIX}/bin/node \
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} ${PREFIX}/bin/node \
                bin/npm-cli.js pack
-       cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${PREFIX}/bin/node \
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} ${PREFIX}/bin/node \
                bin/npm-cli.js install -g -f ${DISTNAME}.tgz
 .if ${PKGMANDIR} != "share/man"
        ${RM} -f -r ${DESTDIR}${PREFIX}/${PKGMANDIR}
diff -r b775ace09d9b -r d331697e7e38 lang/npm/PLIST
--- a/lang/npm/PLIST    Thu Jun 28 11:18:58 2018 +0000
+++ b/lang/npm/PLIST    Thu Jun 28 11:28:01 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2018/05/24 14:14:43 fhajny Exp $
+@comment $NetBSD: PLIST,v 1.4 2018/06/28 11:28:01 fhajny Exp $
 bin/npm
 bin/npx
 lib/node_modules/npm/.github/CODEOWNERS
@@ -6543,4 +6543,3 @@
 man/man7/npm-scripts.7
 man/man7/removing-npm.7
 man/man7/semver.7
-@pkgdir share
diff -r b775ace09d9b -r d331697e7e38 lang/npm/distinfo
--- a/lang/npm/distinfo Thu Jun 28 11:18:58 2018 +0000
+++ b/lang/npm/distinfo Thu Jun 28 11:28:01 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2018/05/24 14:14:43 fhajny Exp $
+$NetBSD: distinfo,v 1.7 2018/06/28 11:28:01 fhajny Exp $
 
 SHA1 (marked-0.3.19.tar.gz) = d30691ac399f05d156f40a0a893ce7a2a7f6c5be
 RMD160 (marked-0.3.19.tar.gz) = e78a28dfaf5fc1039e48f63228f892fa24a13e6f
@@ -9,6 +9,7 @@
 SHA512 (npm-6.1.0.tar.gz) = 8c44e462965ea1ca93f76a34b98726eb20123c127fda8a19643cb2345d612381e94e2741fcdbe814ccf3c73069ecdc89412d8963d2b4f0fb67a8c45bb6f1d85c
 Size (npm-6.1.0.tar.gz) = 8579329 bytes
 SHA1 (patch-Makefile) = 29b3e9515ee2a45f3b12c116075c00faca73d270
+SHA1 (patch-lib_config_defaults.js) = 5a00cbef781c9ab4efcec41ad781987f3f540886
 SHA1 (patch-node__modules_node-gyp_gyp_pylib_gyp_generator_make.py) = 291e079fb48caea7501ab864c19ef26672b76bc5
 SHA1 (patch-node__modules_node-gyp_gyp_pylib_gyp_xcode__emulation.py) = 7f9f5cd8aadafd309ba8dfb27f96fe8fa56a8af8
 SHA1 (patch-node__modules_node-gyp_lib_configure.js) = 5cee993904ffeb1497418706e258c2e61bbd847e
diff -r b775ace09d9b -r d331697e7e38 lang/npm/patches/patch-lib_config_defaults.js
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/npm/patches/patch-lib_config_defaults.js     Thu Jun 28 11:28:01 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_config_defaults.js,v 1.1 2018/06/28 11:28:01 fhajny Exp $
+
+If both PREFIX and DESTDIR are defined, combine for UNIX best practice.
+
+--- lib/config/defaults.js.orig        2018-05-24 01:48:32.000000000 +0000
++++ lib/config/defaults.js
+@@ -91,6 +91,9 @@ Object.defineProperty(exports, 'defaults
+ 
+   if (process.env.PREFIX) {
+     globalPrefix = process.env.PREFIX
++    if (process.env.DESTDIR) {
++      globalPrefix = path.join(process.env.DESTDIR, globalPrefix)
++    }
+   } else if (process.platform === 'win32') {
+     // c:\node\node.exe --> prefix=c:\node\
+     globalPrefix = path.dirname(process.execPath)



Home | Main Index | Thread Index | Old Index