pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/npm npm: use a different way to install to PKGMAN...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fd6a754b8179
branches:  trunk
changeset: 330851:fd6a754b8179
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Mar 06 09:42:09 2019 +0000

description:
npm: use a different way to install to PKGMANDIR.
(Moving a relative symlink to another directory breaks it)

bump PKGREVISION

diffstat:

 lang/npm/Makefile                                       |  20 ++++++++++++----
 lang/npm/distinfo                                       |   3 +-
 lang/npm/patches/patch-node__modules_bin-links_index.js |  15 ++++++++++++
 3 files changed, 32 insertions(+), 6 deletions(-)

diffs (80 lines):

diff -r 91dc69ede7ed -r fd6a754b8179 lang/npm/Makefile
--- a/lang/npm/Makefile Wed Mar 06 09:37:41 2019 +0000
+++ b/lang/npm/Makefile Wed Mar 06 09:42:09 2019 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.18 2019/02/14 10:36:40 adam Exp $
+# $NetBSD: Makefile,v 1.19 2019/03/06 09:42:09 maya Exp $
 
 DISTNAME=      cli-6.8.0
 PKGNAME=       ${DISTNAME:S/cli/npm/}
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=npm/}
 GITHUB_PROJECT=        cli
@@ -35,6 +36,13 @@
 SUBST_MESSAGE.python=  Fixing path to Python
 SUBST_VARS.python=     PYTHONBIN
 
+SUBST_CLASSES+=                        man-directory
+SUBST_STAGE.man-directory=     pre-configure
+SUBST_FILES.man-directory=     node_modules/bin-links/index.js
+SUBST_MESSAGE.man-directory=   Changing installation to PREFIX/man
+SUBST_VARS.man-directory=      PKGMANDIR
+
+
 CHECK_INTERPRETER_SKIP+=       lib/node_modules/npm/*
 
 .include "../../mk/bsd.prefs.mk"
@@ -48,10 +56,12 @@
                bin/npm-cli.js pack
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} ${PREFIX}/bin/node \
                bin/npm-cli.js install -g -f ${PKGNAME_NOREV}.tgz
-.if ${PKGMANDIR} != "share/man"
-       ${RM} -f -r ${DESTDIR}${PREFIX}/${PKGMANDIR}
-       ${MV} ${DESTDIR}${PREFIX}/share/man ${DESTDIR}${PREFIX}/${PKGMANDIR}
-.endif
+
+# These are relative symlinks, and they're broken from this command
+#.if ${PKGMANDIR} != "share/man"
+#      ${RM} -f -r ${DESTDIR}${PREFIX}/${PKGMANDIR}
+#      ${MV} ${DESTDIR}${PREFIX}/share/man ${DESTDIR}${PREFIX}/${PKGMANDIR}
+#.endif
 
 .include "../../lang/python/pyversion.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 91dc69ede7ed -r fd6a754b8179 lang/npm/distinfo
--- a/lang/npm/distinfo Wed Mar 06 09:37:41 2019 +0000
+++ b/lang/npm/distinfo Wed Mar 06 09:42:09 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2019/02/14 10:36:40 adam Exp $
+$NetBSD: distinfo,v 1.14 2019/03/06 09:42:09 maya Exp $
 
 SHA1 (cli-6.8.0.tar.gz) = d79c28c6e49ea9597dbe4e3f41d45ac73b8e5176
 RMD160 (cli-6.8.0.tar.gz) = 05b0ddac914774e410d400c9412ef4bb41cedfb2
@@ -10,6 +10,7 @@
 Size (marked-0.6.0.tar.gz) = 141482 bytes
 SHA1 (patch-Makefile) = 29b3e9515ee2a45f3b12c116075c00faca73d270
 SHA1 (patch-lib_config_defaults.js) = 5a00cbef781c9ab4efcec41ad781987f3f540886
+SHA1 (patch-node__modules_bin-links_index.js) = adbabdccde34483973ba134aa461b48ba690b5a2
 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 91dc69ede7ed -r fd6a754b8179 lang/npm/patches/patch-node__modules_bin-links_index.js
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/npm/patches/patch-node__modules_bin-links_index.js   Wed Mar 06 09:42:09 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-node__modules_bin-links_index.js,v 1.1 2019/03/06 09:42:09 maya Exp $
+
+Install to PKGMANDIR.
+
+--- node_modules/bin-links/index.js.orig       2019-02-13 23:14:36.000000000 +0000
++++ node_modules/bin-links/index.js
+@@ -117,7 +117,7 @@ function linkBin (from, to, opts) {
+ function linkMans (pkg, folder, parent, gtop, opts) {
+   if (!pkg.man || !gtop || process.platform === 'win32') return
+ 
+-  var manRoot = path.resolve(opts.prefix, 'share', 'man')
++  var manRoot = path.resolve(opts.prefix, '@PKGMANDIR@')
+   opts.log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot)
+ 
+   // make sure that the mans are unique.



Home | Main Index | Thread Index | Old Index