[packages/Collage] - added boost patch, release 3 (boost 1.73)

qboosh qboosh at pld-linux.org
Sat Aug 1 09:23:54 CEST 2020


commit 61f14322a1585d820f597917053ad5300aa3d6f3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Aug 1 09:25:39 2020 +0200

    - added boost patch, release 3 (boost 1.73)

 Collage-boost.patch | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 Collage.spec        |  6 +++--
 2 files changed, 78 insertions(+), 2 deletions(-)
---
diff --git a/Collage.spec b/Collage.spec
index bce54a0..310445f 100644
--- a/Collage.spec
+++ b/Collage.spec
@@ -6,13 +6,14 @@ Summary:	Cross-platform C++ network library
 Summary(pl.UTF-8):	Wieloplatformowa biblioteka sieciowa dla C++
 Name:		Collage
 Version:	1.7.0
-Release:	2
+Release:	3
 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:	f0e57c1a2f6196c11ad8ac6029483e56
 Patch0:		boost-1.61.patch
+Patch1:		%{name}-boost.patch
 URL:		http://libcollage.net/
 BuildRequires:	Lunchbox-devel >= 1.16.0
 BuildRequires:	Eyescale-CMake >= 2017.05
@@ -71,7 +72,7 @@ Pliki nagłówkowe biblioteki Collage.
 Summary:	Collage API documentation
 Summary(pl.UTF-8):	Dokumentacja API biblioteki Collage
 Group:		Documentation
-%if "%{_rpmversion}" >= "5"
+%if "%{_rpmversion}" >= "4.6"
 BuildArch:	noarch
 %endif
 
@@ -84,6 +85,7 @@ Dokumentacja API biblioteki Collage.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 rmdir CMake/common
 ln -s %{_datadir}/Eyescale-CMake CMake/common
diff --git a/Collage-boost.patch b/Collage-boost.patch
new file mode 100644
index 0000000..25035ec
--- /dev/null
+++ b/Collage-boost.patch
@@ -0,0 +1,74 @@
+--- Collage-1.7.0/co/dataIStreamArchive.ipp.orig	2020-08-01 08:04:33.045186314 +0200
++++ Collage-1.7.0/co/dataIStreamArchive.ipp	2020-08-01 08:42:36.396149673 +0200
+@@ -17,6 +17,7 @@
+ 
+ #include "dataIStream.h"
+ #include "dataStreamArchiveException.h"
++#include <boost/endian/conversion.hpp>
+ 
+ namespace co
+ {
+@@ -39,12 +40,6 @@
+ typename boost::enable_if<boost::is_integral<T> >::type
+     DataIStreamArchive::load(T& t)
+ {
+-#if BOOST_VERSION < 104800
+-    namespace bs = boost::detail;
+-#else
+-    namespace bs = boost::spirit::detail;
+-#endif
+-
+     // get the number of bytes in the stream
+     if (signed char size = _loadSignedChar())
+     {
+@@ -62,7 +57,7 @@
+ 
+         // load the value from little endian - is is then converted
+         // to the target type T and fits it because size <= sizeof(T)
+-        t = bs::load_little_endian<T, sizeof(T)>(&temp);
++        t = boost::endian::endian_load<T, sizeof(T), boost::endian::order::little>(reinterpret_cast<const unsigned char*>(&temp));
+     }
+     else
+         // zero optimization
+--- Collage-1.7.0/co/dataOStreamArchive.h.orig	2020-08-01 08:04:33.045186314 +0200
++++ Collage-1.7.0/co/dataOStreamArchive.h	2020-08-01 09:13:51.802656391 +0200
+@@ -43,7 +43,7 @@
+ #include <boost/serialization/item_version_type.hpp>
+ #endif
+ 
+-#include <boost/spirit/home/support/detail/endian.hpp>
++#include <boost/endian/conversion.hpp>
+ #include <boost/math/special_functions/fpclassify.hpp>
+ 
+ #include <boost/type_traits/is_floating_point.hpp>
+--- Collage-1.7.0/co/dataOStreamArchive.ipp.orig	2020-08-01 08:04:33.045186314 +0200
++++ Collage-1.7.0/co/dataOStreamArchive.ipp	2020-08-01 09:13:54.569308070 +0200
+@@ -15,6 +15,7 @@
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+  */
+ 
++
+ template <typename T>
+ void DataOStreamArchive::save_array(const boost::serialization::array_wrapper<T>& a,
+                                     unsigned int)
+@@ -34,11 +35,6 @@
+ typename boost::enable_if<boost::is_integral<T> >::type
+     DataOStreamArchive::save(const T& t)
+ {
+-#if BOOST_VERSION < 104800
+-    namespace bs = boost::detail;
+-#else
+-    namespace bs = boost::spirit::detail;
+-#endif
+ 
+     if (T temp = t)
+     {
+@@ -60,7 +56,7 @@
+ 
+         // we choose to use little endian because this way we just
+         // save the first size bytes to the stream and skip the rest
+-        bs::store_little_endian<T, sizeof(T)>(&temp, t);
++        boost::endian::endian_store<T, sizeof(T), boost::endian::order::little>(reinterpret_cast<unsigned char*>(&temp), t);
+         save_binary(&temp, size);
+     }
+     else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Collage.git/commitdiff/61f14322a1585d820f597917053ad5300aa3d6f3



More information about the pld-cvs-commit mailing list