# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
maintainers {ciserlohn @ci42}
description Evented I/O for V8 JavaScript
long_description Node's goal is to provide an easy way to build scalable network programs in JavaScript. \
Node is similar in design to and influenced by systems like Ruby's Event \
Machine or Python's Twisted. Node takes the event model a bit further-it \
presents the event loop as a language construct instead of as a library.
conflicts nodejs4 nodejs5 nodejs7 nodejs8 nodejs9 nodejs10 nodejs11
homepage https://nodejs.org/
master_sites ${homepage}dist/v${version}
checksums rmd160 500797a0b9155d4c8902a10f18ffc947e6c85586 \
sha256 9a4bfc99787f8bdb07d5ae8b1f00ec3757e7b09c99d11f0e8a5e9a16a134ec0f \
distname node-v${version}
depends_build port:pkgconfig
path:lib/libssl.dylib:openssl
proc rec_glob {basedir pattern} {
set files [glob -directory $basedir -nocomplain -type f $pattern]
foreach dir [glob -directory $basedir -nocomplain -type d *] {
lappend files {*}[rec_glob $dir $pattern]
configure.python ${prefix}/bin/python2.7
patchfiles patch-common.gypi.diff \
patch-tools-gyp-pylib-gyp-generator-make.py.diff
foreach f [concat ${worksrcpath}/configure \
${worksrcpath}/tools/gyp/gyp \
${worksrcpath}/deps/cares/gyp_cares \
${worksrcpath}/deps/v8/build/gyp_v8 \
${worksrcpath}/deps/v8/tools/mingw-generate-makefiles.sh \
[rec_glob ${worksrcpath} *.py]] {
reinplace -q "s|/usr/bin/env python|${configure.python}|" ${f}
foreach gypfile [rec_glob ${worksrcpath} *.gyp*] {
reinplace -q "s|'python'|'${configure.python}'|" ${gypfile}