summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Dawson <pkdawson@gentoo.org>2005-05-10 15:35:52 +0000
committerPatrick Dawson <pkdawson@gentoo.org>2005-05-10 15:35:52 +0000
commit836243cbdb372416f8fe8e0af0f2c76b373c67c7 (patch)
treebf11b8318fc53dad842704eef668b4b7ee39bbc3 /sci-libs
parentStable on sparc (diff)
downloadgentoo-2-836243cbdb372416f8fe8e0af0f2c76b373c67c7.tar.gz
gentoo-2-836243cbdb372416f8fe8e0af0f2c76b373c67c7.tar.bz2
gentoo-2-836243cbdb372416f8fe8e0af0f2c76b373c67c7.zip
initial import, probably broken
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/vtk/ChangeLog10
-rw-r--r--sci-libs/vtk/Manifest3
-rw-r--r--sci-libs/vtk/files/digest-vtk-4.2.63
-rw-r--r--sci-libs/vtk/files/vtk-4.2.6-gcc34.patch38
-rw-r--r--sci-libs/vtk/metadata.xml9
-rw-r--r--sci-libs/vtk/vtk-4.2.6.ebuild148
6 files changed, 211 insertions, 0 deletions
diff --git a/sci-libs/vtk/ChangeLog b/sci-libs/vtk/ChangeLog
new file mode 100644
index 000000000000..e80056c4df45
--- /dev/null
+++ b/sci-libs/vtk/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-libs/vtk
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/vtk/ChangeLog,v 1.1 2005/05/10 15:35:52 pkdawson Exp $
+
+*vtk-4.2.6 (10 May 2005)
+
+ 10 May 2005; Patrick Dawson <pkdawson@gentoo.org>
+ +files/vtk-4.2.6-gcc34.patch, +vtk-4.2.6.ebuild:
+ Initial import. See bug #25335.
+
diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
new file mode 100644
index 000000000000..1f2a60bd7847
--- /dev/null
+++ b/sci-libs/vtk/Manifest
@@ -0,0 +1,3 @@
+MD5 69c2fdab7a334ea1b054a833082efb05 vtk-4.2.6.ebuild 5575
+MD5 9aa6be7b823601bf2e88869264d90673 files/digest-vtk-4.2.6 207
+MD5 7ba663b347dd89aa7ca2f19e50641057 files/vtk-4.2.6-gcc34.patch 1739
diff --git a/sci-libs/vtk/files/digest-vtk-4.2.6 b/sci-libs/vtk/files/digest-vtk-4.2.6
new file mode 100644
index 000000000000..2e9ba26c0038
--- /dev/null
+++ b/sci-libs/vtk/files/digest-vtk-4.2.6
@@ -0,0 +1,3 @@
+MD5 41382fb3f8d15e76d7464c11045ee7a5 VTK-4.2-LatestRelease.tar.gz 6073644
+MD5 d2bf17b75e6664d89c3a5eba0a9ad24d VTKDocHtml-4.2.tar.gz 20973979
+MD5 2bbd1a62884906eac4f279441cbb9cfa VTKData-4.2.tar.gz 19257005
diff --git a/sci-libs/vtk/files/vtk-4.2.6-gcc34.patch b/sci-libs/vtk/files/vtk-4.2.6-gcc34.patch
new file mode 100644
index 000000000000..b85d00f17572
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-4.2.6-gcc34.patch
@@ -0,0 +1,38 @@
+diff -ur VTK.orig/IO/vtkBMPReader.cxx VTK/IO/vtkBMPReader.cxx
+--- VTK.orig/IO/vtkBMPReader.cxx 2003-02-25 11:59:24.000000000 -0500
++++ VTK/IO/vtkBMPReader.cxx 2005-03-03 00:20:31.000000000 -0500
+@@ -504,11 +504,11 @@
+ outPtr0 += outIncr[0];
+ }
+ // move to the next row in the file and data
+- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip0, ios::beg);
++ self->GetFile()->seekg(self->GetFile()->tellg() + (ios::pos_type)streamSkip0, ios::beg);
+ outPtr1 += outIncr[1];
+ }
+ // move to the next image in the file and data
+- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip1, ios::beg);
++ self->GetFile()->seekg(self->GetFile()->tellg() + (ios::pos_type)streamSkip1, ios::beg);
+ outPtr2 += outIncr[2];
+ }
+
+diff -ur VTK.orig/IO/vtkImageReader.cxx VTK/IO/vtkImageReader.cxx
+--- VTK.orig/IO/vtkImageReader.cxx 2002-12-26 13:18:50.000000000 -0500
++++ VTK/IO/vtkImageReader.cxx 2005-03-03 00:20:01.000000000 -0500
+@@ -366,7 +366,7 @@
+ // if that happens, store the value in correction and apply later
+ if (filePos + streamSkip0 >= 0)
+ {
+- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip0, ios::beg);
++ self->GetFile()->seekg(self->GetFile()->tellg() + (ios::pos_type)streamSkip0, ios::beg);
+ correction = 0;
+ }
+ else
+@@ -376,7 +376,7 @@
+ outPtr1 += outIncr[1];
+ }
+ // move to the next image in the file and data
+- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip1 + correction,
++ self->GetFile()->seekg(self->GetFile()->tellg() + (ios::pos_type)streamSkip1 + (ios::pos_type)correction,
+ ios::beg);
+ outPtr2 += outIncr[2];
+ }
diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
new file mode 100644
index 000000000000..6f8227de7bc6
--- /dev/null
+++ b/sci-libs/vtk/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>pkdawson@gentoo.org</email>
+ <name>Patrick Dawson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-libs/vtk/vtk-4.2.6.ebuild b/sci-libs/vtk/vtk-4.2.6.ebuild
new file mode 100644
index 000000000000..bf64c1d03ae9
--- /dev/null
+++ b/sci-libs/vtk/vtk-4.2.6.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/vtk/vtk-4.2.6.ebuild,v 1.1 2005/05/10 15:35:52 pkdawson Exp $
+
+# TODO: need to fix Examples/CMakeLists.txt to build other examples
+
+inherit distutils eutils flag-o-matic toolchain-funcs versionator
+
+MY_PV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org"
+SRC_URI="mirror://sourceforge/${PN}/VTK-${MY_PV}-LatestRelease.tar.gz
+ doc? ( mirror://sourceforge/${PN}/VTKDocHtml-${MY_PV}.tar.gz )
+ examples? ( mirror://sourceforge/${PN}/VTKData-${MY_PV}.tar.gz )"
+
+LICENSE="BSD"
+KEYWORDS="~x86"
+SLOT="0"
+IUSE="doc examples java mpi patented python tcltk threads"
+RDEPEND="java? ( virtual/jdk )
+ mpi? ( sys-cluster/mpich )
+ python? ( >=dev-lang/python-2.0 )
+ >=dev-lang/tcl-8.2.3
+ >=dev-lang/tk-8.2.3
+ dev-libs/expat
+ media-libs/jpeg
+ media-libs/libpng
+ media-libs/tiff
+ virtual/opengl
+ virtual/x11"
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-1.8"
+
+S=${WORKDIR}/VTK
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${P}-gcc34.patch
+}
+
+src_compile() {
+ # gcc versions 3.2.x seem to have sse-related bugs that are triggered
+ # by VTK when compiling for pentium3/4
+ if [ "$(gcc-major-version)" -eq 3 -a "$(gcc-minor-version)" -eq 2 -a \
+ "$(get-flag -march)" == "-march=pentium4" ]; then
+ filter-mfpmath sse
+ filter-flags "-msse -msse2"
+ echo "$(get-flag -march)"
+ fi
+
+ # build list of config variable define's to pass to cmake
+ CMAKE_VARIABLES="-DCMAKE_INSTALL_PREFIX:PATH=/usr"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_SHARED_LIBS:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_JPEG:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_PNG:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_TIFF:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_ZLIB:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_EXPAT:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_TESTING:BOOL=OFF"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_HYBRID:BOOL=ON"
+ use examples && CMAKE_VARIABLES="${CMAKE_VARIABLES}-DVTK_DATA_ROOT:PATH=/usr/share/${PN}/data -DBUILD_EXAMPLES:BOOL=ON"
+ if use java; then
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_WRAP_JAVA:BOOL=ON"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DJAVA_AWT_LIBRARY:PATH=`java-config -O`/jre/lib/i386/libjawt.so"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DJAVA_AWT_INCLUDE_PATH:PATH=`java-config -O`/include"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DJAVA_INCLUDE_PATH:PATH=`java-config -O`/include"
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DJAVA_INCLUDE_PATH2:PATH=`java-config -O`/include/linux"
+ fi
+ if use mpi; then
+ CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_MPI:BOOL=ON"
+ use !threads && CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_PARALLEL:BOOL=ON"
+ fi
+ use python && CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_WRAP_PYTHON:BOOL=ON"
+ use tcltk && CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_WRAP_TCL:BOOL=ON"
+ use threads && CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_PARALLEL:BOOL=ON"
+ use patented && CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_PATENTED:BOOL=ON"
+
+ cmake ${CMAKE_VARIABLES} . || die "cmake configuration failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+
+ # fix config file
+ sed -i -e "s:${D}:/:g" ${D}/usr/lib/${PN}/VTKConfig.cmake
+
+ LDPATH="/usr/lib/${PN}"
+ # install python modules
+ if use python; then
+ distutils_python_version
+ LDPATH="${LDPATH}:/usr/lib/python${PYVER}/site-packages/${PN}_python"
+ cd ${S}/Wrapping/Python
+ docinto vtk_python
+ distutils_src_install
+
+ # make symlinks to vtk python modules
+ FILES="${D}/usr/lib/vtk/libvtk*Python*.so"
+ for file in ${FILES}
+ do
+ dosym ${file} /usr/lib/python${PYVER}/site-packages/${PN}_python
+ done
+ fi
+
+ # install jar
+ use java && dojar ${S}/bin/vtk.jar
+
+ # install documentation
+ use doc && dohtml -r ${WORKDIR}/html/
+
+ # install examples
+ if use examples; then
+ dodir /usr/share/${PN}
+ cp -a ${S}/Examples ${D}/usr/share/${PN}/examples
+
+ # fix example's permissions
+ find ${D}/usr/share/${PN}/examples -type d -exec chmod 0755 {} \;
+ find ${D}/usr/share/${PN}/examples -type f -exec chmod 0644 {} \;
+
+ # VTKData uses a hyphen instead of a dot
+ MY_PV_HYPHEN=`echo ${MY_PV} | sed -e "s/\./-/"`
+ dodir /usr/share/${PN}
+ cp -a ${WORKDIR}/VTKData-release-${MY_PV_HYPHEN} ${D}/usr/share/${PN}/data
+
+ # fix data's permissions
+ find ${D}/usr/share/${PN}/data -type d -exec chmod 0755 {} \;
+ find ${D}/usr/share/${PN}/data -type f -exec chmod 0644 {} \;
+ fi
+
+ # environment
+ echo "LDPATH=${LDPATH}" > ${T}/40${PN}
+ use data && echo "VTK_DATA_ROOT=/usr/share/${PN}/data" >> ${T}/40${PN}
+ if use java; then
+ echo "CLASSPATH=/usr/share/${PN}/${PN}.jar" >> ${T}/40${PN}
+ echo "LD_LIBRARY_PATH=/usr/lib/${PN}" >> ${T}/40${PN}
+ fi
+ use tcltk && echo "TCLLIBPATH=/usr/lib/${PN}/tcl" >> ${T}/40${PN}
+ doenvd ${T}/40${PN}
+}
+
+pkg_postinst() {
+ if use patented; then
+ ewarn "Using patented code in VTK may require a license."
+ ewarn "For more information, please read:"
+ ewarn "http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq07.005.htp"
+ fi
+}