[packages/libuv] new, version 0.10.3

glen glen at pld-linux.org
Sun Apr 7 23:19:17 CEST 2013


commit 35f93c772fb23309f273885e846beb56e7cc3c26
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Apr 8 00:18:26 2013 +0300

    new, version 0.10.3
    
    based on fedora package
    5245e183b43130b75ab9517850a369cd8a15f0e9

 0001-unix-include-uv.h-in-src-version.c.patch |  42 ++++++++++
 libuv.pc.in                                   |  11 +++
 libuv.spec                                    | 115 ++++++++++++++++++++++++++
 3 files changed, 168 insertions(+)
---
diff --git a/libuv.spec b/libuv.spec
new file mode 100644
index 0000000..7b03d95
--- /dev/null
+++ b/libuv.spec
@@ -0,0 +1,115 @@
+%define git_snapshot 5462dab
+Summary:	Platform layer for node.js
+Name:		libuv
+Version:	0.10.3
+Release:	1
+License:	MIT
+Group:		Development/Tools
+URL:		http://nodejs.org/
+Source0:	http://libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz
+# Source0-md5:	fb20265511ebb7f0785f83c60a650324
+Source2:	%{name}.pc.in
+# backport fix to FTBFS in nodejs-0.10.3
+# https://github.com/joyent/node/issues/5213
+Patch0001:	0001-unix-include-uv.h-in-src-version.c.patch
+BuildRequires:	gyp
+# Bundling exception request:
+# https://fedorahosted.org/fpc/ticket/231
+Provides:	bundled(libev) = 4.04
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# we only need major.minor in the SONAME in the stable (even numbered) series
+# this should be changed to %%{version} in unstable (odd numbered) releases
+%define		sover	0.10
+
+%description
+libuv is a new platform layer for Node. Its purpose is to abstract
+IOCP on Windows and libev on Unix systems. We intend to eventually
+contain all platform differences in this library.
+
+%package devel
+Summary:	Development libraries for libuv
+Group:		Development/Tools
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Development libraries for libuv
+
+%prep
+%setup -q -n %{name}-v%{version}
+%patch0001 -p1
+
+%build
+CC="%{__cc}" \
+CXX="%{__cxx}" \
+LDFLAGS="%{rpmldflags}" \
+CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+./gyp_uv \
+	-Dcomponent=shared_library \
+	-Dlibrary=shared_library
+
+# Modify the build so it produces a versioned shared library
+sed -i -e "s/libuv.so/libuv.so.%{sover}/g" out/{libuv,run-benchmarks,run-tests}.target.mk
+
+%{__make} V=1 -C out \
+	CC="%{__cc}" \
+	CXX="%{__cxx}" \
+	BUILDTYPE=Release \
+	CC.host="%{__cc}" \
+	CXX.host="%{__cxx}" \
+	LDFLAGS.host="%{rpmldflags}"
+
+%if %{with tests}
+# Tests are currently disabled because some require network access
+#./run-tests
+#./run-benchmarks
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# Copy the shared lib into the libdir
+install -d $RPM_BUILD_ROOT%{_libdir}
+cp -p out/Release/obj.target/libuv.so.%{sover} $RPM_BUILD_ROOT%{_libdir}/libuv.so.%{version}
+lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libuv.so.*.*.*)
+ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libuv.so.%{sover}
+ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libuv.so
+
+# Copy the headers into the include path
+install -d $RPM_BUILD_ROOT/%{_includedir}/uv-private
+cp -p include/uv.h $RPM_BUILD_ROOT/%{_includedir}
+cp -p \
+   include/uv-private/ngx-queue.h \
+   include/uv-private/tree.h \
+   include/uv-private/uv-linux.h \
+   include/uv-private/uv-unix.h \
+   $RPM_BUILD_ROOT/%{_includedir}/uv-private
+
+# Create the pkgconfig file
+install -d $RPM_BUILD_ROOT/%{_pkgconfigdir}
+sed -e "s#@prefix@#%{_prefix}#g" \
+    -e "s#@exec_prefix@#%{_exec_prefix}#g" \
+    -e "s#@libdir@#%{_libdir}#g" \
+    -e "s#@includedir@#%{_includedir}#g" \
+    -e "s#@version@#%{version}.git%{git_snapshot}#g" \
+    %{SOURCE2} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libuv.pc
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md AUTHORS LICENSE
+%attr(755,root,root) %{_libdir}/libuv.so.*.*.*
+%ghost %{_libdir}/libuv.so.%{sover}
+
+%files devel
+%defattr(644,root,root,755)
+%doc README.md AUTHORS LICENSE
+%{_libdir}/libuv.so
+%{_pkgconfigdir}/libuv.pc
+%{_includedir}/uv.h
+%{_includedir}/uv-private
diff --git a/0001-unix-include-uv.h-in-src-version.c.patch b/0001-unix-include-uv.h-in-src-version.c.patch
new file mode 100644
index 0000000..a2e9792
--- /dev/null
+++ b/0001-unix-include-uv.h-in-src-version.c.patch
@@ -0,0 +1,42 @@
+From fb660262d4f8b6d0f300a3923063ec5a718411ad Mon Sep 17 00:00:00 2001
+From: Ben Noordhuis <info at bnoordhuis.nl>
+Date: Thu, 4 Apr 2013 03:02:06 +0200
+Subject: [PATCH] unix: include uv.h in src/version.c
+
+Include uv.h so the compiler sees the right visibility attribute for
+uv_version() and uv_version_string().
+
+GYP builds compile with -fvisibility=hidden. Before this commit, the
+symbols were not visible in libuv.so.
+
+Fixes joyent/node#5213.
+(cherry picked from commit f1215b791811e5c860152ecde038f35537dab57f)
+---
+ src/version.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/version.c b/src/version.c
+index 0ee0753..7326180 100644
+--- a/src/version.c
++++ b/src/version.c
+@@ -19,6 +19,7 @@
+  * IN THE SOFTWARE.
+  */
+ 
++#include "uv.h"
+ 
+  /*
+  * Versions with an even minor version (e.g. 0.6.1 or 1.0.4) are API and ABI
+@@ -26,6 +27,9 @@
+  * releases.
+  */
+ 
++#undef UV_VERSION_MAJOR   /* TODO(bnoordhuis) Remove in v0.11. */
++#undef UV_VERSION_MINOR   /* TODO(bnoordhuis) Remove in v0.11. */
++
+ #define UV_VERSION_MAJOR 0
+ #define UV_VERSION_MINOR 10
+ #define UV_VERSION_PATCH 3
+-- 
+1.8.1.4
+
diff --git a/libuv.pc.in b/libuv.pc.in
new file mode 100644
index 0000000..43236a5
--- /dev/null
+++ b/libuv.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libuv
+Description: Development libraries for libuv
+Version: @version@
+Libs: -L${libdir} -luv -lrt -ldl
+Cflags:
+URL: http://nodejs.org/
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libuv.git/commitdiff/35f93c772fb23309f273885e846beb56e7cc3c26



More information about the pld-cvs-commit mailing list