packages: nodejs/nodejs-system-libs.patch, nodejs/nodejs.spec (NEW) - added...

aredridel aredridel at pld-linux.org
Fri Mar 12 07:58:16 CET 2010


Author: aredridel                    Date: Fri Mar 12 06:58:16 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added
- use system libev, libeio, v8

---- Files affected:
packages/nodejs:
   nodejs-system-libs.patch (1.1 -> 1.2) , nodejs.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/nodejs/nodejs-system-libs.patch
diff -u packages/nodejs/nodejs-system-libs.patch:1.1 packages/nodejs/nodejs-system-libs.patch:1.2
--- packages/nodejs/nodejs-system-libs.patch:1.1	Fri Mar 12 07:06:58 2010
+++ packages/nodejs/nodejs-system-libs.patch	Fri Mar 12 07:58:11 2010
@@ -1,6 +1,37 @@
---- node-v0.1.31/wscript	2010-03-05 18:55:13.000000000 -0700
-+++ node-working-messy/wscript	2010-03-10 00:05:02.000000000 -0700
-@@ -247,16 +247,13 @@
+Only in node-v0.1.31-o/tools: js2c.pyc
+Only in node-v0.1.31-o/tools/wafadmin: ansiterm.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Build.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Configure.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Constants.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Environment.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Logs.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Node.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Options.pyc
+Only in node-v0.1.31-o/tools/wafadmin: pproc.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Runner.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Scripting.pyc
+Only in node-v0.1.31-o/tools/wafadmin: TaskGen.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Task.pyc
+Only in node-v0.1.31-o/tools/wafadmin: Utils.pyc
+diff -ur node-v0.1.31-o/wscript node-v0.1.31/wscript
+--- node-v0.1.31-o/wscript	2010-03-11 23:03:36.000000000 -0700
++++ node-v0.1.31/wscript	2010-03-11 23:22:45.000000000 -0700
+@@ -144,14 +144,6 @@
+     if not conf.check(lib='nsl', uselib_store="NSL"):
+       conf.fatal("Cannot find nsl library")
+ 
+-  conf.sub_config('deps/libeio')
+-  conf.sub_config('deps/libev')
+-
+-  if sys.platform.startswith("sunos"):
+-    conf_subproject(conf, 'deps/udns', 'LIBS="-lsocket -lnsl" ./configure')
+-  else:
+-    conf_subproject(conf, 'deps/udns', './configure')
+-
+   conf.define("HAVE_CONFIG_H", 1)
+ 
+   conf.env.append_value("CCFLAGS", "-DX_STACKSIZE=%d" % (1024*64))
+@@ -247,16 +239,13 @@
  
  def build_v8(bld):
    v8 = bld.new_task_gen(
@@ -20,7 +51,7 @@
    t = join(bld.srcnode.abspath(bld.env_of_name("default")), v8.target)
    if sys.platform.startswith("sunos"):
      bld.env_of_name('default')["LINKFLAGS_V8"] = ["-mt", t]
-@@ -275,13 +272,12 @@
+@@ -275,14 +264,9 @@
      else:
        bld.env_of_name('debug')["LINKFLAGS_V8"] = ["-pthread", t]
  
@@ -28,18 +59,31 @@
 +  bld.install_files('${PREFIX}/include/node/')
  
  def build(bld):
-   bld.add_subdirs('deps/libeio deps/libev')
- 
-   build_udns(bld)
+-  bld.add_subdirs('deps/libeio deps/libev')
+-
+-  build_udns(bld)
 -  build_v8(bld)
- 
+-
    ### evcom
    evcom = bld.new_task_gen("cc")
-@@ -370,6 +366,7 @@
-   node.add_objects = 'ev eio evcom http_parser coupling'
+   evcom.source = "deps/evcom/evcom.c"
+@@ -359,17 +343,14 @@
+   """
+   node.includes = """
+     src/ 
+-    deps/v8/include
+-    deps/libev
+-    deps/udns
+-    deps/libeio
+     deps/evcom 
+     deps/http_parser
+     deps/coupling
+   """
+-  node.add_objects = 'ev eio evcom http_parser coupling'
++  node.add_objects = 'evcom http_parser coupling'
    node.uselib_local = ''
    node.uselib = 'GNUTLS GPGERROR UDNS V8 EXECINFO DL KVM SOCKET NSL'
-+  node.env["LINKFLAGS_V8"] = ["-lpthread", '-lv8']
++  node.env["LINKFLAGS_V8"] = ["-lpthread", '-lv8', '-lev', '-leio', '-ludns']
  
    node.install_path = '${PREFIX}/lib'
    node.install_path = '${PREFIX}/bin'

================================================================
Index: packages/nodejs/nodejs.spec
diff -u /dev/null packages/nodejs/nodejs.spec:1.1
--- /dev/null	Fri Mar 12 07:58:16 2010
+++ packages/nodejs/nodejs.spec	Fri Mar 12 07:58:11 2010
@@ -0,0 +1,139 @@
+# $Revision$, $Date$
+
+# For the 1.2 branch, we use 0s here
+# For 1.3+, we use the three digit versions
+%define		somajor 2
+%define		sominor 1
+%define		sobuild 2
+%define		sover %{somajor}.%{sominor}.%{sobuild}
+
+%define		snap	20100309svn4070
+%define		rel		1
+Summary:	Asynchronous JavaScript Engine
+Name:		nodejs
+Version:	0.1.31
+Release:	0
+License:	BSD
+Group:		Libraries
+URL:		http://nodejs.org/
+Source0:	http://nodejs.org/dist/node-v%{version}.tar.gz
+# Source0-md5:	a9e0ba08539edbdc8e5611e7550f1c47
+Source1:	http://www.crockford.com/javascript/jsmin.py.txt
+# Source1-md5:	0521ddcf3e52457223c6e0d602486a89
+Patch0:		%{name}-system-libs.patch
+BuildRequires:	gcc >= 4.0
+BuildRequires:	libeio-devel
+BuildRequires:	libev-devel >= 3.90
+BuildRequires:	libstdc++-devel
+BuildRequires:	python
+BuildRequires:	udns-devel
+BuildRequires:	v8-devel
+ExclusiveArch:	%{ix86} %{x8664} arm
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Node's goal is to provide an easy way to build scalable network
+programs. In the above example, the two second delay does not prevent
+the server from handling new requests. Node tells the operating system
+(through epoll, kqueue, /dev/poll, or select) that it should be
+notified when the 2 seconds are up or if a new connection is made --
+then it goes to sleep. If someone new connects, then it executes the
+callback, if the timeout expires, it executes the inner callback. Each
+connection is only a small heap allocation.
+
+%package libs
+Summary:	V8 JavaScript Engine shared library
+Group:		Libraries
+Conflicts:	v8 < 2.0.0
+
+%description libs
+V8 is Google's open source JavaScript engine. V8 is written in C++ and
+is used in Google Chrome, the open source browser from Google. V8
+implements ECMAScript as specified in ECMA-262, 3rd edition.
+
+This package contains the shared library.
+
+%package devel
+Summary:	Development headers and libraries for v8
+Group:		Development/Libraries
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description devel
+Development headers and libraries for v8.
+
+%prep
+%setup -q -n node-v%{version}
+%patch0 -p1
+rm tools/jsmin.py
+mv deps/v8/tools/jsmin.py tools/
+rm -r deps/v8
+rm -r deps/udns
+rm -r deps/libev
+rm -r deps/libeio
+
+%build
+# build library
+
+CFLAGS="%{rpmcflags}"
+CXXFLAGS="%{rpmcxxflags}"
+LDFLAGS="%{rpmcflags}"
+%if "%{pld_release}" == "ac"
+CC=%{__cc}4
+CXX=%{__cxx}4
+%else
+CC=%{__cc}
+CXX=%{__cxx}
+%endif
+export CFLAGS LDFLAGS CXXFLAGS CC CXX
+
+tools/waf-light configure \
+	--prefix=%{_prefix}
+
+tools/waf-light build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
+
+tools/waf-light install \
+	--destdir=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	libs -p /sbin/ldconfig
+%postun	libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog LICENSE
+%attr(755,root,root) %{_bindir}/node
+%attr(755,root,root) %{_bindir}/node-repl
+%dir %{_libdir}/node
+%dir %{_libdir}/node/libraries
+%{_libdir}/node/libraries/*.js
+%{_mandir}/man1/node.1*
+
+%files libs
+%defattr(644,root,root,755)
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/node/config.h
+%{_includedir}/node/evcom.h
+%{_includedir}/node/node.h
+%{_includedir}/node/node_events.h
+%{_includedir}/node/node_net.h
+%{_includedir}/node/node_object_wrap.h
+%{_includedir}/node/node_version.h
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/03/12 06:58:11  aredridel
+- added
+- use system libev, libeio, v8
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nodejs/nodejs-system-libs.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list