1 | # $Id: |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name vtk5 |
---|
6 | version 5.3.0 |
---|
7 | categories graphics devel |
---|
8 | maintainers rene.donner@mac.com |
---|
9 | description 3D visualization toolkit |
---|
10 | long_description An open source, freely available software system for 3D \ |
---|
11 | computer graphics, image processing, and visualization \ |
---|
12 | used by thousands of researchers and developers around the \ |
---|
13 | world. VTK consists of a C++ class library, and several \ |
---|
14 | interpreted interface layers including Tcl/Tk, Java, and \ |
---|
15 | Python. This is a package for the latest cvs version. |
---|
16 | |
---|
17 | homepage http://www.vtk.org/ |
---|
18 | platforms darwin freebsd |
---|
19 | |
---|
20 | # Fetch files from cvs |
---|
21 | fetch.type cvs |
---|
22 | cvs.root :pserver:anonymous@public.kitware.com:/cvsroot/VTK |
---|
23 | cvs.module VTK |
---|
24 | cvs.password vtk |
---|
25 | |
---|
26 | depends_build bin:cmake:cmake port:tcl port:python25 |
---|
27 | |
---|
28 | distname VTK |
---|
29 | |
---|
30 | pre-configure { |
---|
31 | # cmake seems to have issues with setting options with spaces |
---|
32 | set fp [open "${worksrcpath}/CMakeCache.txt" a] |
---|
33 | puts $fp "CMAKE_EXE_LINKER_FLAGS:STRING=-rpath -L${prefix}/lib" |
---|
34 | close $fp |
---|
35 | |
---|
36 | # get rid of the vtk-5.3 prefix that CMakeLists.txt places on the install |
---|
37 | # prefix (doesn't link properly) |
---|
38 | reinplace "s|lib/vtk-\$\{VTK_MAJOR_VERSION\}.\$\{VTK_MINOR_VERSION\}|lib|" \ |
---|
39 | ${worksrcpath}/CMakeLists.txt |
---|
40 | } |
---|
41 | |
---|
42 | configure { |
---|
43 | system "cd ${worksrcpath} && \ |
---|
44 | ${configure.env} cmake ${configure.args} ${worksrcpath}" |
---|
45 | } |
---|
46 | |
---|
47 | configure.args \ |
---|
48 | -DBUILD_SHARED_LIBS:BOOL=ON \ |
---|
49 | -DVTK_USE_RPATH=ON \ |
---|
50 | -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \ |
---|
51 | -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ |
---|
52 | -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \ |
---|
53 | -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \ |
---|
54 | -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib \ |
---|
55 | -DVTK_USE_HYBRID=ON\ |
---|
56 | -DVTK_USE_CARBON:BOOL=OFF \ |
---|
57 | -DVTK_USE_COCOA:BOOL=ON \ |
---|
58 | -DVTK_WRAP_TCL:BOOL=ON \ |
---|
59 | -DTCL_INCLUDE_PATH:PATH=${prefix}/include \ |
---|
60 | -DTCL_LIBRARY:FILEPATH=${prefix}/lib/libtcl.dylib \ |
---|
61 | -DTK_LIBRARY:FILEPATH=${prefix}/lib/libtk.dylib \ |
---|
62 | -DVTK_DATA_ROOT:PATH=${prefix}/share/VTKData \ |
---|
63 | -DVTK_WRAP_PYTHON:BOOL=ON \ |
---|
64 | -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/lib/libpython2.5.dylib \ |
---|
65 | -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.5 \ |
---|
66 | -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/include/python2.5 \ |
---|
67 | -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/libpython2.5.dylib \ |
---|
68 | -DVTK_USE_PARALLEL:BOOL=ON |
---|
69 | |
---|
70 | #configure.env LDFLAGS="-L${prefix}/lib" CPPFLAGS="-I${prefix}/include" |
---|
71 | platform darwin 8 { |
---|
72 | configure.env-append CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 \ |
---|
73 | MACOSX_DEPLOYMENT_TARGET=10.4 |
---|
74 | } |
---|
75 | |
---|
76 | platform darwin 9 { |
---|
77 | configure.env-append MACOSX_DEPLOYMENT_TARGET=10.5 |
---|
78 | } |
---|
79 | |
---|
80 | variant x11 { |
---|
81 | depends_build-append lib:libX11:XFree86 |
---|
82 | configure.args-delete "-DVTK_USE_COCOA:BOOL=ON" |
---|
83 | configure.args-append -DVTK_USE_COCOA:BOOL=OFF \ |
---|
84 | -DVTK_USE_X:BOOL=ON \ |
---|
85 | -DOPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib \ |
---|
86 | -DOPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib |
---|
87 | } |
---|
88 | |
---|
89 | use_parallel_build yes |
---|
90 | |
---|
91 | # Required for the linker to find intra-library linking |
---|
92 | build.env DYLD_LIBRARY_PATH="${worksrcpath}/bin:\$DYLD_LIBRARY_PATH" |
---|
93 | |
---|
94 | set vtkdest ${destroot}${prefix}/share/doc/${name} |
---|
95 | post-destroot { |
---|
96 | xinstall -d -m 0755 ${vtkdest} |
---|
97 | file copy ${worksrcpath}/README.html ${vtkdest} |
---|
98 | file copy ${worksrcpath}/Copyright.txt ${vtkdest} |
---|
99 | file copy ${worksrcpath}/Testing.txt ${vtkdest} |
---|
100 | |
---|
101 | # Provide some examples |
---|
102 | file copy ${worksrcpath}/Examples ${vtkdest} |
---|
103 | foreach x {CommonCxxTests FilteringCxxTests GenericFilteringCxxTests \ |
---|
104 | GraphicsCxxTests IOCxxTests} \ |
---|
105 | { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples } |
---|
106 | foreach x {ImagingCxxTests RenderingCxxTests TestCxxFeatures \ |
---|
107 | TestInstantiator VTKBenchMark VolumeRenderingCxxTests WidgetsCxxTests}\ |
---|
108 | { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples } |
---|
109 | } |
---|