e2a7b82
Name:           alglib
7aa86df
Version:        3.10.0
a0215fd
Release:        3%{?dist}
e2a7b82
Summary:        A numerical analysis and data processing library
e2a7b82
e2a7b82
License:        GPLv2+
e2a7b82
URL:            http://www.alglib.net/
a894e08
Source0:        http://www.alglib.net/translator/re/%{name}-%{version}.cpp.gpl.tgz
e2a7b82
Source1:        CMakeLists.txt
e2a7b82
# Extracted from manual.cpp.html
e2a7b82
Source2:        bsd.txt
e2a7b82
e2a7b82
BuildRequires:  cmake
e2a7b82
e2a7b82
%description
e2a7b82
ALGLIB is a cross-platform numerical analysis and data processing library.
e2a7b82
ALGLIB features include:
e2a7b82
 - Data analysis (classification/regression, including neural networks)
e2a7b82
 - Optimization and nonlinear solvers
e2a7b82
 - Interpolation and linear/nonlinear least-squares fitting
e2a7b82
 - Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear
e2a7b82
   solvers, Fast Fourier Transform and many other algorithms (numerical
e2a7b82
   integration, ODEs, statistics, special functions)
e2a7b82
e2a7b82
e2a7b82
e2a7b82
%package        devel
e2a7b82
Summary:        Development files for %{name}
e2a7b82
Requires:       %{name}%{?_isa} = %{version}-%{release}
e2a7b82
e2a7b82
%description    devel
e2a7b82
The %{name}-devel package contains libraries and header files for
e2a7b82
developing applications that use %{name}.
e2a7b82
e2a7b82
%package        doc
e2a7b82
Summary:        API documentation for %{name}
e2a7b82
License:        BSD
e2a7b82
BuildArch:      noarch
e2a7b82
e2a7b82
%description    doc
e2a7b82
The %{name}-doc package contains the %{name} API documentation.
e2a7b82
e2a7b82
e2a7b82
%prep
15ef739
%setup -q -n cpp
e2a7b82
cp %{SOURCE1} .
e2a7b82
cp %{SOURCE2} .
e2a7b82
e2a7b82
# Fix permissions and line endings
e2a7b82
chmod 644 gpl2.txt
e2a7b82
chmod 644 manual.cpp.html
e2a7b82
sed -i 's|\r||g' manual.cpp.html
e2a7b82
e2a7b82
e2a7b82
%build
e2a7b82
mkdir build
e2a7b82
(
e2a7b82
cd build
Marcin Juszkiewicz 573bfaf
# disable FMA support to get it pass all tests
Marcin Juszkiewicz 573bfaf
%ifarch aarch64 %{power64} s390 s390x
Marcin Juszkiewicz 573bfaf
export CXXFLAGS="$RPM_OPT_FLAGS -ffp-contract=off"
Marcin Juszkiewicz 573bfaf
export CFLAGS="$RPM_OPT_FLAGS -ffp-contract=off"
Marcin Juszkiewicz 573bfaf
%endif
a894e08
%cmake -DALGLIB_VERSION=%{version} ..
e2a7b82
make %{?_smp_mflags}
e2a7b82
)
e2a7b82
e2a7b82
e2a7b82
%install
e2a7b82
%make_install -C build
a894e08
ln -s libalglib-%{version}.so %{buildroot}%{_libdir}/libalglib.so
a894e08
e2a7b82
e2a7b82
%check
e2a7b82
pushd build
15ef739
LD_LIBRARY_PATH=$PWD ./test_c || exit 1
15ef739
LD_LIBRARY_PATH=$PWD ./test_i || exit 1
e2a7b82
popd
e2a7b82
e2a7b82
e2a7b82
%post -p /sbin/ldconfig
e2a7b82
e2a7b82
%postun -p /sbin/ldconfig
e2a7b82
e2a7b82
e2a7b82
%files
7aa86df
%license gpl2.txt
a894e08
%{_libdir}/libalglib-%{version}.so
e2a7b82
e2a7b82
%files devel
e2a7b82
%{_includedir}/%{name}/
e2a7b82
%{_libdir}/libalglib.so
e2a7b82
e2a7b82
%files doc
7aa86df
%license bsd.txt
7aa86df
%doc manual.cpp.html
e2a7b82
e2a7b82
e2a7b82
%changelog
a0215fd
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-3
a0215fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a0215fd
Marcin Juszkiewicz 573bfaf
* Fri Sep 18 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 3.10.0-2
Marcin Juszkiewicz 573bfaf
- disable FMA support to get it pass all tests on secondary architectures
Marcin Juszkiewicz 573bfaf
7aa86df
* Sat Aug 22 2015 Sandro Mani <manisandro@gmail.com> - 3.10.0-1
7aa86df
- Update to 3.10.0
7aa86df
07bd21e
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.0-3
07bd21e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
07bd21e
a32b07b
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.9.0-2
a32b07b
- Rebuilt for GCC 5 C++11 ABI change
a32b07b
a894e08
* Sat Dec 13 2014 Sandro Mani <manisandro@gmail.com> - 3.9.0-1
a894e08
- Update to 3.9.0
a894e08
- Use version as library name suffix, not as soname
a894e08
e9e9483
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.2-6
e9e9483
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e9e9483
9e865b6
* Wed Jul 9 2014 Jakub ńĆajka <jcajka@redhat.com> - 3.8.2-5
9e865b6
- Made exlusive for primary archs
9e865b6
e2a7b82
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-4
e2a7b82
- Add missing license tag
e2a7b82
e2a7b82
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-3
e2a7b82
- Add bsd.txt to doc subpackage (license text extracted from manual.cpp.html)
e2a7b82
e2a7b82
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-2
e2a7b82
- Add doc subpackage with correct license
e2a7b82
- Run tests
e2a7b82
- Fix unversioned so included in main package
e2a7b82
- Fix manual.cpp.html permissions, line endings
e2a7b82
e2a7b82
* Sat Jun 14 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-1
e2a7b82
- Initial package