Ticket #7177: patch-Portfile.diff

File patch-Portfile.diff, 1.9 KB (added by cssdev@…, 19 years ago)

Portfile patch for VTK 4.2.6 hybrid and X11 support

  • Portfile

    RCS file: /Volumes/src/cvs/od/proj/darwinports/dports/graphics/vtk/Portfile,v
    retrieving revision 1.8
    diff -u -r1.8 Portfile
     
    33PortSystem 1.0
    44name            VTK
    55version         4.2.6
     6revision        1
    67categories      graphics
    78maintainers     cssdev@mac.com
    89description     3D visualization toolkit
     
    3334    }
    3435}
    3536
    36 configure       { system "cd ${worksrcpath} && cmake ${worksrcpath}" }
    37 post-configure  {
    38         reinplace "s;BUILD_SHARED_LIBS:BOOL=.*;BUILD_SHARED_LIBS:BOOL=ON;" ${worksrcpath}/CMakeCache.txt
    39         reinplace "s;CMAKE_INSTALL_PREFIX:PATH=.*;CMAKE_INSTALL_PREFIX:PATH=${prefix};" ${worksrcpath}/CMakeCache.txt
    40         reinplace "s;VTK_USE_CARBON:BOOL=.*;VTK_USE_CARBON:BOOL=OFF;" ${worksrcpath}/CMakeCache.txt
    41         reinplace "s;VTK_USE_COCOA:BOOL=.*;VTK_USE_COCOA:BOOL=ON;" ${worksrcpath}/CMakeCache.txt
    42 }
    43 
    44 #variant devel {
    45 #       version 4.5.0
    46 #       fetch.type      cvs
    47 #       cvs.root        :pserver:anonymous@public.kitware.com:/cvsroot/VTK
    48 #       cvs.module      VTK
    49 #       cvs.password    vtk
    50 #}
     37configure       { system "cd ${worksrcpath} && cmake ${configure.args} ${worksrcpath}" }
     38configure.args  -D BUILD_SHARED_LIBS:BOOL=ON \
     39                -D CMAKE_INSTALL_PREFIX:PATH=${prefix} \
     40                -D CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=0 \
     41                -D VTK_USE_HYBRID:BOOL=ON \
     42                -D VTK_USE_CARBON:BOOL=OFF \
     43                -D VTK_USE_COCOA:BOOL=ON
    5144
    5245platform darwin 8 {
    5346    patchfiles patch-vtkAbstractMapper.cxx \
     
    6457            reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt
    6558    }
    6659}
     60
     61variant x11 {
     62        depends_build-append    lib:libX11:XFree86
     63        configure.args-delete   "-D VTK_USE_COCOA:BOOL=ON"
     64        configure.args-append   -D VTK_USE_COCOA:BOOL=OFF \
     65                                -D VTK_USE_X:BOOL=ON \
     66                                -D OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/libGL.dylib \
     67                                -D OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/libGLU.dylib
     68}
     69
     70