From a977353f4ba275f4b476aabcd81180501eb9361d Mon Sep 17 00:00:00 2001 From: "Vanilla I. Shu" Date: Mon, 12 Apr 2010 07:26:45 +0000 Subject: [PATCH] Add node 0.1.90, v8 javascript for client and server. PR: ports/145641 Submitted by: Jin-Sih Lin --- www/Makefile | 1 + www/node/Makefile | 39 ++++++++++++ www/node/distinfo | 3 + www/node/files/patch-guess-arch-amd64 | 11 ++++ www/node/files/patch-libev-kqueue | 38 +++++++++++ www/node/pkg-descr | 3 + www/node/pkg-plist | 85 +++++++++++++++++++++++++ www/node04/Makefile | 39 ++++++++++++ www/node04/distinfo | 3 + www/node04/files/patch-guess-arch-amd64 | 11 ++++ www/node04/files/patch-libev-kqueue | 38 +++++++++++ www/node04/pkg-descr | 3 + www/node04/pkg-plist | 85 +++++++++++++++++++++++++ 13 files changed, 359 insertions(+) create mode 100644 www/node/Makefile create mode 100644 www/node/distinfo create mode 100644 www/node/files/patch-guess-arch-amd64 create mode 100644 www/node/files/patch-libev-kqueue create mode 100644 www/node/pkg-descr create mode 100644 www/node/pkg-plist create mode 100644 www/node04/Makefile create mode 100644 www/node04/distinfo create mode 100644 www/node04/files/patch-guess-arch-amd64 create mode 100644 www/node04/files/patch-libev-kqueue create mode 100644 www/node04/pkg-descr create mode 100644 www/node04/pkg-plist diff --git a/www/Makefile b/www/Makefile index a78b59d14723..e1d8aeb09a1e 100644 --- a/www/Makefile +++ b/www/Makefile @@ -592,6 +592,7 @@ SUBDIR += newsfeed SUBDIR += nginx SUBDIR += nginx-devel + SUBDIR += node SUBDIR += notftp SUBDIR += npapi-xine SUBDIR += npc diff --git a/www/node/Makefile b/www/node/Makefile new file mode 100644 index 000000000000..d8961a8226ba --- /dev/null +++ b/www/node/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: node +# Date created: 2010-04-12 +# Whom: Jin-Sih Lin +# +# $FreeBSD$ +# + +PORTNAME= node +PORTVERSION= 0.1.90 +CATEGORIES= www +MASTER_SITES= http://nodejs.org/dist/ +DISTNAME= ${PORTNAME}-v${PORTVERSION} + +MAINTAINER= linpct@gmail.com +COMMENT= V8 javascript for client and server + +LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo + +HAS_CONFIGURE= yes +USE_LDCONFIG= yes +USE_PYTHON= yes + +ONLY_FOR_ARCHS= i386 amd64 +MAKE_JOBS_SAFE= yes + +CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} +PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} + +MAN1= ${PORTNAME}.1 +MANCOMPRESSED= yes + +do-build: + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} tools/waf-light --jobs=${MAKE_JOBS_NUMBER} build) + +post-install: + ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 ${PREFIX}/man/man1 + ${GZIP_CMD} ${PREFIX}/man/man1/${PORTNAME}.1 + +.include diff --git a/www/node/distinfo b/www/node/distinfo new file mode 100644 index 000000000000..92dc0b681178 --- /dev/null +++ b/www/node/distinfo @@ -0,0 +1,3 @@ +MD5 (node-v0.1.90.tar.gz) = 37467ff3ad0c822e0a190c3d1746d70b +SHA256 (node-v0.1.90.tar.gz) = 0dbd47f6be45049a54de6ff268b25a8ccf8cac38bd75788e713dab35a14695c3 +SIZE (node-v0.1.90.tar.gz) = 6452573 diff --git a/www/node/files/patch-guess-arch-amd64 b/www/node/files/patch-guess-arch-amd64 new file mode 100644 index 000000000000..c1b95688a54e --- /dev/null +++ b/www/node/files/patch-guess-arch-amd64 @@ -0,0 +1,11 @@ +--- deps/v8/tools/utils.py.orig 2010-04-12 11:54:20.000000000 +0800 ++++ deps/v8/tools/utils.py 2010-04-12 11:54:44.000000000 +0800 +@@ -69,6 +69,8 @@ + return 'arm' + elif (not id) or (not re.match('(x|i[3-6])86', id) is None): + return 'ia32' ++ elif id == 'amd64': ++ return 'ia32' + elif id == 'i86pc': + return 'ia32' + else: diff --git a/www/node/files/patch-libev-kqueue b/www/node/files/patch-libev-kqueue new file mode 100644 index 000000000000..ef03c8c6ae44 --- /dev/null +++ b/www/node/files/patch-libev-kqueue @@ -0,0 +1,38 @@ +--- deps/libev/wscript.orig 2010-04-12 11:55:55.000000000 +0800 ++++ deps/libev/wscript 2010-04-12 12:00:43.000000000 +0800 +@@ -27,12 +27,30 @@ + if conf.check_cc(header_name="poll.h"): + conf.check_cc(header_name="poll.h", function_name="poll") + +- conf.check_cc(header_name="sys/event.h") + conf.check_cc(header_name="sys/queue.h") +- if PLATFORM_IS_DARWIN: +- conf.check_cc(header_name="sys/event.h", function_name="kqueue") +- else: +- conf.check_cc(header_name="sys/queue.h", function_name="kqueue") ++ ++ code = """ ++ #include ++ #include ++ ++ int main() { ++ return 0; ++ } ++ """ ++ conf.check_cc(fragment=code, define_name="HAVE_SYS_EVENT_H", execute=False, ++ msg="Checking for header sys/event.h") ++ ++ code = """ ++ #include ++ #include ++ ++ int main() { ++ int fd = kqueue(); ++ return 0; ++ } ++ """ ++ conf.check_cc(fragment=code, define_name="HAVE_KQUEUE", execute=False, ++ msg="Checking for function kqueue") + + if conf.check_cc(header_name="sys/select.h"): + conf.check_cc(header_name="sys/select.h", function_name="select") diff --git a/www/node/pkg-descr b/www/node/pkg-descr new file mode 100644 index 000000000000..079aa9b45c25 --- /dev/null +++ b/www/node/pkg-descr @@ -0,0 +1,3 @@ +node - evented I/O for V8 javascript + +WWW: http://nodejs.org/ diff --git a/www/node/pkg-plist b/www/node/pkg-plist new file mode 100644 index 000000000000..902834af74ea --- /dev/null +++ b/www/node/pkg-plist @@ -0,0 +1,85 @@ +@comment $FreeBSD$ +bin/node-repl +bin/node-waf +bin/node +include/node/eio.h +include/node/ev.h +include/node/v8-debug.h +include/node/v8.h +include/node/evcom.h +include/node/config.h +include/node/node.h +include/node/node_object_wrap.h +include/node/node_events.h +include/node/node_net.h +include/node/node_version.h +lib/node/wafadmin/Build.py +lib/node/wafadmin/Configure.py +lib/node/wafadmin/Constants.py +lib/node/wafadmin/Environment.py +lib/node/wafadmin/Logs.py +lib/node/wafadmin/Node.py +lib/node/wafadmin/Options.py +lib/node/wafadmin/Runner.py +lib/node/wafadmin/Scripting.py +lib/node/wafadmin/Task.py +lib/node/wafadmin/TaskGen.py +lib/node/wafadmin/Utils.py +lib/node/wafadmin/__init__.py +lib/node/wafadmin/ansiterm.py +lib/node/wafadmin/pproc.py +lib/node/wafadmin/py3kfixes.py +lib/node/wafadmin/Tools/__init__.py +lib/node/wafadmin/Tools/ar.py +lib/node/wafadmin/Tools/bison.py +lib/node/wafadmin/Tools/cc.py +lib/node/wafadmin/Tools/ccroot.py +lib/node/wafadmin/Tools/compiler_cc.py +lib/node/wafadmin/Tools/compiler_cxx.py +lib/node/wafadmin/Tools/compiler_d.py +lib/node/wafadmin/Tools/config_c.py +lib/node/wafadmin/Tools/cs.py +lib/node/wafadmin/Tools/cxx.py +lib/node/wafadmin/Tools/d.py +lib/node/wafadmin/Tools/dbus.py +lib/node/wafadmin/Tools/dmd.py +lib/node/wafadmin/Tools/flex.py +lib/node/wafadmin/Tools/gas.py +lib/node/wafadmin/Tools/gcc.py +lib/node/wafadmin/Tools/gdc.py +lib/node/wafadmin/Tools/glib2.py +lib/node/wafadmin/Tools/gnome.py +lib/node/wafadmin/Tools/gnu_dirs.py +lib/node/wafadmin/Tools/gob2.py +lib/node/wafadmin/Tools/gxx.py +lib/node/wafadmin/Tools/icc.py +lib/node/wafadmin/Tools/icpc.py +lib/node/wafadmin/Tools/intltool.py +lib/node/wafadmin/Tools/kde4.py +lib/node/wafadmin/Tools/javaw.py +lib/node/wafadmin/Tools/libtool.py +lib/node/wafadmin/Tools/lua.py +lib/node/wafadmin/Tools/misc.py +lib/node/wafadmin/Tools/msvc.py +lib/node/wafadmin/Tools/nasm.py +lib/node/wafadmin/Tools/node_addon.py +lib/node/wafadmin/Tools/ocaml.py +lib/node/wafadmin/Tools/osx.py +lib/node/wafadmin/Tools/perl.py +lib/node/wafadmin/Tools/preproc.py +lib/node/wafadmin/Tools/python.py +lib/node/wafadmin/Tools/qt4.py +lib/node/wafadmin/Tools/ruby.py +lib/node/wafadmin/Tools/suncc.py +lib/node/wafadmin/Tools/suncxx.py +lib/node/wafadmin/Tools/tex.py +lib/node/wafadmin/Tools/unittestw.py +lib/node/wafadmin/Tools/vala.py +lib/node/wafadmin/Tools/winres.py +lib/node/wafadmin/Tools/xlc.py +lib/node/wafadmin/Tools/xlcxx.py +@dirrmtry lib/node/wafadmin/Tools +@dirrmtry lib/node/wafadmin +@dirrmtry lib/node/libraries +@dirrmtry lib/node +@dirrmtry include/node diff --git a/www/node04/Makefile b/www/node04/Makefile new file mode 100644 index 000000000000..d8961a8226ba --- /dev/null +++ b/www/node04/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: node +# Date created: 2010-04-12 +# Whom: Jin-Sih Lin +# +# $FreeBSD$ +# + +PORTNAME= node +PORTVERSION= 0.1.90 +CATEGORIES= www +MASTER_SITES= http://nodejs.org/dist/ +DISTNAME= ${PORTNAME}-v${PORTVERSION} + +MAINTAINER= linpct@gmail.com +COMMENT= V8 javascript for client and server + +LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo + +HAS_CONFIGURE= yes +USE_LDCONFIG= yes +USE_PYTHON= yes + +ONLY_FOR_ARCHS= i386 amd64 +MAKE_JOBS_SAFE= yes + +CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} +PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} + +MAN1= ${PORTNAME}.1 +MANCOMPRESSED= yes + +do-build: + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} tools/waf-light --jobs=${MAKE_JOBS_NUMBER} build) + +post-install: + ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 ${PREFIX}/man/man1 + ${GZIP_CMD} ${PREFIX}/man/man1/${PORTNAME}.1 + +.include diff --git a/www/node04/distinfo b/www/node04/distinfo new file mode 100644 index 000000000000..92dc0b681178 --- /dev/null +++ b/www/node04/distinfo @@ -0,0 +1,3 @@ +MD5 (node-v0.1.90.tar.gz) = 37467ff3ad0c822e0a190c3d1746d70b +SHA256 (node-v0.1.90.tar.gz) = 0dbd47f6be45049a54de6ff268b25a8ccf8cac38bd75788e713dab35a14695c3 +SIZE (node-v0.1.90.tar.gz) = 6452573 diff --git a/www/node04/files/patch-guess-arch-amd64 b/www/node04/files/patch-guess-arch-amd64 new file mode 100644 index 000000000000..c1b95688a54e --- /dev/null +++ b/www/node04/files/patch-guess-arch-amd64 @@ -0,0 +1,11 @@ +--- deps/v8/tools/utils.py.orig 2010-04-12 11:54:20.000000000 +0800 ++++ deps/v8/tools/utils.py 2010-04-12 11:54:44.000000000 +0800 +@@ -69,6 +69,8 @@ + return 'arm' + elif (not id) or (not re.match('(x|i[3-6])86', id) is None): + return 'ia32' ++ elif id == 'amd64': ++ return 'ia32' + elif id == 'i86pc': + return 'ia32' + else: diff --git a/www/node04/files/patch-libev-kqueue b/www/node04/files/patch-libev-kqueue new file mode 100644 index 000000000000..ef03c8c6ae44 --- /dev/null +++ b/www/node04/files/patch-libev-kqueue @@ -0,0 +1,38 @@ +--- deps/libev/wscript.orig 2010-04-12 11:55:55.000000000 +0800 ++++ deps/libev/wscript 2010-04-12 12:00:43.000000000 +0800 +@@ -27,12 +27,30 @@ + if conf.check_cc(header_name="poll.h"): + conf.check_cc(header_name="poll.h", function_name="poll") + +- conf.check_cc(header_name="sys/event.h") + conf.check_cc(header_name="sys/queue.h") +- if PLATFORM_IS_DARWIN: +- conf.check_cc(header_name="sys/event.h", function_name="kqueue") +- else: +- conf.check_cc(header_name="sys/queue.h", function_name="kqueue") ++ ++ code = """ ++ #include ++ #include ++ ++ int main() { ++ return 0; ++ } ++ """ ++ conf.check_cc(fragment=code, define_name="HAVE_SYS_EVENT_H", execute=False, ++ msg="Checking for header sys/event.h") ++ ++ code = """ ++ #include ++ #include ++ ++ int main() { ++ int fd = kqueue(); ++ return 0; ++ } ++ """ ++ conf.check_cc(fragment=code, define_name="HAVE_KQUEUE", execute=False, ++ msg="Checking for function kqueue") + + if conf.check_cc(header_name="sys/select.h"): + conf.check_cc(header_name="sys/select.h", function_name="select") diff --git a/www/node04/pkg-descr b/www/node04/pkg-descr new file mode 100644 index 000000000000..079aa9b45c25 --- /dev/null +++ b/www/node04/pkg-descr @@ -0,0 +1,3 @@ +node - evented I/O for V8 javascript + +WWW: http://nodejs.org/ diff --git a/www/node04/pkg-plist b/www/node04/pkg-plist new file mode 100644 index 000000000000..902834af74ea --- /dev/null +++ b/www/node04/pkg-plist @@ -0,0 +1,85 @@ +@comment $FreeBSD$ +bin/node-repl +bin/node-waf +bin/node +include/node/eio.h +include/node/ev.h +include/node/v8-debug.h +include/node/v8.h +include/node/evcom.h +include/node/config.h +include/node/node.h +include/node/node_object_wrap.h +include/node/node_events.h +include/node/node_net.h +include/node/node_version.h +lib/node/wafadmin/Build.py +lib/node/wafadmin/Configure.py +lib/node/wafadmin/Constants.py +lib/node/wafadmin/Environment.py +lib/node/wafadmin/Logs.py +lib/node/wafadmin/Node.py +lib/node/wafadmin/Options.py +lib/node/wafadmin/Runner.py +lib/node/wafadmin/Scripting.py +lib/node/wafadmin/Task.py +lib/node/wafadmin/TaskGen.py +lib/node/wafadmin/Utils.py +lib/node/wafadmin/__init__.py +lib/node/wafadmin/ansiterm.py +lib/node/wafadmin/pproc.py +lib/node/wafadmin/py3kfixes.py +lib/node/wafadmin/Tools/__init__.py +lib/node/wafadmin/Tools/ar.py +lib/node/wafadmin/Tools/bison.py +lib/node/wafadmin/Tools/cc.py +lib/node/wafadmin/Tools/ccroot.py +lib/node/wafadmin/Tools/compiler_cc.py +lib/node/wafadmin/Tools/compiler_cxx.py +lib/node/wafadmin/Tools/compiler_d.py +lib/node/wafadmin/Tools/config_c.py +lib/node/wafadmin/Tools/cs.py +lib/node/wafadmin/Tools/cxx.py +lib/node/wafadmin/Tools/d.py +lib/node/wafadmin/Tools/dbus.py +lib/node/wafadmin/Tools/dmd.py +lib/node/wafadmin/Tools/flex.py +lib/node/wafadmin/Tools/gas.py +lib/node/wafadmin/Tools/gcc.py +lib/node/wafadmin/Tools/gdc.py +lib/node/wafadmin/Tools/glib2.py +lib/node/wafadmin/Tools/gnome.py +lib/node/wafadmin/Tools/gnu_dirs.py +lib/node/wafadmin/Tools/gob2.py +lib/node/wafadmin/Tools/gxx.py +lib/node/wafadmin/Tools/icc.py +lib/node/wafadmin/Tools/icpc.py +lib/node/wafadmin/Tools/intltool.py +lib/node/wafadmin/Tools/kde4.py +lib/node/wafadmin/Tools/javaw.py +lib/node/wafadmin/Tools/libtool.py +lib/node/wafadmin/Tools/lua.py +lib/node/wafadmin/Tools/misc.py +lib/node/wafadmin/Tools/msvc.py +lib/node/wafadmin/Tools/nasm.py +lib/node/wafadmin/Tools/node_addon.py +lib/node/wafadmin/Tools/ocaml.py +lib/node/wafadmin/Tools/osx.py +lib/node/wafadmin/Tools/perl.py +lib/node/wafadmin/Tools/preproc.py +lib/node/wafadmin/Tools/python.py +lib/node/wafadmin/Tools/qt4.py +lib/node/wafadmin/Tools/ruby.py +lib/node/wafadmin/Tools/suncc.py +lib/node/wafadmin/Tools/suncxx.py +lib/node/wafadmin/Tools/tex.py +lib/node/wafadmin/Tools/unittestw.py +lib/node/wafadmin/Tools/vala.py +lib/node/wafadmin/Tools/winres.py +lib/node/wafadmin/Tools/xlc.py +lib/node/wafadmin/Tools/xlcxx.py +@dirrmtry lib/node/wafadmin/Tools +@dirrmtry lib/node/wafadmin +@dirrmtry lib/node/libraries +@dirrmtry lib/node +@dirrmtry include/node