2007-01-16 00:12:17 +01:00
|
|
|
#
|
2011-05-17 16:09:58 +02:00
|
|
|
# spec file for package fftw3
|
2007-01-16 00:12:17 +01:00
|
|
|
#
|
2019-02-18 20:08:47 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:12:17 +01:00
|
|
|
#
|
2009-02-16 14:06:13 +01:00
|
|
|
# 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.
|
|
|
|
|
2019-03-19 13:11:22 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2007-01-16 00:12:17 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
|
|
|
%define bname fftw
|
|
|
|
%define BNAME FFTW
|
|
|
|
%define pname fftw3
|
2019-03-19 13:11:22 +01:00
|
|
|
%define vers 3.3.8
|
|
|
|
%define _ver 3_3_8
|
2017-10-16 20:57:55 +02:00
|
|
|
|
2018-02-22 16:35:28 +01:00
|
|
|
#For non HPC builds only
|
2018-09-18 12:09:54 +02:00
|
|
|
%ifarch ppc ppc64
|
2018-02-22 16:35:28 +01:00
|
|
|
%define mpi_implem openmpi
|
|
|
|
%else
|
|
|
|
%define mpi_implem openmpi2
|
|
|
|
%endif
|
|
|
|
|
2017-10-17 21:26:22 +02:00
|
|
|
%bcond_with ringdisabled
|
|
|
|
|
2018-01-15 13:39:39 +01:00
|
|
|
%if 0%{?is_opensuse} || 0%{?is_backports}
|
|
|
|
%undefine DisOMPI3
|
|
|
|
%else
|
|
|
|
%define DisOMPI3 ExclusiveArch: do_not_build
|
|
|
|
%endif
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if "%flavor" == ""
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%define package_name %pname
|
|
|
|
%endif
|
|
|
|
|
2017-10-17 21:26:22 +02:00
|
|
|
# Magic for OBS Staging. Only build the flavors required by
|
|
|
|
# other packages in the ring.
|
|
|
|
%if %{with ringdisabled}
|
|
|
|
%if "%flavor" != "standard"
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if "%{flavor}" == "standard"
|
|
|
|
%define mpi_flavor standard
|
|
|
|
%bcond_without mpi
|
|
|
|
%bcond_with hpc
|
|
|
|
%bcond_without system_packages
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%flavor" == "gnu-hpc"
|
|
|
|
%define compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%bcond_with mpi
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-openmpi-hpc"
|
2018-01-15 13:39:39 +01:00
|
|
|
%{?DisOMPI1}
|
2017-10-16 20:57:55 +02:00
|
|
|
%global compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%global mpi_flavor openmpi
|
|
|
|
%define mpi_vers 1
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
2018-02-26 16:49:38 +01:00
|
|
|
%if "%{flavor}" == "gnu-openmpi2-hpc"
|
|
|
|
%{?DisOMPI2}
|
|
|
|
%global compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%global mpi_flavor openmpi
|
|
|
|
%define mpi_vers 2
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
2018-01-07 19:18:12 +01:00
|
|
|
%if "%{flavor}" == "gnu-openmpi3-hpc"
|
2018-01-15 13:39:39 +01:00
|
|
|
%{?DisOMPI3}
|
2018-01-07 19:18:12 +01:00
|
|
|
%global compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%global mpi_flavor openmpi
|
|
|
|
%define mpi_vers 3
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if "%{flavor}" == "gnu-mvapich2-hpc"
|
|
|
|
%global compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%define mpi_flavor mvapich2
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
2018-01-07 19:18:12 +01:00
|
|
|
%if "%{flavor}" == "gnu-mpich-hpc"
|
|
|
|
%global compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%define mpi_flavor mpich
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%flavor" == "gnu7-hpc"
|
|
|
|
%define compiler_family gnu
|
2018-01-22 19:12:52 +01:00
|
|
|
%define c_f_ver 7
|
2018-01-07 19:18:12 +01:00
|
|
|
%bcond_with mpi
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-openmpi-hpc"
|
2018-01-15 13:39:39 +01:00
|
|
|
%{?DisOMPI1}
|
2018-01-07 19:18:12 +01:00
|
|
|
%global compiler_family gnu
|
|
|
|
%define c_f_ver 7
|
|
|
|
%global mpi_flavor openmpi
|
|
|
|
%define mpi_vers 1
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-openmpi3-hpc"
|
2018-01-15 13:39:39 +01:00
|
|
|
%{?DisOMPI3}
|
2018-01-07 19:18:12 +01:00
|
|
|
%global compiler_family gnu
|
|
|
|
%define c_f_ver 7
|
|
|
|
%global mpi_flavor openmpi
|
|
|
|
%define mpi_vers 3
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-mvapich2-hpc"
|
|
|
|
%global compiler_family gnu
|
|
|
|
%define c_f_ver 7
|
|
|
|
%define mpi_flavor mvapich2
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-mpich-hpc"
|
|
|
|
%global compiler_family gnu
|
|
|
|
%define c_f_ver 7
|
|
|
|
%define mpi_flavor mpich
|
|
|
|
%bcond_without hpc
|
|
|
|
%bcond_without mpi
|
|
|
|
%endif
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
# now exchange the paths
|
|
|
|
%if %{with hpc}
|
|
|
|
%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}}
|
|
|
|
%{?with_hpc:%{!?compiler_family:%global compiler_family gnu}}
|
|
|
|
%{?with_mpi:%{!?mpi_flavor:%global mpi_flavor openmpi}}
|
2018-01-19 11:51:58 +01:00
|
|
|
%{?with_mpi:%global hpc_module_pname p%{pname}}
|
2017-10-16 20:57:55 +02:00
|
|
|
# needed by the hpc tools
|
|
|
|
%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?with_mpi:-m {%mpi_flavor}} %{?mpi_ver:-V %{mpi_ver}} %{?ext:-e %{ext}}}
|
|
|
|
%define package_base %{hpc_install_path_base}
|
|
|
|
%define package_prefix %hpc_prefix
|
|
|
|
%define package_bindir %hpc_bindir
|
|
|
|
%define package_libdir %hpc_libdir
|
|
|
|
%define package_datadir %hpc_datadir
|
|
|
|
%define package_includedir %hpc_includedir
|
|
|
|
%define package_mandir %hpc_mandir
|
|
|
|
%define package_docdir %hpc_docdir
|
|
|
|
%define package_infodir %hpc_infodir
|
|
|
|
%define package_name %{hpc_package_name %_ver}
|
|
|
|
%define package_libname lib%{package_name}
|
|
|
|
%else
|
|
|
|
%define package_base %{_prefix}
|
|
|
|
%define package_prefix %{_prefix}
|
|
|
|
%define package_bindir %{_bindir}
|
|
|
|
%define package_libdir %{_libdir}
|
|
|
|
%define package_datadir %{_datadir}
|
|
|
|
%define package_includedir %{_includedir}
|
|
|
|
%define package_mandir %{_mandir}
|
|
|
|
%define package_docdir %{_docdir}
|
|
|
|
%define package_infodir %{_infodir}
|
|
|
|
%define package_name %pname%{?my_suffix}
|
|
|
|
%define package_libname lib%{pname}-3
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: %package_name
|
2011-11-28 14:34:55 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: pkgconfig
|
2017-11-07 13:46:17 +01:00
|
|
|
Version: %vers
|
2011-11-28 14:34:55 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Discrete Fourier Transform (DFT) C Subroutine Library
|
2018-09-18 12:09:54 +02:00
|
|
|
License: GPL-2.0-or-later
|
2011-11-28 14:34:55 +01:00
|
|
|
Group: Productivity/Scientific/Math
|
2012-03-16 10:50:56 +01:00
|
|
|
Url: http://www.fftw.org
|
2017-11-07 13:46:17 +01:00
|
|
|
Source: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}%{?pl_ext:-%{pl_ext}}.tar.gz
|
2017-10-16 20:57:55 +02:00
|
|
|
Source1: %{pname}-rpmlintrc
|
2007-01-16 00:12:17 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
|
|
|
BuildRequires: lua-lmod
|
|
|
|
BuildRequires: suse-hpc
|
|
|
|
%if %{with mpi}
|
|
|
|
BuildRequires: %{mpi_flavor}%{?mpi_vers}-%{compiler_family}%{?c_f_ver}-hpc-macros-devel
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gcc-fortran
|
|
|
|
Requires: %{package_name}-libs = %{version}
|
2017-10-23 19:00:06 +02:00
|
|
|
%ifnarch s390 s390x
|
2018-02-22 16:35:28 +01:00
|
|
|
BuildRequires: %{mpi_implem}-devel
|
2017-10-23 19:00:06 +02:00
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
2007-01-16 00:12:17 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%%{hpc_master_package -L}
|
|
|
|
%{hpc_master_package -l}
|
|
|
|
%{hpc_master_package -a devel}
|
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:12:17 +01:00
|
|
|
%package devel
|
2009-07-24 16:39:25 +02:00
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
2011-05-17 16:09:44 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-10-16 20:57:55 +02:00
|
|
|
Requires: %package_libname = %{version}-%{release}
|
2017-10-20 10:36:35 +02:00
|
|
|
Requires: glibc-devel
|
2018-06-03 10:08:05 +02:00
|
|
|
Requires(post): %install_info_prereq
|
|
|
|
Requires(preun): %install_info_prereq
|
2017-10-20 10:36:35 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_requires_devel
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
2010-04-23 01:27:15 +02:00
|
|
|
Provides: fftw-devel
|
2007-01-16 00:12:17 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains all necessary include files and libraries needed
|
|
|
|
to develop applications that require these.
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%package devel-static
|
|
|
|
Summary: Static libraries for %{pname}
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name}-devel
|
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
Libraries to build statically linked applications with fftw3.
|
|
|
|
|
|
|
|
%package -n %package_libname
|
2011-11-23 15:50:07 +01:00
|
|
|
Summary: Discrete Fourier Transform (DFT) C Subroutine Library
|
2018-09-18 12:09:54 +02:00
|
|
|
# Remove Prov/Obs when appropriate; were added 2011-Nov-21 (post-openSUSE-12.1)
|
2019-02-18 20:08:47 +01:00
|
|
|
Group: System/Libraries
|
2011-11-28 14:34:55 +01:00
|
|
|
Provides: fftw3 = %{version}-%{release}
|
2011-12-01 13:17:32 +01:00
|
|
|
Obsoletes: fftw3 < 3.3
|
2017-11-14 17:51:07 +01:00
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_requires
|
|
|
|
%endif
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%description -n %package_libname
|
2011-11-23 15:50:07 +01:00
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{without hpc}
|
2011-11-23 15:50:07 +01:00
|
|
|
%package -n libfftw3_threads3
|
2007-01-16 00:12:17 +01:00
|
|
|
Summary: Discrete Fourier Transform (DFT) C subroutine library
|
|
|
|
Group: Productivity/Scientific/Math
|
2011-12-01 13:50:14 +01:00
|
|
|
Provides: fftw3-threads = %{version}-%{release}
|
|
|
|
Obsoletes: fftw3-threads < 3.3
|
2011-11-23 15:50:07 +01:00
|
|
|
# libfftw3_threads.so does not have a DT_NEEDED entry for fftw symbols, since it
|
|
|
|
# may be used with either libfftw3.so or libfftw3f.so. Hence, manual Requires.
|
2011-12-01 13:17:32 +01:00
|
|
|
#Requires: libfftw3-3 = %%{version}
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%description -n libfftw3_threads3
|
2007-01-16 00:12:17 +01:00
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
|
|
|
|
|
|
|
%package threads-devel
|
|
|
|
Summary: Discrete Fourier Transform (DFT) C subroutine library
|
2011-05-17 16:09:44 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2011-12-01 13:17:32 +01:00
|
|
|
Requires: fftw3-devel = %{version}-%{release}
|
2011-11-28 14:34:55 +01:00
|
|
|
Requires: glibc-devel
|
2011-12-01 13:17:32 +01:00
|
|
|
Requires: libfftw3_threads3 = %{version}-%{release}
|
2007-01-16 00:12:17 +01:00
|
|
|
|
|
|
|
%description threads-devel
|
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%package -n libfftw3_omp3
|
2011-08-04 05:17:26 +02:00
|
|
|
Summary: Discrete Fourier Transform (DFT) C subroutine library
|
|
|
|
Group: Productivity/Scientific/Math
|
2011-12-01 13:50:14 +01:00
|
|
|
Provides: fftw3-openmp = %{version}-%{release}
|
|
|
|
Obsoletes: fftw3-openmp < 3.3
|
2011-11-23 15:50:07 +01:00
|
|
|
# Same as libfftw3_threads.so: manual Requires for fftw3 main lib
|
2011-12-01 13:17:32 +01:00
|
|
|
#Requires: libfftw3-3 = %%{version}
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%description -n libfftw3_omp3
|
2011-08-04 05:17:26 +02:00
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
|
|
|
|
|
|
|
%package openmp-devel
|
|
|
|
Summary: Discrete Fourier Transform (DFT) C subroutine library
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-12-01 13:17:32 +01:00
|
|
|
Requires: fftw3-devel = %{version}-%{release}
|
2011-11-28 14:34:55 +01:00
|
|
|
Requires: glibc-devel
|
2011-12-01 13:17:32 +01:00
|
|
|
Requires: libfftw3_omp3 = %{version}-%{release}
|
2011-08-04 05:17:26 +02:00
|
|
|
|
|
|
|
%description openmp-devel
|
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2012-04-26 13:37:17 +02:00
|
|
|
%ifnarch s390 s390x
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%package -n libfftw3_mpi3
|
2011-08-04 05:17:26 +02:00
|
|
|
Summary: Discrete Fourier Transform (DFT) C subroutine library
|
|
|
|
Group: Productivity/Scientific/Math
|
2011-12-01 13:50:14 +01:00
|
|
|
Provides: fftw3-mpi = %{version}-%{release}
|
|
|
|
Obsoletes: fftw3-mpi < 3.3
|
2011-11-23 15:50:07 +01:00
|
|
|
# Same as libfftw3_threads.so: manual Requires for fftw3 main lib
|
2011-12-01 13:17:32 +01:00
|
|
|
#Requires: libfftw3-3 = %%{version}
|
|
|
|
#Requires: openmpi
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%description -n libfftw3_mpi3
|
2011-08-04 05:17:26 +02:00
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
|
|
|
|
|
|
|
%package mpi-devel
|
|
|
|
Summary: Discrete Fourier Transform (DFT) C subroutine library
|
|
|
|
Group: Development/Libraries/C and C++
|
2018-02-22 16:35:28 +01:00
|
|
|
Requires: %{mpi_implem}-devel
|
2011-11-28 14:34:55 +01:00
|
|
|
Requires: fftw3-devel = %{version}
|
|
|
|
Requires: glibc-devel
|
2011-12-01 13:17:32 +01:00
|
|
|
Requires: libfftw3_mpi3 = %{version}-%{release}
|
2011-08-04 05:17:26 +02:00
|
|
|
|
|
|
|
%description mpi-devel
|
|
|
|
FFTW is a C subroutine library for computing the Discrete Fourier
|
|
|
|
Transform (DFT) in one or more dimensions, of both real and complex
|
|
|
|
data, and of arbitrary input size.
|
2011-11-28 10:51:22 +01:00
|
|
|
%endif
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2007-01-16 00:12:17 +01:00
|
|
|
%prep
|
2017-11-07 13:46:17 +01:00
|
|
|
%setup -q -n %{bname}-%{version}%{?pl_ext:-%{pl_ext}}
|
2017-10-16 20:57:55 +02:00
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
cat > %{_sourcedir}/baselibs.conf <<EOF
|
|
|
|
%{package_libname}
|
|
|
|
lib%{name}_threads3
|
|
|
|
lib%{name}_omp3
|
|
|
|
lib%{name}_mpi3
|
|
|
|
EOF
|
|
|
|
%endif
|
2007-04-17 00:31:15 +02:00
|
|
|
|
|
|
|
%build
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_setup
|
|
|
|
%endif
|
2012-04-26 13:37:17 +02:00
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if "%{mpi_flavor}" == "standard"
|
2018-02-22 16:35:28 +01:00
|
|
|
source %_libdir/mpi/gcc/%{mpi_implem}/bin/mpivars.sh
|
2012-03-16 10:50:56 +01:00
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
%else
|
|
|
|
%hpc_configure \
|
|
|
|
--enable-static \
|
|
|
|
%endif
|
2012-04-26 13:37:17 +02:00
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with mpi}
|
2011-11-28 10:51:22 +01:00
|
|
|
--enable-mpi \
|
|
|
|
%endif
|
2011-10-10 16:51:21 +02:00
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
--enable-sse2 \
|
2012-05-29 14:57:13 +02:00
|
|
|
--enable-avx \
|
2011-10-10 16:51:21 +02:00
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
|
|
|
--enable-shared \
|
|
|
|
--enable-threads \
|
|
|
|
--enable-openmp
|
|
|
|
|
2011-08-08 00:05:24 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:12:17 +01:00
|
|
|
|
|
|
|
%install
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%{hpc_setup}
|
|
|
|
%endif
|
2011-08-08 00:05:24 +02:00
|
|
|
%makeinstall
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2007-04-17 00:31:15 +02:00
|
|
|
# remove unneeded files
|
2017-10-16 20:57:55 +02:00
|
|
|
%{!?with_hpc:rm -f %{buildroot}%{package_libdir}/lib*.*a}
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2007-01-16 00:12:17 +01:00
|
|
|
# hack to also compile/install single-precision version:
|
|
|
|
make distclean
|
2012-03-16 10:50:56 +01:00
|
|
|
|
2012-04-26 13:37:17 +02:00
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if "%{mpi_flavor}" == "standard"
|
2018-02-22 16:35:28 +01:00
|
|
|
source %_libdir/mpi/gcc/%{mpi_implem}/bin/mpivars.sh
|
2012-03-16 10:50:56 +01:00
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
%configure \
|
|
|
|
%else
|
|
|
|
%hpc_configure \
|
|
|
|
%endif
|
|
|
|
--enable-shared --enable-threads --enable-float --enable-openmp \
|
2012-04-26 13:37:17 +02:00
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with mpi}
|
2011-11-28 10:51:22 +01:00
|
|
|
--enable-mpi \
|
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
2011-10-10 16:51:21 +02:00
|
|
|
%ifarch %ix86 x86_64
|
2014-04-29 17:40:41 +02:00
|
|
|
--enable-sse2 \
|
|
|
|
%endif
|
|
|
|
--disable-static
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%makeinstall
|
|
|
|
|
|
|
|
# hack to also compile/install long-double-precision version:
|
|
|
|
make distclean
|
|
|
|
|
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if "%{mpi_flavor}" == "standard"
|
2018-02-22 16:35:28 +01:00
|
|
|
source %_libdir/mpi/gcc/%{mpi_implem}/bin/mpivars.sh
|
2014-04-29 17:40:41 +02:00
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
|
|
|
%if %{without hpc}
|
|
|
|
%configure \
|
|
|
|
%else
|
|
|
|
%hpc_configure \
|
|
|
|
%endif
|
|
|
|
--enable-shared --enable-threads --enable-long-double --enable-openmp \
|
2014-04-29 17:40:41 +02:00
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with mpi}
|
2014-04-29 17:40:41 +02:00
|
|
|
--enable-mpi \
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
2011-10-10 16:51:21 +02:00
|
|
|
%endif
|
|
|
|
--disable-static
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2011-08-08 00:05:24 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
%makeinstall
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2007-04-17 00:31:15 +02:00
|
|
|
# remove unneeded files
|
2017-10-16 20:57:55 +02:00
|
|
|
%{!?with_hpc:rm -f %{buildroot}%{package_libdir}/lib*.*a}
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
gzip -9nf %{buildroot}%{package_infodir}/*.info*
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2009-02-16 14:06:13 +01:00
|
|
|
# remove Makefiles in doc directory at last
|
|
|
|
find doc -name 'Makefile*' | xargs rm
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_write_modules_files
|
|
|
|
#%%Module1.0#####################################################################
|
|
|
|
|
|
|
|
proc ModulesHelp { } {
|
|
|
|
|
|
|
|
puts stderr " "
|
|
|
|
puts stderr "This module loads the %{pname} library built with the %{compiler_family} toolchain."
|
|
|
|
puts stderr "\nVersion %{version}\n"
|
|
|
|
|
|
|
|
}
|
|
|
|
module-whatis "Name: %{pname} built with %{compiler_family} toolchain"
|
|
|
|
module-whatis "Version: %{version}"
|
|
|
|
module-whatis "Category: runtime library"
|
|
|
|
module-whatis "Description: %{summary:0}"
|
|
|
|
module-whatis "URL: %{url}"
|
|
|
|
|
|
|
|
set version %{version}
|
|
|
|
|
|
|
|
prepend-path PATH %{hpc_bindir}
|
|
|
|
prepend-path MANPATH %{hpc_mandir}
|
2017-11-13 15:03:03 +01:00
|
|
|
prepend-path INCLUDE %{hpc_includedir}
|
2017-10-16 20:57:55 +02:00
|
|
|
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
|
2019-02-18 20:08:47 +01:00
|
|
|
setenv %{BNAME}_DIR %{hpc_prefix}
|
|
|
|
setenv %{BNAME}_BIN %{hpc_bindir}
|
2017-11-13 15:03:03 +01:00
|
|
|
setenv %{BNAME}_LIB %{hpc_libdir}
|
2017-10-16 20:57:55 +02:00
|
|
|
setenv %{BNAME}_INC %{hpc_includedir}
|
|
|
|
if ([file isdirectory %{hpc_includedir}]) {
|
|
|
|
# should work also for fortran
|
|
|
|
prepend-path LIBRARY_PATH %{hpc_libdir}
|
|
|
|
prepend-path CPATH %{hpc_includedir}
|
|
|
|
prepend-path C_INCLUDE_PATH %{hpc_includedir}
|
|
|
|
prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir}
|
|
|
|
}
|
|
|
|
|
|
|
|
%{hpc_modulefile_add_pkgconfig_path}
|
|
|
|
|
|
|
|
EOF
|
|
|
|
%endif
|
2011-11-28 14:34:55 +01:00
|
|
|
|
2009-02-16 14:06:13 +01:00
|
|
|
%fdupes -s doc
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2018-06-03 10:08:05 +02:00
|
|
|
%preun devel
|
2017-10-16 20:57:55 +02:00
|
|
|
%install_info_delete --info-dir=%{package_infodir} %{package_infodir}/fftw3.info.gz
|
2007-01-16 00:12:17 +01:00
|
|
|
|
|
|
|
%post devel
|
2017-10-16 20:57:55 +02:00
|
|
|
%install_info --info-dir=%{package_infodir} %{package_infodir}/fftw3.info.gz
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%post -n %package_libname -p /sbin/ldconfig
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%postun -n %package_libname -p /sbin/ldconfig
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{without hpc}
|
2011-11-23 15:50:07 +01:00
|
|
|
%post -n libfftw3_threads3 -p /sbin/ldconfig
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%postun -n libfftw3_threads3 -p /sbin/ldconfig
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%post -n libfftw3_omp3 -p /sbin/ldconfig
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%postun -n libfftw3_omp3 -p /sbin/ldconfig
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-28 10:51:22 +01:00
|
|
|
%ifnarch s390 s390x
|
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%post -n libfftw3_mpi3 -p /sbin/ldconfig
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-23 15:50:07 +01:00
|
|
|
%postun -n libfftw3_mpi3 -p /sbin/ldconfig
|
2011-11-28 10:51:22 +01:00
|
|
|
%endif
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%files -n %package_libname
|
2007-01-16 00:12:17 +01:00
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%{package_libdir}/libfftw3.so.3*
|
|
|
|
%{package_libdir}/libfftw3f.so.3*
|
|
|
|
%{package_libdir}/libfftw3l.so.3*
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{without hpc}
|
|
|
|
%files -n libfftw3_threads3
|
2007-01-16 00:12:17 +01:00
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif #%%{without hpc}
|
|
|
|
%{package_libdir}/libfftw3_threads.so.3*
|
|
|
|
%{package_libdir}/libfftw3f_threads.so.3*
|
|
|
|
%{package_libdir}/libfftw3l_threads.so.3*
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{without hpc}
|
|
|
|
%files -n libfftw3_omp3
|
2007-01-16 00:12:17 +01:00
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%else
|
|
|
|
%hpc_modules_files
|
|
|
|
%endif #%%{without hpc}
|
|
|
|
%{package_libdir}/libfftw3_omp.so.3*
|
|
|
|
%{package_libdir}/libfftw3f_omp.so.3*
|
|
|
|
%{package_libdir}/libfftw3l_omp.so.3*
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%ifnarch s390 s390x
|
|
|
|
%if %{with mpi}
|
|
|
|
%if %{without hpc}
|
|
|
|
%files -n libfftw3_mpi3
|
2007-01-16 00:12:17 +01:00
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif #%%{without hpc}
|
|
|
|
%{package_libdir}/libfftw3_mpi.so.3*
|
|
|
|
%{package_libdir}/libfftw3f_mpi.so.3*
|
|
|
|
%{package_libdir}/libfftw3l_mpi.so.3*
|
|
|
|
%endif #%%(with mpi)
|
|
|
|
%endif #%%(s390 s390x)
|
2007-01-16 00:12:17 +01:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%if %{with hpc}
|
|
|
|
%{package_infodir}/dir
|
|
|
|
%hpc_dirs
|
|
|
|
%dir %package_libdir/pkgconfig
|
|
|
|
%dir %package_includedir
|
|
|
|
%dir %package_mandir
|
|
|
|
%dir %package_mandir/man1
|
|
|
|
%dir %package_infodir
|
|
|
|
%dir %package_bindir
|
|
|
|
%dir %package_datadir
|
|
|
|
%endif
|
|
|
|
%doc AUTHORS CONVENTIONS COPYING COPYRIGHT ChangeLog NEWS README TODO
|
|
|
|
%doc doc/*
|
|
|
|
%doc %{package_mandir}/man?/*
|
2019-03-19 13:11:22 +01:00
|
|
|
%dir %package_libdir/cmake
|
|
|
|
%dir %package_libdir/cmake/%{pname}
|
2017-10-16 20:57:55 +02:00
|
|
|
%{package_infodir}/*.info*
|
|
|
|
%{package_includedir}/fftw3.*
|
|
|
|
%{package_includedir}/fftw3q.f03
|
|
|
|
%{package_includedir}/fftw3l.f03
|
|
|
|
%{package_libdir}/libfftw3.so
|
|
|
|
%{package_libdir}/libfftw3f.so
|
|
|
|
%{package_libdir}/libfftw3l.so
|
|
|
|
%{package_libdir}/pkgconfig/*.pc
|
2019-03-19 13:11:22 +01:00
|
|
|
%dir %package_libdir/cmake
|
|
|
|
%dir %package_libdir/cmake/%{pname}
|
|
|
|
%{package_libdir}/cmake/%{pname}/FFTW3*.cmake
|
2017-10-16 20:57:55 +02:00
|
|
|
%{package_bindir}/*
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
%files threads-devel
|
2011-08-04 05:17:26 +02:00
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif #%%{without hpc}
|
|
|
|
%{package_libdir}/libfftw3_threads.so
|
|
|
|
%{package_libdir}/libfftw3f_threads.so
|
|
|
|
%{package_libdir}/libfftw3l_threads.so
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{without hpc}
|
2011-08-04 05:17:26 +02:00
|
|
|
%files openmp-devel
|
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif #%%{without hpc}
|
|
|
|
%{package_libdir}/libfftw3_omp.so
|
|
|
|
%{package_libdir}/libfftw3f_omp.so
|
|
|
|
%{package_libdir}/libfftw3l_omp.so
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2011-11-28 10:51:22 +01:00
|
|
|
%ifnarch s390 s390x
|
2017-10-16 20:57:55 +02:00
|
|
|
%if %{with mpi}
|
|
|
|
%if %{without hpc}
|
2011-08-04 05:17:26 +02:00
|
|
|
%files mpi-devel
|
|
|
|
%defattr(-,root,root)
|
2017-10-16 20:57:55 +02:00
|
|
|
%endif #%%{without hpc}
|
|
|
|
%{package_libdir}/libfftw3_mpi.so
|
|
|
|
%{package_libdir}/libfftw3f_mpi.so
|
|
|
|
%{package_libdir}/libfftw3l_mpi.so
|
|
|
|
%{package_includedir}/fftw3-mpi.*
|
|
|
|
%{package_includedir}/fftw3l-mpi.f03
|
|
|
|
%endif #%%(with mpi)
|
|
|
|
%endif #%%(s390 s390x)
|
|
|
|
|
|
|
|
%if %{with hpc}
|
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{package_libdir}/*.*a
|
2011-11-28 10:51:22 +01:00
|
|
|
%endif
|
2011-08-04 05:17:26 +02:00
|
|
|
|
2007-04-17 00:31:15 +02:00
|
|
|
%changelog
|