Accepting request 664339 from science
OBS-URL: https://build.opensuse.org/request/show/664339 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gsl?expand=0&rev=41
This commit is contained in:
commit
44f9ac5d36
4
_multibuild
Normal file
4
_multibuild
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>serial</package>
|
||||||
|
<package>gnu-hpc</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 23 16:30:44 UTC 2018 - jjolly@suse.com
|
||||||
|
|
||||||
|
- Convert package to _multibuild
|
||||||
|
- Add HPC build macros and evironment modules
|
||||||
|
* (FATE#324138)
|
||||||
|
- Add master packages for libraries and devel package
|
||||||
|
- Remove BLAS build dependency
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jul 28 13:49:30 UTC 2018 - jengelh@inai.de
|
Sat Jul 28 13:49:30 UTC 2018 - jengelh@inai.de
|
||||||
|
|
||||||
|
265
gsl.spec
265
gsl.spec
@ -16,18 +16,82 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define lname libgsl23
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%define lcblasname libgslcblas0
|
|
||||||
Name: gsl
|
%define pname gsl
|
||||||
Version: 2.5
|
%define vers 2.5
|
||||||
|
%define _vers 2_5
|
||||||
|
%define lgsl_so_v 23
|
||||||
|
%define lgslcblas_so_v 0
|
||||||
|
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
ExclusiveArch: do_not_build
|
||||||
|
%define package_name %pname
|
||||||
|
%bcond_with hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "serial"
|
||||||
|
%bcond_with hpc
|
||||||
|
%define manext .gz
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "gnu-hpc"
|
||||||
|
%define compiler_family gnu
|
||||||
|
%undefine c_f_ver
|
||||||
|
%define manext %{nil}
|
||||||
|
%bcond_without hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "gnu6-hpc"
|
||||||
|
%define compiler_family gnu
|
||||||
|
%define c_f_ver 6
|
||||||
|
%define manext %{nil}
|
||||||
|
%bcond_without hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without hpc}
|
||||||
|
%if 0%{!?package_name:1}
|
||||||
|
%define package_name %{pname}
|
||||||
|
%endif
|
||||||
|
%define p_prefix %_prefix
|
||||||
|
%define p_includedir %_includedir/%pname
|
||||||
|
%define p_libdir %_libdir
|
||||||
|
%define p_bindir %_bindir
|
||||||
|
%define p_mandir %_mandir
|
||||||
|
%define p_datadir %_datadir
|
||||||
|
%define p_infodir %_infodir
|
||||||
|
%define num_threads 64
|
||||||
|
%define libname() lib%{pname}%{lgsl_so_v}
|
||||||
|
%define libcblas() lib%{pname}cblas%{lgslcblas_so_v}
|
||||||
|
|
||||||
|
%else
|
||||||
|
|
||||||
|
%{hpc_init -c %{compiler_family} %{?c_f_ver:-v %{c_f_ver}} %{?ext:-e %{ext}}}
|
||||||
|
%define package_name %{hpc_package_name %_vers}
|
||||||
|
|
||||||
|
%define p_prefix %hpc_prefix
|
||||||
|
%define p_includedir %hpc_includedir
|
||||||
|
%define p_libdir %hpc_libdir
|
||||||
|
%define p_bindir %hpc_bindir
|
||||||
|
%define p_mandir %hpc_mandir
|
||||||
|
%define p_datadir %hpc_datadir
|
||||||
|
%define p_infodir %hpc_infodir
|
||||||
|
%define num_threads 256
|
||||||
|
%define libname() lib%{pname}%{expand:%%{hpc_package_name_tail %{**}}}
|
||||||
|
%define libcblas() lib%{pname}cblas%{expand:%%{hpc_package_name_tail %{**}}}
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: %{package_name}
|
||||||
|
Version: %{vers}
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: GNU Scientific Library
|
Summary: GNU Scientific Library
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
Group: Productivity/Scientific/Math
|
Group: Productivity/Scientific/Math
|
||||||
URL: https://www.gnu.org/software/gsl/
|
URL: https://www.gnu.org/software/%{pname}/
|
||||||
Source0: https://ftp.gnu.org/pub/gnu/gsl/gsl-%{version}.tar.gz
|
Source0: https://ftp.gnu.org/pub/gnu/%{pname}/%{pname}-%{version}.tar.gz
|
||||||
Source1: https://ftp.gnu.org/pub/gnu/gsl/gsl-%{version}.tar.gz.sig
|
Source1: https://ftp.gnu.org/pub/gnu/%{pname}/%{pname}-%{version}.tar.gz.sig
|
||||||
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=gsl&download=1#/%{name}.keyring
|
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=gsl&download=1#/%{pname}.keyring
|
||||||
Patch0: gsl-1.6-initvars.diff
|
Patch0: gsl-1.6-initvars.diff
|
||||||
Patch5: gsl-wrap.diff
|
Patch5: gsl-wrap.diff
|
||||||
Patch6: gsl-qawc-test-x86-precision.diff
|
Patch6: gsl-qawc-test-x86-precision.diff
|
||||||
@ -35,10 +99,22 @@ Patch7: gsl-disable-fma.patch
|
|||||||
Patch8: gsl-fsf_address.patch
|
Patch8: gsl-fsf_address.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: blas-devel
|
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
|
||||||
|
%if %{without hpc}
|
||||||
|
BuildRequires: update-alternatives
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(preun): update-alternatives
|
||||||
|
%else
|
||||||
|
%hpc_requires
|
||||||
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
||||||
|
BuildRequires: lua-lmod
|
||||||
|
BuildRequires: suse-hpc
|
||||||
|
%global dep_summary %{summary}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The GNU Scientific Library (GSL) is a collection of routines for
|
The GNU Scientific Library (GSL) is a collection of routines for
|
||||||
numerical computing. The routines are written from scratch by the GSL
|
numerical computing. The routines are written from scratch by the GSL
|
||||||
@ -46,11 +122,14 @@ team in ANSI C and present an Applications Programming Interface
|
|||||||
(API) for C programmers, while allowing wrappers to be written for very
|
(API) for C programmers, while allowing wrappers to be written for very
|
||||||
high level languages.
|
high level languages.
|
||||||
|
|
||||||
%package -n %{lname}
|
%package -n %{libname %_vers}
|
||||||
Summary: GNU Scientific Library
|
Summary: GNU Scientific Library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
%{?with_hpc:Requires: %{name}-module >= %version}
|
||||||
|
|
||||||
%description -n %{lname}
|
%{?with_hpc:%{hpc_master_package}}
|
||||||
|
|
||||||
|
%description -n %{libname %_vers}
|
||||||
The GNU Scientific Library (GSL) is a collection of routines for
|
The GNU Scientific Library (GSL) is a collection of routines for
|
||||||
numerical computing. The routines are written from scratch by the GSL
|
numerical computing. The routines are written from scratch by the GSL
|
||||||
team in ANSI C and present an Applications Programming Interface
|
team in ANSI C and present an Applications Programming Interface
|
||||||
@ -69,22 +148,28 @@ Numerical Differentiation - Chebyshev Approximation - Series Acceleration -
|
|||||||
Discrete Hankel Transforms - Root-Finding - Minimization -
|
Discrete Hankel Transforms - Root-Finding - Minimization -
|
||||||
Least-Squares Fitting - Physical Constants - IEEE Floating-Point
|
Least-Squares Fitting - Physical Constants - IEEE Floating-Point
|
||||||
|
|
||||||
%package -n %{lcblasname}
|
%{?with_hpc:%{hpc_master_package -l -L}}
|
||||||
|
|
||||||
|
%package -n %{libcblas %_vers}
|
||||||
Summary: A standard C language APIs for BLAS from GNU Scientific Library
|
Summary: A standard C language APIs for BLAS from GNU Scientific Library
|
||||||
# file conflict, see boo#991155
|
# file conflict, see boo#991155
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Obsoletes: libgsl0
|
Obsoletes: libgsl0
|
||||||
|
%{?with_hpc:Requires: %{name}-module >= %version}
|
||||||
|
|
||||||
%description -n %{lcblasname}
|
%description -n %{libcblas %_vers}
|
||||||
This library provides a native C interface to BLAS routines. This is part of
|
This library provides a native C interface to BLAS routines. This is part of
|
||||||
the GNU Scientific Library.
|
the GNU Scientific Library.
|
||||||
|
|
||||||
|
%{?with_hpc:%{hpc_master_package -l -n lib%{pname}cblas%{hpc_package_name_tail} -N %{pname}cblas}}
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for the GNU Scientific Library
|
Summary: Development files for the GNU Scientific Library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{lcblasname} = %{version}
|
Requires: %{libname %_vers} = %{version}
|
||||||
Requires: %{lname} = %{version}
|
Requires: %{libcblas %_vers} = %{version}
|
||||||
Requires(pre): %{install_info_prereq}
|
Requires(pre): %{install_info_prereq}
|
||||||
|
%{?with_hpc:%hpc_requires_devel}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains the headers, static libraries and some
|
This package contains the headers, static libraries and some
|
||||||
@ -96,13 +181,15 @@ team in ANSI C, and present an Applications Programming Interface
|
|||||||
(API) for C programmers, while allowing wrappers to be written for very
|
(API) for C programmers, while allowing wrappers to be written for very
|
||||||
high level languages.
|
high level languages.
|
||||||
|
|
||||||
%package doc
|
%{?with_hpc:%{hpc_master_package devel}}
|
||||||
|
|
||||||
|
%package doc
|
||||||
Summary: Documentation for the GNU Scientific Library
|
Summary: Documentation for the GNU Scientific Library
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
Requires(post): %{install_info_prereq}
|
Requires(post): %{install_info_prereq}
|
||||||
Requires(preun): %{install_info_prereq}
|
Requires(preun): %{install_info_prereq}
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
This package contains documentation for GSL
|
This package contains documentation for GSL
|
||||||
|
|
||||||
The GNU Scientific Library (GSL) is a collection of routines for
|
The GNU Scientific Library (GSL) is a collection of routines for
|
||||||
@ -111,8 +198,22 @@ team in ANSI C, and present an Applications Programming Interface
|
|||||||
(API) for C programmers, while allowing wrappers to be written for very
|
(API) for C programmers, while allowing wrappers to be written for very
|
||||||
high level languages.
|
high level languages.
|
||||||
|
|
||||||
|
%{?with_hpc:%{hpc_master_package doc}}
|
||||||
|
|
||||||
|
%if %{with hpc}
|
||||||
|
%package module
|
||||||
|
Summary: Module files for %{name}
|
||||||
|
Group: Development/Libraries/Parallel
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description module
|
||||||
|
This package contains the environment module needed for the GSL
|
||||||
|
library packages.
|
||||||
|
%endif
|
||||||
|
# module package only installed thru dependency. No master package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n %{pname}-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6
|
%patch6
|
||||||
@ -120,15 +221,26 @@ high level languages.
|
|||||||
%patch8
|
%patch8
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
%if %{with hpc}
|
||||||
|
%hpc_debug
|
||||||
|
%hpc_setup_compiler
|
||||||
|
%endif
|
||||||
|
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
|
%if %{without hpc}
|
||||||
%configure \
|
%configure \
|
||||||
|
%else
|
||||||
|
%hpc_configure \
|
||||||
|
%endif
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--with-gnu-ld
|
--with-gnu-ld
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
# On i586 this still fails
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 0 )
|
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 0 )
|
||||||
%else
|
%else
|
||||||
@ -136,47 +248,112 @@ make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%{?with_hpc:%hpc_setup}
|
||||||
|
|
||||||
%make_install
|
%make_install
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
rm -f %{buildroot}%{_infodir}/dir
|
rm -f %{buildroot}%{p_infodir}/dir
|
||||||
|
|
||||||
%post -n %{lname} -p /sbin/ldconfig
|
%if %{with hpc}
|
||||||
%postun -n %{lname} -p /sbin/ldconfig
|
%{hpc_write_pkgconfig -n %{pname} -l lib%{pname}}
|
||||||
%post -n %{lcblasname} -p /sbin/ldconfig
|
|
||||||
%postun -n %{lcblasname} -p /sbin/ldconfig
|
%hpc_write_modules_files
|
||||||
|
#%%Module1.0#####################################################################
|
||||||
|
|
||||||
|
proc ModulesHelp { } {
|
||||||
|
|
||||||
|
puts stderr " "
|
||||||
|
puts stderr "This module loads the %{pname} library built with the %{compiler_family} compiler 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}"
|
||||||
|
module-whatis "%{url}"
|
||||||
|
|
||||||
|
set version %{version}
|
||||||
|
|
||||||
|
prepend-path PATH %{hpc_bindir}
|
||||||
|
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
|
||||||
|
|
||||||
|
setenv %{hpc_upcase %pname}_DIR %{hpc_prefix}
|
||||||
|
setenv %{hpc_upcase %pname}_BIN %{hpc_bindir}
|
||||||
|
setenv %{hpc_upcase %pname}_LIB %{hpc_libdir}
|
||||||
|
|
||||||
|
if {[file isdirectory %{hpc_includedir}]} {
|
||||||
|
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}
|
||||||
|
prepend-path INCLUDE %{hpc_includedir}
|
||||||
|
|
||||||
|
setenv %{hpc_upcase %pname}_INC %{hpc_includedir}
|
||||||
|
}
|
||||||
|
|
||||||
|
family "%pname"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post -n %{libname %_vers} -p /sbin/ldconfig
|
||||||
|
%postun -n %{libname %_vers} -p /sbin/ldconfig
|
||||||
|
%post -n %{libcblas %_vers} -p /sbin/ldconfig
|
||||||
|
%postun -n %{libcblas %_vers} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if %{with hpc}
|
||||||
|
%files module
|
||||||
|
%hpc_modules_files
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/gsl-histogram
|
%{?with_hpc:%hpc_dirs}
|
||||||
%{_bindir}/gsl-randist
|
%{?with_hpc:%dir %p_bindir}
|
||||||
%{_mandir}/man1/gsl-histogram.1%{?ext_man}
|
%{p_bindir}/gsl-histogram
|
||||||
%{_mandir}/man1/gsl-randist.1%{?ext_man}
|
%{p_bindir}/gsl-randist
|
||||||
|
%{?with_hpc:%dir %{p_mandir}}
|
||||||
|
%{?with_hpc:%dir %{p_mandir}/man1}
|
||||||
|
%{p_mandir}/man1/gsl-histogram.1%{?manext}
|
||||||
|
%{p_mandir}/man1/gsl-randist.1%{?manext}
|
||||||
|
|
||||||
%files -n %{lname}
|
%files -n %{libname %_vers}
|
||||||
%{_libdir}/libgsl.so.*
|
%{?with_hpc:%hpc_dirs}
|
||||||
|
%{?with_hpc:%dir %p_libdir}
|
||||||
|
%{p_libdir}/libgsl.so.*
|
||||||
|
|
||||||
%files -n %{lcblasname}
|
%files -n %{libcblas %_vers}
|
||||||
%{_libdir}/libgslcblas.so.*
|
%{?with_hpc:%hpc_dirs}
|
||||||
|
%{p_libdir}/libgslcblas.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_includedir}/gsl
|
%{?with_hpc:%hpc_dirs}
|
||||||
%{_libdir}/libgsl*.so
|
%{p_includedir}
|
||||||
%{_libdir}/pkgconfig/gsl.pc
|
%{?with_hpc:%dir %{p_includedir}/gsl}
|
||||||
%{_bindir}/gsl-config
|
%{p_libdir}/libgsl*.so
|
||||||
%{_datadir}/aclocal/gsl.m4
|
%{p_libdir}/pkgconfig
|
||||||
%{_mandir}/man1/gsl-config.1%{?ext_man}
|
%{p_libdir}/pkgconfig/gsl.pc
|
||||||
%{_mandir}/man3/gsl.3%{?ext_man}
|
%{p_bindir}/gsl-config
|
||||||
|
%{?with_hpc:%dir %p_datadir}
|
||||||
|
%dir %{p_datadir}/aclocal
|
||||||
|
%{p_datadir}/aclocal/gsl.m4
|
||||||
|
%{p_mandir}/man1/gsl-config.1%{?manext}
|
||||||
|
%{?with_hpc:%dir %{p_mandir}/man3}
|
||||||
|
%{p_mandir}/man3/gsl.3%{?manext}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
|
%doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc AUTHORS ChangeLog NEWS README THANKS TODO
|
%{?with_hpc:%hpc_dirs}
|
||||||
%{_infodir}/gsl-ref*
|
%{?with_hpc:%dir %p_infodir}
|
||||||
|
%{p_infodir}/gsl-ref*
|
||||||
|
|
||||||
%post doc
|
%post doc
|
||||||
%install_info --info-dir=%{_infodir} %{_infodir}/gsl-ref.info%{ext_info}
|
%install_info --info-dir=%{p_infodir} %{p_infodir}/gsl-ref.info%{ext_info}
|
||||||
|
|
||||||
%preun doc
|
%preun doc
|
||||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gsl-ref.info%{ext_info}
|
%install_info_delete --info-dir=%{p_infodir} %{p_infodir}/gsl-ref.info%{ext_info}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user