From d2ce0849c0fa145d8fcc4ac8df8e44afab1ca1c6 Mon Sep 17 00:00:00 2001 From: Liu Zixian Date: Thu, 3 Feb 2022 21:16:02 +0800 Subject: [PATCH] fix build warnings (cherry picked from commit 7f77186e70fa6e289c51c034e9ce6895a7229a7c) --- ...t-1.78-python-Update-call_method-hpp.patch | 24 +++++++++++++++++++ boost.spec | 14 ++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 boost-1.78-python-Update-call_method-hpp.patch diff --git a/boost-1.78-python-Update-call_method-hpp.patch b/boost-1.78-python-Update-call_method-hpp.patch new file mode 100644 index 0000000..39cb962 --- /dev/null +++ b/boost-1.78-python-Update-call_method-hpp.patch @@ -0,0 +1,24 @@ +From 1dc6d74f2d673b7b82dd02ff8cdaf04b60fb5ff8 Mon Sep 17 00:00:00 2001 +From: Denis Arnaud +Date: Sun, 15 Aug 2021 17:05:31 +0200 +Subject: [PATCH] Update call_method.hpp + +Was missing from https://github.com/boostorg/python/pull/320 +I've tested it on one of my projects with (that patch on) Boost.Python/Boost 1.76.0 and it works well. Without that patch, there is a deprecation error. +--- + boost/python/call_method.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/python/call_method.hpp b/boost/python/call_method.hpp +index 424077eab4..2f360791d7 100644 +--- a/boost/python/call_method.hpp ++++ b/boost/python/call_method.hpp +@@ -59,7 +59,7 @@ call_method(PyObject* self, char const* name + ) + { + PyObject* const result = +- PyEval_CallMethod( ++ PyObject_CallMethod( + self + , const_cast(name) + , const_cast("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")") diff --git a/boost.spec b/boost.spec index afba1cd..02090c5 100644 --- a/boost.spec +++ b/boost.spec @@ -2,13 +2,13 @@ Name: boost Version: 1.78.0 -Release: 9 +Release: 10 Summary: The free peer-reviewed portable C++ source libraries License: Boost Software License 1.0 URL: http://www.boost.org Source0: https://boostorg.jfrog.io/ui/native/main/release/%{version}/source/%{name}_%{version_enc}.tar.gz -# All of the following patches have been merged into boost develop branch +# These following patches have been merged into boost develop branch # Remove them at the next release # https://github.com/boostorg/pool/pull/42 Patch0: boost-1.78-pool-fix-integer-overflows-in-pool-ordered_malloc.patch @@ -20,6 +20,9 @@ Patch2: boost-1.77-locale-remove-linking-with-boost-system.patch Patch3: boost-1.77-type_erasure-remove-boost-system-linkage.patch # https://github.com/bfgroup/b2/pull/113 Patch4: boost-1.78-build-Don-t-skip-install-targets-if-there-s-build-no-in-ureqs.patch +# These patches have not been merged yet. +# https://github.com/boostorg/python/pull/320 +Patch5: boost-1.78-python-Update-call_method-hpp.patch Requires: %{name}-atomic%{?_isa} = %{version}-%{release} Requires: %{name}-chrono%{?_isa} = %{version}-%{release} @@ -281,7 +284,8 @@ as that on the Boost web page (http://www.boost.org/doc/libs/%{version_enc}). %define opt_feature release debug-symbols=on pch=off %define opt_libs --without-mpi --without-graph_parallel %define b2_options %{opt_build} %{opt_feature} %{opt_libs} -./b2 %{b2_options} cxxflags="$RPM_OPT_FLAGS" +%define boost_macros BOOST_NO_AUTO_PTR +./b2 %{b2_options} cxxflags="$RPM_OPT_FLAGS" define=%{boost_macros} %check : @@ -434,6 +438,10 @@ find . -name example -exec cp {} boost-example --parents -r \; %{_libdir}/*.a %changelog +* Thu Feb 03 2022 Liu Zixian - 1.78.0-10 +- disable auto_ptr which is warned by -Wdeprecated-declarations +- Replaced deprecated python API + * Sat Jan 29 2022 Liu Zixian - 1.78.0-9 - simplify building scripts -- Gitee