File mingw64-mumps.spec of Package mingw64-mumps
#
# spec file for package mingw64-mumps
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _basename mumps
Name: mingw64-%{_basename}
Version: 4.10.0
Release: 0
#!BuildIgnore: post-build-checks
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
License: SUSE-Public-Domain
Group: Productivity/Scientific/Math
Url: http://mumps.enseeiht.fr/
Source0: http://mumps.enseeiht.fr/MUMPS_%{version}.tar.gz
# patch from COIN-OR, see https://projects.coin-or.org/BuildTools/changeset/2737
Patch0: mumps.patch
Patch1: mumps-libdir.patch
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-gcc-fortran
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-filesystem
BuildRequires: mingw64-lapack-devel
%_mingw64_package_header_debug
BuildArch: noarch
%description
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
This package contains the sequential library.
%package devel
Summary: Files needed for developing mumps based applications
Group: Development/Libraries/Other
%description devel
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
%_mingw64_debug_package
%prep
%setup -q -n MUMPS_%{version}
%patch -P 0 -p1
%patch -P 1 -p1
%build
cp Make.inc/Makefile.gfortran.SEQ Makefile.inc
%{_mingw64_make} \
CC=%{_mingw64_host}-gcc \
FC=%{_mingw64_host}-gfortran \
OPTF="-DALLOW_NON_INIT -fallow-argument-mismatch" \
alllib
mkdir -p bin
%{_mingw64_host}-gfortran -shared -o bin/libpord.dll \
-Wl,--out-implib,lib/libpord.dll.a \
-Wl,--whole-archive lib/libpord.a -Wl,--no-whole-archive
%{_mingw64_host}-gfortran -shared -o bin/libmpiseq.dll \
-Wl,--out-implib,lib/libmpiseq.dll.a \
-Wl,--whole-archive libseq/libmpiseq.a -Wl,--no-whole-archive
%{_mingw64_host}-gfortran -shared -o bin/libmumps_common.dll \
-Wl,--out-implib,lib/libmumps_common.dll.a \
-Lbin -lmpiseq -lpord -pthread \
-Wl,--whole-archive lib/libmumps_common.a -Wl,--no-whole-archive
for ARITH in s d c z; do
%{_mingw64_host}-gfortran -shared -o bin/lib${ARITH}mumps.dll \
-Wl,--out-implib,lib/lib${ARITH}mumps.dll.a \
-Lbin -lmpiseq -lmumps_common -L%{_mingw64_bindir} -lblas \
-Wl,--whole-archive lib/lib${ARITH}mumps.a -Wl,--no-whole-archive
done
%install
mkdir -p %{buildroot}%{_mingw64_libdir}
mkdir -p %{buildroot}%{_mingw64_bindir}
mkdir -p %{buildroot}%{_mingw64_includedir}/mumps
mkdir -p %{buildroot}%{_mingw64_includedir}/pord
cp -P lib/lib*.dll.a %{buildroot}%{_mingw64_libdir}
cp -P bin/libpord.dll %{buildroot}%{_mingw64_bindir}
cp -P bin/libmpiseq.dll %{buildroot}%{_mingw64_bindir}
cp -P bin/lib*mumps*.dll %{buildroot}%{_mingw64_bindir}
install -m 644 include/* %{buildroot}%{_mingw64_includedir}/mumps
install -m 644 libseq/*.h %{buildroot}%{_mingw64_includedir}/mumps
install -m 644 PORD/include/* %{buildroot}%{_mingw64_includedir}/pord
%files
%defattr(-,root,root,-)
%{_mingw64_bindir}/libpord.dll
%{_mingw64_bindir}/libmpiseq.dll
%{_mingw64_bindir}/lib*mumps*.dll
%doc README LICENSE
%files devel
%defattr(-,root,root,-)
%{_mingw64_libdir}/libpord.dll.a
%{_mingw64_libdir}/libmpiseq.dll.a
%{_mingw64_libdir}/lib*mumps*.dll.a
%{_mingw64_includedir}/mumps
%{_mingw64_includedir}/pord
%changelog