public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Nicolas Bock" <nicolasbock@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/itk/files/, sci-libs/itk/
Date: Wed, 11 Sep 2013 17:27:06 +0000 (UTC)	[thread overview]
Message-ID: <1370872102.0aec1cb1fbac8cd73b2f8847dc7ee5dccda41cde.nicolasbock@gentoo> (raw)

commit:     0aec1cb1fbac8cd73b2f8847dc7ee5dccda41cde
Author:     Gert Wollny <gert <AT> die <DOT> upm <DOT> es>
AuthorDate: Mon Jun 10 13:48:22 2013 +0000
Commit:     Nicolas Bock <nicolasbock <AT> gmail <DOT> 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+  <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+  ITK is a library that provides developers with an extensive suite of tools for image analysis.
+</longdescription>
+<use>
+        <flag name="shared">Build shared libraries</flag>
+	<flag name="itkv3compat">Use review statistics</flag>
+        <flag name="patented">Compile patented algorithms</flag>
+	<flag name="review">Enable compilation of mehods under review</flag>
+</use>
+</pkgmetadata>
+


             reply	other threads:[~2013-09-11 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 17:27 Nicolas Bock [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-12  5:40 [gentoo-commits] proj/sci:master commit in: sci-libs/itk/files/, sci-libs/itk/ Sebastien Fabbro
2014-04-10 18:00 Sebastien Fabbro
2022-01-10  0:39 Horea Christian
2022-09-15  7:03 Horea Christian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370872102.0aec1cb1fbac8cd73b2f8847dc7ee5dccda41cde.nicolasbock@gentoo \
    --to=nicolasbock@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox