Ticket #26061: Portfile-vtk5.diff

File Portfile-vtk5.diff, 4.6 KB (added by dechaume@…, 14 years ago)
  • Portfile

    old new  
    44PortSystem 1.0
    55
    66name        vtk5
    7 version     5.2.1
    8 revision    2
     7version     5.6.0
     8revision    0
    99set branch  [join [lrange [split ${version} .] 0 1] .]
    1010categories  graphics devel
    1111maintainers nomaintainer
     
    1616    VTK consists of a C++ class library, and several interpreted      \
    1717    interface layers including Tcl/Tk, Java, and Python.
    1818
    19 homepage    http://www.vtk.org/
    20 platforms   darwin freebsd
    21 master_sites    http://www.vtk.org/files/release/${branch}/
    22 checksums vtk-${version}.tar.gz md5 d59520d5f6c49c8b4e3b9227e341b19f \
    23           vtk-${version}.tar.gz sha1 e08ee5c9d738c2fe774fdb3111818b9899a7b751 \
    24           vtk-${version}.tar.gz rmd160 c6cdee0c76e243d21d802690f138faab1c6eb863\
    25       vtkdata-${version}.tar.gz md5 3cd99917ab1ec3ef369dd40db74b93b1 \
    26       vtkdata-${version}.tar.gz sha1 a625f4934d0fbaad2242ae2bc920084775438933 \
    27       vtkdata-${version}.tar.gz rmd160 5628fec27673d99426922dcd32b8d66a0d86c9ec
     19homepage            http://www.vtk.org/
     20platforms           darwin freebsd
     21master_sites        http://www.vtk.org/files/release/${branch}/
     22checksums           vtk-${version}.tar.gz \
     23                    md5     a56232baae6071f9f59f138d8f4620c2 \
     24                    sha1    355209c485304f1b0feefcda3585d45217ffd230 \
     25                    rmd160  b7abf3b9bb14a3db81608c7aa2721935ae653295 \
     26                    vtkdata-${version}.tar.gz \
     27                    md5     97006362d7d67dc01289daf3e4ec4e38 \
     28                    sha1    e0aa26dafd653da1db21fc97ce15aa0599d9c5ad \
     29                    rmd160  8499816f6d714408c0f7f584fb4d781f4426e444
    2830
    2931depends_build   bin:cmake:cmake \
    30         port:readline
     32                port:readline
    3133distfiles   vtk-${version}.tar.gz \
    32         vtkdata-${version}.tar.gz
     34            vtkdata-${version}.tar.gz
    3335distname    VTK
    3436
    3537use_parallel_build yes
    3638
    3739post-extract {
    38     delete ${worksrcpath}/Utilities/vtktiff/tif_fax3sm.c
     40   delete ${worksrcpath}/Utilities/vtktiff/tif_fax3sm.c
    3941}
    4042
    4143configure   { system "cd ${worksrcpath} && ${configure.env} cmake ${configure.args} ${worksrcpath}" }
     
    4345        -DBUILD_SHARED_LIBS:BOOL=ON \
    4446        -DVTK_USE_RPATH:BOOL=ON \
    4547        -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
    46         -DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/vtk-5.2 \
    47         -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk-5.2 \
     48        -DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/vtk-${branch} \
     49        -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk-${branch} \
    4850        -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
    4951        -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
    5052        -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
     
    143145        -DVTK_INSTALL_NO_PYTHON:BOOL=ON
    144146}
    145147
     148variant data description {install data and examples} {}
    146149
    147150set vtkdest ${destroot}${prefix}/share/doc/${name}
    148151
     
    156159        system "cd ${worksrcpath}/Wrapping/Python; ${prefix}/bin/python2.6 setup.py install --prefix=${frameworks_dir}/Python.framework/Versions/2.6/ --root=${destroot}"
    157160    }
    158161
    159     xinstall -d -m 0755 ${vtkdest}
    160     file copy ${worksrcpath}/README.html ${vtkdest}
    161     file copy ${worksrcpath}/Copyright.txt ${vtkdest}
    162     file copy ${worksrcpath}/Testing.txt ${vtkdest}
    163 
    164     # Provide some examples
    165     file copy ${worksrcpath}/Examples ${vtkdest}
    166     foreach x {CommonCxxTests FilteringCxxTests GenericFilteringCxxTests GraphicsCxxTests IOCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
    167     foreach x {ImagingCxxTests RenderingCxxTests TestCxxFeatures TestInstantiator VTKBenchMark VolumeRenderingCxxTests WidgetsCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
     162    if {[variant_isset data]} {
     163        xinstall -d -m 0755 ${vtkdest}
     164        file copy ${worksrcpath}/README.html ${vtkdest}
     165        file copy ${worksrcpath}/Copyright.txt ${vtkdest}
     166        file copy ${worksrcpath}/Testing.txt ${vtkdest}
     167
     168        # Provide some examples
     169        file copy ${worksrcpath}/Examples ${vtkdest}
     170        foreach x {CommonCxxTests FilteringCxxTests GenericFilteringCxxTests GraphicsCxxTests IOCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
     171        foreach x {ImagingCxxTests RenderingCxxTests TestCxxFeatures TestInstantiator VTKBenchMark VolumeRenderingCxxTests WidgetsCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
    168172
    169     # Provide data files
    170     system "tar -C ${destroot}${prefix}/share -xzvf ${distpath}/vtkdata-${version}.tar.gz"
     173        # Provide data files
     174        system "tar -C ${destroot}${prefix}/share -xzvf ${distpath}/vtkdata-${version}.tar.gz"
     175    }
    171176}