%define major 3 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Name: alglib Version: 3.15.0 Release: %mkrel 1 Summary: A numerical analysis and data processing library Group: System/Libraries License: GPLv2+ URL: http://www.alglib.net/ Source0: http://www.alglib.net/translator/re/%{name}-%{version}.cpp.gpl.tgz Source1: ALGLIBConfig.cmake # Extracted from manual.cpp.html Source2: bsd.txt # Make test output more verbose Patch0: alglib_verbose-tests.patch # From Debian: Patch1: 01_add_cmake.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: make %description ALGLIB is a cross-platform numerical analysis and data processing library. ALGLIB features include: - Data analysis (classification/regression, including neural networks) - Optimization and nonlinear solvers - Interpolation and linear/nonlinear least-squares fitting - Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers, Fast Fourier Transform and many other algorithms (numerical integration, ODEs, statistics, special functions) %package -n %{libname} Summary: Shared %{name} library Group: System/Libraries %description -n %{libname} ALGLIB is a cross-platform numerical analysis and data processing library. ALGLIB features include: - Data analysis (classification/regression, including neural networks) - Optimization and nonlinear solvers - Interpolation and linear/nonlinear least-squares fitting - Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers, Fast Fourier Transform and many other algorithms (numerical integration, ODEs, statistics, special functions) This package provides the shared %{name} library. %package -n %{develname} Summary: Development files for %{name} Group: Development/C Requires: %{libname} >= %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} The %{develname} package contains libraries and header files for developing applications that use %{name}. %package doc Summary: API documentation for %{name} License: BSD BuildArch: noarch %description doc The %{name}-doc package contains the %{name} API documentation. %prep %autosetup -p1 -n cpp cp %{SOURCE1} . cp %{SOURCE2} . # Set version and soversion in cmake file %define soversion %(echo %{version}|cut -d. -f1,4) sed -i 's|\${VERSION}|%{version}|' CMakeLists.txt sed -i 's|\${SOVERSION}|%{soversion}|' CMakeLists.txt # Fix permissions and line endings chmod 644 gpl2.txt chmod 644 manual.cpp.html sed -i 's|\r||g' manual.cpp.html %build # disable FMA support to get it pass all tests %ifarch aarch64 %{power64} s390 s390x export CXXFLAGS="%{optflags} -ffp-contract=off" export CFLAGS="%{optflags} -ffp-contract=off" %endif %cmake %make_build %install %make_install -C build %if 0 %check pushd build # FIXME Temporarily ignore test failures on test_c due to GCC7 test failure on i686, see # http://bugs.alglib.net/view.php?id=689 %ifarch %{ix86} LD_LIBRARY_PATH=$PWD ./test_c || true %else LD_LIBRARY_PATH=$PWD ./test_c || false %endif LD_LIBRARY_PATH=$PWD ./test_i || false popd %endif %files -n %{libname} %license gpl2.txt %{_libdir}/libalglib.so.%{major}{,.*} %files -n %{develname} %{_includedir}/%{name}/ %{_libdir}/libalglib.so %{_libdir}/cmake/ALGLIB/ %files doc %license bsd.txt %doc manual.cpp.html %changelog * Sat Feb 23 2019 daviddavid <daviddavid> 3.15.0-1.mga7 + Revision: 1369452 - new version: 3.15.0 * Fri Sep 21 2018 umeabot <umeabot> 3.14.0-2.mga7 + Revision: 1294280 - Mageia 7 Mass Rebuild * Mon Jun 25 2018 daviddavid <daviddavid> 3.14.0-1.mga7 + Revision: 1239582 - new version: 3.14.0 * Sun Apr 15 2018 daviddavid <daviddavid> 3.13.0-1.mga7 + Revision: 1218898 - initial package alglib