Codebase list libgdf / cdb8901
Avoid FTBFS when building against boost 1.74 + d/p/check-system-endianess.patch: New patch for replacing the deprecated macros BOOST_*_ENDIAN by BOOST_ENDIAN_*_BYTE. + d/control: Impose minimal version 1.55 build-dependency on libboost-dev. The new BOOST_ENDIAN_*_BYTE macros were introduced in this version of Boost. Closes: #975443 Thanks: Anton Gladky Gbp-Dch: Full Rafael Laboissière 3 years ago
3 changed file(s) with 49 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
99 dh-octave,
1010 help2man,
1111 libboost-date-time-dev,
12 libboost-dev (>> 1.34.2~),
12 libboost-dev (>= 1.55),
1313 libboost-filesystem-dev,
1414 libboost-program-options-dev
1515 Standards-Version: 4.5.1
0 Description: Avoid deprecated way of checking system endianness
1 According to file /usr/include/boost/predef/detail/endian_compat.h,
2 “[t]he use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please
3 include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE
4 instead.”
5 .
6 This patch follows this recommendation.
7 Author: Rafael Laboissière <rafael@debian.org>
8 Bug-Debian: https://bugs.debian.org/975443
9 Forwarded: https://github.com/mbillingr/libgdf/pull/5
10 Last-Update: 2020-11-25
11
12 --- libgdf-0.1.3.orig/libgdf/include/GDF/Types.h
13 +++ libgdf-0.1.3/libgdf/include/GDF/Types.h
14 @@ -21,7 +21,7 @@
15
16 #include "Exceptions.h"
17 #include <boost/cstdint.hpp>
18 -#include <boost/detail/endian.hpp>
19 +#include <boost/predef/other/endian.h>
20 #include <iostream>
21
22 namespace gdf
23 @@ -74,9 +74,9 @@ namespace gdf
24 template<typename T>
25 void writeLittleEndian( std::ostream &out, T item )
26 {
27 -#if defined(BOOST_LITTLE_ENDIAN)
28 +#if defined(BOOST_ENDIAN_LITTLE_BYTE)
29 out.write( reinterpret_cast<const char*>(&item), sizeof(item) );
30 -#elif defined(BOOST_BIG_ENDIAN)
31 +#elif defined(BOOST_ENDIAN_BIG_BYTE)
32 const char* p = reinterpret_cast<const char*>(&item) + sizeof(item)-1;
33 for( size_t i=0; i<sizeof(item); i++ )
34 out.write( p--, 1 );
35 @@ -88,9 +88,9 @@ namespace gdf
36 template<typename T>
37 void readLittleEndian( std::istream &in, T &item )
38 {
39 -#if defined(BOOST_LITTLE_ENDIAN)
40 +#if defined(BOOST_ENDIAN_LITTLE_BYTE)
41 in.read( reinterpret_cast<char*>(&item), sizeof(item) );
42 -#elif defined(BOOST_BIG_ENDIAN)
43 +#elif defined(BOOST_ENDIAN_BIG_BYTE)
44 char* p = reinterpret_cast<char*>(&item) + sizeof(item)-1;
45 for( size_t i=0; i<sizeof(item); i++ )
46 in.read( p--, 1 );
00 disable-werror.patch
1 check-system-endianness.patch