Ticket #7177: patch-Portfile.2.diff

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

Updated Portfile for 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 VTK_USE_HYBRID:BOOL=ON \
     41                -D VTK_USE_CARBON:BOOL=OFF \
     42                -D VTK_USE_COCOA:BOOL=ON
    5143
    5244platform darwin 8 {
    53     patchfiles patch-vtkAbstractMapper.cxx \
     45    patchfiles patch-vtk3DSImporter.cxx \
     46               patch-vtkAbstractMapper.cxx \
    5447               patch-vtkAbstractMapper3D.cxx \
    5548               patch-vtkAppendFilter.cxx \
    5649               patch-vtkBMPReader.cxx \
     
    5851               patch-vtkCardinalSpline.cxx \
    5952               patch-vtkCocoaGLView.h \
    6053               patch-vtkCocoaGLView.mm \
    61                patch-vtkImageReader.cxx
     54               patch-vtkImageReader.cxx \
     55               patch-vtkOSXRenderingTclInit.c \
     56               patch-vtkTkWidgetsInit.cxx
    6257
    6358    pre-build {
    6459            reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt
    6560    }
    6661}
     62
     63variant x11 {
     64        depends_build-append    lib:libX11:XFree86
     65        configure.args-delete   "-D VTK_USE_COCOA:BOOL=ON"
     66        configure.args-append   -D VTK_USE_COCOA:BOOL=OFF \
     67                                -D VTK_USE_X:BOOL=ON \
     68                                -D OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib \
     69                                -D OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib
     70}
     71
     72