From c4aa3bb07a267c2989f99854519ae7db905c6b14 Mon Sep 17 00:00:00 2001 From: aredridel Date: Sun, 22 Apr 2012 02:23:22 +0000 Subject: [PATCH] Fix linking zlib Changed files: nodejs-shared-zlib.patch -> 1.1 nodejs.spec -> 1.37 --- nodejs-shared-zlib.patch | 19 +++++++++++++++++++ nodejs.spec | 9 ++++----- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 nodejs-shared-zlib.patch diff --git a/nodejs-shared-zlib.patch b/nodejs-shared-zlib.patch new file mode 100644 index 0000000..c3b8a8c --- /dev/null +++ b/nodejs-shared-zlib.patch @@ -0,0 +1,19 @@ +Common subdirectories: node-v0.6.15-o/benchmark and node-v0.6.15/benchmark +Common subdirectories: node-v0.6.15-o/deps and node-v0.6.15/deps +Common subdirectories: node-v0.6.15-o/doc and node-v0.6.15/doc +Common subdirectories: node-v0.6.15-o/lib and node-v0.6.15/lib +Common subdirectories: node-v0.6.15-o/src and node-v0.6.15/src +Common subdirectories: node-v0.6.15-o/test and node-v0.6.15/test +Common subdirectories: node-v0.6.15-o/tools and node-v0.6.15/tools +diff -u node-v0.6.15-o/wscript node-v0.6.15/wscript +--- node-v0.6.15-o/wscript 2012-04-21 20:16:10.000000000 -0600 ++++ node-v0.6.15/wscript 2012-04-21 20:16:34.000000000 -0600 +@@ -284,7 +284,7 @@ + conf.env["USE_GDBJIT"] = o.use_gdbjit + conf.env['USE_NPM'] = not o.without_npm + +- if not conf.env["USE_SHARED_ZLIB"] and not sys.platform.startswith("win32"): ++ if conf.env["USE_SHARED_ZLIB"] and not sys.platform.startswith("win32"): + conf.env.append_value("LINKFLAGS", "-lz") + + conf.check(lib='dl', uselib_store='DL') diff --git a/nodejs.spec b/nodejs.spec index bac4720..91d661b 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -1,8 +1,3 @@ -# TODO -# - fix linking (-lz missing): -#i686-pld-linux-g++ Release/src/node_main_4.o Release/src/node_4.o Release/src/node_buffer_4.o Release/src/node_javascript_4.o Release/src/node_extensions_4.o Release/src/node_http_parser_4.o Release/src/node_constants_4.o Release/src/node_file_4.o Release/src/node_script_4.o Release/src/node_os_4.o Release/src/node_dtrace_4.o Release/src/node_string_4.o Release/src/node_zlib_4.o Release/src/timer_wrap_4.o Release/src/handle_wrap_4.o Release/src/stream_wrap_4.o Release/src/tcp_wrap_4.o Release/src/udp_wrap_4.o Release/src/pipe_wrap_4.o Release/src/cares_wrap_4.o Rel/usr/bin/ld: Release/src/node_zlib_4.o: undefined reference to symbol 'inflate' -#/usr/bin/ld: note: 'inflate' is defined in DSO /lib/libz.so.1 so try adding it to the linker command line -#/lib/libz.so.1: could not read symbols: Invalid operation Summary: Asynchronous JavaScript Engine Name: nodejs Version: 0.6.15 @@ -17,6 +12,8 @@ Patch1: %{name}-soname.patch Patch2: %{name}-libpath.patch # use /usr/lib64/node as an arch-specific module dir when appropriate Patch3: %{name}-lib64path.patch +# Fix linking of zlib +Patch4: %{name}-shared-zlib.patch BuildRequires: c-ares-devel >= 1.7.4 BuildRequires: gcc >= 5:4.0 BuildRequires: libeio-devel @@ -82,6 +79,8 @@ used by Node.js and many of its modules. %patch2 -p1 %endif +%patch4 -p1 + # fix #!/usr/bin/env python -> #!/usr/bin/python: grep -rl 'bin/env python' tools | xargs %{__sed} -i -e '1s,^#!.*python,#!%{__python},' -- 2.44.0