Use cmake3 on rhel; use blas from system
This commit is contained in:
parent
c064ebb380
commit
358318a41c
@ -1,25 +0,0 @@
|
||||
Description: Provide stubs for the two functions whose implementation is nonfree
|
||||
Author: Sébastien Villemot <sebastien@debian.org>
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2013-11-27
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- /dev/null
|
||||
+++ b/SRC/mc64ad.c
|
||||
@@ -0,0 +1,16 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void mc64id_(int *a)
|
||||
+{
|
||||
+ fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n");
|
||||
+ abort();
|
||||
+}
|
||||
+
|
||||
+void mc64ad_(int *a, int *b, int *c, int d[], int e[], double f[],
|
||||
+ int *g, int h[], int *i, int j[], int *k, double l[],
|
||||
+ int m[], int n[])
|
||||
+{
|
||||
+ fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n");
|
||||
+ abort();
|
||||
+}
|
45
SuperLU.spec
45
SuperLU.spec
@ -6,20 +6,44 @@
|
||||
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
|
||||
%endif
|
||||
|
||||
# openblas available on these architectures.
|
||||
%if 0%{?fedora} && 0%{?fedora} > 26
|
||||
%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64 s390x}
|
||||
%else
|
||||
%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64}
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64}
|
||||
%endif
|
||||
|
||||
Name: SuperLU
|
||||
Version: 5.2.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Subroutines to solve sparse linear systems
|
||||
|
||||
License: BSD and GPLV2+
|
||||
License: BSD and GPLv2+
|
||||
URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
|
||||
Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/%{genname}_%{version}.tar.gz
|
||||
Patch0: %{genname}-cmake-includedir.patch
|
||||
Patch1: %{genname}-removemc64.patch
|
||||
|
||||
BuildRequires: atlas-devel, gcc, cmake
|
||||
%ifarch %{openblas_arches}
|
||||
BuildRequires: openblas-devel, openblas-srpm-macros
|
||||
%else
|
||||
BuildRequires: blas-devel
|
||||
%endif
|
||||
BuildRequires: atlas-devel, gcc
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: cmake3, epel-rpm-macros
|
||||
%global ctest3 ctest3
|
||||
%else
|
||||
BuildRequires: cmake
|
||||
%global cmake3 %cmake
|
||||
%global ctest3 ctest
|
||||
%endif
|
||||
BuildRequires: gcc-gfortran
|
||||
BuildRequires: csh
|
||||
Requires: gcc-gfortran%{?_isa}
|
||||
|
||||
%description
|
||||
SuperLU contains a set of subroutines to solve a sparse linear system
|
||||
@ -55,19 +79,22 @@ do
|
||||
done
|
||||
|
||||
%build
|
||||
%cmake .
|
||||
mkdir -p build; cd build
|
||||
%cmake3 -Denable_blaslib:BOOL=OFF ..
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%make_install -C build
|
||||
|
||||
%check
|
||||
ctest -V %{?_smp_mflags}
|
||||
pushd build
|
||||
%ctest3 -V %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%license License.txt
|
||||
%{_libdir}/libsuperlu.so.%{libver}*
|
||||
|
||||
@ -79,6 +106,10 @@ ctest -V %{?_smp_mflags}
|
||||
%doc DOC EXAMPLE FORTRAN
|
||||
|
||||
%changelog
|
||||
* Sun Apr 15 2018 Antonio Trande <sagitterATfedoraproject.org> - 5.2.1-2
|
||||
- Use cmake3 on rhel
|
||||
- Use blas from system
|
||||
|
||||
* Fri Apr 13 2018 Rafael dos Santos <rdossant@redhat.com> - 5.2.1-1
|
||||
- Update to 5.2.1
|
||||
- Use cmake build system
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- /tmp/SuperLU_5.2.0/SRC/CMakeLists.txt 2016-04-09 03:53:17.000000000 +0200
|
||||
+++ SuperLU_5.2.0/SRC/CMakeLists.txt 2018-04-13 11:42:28.481583088 +0200
|
||||
@@ -233,9 +233,9 @@
|
||||
VERSION ${PROJECT_VERSION} SOVERSION ${VERSION_MAJOR}
|
||||
)
|
||||
install(TARGETS superlu
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
install(FILES ${headers}
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
Loading…
Reference in New Issue
Block a user