[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: 3d21154c5c99a552d9a79c651f09de25594a88b0 Author: Horea Christian chymera eu> AuthorDate: Sat May 13 01:29:30 2023 + Commit: Horea Christian gmail com> CommitDate: Sat May 13 01:30:58 2023 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=3d21154c sci-libs/itk: patch for newer gcc Signed-off-by: Horea Christian chymera.eu> sci-libs/itk/files/itk-5.3.0-uint8.patch | 10 ++ sci-libs/itk/itk-5.3.0-r1.ebuild | 2 ++ 2 files changed, 12 insertions(+) diff --git a/sci-libs/itk/files/itk-5.3.0-uint8.patch b/sci-libs/itk/files/itk-5.3.0-uint8.patch new file mode 100644 index 0..724314574 --- /dev/null +++ b/sci-libs/itk/files/itk-5.3.0-uint8.patch @@ -0,0 +1,10 @@ +--- a/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h b/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h +@@ -20,6 +20,7 @@ + + #include + #include "ITKMathematicalMorphologyExport.h" ++#include + + + namespace itk diff --git a/sci-libs/itk/itk-5.3.0-r1.ebuild b/sci-libs/itk/itk-5.3.0-r1.ebuild index 23f3341a2..29a3da5d0 100644 --- a/sci-libs/itk/itk-5.3.0-r1.ebuild +++ b/sci-libs/itk/itk-5.3.0-r1.ebuild @@ -92,9 +92,11 @@ BDEPEND=" S="${WORKDIR}/${MY_P}" +# uint patch applied by upstream for next release. PATCHES=( "${FILESDIR}/${PN}-5.2.1-system-tiff-has-64.patch" "${FILESDIR}/${PN}-5.3.0-system-openjpeg.patch" + "${FILESDIR}/${PN}-5.3.0-uint8.patch" ) pkg_pretend() {
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: d23b080b9afe74c6590a9827d505e9234c00deb0 Author: Horea Christian chymera eu> AuthorDate: Sat Mar 25 01:48:55 2023 + Commit: Horea Christian gmail com> CommitDate: Sat Mar 25 01:48:55 2023 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=d23b080b sci-libs/itk: add 5.3.0 Signed-off-by: Horea Christian chymera.eu> sci-libs/itk/files/itk-5.3.0-system-openjpeg.patch | 550 + sci-libs/itk/itk-5.3.0.ebuild | 251 ++ 2 files changed, 801 insertions(+) diff --git a/sci-libs/itk/files/itk-5.3.0-system-openjpeg.patch b/sci-libs/itk/files/itk-5.3.0-system-openjpeg.patch new file mode 100644 index 0..27f139553 --- /dev/null +++ b/sci-libs/itk/files/itk-5.3.0-system-openjpeg.patch @@ -0,0 +1,550 @@ +--- 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 ++/* Use the openjpeg library configured for ITK. */ ++#cmakedefine ITK_USE_SYSTEM_OPENJPEG ++#ifdef ITK_USE_SYSTEM_OPENJPEG ++# include ++#else ++# include ++#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
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: 76b20521901742c59aa823035357a3a49ebb0aad Author: François-Xavier Carton gmail com> AuthorDate: Thu Sep 29 18:08:30 2022 + Commit: Andrew Ammerlaan gentoo org> CommitDate: Fri Sep 30 06:49:55 2022 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=76b20521 sci-libs/itk: add upstream patch to fix building tests Needed since commit b6218b "sci-libs/itk: add AdaptiveDenoising module" because the commit used for that remote module is too recent and needs that ITK commit. Signed-off-by: François-Xavier Carton gmail.com> Closes: https://github.com/gentoo/sci/pull/1172 Signed-off-by: Andrew Ammerlaan gentoo.org> sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch | 54 ++ .../{itk-5.2.1-r1.ebuild => itk-5.2.1-r2.ebuild} | 0 2 files changed, 54 insertions(+) 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 index 2e547d9ca..2af8c4998 100644 --- a/sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch +++ b/sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch @@ -1,6 +1,7 @@ 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 @@ -253,3 +254,56 @@ index fca3d999b87..3b7a1d37334 100644 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 +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 +--- + 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/itk-5.2.1-r1.ebuild b/sci-libs/itk/itk-5.2.1-r2.ebuild similarity index 100% rename from sci-libs/itk/itk-5.2.1-r1.ebuild rename to sci-libs/itk/itk-5.2.1-r2.ebuild
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: 9ff3b1053e275f3a30fa574c79f3ee1af8cbeca0 Author: Andrew Ammerlaan gentoo org> AuthorDate: Thu Sep 15 11:09:45 2022 + Commit: Andrew Ammerlaan gentoo org> CommitDate: Thu Sep 15 11:09:45 2022 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=9ff3b105 Revert "sci-libs/itk: add 5.1.0" This reverts commit 42b8aadc9ce1de416e55dba98c3ba02a0177366f. Signed-off-by: Andrew Ammerlaan gentoo.org> sci-libs/itk/files/itk-5.1.0-downloads.patch | 20 --- sci-libs/itk/files/itk-5.1.0-include_limits.patch | 10 -- sci-libs/itk/files/tests.patch| 41 - sci-libs/itk/itk-5.1.0.ebuild | 191 -- 4 files changed, 262 deletions(-) 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..0 --- 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.0 -0400 -+++ b/Modules/Remote/GenericLabelInterpolator.remote.cmake 2020-04-25 14:30:53.0 -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..0 --- 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 - - namespace gdcm - { diff --git a/sci-libs/itk/files/tests.patch b/sci-libs/itk/files/tests.patch deleted file mode 100644 index c24714e4d..0 --- 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.1.0.ebuild b/sci-libs/itk/itk-5.1.0.ebuild deleted file mode 100644 index 34d2c215d..0 --- a/sci-libs/itk/itk-5.1.0.ebuild +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) - -inherit cmake python-single-r1 -
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: e183cbc1d2404c5ce6348627365cdc1aa483c375 Author: Andrew Ammerlaan gentoo org> AuthorDate: Wed Aug 31 10:30:15 2022 + Commit: Andrew Ammerlaan gentoo org> CommitDate: Wed Aug 31 10:30:15 2022 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=e183cbc1 sci-libs/itk: drop 5.0.1, 5.1.0 Signed-off-by: Andrew Ammerlaan gentoo.org> ...p-TransformFileReader-TransformFileWriter.patch | 50 -- ...itkQuasiNewtonOptimizerv4-wrapping-warnin.patch | 28 --- ...itkGradientDescentOptimizerv4-wrapping-wa.patch | 73 ...OptimizerParameterScalesEstimatorTemplate.patch | 30 .../0005-make-gdcm-helper-library-static.patch | 11 -- sci-libs/itk/files/ITKModuleRemote.patch | 45 - sci-libs/itk/files/itk-5.1.0-downloads.patch | 20 --- sci-libs/itk/files/itk-5.1.0-include_limits.patch | 10 -- sci-libs/itk/files/nrrdio-linking.patch| 15 -- sci-libs/itk/files/tests.patch | 41 - sci-libs/itk/itk-5.0.1.ebuild | 178 --- sci-libs/itk/itk-5.1.0.ebuild | 191 - 12 files changed, 692 deletions(-) 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..0 --- 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 -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 - -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 000..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..0 --- 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 -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
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: b4acbb5f52ed06ad45b5a4e877498a6c9f683d4e Author: François-Xavier Carton gmail com> AuthorDate: Fri Jun 10 13:16:57 2022 + Commit: Andrew Ammerlaan gentoo org> CommitDate: Tue Aug 23 10:58:09 2022 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=b4acbb5f sci-libs/itk: bump to 5.2.1 Signed-off-by: François-Xavier Carton gmail.com> Signed-off-by: Andrew Ammerlaan gentoo.org> Closes: https://github.com/gentoo/sci/pull/1154 .../itk-5.2.1-fix-castxml-clang-attr-malloc.patch | 25 + sci-libs/itk/files/itk-5.2.1-system-openjpeg.patch | 558 + .../itk/files/itk-5.2.1-system-tiff-has-64.patch | 18 + sci-libs/itk/files/itk-5.2.1-upstream-fixes.patch | 255 ++ sci-libs/itk/itk-5.2.1.ebuild | 246 + 5 files changed, 1102 insertions(+) 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 0..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 +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 0..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 ++/* Use the openjpeg library configured for ITK. */ ++#cmakedefine ITK_USE_SYSTEM_OPENJPEG ++#ifdef ITK_USE_SYSTEM_OPENJPEG ++# include ++#else ++# include ++#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) ++
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: 7112647657d76049ee42f5e2c86c05c2c1330760 Author: Horea Christian chymera eu> AuthorDate: Fri Sep 25 07:33:20 2020 + Commit: Horea Christian gmail com> CommitDate: Fri Sep 25 07:33:20 2020 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=71126476 sci-libs/itk: version bump 5.1.0 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Horea Christian chymera.eu> sci-libs/itk/files/itk-5.1.0-downloads.patch | 20 +++ sci-libs/itk/itk-5.1.0.ebuild| 188 +++ 2 files changed, 208 insertions(+) diff --git a/sci-libs/itk/files/itk-5.1.0-downloads.patch b/sci-libs/itk/files/itk-5.1.0-downloads.patch new file mode 100644 index 0..34fdb76d1 --- /dev/null +++ b/sci-libs/itk/files/itk-5.1.0-downloads.patch @@ -0,0 +1,20 @@ +--- 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.0 -0400 b/Modules/Remote/GenericLabelInterpolator.remote.cmake 2020-04-25 14:30:53.0 -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/itk-5.1.0.ebuild b/sci-libs/itk/itk-5.1.0.ebuild new file mode 100644 index 0..64fd555cb --- /dev/null +++ b/sci-libs/itk/itk-5.1.0.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) + +inherit toolchain-funcs cmake python-single-r1 + +MY_PN="InsightToolkit" +MY_P="${MY_PN}-${PV}" +GLI_HASH="a02cbeaf28cb3d28ac66b9ac651073530eb6ab78" +TEST_HASH="0eb202e23ae81be123b1b26cf31a9ba743824700" +declare -a GLI_TEST_HASHES=( + "a5e11ea71164ff78c65fcf259db01ea5db981a9d868e60045ff2bffca92984df1174bf984a1076e450f0d5d69b4f0191ed1a61465c220e2c91a893b5df150c0a" + "bcdbb347f3704262d1f00be7179d6a0a6e68aed56c0653e8072ee5a94985c713bd229c935b1226a658af84fb7f1fffc2458c98364fc35303a2303b12f9f7ce2f" +) + +GLI_TEST_SRC="" +for i in "${GLI_TEST_HASHES[@]}"; do + GLI_TEST_SRC+="https://data.kitware.com/api/v1/file/hashsum/sha512/${i} -> ${i} " +done + +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}.zip -> ITKGenericLabelInterpolator-${PV}.zip + test? ( + https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${PV}/InsightData-${PV}.tar.gz + https://github.com/InsightSoftwareConsortium/ITKTestingData/archive/${TEST_HASH}.tar.gz + ${GLI_TEST_SRC} + ) + " +RESTRICT="primaryuri" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="debug doc examples fftw python review test vtkglue" +# 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-libs/double-conversion:0= + media-libs/openjpeg:2 + media-libs/libpng:0= + media-libs/tiff:0=[jpeg] + sci-libs/dcmtk:0= + sci-libs/hdf5:0=[cxx] + sys-libs/zlib:0= + virtual/jpeg:0= + fftw? ( sci-libs/fftw:3.0= ) + vtkglue? ( sci-libs/vtk:0=[rendering,python?] ) +" +DEPEND="${RDEPEND} + sys-apps/coreutils + python? ( + >=dev-lang/swig-2.0:0 + dev-cpp/castxml + ) + doc? ( app-doc/doxygen ) +" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/tests.patch + "${FILESDIR}"/${P}-downloads.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
[gentoo-commits] proj/sci:master commit in: sci-libs/itk/, sci-libs/itk/files/
commit: 445eb95b61c9b12481b24f962123d0f13e940ab6 Author: Horea Christian chymera eu> AuthorDate: Mon Sep 9 08:25:49 2019 + Commit: Horea Christian gmail com> CommitDate: Mon Sep 9 08:25:49 2019 + URL:https://gitweb.gentoo.org/proj/sci.git/commit/?id=445eb95b sci-libs/itk: version bump to 5.0.1 And removed deprecated versions on account of gccxml removal Package-Manager: Portage-2.3.72, Repoman-2.3.17 Signed-off-by: Horea Christian chymera.eu> sci-libs/itk/files/ITKModuleRemote.patch | 45 ++ sci-libs/itk/files/tests.patch | 41 ++ sci-libs/itk/itk-4.12.0.ebuild | 136 -- sci-libs/itk/itk-4.4.2-r1.ebuild | 135 -- sci-libs/itk/itk-4.4.2.ebuild | 115 --- sci-libs/itk/itk-4.5.1.ebuild | 155 - .../itk/{itk-5.0_rc1.ebuild => itk-5.0.1.ebuild} | 50 +-- sci-libs/itk/metadata.xml | 1 - 8 files changed, 124 insertions(+), 554 deletions(-) diff --git a/sci-libs/itk/files/ITKModuleRemote.patch b/sci-libs/itk/files/ITKModuleRemote.patch new file mode 100644 index 0..eb130159a --- /dev/null +++ b/sci-libs/itk/files/ITKModuleRemote.patch @@ -0,0 +1,45 @@ +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/tests.patch b/sci-libs/itk/files/tests.patch new file mode 100644 index 0..c24714e4d --- /dev/null +++ b/sci-libs/itk/files/tests.patch @@ -0,0 +1,41 @@ +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