[med-svn] [Git][med-team/odil][master] 2 commits: Fix Boost-1.74 FTBFS with upstream commit (Closes: #975587)

Nilesh Patra gitlab at salsa.debian.org
Sat Dec 5 16:45:09 GMT 2020



Nilesh Patra pushed to branch master at Debian Med / odil


Commits:
267870a2 by Nilesh Patra at 2020-12-05T16:44:21+00:00
Fix Boost-1.74 FTBFS with upstream commit (Closes: #975587)

- - - - -
176fc393 by Nilesh Patra at 2020-12-05T16:44:53+00:00
Update changelog

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/fix-boost-1.74-FTBFS.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+odil (0.12.0-3) unstable; urgency=medium
+
+  * Team Upload.
+  * Fix Boost-1.74 FTBFS with upstream commit (Closes: #975587)
+
+ -- Nilesh Patra <npatra974 at gmail.com>  Sat, 05 Dec 2020 16:44:27 +0000
+
 odil (0.12.0-2) unstable; urgency=medium
 
   * Remove support for mips64el. Closes: #956749


=====================================
debian/patches/fix-boost-1.74-FTBFS.patch
=====================================
@@ -0,0 +1,147 @@
+From 847a92688a063c17362701266251d3c36fc0693f Mon Sep 17 00:00:00 2001
+From: Julien Lamy <lamy at unistra.fr>
+Date: Wed, 19 Aug 2020 11:44:01 +0200
+Subject: [PATCH] Remove dependeny to Boost.Endian, use run-time, static,
+ endian detection.
+
+---
+ src/odil/endian.cpp | 23 +++++++++++++++
+ src/odil/endian.h   | 70 ++++++++++++++++++++++++++-------------------
+ 2 files changed, 63 insertions(+), 30 deletions(-)
+ create mode 100644 src/odil/endian.cpp
+
+diff --git a/src/odil/endian.cpp b/src/odil/endian.cpp
+new file mode 100644
+index 0000000..7160f86
+--- /dev/null
++++ b/src/odil/endian.cpp
+@@ -0,0 +1,23 @@
++/*************************************************************************
++ * odil - Copyright (C) Universite de Strasbourg
++ * Distributed under the terms of the CeCILL-B license, as published by
++ * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
++ * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
++ * for details.
++ ************************************************************************/
++
++#include "odil/endian.h"
++
++#include <cstdint>
++
++namespace odil
++{
++
++ByteOrdering get_endianness()
++{
++    uint16_t const word = 0x0201;
++    uint8_t const * bytes = reinterpret_cast<uint8_t const *>(&word);
++    return (bytes[0] == 1)?ByteOrdering::LittleEndian:ByteOrdering::BigEndian;
++}
++
++}
+diff --git a/src/odil/endian.h b/src/odil/endian.h
+index 141fdaa..9de1b3c 100644
+--- a/src/odil/endian.h
++++ b/src/odil/endian.h
+@@ -9,8 +9,6 @@
+ #ifndef _05d00816_25d0_41d1_9768_afd39f0503da
+ #define _05d00816_25d0_41d1_9768_afd39f0503da
+ 
+-#include <boost/detail/endian.hpp>
+-
+ #define ODIL_SWAP \
+     auto source = reinterpret_cast<char const *>(&value); \
+     auto const end = source + sizeof(value); \
+@@ -32,52 +30,64 @@ enum class ByteOrdering
+     BigEndian
+ };
+ 
++ByteOrdering get_endianness();
++
++static ByteOrdering const byte_ordering{get_endianness()};
++
+ template<typename T>
+ T host_to_big_endian(T const & value)
+ {
+-#ifdef BOOST_LITTLE_ENDIAN
+-    ODIL_SWAP
+-
+-    return result;
+-#else
+-    return value;
+-#endif
++    if(byte_ordering == ByteOrdering::LittleEndian)
++    {
++        ODIL_SWAP
++        return result;
++    }
++    else
++    {
++        return value;
++    }
+ }
+ 
+ template<typename T>
+ T host_to_little_endian(T const & value)
+ {
+-#ifdef BOOST_BIG_ENDIAN
+-    ODIL_SWAP
+-
+-    return result;
+-#else
+-    return value;
+-#endif
++    if(byte_ordering == ByteOrdering::BigEndian)
++    {
++        ODIL_SWAP
++        return result;
++    }
++    else
++    {
++        return value;
++    }
+ }
+ 
+ template<typename T>
+ T big_endian_to_host(T const & value)
+ {
+-#ifdef BOOST_LITTLE_ENDIAN
+-    ODIL_SWAP
+-
+-    return result;
+-#else
+-    return value;
+-#endif
++    if(byte_ordering == ByteOrdering::LittleEndian)
++    {
++        ODIL_SWAP
++        return result;
++    }
++    else
++    {
++        return value;
++    }
+ }
+ 
+ template<typename T>
+ T little_endian_to_host(T const & value)
+ {
+-#ifdef BOOST_BIG_ENDIAN
+-    ODIL_SWAP
+-
+-    return result;
+-#else
+-    return value;
+-#endif
++    if(byte_ordering == ByteOrdering::BigEndian)
++    {
++        ODIL_SWAP
++        return result;
++    }
++    else
++    {
++        return value;
++    }
+ }
+ 
+ }


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 remove-soname-in-wrappers.patch
 remove_boost_exception.patch
+fix-boost-1.74-FTBFS.patch



View it on GitLab: https://salsa.debian.org/med-team/odil/-/compare/83a754b6cc54e392d063f96c62bc4c974b426277...176fc3939068f7d9f8fafa01130a94b25540ef33

-- 
View it on GitLab: https://salsa.debian.org/med-team/odil/-/compare/83a754b6cc54e392d063f96c62bc4c974b426277...176fc3939068f7d9f8fafa01130a94b25540ef33
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201205/6e720493/attachment-0001.html>


More information about the debian-med-commit mailing list