sci-libs/itk: version bump 5.1.0 ahead of Gentoo Science
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Horea Christian <chr@chymera.eu>
This commit is contained in:
parent
23f513cd9b
commit
4124c531d9
5
sci-libs/itk/ChangeLog
Normal file
5
sci-libs/itk/ChangeLog
Normal file
@ -0,0 +1,5 @@
|
||||
*itk-5.1.0 (04 Aug 2020)
|
||||
|
||||
04 Aug 2020; <chymera@gentoo.org> +files/itk-5.1.0-downloads.patch,
|
||||
+files/tests.patch, +itk-5.1.0.ebuild, +metadata.xml:
|
||||
sci-libs/itk: version bump 5.1.0 ahead of Gentoo Science
|
3
sci-libs/itk/Manifest
Normal file
3
sci-libs/itk/Manifest
Normal file
@ -0,0 +1,3 @@
|
||||
DIST ITKGenericLabelInterpolator-5.1.0.zip 161970 SHA256 8c6cda6d4d8bac95347576b35355cc7a0fe127396b2c96fb8688b413045ff704 SHA512 26304168d2dc6f825ba085912c50a179e101da281b3d646109250c5ac9d12f2ad2216f967a81fb12d54ebd55ff7b17a355658282d7c65efb16dafb311fb3fc2c WHIRLPOOL d183ea141b212fa2247f595155836710cee5c05049caa0c67326a9ebb9eaf16f192464580ac616ab5970242704a797afb5fda9ecd79a19f3e41b2556c42bdd8d
|
||||
DIST InsightData-5.1.0.tar.gz 292322103 SHA256 777f587c587b47d76157a0ee87a5942b944742f334b801abe0e6dc1ad1d8424f SHA512 458c2959ba5e0745eee23e16ff7178230a7bae94d7dff065b3b38136e238becff96554693e3b2149d2307949c23a6c695c92676f8d44e6f7305dbb8bed48c9fa WHIRLPOOL d5785f862c627cabc97c469ac9fb84d1493e1827fd993c68ed5019e7062adc7fe68efe6ab2471c7c6b2a9d542cbfdb1a00c6633fa7be498cbc9e09fa12d3710a
|
||||
DIST InsightToolkit-5.1.0.tar.gz 20694338 SHA256 121020a1611508cec8123eb5226215598cec07be627d843a2e6b6da891e61d13 SHA512 413b6ef549b59d8f507038130446ccb704794c6d0980d8ab631d1b1051cb91f399e77c26b69fab6a1e9b9bb4cc233d49996c3ee735cd4de065993d4379b4ed4c WHIRLPOOL bbe7368cc46dc1a0869d8ab47218d0777e689be17114048653a537fbe792dfc0eb0e687b06fa894218cc35ef95143df75a46c17ffd6b072233e9f72a3c811825
|
20
sci-libs/itk/files/itk-5.1.0-downloads.patch
Normal file
20
sci-libs/itk/files/itk-5.1.0-downloads.patch
Normal file
@ -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.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
|
||||
)
|
41
sci-libs/itk/files/tests.patch
Normal file
41
sci-libs/itk/files/tests.patch
Normal file
@ -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 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()
|
177
sci-libs/itk/itk-5.1.0.ebuild
Normal file
177
sci-libs/itk/itk-5.1.0.ebuild
Normal file
@ -0,0 +1,177 @@
|
||||
# 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"
|
||||
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}.zip -> ITKGenericLabelInterpolator-${PV}.zip
|
||||
test? (
|
||||
https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${PV}/InsightData-${PV}.tar.gz
|
||||
)
|
||||
"
|
||||
#https://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator/archive/${GLI_HASH}.zip -> ITKGenericLabelInterpolator-${PV}.zip
|
||||
#https://data.kitware.com/api/v1/folder/${GLI_TEST_HASH}/download -> ITKGenericLabelInterpolator_test-${PV}.zip
|
||||
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/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=
|
||||
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 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/External/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_EXAMPLES="$(usex examples ON OFF)"
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_TESTING="$(usex test ON OFF)"
|
||||
-Ddouble-conversion_INCLUDE_DIRS="${EPREFIX}/usr/include/double-conversion"
|
||||
-DExternalData_OBJECT_STORES="${WORKDIR}/InsightToolkit-${PV}/.ExternalData"
|
||||
-DGDCM_USE_SYSTEM_OPENJPEG=ON
|
||||
-DITK_FORBID_DOWNLOADS:BOOL=ON
|
||||
-DITK_INSTALL_LIBRARY_DIR=$(get_libdir)
|
||||
-DITK_USE_REVIEW="$(usex review ON 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}"
|
||||
-DModule_GenericLabelInterpolator:BOOL=ON
|
||||
-DModule_ITKReview:BOOL=ON
|
||||
-DWRAP_ITK_JAVA=OFF
|
||||
-DWRAP_ITK_TCL=OFF
|
||||
)
|
||||
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
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
docompress -x /usr/share/doc/${PF}/examples
|
||||
doins -r "${S}"/Examples/*
|
||||
fi
|
||||
|
||||
echo "ITK_DATA_ROOT=${EROOT%/}/usr/share/${PN}/data" > ${T}/40${PN}
|
||||
local ldpath="${EROOT%/}/usr/$(get_libdir)/InsightToolkit"
|
||||
if use python; then
|
||||
echo "PYTHONPATH=${EROOT%/}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> "${T}"/40${PN}
|
||||
ldpath="${ldpath}:${EROOT%/}/usr/$(get_libdir)/InsightToolkit/WrapITK/lib"
|
||||
fi
|
||||
echo "LDPATH=${ldpath}" >> "${T}"/40${PN}
|
||||
doenvd "${T}"/40${PN}
|
||||
|
||||
if use doc; then
|
||||
insinto /usr/share/doc/${PF}/api-docs
|
||||
cd "${WORKDIR}"/html
|
||||
rm *.md5 || die "Failed to remove superfluous hashes"
|
||||
einfo "Installing API docs. This may take some time."
|
||||
insinto /usr/share/doc/${PF}/api-docs
|
||||
doins -r *
|
||||
fi
|
||||
}
|
23
sci-libs/itk/metadata.xml
Normal file
23
sci-libs/itk/metadata.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>maintainer-wanted@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>sci-biology@gentoo.org</email>
|
||||
<name>Gentoo Biology Project</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
Insight Segmentation and Registration Toolkit (ITK) is a library
|
||||
that provides developers with an extensive suite of tools for image
|
||||
analysis.
|
||||
</longdescription>
|
||||
<use>
|
||||
<flag name="review">Enable compilation of methods under review</flag>
|
||||
<flag name="vtkglue">PLEASE FIX MY DESCRIPTION</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">itk</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user