Ticket #10823: Portfile

File Portfile, 2.8 KB (added by cssdev, 18 years ago)

User-submitted Portfile for VTK v5.0.2

Line 
1# $Id$
2
3PortSystem 1.0
4name            vtk5
5version         5.0.2
6categories      graphics devel
7maintainers     rene.donner@mac.com
8description     3D visualization toolkit
9long_description        an open source, freely available software system  \
10        for 3D computer graphics, image processing, and visualization     \
11        used by thousands of researchers and developers around the world. \
12        VTK consists of a C++ class library, and several interpreted      \
13        interface layers including Tcl/Tk, Java, and Python.
14
15homepage        http://www.vtk.org/
16platforms       darwin freebsd
17master_sites    http://www.vtk.org/files/release/5.0/
18checksums       md5 c2f439d1a4bc1598a1cb09ee43f794ed
19
20depends_build   bin:cmake:cmake
21distfiles       vtk-5.0.2.tar.gz
22distname        VTK
23
24#post-extract {
25#    set fl [open "| grep VTK_BUILD_VERSION ${worksrcpath}/CMakeLists.txt | grep 6"]
26#    set data [read $fl]
27#    close $fl
28#    if {$data != "SET(VTK_BUILD_VERSION 6)\n"} { ui_msg "$data
29#================================================================
30#Warning : the Latest VTK version is not the same as the Portfile
31#The build may still succeed but this should be reported as a bug
32#================================================================"
33#    }
34#}
35
36configure       { system "cd ${worksrcpath} && cmake ${configure.args} ${worksrcpath}" }
37configure.args  -D BUILD_SHARED_LIBS:BOOL=ON \
38                -D CMAKE_INSTALL_PREFIX:PATH=${prefix} \
39                -D VTK_USE_HYBRID:BOOL=ON \
40                -D VTK_USE_CARBON:BOOL=OFF \
41                -D VTK_USE_COCOA:BOOL=ON
42
43platform darwin 8 {
44        configure.env-append    CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0
45}
46
47#platform darwin 8 {
48#    patchfiles patch-vtk3DSImporter.cxx \
49#               patch-vtkAbstractMapper.cxx \
50#               patch-vtkAbstractMapper3D.cxx \
51#               patch-vtkAppendFilter.cxx \
52#               patch-vtkBMPReader.cxx \
53#               patch-vtkBooleanTexture.cxx \
54#               patch-vtkCardinalSpline.cxx \
55#               patch-vtkCocoaGLView.h \
56#               patch-vtkCocoaGLView.mm \
57#               patch-vtkImageReader.cxx \
58#               patch-vtkOSXRenderingTclInit.c \
59#               patch-vtkTkWidgetsInit.cxx
60#
61#    pre-build {
62#           reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt
63#    }
64#}
65
66variant x11 {
67        depends_build-append    lib:libX11:XFree86
68        configure.args-delete   "-D VTK_USE_COCOA:BOOL=ON"
69        configure.args-append   -D VTK_USE_COCOA:BOOL=OFF \
70                                -D VTK_USE_X:BOOL=ON \
71                                -D OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib \
72                                -D OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib
73}
74
75variant python {
76        #depends_build-append   python24
77        configure.args-append   -D PYTHON_DEBUG_LIBRARY:FILEPATH=/opt/local/lib/python2.4.dylib \
78                                -D PYTHON_EXECUTABLE:FILEPATH=/opt/local/bin/python2.4 \
79                                -D PYTHON_INCLUDE_PATH:FILEPATH=/opt/local/include/python2.4 \
80                                -D PYTHON_LIBRARY:FILEPATH=/opt/local/lib/python2.4.dylib
81}
82
83