summaryrefslogtreecommitdiff
path: root/lang/npm
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2019-03-06 09:42:09 +0000
committermaya <maya@pkgsrc.org>2019-03-06 09:42:09 +0000
commitfd72d1c845f67e4f08e0f65b3ba79599e552fd0c (patch)
treed0262df175bcaca469b534fe0880a26f88d5702b /lang/npm
parent78b5e3c0873ace0c2f2c80b5a55b1db54448bb5d (diff)
downloadpkgsrc-fd72d1c845f67e4f08e0f65b3ba79599e552fd0c.tar.gz
npm: use a different way to install to PKGMANDIR.
(Moving a relative symlink to another directory breaks it) bump PKGREVISION
Diffstat (limited to 'lang/npm')
-rw-r--r--lang/npm/Makefile20
-rw-r--r--lang/npm/distinfo3
-rw-r--r--lang/npm/patches/patch-node__modules_bin-links_index.js15
3 files changed, 32 insertions, 6 deletions
diff --git a/lang/npm/Makefile b/lang/npm/Makefile
index daff98f01fc..5e95fc8d505 100644
--- a/lang/npm/Makefile
+++ b/lang/npm/Makefile
@@ -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_FILES.python= node_modules/node-gyp/lib/configure.js
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 @@ do-install:
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 --git a/lang/npm/distinfo b/lang/npm/distinfo
index 26bfb0e97e6..1c95722548e 100644
--- a/lang/npm/distinfo
+++ b/lang/npm/distinfo
@@ -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 @@ SHA512 (marked-0.6.0.tar.gz) = 3efbda7b2ed8a5d75948805f2835b4e985ab81ccd68548db7
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 --git a/lang/npm/patches/patch-node__modules_bin-links_index.js b/lang/npm/patches/patch-node__modules_bin-links_index.js
new file mode 100644
index 00000000000..2732510d5b7
--- /dev/null
+++ b/lang/npm/patches/patch-node__modules_bin-links_index.js
@@ -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.