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"
30 fftw? ( sci-libs/fftw:3.0 )
33 python? ( ${PYTHON_DEPS}
35 >=dev-cpp/gccxml-0.9.0_pre20120309 )
41 if [[ -z ${ITK_COMPUTER_MEMORY_SIZE} ]]; then
42 elog "To tune ITK to make the best use ouf working memory you can set"
43 elog " ITK_COMPUTER_MEMORY_SIZE=XX"
44 elog "in make.conf, default is 1 (unit is GB)"
46 if use python && [[ -z ${ITK_WRAP_DIMS} ]]; then
47 elog "For Python language bindings, you can define the dimensions"
48 elog "you want to create bindings for by setting"
49 elog " ITK_WRAP_DIMS=X;Y;Z..."
50 elog "in make.conf, default is 2;3 for 2D and 3D data"
58 -DITK_USE_SYSTEM_HDF5=ON
59 -DITK_USE_SYSTEM_JPEG=ON
60 -DITK_USE_SYSTEM_PNG=ON
61 -DITK_USE_SYSTEM_TIFF=ON
62 -DITK_USE_SYSTEM_ZLIB=ON
63 -DITK_USE_SYSTEM_GCCXML=ON
64 -DITK_USE_SYSTEM_SWIG=ON
65 -DITK_BUILD_ALL_MODULES=ON
66 -DBUILD_SHARED_LIBS=ON
68 -DITK_COMPUTER_MEMORY_SIZE="${ITK_COMPUTER_MEMORY_SIZE:-1}"
69 $(cmake-utils_use_build test TESTING)
70 $(cmake-utils_use review ITK_USE_REVIEW)
71 $(cmake-utils_use itkv3compat ITKV3_COMPATIBILITY)
72 $(cmake-utils_use sse2 VNL_CONFIG_ENABLE_SSE2)
80 -DITK_WRAP_vector_double=ON
81 -DITK_WRAP_covariant_vector_double=ON
82 -DITK_WRAP_complex_double=ON
88 -DITK_WRAP_DIMS="${ITK_WRAP_DIMS:-2;3}"
95 cmake-utils_src_configure
99 cmake-utils_src_install
101 if use examples; then
102 insinto /usr/share/doc/${PF}/examples
103 docompress -x /usr/share/doc/${PF}/examples
104 doins -r "${S}"/Examples/*
107 echo "ITK_DATA_ROOT=${EROOT}/usr/share/${PN}/data" > ${T}/40${PN}
108 local ldpath="${EROOT}/usr/$(get_libdir)/InsightToolkit"
110 echo "PYTHONPATH=${EROOT}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> ${T}/40${PN}
111 ldpath="${ldpath}:${EROOT}/usr/$(get_libdir)/InsightToolkit/WrapITK/lib"
113 echo "LDPATH=${ldpath}" >> ${T}/40${PN}
115 doenvd "${T}"/40${PN}