%global commit ef34ca9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: elastix Version: 5.3.1 Release: 7%{?dist} Summary: A toolbox for rigid and nonrigid registration of images License: Apache-2.0 URL: https://github.com/SuperElastix/elastix Source0: https://github.com/SuperElastix/elastix/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: InsightToolkit5-devel >= 5.4.6 BuildRequires: eigen3-devel BuildRequires: hdf5-devel %if 0%{?fedora} BuildRequires: libminc-devel %endif BuildRequires: gdcm-devel BuildRequires: openjpeg2-devel Requires: InsightToolkit5%{?_isa} # itk(abi): ITK_LEGACY_REMOVE changes class layouts at unchanged sonames, so the itk_ver floor alone let a # consumer built against the removed state install over the present one (python3-simpleitk -11 on ITK -23 # returned all-zero images). Equality on the legacy-state token; see InsightToolkit5.spec. Requires: itk(abi) = %{?itk_abi}%{!?itk_abi:UNSET} %description elastix is a toolbox for rigid and nonrigid registration of images. %prep %setup -q -c # Move the inner directory contents to the top level mv elastix*/* . || true # Clean up empty directory if it exists # Clean up empty directory if it exists find . -maxdepth 1 -type d -name "elastix*" -empty -delete # Remove bundled FindEigen3 which conflicts with system version (5.0 vs 3.4) rm -f CMake/FindEigen3.cmake %build # Pin the ITK layout state this build sees (see the Requires above). test -n "%{?itk_abi}" || { echo "ERROR: itk_abi undefined - needs InsightToolkit5-devel >= 5.4.7-24 (macros.itk)" >&2; exit 1; } %cmake \ -DCMAKE_CXX_STANDARD:STRING=17 \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DELASTIX_USE_EIGEN:BOOL=ON \ -DELASTIX_USE_OPENMP:BOOL=ON \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ -DITK_DIR:PATH=%{_prefix}/lib/cmake/ITK-5.4 %cmake_build %install %cmake_install # Remove development files that we are not packaging # Be very explicit about deleting potential duplicate locations rm -rf %{buildroot}%{_includedir} rm -rf %{buildroot}%{_libdir}/cmake rm -rf %{buildroot}/usr/lib/cmake rm -f %{buildroot}%{_libdir}/*.a rm -f %{buildroot}/usr/lib/*.a %files %license LICENSE %doc README.md %{_bindir}/elastix %{_bindir}/transformix %{_libdir}/libelx-ANNlib.so %changelog * Tue Oct 06 2026 Morgan Hough - 5.3.1-7 - Pin the ITK layout state: Requires: itk(abi) = %%{itk_abi}, from InsightToolkit5-devel's macros.itk, plus a %%build guard. ITK -23 flipped ITK_LEGACY_REMOVE back off, which changes class layouts at unchanged sonames; this package was built against -10..-21 (legacy removed) and the itk_ver floor let it install over -23, giving silent wrong results or crashes. Rebuild against ITK >= 5.4.7-24. * Sat Sep 19 2026 Morgan Hough - 5.3.1-6 - Rebuild against InsightToolkit5 5.4.7-8, which unbundles Eigen3, VXL and double-conversion. No source or spec change; the Release bump is what makes the rebuild reach anyone. COPR adds a sibling at an already-published NVR rather than replacing it, and dnf then serves the older copy -- so a rebuild at the same NVR would leave this package linked against the bundled ITK while appearing to succeed. - Validated against -8 in mhough/neurofedora-itk5-test before this bump. * Mon May 18 2026 Morgan Hough - 5.3.1-4 - Rebuild against InsightToolkit5 5.4.6 (GDCM CVE-2026-3650, F44 target) - Bump BuildRequires: InsightToolkit5-devel >= 5.4.6 * Thu Apr 23 2026 Morgan Hough - 5.3.1-1 - Update to 5.3.1 * Wed Feb 25 2026 Morgan Hough - 5.3.0-2 - Make libminc-devel BuildRequires conditional on Fedora (not available on EPEL 9; elastix gets MINC support transitively through ITK which is also built without MINC on EPEL) - Remove git-core BuildRequires (not needed in network-isolated mock/COPR builds) * Mon Feb 09 2026 Morgan Hough - 5.3.0-1 - Initial package for elastix 5.3.0 built against InsightToolkit 5.4