From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3DEC21381F3 for ; Wed, 11 Sep 2013 17:27:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C6AE9E0B96; Wed, 11 Sep 2013 17:27:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 31A7DE0B87 for ; Wed, 11 Sep 2013 17:27:09 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BDE4933EADD for ; Wed, 11 Sep 2013 17:27:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7199DE468F for ; Wed, 11 Sep 2013 17:27:06 +0000 (UTC) From: "Nicolas Bock" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nicolas Bock" Message-ID: <1370872102.0aec1cb1fbac8cd73b2f8847dc7ee5dccda41cde.nicolasbock@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/itk/files/, sci-libs/itk/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/itk/files/itk-4.4-v3compat_I2VI_const-fix.patch sci-libs/itk/itk-4.4.0.ebuild sci-libs/itk/metadata.xml X-VCS-Directories: sci-libs/itk/files/ sci-libs/itk/ X-VCS-Committer: nicolasbock X-VCS-Committer-Name: Nicolas Bock X-VCS-Revision: 0aec1cb1fbac8cd73b2f8847dc7ee5dccda41cde X-VCS-Branch: master Date: Wed, 11 Sep 2013 17:27:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a2cbe401-b01a-4add-9f6d-b6e1baefbd88 X-Archives-Hash: 2c5b5dea37f75665dfd6f34ea946b035 commit: 0aec1cb1fbac8cd73b2f8847dc7ee5dccda41cde Author: Gert Wollny die upm es> AuthorDate: Mon Jun 10 13:48:22 2013 +0000 Commit: Nicolas Bock gmail com> CommitDate: Mon Jun 10 13:48:22 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0aec1cb1 Add itk --- .../files/itk-4.4-v3compat_I2VI_const-fix.patch | 13 ++ sci-libs/itk/itk-4.4.0.ebuild | 158 +++++++++++++++++++++ sci-libs/itk/metadata.xml | 18 +++ 3 files changed, 189 insertions(+) diff --git a/sci-libs/itk/files/itk-4.4-v3compat_I2VI_const-fix.patch b/sci-libs/itk/files/itk-4.4-v3compat_I2VI_const-fix.patch new file mode 100644 index 0000000..ca0ac5f --- /dev/null +++ b/sci-libs/itk/files/itk-4.4-v3compat_I2VI_const-fix.patch @@ -0,0 +1,13 @@ +diff -ru InsightToolkit-4.4.0/Modules/Compatibility/V3Compatibility/include/itkImageToVectorImageFilter.hxx InsightToolkit-4.4.0.new/Modules/Compatibility/V3Compatibility/include/itkImageToVectorImageFilter.hxx +--- InsightToolkit-4.4.0/Modules/Compatibility/V3Compatibility/include/itkImageToVectorImageFilter.hxx 2013-05-29 22:23:15.000000000 +0200 ++++ InsightToolkit-4.4.0.new/Modules/Compatibility/V3Compatibility/include/itkImageToVectorImageFilter.hxx 2013-06-09 22:04:35.157129143 +0200 +@@ -61,7 +61,7 @@ + + for ( unsigned int i = 0; i < numberOfInputs; i++ ) + { +- InputImageType *input = this->Superclass::GetInput(i); ++ const InputImageType *input = this->Superclass::GetInput(i); + if ( !input ) + { + itkExceptionMacro(<< "Input " << i << " not set!"); +Only in InsightToolkit-4.4.0.new/Modules/Compatibility/V3Compatibility/include: itkImageToVectorImageFilter.hxx~ diff --git a/sci-libs/itk/itk-4.4.0.ebuild b/sci-libs/itk/itk-4.4.0.ebuild new file mode 100644 index 0000000..4e4ed55 --- /dev/null +++ b/sci-libs/itk/itk-4.4.0.ebuild @@ -0,0 +1,158 @@ +# Copyright 2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" +PYTHON_DEPEND="2:2.6" + +inherit eutils toolchain-funcs cmake-utils + +DESCRIPTION="NLM Insight Segmentation and Registration Toolkit" +HOMEPAGE="http://www.itk.org" +SRC_URI="mirror://sourceforge/itk/InsightToolkit-${PV}.tar.gz" +RESTRICT="primaryuri" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug examples fftw +shared test python hdf5 itkv3compat review" + +RDEPEND="sys-libs/zlib + fftw? ( sci-libs/fftw ) + hdf5? ( sci-libs/hdf5[cxx] ) + virtual/jpeg + media-libs/libpng + media-libs/tiff:0 + sys-libs/zlib + " +DEPEND="${RDEPEND} + >=dev-util/cmake-2.8 + python? ( >=dev-lang/python-2.5 >=dev-lang/swig-2.0 >=dev-cpp/gccxml-0.9.0_pre20120309 ) + " + +MY_PN=InsightToolkit +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + epatch "${FILESDIR}/itk-4.4-v3compat_I2VI_const-fix.patch" +} + +src_configure() { + if [ "x$ITK_COMPUTER_MEMORY_SIZE" = "x" ]; then + ITK_COMPUTER_MEMORY_SIZE=4 + fi + if [ "x$ITK_WRAP_DIMS" = "x" ]; then + ITK_WRAP_DIMS=2,3 + fi + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX:PATH=/usr + -DWRAP_ITK_JAVA=OFF + -DWRAP_ITK_TCL=OFF + -DITK_USE_SYSTEM_JPEG=ON + -DITK_USE_SYSTEM_PNG=ON + -DITK_USE_SYSTEM_TIFF=ON + -DITK_USE_SYSTEM_ZLIB=ON + -DITK_BUILD_ALL_MODULES=ON + -DITK_USE_SYSTEM_GCCXML=ON + -DITK_USE_SYSTEM_SWIG=ON + $(cmake-utils_use hdf5 ITK_USE_SYSTEM_HDF5) + $(cmake-utils_use examples BUILD_EXAMPLES) + $(cmake-utils_use shared BUILD_SHARED_LIBS) + $(cmake-utils_use test BUILD_TESTING) + $(cmake-utils_use review ITK_USE_REVIEW) + ) + + if use itkv3compat; then + mycmakeargs+=( -DITKV3_COMPATIBILITY=ON ) + fi + + + 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 python; then + mycmakeargs+=( -DITK_WRAP_PYTHON=ON) + fi + + cmake-utils_src_configure +} + +#src_compile() { +# cd "${WORKDIR}/${PN}-${PV}_build" +# emake || die "emake failed" +#} + +src_install() { + + cmake-utils_src_install + + pushd "${CMAKE_BUILD_DIR}" &> /dev/null + + # install the examples + if use examples; then + # Copy Example sources + rm -rf $(find "Examples" -type d -a -name "CMakeFiles") \; || \ + die "Failed remove build files" + + dodir /usr/share/${MY_PN}/examples || \ + die "Failed to create examples directory" + + pushd "${S}" + # remove CVS directories from examples folder + rm -rf $(find "Examples" -type d -name CVS ) ||\ + die "Failed to remove CVS folders" + cp -pPR "Examples" "${D}/usr/share/${MY_PN}/examples/src" || \ + die "Failed to copy example files" + + popd + + # copy binary examples + cp -pPR "bin" "${D}/usr/share/${MY_PN}/examples" || \ + die "Failed to copy binary example files" + rm -rf "${D}"/usr/share/"${MY_PN}"/examples/bin/*.so* || \ + die "Failed to remove libraries from examples directory" + + # fix examples permissions + find "${D}/usr/share/${MY_PN}/examples/src" -type d -exec \ + chmod 0755 {} \; || \ + die "Failed to fix example directories permissions" + find "${D}/usr/share/${MY_PN}/examples/src" -type f -exec \ + chmod 0644 {} \; || \ + die "Failed to fix example files permissions" + fi + popd + + echo "ITK_DATA_ROOT=/usr/share/${PN}/data" > ${T}/40${PN} + + LDPATH="/usr/lib/InsightToolkit" + + if use python; then + echo "PYTHONPATH=/usr/lib/InsightToolkit/WrapITK/Python" >> ${T}/40${PN} + LDPATH="${LDPATH}:/usr/lib/InsightToolkit/WrapITK/lib" + fi + echo "LDPATH=${LDPATH}" >> $T/40${PN} + + doenvd "${T}/40${PN}" + +} + +pkg_postinst() { + + if use patented; then + ewarn "Using patented code in ITK may require a license." + ewarn "For more information, please read:" + ewarn "http://www.itk.org/HTML/Copyright.htm" + ewarn "http://www.itk.org/Wiki/ITK_Patent_Bazaar" + fi + +} diff --git a/sci-libs/itk/metadata.xml b/sci-libs/itk/metadata.xml new file mode 100644 index 0000000..28647fd --- /dev/null +++ b/sci-libs/itk/metadata.xml @@ -0,0 +1,18 @@ + + + +no-herd + + maintainer-needed@gentoo.org + + + ITK is a library that provides developers with an extensive suite of tools for image analysis. + + + Build shared libraries + Use review statistics + Compile patented algorithms + Enable compilation of mehods under review + + +