summaryrefslogtreecommitdiff
path: root/dev-libs/boost
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/boost')
-rw-r--r--dev-libs/boost/boost-1.88.0-r1.ebuild15
-rw-r--r--dev-libs/boost/boost-1.89.0.ebuild19
-rw-r--r--dev-libs/boost/files/boost-1.89.0-dll-no-lto.patch16
-rw-r--r--dev-libs/boost/files/boost-1.89.0-python-exclude-broken-tests.patch28
-rw-r--r--dev-libs/boost/files/boost-1.89.0-python-pickle.patch104
5 files changed, 173 insertions, 9 deletions
diff --git a/dev-libs/boost/boost-1.88.0-r1.ebuild b/dev-libs/boost/boost-1.88.0-r1.ebuild
index 0076cdfdb2ba..8e6519ff5c30 100644
--- a/dev-libs/boost/boost-1.88.0-r1.ebuild
+++ b/dev-libs/boost/boost-1.88.0-r1.ebuild
@@ -9,7 +9,7 @@ EAPI=8
# (e.g. https://www.boost.org/users/history/version_1_83_0.html)
# Note that the latter may sometimes feature patches not on the former too.
-PYTHON_COMPAT=( python3_{11..13} )
+PYTHON_COMPAT=( python3_{11..14} )
inherit dot-a edo flag-o-matic multiprocessing python-r1 toolchain-funcs multilib-minimal
@@ -57,6 +57,10 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.88.0-range-any_iterator.patch
"${FILESDIR}"/${PN}-1.88.0-system-crashing-test.patch
"${FILESDIR}"/${PN}-1.88.0-yap-cstdint.patch
+ # https://github.com/boostorg/dll/issues/108
+ "${FILESDIR}"/${PN}-1.89.0-dll-no-lto.patch
+ "${FILESDIR}"/${PN}-1.89.0-python-exclude-broken-tests.patch
+ "${FILESDIR}"/${PN}-1.89.0-python-pickle.patch
)
create_user-config.jam() {
@@ -148,7 +152,12 @@ src_configure() {
# https://bugs.gentoo.org/943975
# https://github.com/boostorg/quickbook/issues/27
# https://github.com/boostorg/spirit/issues/800
- use tools && filter-lto
+ #
+ # Tests also fail:
+ # https://bugs.gentoo.org/956660
+ # https://github.com/boostorg/smart_ptr/issues/121
+ # https://github.com/boostorg/thread/issues/415
+ filter-lto
lto-guarantee-fat
@@ -276,8 +285,6 @@ multilib_src_test() {
"phoenix"
# Unable to find file or target named (yes, really)
"predef"
- # AttributeError: property '<unnamed Boost.Python function>' of 'X' object has no setter
- "python"
# vec_access.hpp:95:223: error: static assertion failed: Boost QVM static assertion failure
"qvm"
# regex_timer.cpp:19: ../../../boost/timer.hpp:21:3: error: #error This header is
diff --git a/dev-libs/boost/boost-1.89.0.ebuild b/dev-libs/boost/boost-1.89.0.ebuild
index aa056e2388ec..a0daf51136c3 100644
--- a/dev-libs/boost/boost-1.89.0.ebuild
+++ b/dev-libs/boost/boost-1.89.0.ebuild
@@ -55,8 +55,12 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.88.0-range-any_iterator.patch
"${FILESDIR}"/${PN}-1.88.0-system-crashing-test.patch
"${FILESDIR}"/${PN}-1.88.0-yap-cstdint.patch
+ # https://github.com/boostorg/dll/issues/108
+ "${FILESDIR}"/${PN}-1.89.0-dll-no-lto.patch
"${FILESDIR}"/${PN}-1.89.0-graph-remove-system-dependency.patch
"${FILESDIR}"/${PN}-1.89.0-predef-include-path.patch
+ "${FILESDIR}"/${PN}-1.89.0-python-exclude-broken-tests.patch
+ "${FILESDIR}"/${PN}-1.89.0-python-pickle.patch
"${FILESDIR}"/${PN}-1.89.0-unordered-no-tbb.patch
)
@@ -149,7 +153,12 @@ src_configure() {
# https://bugs.gentoo.org/943975
# https://github.com/boostorg/quickbook/issues/27
# https://github.com/boostorg/spirit/issues/800
- use tools && filter-lto
+ #
+ # Tests also fail:
+ # https://bugs.gentoo.org/956660
+ # https://github.com/boostorg/smart_ptr/issues/121
+ # https://github.com/boostorg/thread/issues/415
+ filter-lto
lto-guarantee-fat
@@ -236,13 +245,13 @@ multilib_src_test() {
"config"
# undefined reference to `boost::math::concepts::real_concept boost::math::bernoulli_b2n<boost::math::concepts::real_concept>(int)
"math"
- # PyObject* boost::parameter::python::aux::unspecified_type():
- # /usr/include/python3.13/object.h:339:30: error: lvalue required as left operand of assignment
+ # In function 'PyObject* boost::parameter::python::aux::unspecified_type()':
+ # /usr/include/python3.13/object.h:339:30: error: lvalue required as left operand of assignment
+ # #define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob))
+ # ~~~~~~~^~~~~~~~~~~~~~~~~~~~
"parameter_python"
# scope/lambda_tests22.cpp(27): test 'x == 1' failed in function 'int main()'
"phoenix"
- # AttributeError: property '<unnamed Boost.Python function>' of 'X' object has no setter
- "python"
# vec_access.hpp:95:223: error: static assertion failed: Boost QVM static assertion failure
"qvm"
# Processing file ../boost_1_89_0/libs/regex/example/../include/boost/regex/v5/regex_iterator.hpp
diff --git a/dev-libs/boost/files/boost-1.89.0-dll-no-lto.patch b/dev-libs/boost/files/boost-1.89.0-dll-no-lto.patch
new file mode 100644
index 000000000000..cdbcf7606f34
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.89.0-dll-no-lto.patch
@@ -0,0 +1,16 @@
+Unconditionally disable LTO in case it's injected from the outside.
+LTO breaks the test as some symbols and sections are gone/rearranged.
+
+https://github.com/boostorg/dll/issues/108
+
+--- a/libs/dll/test/Jamfile.v2
++++ a/libs/dll/test/Jamfile.v2
+@@ -36,7 +36,7 @@ project
+ [ requires cxx11_static_assert ]
+ # linux
+ <target-os>linux:<linkflags>"-ldl"
+- <toolset>gcc:<cxxflags>"-Wall -Wextra -pedantic -Wno-long-long"
++ <toolset>gcc:<cxxflags>"-Wall -Wextra -pedantic -Wno-long-long -fno-lto"
+
+ # others
+ <local-visibility>hidden
diff --git a/dev-libs/boost/files/boost-1.89.0-python-exclude-broken-tests.patch b/dev-libs/boost/files/boost-1.89.0-python-exclude-broken-tests.patch
new file mode 100644
index 000000000000..98321d8efd8b
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.89.0-python-exclude-broken-tests.patch
@@ -0,0 +1,28 @@
+Exclude tests that are either obsolete or simply don't work.
+The upcast.cpp test error message looks suspiciously like the
+parameter_python build failure; probably due to a newer Python
+Object API break.
+
+--- a/libs/python/test/Jamfile
++++ b/libs/python/test/Jamfile
+@@ -111,11 +111,6 @@ bpl-test crossmod_exception
+ [ bpl-test andreas_beyer ]
+ [ bpl-test wrapper_held_type ]
+
+-[ bpl-test polymorphism2_auto_ptr
+- : polymorphism2_auto_ptr.py polymorphism2.py polymorphism2_auto_ptr.cpp
+- : [ requires auto_ptr ]
+-]
+-
+ [ bpl-test polymorphism ]
+ [ bpl-test polymorphism2 ]
+
+@@ -239,8 +234,6 @@ bpl-test crossmod_opaque
+ [ py-compile object_manager.cpp ]
+ [ py-compile copy_ctor_mutates_rhs.cpp ]
+
+-[ py-run upcast.cpp ]
+-
+ [ py-compile select_holder.cpp ]
+
+ [ run select_from_python_test.cpp ../src/converter/type_id.cpp
diff --git a/dev-libs/boost/files/boost-1.89.0-python-pickle.patch b/dev-libs/boost/files/boost-1.89.0-python-pickle.patch
new file mode 100644
index 000000000000..dab13c439c73
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.89.0-python-pickle.patch
@@ -0,0 +1,104 @@
+https://github.com/boostorg/python/pull/482
+
+From: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
+Date: Mon, 31 Mar 2025 19:49:28 +0900
+Subject: [PATCH] fix(test.pickle): fix for change in the return value of object.__reduce__()
+
+https://docs.python.org/3.11/library/pickle.html#object.__reduce__
+
+fix #461
+---
+ test/pickle1.py | 26 ++++++++++++++++++++++++--
+ test/pickle4.py | 26 ++++++++++++++++++++++++--
+ 2 files changed, 48 insertions(+), 4 deletions(-)
+
+diff --git a/libs/python/test/pickle1.py b/libs/python/test/pickle1.py
+index b8f4efd9b0..0df59a4b3a 100644
+--- a/libs/python/test/pickle1.py
++++ b/libs/python/test/pickle1.py
+@@ -9,8 +9,10 @@
+ 1
+ >>> pickle1_ext.world.__name__
+ 'world'
+- >>> pickle1_ext.world('Hello').__reduce__()
++ >>> pickle1_ext.world('Hello').__reduce__() # doctest: +PY310
+ (<class 'pickle1_ext.world'>, ('Hello',))
++ >>> pickle1_ext.world('Hello').__reduce__() # doctest: +PY311
++ (<class 'pickle1_ext.world'>, ('Hello',), None)
+ >>> wd = pickle1_ext.world('California')
+ >>> pstr = pickle.dumps(wd)
+ >>> wl = pickle.loads(pstr)
+@@ -31,7 +33,27 @@ def run(args = None):
+
+ if args is not None:
+ sys.argv = args
+- return doctest.testmod(sys.modules.get(__name__))
++
++ # > https://docs.python.org/3.11/library/pickle.html#object.__reduce__
++ # object.__reduce__() returns
++ # - python 3.10 or prior: a 2-element tuple
++ # - python 3.11 or later: a 3-element tuple (object's state added)
++ PY310 = doctest.register_optionflag("PY310")
++ PY311 = doctest.register_optionflag("PY311")
++
++ class ConditionalChecker(doctest.OutputChecker):
++ def check_output(self, want, got, optionflags):
++ if (optionflags & PY311) and (sys.version_info[:2] < (3, 11)):
++ return True
++ if (optionflags & PY310) and (sys.version_info[:2] >= (3, 11)):
++ return True
++ return doctest.OutputChecker.check_output(self, want, got, optionflags)
++
++ runner = doctest.DocTestRunner(ConditionalChecker())
++ for test in doctest.DocTestFinder().find(sys.modules.get(__name__)):
++ runner.run(test)
++
++ return doctest.TestResults(runner.failures, runner.tries)
+
+ if __name__ == '__main__':
+ print("running...")
+diff --git a/libs/python/test/pickle4.py b/libs/python/test/pickle4.py
+index be813bbb13..3cf4d7241f 100644
+--- a/libs/python/test/pickle4.py
++++ b/libs/python/test/pickle4.py
+@@ -12,8 +12,10 @@
+ 1
+ >>> pickle4_ext.world.__name__
+ 'world'
+- >>> pickle4_ext.world('Hello').__reduce__()
++ >>> pickle4_ext.world('Hello').__reduce__() # doctest: +PY310
+ (<class 'pickle4_ext.world'>, ('Hello',))
++ >>> pickle4_ext.world('Hello').__reduce__() # doctest: +PY311
++ (<class 'pickle4_ext.world'>, ('Hello',), None)
+ >>> wd = pickle4_ext.world('California')
+ >>> pstr = pickle.dumps(wd)
+ >>> wl = pickle.loads(pstr)
+@@ -29,7 +31,27 @@ def run(args = None):
+
+ if args is not None:
+ sys.argv = args
+- return doctest.testmod(sys.modules.get(__name__))
++
++ # > https://docs.python.org/3.11/library/pickle.html#object.__reduce__
++ # object.__reduce__() returns
++ # - python 3.10 or prior: a 2-element tuple
++ # - python 3.11 or later: a 3-element tuple (object's state added)
++ PY310 = doctest.register_optionflag("PY310")
++ PY311 = doctest.register_optionflag("PY311")
++
++ class ConditionalChecker(doctest.OutputChecker):
++ def check_output(self, want, got, optionflags):
++ if (optionflags & PY311) and (sys.version_info[:2] < (3, 11)):
++ return True
++ if (optionflags & PY310) and (sys.version_info[:2] >= (3, 11)):
++ return True
++ return doctest.OutputChecker.check_output(self, want, got, optionflags)
++
++ runner = doctest.DocTestRunner(ConditionalChecker())
++ for test in doctest.DocTestFinder().find(sys.modules.get(__name__)):
++ runner.run(test)
++
++ return doctest.TestResults(runner.failures, runner.tries)
+
+ if __name__ == '__main__':
+ print("running...")