commit:     3414b1d35d6862ed5a5ad5251a60bc18b2e2be71
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  3 04:24:47 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 04:24:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3414b1d3

dev-libs/boost: fix musl build for 1.78

Closes: https://bugs.gentoo.org/829147
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/boost/boost-1.78.0-r2.ebuild              |  2 ++
 .../boost-1.78.0-interprocess-musl-include.patch   | 25 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/dev-libs/boost/boost-1.78.0-r2.ebuild 
b/dev-libs/boost/boost-1.78.0-r2.ebuild
index a67156cf87e9..53fbaeeddd56 100644
--- a/dev-libs/boost/boost-1.78.0-r2.ebuild
+++ b/dev-libs/boost/boost-1.78.0-r2.ebuild
@@ -53,6 +53,8 @@ PATCHES=(
        # Boost.MPI's __init__.py doesn't work on Py3
        "${FILESDIR}"/${PN}-1.73-boost-mpi-python-PEP-328.patch
        "${FILESDIR}"/${PN}-1.74-CVE-2012-2677.patch
+
+       "${FILESDIR}"/${P}-interprocess-musl-include.patch
 )
 
 python_bindings_needed() {

diff --git a/dev-libs/boost/files/boost-1.78.0-interprocess-musl-include.patch 
b/dev-libs/boost/files/boost-1.78.0-interprocess-musl-include.patch
new file mode 100644
index 000000000000..85d25861f11b
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.78.0-interprocess-musl-include.patch
@@ -0,0 +1,25 @@
+https://github.com/boostorg/interprocess/commit/d002a0d929ecb031843d806c2bda69e013442e13
+https://bugs.gentoo.org/829147
+
+From: Leonardo Neumann <[email protected]>
+Date: Mon, 13 Dec 2021 01:07:20 -0300
+Subject: [PATCH] Fix missing sys/stat.h include on musl-based systems
+
+Boost 1.78.0 fails to build on musl-based systems because musl does
+not include sys/stat.h by default.
+
+Fixes #161 ("Boost compiler error")
+--- a/boost/interprocess/permissions.hpp
++++ b/boost/interprocess/permissions.hpp
+@@ -29,6 +29,10 @@
+ 
+ #include <boost/interprocess/detail/win32_api.hpp>
+ 
++#else
++
++#include <sys/stat.h>
++
+ #endif
+ 
+ #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+

Reply via email to