diff --git a/openmeeg-fix_libmatio1518_compatibility.patch b/openmeeg-fix_libmatio1518_compatibility.patch new file mode 100644 index 0000000..a655972 --- /dev/null +++ b/openmeeg-fix_libmatio1518_compatibility.patch @@ -0,0 +1,39 @@ +From d1ea0263b95c099e348b75171871d35172855649 Mon Sep 17 00:00:00 2001 +From: Theodore Papadopoulo +Date: Mon, 28 Sep 2020 11:11:18 +0200 +Subject: [PATCH] Adapt MatlabIO.H to handle both older and newer version of + matio (up to matio 1.5.18). + +--- + OpenMEEGMaths/include/MatlabIO.H | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/OpenMEEGMaths/include/MatlabIO.H b/OpenMEEGMaths/include/MatlabIO.H +index 554df3d8..e4f4401c 100644 +--- a/OpenMEEGMaths/include/MatlabIO.H ++++ b/OpenMEEGMaths/include/MatlabIO.H +@@ -352,12 +352,19 @@ namespace OpenMEEG { + tank_inverted[std::pair(j,i)] = val; + } + +- const int sz = linop.size(); +- const int num = linop.ncol()+1; + +- double* t = new double[sz]; +- int* ir = new int[sz]; +- int* jc = new int[num]; ++ #if MATIO_VERSION>=1518 ++ typedef mat_uint32_t matio_int_type; ++ #else ++ typedef int matio_int_type; ++ #endif ++ ++ const matio_int_type sz = linop.size(); ++ const matio_int_type num = linop.ncol()+1; ++ matio_int_type* ir = new matio_int_type[sz]; ++ matio_int_type* jc = new matio_int_type[num]; ++ ++ double* t = new double[sz]; + + size_t cnt = 0; + size_t current_col = (size_t)-1; diff --git a/openmeeg.spec b/openmeeg.spec index 040006d..6411ed4 100644 --- a/openmeeg.spec +++ b/openmeeg.spec @@ -40,6 +40,9 @@ Patch1: %{name}-flexiblas_libraries.patch Patch2: %{name}-python_install_destination.patch Patch3: %{name}-bug385.patch +# https://github.com/openmeeg/openmeeg/issues/421 +Patch4: %{name}-fix_libmatio1518_compatibility.patch + BuildRequires: cmake3 BuildRequires: gcc-c++, git, chrpath BuildRequires: gnuplot, wget, graphviz @@ -189,8 +192,6 @@ ctest3 --force-new-ctest-process --parallel %{?_smp_mflags} -E 'openmeeg_python_ %endif %endif -%ldconfig_scriptlets - %files %license LICENSE.txt %{_bindir}/* @@ -219,8 +220,8 @@ ctest3 --force-new-ctest-process --parallel %{?_smp_mflags} -E 'openmeeg_python_ %endif %changelog -* Sun Sep 20 2020 Antonio Trande - 2.4.2-0.9 -- Rebuild for matio-1.5.18 +* Mon Sep 28 2020 Antonio Trande - 2.4.2-0.9 +- Rebuilt and patched for matio-1.5.18 (rhbz#1880819) * Fri Aug 14 2020 Iñaki Úcar - 2.4.2-0.8 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager