diff --git a/boost-1.85.0-python-numpy-2.patch b/boost-1.85.0-python-numpy-2.patch new file mode 100644 index 0000000000000000000000000000000000000000..e7a7d98b8573a05062fcc5c32772c6d79801516c --- /dev/null +++ b/boost-1.85.0-python-numpy-2.patch @@ -0,0 +1,26 @@ +https://bugs.gentoo.org/932459 +https://github.com/boostorg/python/issues/431 +https://github.com/boostorg/python/pull/432 + +From 33ac06ca59a68266d3d26edf08205d31ddab4a6c Mon Sep 17 00:00:00 2001 +From: Alexis DUBURCQ +Date: Fri, 15 Mar 2024 14:10:16 +0100 +Subject: [PATCH] Support numpy 2.0.0b1 + +--- a/libs/python/src/numpy/dtype.cpp ++++ b/libs/python/src/numpy/dtype.cpp +@@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align) + return python::detail::new_reference(reinterpret_cast(obj)); + } + +-int dtype::get_itemsize() const { return reinterpret_cast(ptr())->elsize;} ++int dtype::get_itemsize() const { ++#if NPY_ABI_VERSION < 0x02000000 ++ return reinterpret_cast(ptr())->elsize; ++#else ++ return PyDataType_ELSIZE(reinterpret_cast(ptr())); ++#endif ++} + + bool equivalent(dtype const & a, dtype const & b) { + // On Windows x64, the behaviour described on diff --git a/boost.spec b/boost.spec index c047ec004c66d9fb11dcd89fc7f5e7239ecedc22..88bf04bdfe9f454395b07936892b362efa99cd44 100644 --- a/boost.spec +++ b/boost.spec @@ -2,7 +2,7 @@ Name: boost Version: 1.83.0 -Release: 6 +Release: 7 Summary: The free peer-reviewed portable C++ source libraries License: BSL-1.0 URL: https://www.boost.org @@ -20,6 +20,8 @@ Patch4: boost-1.81-random-test-Add-missing-includes.patch Patch5: boost-1.81-phoenix-Update-avoid-placeholders-uarg1.10-ODR-violates.patch # https://lists.boost.org/Archives/boost/2020/04/248812.php Patch6: boost-1.73.0-cmakedir.patch +# https://github.com/boostorg/python/pull/432 +Patch7: boost-1.85.0-python-numpy-2.patch Requires: %{name}-atomic%{?_isa} = %{version}-%{release} Requires: %{name}-chrono%{?_isa} = %{version}-%{release} @@ -457,6 +459,9 @@ find libs -name example -exec cp {} boost-example --parents -r \; %{_libdir}/cmake/* %changelog +* Thu Jun 19 2025 Funda Wang - 1.83.0-7 +- fix build with numpy 2 + * Thu Mar 06 2025 mahailiang - 1.83.0-6 - Disable libquadmath dependency for sw_64 mips64el