From 44e578216c665bb672843c63469cf80aa66e6707 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 27 May 2019 21:05:32 +0200 Subject: [PATCH] - updated to 1.7.0 - updated boost patch, adjusted for boost 1.70 (unfortunately code uses boost internals) --- Collage.spec | 25 +++++--- boost-1.61.patch | 149 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 129 insertions(+), 45 deletions(-) diff --git a/Collage.spec b/Collage.spec index 98c7d8a..dbbcc31 100644 --- a/Collage.spec +++ b/Collage.spec @@ -5,25 +5,30 @@ Summary: Cross-platform C++ network library Summary(pl.UTF-8): Wieloplatformowa biblioteka sieciowa dla C++ Name: Collage -Version: 1.6.0 +Version: 1.7.0 Release: 1 License: LGPL v2.1 Group: Libraries +#Source0Download: https://github.com/Eyescale/Collage/releases Source0: https://github.com/Eyescale/Collage/archive/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: cf9bb83c674aa7c522878f42e4751e2e +# Source0-md5: f0e57c1a2f6196c11ad8ac6029483e56 Patch0: boost-1.61.patch URL: http://libcollage.net/ -BuildRequires: Lunchbox-devel >= 1.13.0 -BuildRequires: Eyescale-CMake >= 2016.04 -BuildRequires: Pression-devel +BuildRequires: Lunchbox-devel >= 1.16.0 +BuildRequires: Eyescale-CMake >= 2017.05 +BuildRequires: Pression-devel >= 2.0.0 +BuildRequires: Servus-devel >= 1.5.1 BuildRequires: boost-devel >= 1.41.0 -BuildRequires: cmake >= 2.8 +BuildRequires: cmake >= 3.1 %{?with_apidocs:BuildRequires: doxygen} BuildRequires: libibverbs-devel BuildRequires: librdmacm-devel BuildRequires: libstdc++-devel BuildRequires: pkgconfig BuildRequires: udt-devel +Requires: Lunchbox >= 1.16.0 +Requires: Pression >= 2.0.0 +Requires: Servus >= 1.5.1 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -51,6 +56,10 @@ Summary: Header files for Collage library Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Collage Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: Lunchbox-devel >= 1.16.0 +Requires: Pression-devel >= 2.0.0 +Requires: Servus-devel >= 1.5.1 +Requires: boost-devel >= 1.41.0 %description devel Header files for Collage library. @@ -76,8 +85,8 @@ Dokumentacja API biblioteki Collage. %setup -q %patch0 -p1 +rmdir CMake/common ln -s %{_datadir}/Eyescale-CMake CMake/common -%{__rm} .gitexternals %build install -d build @@ -111,7 +120,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/coNodeperf %attr(755,root,root) %{_bindir}/coObjectperf %attr(755,root,root) %{_libdir}/libCollage.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libCollage.so.6 +%attr(755,root,root) %ghost %{_libdir}/libCollage.so.7 %files devel %defattr(644,root,root,755) diff --git a/boost-1.61.patch b/boost-1.61.patch index ac3a6e0..44c6ffb 100644 --- a/boost-1.61.patch +++ b/boost-1.61.patch @@ -1,60 +1,135 @@ ---- Collage-1.4.0/co/dataIStreamArchive.h~ 2016-05-28 17:25:24.000000000 +0000 -+++ Collage-1.4.0/co/dataIStreamArchive.h 2016-05-28 17:28:01.400951002 +0000 -@@ -42,6 +42,7 @@ - # include +--- Collage-1.7.0/co/dataIStreamArchive.h.orig 2017-05-29 15:17:51.000000000 +0200 ++++ Collage-1.7.0/co/dataIStreamArchive.h 2019-05-26 22:00:38.151613651 +0200 +@@ -42,9 +42,10 @@ + #include #endif #include +#include #include - #include -@@ -73,7 +72,7 @@ +-#include ++#include + + #include + #include +@@ -73,7 +74,7 @@ /** @internal use optimized load for arrays. */ - template< typename T > -- void load_array( boost::serialization::array< T >& a, unsigned int ); -+ void load_array( boost::serialization::array_wrapper< T >& a, unsigned int ); + template +- void load_array(boost::serialization::array& a, unsigned int); ++ void load_array(boost::serialization::array_wrapper& a, unsigned int); /** @internal enable serialization optimization for arrays. */ struct use_array_optimization ---- Collage-1.4.0/co/dataIStreamArchive.ipp~ 2016-03-21 10:09:25.000000000 +0000 -+++ Collage-1.4.0/co/dataIStreamArchive.ipp 2016-05-28 17:28:34.587798794 +0000 -@@ -22,7 +22,7 @@ +--- Collage-1.7.0/co/dataIStreamArchive.ipp.orig 2019-05-26 21:54:06.503735390 +0200 ++++ Collage-1.7.0/co/dataIStreamArchive.ipp 2019-05-26 21:56:00.719783295 +0200 +@@ -21,7 +21,7 @@ + namespace co { - - template< typename T > --void DataIStreamArchive::load_array( boost::serialization::array< T >& a, -+void DataIStreamArchive::load_array( boost::serialization::array_wrapper< T >& a, - unsigned int ) + template +-void DataIStreamArchive::load_array(boost::serialization::array& a, ++void DataIStreamArchive::load_array(boost::serialization::array_wrapper& a, + unsigned int) { - _stream >> Array< T >( a.address(), a.count( )); ---- Collage-1.4.0/co/dataOStreamArchive.h~ 2016-03-21 10:09:25.000000000 +0000 -+++ Collage-1.4.0/co/dataOStreamArchive.h 2016-05-28 17:28:51.074554669 +0000 -@@ -49,6 +49,7 @@ - #include - #include + _stream >> Array(a.address(), a.count()); +@@ -73,7 +73,7 @@ + typename boost::enable_if >::type + DataIStreamArchive::load(T& t) + { +- namespace fp = boost::spirit::math; ++ namespace fp = boost::math; + typedef typename fp::detail::fp_traits::type traits; + // if you end here there are three possibilities: +--- Collage-1.7.0/co/dataOStreamArchive.h.orig 2019-05-26 21:54:06.503735390 +0200 ++++ Collage-1.7.0/co/dataOStreamArchive.h 2019-05-26 21:59:39.051933822 +0200 +@@ -37,13 +37,14 @@ + + #include + #include +#include + #include + #if BOOST_VERSION >= 104400 + #include + #endif - namespace co - { -@@ -68,7 +68,7 @@ + #include +-#include ++#include + + #include + #include +@@ -66,7 +67,7 @@ /** @internal use optimized save for arrays. */ - template< typename T > -- void save_array( const boost::serialization::array< T >& a, unsigned int ); -+ void save_array( const boost::serialization::array_wrapper< T >& a, unsigned int ); + template +- void save_array(const boost::serialization::array& a, unsigned int); ++ void save_array(const boost::serialization::array_wrapper& a, unsigned int); /** @internal enable serialization optimization for arrays. */ struct use_array_optimization ---- Collage-1.4.0/co/dataOStreamArchive.ipp~ 2016-03-21 10:09:25.000000000 +0000 -+++ Collage-1.4.0/co/dataOStreamArchive.ipp 2016-05-28 17:29:05.451298725 +0000 -@@ -17,7 +17,7 @@ +--- Collage-1.7.0/co/dataOStreamArchive.ipp.orig 2019-05-26 21:54:06.507068705 +0200 ++++ Collage-1.7.0/co/dataOStreamArchive.ipp 2019-05-26 22:00:05.315124875 +0200 +@@ -16,7 +16,7 @@ + */ + + template +-void DataOStreamArchive::save_array(const boost::serialization::array& a, ++void DataOStreamArchive::save_array(const boost::serialization::array_wrapper& a, + unsigned int) + { + _stream << Array(a.address(), a.count()); +@@ -72,7 +72,7 @@ + typename boost::enable_if >::type + DataOStreamArchive::save(const T& t) + { +- namespace fp = boost::spirit::math; ++ namespace fp = boost::math; + typedef typename fp::detail::fp_traits::type traits; - template< typename T > --void DataOStreamArchive::save_array( const boost::serialization::array< T >& a, -+void DataOStreamArchive::save_array( const boost::serialization::array_wrapper< T >& a, - unsigned int ) +--- Collage-1.7.0/co/rspConnection.cpp.orig 2017-05-29 15:17:51.000000000 +0200 ++++ Collage-1.7.0/co/rspConnection.cpp 2019-05-27 05:53:38.214532320 +0200 +@@ -271,9 +271,9 @@ + _write->set_option(ip::multicast::outbound_interface(ifAddr.to_v4())); + #ifdef SO_BINDTODEVICE // https://github.com/Eyescale/Collage/issues/16 + const std::string& ifIP = ifAddr.to_string(); +- ::setsockopt(_write->native(), SOL_SOCKET, SO_BINDTODEVICE, ++ ::setsockopt(_write->native_handle(), SOL_SOCKET, SO_BINDTODEVICE, + ifIP.c_str(), ifIP.size() + 1); +- ::setsockopt(_read->native(), SOL_SOCKET, SO_BINDTODEVICE, ifIP.c_str(), ++ ::setsockopt(_read->native_handle(), SOL_SOCKET, SO_BINDTODEVICE, ifIP.c_str(), + ifIP.size() + 1); + #endif + +--- Collage-1.7.0/co/dataIStreamArchive.ipp.orig 2019-05-27 05:56:32.013590769 +0200 ++++ Collage-1.7.0/co/dataIStreamArchive.ipp 2019-05-27 17:49:02.531991336 +0200 +@@ -74,7 +74,7 @@ + DataIStreamArchive::load(T& t) + { + namespace fp = boost::math; +- typedef typename fp::detail::fp_traits::type traits; ++ typedef typename fp::detail::fp_traits::sign_change_type traits; // HACK: uses boost internals + + // if you end here there are three possibilities: + // 1. you're serializing a long double which is not portable +--- Collage-1.7.0/co/dataOStreamArchive.ipp.orig 2019-05-27 17:47:03.049305296 +0200 ++++ Collage-1.7.0/co/dataOStreamArchive.ipp 2019-05-27 17:51:18.467921575 +0200 +@@ -74,7 +74,7 @@ { - _stream << Array< const T >( a.address(), a.count( )); + namespace fp = boost::math; + +- typedef typename fp::detail::fp_traits::type traits; ++ typedef typename fp::detail::fp_traits::sign_change_type traits; // HACK: uses boost internals + + // if the no_infnan flag is set we must throw here + if (get_flags() & serialization::no_infnan && !fp::isfinite(t)) +@@ -97,7 +97,7 @@ + bits = 0; + break; + case FP_NAN: +- bits = traits::exponent | traits::mantissa; ++ bits = traits::exponent | traits::significand; + break; + case FP_INFINITE: + bits = traits::exponent | (t < 0) * traits::sign; -- 2.44.0