diff options
| author | Jake Forster <jakecameron.forster@gmail.com> | 2025-06-22 12:02:49 +0930 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-06-30 14:30:40 +0200 |
| commit | aa2f243ab724ead8f7c06f0a9dc8c1a4874de7fe (patch) | |
| tree | c901613e34accaa47c6674b9061edd0755d264c2 /gnu/packages/image-processing.scm | |
| parent | cd8f7f8d891a787ac6c275f04405676c7586b7ff (diff) | |
gnu: insight-toolkit: Update to 5.4.4.
* gnu/packages/image-processing (insight-toolkit): Update to 5.4.4.
[source] Switch to git-fetch; apply patch.
[arguments]<#:configure-flags>: Add -DITK_USE_SYSTEM_SWIG=ON,
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON, -DITK_USE_PYTHON_LIMITED_API=OFF and
-DBUILD_TESTING=OFF. Add -DHDF5_DIR set to HDF5's lib/cmake.
[inputs]: Add libaec.
[native-inputs]: Add git-minimal; replace swig with swig-next.
* gnu/packages/patches/insight-toolkit-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
Change-Id: Ifbf73709e773649fb00c2d46848d3418daaf98c1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/image-processing.scm')
| -rw-r--r-- | gnu/packages/image-processing.scm | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index c84290205df..cf6da9bbb50 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com> ;;; Copyright © 2023 Cairn <cairn@pm.me> ;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr> +;;; Copyright © 2025 Jake Forster <jakecameron.forster@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1238,15 +1239,20 @@ libraries designed for computer vision research and implementation.") (define-public insight-toolkit (package (name "insight-toolkit") - (version "5.0.0") + (version "5.4.4") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/InsightSoftwareConsortium/ITK/" - "releases/download/v" version "/InsightToolkit-" - version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/InsightSoftwareConsortium/ITK") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0bs63mk4q8jmx38f031jy5w5n9yy5ng9x8ijwinvjyvas8cichqi")))) + (base32 "1l5rby8jj8726k380aivycmhn56cz56mr9k3r56c8hkkrfwwng50")) + ;; This patch is required to build with both ITK_USE_GPU=ON and + ;; ITK_WRAP_PYTHON=ON. + ;; <https://github.com/InsightSoftwareConsortium/ITK/pull/4842> + (patches (search-patches "insight-toolkit-fix-build.patch")))) (build-system cmake-build-system) (outputs '("out" "python")) (arguments @@ -1255,7 +1261,15 @@ libraries designed for computer vision research and implementation.") #~(list "-DITK_USE_GPU=ON" "-DITK_USE_SYSTEM_LIBRARIES=ON" "-DITK_USE_SYSTEM_CASTXML=ON" + "-DITK_USE_SYSTEM_SWIG=ON" + (string-append "-DHDF5_DIR=" #$(this-package-input "hdf5") + "/lib/cmake") "-DBUILD_SHARED_LIBS=ON" + ;; Without this flag, there are shared libraries installed + ;; in PY_SITE_PACKAGES_PATH/itk instead of #$output/lib and + ;; RUNPATHs contain the *build directory* of + ;; PY_SITE_PACKAGES_PATH/itk. + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" "-DITK_WRAPPING=ON" "-DITK_WRAP_PYTHON=ON" "-DITK_DYNAMIC_LOADING=ON" @@ -1267,7 +1281,10 @@ libraries designed for computer vision research and implementation.") "/lib/python" python-version "/site-packages"))) (string-append "-DPY_SITE_PACKAGES_PATH=" python-lib-path)) - "-DCMAKE_CXX_STANDARD=17") + ;; Python is not built with Py_LIMITED_API. + "-DITK_USE_PYTHON_LIMITED_API=OFF" + "-DCMAKE_CXX_STANDARD=17" + "-DBUILD_TESTING=OFF") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'do-not-tune @@ -1298,6 +1315,7 @@ libraries designed for computer vision research and implementation.") fftw fftwf hdf5 + libaec libjpeg-turbo libpng libtiff @@ -1308,7 +1326,7 @@ libraries designed for computer vision research and implementation.") vxl-1 zlib)) (native-inputs - (list castxml pkg-config swig which)) + (list castxml git-minimal pkg-config swig-next which)) ;; The 'CMake/ITKSetStandardCompilerFlags.cmake' file normally sets ;; '-mtune=native -march=corei7', suggesting there's something to be |
