openbsd-ports/lang/node/Makefile
jasper e65c567a95 - update node to 0.8.0
* please see this blog post for more details on the changes:
  http://blog.nodejs.org/2012/06/25/node-v0-8-0/
  * the migration wiki can be consulted to port your code to node 0.8:
    https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8
    - expose node-gyp, so it's now installed into ${LOCALBASE}/bin/ too

    from aaron bieber with tweaks by me
    ok jeremy@
2012-06-28 08:30:28 +00:00

82 lines
1.9 KiB
Makefile

# $OpenBSD: Makefile,v 1.3 2012/06/28 08:30:28 jasper Exp $
# XXX:
# - Needs __ARM_NR_cacheflush (or the like) to work on arm-based ports.
# - Needs bundled libcares as arpa/nameser.h does not include ns_t_a.
ONLY_FOR_ARCHS= amd64 i386
COMMENT= V8 JavaScript for clients and servers
NODE_VERSION= v0.8.0
DISTNAME= node-${NODE_VERSION}
PKGNAME= ${DISTNAME:S/v//g}
CATEGORIES= lang devel
HOMEPAGE= http://nodejs.org/
MAINTAINER= Aaron Bieber <deftly@gmail.com>
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}dist/${NODE_VERSION}/
MODULES= lang/python
VMEM_WARNING= Yes
WANTLIB += c crypto execinfo kvm m pthread ssl stdc++ util z
LIB_DEPENDS= devel/libexecinfo
USE_GMAKE= Yes
BUILD_DEPENDS= sysutils/flock
# node-gyp uses it at runtime
RUN_DEPENDS= devel/gmake \
sysutils/flock
MODPY_ADJ_FILES= tools/node-waf \
tools/waf-light
REGRESS_TARGET= test
CONFIGURE_STYLE= simple
CONFIGURE_ARGS= --openssl-use-sys \
--shared-zlib
SUBST_VARS+= CFLAGS
SUBST_VARS+= PREFIX
SUBST_VARS+= DISTFILES
MAKE_ENV+= V=1 CXX=c++ CCFLAGS+="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
NO_CCACHE= Yes
pre-configure:
@# Bad practice, but prevents a whole stack of patches.
ln -sf ${LOCALBASE}/bin/python${MODPY_VERSION} ${WRKDIR}/bin/python
${SUBST_CMD} ${WRKDIST}/lib/module.js \
${WRKDIST}/deps/npm/node_modules/node-gyp/lib/configure.js \
${WRKDIST}/deps/npm/node_modules/node-gyp/lib/install.js
post-install:
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
${PREFIX}/lib/node/wafadmin
${INSTALL_DATA} ${FULLDISTDIR}/${DISTFILES} \
${PREFIX}/lib/node/${DISTFILES}
ln -s ${TRUEPREFIX}/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \
${PREFIX}/bin/node-gyp;
cd ${PREFIX}/lib/node_modules/npm/node_modules && for x in *; do \
mv $$x ../..; \
ln -s ../../$$x $$x; \
done
.include <bsd.port.mk>