# -*- 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 # $Id: Portfile 135232 2015-04-20 00:15:39Z ryandesign@macports.org $ PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 name iojs version 1.7.1 revision 1 categories devel net platforms darwin license {MIT BSD} maintainers ciserlohn description JavaScript I/O long_description io.js is a JavaScript platform built on Chrome's V8 runtime. \ This project began as a fork of Joyent's Node.js™ and is \ compatible with the npm ecosystem. conflicts nodejs nodejs-devel homepage https://iojs.org/ master_sites ${homepage}dist/v${version} checksums rmd160 a0836c029b2866805519577a843f940ee0820fa6 \ sha256 8f7c6927bbded5912d9bd3903e779b534ddc742ea3aa669859369263b179eff9 distname iojs-v${version} depends_build port:pkgconfig depends_lib port:icu \ port:python27 \ port:openssl configure.python ${prefix}/bin/python2.7 configure.args-append --without-npm configure.args-append --shared-openssl configure.args-append --shared-openssl-includes=${prefix}/include/openssl configure.args-append --shared-openssl-libpath=${prefix}/lib configure.args-append --with-intl=system-icu proc rec_glob {basedir pattern} { set files [glob -directory $basedir -nocomplain -type f $pattern] foreach dir [glob -directory $basedir -nocomplain -type d *] { eval lappend files [rec_glob $dir $pattern] } return $files } post-patch { foreach f [concat ${worksrcpath}/configure \ ${worksrcpath}/tools/gyp/gyp \ ${worksrcpath}/node.gyp \ ${worksrcpath}/deps/cares/gyp_cares \ ${worksrcpath}/deps/npm/node_modules/node-gyp/gyp/gyp \ [rec_glob ${worksrcpath} *.py]] { reinplace -locale C "s|/usr/bin/env python|${configure.python}|" ${f} } foreach f [concat ${worksrcpath}/deps/npm/scripts/relocate.sh \ ${worksrcpath}/deps/npm/node_modules/semver/bin/semver \ ${worksrcpath}/deps/npm/node_modules/which/bin/which \ ${worksrcpath}/deps/npm/test/packages/npm-test-array-bin/bin/array-bin \ ${worksrcpath}/deps/npm/test/packages/npm-test-dir-bin/bin/dir-bin \ ${worksrcpath}/tools/doc/node_modules/marked/bin/marked \ [rec_glob ${worksrcpath} *.js]] { reinplace -locale C "s|/usr/bin/env node|${prefix}/bin/node|" ${f} } foreach gypfile [rec_glob ${worksrcpath} *.gyp] { reinplace -locale C "s|'python'|'${configure.python}'|" ${gypfile} } } # V8 only supports ARM and IA-32 processors supported_archs i386 x86_64 universal_variant no patchfiles-append patch-common.gypi.diff # "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 } } 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}/${name} set libddir ${libdir}/dtrace set incdir ${destroot}${prefix}/include/${name} 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/${name} \ ${bindir} ln -s ${name} ${bindir}/node # install headers xinstall -m 644 -W ${worksrcpath} \ src/async-wrap-inl.h \ src/async-wrap.h \ src/base-object-inl.h \ src/base-object.h \ src/debug-agent.h \ src/env-inl.h \ src/env.h \ src/handle_wrap.h \ src/node.h \ src/node_buffer.h \ src/node_constants.h \ src/node_counters.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_file.h \ src/node_http_parser.h \ src/node_i18n.h \ src/node_internals.h \ src/node_javascript.h \ src/node_object_wrap.h \ src/node_root_certs.h \ src/node_stat_watcher.h \ src/node_version.h \ src/node_watchdog.h \ src/node_wrap.h \ src/pipe_wrap.h \ src/smalloc.h \ src/spawn_sync.h \ src/stream_wrap.h \ src/string_bytes.h \ src/tcp_wrap.h \ src/tls_wrap.h \ src/tree.h \ src/tty_wrap.h \ src/udp_wrap.h \ src/util-inl.h \ src/util.h \ src/v8abbr.h \ deps/v8/include/v8-debug.h \ deps/v8/include/v8-profiler.h \ deps/v8/include/v8-testing.h \ deps/v8/include/v8.h \ deps/v8/include/v8-platform.h \ deps/v8/include/v8-util.h \ deps/v8/include/v8config.h \ deps/uv/include/uv.h \ deps/uv/include/uv-unix.h \ deps/uv/include/uv-darwin.h \ deps/uv/include/tree.h \ deps/uv/include/uv-threadpool.h \ deps/uv/include/pthread-fixes.h \ deps/cares/include/ares.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/${name}.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} } compiler.blacklist *gcc* *clang-2.* {*clang-3.[012]*} {clang < 500} if {${os.major} < 10} { pre-fetch { ui_error "${name} ${version} requires Mac OS X 10.6 or greater." return -code error "incompatible Mac OS X version" } } livecheck.url ${homepage}dist/ livecheck.type regex livecheck.regex {v(\d+\.\d+\.\d+)}