Fix the CMake config file for openmpi and mpich

Resolves: RHEL-97588
This commit is contained in:
Patrick Palka 2025-07-08 16:25:41 -04:00
parent d80246e7e5
commit 7d98ba911d

View File

@ -42,7 +42,7 @@ Name: boost
%global real_name boost %global real_name boost
Summary: The free peer-reviewed portable C++ source libraries Summary: The free peer-reviewed portable C++ source libraries
Version: 1.75.0 Version: 1.75.0
Release: 11%{?dist} Release: 12%{?dist}
License: Boost and MIT and Python License: Boost and MIT and Python
# Replace each . with _ in %%{version} # Replace each . with _ in %%{version}
@ -831,9 +831,14 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/ ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/
%endif %endif
# Using 'b2 stage' does not fix the paths in these files, so do it manually
sed -i -e 's|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/.*"|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../../../include"|' ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/*/*-config.cmake
# Remove generic parts of boost that were built for dependencies. # Remove generic parts of boost that were built for dependencies.
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_{python,{w,}serialization}*
rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_numpy*
%{_openmpi_unload} %{_openmpi_unload}
export PATH=/bin${PATH:+:}$PATH export PATH=/bin${PATH:+:}$PATH
@ -857,9 +862,14 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/ ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/
%endif %endif
# Using 'b2 stage' does not fix the paths in these files, so do it manually
sed -i -e 's|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/.*"|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../../../include"|' ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/*/*-config.cmake
# Remove generic parts of boost that were built for dependencies. # Remove generic parts of boost that were built for dependencies.
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_{python,{w,}serialization}*
rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_numpy*
%{_mpich_unload} %{_mpich_unload}
export PATH=/bin${PATH:+:}$PATH export PATH=/bin${PATH:+:}$PATH
@ -1286,6 +1296,9 @@ fi
%{_mandir}/man1/b2.1* %{_mandir}/man1/b2.1*
%changelog %changelog
* Tue Jul 8 2025 Patrick Palka <ppalka@redhat.com> - 1.75.0-12
- Fix the CMake config file for openmpi and mpich (RHEL-97588)
* Tue May 13 2025 Jonathan Wakely <jwakely@redhat.com> - 1.75.0-11 * Tue May 13 2025 Jonathan Wakely <jwakely@redhat.com> - 1.75.0-11
- Add patch for cross-device filesystem::copy_file (RHEL-89888) - Add patch for cross-device filesystem::copy_file (RHEL-89888)