From a6f6fc4aaab9a98b99decfa0b8f09f5ad55c0d5d Mon Sep 17 00:00:00 2001 From: danieltourde Date: Sat, 25 Oct 2008 10:32:34 +0000 Subject: Added support to VTK 5.2 git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1320 32389bae-6d03-0410-99cf-db05cde120eb --- sci-misc/salome-geom/ChangeLog | 13 ++-- sci-misc/salome-geom/Manifest | 5 +- .../files/salome-geom-3.2.6-vtk-5.2.patch | 78 ++++++++++++++++++++++ sci-misc/salome-geom/salome-geom-3.2.6.ebuild | 22 +++--- 4 files changed, 102 insertions(+), 16 deletions(-) create mode 100644 sci-misc/salome-geom/files/salome-geom-3.2.6-vtk-5.2.patch (limited to 'sci-misc') diff --git a/sci-misc/salome-geom/ChangeLog b/sci-misc/salome-geom/ChangeLog index eae6c389e..cfceee87c 100644 --- a/sci-misc/salome-geom/ChangeLog +++ b/sci-misc/salome-geom/ChangeLog @@ -1,11 +1,9 @@ # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ -21 May 2008; Daniel Tourde - Initial import. - +salome-geom-3.2.6.ebuild, +salome-geom-3.2.6.patch - A major thank to Francois Dorin , Jon Hood , Dewald Pietersen , and Richard Westwell for their respective contributions and feedback. Without you guys, the Salome ebuilds would not exist today. Thanks! - See bug #155974 for more info + 20 Oct May 2008; Daniel Tourde + +salome-geom-3.2.6-vtk-5.2.patch + Added support to vtk 5.2. Patch provided by Bert Karwatzki 04 Sep 2008; Oliver Borm (boroli) salome-geom-3.2.6.ebuild: @@ -15,3 +13,8 @@ salome-geom-3.2.6.ebuild, -Changelog, +metadata.xml: Removed fetch restriction, removed hardcode + 21 May 2008; Daniel Tourde + Initial import. + +salome-geom-3.2.6.ebuild, +salome-geom-3.2.6.patch + A major thank to Francois Dorin , Jon Hood InsertNextPoint(coord); ++ vtkIdType NewVTKpoint = Pts->InsertNextPoint(coord); + +- int pts[2]; ++ vtkIdType pts[2]; + pts[0] = lastVTKpoint; + pts[1] = NewVTKpoint; + +@@ -751,7 +751,7 @@ + aP2 = theNodesP(nbnodes); + + float coord[3]; +- int pts[2]; ++ vtkIdType pts[2]; + + for(int j=1;jInsertNextPoint(coord); +- int ptFirst = 0; +- int ptPrev = 0; +- int ptCur = 0; ++ vtkIdType ptLoc = Pts->InsertNextPoint(coord); ++ vtkIdType ptFirst = 0; ++ vtkIdType ptPrev = 0; ++ vtkIdType ptCur = 0; + +- int pts[2]; ++ vtkIdType pts[2]; + + int NbPoints = 15; + for (int i = 1; i <= NbPoints; i++, ptPrev = ptCur) +@@ -947,7 +947,7 @@ + + gp_Pnt P = BRep_Tool::Pnt( aVertex ); + float delta = 1, coord[3]; +- int pts[2]; ++ vtkIdType pts[2]; + // insert pt + ZERO_COORD; coord[0] = +delta; + pts[0] = Pts->InsertNextPoint(coord); +@@ -1026,7 +1026,7 @@ + Standard_Integer N1,N2,N3; + Triangles(i).Get(N1,N2,N3); + +- int pts[3]; ++ vtkIdType pts[3]; + pts[0] = N1-1; pts[1] = N2-1; pts[2] = N3-1; + Cells->InsertNextCell(3,pts); + diff --git a/sci-misc/salome-geom/salome-geom-3.2.6.ebuild b/sci-misc/salome-geom/salome-geom-3.2.6.ebuild index 1c78fa6ce..34f9d4745 100644 --- a/sci-misc/salome-geom/salome-geom-3.2.6.ebuild +++ b/sci-misc/salome-geom/salome-geom-3.2.6.ebuild @@ -30,7 +30,6 @@ export OPENPBS="/usr" src_unpack() { python_version distutils_python_version - ewarn "Python 2.4 is highly recommended for Salome..." if ! built_with_use sci-libs/vtk python ; then die "You must rebuild sci-libs/vtk with python USE flag" @@ -39,6 +38,19 @@ src_unpack() { unpack ${A} cd "${MY_S}" epatch "${FILESDIR}"/${P}.patch + + # If vtk-5.O is used, include directory is named vtk-5.0 and not vtk + if has_version ">=sci-libs/vtk-5.0" && has_version "=sci-libs/vtk-5.2" ; then + einfo "vtk version 5 detected" + append-flags -I/usr/include/vtk-5.2 + epatch "${FILESDIR}"/${P}-vtk-5.2.patch + fi + } @@ -48,14 +60,6 @@ src_compile() { rm -r -f autom4te.cache ./build_configure - # If vtk-5.O is used, include directory is named vtk-5.0 and not vtk - if has_version ">=sci-libs/vtk-5.0" ; then - einfo "vtk version 5 detected" - append-flags -I/usr/include/vtk-5.0 - else - einfo "vtk version 4 or prior detected" - fi - # CXXFLAGS are slightly modified to allow the compilation of # salome-geom with OpenCascade and gcc-4.1.x if version_is_at_least "4.1" $(gcc-version) ; then -- cgit v1.2.3-65-gdbad