inherit eutils toolchain-funcs cmake-utils python-single-r1
-MYP=InsightToolkit-${PV}
+MYPN=InsightToolkit
+MYP=${MYPN}-${PV}
DESCRIPTION="NLM Insight Segmentation and Registration Toolkit"
HOMEPAGE="http://www.itk.org"
-SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.gz"
-
+SRC_URI="
+ mirror://sourceforge/${PN}/${MYP}.tar.gz
+ doc? ( mirror://sourceforge/${PN}/Doxygen${MYPN}-4.4.0.tar.gz )"
RESTRICT="primaryuri"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug examples fftw itkv3compat python review sse2 test"
+IUSE="debug doc examples fftw itkv3compat python review sse2 test vtkglue"
RDEPEND="
sci-libs/hdf5[cxx]
media-libs/tiff:0
sys-libs/zlib
fftw? ( sci-libs/fftw:3.0 )
+ vtkglue? ( sci-libs/vtk )
"
DEPEND="${RDEPEND}
python? ( ${PYTHON_DEPS}
>=dev-lang/swig-2.0
>=dev-cpp/gccxml-0.9.0_pre20120309 )
+ doc? ( app-doc/doxygen )
"
S="${WORKDIR}/${MYP}"
-DITK_WRAP_complex_double=ON
)
fi
+ if use vtkglue; then
+ mycmakeargs+=(
+ -DModule_ITKVtkGlue=ON
+ )
+ fi
if use python; then
mycmakeargs+=(
-DITK_WRAP_PYTHON=ON
fi
echo "LDPATH=${ldpath}" >> ${T}/40${PN}
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/api-docs"
+ cd "${WORKDIR}"/html
+ rm -f *.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 ./* || die "Failed to install docs"
+ fi
+
doenvd "${T}"/40${PN}
}