commit:     5688163ca8cafad73827308c2efdda56e4985714
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 23 16:16:38 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 23 16:17:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5688163c

dev-libs/boost: backport math header fix

Bug: https://bugs.gentoo.org/808087
Closes: https://bugs.gentoo.org/808663
Closes: https://bugs.gentoo.org/808677
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...{boost-1.77.0.ebuild => boost-1.77.0-r1.ebuild} |  1 +
 .../files/boost-1.77-math-deprecated-include.patch | 40 ++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/dev-libs/boost/boost-1.77.0.ebuild 
b/dev-libs/boost/boost-1.77.0-r1.ebuild
similarity index 99%
rename from dev-libs/boost/boost-1.77.0.ebuild
rename to dev-libs/boost/boost-1.77.0-r1.ebuild
index 40748904301..9a715e08895 100644
--- a/dev-libs/boost/boost-1.77.0.ebuild
+++ b/dev-libs/boost/boost-1.77.0-r1.ebuild
@@ -53,6 +53,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.73-boost-mpi-python-PEP-328.patch
        "${FILESDIR}"/${PN}-1.74-CVE-2012-2677.patch
        "${FILESDIR}"/${PN}-1.76-sparc-define.patch
+       "${FILESDIR}"/${PN}-1.77-math-deprecated-include.patch
 )
 
 python_bindings_needed() {

diff --git a/dev-libs/boost/files/boost-1.77-math-deprecated-include.patch 
b/dev-libs/boost/files/boost-1.77-math-deprecated-include.patch
new file mode 100644
index 00000000000..44943243eaa
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.77-math-deprecated-include.patch
@@ -0,0 +1,40 @@
+https://github.com/boostorg/math/commit/720536a08e4e33639869e1b7a99d9ec923409c0b
+https://github.com/boostorg/math/issues/675
+https://github.com/boostorg/math/pull/676
+
+From 720536a08e4e33639869e1b7a99d9ec923409c0b Mon Sep 17 00:00:00 2001
+From: Matt Borland <[email protected]>
+Date: Mon, 23 Aug 2021 17:48:28 +0300
+Subject: [PATCH] Fix for issue 675 (#676)
+
+--- a/boost/math/tools/header_deprecated.hpp
++++ a/boost/math/tools/header_deprecated.hpp
+@@ -6,12 +6,22 @@
+ #ifndef BOOST_MATH_TOOLS_HEADER_DEPRECATED
+ #define BOOST_MATH_TOOLS_HEADER_DEPRECATED
+ 
+-#ifdef _MSC_VER
+-// Expands to "This header is deprecated; use expr instead."
+-#define BOOST_MATH_HEADER_DEPRECATED(expr) __pragma("This header is 
deprecated; use " expr " instead.")
+-#else // GNU, Clang, Intel, IBM, etc.
++#ifndef BOOST_MATH_STANDALONE
++
++#   include <boost/config/header_deprecated.hpp>
++#   define BOOST_MATH_HEADER_DEPRECATED(expr) BOOST_HEADER_DEPRECATED(expr)
++
++#else
++
++#   ifdef _MSC_VER
+ // Expands to "This header is deprecated; use expr instead."
+-#define BOOST_MATH_HEADER_DEPRECATED(expr) _Pragma("This header is 
deprecated; use " expr " instead.")
+-#endif
++#       define BOOST_MATH_HEADER_DEPRECATED(expr) __pragma("This header is 
deprecated; use " expr " instead.")
++#   else // GNU, Clang, Intel, IBM, etc.
++// Expands to "This header is deprecated use expr instead"
++#       define BOOST_MATH_HEADER_DEPRECATED_MESSAGE(expr) _Pragma(#expr)
++#       define BOOST_MATH_HEADER_DEPRECATED(expr) 
BOOST_MATH_HEADER_DEPRECATED_MESSAGE(message "This header is deprecated use " 
expr " instead")
++#   endif
++
++#endif // BOOST_MATH_STANDALONE
+ 
+ #endif // BOOST_MATH_TOOLS_HEADER_DEPRECATED

Reply via email to