summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2026-05-04 19:57:15 +0200
committerRicardo Wurmus <rekado@elephly.net>2026-05-28 12:13:34 +0200
commit1cb339b691a250ee93de47f90689280854296edb (patch)
tree69dfc91b435017bd5e60dcacc1a1f7a82d8ea506 /gnu
parentcb0eb5800522a97a9cb3c839d967572886ba168e (diff)
gnu: simpleitk: Update to 2.5.4.
* gnu/packages/image-processing.scm (simpleitk): Update to 2.5.4. [source]: Add patch. * gnu/packages/patches/simpleitk-r-4.6.0.patch: New file. * gnu/local.mk (dist_patch_DATA): Record it. Change-Id: Id85b8a717046497bd8469c365c738ac984229e03
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/image-processing.scm8
-rw-r--r--gnu/packages/patches/simpleitk-r-4.6.0.patch46
3 files changed, 52 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 49f2cfeb1fb..0ea10e65c57 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2454,6 +2454,7 @@ dist_patch_DATA = \
2454 %D%/packages/patches/shared-mime-info-xdgmime-path.patch \ 2454 %D%/packages/patches/shared-mime-info-xdgmime-path.patch \
2455 %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ 2455 %D%/packages/patches/sharutils-CVE-2018-1000097.patch \
2456 %D%/packages/patches/showtime-python-3.11-compat.patch \ 2456 %D%/packages/patches/showtime-python-3.11-compat.patch \
2457 %D%/packages/patches/simpleitk-r-4.6.0.patch \
2457 %D%/packages/patches/sipwitch-fix-build-with-exosip5.patch \ 2458 %D%/packages/patches/sipwitch-fix-build-with-exosip5.patch \
2458 %D%/packages/patches/slim-config.patch \ 2459 %D%/packages/patches/slim-config.patch \
2459 %D%/packages/patches/slim-gcc-14.patch \ 2460 %D%/packages/patches/slim-gcc-14.patch \
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 2df830ef3a4..bc69fb9b478 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -1923,7 +1923,7 @@ and Scan Tailor Enhanced versions as well as including many more bug fixes.")
1923(define-public simpleitk 1923(define-public simpleitk
1924 (package 1924 (package
1925 (name "simpleitk") 1925 (name "simpleitk")
1926 (version "2.5.3") 1926 (version "2.5.4")
1927 (source 1927 (source
1928 (origin 1928 (origin
1929 (method git-fetch) 1929 (method git-fetch)
@@ -1932,7 +1932,9 @@ and Scan Tailor Enhanced versions as well as including many more bug fixes.")
1932 (commit (string-append "v" version)))) 1932 (commit (string-append "v" version))))
1933 (file-name (git-file-name name version)) 1933 (file-name (git-file-name name version))
1934 (sha256 1934 (sha256
1935 (base32 "0fvacjfq0p8v7r2cmzwwh7bxb6ayavznhj0m81dah463x472qkd2")))) 1935 (base32 "1bzj5naqbgv2b31iqgz7qqk9rixsvjqycjz6l7w3gm7v1aj14jpb"))
1936 (patches
1937 (search-patches "simpleitk-r-4.6.0.patch"))))
1936 (build-system cmake-build-system) 1938 (build-system cmake-build-system)
1937 (outputs '("out" "python" "r")) 1939 (outputs '("out" "python" "r"))
1938 (arguments 1940 (arguments
@@ -2032,7 +2034,7 @@ and Scan Tailor Enhanced versions as well as including many more bug fixes.")
2032 version "/SimpleITKData-" version ".tar.gz")) 2034 version "/SimpleITKData-" version ".tar.gz"))
2033 (sha256 2035 (sha256
2034 (base32 2036 (base32
2035 "0i4f87g1rh6xxisw06gwwyi8f216qqs6ih3gghi3k49vsl0h4g5d"))))) 2037 "0hryvi9fgqac00ng1bfhw3lm0al1dh0ka6jglba2q368nls428nx")))))
2036 (synopsis "Simplified interface to @acronym{ITK, Insight Toolkit}") 2038 (synopsis "Simplified interface to @acronym{ITK, Insight Toolkit}")
2037 (description 2039 (description
2038 "SimpleITK is an image analysis toolkit built on top of @acronym{ITK, 2040 "SimpleITK is an image analysis toolkit built on top of @acronym{ITK,
diff --git a/gnu/packages/patches/simpleitk-r-4.6.0.patch b/gnu/packages/patches/simpleitk-r-4.6.0.patch
new file mode 100644
index 00000000000..c5105e8b5a9
--- /dev/null
+++ b/gnu/packages/patches/simpleitk-r-4.6.0.patch
@@ -0,0 +1,46 @@
1From 1654599ea228efdd7b378ff44ed4e19d547641e0 Mon Sep 17 00:00:00 2001
2From: Bradley Lowekamp <blowekamp@mail.nih.gov>
3Date: Wed, 29 Apr 2026 16:22:49 +0000
4Subject: [PATCH 1/8] BUG: Replace removed CLOENV with R_ClosureEnv for R 4.6.0
5 compatibility
6
7R 4.6.0 removed the non-API macro CLOENV from its public headers.
8The replacement R_ClosureEnv() was added in R 4.5.0. Add a version-
9guarded backport so that builds against older R versions (< 4.5.0)
10continue to work.
11
12Fixes #2574
13---
14 Wrapping/R/sitkRCommand.cxx | 7 ++++++-
15 1 file changed, 6 insertions(+), 1 deletion(-)
16
17diff --git a/Wrapping/R/sitkRCommand.cxx b/Wrapping/R/sitkRCommand.cxx
18index 216a9327b8..c3a62bead9 100644
19--- a/Wrapping/R/sitkRCommand.cxx
20+++ b/Wrapping/R/sitkRCommand.cxx
21@@ -19,10 +19,15 @@
22 // The python header defines _POSIX_C_SOURCE without a preceding #undef
23 #include <iostream>
24 #include <Rinternals.h>
25+#include <Rversion.h>
26
27 #include "sitkRCommand.h"
28 #include "sitkExceptionObject.h"
29
30+// R_ClosureEnv was added in R 4.5.0, CLOENV was removed in R 4.6.0
31+#if R_VERSION < R_Version(4, 5, 0)
32+# define R_ClosureEnv(x) CLOENV(x)
33+#endif
34
35 namespace itk
36 {
37@@ -86,7 +91,7 @@ RCommand::SetFunctionClosure(SEXP FN)
38 // element
39 R_fcall = PROTECT(Rf_lang1(this->m_FunctionClosure));
40 this->SetCallbackRCallable(R_fcall);
41- this->SetCallbackREnviron(CLOENV(this->m_FunctionClosure));
42+ this->SetCallbackREnviron(R_ClosureEnv(this->m_FunctionClosure));
43 UNPROTECT(1);
44 }
45 }
46