commit 5ebd5855b94209d48f931cdb10ac9af302a59392
Author: Jakub Bogusz <[email protected]>
Date:   Fri Feb 27 17:40:54 2015 +0100

    - updated to 0.7.5
    - added link patch (libnghttp2_asio linking fix)
    - build libnghttp2_asio

 nghttp2-link.patch | 10 ++++++
 nghttp2.spec       | 91 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 93 insertions(+), 8 deletions(-)
---
diff --git a/nghttp2.spec b/nghttp2.spec
index c88929e..f4e706c 100644
--- a/nghttp2.spec
+++ b/nghttp2.spec
@@ -1,25 +1,29 @@
 #
 # Conditional build:
-%bcond_without tests           # don't perform "make check"
-%bcond_without static_libs     # don't build static library
+%bcond_without asio            # libnghttp2_asio C++ library
+%bcond_without static_libs     # static libraries
+%bcond_without tests           # "make check" call
 
 Summary:       HTTP/2.0 C library
 Summary(pl.UTF-8):     Biblioteka C HTTP/2.0
 Name:          nghttp2
-Version:       0.6.1
+Version:       0.7.5
 Release:       1
 License:       MIT
 Group:         Libraries
 #Source0Download: https://github.com/tatsuhiro-t/nghttp2/releases
 Source0:       
https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
-# Source0-md5: f0340b678e0d5eef107b66837c014e37
+# Source0-md5: d89aa34f33ac285be541198f287b77cb
+Patch0:                %{name}-link.patch
 URL:           https://github.com/tatsuhiro-t/nghttp2
 %{?with_tests:BuildRequires:   CUnit >= 2.1}
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
+%{?with_asio:BuildRequires:    boost-devel >= 1.54.0}
 BuildRequires: jansson-devel >= 2.5
+BuildRequires: libev-devel
 BuildRequires: libevent-devel >= 2.0.8
-BuildRequires: libstdc++-devel
+BuildRequires: libstdc++-devel >= 6:4.3
 BuildRequires: libtool >= 2:2.2.6
 BuildRequires: libxml2-devel >= 1:2.7.7
 BuildRequires: openssl-devel >= 1.0.1
@@ -38,6 +42,9 @@ Requires:     spdylay >= 1.3.0
 Requires:      zlib >= 1.2.3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# non-function symbols std::__once_call, std::__once_callable
+%define                skip_post_check_so      libnghttp2_asio.so.*
+
 %description
 This is an experimental implementation of Hypertext Transfer Protocol
 version 2.0.
@@ -84,8 +91,48 @@ Python binding to nghttp2 library.
 %description -n python-nghttp2 -l pl.UTF-8
 Wiązanie Pythona do biblioteki nghttp2.
 
+%package asio
+Summary:       HTTP/2.0 C++ library
+Summary(pl.UTF-8):     Biblioteka C++ HTTP/2.0
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      openssl >= 1.0.1
+
+%description asio
+HTTP/2.0 C++ library.
+
+%description asio -l pl.UTF-8
+Biblioteka C++ HTTP/2.0.
+
+%package asio-devel
+Summary:       Header file for nghttp2_asio library
+Summary(pl.UTF-8):     Plik nagłówkowy biblioteki nghttp2_asio
+Group:         Development/Libraries
+Requires:      %{name}-asio = %{version}-%{release}
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      libstdc++-devel
+
+%description asio-devel
+Header file for nghttp2_asio library.
+
+%description asio-devel -l pl.UTF-8
+Plik nagłówkowy biblioteki nghttp2_asio.
+
+%package asio-static
+Summary:       Static libnghttp2_asio library
+Summary(pl.UTF-8):     Statyczna biblioteka libnghttp2_asio
+Group:         Development/Libraries
+Requires:      %{name}-asio-devel = %{version}-%{release}
+
+%description asio-static
+Static libnghttp2_asio library.
+
+%description asio-static -l pl.UTF-8
+Statyczna biblioteka libnghttp2_asio.
+
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
@@ -94,8 +141,13 @@ Wiązanie Pythona do biblioteki nghttp2.
 %{__autoheader}
 %{__automake}
 %configure \
+       --enable-app \
+       %{?with_asio:--enable-asio-lib} \
+       --enable-hpack-tools \
+       --enable-python-bindings \
        --disable-silent-rules \
-       %{!?with_static_libs:--disable-static}
+       %{!?with_static_libs:--disable-static} \
+       --without-jemalloc
 
 %{__make}
 
@@ -110,7 +162,7 @@ rm -rf $RPM_BUILD_ROOT
        DESTDIR=$RPM_BUILD_ROOT
 
 # obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
 # packaged as %doc
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
 
@@ -120,6 +172,9 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%post  asio -p /sbin/ldconfig
+%postun        asio -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING README.rst
@@ -139,7 +194,8 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libnghttp2.so
-%{_includedir}/nghttp2
+%dir %{_includedir}/nghttp2
+%{_includedir}/nghttp2/nghttp2*.h
 %{_pkgconfigdir}/libnghttp2.pc
 
 %if %{with static_libs}
@@ -152,3 +208,22 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/nghttp2.so
 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
+
+%if %{with asio}
+%files asio
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.0
+
+%files asio-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnghttp2_asio.so
+%{_includedir}/nghttp2/asio_http2.h
+%{_pkgconfigdir}/libnghttp2_asio.pc
+
+%if %{with static_libs}
+%files asio-static
+%defattr(644,root,root,755)
+%{_libdir}/libnghttp2_asio.a
+%endif
+%endif
diff --git a/nghttp2-link.patch b/nghttp2-link.patch
new file mode 100644
index 0000000..bc51463
--- /dev/null
+++ b/nghttp2-link.patch
@@ -0,0 +1,10 @@
+--- nghttp2-0.7.5/src/Makefile.am.orig 2015-02-26 16:58:47.000000000 +0100
++++ nghttp2-0.7.5/src/Makefile.am      2015-02-26 22:09:06.105022216 +0100
+@@ -189,6 +189,6 @@
+       ${BOOST_ASIO_LIB} \
+       ${BOOST_THREAD_LIB} \
+       ${BOOST_SYSTEM_LIB} \
+-      @OPENSSL_LIBS@
++      @OPENSSL_LIBS@ -lpthread
+ 
+ endif # ENABLE_ASIO_LIB
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nghttp2.git/commitdiff/5ebd5855b94209d48f931cdb10ac9af302a59392

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to