aboutsummaryrefslogtreecommitdiff
path: root/www/node/Makefile
blob: 91c8e03625f3e6c9414fe207951b4ba253eb97c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:		node
# Date created:					2010-04-12
# Whom:						Jin-Sih Lin <linpct@gmail.com>
#
# $FreeBSD$
#

PORTNAME=	node
PORTVERSION=	0.6.17
CATEGORIES=	www
MASTER_SITES=	http://nodejs.org/dist/v${PORTVERSION}/
DISTNAME=	${PORTNAME}-v${PORTVERSION}

MAINTAINER=	linpct@gmail.com
COMMENT=	V8 javascript for client and server

LIB_DEPENDS=	execinfo.1:${PORTSDIR}/devel/libexecinfo

OPTIONS=	SHARED_V8 "Build with lang/v8" off

CONFLICTS=	node-0.[0-57-9]* node-devel-0.[0-9]*

ONLY_FOR_ARCHS=	i386 amd64
CONFIGURE_ARGS=	--no-ssl2 \
		--openssl-includes=${OPENSSLINC} \
		--openssl-libpath=${OPENSSLLIB} \
		--prefix=${PREFIX:S/^${DESTDIR}//} \
		--without-npm

HAS_CONFIGURE=	yes
MAKE_JOBS_SAFE=	yes
ONLY_FOR_ARCHS=	i386 amd64
USE_GMAKE=	yes
USE_LDCONFIG=	yes
USE_PYTHON=	-2.7
USE_OPENSSL=	yes

MAN1=		node.1

.if !defined(DISABLE_MAKE_JOBS)
WAF_ARGS=	--jobs=${MAKE_JOBS_NUMBER}
.endif

.include <bsd.port.options.mk>

.if defined(WITH_SHARED_V8)
CONFIGURE_ARGS+=--shared-v8 \
		--shared-v8-includes=${LOCALBASE}/include \
		--shared-v8-libpath=${LOCALBASE}/lib \
		--without-snapshot
LIB_DEPENDS+=	v8:${PORTSDIR}/lang/v8
PLIST_SUB+=	SHARED_V8="@comment "
.else
PLIST_SUB+=	SHARED_V8=""
.endif

do-build:
	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} tools/waf-light ${WAF_ARGS} build)

do-install:
	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} tools/waf-light ${WAF_ARGS} install)

post-install:
	@${INSTALL_MAN} ${WRKSRC}/doc/node.1 ${MANPREFIX}/man/man1/

.include <bsd.port.mk>