2016-04-10 13:40:48 +00:00
|
|
|
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= npm
|
2017-04-01 10:52:20 +00:00
|
|
|
PORTVERSION= 2.15.12
|
2016-04-10 13:40:48 +00:00
|
|
|
CATEGORIES= www
|
|
|
|
MASTER_SITES= LOCAL/sunpoet
|
|
|
|
PKGNAMESUFFIX= 2
|
|
|
|
|
|
|
|
MAINTAINER= sunpoet@FreeBSD.org
|
|
|
|
COMMENT= Node package manager
|
|
|
|
|
|
|
|
LICENSE= MIT
|
|
|
|
|
|
|
|
RUN_DEPENDS= gmake:devel/gmake
|
|
|
|
|
2017-06-18 05:51:03 +00:00
|
|
|
CONFLICTS_INSTALL= npm npm3 npm4
|
2016-04-10 13:40:48 +00:00
|
|
|
|
|
|
|
OPTIONS_SINGLE= BACKEND
|
2016-12-25 21:16:54 +00:00
|
|
|
OPTIONS_SINGLE_BACKEND= NODE NODE4 NODE6
|
2016-04-29 22:42:12 +00:00
|
|
|
OPTIONS_DEFAULT=NODE4
|
2016-12-25 21:16:54 +00:00
|
|
|
NODE_DESC= Use www/node as backend
|
2016-04-10 13:40:48 +00:00
|
|
|
NODE4_DESC= Use www/node4 as backend
|
2016-12-25 21:16:54 +00:00
|
|
|
NODE6_DESC= Use www/node6 as backend
|
2016-04-10 13:40:48 +00:00
|
|
|
|
|
|
|
MAKE_ARGS= npm_config_prefix=${STAGEDIR}${PREFIX}
|
|
|
|
MANPREFIX= ${PREFIX}/lib/node_modules/npm
|
|
|
|
NO_ARCH= yes
|
|
|
|
NO_BUILD= yes
|
|
|
|
REINPLACE_ARGS= -i ''
|
|
|
|
USES= cpe python:2 shebangfix tar:xz
|
|
|
|
|
|
|
|
CPE_VENDOR= npmjs
|
|
|
|
CPE_PRODUCT= node_packaged_modules
|
|
|
|
|
|
|
|
SHEBANG_FILES= lib/utils/completion.sh \
|
|
|
|
node_modules/node-gyp/test/docker.sh \
|
|
|
|
node_modules/request/node_modules/node-uuid/benchmark/bench.sh \
|
|
|
|
scripts/clean-old.sh \
|
|
|
|
scripts/release.sh \
|
2016-05-01 19:59:03 +00:00
|
|
|
scripts/relocate.sh
|
2016-04-10 13:40:48 +00:00
|
|
|
|
2016-12-25 21:16:54 +00:00
|
|
|
NODE_RUN_DEPENDS= node>=0.8.0:www/node
|
2016-04-10 13:40:48 +00:00
|
|
|
NODE4_RUN_DEPENDS= node4>=0.8.0:www/node4
|
2016-12-25 21:16:54 +00:00
|
|
|
NODE6_RUN_DEPENDS= node6>=0.8.0:www/node6
|
2016-04-10 13:40:48 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${ARCH} == "i386"
|
|
|
|
# Workaround for kernel bug 178881
|
|
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-bug-178881
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|node cli.js|& --cache ${WRKDIR}/.cache|' ${WRKSRC}/Makefile
|
|
|
|
@${ECHO_CMD} 'MANPATH ${PREFIX}/lib/node_modules/npm/man' > ${WRKDIR}/npm.conf
|
|
|
|
@${REINPLACE_CMD} -e 's|exec python|exec ${PYTHON_CMD}|' ${WRKSRC}/node_modules/node-gyp/gyp/gyp
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/npm.conf ${STAGEDIR}${PREFIX}/etc/man.d/npm.conf
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|