Permalink
Showing
with
268 additions
and 5 deletions.
- +1 −1 devel/nodejs10/Portfile
- +1 −1 devel/nodejs11/Portfile
- +253 −0 devel/nodejs12/Portfile
- +10 −0 devel/nodejs12/files/patch-common.gypi.diff
- +1 −1 devel/nodejs4/Portfile
- +1 −1 devel/nodejs6/Portfile
- +1 −1 devel/nodejs8/Portfile
| @@ -0,0 +1,253 @@ | ||
| # -*- 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 | ||
|
|
||
| PortSystem 1.0 | ||
| PortGroup cxx11 1.1 | ||
|
|
||
| name nodejs12 | ||
| version 12.0.0 | ||
| categories devel net | ||
| platforms darwin | ||
| license {MIT BSD} | ||
| maintainers {ciserlohn @ci42} openmaintainer | ||
|
|
||
| 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 nodejs6 nodejs8 nodejs10 nodejs11 | ||
|
|
||
| homepage http://nodejs.org/ | ||
| master_sites ${homepage}dist/v${version} | ||
| use_xz yes | ||
|
|
||
| checksums rmd160 dbd45ca85f2c19f8bc200aadf8ed8743b1134cde \ | ||
| sha256 93c48550e5da71cf3809ba765e8f8c01124a6b5f8b69869fe3ea8f168fcbfc78 \ | ||
| size 22387124 | ||
|
|
||
| distname node-v${version} | ||
|
|
||
| depends_build port:pkgconfig | ||
|
|
||
| depends_lib port:python27 | ||
| # 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] | ||
| } | ||
| return $files | ||
| } | ||
|
|
||
| configure.python ${prefix}/bin/python2.7 | ||
|
|
||
| patchfiles patch-common.gypi.diff | ||
|
|
||
| post-patch { | ||
| foreach f [concat ${worksrcpath}/configure \ | ||
| ${worksrcpath}/tools/gyp/gyp \ | ||
| ${worksrcpath}/deps/v8/tools/objdump-v8 \ | ||
| [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} | ||
| } | ||
| } | ||
|
|
||
| configure.args-append --without-npm | ||
| configure.args-append --with-intl=small-icu | ||
| #configure.args-append --shared-openssl | ||
| #configure.args-append --shared-openssl-includes=${prefix}/include/openssl | ||
| #configure.args-append --shared-openssl-libpath=${prefix}/lib | ||
|
|
||
| # V8 only supports ARM and IA-32 processors | ||
| supported_archs i386 x86_64 | ||
|
|
||
| universal_variant no | ||
|
|
||
| # "V8 doesn't like cache." | ||
| configure.ccache no | ||
|
|
||
| test.run yes | ||
|
|
||
| use_parallel_build no | ||
|
|
||
| switch $build_arch { | ||
| i386 { | ||
| configure.args-append --dest-cpu=ia32 | ||
| } | ||
| x86_64 { | ||
| configure.args-append --dest-cpu=x64 | ||
| } | ||
| } | ||
|
|
||
| compiler.blacklist-append {clang < 800} | ||
|
|
||
| build.args-append CC=${configure.cc} \ | ||
| CXX=${configure.cxx} \ | ||
| CXX.host=${configure.cxx} \ | ||
| CPP=${configure.cpp} \ | ||
| CFLAGS="${configure.cflags}" \ | ||
| CXXFLAGS="${configure.cxxflags}" \ | ||
| LDFLAGS="${configure.ldflags}" \ | ||
| PYTHON=${configure.python} \ | ||
| V=1 | ||
|
|
||
| destroot { | ||
| set bindir ${destroot}${prefix}/bin | ||
| set libdir ${destroot}${prefix}/lib | ||
| set libndir ${libdir}/node | ||
| set libddir ${libdir}/dtrace | ||
| set incdir ${destroot}${prefix}/include/node | ||
| set docdir ${destroot}${prefix}/share/doc/${name} | ||
|
|
||
| xinstall -d ${bindir} | ||
| xinstall -d ${libdir} | ||
| xinstall -d ${libndir} | ||
| xinstall -d ${libddir} | ||
| xinstall -d ${incdir} | ||
| xinstall -d ${docdir} | ||
|
|
||
| # install binaries | ||
| xinstall -m 755 -W ${worksrcpath} \ | ||
| out/Release/node \ | ||
| ${bindir} | ||
|
|
||
| # install headers | ||
| xinstall -m 644 -W ${worksrcpath} \ | ||
| src/aliased_buffer.h \ | ||
| src/async_wrap-inl.h \ | ||
| src/async_wrap.h \ | ||
| src/base64.h \ | ||
| src/base_object-inl.h \ | ||
| src/base_object.h \ | ||
| src/connect_wrap.h \ | ||
| src/connection_wrap.h \ | ||
| src/debug_utils.h \ | ||
| src/env-inl.h \ | ||
| src/env.h \ | ||
| src/handle_wrap.h \ | ||
| src/inspector_agent.h \ | ||
| src/inspector_io.h \ | ||
| src/inspector_socket.h \ | ||
| src/inspector_socket_server.h \ | ||
| src/js_stream.h \ | ||
| src/memory_tracker-inl.h \ | ||
| src/memory_tracker.h \ | ||
| src/module_wrap.h \ | ||
| src/node.h \ | ||
| src/node_api.h \ | ||
| src/node_api_types.h \ | ||
| src/node_buffer.h \ | ||
| src/node_constants.h \ | ||
| src/node_context_data.h \ | ||
| src/node_contextify.h \ | ||
| src/node_crypto.h \ | ||
| src/node_crypto_bio.h \ | ||
| src/node_crypto_clienthello-inl.h \ | ||
| src/node_crypto_clienthello.h \ | ||
| src/node_crypto_groups.h \ | ||
| src/node_dtrace.h \ | ||
| src/node_errors.h \ | ||
| src/node_file.h \ | ||
| src/node_http2.h \ | ||
| src/node_http2_state.h \ | ||
| src/node_http_parser_impl.h \ | ||
| src/node_i18n.h \ | ||
| src/node_internals.h \ | ||
| src/node_messaging.h \ | ||
| src/node_metadata.h \ | ||
| src/node_mutex.h \ | ||
| src/node_native_module.h \ | ||
| src/node_object_wrap.h \ | ||
| src/node_options-inl.h \ | ||
| src/node_options.h \ | ||
| src/node_perf.h \ | ||
| src/node_perf_common.h \ | ||
| src/node_persistent.h \ | ||
| src/node_platform.h \ | ||
| src/node_revert.h \ | ||
| src/node_root_certs.h \ | ||
| src/node_stat_watcher.h \ | ||
| src/node_union_bytes.h \ | ||
| src/node_url.h \ | ||
| src/node_version.h \ | ||
| src/node_watchdog.h \ | ||
| src/node_win32_etw_provider-inl.h \ | ||
| src/node_win32_etw_provider.h \ | ||
| src/node_worker.h \ | ||
| src/pipe_wrap.h \ | ||
| src/req_wrap-inl.h \ | ||
| src/req_wrap.h \ | ||
| src/sharedarraybuffer_metadata.h \ | ||
| src/spawn_sync.h \ | ||
| src/stream_base-inl.h \ | ||
| src/stream_base.h \ | ||
| src/stream_pipe.h \ | ||
| src/stream_wrap.h \ | ||
| src/string_bytes.h \ | ||
| src/string_decoder-inl.h \ | ||
| src/string_decoder.h \ | ||
| src/string_search.h \ | ||
| src/tcp_wrap.h \ | ||
| src/tls_wrap.h \ | ||
| src/tty_wrap.h \ | ||
| src/udp_wrap.h \ | ||
| src/util-inl.h \ | ||
| src/util.h \ | ||
| src/v8abbr.h \ | ||
| deps/v8/include/v8-inspector-protocol.h \ | ||
| deps/v8/include/v8-inspector.h \ | ||
| deps/v8/include/v8-platform.h \ | ||
| deps/v8/include/v8-profiler.h \ | ||
| deps/v8/include/v8-testing.h \ | ||
| deps/v8/include/v8-util.h \ | ||
| deps/v8/include/v8-value-serializer-version.h \ | ||
| deps/v8/include/v8-version-string.h \ | ||
| deps/v8/include/v8-version.h \ | ||
| deps/v8/include/v8.h \ | ||
| deps/v8/include/v8config.h \ | ||
| deps/uv/include/uv.h \ | ||
| deps/cares/include/ares.h \ | ||
| deps/cares/include/ares_build.h \ | ||
| deps/cares/include/ares_rules.h \ | ||
| deps/cares/include/ares_version.h \ | ||
| deps/cares/include/nameser.h \ | ||
| ${incdir} | ||
|
|
||
| # install dtrace script | ||
| xinstall -m 644 -W ${worksrcpath} \ | ||
| src/node.d \ | ||
| ${libddir} | ||
|
|
||
| # install manpage | ||
| xinstall -m 644 -W ${worksrcpath} \ | ||
| doc/node.1 \ | ||
| ${destroot}${prefix}/share/man/man1 | ||
|
|
||
| # install docs | ||
| xinstall -m 644 -W ${worksrcpath} \ | ||
| AUTHORS \ | ||
| CHANGELOG.md \ | ||
| COLLABORATOR_GUIDE.md \ | ||
| CONTRIBUTING.md \ | ||
| GOVERNANCE.md \ | ||
| LICENSE \ | ||
| README.md \ | ||
| ${docdir} | ||
| } | ||
|
|
||
| if {${os.major} < 11} { | ||
| pre-fetch { | ||
| ui_error "${name} ${version} requires Mac OS X 10.7 or greater." | ||
| return -code error "incompatible Mac OS X version" | ||
| } | ||
| } | ||
|
|
||
| livecheck.url ${homepage}dist/ | ||
| livecheck.type regex | ||
| livecheck.regex {v(d+\.\d+\.\d+)} |
| @@ -0,0 +1,10 @@ | ||
| --- common.gypi.orig 2014-09-16 17:47:52.000000000 -0500 | ||
| +++ common.gypi 2014-10-13 22:42:11.000000000 -0500 | ||
| @@ -207,7 +207,6 @@ | ||
| 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings | ||
| 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics | ||
| 'PREBINDING': 'NO', # No -Wl,-prebind | ||
| - 'MACOSX_DEPLOYMENT_TARGET': '10.10', # -mmacosx-version-min=10.10 | ||
| 'USE_HEADERMAP': 'NO', | ||
| 'OTHER_CFLAGS': [ | ||
| '-fno-strict-aliasing', |