Ticket #3688: patch-Portfile.2.diff

File patch-Portfile.2.diff, 3.3 KB (added by cssdev, 15 years ago)

updated Portfile for Leopard and x11prefix

  • Portfile

     
    11# $Id$
    22
    33PortSystem 1.0
     4
    45name            VTK
    5 version         4.2.6
    6 revision        3
     6version         4.4.2
    77categories      graphics
    88maintainers     css
    99description     3D visualization toolkit
     
    1515
    1616homepage        http://www.vtk.org/
    1717platforms       darwin freebsd
    18 master_sites    sourceforge:vtk
    19 checksums       md5 41382fb3f8d15e76d7464c11045ee7a5
     18master_sites    ${homepage}/files/release/4.4/
     19checksums       md5 17a5006c4d7acca3e74d32e0e27f4739 \
     20                sha1 9a68ecefa35f97a79fedd830c369f5b4225d1f55
    2021
    2122depends_build   bin:cmake:cmake
    22 distfiles       ${name}-4.2-LatestRelease${extract.suffix}
    23 distname        ${name}
     23worksrcdir      ${name}
    2424
    25 post-extract {
    26     set fl [open "| grep VTK_BUILD_VERSION ${worksrcpath}/CMakeLists.txt | grep 6"]
    27     set data [read $fl]
    28     close $fl
    29     if {$data != "SET(VTK_BUILD_VERSION 6)\n"} { ui_msg "$data
    30 ================================================================
    31 Warning : the Latest VTK version is not the same as the Portfile
    32 The build may still succeed but this should be reported as a bug
    33 ================================================================"
    34     }
    35 }
    36 
    3725configure       { system "cd ${worksrcpath} && cmake ${configure.args} ${worksrcpath}" }
    3826configure.args  -D BUILD_SHARED_LIBS:BOOL=ON \
    3927                -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
     
    4533                -D CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk \
    4634                -D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
    4735
    48 platform darwin 8 {
    49     patchfiles patch-vtk3DSImporter.cxx \
    50                patch-vtkAbstractMapper.cxx \
    51                patch-vtkAbstractMapper3D.cxx \
    52                patch-vtkAppendFilter.cxx \
    53                patch-vtkBMPReader.cxx \
    54                patch-vtkBooleanTexture.cxx \
    55                patch-vtkCardinalSpline.cxx \
    56                patch-vtkCocoaGLView.h \
    57                patch-vtkCocoaGLView.mm \
    58                patch-vtkImageReader.cxx \
    59                patch-vtkOSXRenderingTclInit.c \
    60                patch-vtkTkWidgetsInit.cxx
     36platform darwin {
     37        if { ${os.major} >= 8 } {
     38                # These patches make the code work with gcc4.
     39                patchfiles patch-vtk3DSImporter.cxx \
     40                        patch-vtkAbstractMapper.cxx \
     41                        patch-vtkAbstractMapper3D.cxx \
     42                        patch-vtkAppendFilter.cxx \
     43                        patch-vtkBMPReader.cxx \
     44                        patch-vtkBooleanTexture.cxx \
     45                        patch-vtkBranchExtentTranslator.cxx \
     46                        patch-vtkCardinalSpline.cxx \
     47                        patch-vtkDecimate.cxx \
     48                        patch-vtkOSXRenderingTclInit.c \
     49                        patch-vtkTkWidgetsInit.cxx
    6150
    62     pre-build {
    63             reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt
    64     }
     51                pre-build {
     52                        reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt
     53                }
     54        }
    6555}
    6656
    6757variant x11 {
    68         depends_build-append    port:xorg-libs
     58        depends_build-append    port:xorg-libs\
     59                                port:mesa
    6960        configure.args-delete   "-D VTK_USE_COCOA:BOOL=ON"
    7061        configure.args-append   -D VTK_USE_COCOA:BOOL=OFF \
    7162                                -D VTK_USE_X:BOOL=ON \
    72                                 -D OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib \
    73                                 -D OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib
     63                                -D OPENGL_INCLUDE_DIR:PATH=${x11prefix}/include/ \
     64                                -D OPENGL_gl_LIBRARY:FILEPATH=${x11prefix}/lib/libGL.dylib \
     65                                -D OPENGL_glu_LIBRARY:FILEPATH=${x11prefix}/lib/libGLU.dylib
    7466}
    75 
    76