[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / nodejs

File: [cvs.NetBSD.org] / pkgsrc / lang / nodejs / Makefile.common (download)

Revision 1.20, Sat May 12 08:59:56 2018 UTC (11 months, 1 week ago) by fhajny
Branch: MAIN
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2
Changes since 1.19: +7 -1 lines

lang/nodejs: Use pkgsrc http-parser, libuv, libcares instead of bundled versions.
Switch back to bundled nghttp2 on lang/nodejs to reconcile a conflict
of OpenSSL versions.

# $NetBSD: Makefile.common,v 1.20 2018/05/12 08:59:56 fhajny Exp $
# used by lang/nodejs/Makefile
# used by lang/nodejs6/Makefile
# used by lang/nodejs8/Makefile

CATEGORIES=	devel
MASTER_SITES=	https://nodejs.org/dist/${DISTNAME:S/node-//}/
PKGNAME=	${DISTNAME:S/-v/js-/}

MAINTAINER=	filip@joyent.com
HOMEPAGE=	https://nodejs.org/
COMMENT=	V8 JavaScript for clients and servers
LICENSE=	mit

HAS_CONFIGURE=	yes
USE_TOOLS+=	bash gmake pkg-config
USE_LANGUAGES=	c c++

PYTHON_FOR_BUILD_ONLY=		yes
PYTHON_VERSIONS_INCOMPATIBLE=	34 35 36 # not yet ported as of 0.10.24

GCC_REQD+=		4.8

CONFIG_SHELL=		${PYTHONBIN}
CONFIGURE_ARGS+=	--prefix=${PREFIX}
CONFIGURE_ARGS+=	--shared-cares
CONFIGURE_ARGS+=	--shared-http-parser
CONFIGURE_ARGS+=	--shared-libuv
CONFIGURE_ARGS+=	--shared-zlib
CONFIGURE_ARGS+=	--without-npm
PTHREAD_AUTO_VARS=	yes

CONFIGURE_ENV.NetBSD+=	GYP_DEFINES="OS=netbsd"
MAKE_ENV.NetBSD+=	GYP_DEFINES="OS=netbsd"

.if ${OPSYS} == "Linux" && !exists(/usr/bin/gold)
CONFIGURE_ENV+=		GYP_DEFINES="linux_use_gold_flags=0"
.endif

REPLACE_PYTHON+=	configure
REPLACE_PYTHON+=	tools/genv8constants.py
REPLACE_PYTHON+=	tools/gyp/pylib/gyp/flock_tool.py

.if ${OPSYS} == "NetBSD"
BUILD_DEPENDS+=	lockf-[0-9]*:../../sysutils/lockf
.endif

TEST_TARGET=		check

.if defined(TOOLS_PLATFORM.paxctl)
SUBST_CLASSES+=			mksnapshot
SUBST_STAGE.mksnapshot=		post-configure
SUBST_FILES.mksnapshot=		out/deps/v8/tools/gyp/mksnapshot.target.mk
SUBST_FILES.mksnapshot+=	out/deps/v8/src/mksnapshot.target.mk
SUBST_SED.mksnapshot+=		-e 's|call do_cmd,link)|call do_cmd,link)\${.newline}	${TOOLS_PLATFORM.paxctl} +m $$@|'
.endif

pre-install:
	${CHMOD} -R g-w ${WRKSRC}

post-install:
.if defined(TOOLS_PLATFORM.paxctl)
	${TOOLS_PLATFORM.paxctl} +m ${DESTDIR}${PREFIX}/bin/node
.endif

.if ${OPSYS} != "Darwin"
.include "../../devel/libexecinfo/buildlink3.mk"
.endif
.include "../../devel/libuv/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../lang/python/tool.mk"
.include "../../net/libcares/buildlink3.mk"
.include "../../www/http-parser/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"