diff options
Diffstat (limited to 'dev-libs/boost/files')
3 files changed, 148 insertions, 0 deletions
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...") |
