Fix CMake config files for mpich and openmpi

This commit is contained in:
Laurent Rineau 2022-06-22 15:37:33 +02:00
commit fb71b5f9c9

View file

@ -42,7 +42,7 @@ Name: boost
%global real_name boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.78.0
Release: 4%{?dist}
Release: 5%{?dist}
License: Boost and MIT and Python
# Replace each . with _ in %%{version}
@ -824,6 +824,9 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/
%endif
# Fix CMake config files
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.
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
@ -850,6 +853,9 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/
%endif
# Fix CMake config files
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.
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
@ -1279,6 +1285,9 @@ fi
%{_mandir}/man1/b2.1*
%changelog
* Wed Jun 22 2022 Laurent Rineau <laurent.rineau@cgal.org> - 1.78.0-5
- Re-add the CMake config file provided by Boost
* Tue Jun 21 2022 Jonathan Wakely <jwakely@redhat.com> - 1.78.0-4
- Remove old Obsoletes tags