%global commit 10d8fbd %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260331 %global python3_sitearch %(%{__python3} -c "import sysconfig; print(sysconfig.get_path('platlib'))") Name: vmtk Version: 1.5.0 Release: 0.1.%{snapdate}git%{shortcommit}%{?dist} Summary: The Vascular Modeling Toolkit License: BSD-3-Clause URL: https://github.com/m9h/vmtk Source0: %{url}/archive/%{commit}/vmtk-%{shortcommit}.tar.gz # Pre-downloaded vtkAddon cmake files (build-time network access not allowed) Source1: vtkAddon-cmake.tar.gz # TetGen 1.4.3 is bundled (VMTK API requires 1.4.x; system tetgen is 1.5.0 with # incompatible API). Bundled TetGen 1.4.3 has a modified MIT license that # restricts commercial distribution — acceptable for COPR but not official Fedora. BuildRequires: cmake >= 3.20 BuildRequires: gcc-c++ BuildRequires: make BuildRequires: python3-devel BuildRequires: vtk-devel >= 9.2 BuildRequires: InsightToolkit5-devel >= 5.3.0 BuildRequires: eigen3-devel Requires: vtk%{?_isa} Requires: InsightToolkit5%{?_isa} Requires: python3-vtk Provides: bundled(OpenNL) Provides: bundled(tetgen) = 1.4.3 %description The Vascular Modeling Toolkit (VMTK) is a collection of libraries and tools for 3D reconstruction, geometric analysis, mesh generation, and surface data analysis for image-based modeling of blood vessels. VMTK provides tools for centerline extraction, branch geometry computation, bifurcation analysis, vessel segmentation (level sets, active contours, fast marching), and surface parameterization. It includes both C++ libraries with Python bindings and high-level Python scripts for vascular analysis workflows. Includes bundled TetGen 1.4.3 for tetrahedral mesh generation. %package devel Summary: Development files for VMTK Requires: %{name}%{?_isa} = %{version}-%{release} Requires: vtk-devel%{?_isa} %description devel Development headers and CMake configuration files for building applications that use the VMTK C++ libraries. %prep %autosetup -n vmtk-10d8fbd2a175dead9b2112f70acc26a48c738262 # Install pre-downloaded vtkAddon cmake files tar xf %{SOURCE1} -C CMake/ # Patch CMake/CMakeLists.txt to skip network downloads (files already present) cat > CMake/CMakeLists.txt << 'CMEOF' set(vtkAddon_CMAKE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to vtkAddon CMake directory") CMEOF %build export CXXFLAGS="%{optflags} -Wno-template-body" %cmake \ -DVMTK_USE_SUPERBUILD:BOOL=OFF \ -DUSE_SYSTEM_VTK:BOOL=ON \ -DUSE_SYSTEM_ITK:BOOL=ON \ -DVMTK_USE_VTK9:BOOL=ON \ -DVMTK_USE_ITK5:BOOL=ON \ -DVTK_VMTK_WRAP_PYTHON:BOOL=ON \ -DVTK_VMTK_BUILD_TETGEN:BOOL=ON \ -DVMTK_BUILD_TESTING:BOOL=OFF \ -DBUILD_VMTK_DOCUMENTATION:BOOL=OFF \ -DVMTK_SCRIPTS_ENABLED:BOOL=ON \ -DVMTK_USE_RENDERING:BOOL=ON \ -DVTK_VMTK_CONTRIB:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DVMTK_WITH_LIBRARY_VERSION:BOOL=ON \ -DVMTK_MODULE_INSTALL_LIB_DIR:PATH=%{python3_sitearch}/vmtk %cmake_build %install %cmake_install %files %license LICENSE Copyright.txt %doc README %{_bindir}/vmtk %{_libdir}/libvtkvmtk*.so.* %{python3_sitearch}/vmtk/ %{python3_sitearch}/vmtkScripts/ %{python3_sitearch}/PypeS/ %files devel %{_libdir}/libvtkvmtk*.so %{_includedir}/vmtk/ %{_libdir}/VMTKConfig.cmake %{_libdir}/VMTKUse.cmake %changelog * Wed Apr 01 2026 Morgan Hough - 1.5.0-0.1.%{snapdate}git%{shortcommit} - Initial package from modernize-build branch - Build against system VTK 9 and ITK 5 - Exclude TetGen (non-free license)