Fix mpi build for that great cmake macro update

This commit is contained in:
Dmitrij S. Kryzhevich 2020-07-30 11:34:39 +07:00
parent 7705ffac66
commit 149ebf7aae

View File

@ -19,7 +19,7 @@
Name: mathgl
Version: 2.4.4
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Cross-platform library for making high-quality scientific graphics
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
Summary(ru): Библиотека для осуществления высококачественной визуализации данных
@ -391,19 +391,17 @@ BUILD_MPI="-Denable-mpi=off \
# Disable SMP build
%define buildcommon() \
mkdir -p %{_target_platform}_$MPI_COMPILER_NAME; \
pushd %{_target_platform}_$MPI_COMPILER_NAME; \
%cmake \\\
-DMathGL_INSTALL_CMAKE_DIR=%{_libdir}/cmake/mathgl \\\
-DMathGL_INSTALL_LIB_DIR=%{_libdir} \\\
-Denable-all=on \\\
$BUILD_MPI \\\
..; \
popd; \
make -C %{_target_platform}_$MPI_COMPILER_NAME
%{cmake_build}
# serial
MPI_COMPILER_NAME=serial %building_serial
%global _vpath_builddir %{_target_platform}_serial
%building_serial
# MPI vars
export CC=mpicc
@ -412,14 +410,16 @@ export CXX=mpicxx
%if 0%{?with_openmpi}
# OpenMPI
%{_openmpi_load}
MPI_COMPILER_NAME=openmpi %building
%global _vpath_builddir %{_target_platform}_openmpi
%building
%{_openmpi_unload}
%endif
%if 0%{?with_mpich2}
# MPICH2
%{_mpich_load}
MPI_COMPILER_NAME=mpich %building
%global _vpath_builddir %{_target_platform}_mpich
%building
%{_mpich_unload}
%endif
@ -436,7 +436,8 @@ rm -f %{buildroot}%{_libdir}/$MPI_COMPILER_NAME/lib/*.a; \
rm -r %{buildroot}%{_libdir}/$MPI_COMPILER_NAME/usr
# Serial
make install DESTDIR=%{buildroot} -C %{_target_platform}_serial INSTALL="install -p"
%global _vpath_builddir %{_target_platform}_serial
%{cmake_install}
%if 0%{?with_octave}
rm -f %{buildroot}%{_datadir}/%{name}/mathgl.tar.gz
mkdir -p %{mgl_octarch_dir}
@ -449,9 +450,11 @@ rm -f %{mgl_octarch_dir}/%{mgl_octarch_name}/%{octpkg}.tar.gz
%find_lang %{name}
%find_lang udav --with-qt
# No that modern cmake_install macros for mpi install.
%if 0%{?with_openmpi}
# OpenMPI
%{_openmpi_load}
%global _vpath_builddir %{_target_platform}_openmpi
MPI_COMPILER_NAME=openmpi %installing
%{_openmpi_unload}
%endif
@ -459,13 +462,13 @@ MPI_COMPILER_NAME=openmpi %installing
%if 0%{?with_mpich2}
# MPICH
%{_mpich_load}
%global _vpath_builddir %{_target_platform}_mpich
MPI_COMPILER_NAME=mpich %installing
%{_mpich_unload}
%endif
#Remove symlink to .so file in python dir. Let python find libs normally
# not needed now?
#unlink %{buildroot}/%{python_sitelib}/_mathgl.so
#unlink %{buildroot}/%{python3_sitelib}/_mathgl.so
#Remove static libraries generated by cmake
@ -628,6 +631,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%endif
%changelog
* Thu Jul 30 2020 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.4.4-7
- Fix mpi build for that great cmake macro update.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild