1 # Copyright 2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{2_5,2_6,2_7} )
9 inherit eutils toolchain-funcs cmake-utils python-single-r1
11 MYP=InsightToolkit-${PV}
13 DESCRIPTION="NLM Insight Segmentation and Registration Toolkit"
14 HOMEPAGE="http://www.itk.org"
15 SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.gz"
21 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
22 IUSE="debug examples fftw itkv3compat python review sse2 test vtkglue"
30 fftw? ( sci-libs/fftw:3.0 )
31 vtkglue? ( sci-libs/vtk )
34 python? ( ${PYTHON_DEPS}
36 >=dev-cpp/gccxml-0.9.0_pre20120309 )
42 if [[ -z ${ITK_COMPUTER_MEMORY_SIZE} ]]; then
43 elog "To tune ITK to make the best use ouf working memory you can set"
44 elog " ITK_COMPUTER_MEMORY_SIZE=XX"
45 elog "in make.conf, default is 1 (unit is GB)"
47 if use python && [[ -z ${ITK_WRAP_DIMS} ]]; then
48 elog "For Python language bindings, you can define the dimensions"
49 elog "you want to create bindings for by setting"
50 elog " ITK_WRAP_DIMS=X;Y;Z..."
51 elog "in make.conf, default is 2;3 for 2D and 3D data"
59 -DITK_USE_SYSTEM_HDF5=ON
60 -DITK_USE_SYSTEM_JPEG=ON
61 -DITK_USE_SYSTEM_PNG=ON
62 -DITK_USE_SYSTEM_TIFF=ON
63 -DITK_USE_SYSTEM_ZLIB=ON
64 -DITK_USE_SYSTEM_GCCXML=ON
65 -DITK_USE_SYSTEM_SWIG=ON
66 -DITK_BUILD_ALL_MODULES=ON
67 -DBUILD_SHARED_LIBS=ON
69 -DITK_COMPUTER_MEMORY_SIZE="${ITK_COMPUTER_MEMORY_SIZE:-1}"
70 $(cmake-utils_use_build test TESTING)
71 $(cmake-utils_use review ITK_USE_REVIEW)
72 $(cmake-utils_use itkv3compat ITKV3_COMPATIBILITY)
73 $(cmake-utils_use sse2 VNL_CONFIG_ENABLE_SSE2)
81 -DITK_WRAP_vector_double=ON
82 -DITK_WRAP_covariant_vector_double=ON
83 -DITK_WRAP_complex_double=ON
88 -DModule_ITKVtkGlue=ON
94 -DITK_WRAP_DIMS="${ITK_WRAP_DIMS:-2;3}"
101 cmake-utils_src_configure
105 cmake-utils_src_install
107 if use examples; then
108 insinto /usr/share/doc/${PF}/examples
109 docompress -x /usr/share/doc/${PF}/examples
110 doins -r "${S}"/Examples/*
113 echo "ITK_DATA_ROOT=${EROOT}/usr/share/${PN}/data" > ${T}/40${PN}
114 local ldpath="${EROOT}/usr/$(get_libdir)/InsightToolkit"
116 echo "PYTHONPATH=${EROOT}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> ${T}/40${PN}
117 ldpath="${ldpath}:${EROOT}/usr/$(get_libdir)/InsightToolkit/WrapITK/lib"
119 echo "LDPATH=${ldpath}" >> ${T}/40${PN}
121 doenvd "${T}"/40${PN}