aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/HDF5Plugin-Zstandard/HDF5Plugin-Zstandard-0_pre20201121-r1.ebuild (renamed from sci-libs/HDF5Plugin-Zstandard/HDF5Plugin-Zstandard-0_pre20201121.ebuild)4
-rw-r--r--sci-libs/bids-validator/bids-validator-1.4.4.ebuild6
-rw-r--r--sci-libs/gdcm/Manifest2
-rw-r--r--sci-libs/gdcm/files/gdcm-3.0.14-include-math-h.patch15
-rw-r--r--sci-libs/gdcm/files/gdcm_support_vtk9.patch70
-rw-r--r--sci-libs/gdcm/gdcm-3.0.14.ebuild121
-rw-r--r--sci-libs/gdcm/metadata.xml14
-rw-r--r--sci-libs/itk/Manifest17
-rw-r--r--sci-libs/itk/files/0001-BUG-Wrap-TransformFileReader-TransformFileWriter.patch50
-rw-r--r--sci-libs/itk/files/0002-COMP-Fixed-itkQuasiNewtonOptimizerv4-wrapping-warnin.patch28
-rw-r--r--sci-libs/itk/files/0003-COMP-Fixed-itkGradientDescentOptimizerv4-wrapping-wa.patch73
-rw-r--r--sci-libs/itk/files/0004-COMP-Warp-OptimizerParameterScalesEstimatorTemplate.patch30
-rw-r--r--sci-libs/itk/files/0005-make-gdcm-helper-library-static.patch11
-rw-r--r--sci-libs/itk/files/ITKModuleRemote.patch45
-rw-r--r--sci-libs/itk/files/itk-5.1.0-downloads.patch20
-rw-r--r--sci-libs/itk/files/itk-5.1.0-include_limits.patch10
-rw-r--r--sci-libs/itk/files/itk-5.2.1-fix-castxml-clang-attr-malloc.patch25
-rw-r--r--sci-libs/itk/files/itk-5.2.1-system-openjpeg.patch558
-rw-r--r--sci-libs/itk/files/itk-5.2.1-system-tiff-has-64.patch18
-rw-r--r--sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch309
-rw-r--r--sci-libs/itk/files/nrrdio-linking.patch15
-rw-r--r--sci-libs/itk/files/tests.patch41
-rw-r--r--sci-libs/itk/itk-5.0.1.ebuild178
-rw-r--r--sci-libs/itk/itk-5.2.1-r2.ebuild (renamed from sci-libs/itk/itk-5.1.0.ebuild)111
-rw-r--r--sci-libs/labbookdb/labbookdb-0.1.ebuild6
-rw-r--r--sci-libs/mlpack/Manifest2
-rw-r--r--sci-libs/mlpack/metadata.xml27
-rw-r--r--sci-libs/mlpack/mlpack-3.4.1.ebuild112
-rw-r--r--sci-libs/mlpack/mlpack-3.4.2.ebuild118
-rw-r--r--sci-libs/nibabel/Manifest1
-rw-r--r--sci-libs/nibabel/nibabel-2.5.1.ebuild42
-rw-r--r--sci-libs/nibabel/nibabel-3.0.2.ebuild6
-rw-r--r--sci-libs/nibabel/nibabel-3.2.1.ebuild15
-rw-r--r--sci-libs/nibabel/nibabel-9999.ebuild37
-rw-r--r--sci-libs/nipy/Manifest3
-rw-r--r--sci-libs/nipy/nipy-0.4.2.ebuild10
-rw-r--r--sci-libs/nipy/nipy-0.5.0.ebuild52
-rw-r--r--sci-libs/nipy/nipy-9999.ebuild54
-rw-r--r--sci-libs/nipype/files/nipype-1.5.0-collections.patch28
-rw-r--r--sci-libs/nipype/nipype-1.5.0.ebuild20
-rw-r--r--sci-libs/pybids/Manifest1
-rw-r--r--sci-libs/pybids/pybids-0.10.2.ebuild16
-rw-r--r--sci-libs/pybids/pybids-0.11.1.ebuild40
-rw-r--r--sci-libs/pybids/pybids-0.12.4.ebuild12
-rw-r--r--sci-libs/pybids/pybids-0.6.5.ebuild6
-rw-r--r--sci-libs/simpleitk/simpleitk-1.2.4.ebuild6
-rw-r--r--sci-libs/torchvision/torchvision-0.11.2.ebuild2
47 files changed, 1363 insertions, 1024 deletions
diff --git a/sci-libs/HDF5Plugin-Zstandard/HDF5Plugin-Zstandard-0_pre20201121.ebuild b/sci-libs/HDF5Plugin-Zstandard/HDF5Plugin-Zstandard-0_pre20201121-r1.ebuild
index a74996b46..d1257f0ee 100644
--- a/sci-libs/HDF5Plugin-Zstandard/HDF5Plugin-Zstandard-0_pre20201121.ebuild
+++ b/sci-libs/HDF5Plugin-Zstandard/HDF5Plugin-Zstandard-0_pre20201121-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-DEPEND="app-arch/zstd >=sci-libs/hdf5-1.12.2-r2"
+DEPEND="app-arch/zstd >=sci-libs/hdf5-1.12.2-r5"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${PN}-${COMMIT}
diff --git a/sci-libs/bids-validator/bids-validator-1.4.4.ebuild b/sci-libs/bids-validator/bids-validator-1.4.4.ebuild
index 00bf81571..c47095d79 100644
--- a/sci-libs/bids-validator/bids-validator-1.4.4.ebuild
+++ b/sci-libs/bids-validator/bids-validator-1.4.4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
diff --git a/sci-libs/gdcm/Manifest b/sci-libs/gdcm/Manifest
new file mode 100644
index 000000000..64b9caefd
--- /dev/null
+++ b/sci-libs/gdcm/Manifest
@@ -0,0 +1,2 @@
+DIST gdcm-3.0.14.tar.bz2 2992355 BLAKE2B a97209a8bb6896095bfc59ac974b667386c8711f20118252567cf983f15165d259da7858ccfd6bfdfbb25194d7687c98512953b480913acec4bf6d176af7a005 SHA512 9c7d70723d288bf116a8b594c02dd965a4e80476e1c79a7c3cbd09584a229c83ad67f082c9b286305e3bb64150c8267ced06b5fb963adbeeb36e383f76612220
+DIST gdcmData.tar.gz 121157465 BLAKE2B 19b13efc2094d3e373f0f658f1120b1c83ea6da1be73fb392b815433725b4a6db2debb9ab7d9f2caa665637f152f70694cdf226c934850dfda344107050a14a6 SHA512 ddc67a7a0b41b2d6e1e03defb6fb8a06ceeb2e9dd9bb47dfa4f7283d79df7c1e52577b799c00e930719ae6cdda46bded9497a67b8241359f238f5366085ec9ee
diff --git a/sci-libs/gdcm/files/gdcm-3.0.14-include-math-h.patch b/sci-libs/gdcm/files/gdcm-3.0.14-include-math-h.patch
new file mode 100644
index 000000000..ba99c3547
--- /dev/null
+++ b/sci-libs/gdcm/files/gdcm-3.0.14-include-math-h.patch
@@ -0,0 +1,15 @@
+https://cgit.freebsd.org/ports/plain/devel/gdcm/files/patch-Utilities_VTK_vtkImageMapToWindowLevelColors2.cxx?id=8f5541298099b722e34632ca9ed388bda91064e7
+
+- workaround for https://sourceforge.net/p/gdcm/bugs/536/
+
+--- a/Utilities/VTK/vtkImageMapToWindowLevelColors2.cxx 2022-06-26 20:39:45 UTC
++++ b/Utilities/VTK/vtkImageMapToWindowLevelColors2.cxx
+@@ -37,6 +37,8 @@
+ #include "vtkScalarsToColors.h"
+ #include "vtkPointData.h"
+
++#include <math.h>
++
+ //vtkCxxRevisionMacro(vtkImageMapToWindowLevelColors2, "$Revision: 1.3 $")
+ vtkStandardNewMacro(vtkImageMapToWindowLevelColors2)
+
diff --git a/sci-libs/gdcm/files/gdcm_support_vtk9.patch b/sci-libs/gdcm/files/gdcm_support_vtk9.patch
new file mode 100644
index 000000000..3818a82b5
--- /dev/null
+++ b/sci-libs/gdcm/files/gdcm_support_vtk9.patch
@@ -0,0 +1,70 @@
+--- a/Utilities/VTK/CMakeLists.txt
++++ b/Utilities/VTK/CMakeLists.txt
+@@ -26,6 +26,11 @@
+ )
+ endif()
+
++if( ${VTK_MAJOR_VERSION} GREATER_EQUAL 9 )
++ set(VTK_INCLUDE_DIRS "${VTK_PREFIX_PATH}/include/vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
++ include_directories(AFTER ${VTK_INCLUDE_DIRS})
++endif()
++
+ include(CheckCXXSourceCompiles)
+ set(CMAKE_REQUIRED_INCLUDES ${VTK_INCLUDE_DIRS})
+ CHECK_CXX_SOURCE_COMPILES(
+@@ -94,6 +99,10 @@
+ endforeach()
+ endif()
+
++if( ${VTK_MAJOR_VERSION} GREATER_EQUAL 9 )
++ string(REGEX REPLACE "vtk([^;]+)" "VTK::\\1" vtkgdcm_LIBS "${vtkgdcm_LIBS}")
++endif()
++
+ # Use wrapping hints for this project.
+ #set(VTK_WRAP_HINTS "${PROJECT_SOURCE_DIR}/hints")
+
+--- a/Utilities/VTK/Applications/CMakeLists.txt
++++ b/Utilities/VTK/Applications/CMakeLists.txt
+@@ -25,6 +25,11 @@
+ )
+ endif()
+
++set(vtk_ioxml vtkIOXML)
++if( ${VTK_MAJOR_VERSION} GREATER_EQUAL 9 )
++ set(vtk_ioxml VTK::IOXML)
++endif()
++
+ foreach(app ${GDCM_VTK_APPS})
+ add_executable(${app} ${app}.cxx)
+ if(GDCM_EXECUTABLE_PROPERTIES)
+@@ -42,7 +47,7 @@
+ endif()
+ else()
+ # >= 6.0
+- target_link_libraries(${app} ${VTK_LIBRARIES} vtkIOXML)
++ target_link_libraries(${app} ${VTK_LIBRARIES} ${vtk_ioxml})
+ endif()
+ if(WIN32 AND NOT CYGWIN)
+ target_link_libraries(${app} gdcmgetopt)
+--- a/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
++++ b/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
+@@ -496,6 +496,9 @@
+ sqi = new SequenceOfItems;
+
+ vtkIdType npts = 0;
++#if VTK_MAJOR_VERSION >= 9
++ const
++#endif
+ vtkIdType *indx = 0;
+ double v[3];
+ unsigned int cellnum = 0;
+@@ -759,6 +762,9 @@
+ vtkPoints *pts;
+ vtkCellArray *polys;
+ vtkIdType npts = 0;
++#if VTK_MAJOR_VERSION >= 9
++ const
++#endif
+ vtkIdType *indx = 0;
+ pts = theData->GetPoints();
+ polys = theData->GetPolys();
diff --git a/sci-libs/gdcm/gdcm-3.0.14.ebuild b/sci-libs/gdcm/gdcm-3.0.14.ebuild
new file mode 100644
index 000000000..5249e81b7
--- /dev/null
+++ b/sci-libs/gdcm/gdcm-3.0.14.ebuild
@@ -0,0 +1,121 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..10} )
+
+inherit cmake python-single-r1
+
+DESCRIPTION="Cross-platform DICOM implementation"
+HOMEPAGE="http://gdcm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gdcm/${P}.tar.bz2
+ test? ( mirror://sourceforge/gdcm/gdcmData.tar.gz )" # 3.0.14: .bz2 is broken, should be checked in next release
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc python test vtk"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ app-text/poppler:0=[cxx]
+ dev-libs/expat:0=
+ dev-libs/json-c:0=
+ dev-libs/libxml2:2=
+ dev-libs/openssl:0=
+ >=media-libs/charls-2.0.0:0=
+ >=media-libs/openjpeg-2.0.0:2=
+ sys-apps/util-linux:0=
+ sys-libs/zlib:0=
+ python? ( ${PYTHON_DEPS} )
+ vtk? (
+ sci-libs/vtk[rendering]
+ python? (
+ sci-libs/vtk[python,${PYTHON_SINGLE_USEDEP}]
+ )
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-libs/libxslt
+ app-text/docbook-xsl-ns-stylesheets
+ doc? ( app-doc/doxygen[dot] )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-lang/swig-3.0.7
+ )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}/gdcm_support_vtk9.patch"
+ "${FILESDIR}/gdcm-3.0.14-include-math-h.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # drop unbundled libs
+ local -a DROPS=( gdcmcharls gdcmexpat gdcmopenjpeg gdcmuuid gdcmzlib getopt pvrg KWStyle Release )
+ local x
+ for x in "${DROPS[@]}"; do
+ ebegin "Dropping bundled ${x#gdcm}"
+ rm -r "Utilities/${x}" || die
+ sed -i "s,^[ \t]*APPEND_COPYRIGHT(\\\${CMAKE_CURRENT_SOURCE_DIR}/${x}/,#&," "Utilities/CMakeLists.txt" || die
+ eend $?
+ done
+ find Utilities -mindepth 1 -maxdepth 1 '!' -name doxygen '!' -name VTK -type d \
+ -exec ewarn "Using bundled" {} ';' || die
+
+ # fix charls include case
+ sed -i 's:CharLS/charls\.h:charls/charls.h:' CMake/FindCharLS.cmake Utilities/gdcm_charls.h || die
+ sed -i 's:NAMES CharLS:NAMES charls:' CMake/FindCharLS.cmake || die
+
+ # Use prefixed socket++ (to avoid potential conflicts)
+ sed -i '/target_link_libraries(/s/socketxx/gdcm&/' \
+ Source/MessageExchangeDefinition/CMakeLists.txt \
+ Applications/Cxx/CMakeLists.txt \
+ || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_RPATH=ON
+ -DGDCM_BUILD_SHARED_LIBS=ON
+ -DGDCM_DATA_ROOT="${WORKDIR}/gdcmData"
+ -DGDCM_INSTALL_LIB_DIR="$(get_libdir)"
+ -DGDCM_INSTALL_DOC_DIR="share/doc/${P}"
+ -DGDCM_INSTALL_PYTHONMODULE_DIR="lib/${EPYTHON}/site-packages"
+ -DGDCM_USE_SYSTEM_ZLIB=ON
+ -DGDCM_USE_SYSTEM_OPENSSL=ON
+ -DGDCM_USE_SYSTEM_UUID=ON
+ -DGDCM_USE_SYSTEM_EXPAT=ON
+ -DGDCM_USE_SYSTEM_JSON=ON
+ -DGDCM_USE_SYSTEM_PAPYRUS3=OFF
+ -DGDCM_USE_SYSTEM_SOCKETXX=OFF
+ -DSOCKETXX_NAMESPACE=GDCMSOCKETXX
+ -DGDCM_USE_SYSTEM_LJPEG=OFF
+ -DGDCM_USE_SYSTEM_OPENJPEG=ON
+ -DGDCM_USE_SYSTEM_CHARLS=ON
+ -DGDCM_USE_SYSTEM_POPPLER=ON
+ -DGDCM_USE_SYSTEM_LIBXML2=ON
+ -DGDCM_BUILD_TESTING=$(usex test)
+ -DGDCM_WRAP_PYTHON=$(usex python)
+ $(usex python "-DGDCM_DEFAULT_PYTHON_VERSION=${EPYTHON#python}" "")
+ -DGDCM_WRAP_PERL=OFF
+ -DGDCM_WRAP_PHP=OFF
+ -DGDCM_WRAP_JAVA=OFF
+ -DGDCM_WRAP_CSHARP=OFF
+ -DGDCM_DOCUMENTATION=$(usex doc)
+ $(usex doc "-DGDCM_PDF_DOCUMENTATION=OFF" "")
+ -DGDCM_BUILD_EXAMPLES=OFF
+ -DGDCM_BUILD_APPLICATIONS=ON
+ -DGDCM_USE_VTK=$(usex vtk)
+ )
+ cmake_src_configure
+}
diff --git a/sci-libs/gdcm/metadata.xml b/sci-libs/gdcm/metadata.xml
new file mode 100644
index 000000000..1845bf1bd
--- /dev/null
+++ b/sci-libs/gdcm/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fx.carton91@gmail.com</email>
+ <name>François-Xavier Carton</name>
+ </maintainer>
+ <use>
+ <flag name="vtk">Build <pkg>sci-libs/vtk</pkg> bridge</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gdcm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/itk/Manifest b/sci-libs/itk/Manifest
index 31310f8b1..b346829c9 100644
--- a/sci-libs/itk/Manifest
+++ b/sci-libs/itk/Manifest
@@ -1,10 +1,7 @@
-DIST ITKGenericLabelInterpolator-5.0.1.tar.gz 136432 BLAKE2B c367d5f29b3b3250f73d3b03b80b50a99607d895ebb83c3613b40ed665bce87b2731b2ecf471a5b77983db1f8894e486404662bb5787056f23de24c8ee897704 SHA512 6044aab4893d6c68c6190c5d81f460ea0dfc4683d33a03a5d56a8a0ae3b767edde530cdc8976e6777237cb1d172f66df044afe11c4cfc9148e5712cf9f3a11fc
-DIST ITKGenericLabelInterpolator-5.1.0.tar.gz 140286 BLAKE2B 1c8efa033586368931d78fe4620ddd1449fcd15153b1585c716bce580df74a6fc990b3714677a81cdcedcd0e4626e4f155c522f6e7306e5be399d521213891b4 SHA512 7bf6310e8b0ea2356ae8ce0ddd0bc3a1516aa6bb5e3e8df9ed0114f1bb2b299d2edd046f27dbae364082afc63e225a3691c794c93d347ee564db617ea3fbf489
-DIST ITKGenericLabelInterpolator_test-5.0.1.zip 430662 BLAKE2B f46683bd1b3479ae6fc9ae63752810a1dda7940c67d4be8524edcb8b40ed384b331ac785ab752c3ed1570cce8d79af7de873820fdb76a11f2e4241ad7fd2d2c2 SHA512 435200a70ee8de30cc02b30d805697ebc61fb2792e6e7d8f5da923d2773ccd6adfdcec2ab953a6a043d624ebb01b9f7f30e2aad83a6442272f28104d357a7bde
-DIST InsightData-5.0.1.tar.gz 290801718 BLAKE2B dcb7657cb1f8555365b2ec94e7f95c4feab13ba4d585fd70ec240e63e7a55cf48aadf091a63ba2263f1f8c10ce3935812655449bea275af3d2eeff3f2689ef46 SHA512 eb766c115049949937d6527937f1f49ef84304a71dc4924581a53173f45c4e5a0c5a0e180550e75ecd840314609580b9d1fe9b2358c5a87c82a2c6aff8e9f50e
-DIST InsightData-5.1.0.tar.gz 292322103 BLAKE2B e55eddf06d72e87e68e7654c634f545923202467b710c75aa929cd040f37a9caa48ee262ca6465631961816af1cd854b9a046ff7e7ffed7731e428e092bc6020 SHA512 458c2959ba5e0745eee23e16ff7178230a7bae94d7dff065b3b38136e238becff96554693e3b2149d2307949c23a6c695c92676f8d44e6f7305dbb8bed48c9fa
-DIST InsightToolkit-5.0.1.tar.gz 20627889 BLAKE2B 2bd53f64f18746a7d0226d4d97bc02529a1dd2c05fc2294b0c2a5adb3783a8e766b1d20e051a17f20b4e5855e7c5b4a18d5f177f239113bc64f1a0400ce6f04b SHA512 f36613ff72c513ded3d32504f71308a94fe75555cf9fd22b77485d1375601f6e1f1539cc5ac82a9e1e229bcf514a88ccb55122a7dfc74a6ae1b6604aa70bd814
-DIST InsightToolkit-5.1.0.tar.gz 20694338 BLAKE2B 6a14e2e00f6d68a1420cdeebabdef254d23c6ba6610828bb860cf4e27a87f0e1448cd222bf3bc02f6d32b4eb262d7ba032f4459ed05f59f8c95d80907e03571c SHA512 413b6ef549b59d8f507038130446ccb704794c6d0980d8ab631d1b1051cb91f399e77c26b69fab6a1e9b9bb4cc233d49996c3ee735cd4de065993d4379b4ed4c
-DIST itk-5.1.0-test-a5e11ea71164ff78c65fcf259db01ea5db981a9d868e60045ff2bffca92984df1174bf984a1076e450f0d5d69b4f0191ed1a61465c220e2c91a893b5df150c0a 1017 BLAKE2B e6a3b734c3f4a23238dbb921c46297b491436e6c4b0b6d8992fe8fa3c813374f354495ca575d5d371ef49b7bcdc8b63d89a5e8d1ae608bce50fea0efc95ec60d SHA512 e69c77894cab5b295ec5edbecdf693525ec9a4673810b87cbc28646ea40888b7792b5707840069e277905c8b0014bd84ecea036836f87c3b16f388f544e34341
-DIST itk-5.1.0-test-bcdbb347f3704262d1f00be7179d6a0a6e68aed56c0653e8072ee5a94985c713bd229c935b1226a658af84fb7f1fffc2458c98364fc35303a2303b12f9f7ce2f 1018 BLAKE2B 50cad64ac0b674fe4dce36c732f8fababe13ec2893e22caa0b22274320fb4f6d70aec1e8b4f6ee5878ebc20b02c7300c877db911b77f82ac0cf2d6e3284f4ffa SHA512 27952af5d6243aa31c187280ea9ba82c434db3614b3db3b406fe8e5c7e4b7e333bc179d5d9956d5a17aa670a7aa7cfce037d37c4225125e703602e322d8ec68b
-DIST itk-5.1.0-testingdata.tar.gz 2409232372 BLAKE2B 7eb1c3ca21558603d3aa915c2a17e9bb656867331dc48e7b514ece50a7eac3d24bdf01c8b0acc703566b598959780d6736b27d1516d932f949e3a5cfe6acd9e0 SHA512 8b451608cb3f75d3ba6a78fd23e79495948c2792a98d831e0f0c93745595df84d3c2a8d76389976f67ac7e7e1f5a44a18d201e51d2ee659cdb708ae28536df8f
+DIST ITKAdaptiveDenoising-5.2.1.tar.gz 757851 BLAKE2B 3d94e1db6d2524adf7491e6e24308618b7b69e54184cbfe29a7084b55b8a337228a308233e0f0ab2cef04df9c8f42010a758e0071efdfd4905c28ca6399bfdfd SHA512 7e9c5a6681cd9777b33f11d1a1a5f6d8b1b6f7d2ec2d4d829398c78045b53b247bddea99e4a5450ba8d6666a31b5216ef6e07a2c874c5723af072e0d3c8cf9f4
+DIST ITKGenericLabelInterpolator-5.2.1.tar.gz 140427 BLAKE2B b19703872926516d9d07acd4078d343e02f00a162d2cb8b6787d6210223be375a059e767cf9c32dd234e77ff51d1af5e08d9a9844c34e23a531938c7d3ded4a9 SHA512 69e53b281cd3f7c136ad9e7ded2c362e0d9e22dc2bd595f42abcefe2cf9ec4fa0f44192efc3d328290be4adaee1ebd74be3035b18147081cc8b8479a333cdea6
+DIST InsightData-5.2.1.tar.gz 293448802 BLAKE2B fd2bb012c0d96243d3543993a87e73c43be0626b0478959e36633f22c7e8d48a46d0f4d18fa3a8d952d4a705ca20594d92c07044000b8e1bc65390ce981af3e7 SHA512 93eae6bdf62ce29ea6dfb1dddedffe4046400a86074dd4d47e3ddcd7ff9ab10031363275cb7f9741add7c02343f1f3e6a41b0ec6533531f4a3a42607c51aa704
+DIST InsightToolkit-5.2.1.tar.gz 20702482 BLAKE2B 06dc73a80b4999baff3fc75e225c8720d00927fd268bd0398bb0eea44679777b777836f307f02a2df3641a300e17c9c2ee9f77d2a87539bf8a6ed49ce341bf23 SHA512 6786e39cdf3d0c3a31abd1e23481e30f6dc9dac189ffe372dde3db688f2f57686a8beb321778327e1ff683ed844d41f1dee937b0ba542b2365e2195dfca398c7
+DIST itk-5.2.1-testingdata.tar.gz 2411475710 BLAKE2B edb8ba9bea8bf890749aa46ab3fb29f7d3e25e0f8bb7da7d7cca8c6524f75778b823232536602ade763c025b8e0fe134a555e6fcf652b8d42cc08f08cbd0c29b SHA512 89b160dc5f7781e148aad065f539b80b9accb9ec384e424398287e62b42a88cff610afcf41622a6d3e4e12c1938e7403b3dae65fa13bfb40c29a6b2f90a02398
+DIST itk-test-a5e11ea71164ff78c65fcf259db01ea5db981a9d868e60045ff2bffca92984df1174bf984a1076e450f0d5d69b4f0191ed1a61465c220e2c91a893b5df150c0a 214819 BLAKE2B cd65212e72cb80eff54ee3f22d05b55036470684c582334fe94826a2d4ed49c840c50a214996f64f2bcd710e5973c2d46201ef31732fe847a43504379df62e25 SHA512 a5e11ea71164ff78c65fcf259db01ea5db981a9d868e60045ff2bffca92984df1174bf984a1076e450f0d5d69b4f0191ed1a61465c220e2c91a893b5df150c0a
+DIST itk-test-bcdbb347f3704262d1f00be7179d6a0a6e68aed56c0653e8072ee5a94985c713bd229c935b1226a658af84fb7f1fffc2458c98364fc35303a2303b12f9f7ce2f 215417 BLAKE2B 318a6c55ba259a5af1e3e19cf859267caa0a612b05abfd9a83d9943902fd7edc25ec002707ed4ec85f7aebd4c5a82411942b5cfe2dc713c905a5bb5d1aa5ef23 SHA512 bcdbb347f3704262d1f00be7179d6a0a6e68aed56c0653e8072ee5a94985c713bd229c935b1226a658af84fb7f1fffc2458c98364fc35303a2303b12f9f7ce2f
diff --git a/sci-libs/itk/files/0001-BUG-Wrap-TransformFileReader-TransformFileWriter.patch b/sci-libs/itk/files/0001-BUG-Wrap-TransformFileReader-TransformFileWriter.patch
deleted file mode 100644
index 094ee3229..000000000
--- a/sci-libs/itk/files/0001-BUG-Wrap-TransformFileReader-TransformFileWriter.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From d069b7b94287dae15fcaf707775f5dd2bbebcc38 Mon Sep 17 00:00:00 2001
-From: Matt McCormick <matt.mccormick@kitware.com>
-Date: Wed, 5 Feb 2014 15:52:34 -0500
-Subject: [PATCH 1/3] BUG: Wrap TransformFileReader, TransformFileWriter.
-
-Missing CMakeLists.txt in the wrapping directory. Need to explicitly include
-the headers after "Template" was appended to the class name.
-
-Suggested-by: Sami Koho <sami.koho@gmail.com>
-
-Change-Id: I6f994bb18f37d5adf1d0f0311fa73506c41239a7
----
- Modules/IO/TransformBase/wrapping/CMakeLists.txt | 3 +++
- Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap | 2 ++
- Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap | 2 ++
- 3 files changed, 7 insertions(+)
- create mode 100644 Modules/IO/TransformBase/wrapping/CMakeLists.txt
-
-diff --git a/Modules/IO/TransformBase/wrapping/CMakeLists.txt b/Modules/IO/TransformBase/wrapping/CMakeLists.txt
-new file mode 100644
-index 0000000..6072567
---- /dev/null
-+++ b/Modules/IO/TransformBase/wrapping/CMakeLists.txt
-@@ -0,0 +1,3 @@
-+itk_wrap_module(ITKIOTransformBase)
-+itk_auto_load_submodules()
-+itk_end_wrap_module()
-diff --git a/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap b/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap
-index 9b52fbc..662df9e 100644
---- a/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap
-+++ b/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap
-@@ -1,3 +1,5 @@
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkTransformFileReader.h")
- itk_wrap_class("itk::TransformFileReaderTemplate" POINTER)
- foreach(t ${WRAP_ITK_REAL})
- itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
-diff --git a/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap b/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap
-index 4f1ac4a..356aaf3 100644
---- a/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap
-+++ b/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap
-@@ -1,3 +1,5 @@
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkTransformFileWriter.h")
- itk_wrap_class("itk::TransformFileWriterTemplate" POINTER)
- foreach(t ${WRAP_ITK_REAL})
- itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
---
-1.8.5.3
-
diff --git a/sci-libs/itk/files/0002-COMP-Fixed-itkQuasiNewtonOptimizerv4-wrapping-warnin.patch b/sci-libs/itk/files/0002-COMP-Fixed-itkQuasiNewtonOptimizerv4-wrapping-warnin.patch
deleted file mode 100644
index 4c74d5451..000000000
--- a/sci-libs/itk/files/0002-COMP-Fixed-itkQuasiNewtonOptimizerv4-wrapping-warnin.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 66d2955fbe5528d9df216c639277d1d2686447e5 Mon Sep 17 00:00:00 2001
-From: Michka Popoff <michkapopoff@gmail.com>
-Date: Fri, 7 Feb 2014 19:24:49 +0100
-Subject: [PATCH 2/3] COMP: Fixed itkQuasiNewtonOptimizerv4 wrapping warnings
-
-The warning :
-/scratch/dashboards/Linux-x86_64-gcc4.4-WrapITK/ITK-build/Wrapping/Modules/ITKOptimizersv4/itkQuasiNewtonOptimizerv4.xml: warning(5): Unknown type type: itk::QuasiNewtonOptimizerv4 [typedef]
-/scratch/dashboards/Linux-x86_64-gcc4.4-WrapITK/ITK-build/Wrapping/Modules/ITKOptimizersv4/itkQuasiNewtonOptimizerv4.xml: warning(4): ITK type not wrapped, or currently not known: itk::QuasiNewtonOptimizerv4Template< double >
----
- .../Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap
-index 4a43dd4..7eed11c 100644
---- a/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap
-+++ b/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap
-@@ -1 +1,7 @@
--itk_wrap_simple_class("itk::QuasiNewtonOptimizerv4" POINTER)
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkQuasiNewtonOptimizerv4.h")
-+itk_wrap_class("itk::QuasiNewtonOptimizerv4Template" POINTER)
-+ foreach(t ${WRAP_ITK_REAL})
-+ itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
-+ endforeach(t)
-+itk_end_wrap_class()
---
-1.8.5.3
-
diff --git a/sci-libs/itk/files/0003-COMP-Fixed-itkGradientDescentOptimizerv4-wrapping-wa.patch b/sci-libs/itk/files/0003-COMP-Fixed-itkGradientDescentOptimizerv4-wrapping-wa.patch
deleted file mode 100644
index d77345edf..000000000
--- a/sci-libs/itk/files/0003-COMP-Fixed-itkGradientDescentOptimizerv4-wrapping-wa.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From fced46ce8769b4edc7971ea0928045390b5c3f84 Mon Sep 17 00:00:00 2001
-From: Michka Popoff <michkapopoff@gmail.com>
-Date: Mon, 10 Feb 2014 09:41:42 +0100
-Subject: [PATCH 3/3] COMP: Fixed itkGradientDescentOptimizerv4 wrapping
- warnings
-
-I splitted the 3 wrapping calls in 3 separate files and fixed the wrapping.
-
-The warnings :
-/home/kevin/kitware/ITK_Build/Wrapping/Modules/ITKOptimizersv4/itkGradientDescentOptimizerv4.xml: warning(5): Unknown type type: itk::GradientDescentOptimizerBasev4 [typedef]
-/home/kevin/kitware/ITK_Build/Wrapping/Modules/ITKOptimizersv4/itkGradientDescentOptimizerv4.xml: warning(5): Unknown type type: itk::GradientDescentOptimizerv4 [typedef]
-/home/kevin/kitware/ITK_Build/Wrapping/Modules/ITKOptimizersv4/itkGradientDescentOptimizerv4.xml: warning(5): Unknown type type: itk::ObjectToObjectOptimizerBase [typedef]
-/home/kevin/kitware/ITK_Build/Wrapping/Modules/ITKOptimizersv4/itkGradientDescentOptimizerv4.xml: warning(4): ITK type not wrapped, or currently not known: itk::GradientDescentOptimizerBasev4Template< double >
-/home/kevin/kitware/ITK_Build/Wrapping/Modules/ITKOptimizersv4/itkGradientDescentOptimizerv4.xml: warning(4): ITK type not wrapped, or currently not known: itk::GradientDescentOptimizerv4Template< double >
-/home/kevin/kitware/ITK_Build/Wrapping/Modules/ITKOptimizersv4/itkGradientDescentOptimizerv4.xml: warning(4): ITK type not wrapped, or currently not known: itk::ObjectToObjectOptimizerBaseTemplate< double >
-
-Should also hopefully fix the new error on the dashboard I introduced by fixing the itkQuasiNewtonOptimizerv4 warnings (http://review.source.kitware.com/#/c/14317/)
-/home/kevin/kitware/ITK_Build/Wrapping/Typedefs/itkQuasiNewtonOptimizerv4.i:87: Warning 401: Nothing known about base class 'itk::GradientDescentOptimizerv4Template< float >'. Ignored.
-/home/kevin/kitware/ITK_Build/Wrapping/Typedefs/itkQuasiNewtonOptimizerv4.i:87: Warning 401: Maybe you forgot to instantiate 'itk::GradientDescentOptimizerv4Template< float >' using %template.
-
-Change-Id: I15b6af11690ed6efeaced68f73af5212ab5dc364
----
- .../wrapping/itkGradientDescentOptimizerBasev4.wrap | 7 +++++++
- .../Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap | 10 +++++++---
- .../Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap | 7 +++++++
- 3 files changed, 21 insertions(+), 3 deletions(-)
- create mode 100644 Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap
- create mode 100644 Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap
-
-diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap
-new file mode 100644
-index 0000000..74f5a6c
---- /dev/null
-+++ b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap
-@@ -0,0 +1,7 @@
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkGradientDescentOptimizerBasev4.h")
-+itk_wrap_class("itk::GradientDescentOptimizerBasev4Template" POINTER)
-+ foreach(t ${WRAP_ITK_REAL})
-+ itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
-+ endforeach(t)
-+itk_end_wrap_class()
-diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap
-index d53a176..3236448 100644
---- a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap
-+++ b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap
-@@ -1,3 +1,7 @@
--itk_wrap_simple_class("itk::ObjectToObjectOptimizerBase" POINTER)
--itk_wrap_simple_class("itk::GradientDescentOptimizerBasev4" POINTER)
--itk_wrap_simple_class("itk::GradientDescentOptimizerv4" POINTER)
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkGradientDescentOptimizerv4.h")
-+itk_wrap_class("itk::GradientDescentOptimizerv4Template" POINTER)
-+ foreach(t ${WRAP_ITK_REAL})
-+ itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
-+ endforeach(t)
-+itk_end_wrap_class()
-diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap
-new file mode 100644
-index 0000000..61b2c44
---- /dev/null
-+++ b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap
-@@ -0,0 +1,7 @@
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkObjectToObjectOptimizerBase.h")
-+itk_wrap_class("itk::ObjectToObjectOptimizerBaseTemplate" POINTER)
-+ foreach(t ${WRAP_ITK_REAL})
-+ itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
-+ endforeach(t)
-+itk_end_wrap_class()
---
-1.8.5.3
-
diff --git a/sci-libs/itk/files/0004-COMP-Warp-OptimizerParameterScalesEstimatorTemplate.patch b/sci-libs/itk/files/0004-COMP-Warp-OptimizerParameterScalesEstimatorTemplate.patch
deleted file mode 100644
index 83b395626..000000000
--- a/sci-libs/itk/files/0004-COMP-Warp-OptimizerParameterScalesEstimatorTemplate.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Author: Matt McCormick <matt.mccormick@kitware.com>
-Date: Thu Feb 6 10:26:49 2014 -0500
-
- COMP: Wrap OptimizerParameterScalesEstimatorTemplate.
-
- The class name changed and it became templated. Fixes:
-
- /playpen/blowekamp/MacOSX-WrapITK/ITK-build/Wrapping/Modules/ITKOptimizersv4/itkOptimizerParameterScalesEstimator.xml:
- warning(5): Unknown type type: itk::OptimizerParameterScalesEstimator
- [typedef]
- /playpen/blowekamp/MacOSX-WrapITK/ITK-build/Wrapping/Modules/ITKOptimizersv4/itkOptimizerParameterScalesEstimator.xml:
- warning(4): ITK type not wrapped, or currently not known:
- itk::OptimizerParameterScalesEstimatorTemplate< double >
-
- Change-Id: Ic6b4d6fba10d5d6c7b58de8d842bad6511e1ae7b
-
-diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkOptim
-index efd6a8c..a647ee4 100644
---- a/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap
-+++ b/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap
-@@ -1 +1,7 @@
--itk_wrap_simple_class("itk::OptimizerParameterScalesEstimator" POINTER)
-+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
-+itk_wrap_include("itkOptimizerParameterScalesEstimator.h")
-+itk_wrap_class("itk::OptimizerParameterScalesEstimatorTemplate" POINTER)
-+ foreach(t ${WRAP_ITK_REAL})
-+ itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
-+ endforeach(t)
-+itk_end_wrap_class()
-
diff --git a/sci-libs/itk/files/0005-make-gdcm-helper-library-static.patch b/sci-libs/itk/files/0005-make-gdcm-helper-library-static.patch
deleted file mode 100644
index d760ac7ba..000000000
--- a/sci-libs/itk/files/0005-make-gdcm-helper-library-static.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/Modules/ThirdParty/GDCM/src/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/CMakeLists.txt
-index e98077c..70f4286 100644
---- a/Modules/ThirdParty/GDCM/src/CMakeLists.txt
-+++ b/Modules/ThirdParty/GDCM/src/CMakeLists.txt
-@@ -1,5 +1,5 @@
- if(ITK_USE_SYSTEM_GDCM)
-- add_library(ITKGDCM ITK-GDCM.cxx)
-+ add_library(ITKGDCM STATIC ITK-GDCM.cxx)
- target_link_libraries(ITKGDCM gdcmDICT gdcmMSFF)
- itk_module_target(ITKGDCM)
- return()
diff --git a/sci-libs/itk/files/ITKModuleRemote.patch b/sci-libs/itk/files/ITKModuleRemote.patch
deleted file mode 100644
index eb130159a..000000000
--- a/sci-libs/itk/files/ITKModuleRemote.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Disable automatic git clone attempt for modules:
-https://github.com/InsightSoftwareConsortium/ITK/issues/1157
-
---- a/CMake/ITKModuleRemote.cmake 2019-08-13 18:10:33.385472767 +0200
-+++ b/CMake/ITKModuleRemote.cmake 2019-08-13 18:12:04.020198966 +0200
-@@ -165,39 +165,4 @@
- set(Module_${_name} ON CACHE FORCE "${_description}")
- endif()
-
-- if(Module_${_name})
-- itk_download_attempt_check(Module_${_name})
-- include(CMakeParseArguments)
-- cmake_parse_arguments(_fetch_options "" "GIT_REPOSITORY;GIT_TAG" "" ${ARGN})
-- find_package(Git)
-- if(NOT GIT_EXECUTABLE)
-- message(FATAL_ERROR "error: could not find git for clone of ${_name}")
-- endif()
-- execute_process(
-- COMMAND "${GIT_EXECUTABLE}" --version
-- OUTPUT_VARIABLE ov
-- OUTPUT_STRIP_TRAILING_WHITESPACE
-- )
-- string(REGEX REPLACE "^git version (.+)$" "\\1" _version "${ov}")
-- if("${_version}" VERSION_LESS 1.6.6)
-- message(FATAL_ERROR "Git version 1.6.6 or later is required.")
-- endif()
--
-- set(REMOTE_GIT_TAG "${_fetch_options_GIT_TAG}")
--
-- if( DEFINED REMOTE_GIT_TAG_${_name} AND NOT "${REMOTE_GIT_TAG_${_name}}" STREQUAL "${_fetch_options_GIT_TAG}")
-- set(REMOTE_GIT_TAG "${REMOTE_GIT_TAG_${_name}}")
-- message(STATUS "NOTE: Using override 'REMOTE_GIT_TAG_${_name}=${REMOTE_GIT_TAG}'\n"
-- " instead of value 'GIT_TAG=${_fetch_options_GIT_TAG}'\n"
-- " specified in file ${ITK_SOURCE_DIR}/Modules/Remote/${_name}.remote.cmake'")
-- endif()
-- set(REMOTE_GIT_TAG_${_name} "${REMOTE_GIT_TAG}" CACHE STRING "Override default GIT_TAG value for remote module ${_name}")
-- mark_as_advanced(REMOTE_GIT_TAG_${_name})
--
-- _fetch_with_git("${GIT_EXECUTABLE}"
-- "${_fetch_options_GIT_REPOSITORY}"
-- "${REMOTE_GIT_TAG}"
-- "${ITK_SOURCE_DIR}/Modules/Remote/${_name}"
-- )
-- endif()
- endfunction()
diff --git a/sci-libs/itk/files/itk-5.1.0-downloads.patch b/sci-libs/itk/files/itk-5.1.0-downloads.patch
deleted file mode 100644
index 34fdb76d1..000000000
--- a/sci-libs/itk/files/itk-5.1.0-downloads.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/CMake/ITKDownloadSetup.cmake 2020-07-30 19:03:10.330325423 -0400
-+++ b/CMake/ITKDownloadSetup.cmake 2020-07-30 19:03:10.330325423 -0400
-@@ -11,7 +11,7 @@
-
- macro(itk_download_attempt_check _name)
- if(ITK_FORBID_DOWNLOADS)
-- message(SEND_ERROR "Attempted to download ${_name} when ITK_FORBID_DOWNLOADS is ON")
-+ message(WARNING "Attempted to download ${_name} when ITK_FORBID_DOWNLOADS is ON")
- endif()
- endmacro()
-
---- a/Modules/Remote/GenericLabelInterpolator.remote.cmake 2020-04-25 14:30:53.000000000 -0400
-+++ b/Modules/Remote/GenericLabelInterpolator.remote.cmake 2020-04-25 14:30:53.000000000 -0400
-@@ -44,6 +44,4 @@
- itk_fetch_module(GenericLabelInterpolator
- "A generic interpolator for multi-label images."
- MODULE_COMPLIANCE_LEVEL 2
-- GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator.git
-- GIT_TAG b95fe46c7f4fe8002af67c67e6fe4e1f087bf6b7
- )
diff --git a/sci-libs/itk/files/itk-5.1.0-include_limits.patch b/sci-libs/itk/files/itk-5.1.0-include_limits.patch
deleted file mode 100644
index 9a8fae820..000000000
--- a/sci-libs/itk/files/itk-5.1.0-include_limits.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmImageChangePhotometricInterpretation.h
-+++ a/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmImageChangePhotometricInterpretation.h
-@@ -16,6 +16,7 @@
-
- #include "gdcmImageToImageFilter.h"
- #include "gdcmPhotometricInterpretation.h"
-+#include <limits>
-
- namespace gdcm
- {
diff --git a/sci-libs/itk/files/itk-5.2.1-fix-castxml-clang-attr-malloc.patch b/sci-libs/itk/files/itk-5.2.1-fix-castxml-clang-attr-malloc.patch
new file mode 100644
index 000000000..05c9d5635
--- /dev/null
+++ b/sci-libs/itk/files/itk-5.2.1-fix-castxml-clang-attr-malloc.patch
@@ -0,0 +1,25 @@
+From: François-Xavier Carton <fx.carton91@gmail.com>
+Date: Thu, 9 Jun 2022 14:56:22 +0200
+Subject: [PATCH] fix attr malloc error with recent glibc/gcc
+
+Recent GCC has support for __attribute__((__malloc__)) with arguments, but clang
+does not. castxml uses clang internally. And recent glibc/gcc uses the attribute
+with arguments. Mix all this, and you get:
+
+error: '__malloc__' attribute takes no arguments
+
+when compiling itk with python wrapping.
+
+To fix this, we add a define to castxml flags to remove the extra arguments.
+
+--- a/Wrapping/Generators/CastXML/CMakeLists.txt 2022-06-09 14:53:15.582352715 +0200
++++ b/Wrapping/Generators/CastXML/CMakeLists.txt 2022-06-09 14:54:38.182351433 +0200
+@@ -237,7 +237,7 @@
+ set(_castxml_cc ${_castxml_cc} "-D_HAS_TR1=0")
+ endif()
+ else()
+- set(_castxml_cc --castxml-cc-gnu ( "${CMAKE_CXX_COMPILER}" ${_castxml_cc_flags} ))
++ set(_castxml_cc --castxml-cc-gnu ( "${CMAKE_CXX_COMPILER}" ${_castxml_cc_flags} -D__malloc__\(a,b\)=__malloc__ ))
+ endif()
+ set(_target)
+ if(CMAKE_CROSSCOMPILING)
diff --git a/sci-libs/itk/files/itk-5.2.1-system-openjpeg.patch b/sci-libs/itk/files/itk-5.2.1-system-openjpeg.patch
new file mode 100644
index 000000000..ad717f677
--- /dev/null
+++ b/sci-libs/itk/files/itk-5.2.1-system-openjpeg.patch
@@ -0,0 +1,558 @@
+--- a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt
++++ b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt
+@@ -1,16 +1,32 @@
+ project(ITKOpenJPEG)
+ set(ITKOpenJPEG_THIRD_PARTY 1)
+
+-set(ITKOpenJPEG_INCLUDE_DIRS
+- ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg
+- ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg
+- )
+-set(ITKOpenJPEG_LIBRARIES itkopenjpeg)
++option(ITK_USE_SYSTEM_OPENJPEG "Use system-installed openjpeg" ${ITK_USE_SYSTEM_LIBRARIES})
++mark_as_advanced(ITK_USE_SYSTEM_OPENJPEG)
++
++if(ITK_USE_SYSTEM_OPENJPEG)
++ find_package(OpenJPEG REQUIRED)
++ set(ITKOpenJPEG_INCLUDE_DIRS
++ ${ITKOpenJPEG_BINARY_DIR}/src
++ )
++ set(ITKOpenJPEG_SYSTEM_INCLUDE_DIRS
++ ${OPENJPEG_INCLUDE_DIRS}
++ )
++ set(ITKOpenJPEG_LIBRARIES "${OPENJPEG_LIBRARIES}")
++ set(ITKOpenJPEG_NO_SRC 1)
++else()
++ set(ITKOpenJPEG_INCLUDE_DIRS
++ ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg
++ ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg
++ )
++ set(ITKOpenJPEG_LIBRARIES itkopenjpeg)
++endif()
++
++configure_file(src/itk_openjpeg.h.in src/itk_openjpeg.h)
+ set(ITK_LIBRARY_PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE)
+-
+ itk_module_impl()
+
+-install(FILES ${ITKOpenJPEG_SOURCE_DIR}/src/itk_openjpeg.h
++install(FILES ${ITKOpenJPEG_BINARY_DIR}/src/itk_openjpeg.h
+ DESTINATION ${ITKOpenJPEG_INSTALL_INCLUDE_DIR}
+ COMPONENT Development
+ )
+diff --git a/Modules/ThirdParty/OpenJPEG/src/itk_openjpeg.h b/Modules/ThirdParty/OpenJPEG/src/itk_openjpeg.h.in
+rename from Modules/ThirdParty/OpenJPEG/src/itk_openjpeg.h
+rename to Modules/ThirdParty/OpenJPEG/src/itk_openjpeg.h.in
+--- a/Modules/ThirdParty/OpenJPEG/src/itk_openjpeg.h
++++ b/Modules/ThirdParty/OpenJPEG/src/itk_openjpeg.h.in
+@@ -25,6 +25,12 @@
+ #ifndef itk_openjpeg_h
+ #define itk_openjpeg_h
+
+-#include <itkopenjpeg/openjpeg.h>
++/* Use the openjpeg library configured for ITK. */
++#cmakedefine ITK_USE_SYSTEM_OPENJPEG
++#ifdef ITK_USE_SYSTEM_OPENJPEG
++# include <openjpeg.h>
++#else
++# include <itkopenjpeg/openjpeg.h>
++#endif
+
+ #endif
+--- a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx
++++ b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx
+@@ -27,8 +27,6 @@
+ extern "C"
+ {
+ #include "openjpeg.h"
+-#include "j2k.h"
+-#include "jp2.h"
+ }
+
+
+@@ -139,11 +137,11 @@
+ {
+ itkDebugMacro(<< "ReadImageInformation()");
+
+- FILE * l_file = fopen(this->m_FileName.c_str(), "rb");
+-
+- /* decompression parameters */
++ /* set decoding parameters to default values */
++ opj_set_default_decoder_parameters(&(this->m_Internal->m_DecompressionParameters));
+
+- if (!l_file)
++ opj_stream_t * cio = opj_stream_create_default_file_stream(this->m_FileName.c_str(), true);
++ if (!cio)
+ {
+ itkExceptionMacro("JPEG2000ImageIO failed to open file for reading: " << this->GetFileName() << std::endl
+ << "Reason: "
+@@ -151,10 +149,5 @@
+ }
+
+- /* set decoding parameters to default values */
+- opj_set_default_decoder_parameters(&(this->m_Internal->m_DecompressionParameters));
+-
+- opj_stream_t * cio = opj_stream_create_default_file_stream(l_file, true);
+-
+ this->m_Internal->m_Dinfo = nullptr; /* handle to a decompressor */
+
+ opj_image_t * l_image = nullptr;
+@@ -188,9 +181,8 @@
+
+ /* get a decoder handle */
+- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_J2K);
++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_J2K);
+ if (!this->m_Internal->m_Dinfo)
+ {
+ opj_stream_destroy(cio);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+@@ -202,10 +194,9 @@
+ {
+ /* JPEG 2000 compressed image data */
+ /* get a decoder handle */
+- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JP2);
++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JP2);
+ if (!this->m_Internal->m_Dinfo)
+ {
+ opj_stream_destroy(cio);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+@@ -217,10 +208,9 @@
+ {
+ /* JPEG 2000, JPIP */
+ /* get a decoder handle */
+- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JPT);
++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JPT);
+ if (!this->m_Internal->m_Dinfo)
+ {
+ opj_stream_destroy(cio);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+@@ -230,7 +220,6 @@
+ }
+ default:
+ opj_stream_destroy(cio);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+ << "Reason: "
+@@ -248,26 +237,8 @@
+ }
+
+- // Image parameters - first tile
+- OPJ_INT32 l_tile_x0;
+- OPJ_INT32 l_tile_y0;
+-
+- // Image parameters - tile width, height and number of tiles
+- OPJ_UINT32 l_tile_width;
+- OPJ_UINT32 l_tile_height;
+- OPJ_UINT32 l_nb_tiles_x;
+- OPJ_UINT32 l_nb_tiles_y;
+-
+ itkDebugMacro(<< "Trying to read header now...");
+
+- bResult = opj_read_header(this->m_Internal->m_Dinfo,
+- &l_image,
+- &l_tile_x0,
+- &l_tile_y0,
+- &l_tile_width,
+- &l_tile_height,
+- &l_nb_tiles_x,
+- &l_nb_tiles_y,
+- cio);
++ bResult = opj_read_header(cio, this->m_Internal->m_Dinfo, &l_image);
+
+ if (!bResult)
+ {
+@@ -284,13 +255,21 @@
+ }
+
+- this->m_Internal->m_TileStartX = l_tile_x0;
+- this->m_Internal->m_TileStartY = l_tile_y0;
++ opj_codestream_info_v2_t* cp = opj_get_cstr_info(this->m_Internal->m_Dinfo);
++ if (!cp)
++ {
++ opj_stream_destroy(cio);
++ opj_image_destroy(l_image);
++ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
++ << "Reason: Error while reading image header");
++ }
++ this->m_Internal->m_TileStartX = cp->tx0;
++ this->m_Internal->m_TileStartY = cp->ty0;
+
+- this->m_Internal->m_TileWidth = l_tile_width;
+- this->m_Internal->m_TileHeight = l_tile_height;
++ this->m_Internal->m_TileWidth = cp->tdx;
++ this->m_Internal->m_TileHeight = cp->tdy;
+
+- this->m_Internal->m_NumberOfTilesInX = l_nb_tiles_x;
+- this->m_Internal->m_NumberOfTilesInY = l_nb_tiles_y;
++ this->m_Internal->m_NumberOfTilesInX = cp->tw;
++ this->m_Internal->m_NumberOfTilesInY = cp->th;
+
+
+ itkDebugMacro(<< "Number of Components = " << l_image->numcomps);
+@@ -307,6 +286,7 @@
+ else
+ {
+ opj_stream_destroy(cio);
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+ << "Reason: "
+ << "Unknown precision in file: "
+@@ -320,6 +300,6 @@
+ break;
+ case 3:
+- if (l_image->color_space != CLRSPC_SRGB)
++ if (l_image->color_space != OPJ_CLRSPC_SRGB)
+ {
+ itkWarningMacro(<< "file does not specify color space, assuming sRGB");
+ }
+@@ -349,7 +329,6 @@
+
+ /* close the byte stream */
+ opj_stream_destroy(cio);
+- fclose(l_file);
+
+ if (this->m_Internal->m_Dinfo)
+ {
+@@ -368,16 +347,7 @@
+ {
+ itkDebugMacro(<< "JPEG2000ImageIO::Read() Begin");
+
+- FILE * l_file = fopen(this->m_FileName.c_str(), "rb");
+-
+- if (!l_file)
+- {
+- itkExceptionMacro("JPEG2000ImageIO failed to open file for reading: " << this->GetFileName() << std::endl
+- << "Reason: "
+- << itksys::SystemTools::GetLastSystemError());
+- }
+-
+- opj_stream_t * l_stream = opj_stream_create_default_file_stream(l_file, true);
++ opj_stream_t * l_stream = opj_stream_create_default_file_stream(this->m_FileName.c_str(), true);
+ if (!l_stream)
+ {
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+@@ -397,9 +367,10 @@
+ {
+ /* JPEG-2000 codestream */
+ /* get a decoder handle */
+- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_J2K);
++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_J2K);
+ if (!this->m_Internal->m_Dinfo)
+ {
++ opj_stream_destroy(l_stream);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+ << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr");
+@@ -410,9 +381,10 @@
+ {
+ /* JPEG 2000 compressed image data */
+ /* get a decoder handle */
+- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JP2);
++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JP2);
+ if (!this->m_Internal->m_Dinfo)
+ {
++ opj_stream_destroy(l_stream);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+ << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr");
+@@ -423,9 +395,10 @@
+ {
+ /* JPEG 2000, JPIP */
+ /* get a decoder handle */
+- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JPT);
++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JPT);
+ if (!this->m_Internal->m_Dinfo)
+ {
++ opj_stream_destroy(l_stream);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+ << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr");
+@@ -433,7 +406,7 @@
+ break;
+ }
+ default:
+- fclose(l_file);
++ opj_stream_destroy(l_stream);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: "
+ << this->GetFileName() << std::endl
+ << "Reason: "
+@@ -445,32 +418,17 @@
+ if (!opj_setup_decoder(this->m_Internal->m_Dinfo, &(this->m_Internal->m_DecompressionParameters)))
+ {
++ opj_stream_destroy(l_stream);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+ << "Reason: opj_setup_decoder returns false");
+ }
+
+- OPJ_INT32 l_tile_x0, l_tile_y0;
+-
+- OPJ_UINT32 l_tile_width;
+- OPJ_UINT32 l_tile_height;
+- OPJ_UINT32 l_nb_tiles_x;
+- OPJ_UINT32 l_nb_tiles_y;
+-
+- bool bResult = opj_read_header(this->m_Internal->m_Dinfo,
+- &l_image,
+- &l_tile_x0,
+- &l_tile_y0,
+- &l_tile_width,
+- &l_tile_height,
+- &l_nb_tiles_x,
+- &l_nb_tiles_y,
+- l_stream);
++ bool bResult = opj_read_header(l_stream, this->m_Internal->m_Dinfo, &l_image);
+
+ if (!bResult)
+ {
+ opj_destroy_codec(this->m_Internal->m_Dinfo);
+ this->m_Internal->m_Dinfo = nullptr;
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+ << "Reason: opj_read_header returns false");
+ }
+@@ -499,7 +457,7 @@
+ itkDebugMacro(<< "p_end_x = " << p_end_x);
+ itkDebugMacro(<< "p_end_y = " << p_end_y);
+
+- bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, p_start_x, p_start_y, p_end_x, p_end_y);
++ bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, l_image, p_start_x, p_start_y, p_end_x, p_end_y);
+
+ itkDebugMacro(<< "opj_set_decode_area() after");
+
+@@ -509,6 +467,5 @@
+ this->m_Internal->m_Dinfo = nullptr;
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+ << "Reason: opj_set_decode_area returns false");
+ }
+@@ -525,13 +482,14 @@
+
+ OPJ_UINT32 l_max_data_size = 1000;
+
+- bool l_go_on = true;
++ OPJ_BOOL l_go_on = true;
+
+ auto * l_data = (OPJ_BYTE *)malloc(1000);
+
+ while (l_go_on)
+ {
+ bool tileHeaderRead = opj_read_tile_header(this->m_Internal->m_Dinfo,
++ l_stream,
+ &l_tile_index,
+ &l_data_size,
+ &l_current_tile_x0,
+@@ -540,13 +498,11 @@
+ &l_current_tile_y1,
+ &l_nb_comps,
+- &l_go_on,
+- l_stream);
++ &l_go_on);
+
+ if (!tileHeaderRead)
+ {
+ free(l_data);
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ opj_destroy_codec(this->m_Internal->m_Dinfo);
+ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+@@ -571,7 +527,6 @@
+ if (!l_data)
+ {
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ opj_destroy_codec(this->m_Internal->m_Dinfo);
+ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+@@ -590,7 +545,6 @@
+ {
+ free(l_data);
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ opj_destroy_codec(this->m_Internal->m_Dinfo);
+ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+@@ -654,7 +608,6 @@
+ {
+ free(l_data);
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ opj_destroy_codec(this->m_Internal->m_Dinfo);
+ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+@@ -667,13 +620,11 @@
+ this->m_Internal->m_Dinfo = nullptr;
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+ itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl
+ << "Reason: error whle reading image");
+ }
+
+ /* close the byte stream */
+ opj_stream_destroy(l_stream);
+- fclose(l_file);
+
+ if (this->m_Internal->m_Dinfo)
+ {
+@@ -775,6 +726,6 @@
+ }
+
+- for (int i = 0; i < parameters.numpocs; i++)
++ for (OPJ_UINT32 i = 0; i < parameters.numpocs; i++)
+ {
+ if (parameters.POC[i].prg == -1)
+ {
+@@ -840,13 +791,13 @@
+
+ parameters.numresolution = numberOfResolutions;
+
+- OPJ_COLOR_SPACE color_space = CLRSPC_GRAY;
++ OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY;
+ opj_image_cmptparm_t cmptparms[3];
+
+ if (this->GetNumberOfComponents() == 3)
+ {
+
+- color_space = (this->GetPixelType() == IOPixelEnum::RGB) ? CLRSPC_SRGB : CLRSPC_UNSPECIFIED;
++ color_space = (this->GetPixelType() == IOPixelEnum::RGB) ? OPJ_CLRSPC_SRGB : OPJ_CLRSPC_UNSPECIFIED;
+
+ /* initialize image components */
+ memset(&cmptparms[0], 0, 3 * sizeof(opj_image_cmptparm_t));
+@@ -864,7 +815,7 @@
+
+ if (this->GetNumberOfComponents() == 1)
+ {
+- color_space = CLRSPC_GRAY;
++ color_space = OPJ_CLRSPC_GRAY;
+
+ /* initialize image components */
+ memset(&cmptparms[0], 0, sizeof(opj_image_cmptparm_t));
+@@ -941,8 +892,9 @@
+ if (extension == ".j2k")
+ {
+- cinfo = opj_create_compress(CODEC_J2K);
++ cinfo = opj_create_compress(OPJ_CODEC_J2K);
+ if (!cinfo)
+ {
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: "
+ << this->GetFileName() << std::endl
+ << "Reason: opj_create_compress(CODEC_J2K) returns nullptr");
+@@ -950,9 +902,10 @@
+ }
+ else if (extension == ".jp2")
+ {
+- cinfo = opj_create_compress(CODEC_JP2);
++ cinfo = opj_create_compress(OPJ_CODEC_JP2);
+ if (!cinfo)
+ {
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: "
+ << this->GetFileName() << std::endl
+ << "Reason: opj_create_compress(CODEC_JP2) returns nullptr");
+@@ -960,9 +913,10 @@
+ }
+ else if (extension == ".jpt")
+ {
+- cinfo = opj_create_compress(CODEC_JPT);
++ cinfo = opj_create_compress(OPJ_CODEC_JPT);
+ if (!cinfo)
+ {
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: "
+ << this->GetFileName() << std::endl
+ << "Reason: opj_create_compress(CODEC_JPT) returns nullptr");
+@@ -970,6 +924,7 @@
+ }
+ else
+ {
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl
+ << "Reason: unknown encode format: " << extension);
+ }
+@@ -985,23 +940,19 @@
+
+ if (!opj_setup_encoder(cinfo, &parameters, l_image))
+ {
++ opj_destroy_codec(cinfo);
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl
+ << "Reason: opj_setup_encoder returns false");
+ }
+
+- FILE * l_file = fopen(parameters.outfile, "wb");
+- if (!l_file)
+- {
+- itkExceptionMacro("JPEG2000ImageIO failed to open file for writing: " << this->GetFileName() << std::endl
+- << "Reason: "
+- << itksys::SystemTools::GetLastSystemError());
+- }
+-
+ /* open a byte stream for writing */
+ /* allocate memory for all tiles */
+- opj_stream_t * cio = opj_stream_create_default_file_stream(l_file, false);
++ opj_stream_t * cio = opj_stream_create_default_file_stream(parameters.outfile, false);
+ if (!cio)
+ {
++ opj_destroy_codec(cinfo);
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: "
+ << this->GetFileName() << std::endl
+ << "Reason: "
+@@ -1017,7 +968,8 @@
+ if (!bSuccess)
+ {
+ opj_stream_destroy(cio);
+- fclose(l_file);
++ opj_destroy_codec(cinfo);
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl
+ << "Reason: opj_start_compress returns false");
+ }
+@@ -1026,7 +978,8 @@
+ if (!bSuccess)
+ {
+ opj_stream_destroy(cio);
+- fclose(l_file);
++ opj_destroy_codec(cinfo);
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl
+ << "Reason: opj_encode returns false");
+ }
+@@ -1035,14 +988,14 @@
+ if (!bSuccess)
+ {
+ opj_stream_destroy(cio);
+- fclose(l_file);
++ opj_destroy_codec(cinfo);
++ opj_image_destroy(l_image);
+ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl
+ << "Reason: opj_end_compress returns false");
+ }
+
+ /* close and free the byte stream */
+ opj_stream_destroy(cio);
+- fclose(l_file);
+
+ /* free remaining compression structures */
+ opj_destroy_codec(cinfo);
+--- a/Modules/Nonunit/Review/src/CMakeLists.txt
++++ b/Modules/Nonunit/Review/src/CMakeLists.txt
+@@ -5,7 +5,7 @@
+
+ add_library(ITKReview ${ITKReview_SRC})
+ itk_module_link_dependencies()
+-target_link_libraries(ITKReview LINK_PUBLIC ${ITKTestKernel_LIBRARIES} ${ITKIOLSM_LIBRARIES} itkopenjpeg)
++target_link_libraries(ITKReview LINK_PUBLIC ${ITKTestKernel_LIBRARIES} ${ITKIOLSM_LIBRARIES} ${ITKOpenJPEG_LIBRARIES})
+ itk_module_target(ITKReview)
+
+
diff --git a/sci-libs/itk/files/itk-5.2.1-system-tiff-has-64.patch b/sci-libs/itk/files/itk-5.2.1-system-tiff-has-64.patch
new file mode 100644
index 000000000..25c44db2c
--- /dev/null
+++ b/sci-libs/itk/files/itk-5.2.1-system-tiff-has-64.patch
@@ -0,0 +1,18 @@
+From: François-Xavier Carton <fx.carton91@gmail.com>
+Date: Wed, 8 Jun 2022 19:36:48 +0200
+Subject: [PATCH] system libtiff has INT64
+
+Enabling this, otherwise using system libtiff leads to errors. In particular
+tests fail because there is some IFD8 data but the itkTIFFDataSize function
+returns 0 instead of 8, resulting in invalid mem access.
+
+--- a/Modules/ThirdParty/TIFF/src/itk_tiff.h.in.orig 2022-06-08 19:34:04.412431969 +0200
++++ b/Modules/ThirdParty/TIFF/src/itk_tiff.h.in 2022-06-08 19:34:26.240431631 +0200
+@@ -34,6 +34,7 @@
+ #cmakedefine ITK_TIFF_HAS_TIFFFieldReadCount
+ #cmakedefine ITK_TIFF_HAS_TIFFField
+ #ifdef ITK_USE_SYSTEM_TIFF
++# define TIFF_INT64_T int64_t
+ # include <tiffio.h>
+ #else
+ # include "itktiff/tiffio.h"
diff --git a/sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch b/sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch
new file mode 100644
index 000000000..2af8c4998
--- /dev/null
+++ b/sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch
@@ -0,0 +1,309 @@
+https://github.com/InsightSoftwareConsortium/ITK/commit/2a7f5ed199926999b67f61a97c2c9a2595a11558.patch
+https://github.com/InsightSoftwareConsortium/ITK/commit/0c31aa688e82a34e5430873bc6176740fd09ad75.patch
+https://github.com/InsightSoftwareConsortium/ITK/commit/28325d921a9b8793e6aaefd612f53989f951d19c.patch
+https://github.com/InsightSoftwareConsortium/ITK/commit/aafd1f9631d0fad60e1b6f53e049e95a50c48bd1.patch
+
+From 2a7f5ed199926999b67f61a97c2c9a2595a11558 Mon Sep 17 00:00:00 2001
+From: Niels Dekker <N.Dekker@lumc.nl>
+Date: Thu, 24 Jun 2021 18:00:01 +0200
+Subject: [PATCH] COMP: Add missing `#include <iostream>` to Deprecated module
+ test
+
+Fixed a Visual C++ 2019 error, saying:
+
+> Deprecated\test\itkSimpleFastMutexLockTest.cxx(48,12): error C2039: 'cout': is not a member of 'std'
+---
+ .../Deprecated/test/itkSimpleFastMutexLockTest.cxx | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Modules/Compatibility/Deprecated/test/itkSimpleFastMutexLockTest.cxx b/Modules/Compatibility/Deprecated/test/itkSimpleFastMutexLockTest.cxx
+index 11ad0c52700..60aa1c065b4 100644
+--- a/Modules/Compatibility/Deprecated/test/itkSimpleFastMutexLockTest.cxx
++++ b/Modules/Compatibility/Deprecated/test/itkSimpleFastMutexLockTest.cxx
+@@ -19,6 +19,8 @@
+
+ #include "itkSimpleFastMutexLock.h"
+
++#include <iostream> // For cout.
++
+
+ int
+ itkSimpleFastMutexLockTest(int, char *[])
+From 0c31aa688e82a34e5430873bc6176740fd09ad75 Mon Sep 17 00:00:00 2001
+From: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>
+Date: Tue, 20 Apr 2021 17:21:21 +0200
+Subject: [PATCH] COMP: CastXML, ITKVtkGlue, include only when property exists
+
+Some targets (VTK libraries) didn't have the property INTERFACE_INCLUDE_DIRECTORIES
+
+```bash
+CMake Error in Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:
+ Found relative path while evaluating include directories of
+ "ITKVtkGluePython":
+
+ "_vtk_lib_include_dirs-NOTFOUND"
+```
+
+Triggered when compiling Slicer with `Slicer_BUILD_ITKPython:BOOL=ON`
+aka `ITK_WRAP_PYTHON:BOOL=ON`.
+
+Full error log with extra printing:
+
+```bash
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:3 (message):
+ ITKVtkGlue_VTK_LIBRARIES:
+ VTK::IOImage;VTK::ImagingSources;VTK::WrappingPythonCore;VTK::CommonCore;VTK::CommonDataModel;VTK::kwiml;VTK::CommonExecutionModel;VTK::RenderingOpenGL2;VTK::RenderingFreeType;VTK::InteractionStyle;VTK::InteractionWidgets
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs:
+ build/VTK-build/Wrapping/PythonCore;build/VTK/Wrapping/PythonCore
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs:
+ build/VTK-build/Utilities/KWIML;build/VTK/Utilities/KWIML
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+CMake Warning at Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:6 (message):
+ _vtk_lib_include_dirs: _vtk_lib_include_dirs-NOTFOUND
+
+-- ITKVtkGlue: Creating module.
+-- ITKVtkGlue: Creating itkImageToVTKImageFilter submodule.
+-- ITKVtkGlue: Creating itkVTKImageToImageFilter submodule.
+-- ITKVtkGlue: Creating itkViewImage submodule.
+-- MGHIO: Creating module.
+-- MGHIO: Creating itkMGHImageIO submodule.
+-- MorphologicalContourInterpolation: Creating module.
+-- MorphologicalContourInterpolation: Creating itkMorphologicalContourInterpolator submodule.
+-- ITKPyUtils: Creating module.
+-- ITKPyUtils: Creating itkPyCommand submodule.
+-- ITKPyUtils: Creating itkPyImageFilter submodule.
+-- Configuring done
+CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
+Please set them or make sure they are set and tested correctly in the CMake files:
+_vtk_lib_include_dirs
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+ used as include directory in directory build/ITK/Modules/Bridge/VtkGlue/wrapping
+
+CMake Error in Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt:
+ Found relative path while evaluating include directories of
+ "ITKVtkGluePython":
+
+ "_vtk_lib_include_dirs-NOTFOUND"
+
+```
+---
+ Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt b/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt
+index 3f3322957e1..2fd6a5af8f6 100644
+--- a/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt
++++ b/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt
+@@ -2,7 +2,9 @@
+ if(NOT VTK_RENDERING_BACKEND STREQUAL "None")
+ foreach(_vtk_lib IN LISTS ITKVtkGlue_VTK_LIBRARIES)
+ get_target_property(_vtk_lib_include_dirs ${_vtk_lib} INTERFACE_INCLUDE_DIRECTORIES)
+- include_directories(${_vtk_lib_include_dirs})
++ if(_vtk_lib_include_dirs)
++ include_directories(${_vtk_lib_include_dirs})
++ endif()
+ endforeach()
+ endif()
+
+From 28325d921a9b8793e6aaefd612f53989f951d19c Mon Sep 17 00:00:00 2001
+From: Butui Hu <hot123tea123@gmail.com>
+Date: Mon, 1 Aug 2022 14:26:39 +0800
+Subject: [PATCH] COMP: use sysconfig.get_path as PEP 632 deprecate distutils
+ module
+
+---
+ Wrapping/Generators/Python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Wrapping/Generators/Python/CMakeLists.txt b/Wrapping/Generators/Python/CMakeLists.txt
+index fca3d999b87..3b7a1d37334 100644
+--- a/Wrapping/Generators/Python/CMakeLists.txt
++++ b/Wrapping/Generators/Python/CMakeLists.txt
+@@ -36,7 +36,7 @@ file(MAKE_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python)
+ ###############################################################################
+ # Configure Python wrapping installation
+ if(Python3_EXECUTABLE AND NOT PY_SITE_PACKAGES_PATH)
+- set(python_check "try:\n import distutils.sysconfig\n print(distutils.sysconfig.get_python_lib(plat_specific=1, prefix=''))\nexcept:\n pass")
++ set(python_check "try:\n import sysconfig\n print(sysconfig.get_path('platlib'))\nexcept:\n pass")
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py ${python_check})
+ execute_process(COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py"
+ OUTPUT_VARIABLE py_spp
+From aafd1f9631d0fad60e1b6f53e049e95a50c48bd1 Mon Sep 17 00:00:00 2001
+From: Hans Johnson <hans-johnson@uiowa.edu>
+Date: Wed, 15 Dec 2021 08:10:58 -0600
+Subject: [PATCH] COMP: Remove inclusion of .hxx files as headers
+
+The ability to include either .h or .hxx files as
+header files required recursively reading the
+.h files twice. The added complexity is
+unnecessary, costly, and can confuse static
+analysis tools that monitor header guardes (due
+to reaching the maximum depth of recursion
+limits for nested #ifdefs in checking).
+
+Co-authored-by: Simon Rit <simon.rit@creatis.insa-lyon.fr>
+---
+ CMake/ITKModuleHeaderTest.cmake | 3 +--
+ Utilities/Maintenance/BuildHeaderTest.py | 4 ----
+ 2 files changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/CMake/ITKModuleHeaderTest.cmake b/CMake/ITKModuleHeaderTest.cmake
+index eb809d7e93d..82ad192a6f8 100644
+--- a/CMake/ITKModuleHeaderTest.cmake
++++ b/CMake/ITKModuleHeaderTest.cmake
+@@ -36,8 +36,7 @@ macro( itk_module_headertest _name )
+ # effected.
+ set( _include ${${_name}_SOURCE_DIR}/include )
+ file( GLOB _h_files ${_include}/*.h )
+- file( GLOB _hxx_files ${_include}/*.hxx )
+- set( _header_files ${_h_files} ${_hxx_files} )
++ set( _header_files ${_h_files} )
+ list( LENGTH _h_files _num_headers )
+ set( _outputs ${${_name}_BINARY_DIR}/test/${_name}HeaderTest1.cxx )
+ set( _test_num 1 )
+diff --git a/Utilities/Maintenance/BuildHeaderTest.py b/Utilities/Maintenance/BuildHeaderTest.py
+index 26a4b6ccb3f..f8ed9f7901e 100755
+--- a/Utilities/Maintenance/BuildHeaderTest.py
++++ b/Utilities/Maintenance/BuildHeaderTest.py
+@@ -130,15 +130,11 @@ def main():
+ else:
+ max_idx = added_header_idx + maximum_number_of_headers
+ for i in range(added_header_idx, max_idx):
+- # Use the .hxx if possible.
+- hxx_file = h_files[i][:-1] + "hxx"
+ # Files that include VTK headers need to link to VTK.
+ if h_files[i] in BANNED_HEADERS or h_files[i].lower().find("vtk") != -1:
+ to_include = (
+ '// #include "' + h_files[i] + '" // Banned in BuildHeaderTest.py\n'
+ )
+- elif os.path.exists(os.path.join(module_source_path, "include", hxx_file)):
+- to_include = '#include "' + hxx_file + '"\n'
+ else:
+ to_include = '#include "' + h_files[i] + '"\n'
+
diff --git a/sci-libs/itk/files/nrrdio-linking.patch b/sci-libs/itk/files/nrrdio-linking.patch
deleted file mode 100644
index a549650d2..000000000
--- a/sci-libs/itk/files/nrrdio-linking.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Link libITKNrrdIO with -lm (needed for sqrt)
-Author: Steve Robbins <smr@debian.org>
-Forwarded: no
-
---- insighttoolkit4-4.5.0.orig/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
-+++ insighttoolkit4-4.5.0/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
-@@ -64,7 +64,7 @@
- ADD_DEFINITIONS(-DTEEM_ZLIB=1)
-
- ADD_LIBRARY(ITKNrrdIO ${nrrdio_SRCS} )
--TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES})
-+TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES} -lm)
-
- IF(ITK_LIBRARY_PROPERTIES)
- SET_TARGET_PROPERTIES(ITKNrrdIO PROPERTIES ${ITK_LIBRARY_PROPERTIES})
diff --git a/sci-libs/itk/files/tests.patch b/sci-libs/itk/files/tests.patch
deleted file mode 100644
index c24714e4d..000000000
--- a/sci-libs/itk/files/tests.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Known to fail by upstream:
-https://github.com/InsightSoftwareConsortium/ITK/issues/1212#issuecomment-527998115
-
---- a/Modules/Bridge/VtkGlue/test/CMakeLists.txt 2019-09-09 00:45:14.736032139 +0200
-+++ b/Modules/Bridge/VtkGlue/test/CMakeLists.txt 2019-09-09 00:49:42.183935497 +0200
-@@ -7,8 +7,6 @@
- if(NOT VTK_RENDERING_BACKEND STREQUAL "None")
- list(APPEND ITKVtkGlueTests
- itkVtkMedianFilterTest.cxx
-- itkVtkConnectedComponentImageFilterTest.cxx
-- QuickViewTest.cxx
- # ### runViewImage ###
- # No test generated. Use it for view images (2D or 3D) with:
- # ITKVtkGlueTestDriver runViewImage image_file
-@@ -40,26 +38,3 @@
- NAME itkVTKImageToImageFilterTest
- COMMAND ITKVtkGlueTestDriver
- itkVTKImageToImageFilterTest)
--
--if(NOT VTK_RENDERING_BACKEND STREQUAL "None")
-- itk_add_test(
-- NAME itkVtkMedianImageFilterTest
-- COMMAND ITKVtkGlueTestDriver
-- itkVtkMedianFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 2)
-- set_property(TEST itkVtkMedianImageFilterTest APPEND PROPERTY LABELS REQUIRES_DISPLAY)
--
-- itk_add_test(
-- NAME QuickViewTest
-- COMMAND ITKVtkGlueTestDriver
-- --compare DATA{Baseline/QuickViewTest.png,:}
-- ${ITK_TEST_OUTPUT_DIR}/QuickViewTest0.png
-- --compareNumberOfPixelsTolerance 1500
-- QuickViewTest DATA{${ITK_DATA_ROOT}/Input/peppers.png} ${ITK_TEST_OUTPUT_DIR})
-- set_property(TEST QuickViewTest APPEND PROPERTY LABELS REQUIRES_DISPLAY)
--
-- itk_add_test(
-- NAME itkVtkConnectedComponentImageFilterTest
-- COMMAND ITKVtkGlueTestDriver
-- itkVtkConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png})
-- set_property(TEST itkVtkConnectedComponentImageFilterTest APPEND PROPERTY LABELS REQUIRES_DISPLAY)
--endif()
diff --git a/sci-libs/itk/itk-5.0.1.ebuild b/sci-libs/itk/itk-5.0.1.ebuild
deleted file mode 100644
index bf9f0f021..000000000
--- a/sci-libs/itk/itk-5.0.1.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit cmake python-single-r1
-
-MY_PN="InsightToolkit"
-MY_P="${MY_PN}-${PV}"
-GLI_HASH="187ab99b7d42718c99e5017f0acd3900d7469bd1"
-GLI_TEST_HASH="57b5d5de8d777f10f269445a"
-
-DESCRIPTION="NLM Insight Segmentation and Registration Toolkit"
-HOMEPAGE="http://www.itk.org"
-SRC_URI="
- https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${PV}/${MY_P}.tar.gz
- https://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator/archive/${GLI_HASH}.tar.gz -> ITKGenericLabelInterpolator-${PV}.tar.gz
- test? (
- https://data.kitware.com/api/v1/folder/${GLI_TEST_HASH}/download -> ITKGenericLabelInterpolator_test-${PV}.zip
- https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${PV}/InsightData-${PV}.tar.gz
- )
- "
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug doc examples fftw python review test vtkglue"
-RESTRICT="!test? ( test )"
-# python will not work, this is a know issue upstream:
-# https://github.com/InsightSoftwareConsortium/ITK/issues/1229
-# https://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator/issues/10
-
-RDEPEND="
- dev-libs/double-conversion:0=
- media-libs/openjpeg:2
- media-libs/libpng:0=
- media-libs/tiff:0=
- sci-libs/dcmtk:0=
- sci-libs/hdf5:0=[cxx]
- sys-libs/zlib:0=
- media-libs/libjpeg-turbo:0=
- fftw? ( sci-libs/fftw:3.0= )
- vtkglue? ( sci-libs/vtk:0=[rendering,python?] )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="${RDEPEND}
- sys-apps/coreutils
- python? (
- >=dev-lang/swig-2.0:0
- dev-cpp/castxml
- )
- doc? ( app-doc/doxygen )
-"
-BDEPEND="app-arch/unzip"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/ITKModuleRemote.patch
- "${FILESDIR}"/tests.patch
-)
-
-pkg_pretend() {
- if [[ -z ${ITK_COMPUTER_MEMORY_SIZE} ]]; then
- elog "To tune ITK to make the best use of working memory you can set"
- elog " ITK_COMPUTER_MEMORY_SIZE=XX"
- elog "in make.conf, default is 1 (unit is GB)"
- fi
- if use python && [[ -z ${ITK_WRAP_DIMS} ]]; then
- elog "For Python language bindings, you can define the dimensions"
- elog "you want to create bindings for by setting"
- elog " ITK_WRAP_DIMS=X;Y;Z..."
- elog "in make.conf, default is 2;3 for 2D and 3D data"
- fi
-}
-
-src_prepare() {
- sed -i -e "s/find_package(OpenJPEG 2.0.0/find_package(OpenJPEG/g"\
- Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
- ln -sr ../ITKGenericLabelInterpolator-* Modules/Remote/ITKGenericLabelInterpolator || die
- if use test; then
- for filename in ../GenericLabelInterpolator/test/*/*mha; do
- MD5=$(md5sum $filename) || die
- MD5=${MD5% *} || die
- cp "$filename" ".ExternalData/MD5/${MD5}" || die
- done
- fi
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DBUILD_SHARED_LIBS=ON
- -DGDCM_USE_SYSTEM_OPENJPEG=ON
- -DITK_FORBID_DOWNLOADS:BOOL=OFF
- -DITK_USE_SYSTEM_DCMTK=ON
- -DITK_USE_SYSTEM_DOUBLECONVERSION=ON
- -DITK_USE_SYSTEM_CASTXML=ON
- -DITK_USE_SYSTEM_HDF5=ON
- -DITK_USE_SYSTEM_JPEG=ON
- -DITK_USE_SYSTEM_PNG=ON
- -DITK_USE_SYSTEM_SWIG=ON
- -DITK_USE_SYSTEM_TIFF=ON
- -DITK_USE_SYSTEM_ZLIB=ON
- -DITK_USE_KWSTYLE=OFF
- -DITK_BUILD_DEFAULT_MODULES=ON
- -DITK_COMPUTER_MEMORY_SIZE="${ITK_COMPUTER_MEMORY_SIZE:-1}"
- -DWRAP_ITK_JAVA=OFF
- -DWRAP_ITK_TCL=OFF
- -Ddouble-conversion_INCLUDE_DIRS="${EPREFIX}/usr/include/double-conversion"
- -DExternalData_OBJECT_STORES="${WORKDIR}/InsightToolkit-${PV}/.ExternalData"
- -DModule_GenericLabelInterpolator:BOOL=ON
- -DModule_ITKReview:BOOL=ON
- -DBUILD_TESTING="$(usex test ON OFF)"
- -DBUILD_EXAMPLES="$(usex examples ON OFF)"
- -DITK_USE_REVIEW="$(usex review ON OFF)"
- -DITK_BUILD_DOCUMENTATION="$(usex doc ON OFF)"
- -DITK_INSTALL_LIBRARY_DIR=$(get_libdir)
- )
- if use fftw; then
- mycmakeargs+=(
- -DUSE_FFTWD=ON
- -DUSE_FFTWF=ON
- -DUSE_SYSTEM_FFTW=ON
- -DITK_WRAP_double=ON
- -DITK_WRAP_vector_double=ON
- -DITK_WRAP_covariant_vector_double=ON
- -DITK_WRAP_complex_double=ON
- )
- fi
- if use vtkglue; then
- mycmakeargs+=(
- -DModule_ITKVtkGlue=ON
- )
- fi
- if use python; then
- mycmakeargs+=(
- -DITK_WRAP_PYTHON=ON
- -DITK_WRAP_DIMS="${ITK_WRAP_DIMS:-2;3}"
- )
- else
- mycmakeargs+=(
- -DITK_WRAP_PYTHON=OFF
- )
- fi
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- if use examples; then
- docinto examples
- docompress -x /usr/share/doc/${PF}/examples
- dodoc -r "${S}"/Examples/*
- fi
-
- echo "ITK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data" > ${T}/40${PN}
- local ldpath="${EPREFIX}/usr/$(get_libdir)/InsightToolkit"
- if use python; then
- echo "PYTHONPATH=${EPREFIX}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> "${T}"/40${PN}
- ldpath="${ldpath}:${EPREFIX}/usr/$(get_libdir)/InsightToolkit/WrapITK/lib"
- fi
- echo "LDPATH=${ldpath}" >> "${T}"/40${PN}
- doenvd "${T}"/40${PN}
-
- if use doc; then
- cd "${WORKDIR}"/html || die
- rm *.md5 || die "Failed to remove superfluous hashes"
- einfo "Installing API docs. This may take some time."
- docinto api-docs
- dodoc -r *
- fi
-}
diff --git a/sci-libs/itk/itk-5.1.0.ebuild b/sci-libs/itk/itk-5.2.1-r2.ebuild
index 3f6c759ec..98e39935e 100644
--- a/sci-libs/itk/itk-5.1.0.ebuild
+++ b/sci-libs/itk/itk-5.2.1-r2.ebuild
@@ -1,16 +1,18 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{9..10} )
+VIRTUALX_REQUIRED="manual"
-inherit cmake python-single-r1
+inherit cmake python-single-r1 virtualx
MY_PN="InsightToolkit"
MY_P="${MY_PN}-${PV}"
-GLI_HASH="a02cbeaf28cb3d28ac66b9ac651073530eb6ab78"
-TEST_HASH="0eb202e23ae81be123b1b26cf31a9ba743824700"
+GLI_HASH="89da9305f5750d3990ca9fd35ecc5ce0b39c71a6"
+IAD_HASH="24825c8d246e941334f47968553f0ae388851f0c"
+TEST_HASH="7ab9d41ad5b42ccbe8adcaf0b24416d439a264d0"
declare -a GLI_TEST_HASHES=(
"a5e11ea71164ff78c65fcf259db01ea5db981a9d868e60045ff2bffca92984df1174bf984a1076e450f0d5d69b4f0191ed1a61465c220e2c91a893b5df150c0a"
"bcdbb347f3704262d1f00be7179d6a0a6e68aed56c0653e8072ee5a94985c713bd229c935b1226a658af84fb7f1fffc2458c98364fc35303a2303b12f9f7ce2f"
@@ -18,14 +20,15 @@ declare -a GLI_TEST_HASHES=(
GLI_TEST_SRC=""
for i in "${GLI_TEST_HASHES[@]}"; do
- GLI_TEST_SRC+="https://data.kitware.com/api/v1/file/hashsum/sha512/${i} -> ${P}-test-${i} "
+ GLI_TEST_SRC+="https://data.kitware.com/api/v1/file/hashsum/sha512/${i}/download -> ${PN}-test-${i} "
done
DESCRIPTION="NLM Insight Segmentation and Registration Toolkit"
-HOMEPAGE="http://www.itk.org"
+HOMEPAGE="https://itk.org"
SRC_URI="
https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${PV}/${MY_P}.tar.gz
https://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator/archive/${GLI_HASH}.tar.gz -> ITKGenericLabelInterpolator-${PV}.tar.gz
+ https://github.com/ntustison/ITKAdaptiveDenoising/archive/${IAD_HASH}.tar.gz -> ITKAdaptiveDenoising-${PV}.tar.gz
test? (
https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${PV}/InsightData-${PV}.tar.gz
https://github.com/InsightSoftwareConsortium/ITKTestingData/archive/${TEST_HASH}.tar.gz -> ${P}-testingdata.tar.gz
@@ -37,42 +40,55 @@ LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc examples fftw itkv4-compat python review test vtkglue"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
RESTRICT="!test? ( test )"
-# python will not work, this is a know issue upstream:
-# https://github.com/InsightSoftwareConsortium/ITK/issues/2005
-# https://github.com/InsightSoftwareConsortium/ITK/issues/1229
-# https://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator/issues/10
RDEPEND="
+ dev-cpp/eigen:3
dev-libs/double-conversion:0=
+ dev-libs/expat:0=
media-libs/openjpeg:2
media-libs/libpng:0=
media-libs/tiff:0=[jpeg]
sci-libs/dcmtk:0=
sci-libs/hdf5:0=[cxx]
+ sci-libs/gdcm:0=
sys-libs/zlib:0=
media-libs/libjpeg-turbo:0=
fftw? ( sci-libs/fftw:3.0= )
- vtkglue? ( sci-libs/vtk:0=[rendering,python?] )
+ vtkglue? (
+ sci-libs/vtk:0=[rendering]
+ python? (
+ sci-libs/vtk:0=[python,${PYTHON_SINGLE_USEDEP}]
+ )
+ )
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}
sys-apps/coreutils
python? (
>=dev-lang/swig-2.0:0
- dev-cpp/castxml
+ dev-libs/castxml
)
doc? ( app-doc/doxygen )
"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+BDEPEND="
+ test? (
+ vtkglue? ( ${VIRTUALX_DEPEND} )
+ python? (
+ $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]')
+ )
+ )
+"
S="${WORKDIR}/${MY_P}"
PATCHES=(
- "${FILESDIR}"/tests.patch
- "${FILESDIR}"/${P}-downloads.patch
- "${FILESDIR}"/${P}-include_limits.patch
+ "${FILESDIR}/${P}-upstream-fixes.patch"
+ "${FILESDIR}/${P}-system-tiff-has-64.patch"
+ "${FILESDIR}/${P}-fix-castxml-clang-attr-malloc.patch"
+ "${FILESDIR}/${P}-system-openjpeg.patch"
)
pkg_pretend() {
@@ -90,16 +106,42 @@ pkg_pretend() {
}
src_prepare() {
- sed -i -e "s/find_package(OpenJPEG 2.0.0/find_package(OpenJPEG/g"\
- Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
- ln -sr ../ITKGenericLabelInterpolator-* Modules/External/ITKGenericLabelInterpolator || die
+ # drop bundled libs
+ local -a DROPS=(
+ DoubleConversion/src/double-conversion
+ Eigen3/src/itkeigen
+ Expat/src/expat
+ GDCM/src/gdcm
+ JPEG/src/itkjpeg
+ HDF5/src/itkhdf5
+ OpenJPEG/src/openjpeg
+ PNG/src/itkpng
+ TIFF/src/itktiff
+ ZLIB/src/itkzlib
+ )
+ local x
+ for x in "${DROPS[@]}"; do
+ ebegin "Dropping bundled ${x%%/*}"
+ rm -r "Modules/ThirdParty/${x}" || die
+ eend $?
+ done
+ {
+ find Modules/ThirdParty -mindepth 2 -maxdepth 2 -type d -name src -printf '%P\n'
+ printf '%s\n' "${DROPS[@]}" | sed 's,/[^/]*$,,'
+ } | sort | uniq -u | xargs -n 1 ewarn "Using bundled" || die
+
+ # Remote modules
+ ln -sr "../ITKGenericLabelInterpolator-${GLI_HASH}" Modules/External/ITKGenericLabelInterpolator || die
+ ln -sr "../ITKAdaptiveDenoising-${IAD_HASH}" Modules/External/ITKAdaptiveDenoising || die
+
cmake_src_prepare
+
if use test; then
cp -rf "../ITKTestingData-${TEST_HASH}/"* ".ExternalData/" || die
mv "../ITKTestingData-${TEST_HASH}" "${BUILD_DIR}/.ExternalData" || die
for i in "${GLI_TEST_HASHES[@]}"; do
- cp "${DISTDIR}/${i}" ".ExternalData/SHA512/" || die
- cp "${DISTDIR}/${i}" "${BUILD_DIR}/.ExternalData/SHA512/" || die
+ cp "${DISTDIR}/${PN}-test-${i}" ".ExternalData/SHA512/${i}" || die
+ cp "${DISTDIR}/${PN}-test-${i}" "${BUILD_DIR}/.ExternalData/SHA512/${i}" || die
done
fi
}
@@ -107,6 +149,7 @@ src_prepare() {
src_configure() {
local mycmakeargs=(
-DITK_BUILD_DOCUMENTATION="$(usex doc ON OFF)"
+ -DITK_INSTALL_DOC_DIR="share/doc/${P}"
-DBUILD_EXAMPLES="$(usex examples ON OFF)"
-DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING="$(usex test ON OFF)"
@@ -119,8 +162,12 @@ src_configure() {
-DITK_USE_SYSTEM_DCMTK=ON
-DITK_USE_SYSTEM_DOUBLECONVERSION=ON
-DITK_USE_SYSTEM_CASTXML=ON
+ -DITK_USE_SYSTEM_EIGEN=ON
+ -DITK_USE_SYSTEM_EXPAT=ON
+ -DITK_USE_SYSTEM_GDCM=ON
-DITK_USE_SYSTEM_HDF5=ON
-DITK_USE_SYSTEM_JPEG=ON
+ -DITK_USE_SYSTEM_OPENJPEG=ON
-DITK_USE_SYSTEM_PNG=ON
-DITK_USE_SYSTEM_SWIG=ON
-DITK_USE_SYSTEM_TIFF=ON
@@ -128,6 +175,7 @@ src_configure() {
-DITK_USE_KWSTYLE=OFF
-DITK_BUILD_DEFAULT_MODULES=ON
-DITK_COMPUTER_MEMORY_SIZE="${ITK_COMPUTER_MEMORY_SIZE:-1}"
+ -DModule_AdaptiveDenoising:BOOL=ON
-DModule_GenericLabelInterpolator:BOOL=ON
-DModule_ITKReview:BOOL=ON
-DWRAP_ITK_JAVA=OFF
@@ -153,6 +201,7 @@ src_configure() {
if use python; then
mycmakeargs+=(
-DITK_WRAP_PYTHON=ON
+ -DPython3_EXECUTABLE="${PYTHON}"
-DITK_WRAP_DIMS="${ITK_WRAP_DIMS:-2;3}"
)
else
@@ -172,13 +221,13 @@ src_install() {
dodoc -r "${S}"/Examples/*
fi
- echo "ITK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data" > ${T}/40${PN}
+ echo "ITK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data" > ${T}/40${PN} || die
local ldpath="${EPREFIX}/usr/$(get_libdir)/InsightToolkit"
if use python; then
- echo "PYTHONPATH=${EPREFIX}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> "${T}"/40${PN}
+ echo "PYTHONPATH=${EPREFIX}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> "${T}"/40${PN} || die
ldpath="${ldpath}:${EPREFIX}/usr/$(get_libdir)/InsightToolkit/WrapITK/lib"
fi
- echo "LDPATH=${ldpath}" >> "${T}"/40${PN}
+ echo "LDPATH=${ldpath}" >> "${T}"/40${PN} || die
doenvd "${T}"/40${PN}
if use doc; then
@@ -188,4 +237,14 @@ src_install() {
docinto api-docs
dodoc -r *
fi
+
+ use python && python_optimize
+}
+
+src_test() {
+ if use vtkglue; then
+ virtx cmake_src_test
+ else
+ cmake_src_test
+ fi
}
diff --git a/sci-libs/labbookdb/labbookdb-0.1.ebuild b/sci-libs/labbookdb/labbookdb-0.1.ebuild
index 4da4106a2..8f148746d 100644
--- a/sci-libs/labbookdb/labbookdb-0.1.ebuild
+++ b/sci-libs/labbookdb/labbookdb-0.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
diff --git a/sci-libs/mlpack/Manifest b/sci-libs/mlpack/Manifest
deleted file mode 100644
index 827319a78..000000000
--- a/sci-libs/mlpack/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST mlpack-3.4.1.tar.gz 5782241 BLAKE2B d5a1050489c61a934330a0f3d1142e7949f7fdd9c31f679d7963208fc8aaea8fd8c0eb7e45920c3799712cb059808c75098e31b913557ec3c2af2f1d32e561f0 SHA512 53de83c2ca36829a0ae952357b25bee44bf85d01c2414848fe2c5f09ebe4732bd0a1d3c72de202646345fa66964fbc3247ddeb6a327e87459c036a215fe55fc2
-DIST mlpack-3.4.2.tar.gz 5782921 BLAKE2B d775124462357b489f91f6ef75f5f908d9a9234082c48223f19a728ab9e41cb6576fca9b4b59415d3096471f4ab2d2970296387954977652169a447b8e036263 SHA512 05a66b73cba8d83f630b0999023913e7a4a3214632930ff3c598d964d52bcae4eab113018eecf385130c0e7e9c16c25380b31dd62a2e0ecf419b4bf3856b34b0
diff --git a/sci-libs/mlpack/metadata.xml b/sci-libs/mlpack/metadata.xml
deleted file mode 100644
index f587c48a7..000000000
--- a/sci-libs/mlpack/metadata.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>gentoo@aisha.cc</email>
- <name>Aisha Tammy</name>
- </maintainer>
- <maintainer type="project">
- <email>sci@gentoo.org</email>
- <name>Gentoo Science Project</name>
- </maintainer>
- <longdescription lang="en">
- mlpack is a C++ machine learning library with emphasis on
- scalability, speed, and ease-of-use. Its aim is to make machine
- learning possible for novice users by means of a simple, consistent
- API, while simultaneously exploiting C++ language features to
- provide maximum performance and maximum flexibility for expert
- users.
- </longdescription>
- <use>
- <flag name="arma-debug">build with armadillo dbug symbols</flag>
- <flag name="go">build go bindings</flag>
- <flag name="julia">build julia bindings</flag>
- <flag name="matlab">build matlab bindings</flag>
- <flag name="R">build R bindings</flag>
- </use>
-</pkgmetadata>
diff --git a/sci-libs/mlpack/mlpack-3.4.1.ebuild b/sci-libs/mlpack/mlpack-3.4.1.ebuild
deleted file mode 100644
index d03dd9ab1..000000000
--- a/sci-libs/mlpack/mlpack-3.4.1.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit cmake python-single-r1
-
-DESCRIPTION="scalable C++ machine learning library"
-HOMEPAGE="https://www.mlpack.org/"
-SRC_URI="https://www.mlpack.org/files/${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE+="arma-debug debug doc go julia matlab openmp profile R test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE} arma-debug? ( debug )"
-RESTRICT="!test? ( test )"
-
-CDEPEND="
- ${PYTHON_DEPS}
- julia? ( || (
- dev-lang/julia
- dev-lang/julia-bin:*
- )
- )
- go? ( dev-lang/go )
- R? ( dev-lang/R )
-"
-
-RDEPEND="
- ${CDEPEND}
- $(python_gen_cond_dep '
- dev-libs/boost[${PYTHON_USEDEP}]
- dev-libs/libxml2[${PYTHON_USEDEP}]
- ')
- dev-python/pandas
- dev-python/cython
- dev-python/numpy
- dev-libs/stb
- >=sci-libs/armadillo-8.4.0[arpack,blas,lapack]
- sci-libs/ensmallen
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- ${CDEPEND}
- app-text/txt2man
- virtual/pkgconfig
- doc? (
- app-doc/doxygen
- dev-libs/mathjax
- )
- test? ( $( python_gen_cond_dep '
- dev-python/pytest[${PYTHON_USEDEP}]
- ')
- )
-"
-
-pkg_setup() {
- elog "If you want to build matlab bindings then you"
- elog "need to make sure that matlab has been installed"
- elog "prior to building this package and it is available"
- elog "in the standard locations to be found by"
- elog "CMake, library finders, header includes and other"
- elog "trinkets that are used while compiling."
- elog "Matlab will not be entertained as a first class"
- elog "citizen until we have enough personnel"
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- sed -i \
- -e "s:share/doc/mlpack:share/doc/${PF}:" \
- -e 's/-O3//g' \
- CMakeLists.txt || die
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DDISABLE_DOWNLOADS=ON
- -DDOWNLOAD_ENSMALLEN=OFF
- -DDOWNLOAD_STB_IMAGE=OFF
- -DBUILD_WITH_COVERAGE=OFF
- -DBUILD_PYTHON_BINDINGS=ON
- -DBUILD_SHARED_LIBS=ON
- -DBUILD_CLI_EXECUTABLES=ON
- -DTEST_VERBOSE=$(usex test)
- -DBUILD_TESTS=$(usex test)
- -DDEBUG=$(usex debug)
- -DPROFILE=$(usex profile)
- -DARMA_EXTRA_DEBUG=$(usex arma-debug)
- -DUSE_OPENMP=$(usex openmp)
- -DMATLAB_BINDINGS=$(usex matlab)
- -DBUILD_GO_SHLIB=$(usex go)
- -DBUILD_JULIA_BINDINGS=$(usex julia)
- -DBUILD_GO_BINDINGS=$(usex go)
- -DBUILD_R_BINDINGS=$(usex R)
- -DBUILD_MARKDOWN_BINDINGS=$(usex doc)
- -DMATHJAX=$(usex doc)
- ${EXTRA_ECONF[@]}
- )
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- python_optimize
-}
diff --git a/sci-libs/mlpack/mlpack-3.4.2.ebuild b/sci-libs/mlpack/mlpack-3.4.2.ebuild
deleted file mode 100644
index bfc7231e1..000000000
--- a/sci-libs/mlpack/mlpack-3.4.2.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit cmake python-single-r1
-
-DESCRIPTION="scalable C++ machine learning library"
-HOMEPAGE="https://www.mlpack.org/"
-SRC_URI="https://www.mlpack.org/files/${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE+="arma-debug debug doc go julia matlab openmp profile R test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE} arma-debug? ( debug )"
-RESTRICT="!test? ( test )"
-
-CDEPEND="
- ${PYTHON_DEPS}
- julia? ( || (
- dev-lang/julia
- dev-lang/julia-bin:*
- )
- )
- go? ( dev-lang/go )
- R? ( dev-lang/R )
-"
-
-RDEPEND="
- ${CDEPEND}
- $(python_gen_cond_dep '
- dev-libs/boost[${PYTHON_USEDEP}]
- dev-libs/libxml2[${PYTHON_USEDEP}]
- dev-python/pandas[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/cython[${PYTHON_USEDEP}]
- ')
- dev-libs/stb
- >=sci-libs/armadillo-8.4.0[arpack,blas,lapack]
- sci-libs/ensmallen
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- ${CDEPEND}
- app-text/txt2man
- virtual/pkgconfig
- doc? (
- app-doc/doxygen
- dev-libs/mathjax
- )
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- ')
- test? ( $( python_gen_cond_dep '
- dev-python/pytest[${PYTHON_USEDEP}]
- ')
- )
-"
-
-pkg_setup() {
- elog "If you want to build matlab bindings then you"
- elog "need to make sure that matlab has been installed"
- elog "prior to building this package and it is available"
- elog "in the standard locations to be found by"
- elog "CMake, library finders, header includes and other"
- elog "trinkets that are used while compiling."
- elog "Matlab will not be entertained as a first class"
- elog "citizen until we have enough personnel"
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- sed -i \
- -e "s:share/doc/mlpack:share/doc/${PF}:" \
- -e 's/-O3//g' \
- CMakeLists.txt || die
- # drop dep on pytest-runner
- sed -i -e "/setup_requires/d" \
- src/mlpack/bindings/python/setup.py.in || die
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DDISABLE_DOWNLOADS=ON
- -DDOWNLOAD_ENSMALLEN=OFF
- -DDOWNLOAD_STB_IMAGE=OFF
- -DBUILD_WITH_COVERAGE=OFF
- -DBUILD_PYTHON_BINDINGS=ON
- -DBUILD_SHARED_LIBS=ON
- -DBUILD_CLI_EXECUTABLES=ON
- -DTEST_VERBOSE=$(usex test)
- -DBUILD_TESTS=$(usex test)
- -DDEBUG=$(usex debug)
- -DPROFILE=$(usex profile)
- -DARMA_EXTRA_DEBUG=$(usex arma-debug)
- -DUSE_OPENMP=$(usex openmp)
- -DMATLAB_BINDINGS=$(usex matlab)
- -DBUILD_GO_SHLIB=$(usex go)
- -DBUILD_JULIA_BINDINGS=$(usex julia)
- -DBUILD_GO_BINDINGS=$(usex go)
- -DBUILD_R_BINDINGS=$(usex R)
- -DBUILD_MARKDOWN_BINDINGS=$(usex doc)
- -DMATHJAX=$(usex doc)
- ${EXTRA_ECONF[@]}
- )
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- python_optimize
-}
diff --git a/sci-libs/nibabel/Manifest b/sci-libs/nibabel/Manifest
index 31eb1f65e..ea228479f 100644
--- a/sci-libs/nibabel/Manifest
+++ b/sci-libs/nibabel/Manifest
@@ -1,3 +1,2 @@
-DIST nibabel-2.5.1.tar.gz 4281663 BLAKE2B 361f1118d850a76fb8d2aa3ac6ebf0da711cf8df93aa6e2689201f3e713f35e028442ef00f69ce7a4a96d3c376b4966d0b76a087005123101f743b4d6074d3b2 SHA512 49de1a42113e64a56336e02f3143588b574c7b063b10b892ee125048451be701955e505bd1d51183327e2ee221f8364005fdd9fa7d256343113ab6ca1994820d
DIST nibabel-3.0.2.tar.gz 4336181 BLAKE2B b95ea57f28265eab627caea71f65c8ad1b0f868d40d80efb68f2dbb1e81f7d4f10b2da21d33f803abcd9441f3afe2c861f96828f8701f3981e4b7a4b2f97308e SHA512 51a10a72ade0382e43a006a0b9453b0c00f962a1c0d32c7a9da6ce3b9c95db05cd3bd672389d514107768b688a8315cba2e34d52bc845db3ca3e7912a1a0a8ac
DIST nibabel-3.2.1.tar.gz 4442534 BLAKE2B 5a76275c0c3746bbe094789350f4f6d9dc17e332915c9f567660138c44ba50672415272d21d7b0834c77f4f9660950bda8c684f7664d58f0e5784b782384cb2f SHA512 5c5d95313f4b22462ba67c23d52dd34ed5d690c72a3137b21ac0bdbc4d20aa4f0c1d87d23c675f8c2f6e4335dc51fb9ab788ac8c63be56eec8ab8657ed95a6d7
diff --git a/sci-libs/nibabel/nibabel-2.5.1.ebuild b/sci-libs/nibabel/nibabel-2.5.1.ebuild
deleted file mode 100644
index 3316b84d5..000000000
--- a/sci-libs/nibabel/nibabel-2.5.1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1
-
-DESCRIPTION="Access a cacophony of neuro-imaging file formats"
-HOMEPAGE="https://nipy.org/nibabel/"
-SRC_URI="https://github.com/nipy/nibabel/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="dicom doc test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
- dicom? (
- sci-libs/pydicom
- dev-python/pillow[${PYTHON_USEDEP}]
- )
-"
-DEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- ${RDEPEND}
- dev-python/nose[${PYTHON_USEDEP}]
- )
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
-"
-
-python_test() {
- cd "${BUILD_DIR}" || die
- echo "backend: Agg" > matplotlibrc
- MPLCONFIGDIR=. nosetests || die
-}
diff --git a/sci-libs/nibabel/nibabel-3.0.2.ebuild b/sci-libs/nibabel/nibabel-3.0.2.ebuild
index 3316b84d5..f0759b51a 100644
--- a/sci-libs/nibabel/nibabel-3.0.2.ebuild
+++ b/sci-libs/nibabel/nibabel-3.0.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
diff --git a/sci-libs/nibabel/nibabel-3.2.1.ebuild b/sci-libs/nibabel/nibabel-3.2.1.ebuild
index d469867f9..c3b45a93b 100644
--- a/sci-libs/nibabel/nibabel-3.2.1.ebuild
+++ b/sci-libs/nibabel/nibabel-3.2.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
@@ -23,14 +23,19 @@ RDEPEND="
dev-python/scipy[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dicom? (
- sci-libs/pydicom
dev-python/pillow[${PYTHON_USEDEP}]
- )
+ sci-libs/pydicom
+ )
"
BDEPEND="test? (
dev-python/pytest-doctestplus[${PYTHON_USEDEP}]
)"
+EPYTEST_DESELECT=(
+ # Re-evaluate after 3.2.1
+ nibabel/gifti/tests/test_parse_gifti_fast.py::test_parse_dataarrays
+)
+
distutils_enable_sphinx doc/source dev-python/texext dev-python/numpydoc dev-python/matplotlib
distutils_enable_tests pytest
diff --git a/sci-libs/nibabel/nibabel-9999.ebuild b/sci-libs/nibabel/nibabel-9999.ebuild
deleted file mode 100644
index 283ad8804..000000000
--- a/sci-libs/nibabel/nibabel-9999.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
-
-inherit distutils-r1 git-r3
-
-DESCRIPTION="Access a cacophony of neuro-imaging file formats"
-HOMEPAGE="https://nipy.org/nibabel/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/nipy/nibabel.git"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS=""
-IUSE="dicom"
-
-RDEPEND="
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/packaging[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
- dicom? (
- sci-libs/pydicom
- dev-python/pillow[${PYTHON_USEDEP}]
- )
-"
-
-BDEPEND="test? (
- dev-python/pytest-doctestplus[${PYTHON_USEDEP}]
-)"
-
-distutils_enable_sphinx doc/source dev-python/texext dev-python/numpydoc dev-python/matplotlib
-distutils_enable_tests pytest
diff --git a/sci-libs/nipy/Manifest b/sci-libs/nipy/Manifest
index d9bac81b5..bbe6e4b5d 100644
--- a/sci-libs/nipy/Manifest
+++ b/sci-libs/nipy/Manifest
@@ -1 +1,2 @@
-DIST nipy-0.4.2.tar.gz 2403688 BLAKE2B 883377356787652450bb5a8090be48708144c9d11473232248d48e8bc36eb292cdd672ae30b337de6fb8c5e593a772489908c9575c2f97a8dbd82a8e4d6ad0df SHA512 730654e422c9fd15c0abf7ce0e0cb5e9569788527a35e9cc6deb71e2384b0ed2dbbf82f9eafe9cd739647bb1dc3a3d43606d0244fae5accd0896f1fc5bb3a8cc
+DIST nipy-0.4.2.tar.gz 2403690 BLAKE2B bd75e6b76095b825494ec9f78dd126d089c9c0b660d808f5510fab3449ae6c3e71ed59866203d6c2e3f5cfe5bc342b9edc96c6c2b8dab97e532d99705c80410c SHA512 a1a590f35833a4238be87a01fa4e0609a1c18243d626cb8e54a5904fa8702247292b030671bb628ee075cf9346ee4040a9222e60e36dde0d4153d3bef33bcf89
+DIST nipy-0.5.0.tar.gz 2404225 BLAKE2B d57a2a29cb8d9538731631e2f73520082905c4944b7d99682e0453a6f05173ffb6f27fc2f29fe172d94790e3d904471ebd2d5a3de55cdf39608b605d7d9a5344 SHA512 ec91f8b7b555e2baeadc9d6d2f83d5ad77080e0505579bcc72cae051869e9f8c1ffdfa679afc7380173a6454f45ec457a3657fd9b9396a28a5e273701ecaf0a5
diff --git a/sci-libs/nipy/nipy-0.4.2.ebuild b/sci-libs/nipy/nipy-0.4.2.ebuild
index c20d904f5..3b483638f 100644
--- a/sci-libs/nipy/nipy-0.4.2.ebuild
+++ b/sci-libs/nipy/nipy-0.4.2.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1 flag-o-matic
+inherit distutils-r1
DESCRIPTION="Neuroimaging tools for Python"
HOMEPAGE="https://nipy.org/"
@@ -15,6 +15,8 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
+RESTRICT="test"
+# reported upstream: https://github.com/nipy/nipy/issues/493
RDEPEND="
dev-python/prov[${PYTHON_USEDEP}]
diff --git a/sci-libs/nipy/nipy-0.5.0.ebuild b/sci-libs/nipy/nipy-0.5.0.ebuild
new file mode 100644
index 000000000..81a462c96
--- /dev/null
+++ b/sci-libs/nipy/nipy-0.5.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Neuroimaging tools for Python"
+HOMEPAGE="https://nipy.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="test"
+# reported upstream: https://github.com/nipy/nipy/issues/493
+
+RDEPEND="
+ dev-python/scipy[${PYTHON_USEDEP}]
+ dev-python/sympy[${PYTHON_USEDEP}]
+ >=sci-libs/nibabel-1.2[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ "
+DEPEND=""
+
+distutils_enable_tests nose
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ # bug #397605
+ [[ ${CHOST} == *-darwin* ]] \
+ && append-ldflags -bundle "-undefined dynamic_lookup" \
+ || append-ldflags -shared
+
+ # nipy uses the horrible numpy.distutils automagic
+}
+
+#python_test() {
+# distutils-r1_install_for_testing
+# cp nipy/testing/*.nii.gz "${BUILD_DIR}/lib/nipy/testing/"
+# cp nipy/modalities/fmri/tests/*.{mat,npz,txt} "${BUILD_DIR}/lib/nipy/modalities/fmri/tests/"
+# cp nipy/algorithms/statistics/models/tests/test_data.bin "${BUILD_DIR}/lib/nipy/algorithms/statistics/models/tests"
+# cp nipy/labs/spatial_models/tests/some_blobs.nii "${BUILD_DIR}/lib/nipy/labs/spatial_models/tests/some_blobs.nii"
+# mkdir "${BUILD_DIR}/lib/nipy/algorithms/diagnostics/tests/data/"
+# cp nipy/algorithms/diagnostics/tests/data/tsdiff_results.mat "${BUILD_DIR}/lib/nipy/algorithms/diagnostics/tests/data/"
+# cd "${BUILD_DIR}" || die
+# echo "backend : agg" > matplotlibrc
+# nosetests || die
+#}
diff --git a/sci-libs/nipy/nipy-9999.ebuild b/sci-libs/nipy/nipy-9999.ebuild
deleted file mode 100644
index 7acc9a234..000000000
--- a/sci-libs/nipy/nipy-9999.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1 flag-o-matic git-r3
-
-DESCRIPTION="Neuroimaging tools for Python"
-HOMEPAGE="https://nipy.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/nipy/nipy"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS=""
-IUSE=""
-
-RDEPEND="
- dev-python/prov[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- dev-python/sympy[${PYTHON_USEDEP}]
- >=sci-libs/nibabel-1.2[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- "
-
-DEPEND="
- ${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- "
-
-python_prepare_all() {
- distutils-r1_python_prepare_all
- # bug #397605
- [[ ${CHOST} == *-darwin* ]] \
- && append-ldflags -bundle "-undefined dynamic_lookup" \
- || append-ldflags -shared
-
- # nipy uses the horrible numpy.distutils automagic
-}
-
-python_test() {
- distutils-r1_install_for_testing
- cp nipy/testing/*.nii.gz "${BUILD_DIR}/lib/nipy/testing/"
- cp nipy/modalities/fmri/tests/*.{mat,npz,txt} "${BUILD_DIR}/lib/nipy/modalities/fmri/tests/"
- cp nipy/algorithms/statistics/models/tests/test_data.bin "${BUILD_DIR}/lib/nipy/algorithms/statistics/models/tests"
- cp nipy/labs/spatial_models/tests/some_blobs.nii "${BUILD_DIR}/lib/nipy/labs/spatial_models/tests/some_blobs.nii"
- mkdir "${BUILD_DIR}/lib/nipy/algorithms/diagnostics/tests/data/"
- cp nipy/algorithms/diagnostics/tests/data/tsdiff_results.mat "${BUILD_DIR}/lib/nipy/algorithms/diagnostics/tests/data/"
- cd "${BUILD_DIR}" || die
- echo "backend : agg" > matplotlibrc
- nosetests || die
-}
diff --git a/sci-libs/nipype/files/nipype-1.5.0-collections.patch b/sci-libs/nipype/files/nipype-1.5.0-collections.patch
new file mode 100644
index 000000000..e784ba48b
--- /dev/null
+++ b/sci-libs/nipype/files/nipype-1.5.0-collections.patch
@@ -0,0 +1,28 @@
+--- a/nipype/interfaces/base/traits_extension.py 2020-06-03 11:08:30.000000000 -0400
++++ b/nipype/interfaces/base/traits_extension.py 2022-07-11 14:09:31.847784312 -0400
+@@ -19,7 +19,10 @@
+ (usually by Robert Kern).
+
+ """
+-from collections import Sequence
++try:
++ from collections import Sequence
++except ImportError:
++ from collections.abc import Sequence
+
+ # perform all external trait imports here
+ from traits import __version__ as traits_version
+--- a/nipype/utils/misc.py 2020-06-03 11:08:30.000000000 -0400
++++ b/nipype/utils/misc.py 2020-06-03 14:08:57.951408897 -0400
+@@ -6,7 +6,10 @@
+ import os
+ import sys
+ import re
+-from collections import Iterator
++try:
++ from collections import Iterator
++except ImportError:
++ from collections.abc import Iterator
+ from warnings import warn
+
+ from distutils.version import LooseVersion
diff --git a/sci-libs/nipype/nipype-1.5.0.ebuild b/sci-libs/nipype/nipype-1.5.0.ebuild
index 35792adbc..f2a0815dc 100644
--- a/sci-libs/nipype/nipype-1.5.0.ebuild
+++ b/sci-libs/nipype/nipype-1.5.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE="threads(+),sqlite"
inherit distutils-r1
@@ -47,11 +47,12 @@ RDEPEND="
PATCHES=(
"${FILESDIR}/${P}"-version_check.patch
+ "${FILESDIR}/${P}"-collections.patch
)
src_prepare() {
# Remove etelemetry
- sed -i '/"etelemetry/d' nipype/info.py || die
+ sed -i '/"etelemetry/d' nipype/info.py requirements.txt || die
# Mark failing tests
sed -i \
@@ -68,11 +69,18 @@ python_install_all() {
doenvd "${FILESDIR}/98nipype"
}
+EPYTEST_DESELECT=(
+ nipype/algorithms/tests/test_CompCor.py::TestCompCor::test_compcor
+ nipype/algorithms/tests/test_CompCor.py::TestCompCor::test_compcor_variance_threshold_and_metadata
+ nipype/algorithms/tests/test_CompCor.py::TestCompCor::test_tcompcor
+ nipype/interfaces/tests/test_io.py::test_s3datagrabber_communication
+ nipype/utils/tests/test_cmd.py::TestNipypeCMD::test_main_returns_0_on_help
+)
+
python_test() {
# Setting environment variable to disable etelemetry version check:
# https://github.com/nipy/nipype/issues/3196#issuecomment-605980044
- NIPYPE_NO_ET=1 pytest -vv\
- || die
+ NIPYPE_NO_ET=1 epytest
# Upstream test configuration fails
#-c nipype/pytest.ini\
#--doctest-modules nipype\
diff --git a/sci-libs/pybids/Manifest b/sci-libs/pybids/Manifest
index 28c1b4626..fc1863ad9 100644
--- a/sci-libs/pybids/Manifest
+++ b/sci-libs/pybids/Manifest
@@ -1,4 +1,3 @@
DIST pybids-0.10.2.tar.gz 3013772 BLAKE2B 70255fbca7a7d5a51efa454ee20d30a9527703d6028a965b51da883aa10f8b63d180f72fd127e12b27249c3f388825a9bb2ba4604680c57f3a512ec7093c01c4 SHA512 c90b7e471d73b070e86452ca5d03639d0263e74c3c79386b52ed2c5fc49576f985bc923f2327882ee56bc4691631105c831ebe40f78aade5b9943be83909ba16
-DIST pybids-0.11.1.tar.gz 3026079 BLAKE2B 9ca7d1299a074f4b7ae51e7d6ff29a55664b6c32c85511913fb69459bd66a0c09b63dddfef2c433c5cccf47c4e358720cbd101f85e7794e22a9935bd6a36ac65 SHA512 bcc1cc3a06b6921e8336990e83e820439c217cfdce6aee3b4b93f2c1ee04acf0bf9009fa2fc80fd50cd59bd9b1a2a3ceb934589b5fd590612de386e91e4f7340
DIST pybids-0.12.4.tar.gz 3031862 BLAKE2B de9d1ba0a0eb400da1de44189f4920a8d1f003dba1c47b18e339d593c68b5a80c340a9acc5267dbfbf730a59aad004035568a1f8b0de30dbab9c211b11790fbd SHA512 1f2f3a784a1e3f0e74919c6ada2ae0365ab89315d724f0a6b6b38a0416c1e6f7e938966b2dda80f090ef2bbf84ce0bcf0bb214a652743432b1d193d9569eb7b1
DIST pybids-0.6.5.tar.gz 2915557 BLAKE2B d7765b872917bbffcd2706488d7c789976be5bbb1eb5d112cb0b7bcedb483236643f8bf7c177f4a64a44a4d50787a4df1d39fbec8e826bfffd2e2e6f891b3ef3 SHA512 9eef42f00440dddf0147d91f90e07db81f9f95a650f0e47c04304771173ca8691cdb366bd0df1d752c0444f102a4aa010c2343ba75df96528cceb9a98f9d8a0e
diff --git a/sci-libs/pybids/pybids-0.10.2.ebuild b/sci-libs/pybids/pybids-0.10.2.ebuild
index 062cad939..1143655d7 100644
--- a/sci-libs/pybids/pybids-0.10.2.ebuild
+++ b/sci-libs/pybids/pybids-0.10.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
@@ -29,12 +29,4 @@ RDEPEND="
dev-python/scipy[${PYTHON_USEDEP}]
"
-#RESTRICT="test"
-# Fails because fixtures are called directly
-# https://github.com/bids-standard/pybids/issues/289#issuecomment-476853673
-
-python_test() {
- #rm bids/tests/test_config.py || die
- distutils_install_for_testing
- pytest -vv || die
-}
+distutils_enable_tests pytest
diff --git a/sci-libs/pybids/pybids-0.11.1.ebuild b/sci-libs/pybids/pybids-0.11.1.ebuild
deleted file mode 100644
index 062cad939..000000000
--- a/sci-libs/pybids/pybids-0.11.1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python package to access BIDS datasets"
-HOMEPAGE="https://github.com/INCF/pybids"
-SRC_URI="https://github.com/INCF/pybids/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND=""
-RDEPEND="
- dev-python/num2words[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/pandas[${PYTHON_USEDEP}]
- dev-python/patsy[${PYTHON_USEDEP}]
- dev-python/sqlalchemy[${PYTHON_USEDEP}]
- sci-libs/bids-validator[${PYTHON_USEDEP}]
- sci-libs/nibabel[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- "
-
-#RESTRICT="test"
-# Fails because fixtures are called directly
-# https://github.com/bids-standard/pybids/issues/289#issuecomment-476853673
-
-python_test() {
- #rm bids/tests/test_config.py || die
- distutils_install_for_testing
- pytest -vv || die
-}
diff --git a/sci-libs/pybids/pybids-0.12.4.ebuild b/sci-libs/pybids/pybids-0.12.4.ebuild
index 40a8adc17..ace1712ce 100644
--- a/sci-libs/pybids/pybids-0.12.4.ebuild
+++ b/sci-libs/pybids/pybids-0.12.4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
@@ -16,9 +16,7 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
-BDEPEND="dev-python/versioneer[${PYTHON_USEDEP}]
- test? ( dev-python/mock[${PYTHON_USEDEP}] )
-"
+BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
RDEPEND="
dev-python/click[${PYTHON_USEDEP}]
@@ -32,4 +30,4 @@ RDEPEND="
dev-python/scipy[${PYTHON_USEDEP}]
"
-distutils_enable_tests --install pytest
+distutils_enable_tests pytest
diff --git a/sci-libs/pybids/pybids-0.6.5.ebuild b/sci-libs/pybids/pybids-0.6.5.ebuild
index 521ef9947..ceb6784d1 100644
--- a/sci-libs/pybids/pybids-0.6.5.ebuild
+++ b/sci-libs/pybids/pybids-0.6.5.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
diff --git a/sci-libs/simpleitk/simpleitk-1.2.4.ebuild b/sci-libs/simpleitk/simpleitk-1.2.4.ebuild
index 8a3bf5f5a..fa9a721e3 100644
--- a/sci-libs/simpleitk/simpleitk-1.2.4.ebuild
+++ b/sci-libs/simpleitk/simpleitk-1.2.4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
LUA_COMPAT=( lua5-{1..3} )
inherit lua-single cmake python-single-r1
diff --git a/sci-libs/torchvision/torchvision-0.11.2.ebuild b/sci-libs/torchvision/torchvision-0.11.2.ebuild
index 6df2cbc01..b17ac9007 100644
--- a/sci-libs/torchvision/torchvision-0.11.2.ebuild
+++ b/sci-libs/torchvision/torchvision-0.11.2.ebuild
@@ -23,7 +23,7 @@ RDEPEND="
dev-python/six[${PYTHON_USEDEP}]
dev-python/tqdm[${PYTHON_USEDEP}]
dev-python/scipy[${PYTHON_USEDEP}]
- sci-libs/pytorch[${PYTHON_USEDEP}]
+ sci-libs/pytorch[cuda(-)?,${PYTHON_USEDEP}]
media-video/ffmpeg
dev-qt/qtcore:5
"