Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv14360

Modified Files:
        vtk-py.info 
Added Files:
        vtk-5.0-install.patch 
Log Message:

Rev up to 5.0.2-1003.
- Less hackish method for getting decent install_names.
  This needs a patch file that can go away in later versions.
- Remove -no-cpp-precomp.
- Correct python module installation.



Index: vtk-py.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci/vtk-py.info,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- vtk-py.info 5 Mar 2007 22:53:30 -0000       1.8
+++ vtk-py.info 17 Mar 2007 22:56:42 -0000      1.9
@@ -1,7 +1,7 @@
 Info2: <<
 Package: vtk-py%type_pkg[python]
 Version: 5.0.2
-Revision: 1002
+Revision: 1003
 Type: python (2.3 2.4 2.5)
 BuildDependsOnly: False
 Source: http://www.vtk.org/files/release/5.0/vtk-%v.tar.gz
@@ -10,16 +10,17 @@
 License: BSD
 GCC: 4.0
 Depends: x11, x11-shlibs, tcltk, tcltk-shlibs, expat-shlibs, libpng3-shlibs, 
libtiff-shlibs, libjpeg-shlibs, python%type_pkg[python]
-BuildDepends: cmake (>= 2.4.2-1), x11-dev, tcltk-dev, expat, libpng3, libtiff, 
libjpeg
+BuildDepends: cmake (>= 2.4.2-1), x11-dev, tcltk-dev, expat1, libpng3, 
libtiff, libjpeg
 Conflicts: vtk (<= 4.2.5-2), vtk-py23, vtk-py24, vtk-py25
 Replaces: vtk (<=4.2.5-2), vtk-py23, vtk-py24, vtk-py25
 Recommends: vtkdata
 PatchScript: <<
+ patch -p0 < %a/vtk-5.0-install.patch
  perl -pi.bak -e 's|/usr/local/lib|%p/lib/vtk|g' 
Wrapping/Python/vtk/tk/vtkLoadPythonTkWidgets.py
  perl -pi.bak -e 's|/usr/local|%p|g' Wrapping/Tcl/vtkbase/vtkbase.tcl
-  if [ %m = "powerpc" ]; then  perl -pi -e 's|(\-no\-cpp\-precomp)|\-Os 
\-mcpu=G3 \-mtune=G4 \-funroll\-loops \-Wno\-long\-double $1|g' CMakeLists.txt; 
fi
- if [ %m = "i386" ]; then perl -pi -e 's|(\-no\-cpp\-precomp)|\-Os 
\-funroll\-loops \-Wno\-long\-double $1|g' CMakeLists.txt; fi
- if [ %type_raw[python] = "2.5" ]; then perl -pi -e 's|(char .*tp_doc;)|const 
\1|' Common/vtkPythonUtil.cxx; fi 
+  if [ %m = "powerpc" ]; then  perl -pi -e 's|(\-no\-cpp\-precomp)|\-Os 
\-mcpu=G3 \-mtune=G4 \-funroll\-loops \-Wno\-long\-double |g' CMakeLists.txt; fi
+ if [ %m = "i386" ]; then perl -pi -e 's|(\-no\-cpp\-precomp)|\-Os 
\-funroll\-loops \-Wno\-long\-double |g' CMakeLists.txt; fi
+ if [ %type_raw[python] = "2.5" ]; then perl -pi.bak -e 's|(char 
.*tp_doc;)|const \1|' Common/vtkPythonUtil.cxx; fi 
 <<
 NoSetMAKEFLAGS: true
 SetMAKEFLAGS: -j1
@@ -27,8 +28,11 @@
 #!/bin/sh -ex
  %p/bin/cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
        -DVTK_INSTALL_LIB_DIR:STRING="/lib/vtk" \
-       -DBUILD_SHARED_LIBS:BOOL=ON \
        -DCMAKE_INSTALL_PREFIX:PATH=%p \
+       -DBUILD_SHARED_LIBS:BOOL=ON \
+       -DCMAKE_INSTALL_NAME_DIR:STRING=%p/lib/vtk \
+       -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
+       -DVTK_USE_RPATH=ON \
        -DVTK_USE_CARBON:BOOL=OFF \
        -DVTK_USE_COCOA:BOOL=OFF \
        -DVTK_USE_HYBRID:BOOL=ON \
@@ -46,6 +50,7 @@
        -DPYTHON_INCLUDE_PATH:PATH=%p/include/python%type_raw[python] \
        
-DPYTHON_LIBRARY:FILEPATH=%p/lib/python%type_raw[python]/config/libpython%type_raw[python].dylib
 \
        
-DPYTHON_DEBUG_LIBRARY:FILEPATH=%p/lib/python%type_raw[python]/config/libpython%type_raw[python].dylib
 \
+       -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=%p --root=%d" \
        -DOPENGL_gl_LIBRARY:STRING="-L/usr/X11R6/lib -lGL" \
        -DOPENGL_glu_LIBRARY:STRING="-L/usr/X11R6/lib -lGLU" \
        -DOPENGL_INCLUDE_DIR:PATH="/usr/X11R6/include" \
@@ -63,18 +68,11 @@
        -DVTK_USE_GL2PS:BOOL=ON \
        -DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T:BOOL=ON \
        .
-# ugly hack to fix the -install_name of the dylibs
-# cmake-2.4 has a mechanism for it, but it is unusable (still can't make it 
work in cmake-2.4.5)
- perl -pi -e 's|install_name lib|install_name %p/lib/vtk/lib|g' `find . -name 
build.make -or -name link.txt` 
-#
  make
 << 
 InstallScript: <<
 #!/bin/sh -ex
  make install DESTDIR=%d
- pushd Wrapping/Python
- %p/bin/python%type_raw[python] setup.py install --root=%d
- popd
  /usr/bin/install -d %i/share/doc/%n
  /bin/cp -R Examples %i/share/doc/%n/
  /usr/bin/find -d %i/share/doc/%n/Examples -name CVS -exec rm -rf \{\} \;

--- NEW FILE: vtk-5.0-install.patch ---
Message-ID: <[EMAIL PROTECTED]>
Date: Fri, 16 Mar 2007 19:21:07 -0400
From: Brad King <[EMAIL PROTECTED]>
To: Martin Costabel <[EMAIL PROTECTED]>
Subject: Re: [vtkusers] Interacting with VTK under Mac OS X
Cc: [EMAIL PROTECTED]

This is a multi-part message in MIME format.
--------------020804060404070505000209
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Martin Costabel wrote:
> The problem is that, as others have answered already, that nobody seems
> to know how to get this to work. I have read the documentation and the
> sources many times forwards and backwards, and I have literally spent
> several days in vain trying to get CMake for VTK to produce
> install_names like /sw/lib/vtk/libvtkCommon.5.0.dylib.
> 
> If the result of the present discussion is a working example for VTK
> libraries, I would be very glad.

The reason it doesn't work in VTK 5.0 is because that was released
before CMake 2.4 so it does a big hack to prevent installation with any
kind of rpath enabled.  Also the default behavior for the release branch
is to have rpaths off.  Apply the attached patch to re-enable
installation with rpaths.  Then run

cmake ../VTK-5.0 \
  -DCMAKE_INSTALL_PREFIX=/sw \
  -DBUILD_SHARED_LIBS=ON \
  -DCMAKE_INSTALL_NAME_DIR:STRING=/sw/lib \
  -DVTK_USE_RPATH=ON

This should get it working for most of the libraries.  Then instead of
using -DCMAKE_INSTALL_NAME_DIR:STRING=/sw/lib you can add

SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib)

to the source tree.  You may also need to use SET_TARGET_PROPERTIES to
tweak the setting for a few targets, but probably not.

-Brad

--------------020804060404070505000209
Content-Type: text/x-diff;
 name="vtk-5.0-install.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="vtk-5.0-install.patch"

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/VTK/VTK/CMakeLists.txt,v
retrieving revision 1.341.2.19
diff -c -3 -p -r1.341.2.19 CMakeLists.txt
*** CMakeLists.txt      6 Feb 2007 18:51:59 -0000       1.341.2.19
--- CMakeLists.txt      16 Mar 2007 23:14:52 -0000
*************** INCLUDE(${CMAKE_ROOT}/Modules/CMakeExpor
*** 40,54 ****
  # Choose static or shared libraries.
  INCLUDE(${VTK_SOURCE_DIR}/CMake/vtkSelectSharedLibraries.cmake)
  
- # Disable the install targets if using the rpath feature.
- IF(NOT WIN32)
-   IF(VTK_USE_RPATH)
-     SET(VTK_INSTALL_NO_RUNTIME 1)
-     SET(VTK_INSTALL_NO_DEVELOPMENT 1)
-     SET(VTK_INSTALL_NO_DOCUMENTATION 1)
-   ENDIF(VTK_USE_RPATH)
- ENDIF(NOT WIN32)
- 
  #-----------------------------------------------------------------------------
  # Output directories.
  IF(NOT LIBRARY_OUTPUT_PATH)
--- 40,45 ----
Index: CMake/vtkSelectSharedLibraries.cmake
===================================================================
RCS file: /cvsroot/VTK/VTK/CMake/vtkSelectSharedLibraries.cmake,v
retrieving revision 1.1
diff -c -3 -p -r1.1 vtkSelectSharedLibraries.cmake
*** CMake/vtkSelectSharedLibraries.cmake        11 Aug 2005 19:49:09 -0000      
1.1
--- CMake/vtkSelectSharedLibraries.cmake        16 Mar 2007 23:14:52 -0000
*************** IF(NOT VTK_SHARED_LIBRARIES_SELECTED)
*** 48,64 ****
      IF(VTK_USE_RPATH)
        # We will use rpath support.  Tell CMake not to skip it.
        SET(CMAKE_SKIP_RPATH 0 CACHE INTERNAL "Whether to build with rpath." 
FORCE)
- 
-       # If someone is trying to install do not do an entire build with
-       # the wrong rpath feature setting just to report failed
-       # installation.
-       SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY 1)
- 
-       # Add a dummy target and attach an install rule that will always fail
-       # and produce a message explaining why installation is disabled.
-       ADD_CUSTOM_TARGET(vtk_install_disabled)
-       SET_TARGET_PROPERTIES(vtk_install_disabled PROPERTIES
-         PRE_INSTALL_SCRIPT ${VTK_SOURCE_DIR}/CMake/InstallDisabled.cmake)
      ELSE(VTK_USE_RPATH)
        # We will not use rpath support.  Tell CMake to skip it.
        SET(CMAKE_SKIP_RPATH 1 CACHE INTERNAL "Whether to build with rpath." 
FORCE)
--- 48,53 ----

--------------020804060404070505000209
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

--------------020804060404070505000209--





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to