diff --git a/0001-stl-tuple-change-uarg-N-to-internal-linkage.patch b/0001-stl-tuple-change-uarg-N-to-internal-linkage.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f500a3a268c218328aadff3bdac99a4c28fee9d --- /dev/null +++ b/0001-stl-tuple-change-uarg-N-to-internal-linkage.patch @@ -0,0 +1,34 @@ +From 99b3bdf601dc2d69e793be070f63772e42e89cb3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= + +Date: Tue, 29 Nov 2022 07:34:17 +0700 +Subject: [PATCH] stl/tuple: change uarg##N to internal linkage + +8b6a9c2 (std::tuple support (Resolving #103) (#104), 2021-03-11) put +uarg##N in all translation units, which includes +boost/phoenix/stl/tuple.hpp or boost/phoenix/stl.hp, with external +linkage. Thus, we'll run into below error: + +> multiple definition of `boost::phoenix::placeholders::uarg1' + +Change it to internal linkage. +--- + boost/phoenix/stl/tuple.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/boost/phoenix/stl/tuple.hpp b/include/boost/phoenix/stl/tuple.hpp +index a83014a..d04ad16 100644 +--- a/boost/phoenix/stl/tuple.hpp ++++ b/boost/phoenix/stl/tuple.hpp +@@ -110,7 +110,7 @@ namespace boost { namespace phoenix { + namespace placeholders { + #define BOOST_PP_LOCAL_LIMITS (1, BOOST_PHOENIX_ARG_LIMIT) + #define BOOST_PP_LOCAL_MACRO(N) \ +- auto uarg##N = \ ++ const auto uarg##N = \ + boost::phoenix::get_<(N)-1>(boost::phoenix::placeholders::arg1); + #include BOOST_PP_LOCAL_ITERATE() + } +-- +2.39.0 + diff --git a/boost-1.57.0-python-libpython_dep.patch b/boost-1.57.0-python-libpython_dep.patch new file mode 100644 index 0000000000000000000000000000000000000000..57bfc26774eafc55894de34928b14786ed1fa389 --- /dev/null +++ b/boost-1.57.0-python-libpython_dep.patch @@ -0,0 +1,13 @@ +Index: boost_1_57_0/tools/build/src/tools/python.jam +=================================================================== +--- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406) ++++ boost_1_57_0/tools/build/src/tools/python.jam (working copy) +@@ -994,7 +994,7 @@ + else + { + alias python_for_extensions +- : ++ : python + : $(target-requirements) + : + : $(usage-requirements) diff --git a/boost-1.72.0-mpi-python-build.patch b/boost-1.72.0-mpi-python-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..f977b1321cb3d03534371d600b9e8dbdef1263db --- /dev/null +++ b/boost-1.72.0-mpi-python-build.patch @@ -0,0 +1,13 @@ +diff -up ./tools/build/src/tools/python.jam.orig ./tools/build/src/tools/python.jam +--- ./tools/build/src/tools/python.jam.orig 2020-01-26 17:46:41.999427777 +0200 ++++ ./tools/build/src/tools/python.jam 2020-01-26 17:50:55.406745619 +0200 +@@ -1001,7 +1001,8 @@ local rule configure ( version ? : cmd-o + # linux). + : $(usage-requirements) + $(set-PYTHONPATH) +- $(libraries) $(dll-path) python.lib ++ # $(libraries) $(dll-path) python.lib ++ $(libraries) python.lib + ; + } + diff --git a/boost-1.73.0-cmakedir.patch b/boost-1.73.0-cmakedir.patch new file mode 100644 index 0000000000000000000000000000000000000000..e47728f52128f7b78eb3fdf5fcda4920416d48f3 --- /dev/null +++ b/boost-1.73.0-cmakedir.patch @@ -0,0 +1,28 @@ +--- boost_1_73_0/tools/boost_install/boost-install.jam~ 2020-04-24 20:21:50.330267122 +0100 ++++ boost_1_73_0/tools/boost_install/boost-install.jam 2020-04-24 20:22:16.818360540 +0100 +@@ -652,25 +652,6 @@ + "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)" + : true ; + +- if [ path.is-rooted $(cmakedir) ] +- { +- local cmakedir-native = [ path-native-fwd $(cmakedir) ] ; +- +- print.text +- +- "" +- "# If the computed and the original directories are symlink-equivalent, use original" +- "if(EXISTS \"$(cmakedir-native)\")" +- " get_filename_component(_BOOST_CMAKEDIR_ORIGINAL \"$(cmakedir-native)\" REALPATH)" +- " if(_BOOST_CMAKEDIR STREQUAL _BOOST_CMAKEDIR_ORIGINAL)" +- " set(_BOOST_CMAKEDIR \"$(cmakedir-native)\")" +- " endif()" +- " unset(_BOOST_CMAKEDIR_ORIGINAL)" +- "endif()" +- "" +- : true ; +- } +- + get-dir "_BOOST_INCLUDEDIR" : $(includedir) ; + + if $(library-type) = INTERFACE diff --git a/boost-1.74.0-linking.patch b/boost-1.74.0-linking.patch new file mode 100644 index 0000000000000000000000000000000000000000..e4012db10db9bd37fed0da7c718e8503d61649e0 --- /dev/null +++ b/boost-1.74.0-linking.patch @@ -0,0 +1,21 @@ +diff -up ./tools/build/src/tools/gcc.jam.orig ./tools/build/src/tools/gcc.jam +--- ./tools/build/src/tools/gcc.jam.orig 2020-01-24 22:59:03.119054312 +0200 ++++ ./tools/build/src/tools/gcc.jam 2020-01-24 23:01:07.875695346 +0200 +@@ -1093,7 +1093,7 @@ rule link ( targets * : sources * : prop + + actions link bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) + } + + actions link.dll bind LIBRARIES +@@ -1106,7 +1106,7 @@ rule link.dll ( targets * : sources * : + + actions link.dll bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) + } + + ### diff --git a/boost-1.76.0-random-test.patch b/boost-1.76.0-random-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..5ce747779fd417b190f4853ef802d555d4d31d10 --- /dev/null +++ b/boost-1.76.0-random-test.patch @@ -0,0 +1,34 @@ +From c3ada7a1b2b54f4b27585f72308a76984f8489b4 Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Tue, 16 Mar 2021 10:47:16 +0000 +Subject: [PATCH] Add missing #includes. + +--- + test/multiprecision_float_test.cpp | 1 + + test/multiprecision_int_test.cpp | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/test/multiprecision_float_test.cpp b/test/multiprecision_float_test.cpp +index 904c59d8f..bc2a9364d 100644 +--- boost_1_76_0/libs/random/test/multiprecision_float_test.cpp ++++ boost_1_76_0/libs/random/test/multiprecision_float_test.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + + +diff --git a/test/multiprecision_int_test.cpp b/test/multiprecision_int_test.cpp +index 577e52aff..41ec229b5 100644 +--- boost_1_76_0/libs/random/test/multiprecision_int_test.cpp ++++ boost_1_76_0/libs/random/test/multiprecision_int_test.cpp +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + typedef boost::mpl::list < diff --git a/boost-1.78.0-b2-build-flags.patch b/boost-1.78.0-b2-build-flags.patch new file mode 100644 index 0000000000000000000000000000000000000000..512f1095e540fccdd0430ddfc923d58114214560 --- /dev/null +++ b/boost-1.78.0-b2-build-flags.patch @@ -0,0 +1,25 @@ +From 1ded9b9c219542442b3c10af815e5413a2a89c75 Mon Sep 17 00:00:00 2001 +From: Thomas W Rodgers +Date: Tue, 1 Mar 2022 10:03:34 -0800 +Subject: [PATCH] Adjust b2 build flags for Fedora Packaging + +--- + src/engine/build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh +index f1ad08cb..ab58deba 100755 +--- a/tools/build/src/engine/build.sh ++++ b/tools/build/src/engine/build.sh +@@ -323,7 +323,7 @@ case "${B2_TOOLSET}" in + + gcc|gcc-*) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} +- B2_CXXFLAGS_RELEASE="-O2 -s" ++ B2_CXXFLAGS_RELEASE="${RPM_OPT_FLAGS} ${RPM_LD_FLAGS}" + B2_CXXFLAGS_DEBUG="-O0 -g" + ;; + +-- +2.35.1 + diff --git a/boost-1.78.0-no-rpath.patch b/boost-1.78.0-no-rpath.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c519cd5d0dd833f9eadec849048606493cc9aa2 --- /dev/null +++ b/boost-1.78.0-no-rpath.patch @@ -0,0 +1,20 @@ +--- boost_1_66_0/tools/build/src/tools/gcc.jam~ 2018-01-19 13:23:45.361330881 +0000 ++++ boost_1_66_0/tools/build/src/tools/gcc.jam 2018-01-19 13:23:45.362330880 +0000 +@@ -1191,7 +1191,7 @@ rule link ( targets * : sources * : prop + + actions link bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) + } + + actions link.dll bind LIBRARIES +@@ -1204,7 +1204,7 @@ rule link.dll ( targets * : sources * : + + actions link.dll bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) + } + + ### diff --git a/boost-1.81.0-build-optflags.patch b/boost-1.81.0-build-optflags.patch new file mode 100644 index 0000000000000000000000000000000000000000..f83729f275fec25bd9da4fb5ee350532961a536c --- /dev/null +++ b/boost-1.81.0-build-optflags.patch @@ -0,0 +1,59 @@ +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index d2e608a22..8920e96ba 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -511,7 +511,7 @@ rule compile.fortran ( targets * : sources * : properties * ) + + actions compile.c++ bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -include"$(PCH_FILE:S=)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" -c -o "$(<:W)" "$(>:W)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -include"$(PCH_FILE:S=)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" -c -o "$(<:W)" "$(>:W)" + } + + actions compile.c bind PCH_FILE +@@ -521,7 +521,7 @@ actions compile.c bind PCH_FILE + + actions compile.c++.preprocess bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -include"$(PCH_FILE:S=)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" "$(>:W)" -E >"$(<:W)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -include"$(PCH_FILE:S=)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" "$(>:W)" -E >"$(<:W)" + } + + actions compile.c.preprocess bind PCH_FILE +@@ -624,21 +624,21 @@ actions compile.c.pch + ### + + # Declare flags and action for compilation. +-toolset.flags gcc.compile OPTIONS off : -O0 ; +-toolset.flags gcc.compile OPTIONS speed : -O3 ; +-toolset.flags gcc.compile OPTIONS space : -Os ; +-toolset.flags gcc.compile OPTIONS minimal : -O1 ; +-toolset.flags gcc.compile OPTIONS debug : -Og ; +- +-toolset.flags gcc.compile OPTIONS off : -fno-inline ; +-toolset.flags gcc.compile OPTIONS on : -Wno-inline ; +-toolset.flags gcc.compile OPTIONS full : -finline-functions -Wno-inline ; +- +-toolset.flags gcc.compile OPTIONS off : -w ; +-toolset.flags gcc.compile OPTIONS on : -Wall ; +-toolset.flags gcc.compile OPTIONS all : -Wall ; +-toolset.flags gcc.compile OPTIONS extra : -Wall -Wextra ; +-toolset.flags gcc.compile OPTIONS pedantic : -Wall -Wextra -pedantic ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS speed : ; ++toolset.flags gcc.compile OPTIONS space : ; ++toolset.flags gcc.compile OPTIONS minimal : ; ++toolset.flags gcc.compile OPTIONS debug : ; ++ ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS full : ; ++ ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS all : ; ++toolset.flags gcc.compile OPTIONS extra : ; ++toolset.flags gcc.compile OPTIONS pedantic : ; + toolset.flags gcc.compile OPTIONS on : -Werror ; + + toolset.flags gcc.compile OPTIONS on : -g ; diff --git a/boost-1.81.0-pool-test_linking.patch b/boost-1.81.0-pool-test_linking.patch new file mode 100644 index 0000000000000000000000000000000000000000..d06a676ef9afb108efae37238f3802d2b2dcaa38 --- /dev/null +++ b/boost-1.81.0-pool-test_linking.patch @@ -0,0 +1,34 @@ +diff --git a/libs/pool/test/Jamfile.v2 b/libs/pool/test/Jamfile.v2 +index 3ec77eaac..51ce406d2 100644 +--- a/libs/pool/test/Jamfile.v2 ++++ b/libs/pool/test/Jamfile.v2 +@@ -23,19 +23,19 @@ import os ; + import testing ; + + test-suite pool : +- [ run test_simple_seg_storage.cpp : : : msvc:-wd4267 ] +- [ run test_pool_alloc.cpp ] +- [ run pool_msvc_compiler_bug_test.cpp : : : msvc:-wd4512 ] +- [ run test_msvc_mem_leak_detect.cpp ] +- [ run test_bug_3349.cpp ] +- [ run test_bug_4960.cpp ] ++ [ run test_simple_seg_storage.cpp : : : msvc:-wd4267 /boost/system//boost_system ] ++ [ run test_pool_alloc.cpp : : : /boost/system//boost_system ] ++ [ run pool_msvc_compiler_bug_test.cpp : : : msvc:-wd4512 /boost/system//boost_system ] ++ [ run test_msvc_mem_leak_detect.cpp : : : /boost/system//boost_system ] ++ [ run test_bug_3349.cpp : : : /boost/system//boost_system ] ++ [ run test_bug_4960.cpp : : : /boost/system//boost_system ] + [ run test_bug_1252.cpp : : : + clang:-Wno-c++11-long-long + gcc:-Wno-long-long +- pathscale:-Wno-long-long ] +- [ run test_bug_2696.cpp ] +- [ run test_bug_5526.cpp ] +- [ run test_bug_6701.cpp ] ++ pathscale:-Wno-long-long /boost/system//boost_system ] ++ [ run test_bug_2696.cpp : : : /boost/system//boost_system ] ++ [ run test_bug_5526.cpp : : : /boost/system//boost_system ] ++ [ run test_bug_6701.cpp : : : /boost/system//boost_system ] + [ run test_threading.cpp : : : multi /boost/thread//boost_thread ] + [ compile test_poisoned_macros.cpp ] + ; diff --git a/boost.spec b/boost.spec index c96ed5dfeb197227bfffffb1dd31c277d6fe60f3..ecab5c7bd1fcadd06bebf1b6acda87b5f183c3ff 100644 --- a/boost.spec +++ b/boost.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global boost_docdir __tmp_docdir %global boost_examplesdir __tmp_examplesdir @@ -49,6 +49,31 @@ Source1: libboost_thread.so # Add a manual page for b2, based on the online documentation: # http://www.boost.org/boost-build2/doc/html/bbv2/overview.html Source2: b2.1 + +# https://bugzilla.redhat.com/show_bug.cgi?id=1541035 +Patch111: boost-1.81.0-build-optflags.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1318383 +Patch106: boost-1.78.0-no-rpath.patch +# https://lists.boost.org/Archives/boost/2020/04/248812.php +Patch88: boost-1.73.0-cmakedir.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1541035 +Patch107: boost-1.78.0-b2-build-flags.patch +# https://github.com/boostorg/random/issues/82 +Patch102: boost-1.76.0-random-test.patch + +# https://svn.boost.org/trac/boost/ticket/9038 +Patch1051: boost-1.81.0-pool-test_linking.patch +# Fix library overlinking +Patch1201: boost-1.74.0-linking.patch +# Fix linking with py3 +Patch1202: boost-1.57.0-python-libpython_dep.patch +# Hack to fix mpi build +Patch1203: boost-1.72.0-mpi-python-build.patch +# Fixes freeorion build and maybe some more +# https://github.com/boostorg/phoenix/issues/111 +# https://github.com/boostorg/phoenix/pull/112 +Patch1204: 0001-stl-tuple-change-uarg-N-to-internal-linkage.patch + %global sonamever %{version} # boost is an "umbrella" package that pulls in all boost shared library @@ -636,8 +661,8 @@ PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags) # There are many strict aliasing warnings, and it's not feasible to go # through them all at this time. # There are also lots of noisy but harmless unused local typedef warnings. -export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-deprecated-declarations" -export RPM_LD_FLAGS +export RPM_OPT_FLAGS="%{build_cxxflags} -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-deprecated-declarations" +export RPM_LD_FLAGS="%{build_ldflags}" cat > ./tools/build/src/user-config.jam << "EOF" import os ; @@ -1268,6 +1293,9 @@ fi %{_mandir}/man1/b2.1* %changelog +* Thu Mar 02 2023 Funda Wang - 1.81.0-2 +- Add patches from various distros + * Fri Dec 30 2022 Funda Wang - 1.81.0-1 - New version 1.81.0