new upstream release 0.9.4

- system library patches are now upstream
- respect optflags
- include documentation in subpackage
This commit is contained in:
T.C. Hollingsworth 2012-12-26 19:57:50 -07:00
parent dade4889bb
commit 1407a24b65
6 changed files with 27 additions and 363 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/node-v0.9.3.tar.gz /node-v0.9.3.tar.gz
/node-v0.9.4.tar.gz

View File

@ -1,117 +0,0 @@
From 0fc5e8b88b7ac7e47deb689e866836434792224e Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 23 Oct 2012 09:01:26 -0400
Subject: [PATCH 1/3] build: allow linking against system http_parser
---
configure | 35 +++++++++++++++++++++++++++++++++++
doc/api/process.markdown | 1 +
node.gyp | 6 +++++-
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 1f1343441a5f5fb00bfab2b3b1ec6475820efa13..1fa522755de68a0eb182dde110b8c4a1a8f4aa7c 100755
--- a/configure
+++ b/configure
@@ -124,6 +124,26 @@ parser.add_option("--shared-zlib-libname",
dest="shared_zlib_libname",
help="Alternative lib name to link to (default: 'z')")
+parser.add_option("--shared-http-parser",
+ action="store_true",
+ dest="shared_http_parser",
+ help="Link to a shared http_parser DLL instead of static linking")
+
+parser.add_option("--shared-http-parser-includes",
+ action="store",
+ dest="shared_http_parser_includes",
+ help="Directory containing http_parser header files")
+
+parser.add_option("--shared-http-parser-libpath",
+ action="store",
+ dest="shared_http_parser_libpath",
+ help="A directory to search for the shared http_parser DLL")
+
+parser.add_option("--shared-http-parser-libname",
+ action="store",
+ dest="shared_http_parser_libname",
+ help="Alternative lib name to link to (default: 'http_parser')")
+
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
@@ -400,6 +420,20 @@ def configure_libz(o):
o['include_dirs'] += [options.shared_zlib_includes]
+def configure_http_parser(o):
+ o['variables']['node_shared_http_parser'] = b(options.shared_http_parser)
+
+ # assume shared http_parser if one of these is set?
+ if options.shared_http_parser_libpath:
+ o['libraries'] += ['-L%s' % options.shared_http_parser_libpath]
+ if options.shared_http_parser_libname:
+ o['libraries'] += ['-l%s' % options.shared_http_parser_libname]
+ elif options.shared_http_parser:
+ o['libraries'] += ['-lhttp_parser']
+ if options.shared_http_parser_includes:
+ o['include_dirs'] += [options.shared_http_parser_includes]
+
+
def configure_v8(o):
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['node_shared_v8'] = b(options.shared_v8)
@@ -453,6 +487,7 @@ output = {
configure_node(output)
configure_libz(output)
+configure_http_parser(output)
configure_v8(output)
configure_openssl(output)
diff --git a/doc/api/process.markdown b/doc/api/process.markdown
index d8612600c6530b3febe9316b3230412d450a2ca5..41b163a15532f829a7d6c2b88ae9a9f31de0a9c8 100644
--- a/doc/api/process.markdown
+++ b/doc/api/process.markdown
@@ -299,6 +299,7 @@ An example of the possible output looks like:
{ host_arch: 'x64',
node_install_npm: 'true',
node_prefix: '',
+ node_shared_http_parser: 'false',
node_shared_v8: 'false',
node_shared_zlib: 'false',
node_use_dtrace: 'false',
diff --git a/node.gyp b/node.gyp
index 939870a56157ab4410cd668be36689d092894ca1..a9903cd1c42cab4295d79d452ef1187c7fa7dbe3 100644
--- a/node.gyp
+++ b/node.gyp
@@ -8,6 +8,7 @@
'node_use_etw%': 'false',
'node_shared_v8%': 'false',
'node_shared_zlib%': 'false',
+ 'node_shared_http_parser%': 'false',
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
'library_files': [
@@ -58,7 +59,6 @@
'dependencies': [
'deps/cares/cares.gyp:cares',
- 'deps/http_parser/http_parser.gyp:http_parser',
'deps/uv/uv.gyp:libuv',
'node_js2c#host',
],
@@ -192,6 +192,10 @@
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
}],
+ [ 'node_shared_http_parser=="false"', {
+ 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
+ }],
+
[ 'OS=="win"', {
'sources': [
'src/res/node.rc',
--
1.8.0

View File

@ -1,117 +0,0 @@
From a82e1d2bf3b5f2208ceddd1f5a51396a4997fb66 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 23 Oct 2012 10:27:19 -0400
Subject: [PATCH 2/3] build: allow linking against system c-ares
---
configure | 35 +++++++++++++++++++++++++++++++++++
doc/api/process.markdown | 1 +
node.gyp | 6 +++++-
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 1fa522755de68a0eb182dde110b8c4a1a8f4aa7c..a23c04cb77fda65453e4cbe9c916d3d3f14f3d26 100755
--- a/configure
+++ b/configure
@@ -144,6 +144,26 @@ parser.add_option("--shared-http-parser-libname",
dest="shared_http_parser_libname",
help="Alternative lib name to link to (default: 'http_parser')")
+parser.add_option("--shared-cares",
+ action="store_true",
+ dest="shared_cares",
+ help="Link to a shared cares DLL instead of static linking")
+
+parser.add_option("--shared-cares-includes",
+ action="store",
+ dest="shared_cares_includes",
+ help="Directory containing cares header files")
+
+parser.add_option("--shared-cares-libpath",
+ action="store",
+ dest="shared_cares_libpath",
+ help="A directory to search for the shared cares DLL")
+
+parser.add_option("--shared-cares-libname",
+ action="store",
+ dest="shared_cares_libname",
+ help="Alternative lib name to link to (default: 'cares')")
+
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
@@ -434,6 +454,20 @@ def configure_http_parser(o):
o['include_dirs'] += [options.shared_http_parser_includes]
+def configure_cares(o):
+ o['variables']['node_shared_cares'] = b(options.shared_cares)
+
+ # assume shared cares if one of these is set?
+ if options.shared_cares_libpath:
+ o['libraries'] += ['-L%s' % options.shared_cares_libpath]
+ if options.shared_cares_libname:
+ o['libraries'] += ['-l%s' % options.shared_cares_libname]
+ elif options.shared_cares:
+ o['libraries'] += ['-lcares']
+ if options.shared_cares_includes:
+ o['include_dirs'] += [options.shared_cares_includes]
+
+
def configure_v8(o):
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['node_shared_v8'] = b(options.shared_v8)
@@ -488,6 +522,7 @@ output = {
configure_node(output)
configure_libz(output)
configure_http_parser(output)
+configure_cares(output)
configure_v8(output)
configure_openssl(output)
diff --git a/doc/api/process.markdown b/doc/api/process.markdown
index 41b163a15532f829a7d6c2b88ae9a9f31de0a9c8..1593eec879ff5141d13cee548df4675e9a18213c 100644
--- a/doc/api/process.markdown
+++ b/doc/api/process.markdown
@@ -299,6 +299,7 @@ An example of the possible output looks like:
{ host_arch: 'x64',
node_install_npm: 'true',
node_prefix: '',
+ node_shared_cares: 'false',
node_shared_http_parser: 'false',
node_shared_v8: 'false',
node_shared_zlib: 'false',
diff --git a/node.gyp b/node.gyp
index a9903cd1c42cab4295d79d452ef1187c7fa7dbe3..ca1a9f30503c40099fe4d1770887750fb681d5b9 100644
--- a/node.gyp
+++ b/node.gyp
@@ -9,6 +9,7 @@
'node_shared_v8%': 'false',
'node_shared_zlib%': 'false',
'node_shared_http_parser%': 'false',
+ 'node_shared_cares%': 'false',
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
'library_files': [
@@ -58,7 +59,6 @@
'type': 'executable',
'dependencies': [
- 'deps/cares/cares.gyp:cares',
'deps/uv/uv.gyp:libuv',
'node_js2c#host',
],
@@ -196,6 +196,10 @@
'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
}],
+ [ 'node_shared_cares=="false"', {
+ 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
+ }],
+
[ 'OS=="win"', {
'sources': [
'src/res/node.rc',
--
1.8.0

View File

@ -1,117 +0,0 @@
From c11c6c57eb3f87d32207bf5e86a2e53cbabc8a60 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 23 Oct 2012 19:54:22 -0400
Subject: [PATCH 3/3] build: allow linking against system libuv
---
configure | 35 +++++++++++++++++++++++++++++++++++
doc/api/process.markdown | 1 +
node.gyp | 6 +++++-
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index a23c04cb77fda65453e4cbe9c916d3d3f14f3d26..9461d791ec63a63a7271dd3c99ebdf5456032187 100755
--- a/configure
+++ b/configure
@@ -164,6 +164,26 @@ parser.add_option("--shared-cares-libname",
dest="shared_cares_libname",
help="Alternative lib name to link to (default: 'cares')")
+parser.add_option("--shared-libuv",
+ action="store_true",
+ dest="shared_libuv",
+ help="Link to a shared libuv DLL instead of static linking")
+
+parser.add_option("--shared-libuv-includes",
+ action="store",
+ dest="shared_libuv_includes",
+ help="Directory containing libuv header files")
+
+parser.add_option("--shared-libuv-libpath",
+ action="store",
+ dest="shared_libuv_libpath",
+ help="A directory to search for the shared libuv DLL")
+
+parser.add_option("--shared-libuv-libname",
+ action="store",
+ dest="shared_libuv_libname",
+ help="Alternative lib name to link to (default: 'uv')")
+
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
@@ -468,6 +488,20 @@ def configure_cares(o):
o['include_dirs'] += [options.shared_cares_includes]
+def configure_libuv(o):
+ o['variables']['node_shared_libuv'] = b(options.shared_libuv)
+
+ # assume shared libuv if one of these is set?
+ if options.shared_libuv_libpath:
+ o['libraries'] += ['-L%s' % options.shared_libuv_libpath]
+ if options.shared_libuv_libname:
+ o['libraries'] += ['-l%s' % options.shared_libuv_libname]
+ elif options.shared_libuv:
+ o['libraries'] += ['-luv']
+ if options.shared_libuv_includes:
+ o['include_dirs'] += [options.shared_libuv_includes]
+
+
def configure_v8(o):
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['node_shared_v8'] = b(options.shared_v8)
@@ -523,6 +557,7 @@ configure_node(output)
configure_libz(output)
configure_http_parser(output)
configure_cares(output)
+configure_libuv(output)
configure_v8(output)
configure_openssl(output)
diff --git a/doc/api/process.markdown b/doc/api/process.markdown
index 1593eec879ff5141d13cee548df4675e9a18213c..d479238f197e67972ad00412b6ba39eb78e93fa5 100644
--- a/doc/api/process.markdown
+++ b/doc/api/process.markdown
@@ -301,6 +301,7 @@ An example of the possible output looks like:
node_prefix: '',
node_shared_cares: 'false',
node_shared_http_parser: 'false',
+ node_shared_libuv: 'false',
node_shared_v8: 'false',
node_shared_zlib: 'false',
node_use_dtrace: 'false',
diff --git a/node.gyp b/node.gyp
index ca1a9f30503c40099fe4d1770887750fb681d5b9..3366535cc70751ca6d591a3428e1acdbb7e0d9c1 100644
--- a/node.gyp
+++ b/node.gyp
@@ -10,6 +10,7 @@
'node_shared_zlib%': 'false',
'node_shared_http_parser%': 'false',
'node_shared_cares%': 'false',
+ 'node_shared_libuv%': 'false',
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
'library_files': [
@@ -59,7 +60,6 @@
'type': 'executable',
'dependencies': [
- 'deps/uv/uv.gyp:libuv',
'node_js2c#host',
],
@@ -200,6 +200,10 @@
'dependencies': [ 'deps/cares/cares.gyp:cares' ],
}],
+ [ 'node_shared_libuv=="false"', {
+ 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
+ }],
+
[ 'OS=="win"', {
'sources': [
'src/res/node.rc',
--
1.8.0

View File

@ -1,6 +1,6 @@
Name: nodejs Name: nodejs
Version: 0.9.3 Version: 0.9.4
Release: 8%{?dist} Release: 1%{?dist}
Summary: JavaScript runtime Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages Group: Development/Languages
@ -24,12 +24,6 @@ Conflicts: node <= 0.3.2-11
# Patches # Patches
# The following patches have been accepted upstream and can
# be removed once node.js 0.9.4 is released
Patch0001: 0001-build-allow-linking-against-system-http_parser.patch
Patch0002: 0002-build-allow-linking-against-system-c-ares.patch
Patch0003: 0003-build-allow-linking-against-system-libuv.patch
# This patch is Fedora-specific and allows building the release # This patch is Fedora-specific and allows building the release
# binaries with debugging symbols # binaries with debugging symbols
Patch0004: 0004-Build-debugging-symbols-by-default.patch Patch0004: 0004-Build-debugging-symbols-by-default.patch
@ -41,13 +35,16 @@ Node.js uses an event-driven, non-blocking I/O model that
makes it lightweight and efficient, perfect for data-intensive makes it lightweight and efficient, perfect for data-intensive
real-time applications that run across distributed devices. real-time applications that run across distributed devices.
%package docs
Summary: Node.js API documentation
Group: Documentation
%description docs
The API documentation for the Node.js JavaScript runtime.
%prep %prep
%setup -q -n node-v%{version} %setup -q -n node-v%{version}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1 %patch0004 -p1
# Make sure nothing gets included from bundled deps: # Make sure nothing gets included from bundled deps:
@ -76,6 +73,8 @@ find deps/uv -name "*.c" -exec rm -f {} \;
find deps/uv -name "*.h" -exec rm -f {} \; find deps/uv -name "*.h" -exec rm -f {} \;
%build %build
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
./configure --prefix=%{_prefix} \ ./configure --prefix=%{_prefix} \
--shared-v8 \ --shared-v8 \
--shared-openssl \ --shared-openssl \
@ -99,12 +98,27 @@ rm -rf %{buildroot}/%{_prefix}/lib/dtrace
# Set the binary permissions properly # Set the binary permissions properly
chmod 0755 %{buildroot}/%{_bindir}/node chmod 0755 %{buildroot}/%{_bindir}/node
#install documentation
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc-%{version}/html
cp -pr doc/* %{buildroot}%{_defaultdocdir}/%{name}-doc-%{version}/html
rm -f %{_defaultdocdir}/%{name}-docs-%{version}/html/nodejs.1
%files %files
%doc ChangeLog LICENSE README.md AUTHORS %doc ChangeLog LICENSE README.md AUTHORS
%{_bindir}/node %{_bindir}/node
%{_mandir}/man1/node.* %{_mandir}/man1/node.*
%files docs
%{_defaultdocdir}/%{name}-docs-%{version}
%doc LICENSE
%changelog %changelog
* Wed Dec 26 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.4-1
- new upstream release 0.9.4
- system library patches are now upstream
- respect optflags
- include documentation in subpackage
* Wed Dec 19 2012 Dan Horák <dan[at]danny.cz> - 0.9.3-8 * Wed Dec 19 2012 Dan Horák <dan[at]danny.cz> - 0.9.3-8
- set exclusive arch list to match v8 - set exclusive arch list to match v8

View File

@ -1 +1 @@
4a7576567ddd8bb13b763d578d9481f0 node-v0.9.3.tar.gz 4898a22b91362bf3cc9525cbc2efb509 node-v0.9.4.tar.gz