View | Details | Raw Unified | Return to bug 213947 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/Uses/node.mk (+79 lines)
Added Link Here
1
# $FreeBSD$
2
#
3
# Provide support for Node.js
4
#
5
# Feature:      node
6
# Usage:        USES=node, or USES=node:args
7
# Valid ARGS:   <version>, build, run, test
8
#
9
# version	The major version of Node.js required by your port. If omitted,
10
#		the default version is used. The user can choose which Node.js
11
#		version to use as the default using:
12
#
13
# DEFAULT_VERSIONS+=	node=<major version>
14
#
15
# build		Indicates that Node.js is needed at build time and adds
16
#		it to BUILD_DEPENDS.
17
# run		Indicates that Node.js is needed at run time and adds
18
#		it to RUN_DEPENDS.
19
# test		Indicates that Node.js is needed at test time and adds
20
#		it to TEST_DEPENDS.
21
#
22
# If build, run and test are omitted, Node.js will be added as BUILD_DEPENDS,
23
# RUN_DEPENDS and TEST_DEPENDS.
24
#
25
# MAINTAINER:	bradleythughes@fastmail.fm
26
27
.if !defined(_INCLUDE_USES_NODE_MK)
28
_INCLUDE_USES_NODE_MK=    yes
29
30
31
# Make sure that no dependency or some other environment variable
32
# pollutes the build/run dependency detection
33
.undef _NODE_BUILD_DEP
34
.undef _NODE_RUN_DEP
35
.undef _NODE_TEST_DEP
36
_NODE_ARGS=           ${node_ARGS:S/,/ /g}
37
.if ${_NODE_ARGS:Mbuild}
38
_NODE_BUILD_DEP=      yes
39
_NODE_ARGS:=          ${_NODE_ARGS:Nbuild}
40
.endif
41
.if ${_NODE_ARGS:Mrun}
42
_NODE_RUN_DEP=        yes
43
_NODE_ARGS:=          ${_NODE_ARGS:Nrun}
44
.endif
45
.if ${_NODE_ARGS:Mtest}
46
_NODE_TEST_DEP=       yes
47
_NODE_ARGS:=          ${_NODE_ARGS:Ntest}
48
.endif
49
50
# The port does not specify a build, run or test dependency, assume all are
51
# required.
52
.if !defined(_NODE_BUILD_DEP) && !defined(_NODE_RUN_DEP) && \
53
    !defined(_NODE_TEST_DEP) && !defined(NODE_NO_DEPENDS)
54
_NODE_BUILD_DEP=      yes
55
_NODE_RUN_DEP=        yes
56
_NODE_TEST_DEP=       yes
57
.endif
58
59
60
# The remaining argument, if any, is the Node.js major version to use.
61
_NODE_VERSION=	${_NODE_ARGS}
62
.if empty(_NODE_VERSION)
63
_NODE_VERSION=	${NODE_DEFAULT}
64
.endif
65
66
67
# Add build, run, and test dependencies as required.
68
.if defined(_NODE_BUILD_DEP)
69
BUILD_DEPENDS+=	node${_NODE_VERSION}>=${_NODE_VERSION}:www/node${_NODE_VERSION}
70
.endif
71
.if defined(_NODE_RUN_DEP)
72
RUN_DEPENDS+=	node${_NODE_VERSION}>=${_NODE_VERSION}:www/node${_NODE_VERSION}
73
.endif
74
.if defined(_NODE_TEST_DEP)
75
TEST_DEPENDS+=	node${_NODE_VERSION}>=${_NODE_VERSION}:www/node${_NODE_VERSION}
76
.endif
77
78
79
.endif # _INCLUDE_USES_NODE_MK
(-)Mk/bsd.default-versions.mk (-1 / +3 lines)
Lines 15-21 _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes Link Here
15
15
16
LOCALBASE?=	/usr/local
16
LOCALBASE?=	/usr/local
17
17
18
.for lang in APACHE BDB FIREBIRD FPC GCC GHOSTSCRIPT LINUX LUA MYSQL PERL6 \
18
.for lang in APACHE BDB FIREBIRD FPC GCC GHOSTSCRIPT LINUX LUA MYSQL NODE PERL6 \
19
	PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK
19
	PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK
20
.if defined(${lang}_DEFAULT)
20
.if defined(${lang}_DEFAULT)
21
WARNING+=	"The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
21
WARNING+=	"The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
Lines 51-56 WARNING+= "OVERRIDE_LINUX_BASE_PORT is deprecated, please use DEFAULT_VERSIONS+ Link Here
51
LUA_DEFAULT?=		5.2
51
LUA_DEFAULT?=		5.2
52
# Possible values: 5.1, 5.5, 5.6, 5.7, 5.5m, 10.0m, 10.1m, 5.5p, 5.6p
52
# Possible values: 5.1, 5.5, 5.6, 5.7, 5.5m, 10.0m, 10.1m, 5.5p, 5.6p
53
MYSQL_DEFAULT?=		5.6
53
MYSQL_DEFAULT?=		5.6
54
# Possible values: 012, 4, 6, 7
55
NODE_DEFAULT?=		7
54
# Possible values: 5.18, 5.20, 5.22, devel
56
# Possible values: 5.18, 5.20, 5.22, devel
55
.if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \
57
.if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \
56
    defined(PACKAGE_BUILDING))
58
    defined(PACKAGE_BUILDING))

Return to bug 213947