diff --git a/.gitignore b/.gitignore index effa6a9..230f55f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,12 @@ /alglib-3.17.0.cpp.gpl.tgz /alglib-3.18.0.cpp.gpl.tgz /alglib-3.19.0.cpp.gpl.tgz +/alglib-3.20.0.cpp.gpl.tgz +/alglib-4.00.0.cpp.gpl.tgz +/alglib-4.01.0.cpp.gpl.tgz +/alglib-4.02.0.cpp.gpl.tgz +/alglib-4.03.0.cpp.gpl.tgz +/alglib-4.04.0.cpp.gpl.tgz +/alglib-4.05.0.cpp.gpl.tgz +/alglib-4.06.0.cpp.gpl.tgz +/alglib-4.07.0.cpp.gpl.tgz diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c8a871..250a57d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,24 +1,43 @@ -# Set the minimum required version of cmake for a project. -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.5) set(ALGLIB_VERSION "" CACHE STRING "The package version") +project(alglib + VERSION ${ALGLIB_VERSION} + LANGUAGES CXX +) + +include(GNUInstallDirs) + file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.h) file(GLOB_RECURSE SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.cpp) add_library(alglib SHARED ${SRC}) -set_target_properties(alglib PROPERTIES SUFFIX "-${ALGLIB_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") +set_target_properties(alglib PROPERTIES + SOVERSION ${PROJECT_VERSION} + VERSION ${PROJECT_VERSION} +) +target_include_directories(alglib PUBLIC + $ +) -add_executable(test_c tests/test_c.cpp) -add_executable(test_i tests/test_i.cpp) -# add_executable(test_x tests/test_x.cpp) -set_target_properties(test_c PROPERTIES COMPILE_FLAGS "-DAE_USE_ALLOC_COUNTER -DAE_DEBUG4POSIX") -set_target_properties(test_i PROPERTIES COMPILE_FLAGS "-DAE_USE_ALLOC_COUNTER -DAE_DEBUG4POSIX") -# set_target_properties(test_x PROPERTIES COMPILE_FLAGS "-DAE_USE_ALLOC_COUNTER -DAE_DEBUG4POSIX") -include_directories(src/) -target_link_libraries(test_c alglib) -target_link_libraries(test_i alglib) -# target_link_libraries(test_x alglib) +install(TARGETS alglib) +install(FILES ${HDR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alglib) -install(TARGETS alglib LIBRARY DESTINATION lib${LIB_SUFFIX}) -install(FILES ${HDR} DESTINATION include/alglib) +enable_testing() + +foreach(test IN ITEMS + test_c + test_i + # test_x +) + add_executable(${test} tests/${test}.cpp) + target_compile_definitions(${test} PRIVATE + AE_USE_ALLOC_COUNTER + AE_DEBUG4POSIX + ) + target_link_libraries(${test} PRIVATE alglib) + add_test(NAME ${test} + COMMAND ${test} + ) +endforeach() diff --git a/alglib.spec b/alglib.spec index 4c6ebeb..3a73cc4 100644 --- a/alglib.spec +++ b/alglib.spec @@ -1,12 +1,9 @@ -# Force out of source build -%undefine __cmake_in_source_build - Name: alglib -Version: 3.19.0 +Version: 4.07.0 Release: 2%{?dist} Summary: A numerical analysis and data processing library -License: GPLv2+ +License: GPL-2.0-or-later URL: http://www.alglib.net/ Source0: http://www.alglib.net/translator/re/%{name}-%{version}.cpp.gpl.tgz Source1: CMakeLists.txt @@ -15,7 +12,6 @@ Source2: bsd.txt BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: make %description ALGLIB is a cross-platform numerical analysis and data processing library. @@ -39,7 +35,7 @@ developing applications that use %{name}. %package doc Summary: API documentation for %{name} -License: BSD +License: ALGLIB-Documentation BuildArch: noarch %description doc @@ -52,8 +48,7 @@ cp %{SOURCE1} . cp %{SOURCE2} . # Fix permissions and line endings -chmod 644 gpl2.txt -chmod 644 manual.cpp.html +find -type f -exec chmod 0644 {} \; sed -i 's|\r||g' manual.cpp.html @@ -64,22 +59,15 @@ sed -i 's|\r||g' manual.cpp.html %install %cmake_install -ln -s libalglib-%{version}.so %{buildroot}%{_libdir}/libalglib.so %check -pushd %{_vpath_builddir} -LD_LIBRARY_PATH=$PWD ./test_c -LD_LIBRARY_PATH=$PWD ./test_i -popd - - -%ldconfig_scriptlets +%ctest %files %license gpl2.txt -%{_libdir}/libalglib-3.19.0.so +%{_libdir}/libalglib.so.4.7.0 %files devel %{_includedir}/%{name}/ @@ -91,6 +79,67 @@ popd %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 4.07.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Mon Dec 29 2025 Sandro Mani - 4.07.0-1 +- Update to 4.07.0 + +* Thu Oct 09 2025 Sandro Mani - 4.06.0-1 +- Update to 4.06.0 + +* Wed Jul 23 2025 Fedora Release Engineering - 4.05.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Wed Jul 16 2025 Sandro Mani - 4.05.0-2 +- Increase minimum cmake version, adapt library version + +* Mon Jun 09 2025 Sandro Mani - 4.05.0-1 +- Update to 4.05.0 + +* Fri May 30 2025 Cristian Le - 4.04.0-3 +- Allow to build with CMake 4.0 +- Use more modern CMake patterns + +* Thu Jan 16 2025 Fedora Release Engineering - 4.04.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Dec 22 2024 Sandro Mani - 4.04.0-1 +- Update to 4.04.0 + +* Sun Sep 29 2024 Sandro Mani - 4.03.0-1 +- Update to 4.03.0 + +* Wed Aug 28 2024 Miroslav Suchý - 4.02.0-3 +- convert license to SPDX + +* Wed Jul 17 2024 Fedora Release Engineering - 4.02.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 04 2024 Sandro Mani - 4.02.0-1 +- Update to 4.02.0 + +* Mon Jan 22 2024 Fedora Release Engineering - 4.01.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 4.01.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 01 2024 Sandro Mani - 4.01.0-1 +- Update to 4.01.0 + +* Wed Jul 19 2023 Fedora Release Engineering - 4.00.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue May 23 2023 Sandro Mani - 4.0.0-1 +- Update to 4.0.0 + +* Wed Jan 18 2023 Fedora Release Engineering - 3.20.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Dec 21 2022 Sandro Mani - 3.20.0-1 +- Update to 3.20.0 + * Wed Jul 20 2022 Fedora Release Engineering - 3.19.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 4cefdab..0594e7e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (alglib-3.19.0.cpp.gpl.tgz) = 787112bfd4b84c8203a5bbba3d9fcf194ee4a3f192068013400b3d1de8d5d51433479da5cfb740da1be447053896526534a04eb79ba9516d69702a2b44f5d869 +SHA512 (alglib-4.07.0.cpp.gpl.tgz) = abc0a5aecec019eb4fcb5b3a5a95e88ed1154a52f7348f944dee4ebc8079cddfc00de30b45c6a846a201d4064e55dbcad2afe09df5e74d51120f83277704d733