# Armadillo 14.x as a PARALLEL-INSTALLABLE versioned package, the way gcc ships gcc13/gcc14: # it installs next to the default `armadillo` (15.x) without sharing a single file. # # Why it exists. Armadillo's soname is its major version, so the runtime libraries # (libarmadillo.so.14 / .15) never collide. The headers and the dev symlink would, so this # package keeps its own: # # headers /usr/include/armadillo14/{armadillo,armadillo_bits/} -I/usr/include/armadillo14 # dev link /usr/lib64/armadillo14/libarmadillo.so -L/usr/lib64/armadillo14 # pkg-config armadillo14.pc pkg-config --cflags --libs armadillo14 # CMake /usr/share/Armadillo14/CMake/Armadillo14Config.cmake find_package(Armadillo14 CONFIG) # # Who needs 14 and not 15: FSL. armawrap vendors Armadillo 14.2.1, so this is the unbundling # target that matches what FSL was written and tested against (14.6.3 is the newest 14.x, same # major, bugfixes only), while `armadillo` stays the distro default for everything else. # Anything that is happy with 15.x should use `armadillo-devel` and ignore this package. # # Everything about the build mirrors armadillo.spec: FlexiBLAS, SuperLU enabled and asserted, # HDF5 an upstream opt-in. tests/armadillo.bats (ARMA_PKG=armadillo14) and # tests/armadillo-parallel.bats are the acceptance suites. Name: armadillo14 Version: 14.6.3 Release: 1%{?dist} Summary: Fast C++ matrix library, 14.x series (parallel-installable with armadillo) License: Apache-2.0 URL: https://arma.sourceforge.net/ Source0: https://sourceforge.net/projects/arma/files/armadillo-%{version}.tar.xz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: make BuildRequires: arpack-devel BuildRequires: hdf5-devel BuildRequires: SuperLU-devel BuildRequires: flexiblas-devel %description Armadillo is a C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. This is the 14.x series, installable alongside the default armadillo package: its headers are in /usr/include/armadillo14 and its development link in /usr/lib64/armadillo14, selected with -I/-L or pkg-config armadillo14. %package devel Summary: Development files for the Armadillo 14.x C++ library Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libstdc++-devel Requires: arpack-devel Requires: hdf5-devel Requires: SuperLU-devel Requires: flexiblas-devel %description devel Headers, the development link, pkg-config and CMake files and the documentation for the Armadillo 14.x series. Does not conflict with armadillo-devel. %prep %autosetup -n armadillo-%{version} -p1 sed -i 's/\r//' README.md rm -rf examples/*win64* %build export CMAKE_POLICY_VERSION_MINIMUM=3.5 %cmake -DALLOW_FLEXIBLAS_LINUX=ON -DCMAKE_INSTALL_INCLUDEDIR=include/armadillo14 %cmake_build %install %cmake_install # --- make every dev-time path versioned so nothing collides with armadillo-devel ---------- # 1. the unversioned dev link moves into its own directory mkdir -p %{buildroot}%{_libdir}/armadillo14 rm -f %{buildroot}%{_libdir}/libarmadillo.so ln -s ../libarmadillo.so.14 %{buildroot}%{_libdir}/armadillo14/libarmadillo.so # 2. pkg-config: a different file name, and a -L that finds the versioned dev link mv %{buildroot}%{_libdir}/pkgconfig/armadillo.pc %{buildroot}%{_libdir}/pkgconfig/armadillo14.pc sed -i -e 's|^Name: armadillo$|Name: armadillo14|' \ -e 's|^libdir=.*|libdir=%{_libdir}/armadillo14|' \ %{buildroot}%{_libdir}/pkgconfig/armadillo14.pc # 3. CMake: Armadillo14Config.cmake in Armadillo14/CMake, so find_package(Armadillo14 CONFIG) works # and find_package(Armadillo) still finds the default package. mv %{buildroot}%{_datadir}/Armadillo %{buildroot}%{_datadir}/Armadillo14 cm=%{buildroot}%{_datadir}/Armadillo14/CMake mv "$cm/ArmadilloConfig.cmake" "$cm/Armadillo14Config.cmake" mv "$cm/ArmadilloConfigVersion.cmake" "$cm/Armadillo14ConfigVersion.cmake" sed -i -e 's|"%{_includedir}"|"%{_includedir}/armadillo14"|' \ -e 's|"%{_libdir}"|"%{_libdir}/armadillo14"|' \ -e 's|%{_datadir}/Armadillo/CMake|%{_datadir}/Armadillo14/CMake|g' \ "$cm/Armadillo14Config.cmake" # --- assertions: this package is only worth shipping if all of the above is true ----------- cfg=%{buildroot}%{_includedir}/armadillo14/armadillo_bits/config.hpp for d in ARMA_USE_WRAPPER ARMA_USE_LAPACK ARMA_USE_BLAS ARMA_USE_ARPACK ARMA_USE_SUPERLU; do grep -Eq "^[[:space:]]*#define[[:space:]]+${d}\b" "$cfg" || { echo "config.hpp does not define ${d}" >&2; exit 1; } done # nothing may land in a path the default package owns test ! -e %{buildroot}%{_includedir}/armadillo test ! -e %{buildroot}%{_includedir}/armadillo_bits test ! -e %{buildroot}%{_libdir}/libarmadillo.so test ! -e %{buildroot}%{_libdir}/pkgconfig/armadillo.pc test ! -e %{buildroot}%{_datadir}/Armadillo %check %global _vpath_builddir %{_vpath_builddir}-test export CMAKE_POLICY_VERSION_MINIMUM=3.5 %cmake -DALLOW_FLEXIBLAS_LINUX=ON -DBUILD_SMOKE_TEST=ON %cmake_build %ctest %files %{_libdir}/libarmadillo.so.14* %license LICENSE.txt NOTICE.txt %files devel %dir %{_libdir}/armadillo14 %{_libdir}/armadillo14/libarmadillo.so %{_libdir}/pkgconfig/armadillo14.pc %{_includedir}/armadillo14/ %{_datadir}/Armadillo14/ %doc README.md %doc index.html %doc docs.html %doc examples %changelog * Mon Oct 05 2026 Morgan Hough - 14.6.3-1 - New parallel-installable versioned package, after gcc's gcc13/gcc14 model: the 14.x series installs next to the default armadillo (15.x). Runtime libraries differ by soname; headers, the dev link, pkg-config and CMake files are all versioned (armadillo14). - Purpose: the unbundling target for FSL, whose armawrap vendors Armadillo 14.2.1.