Ticket #18886: Portfile2.diff

File Portfile2.diff, 4.1 KB (added by jjstickel@…, 16 years ago)

adds tcl variant AND forces apple x11

  • Portfile

    old new  
    4040
    4141configure   { system "cd ${worksrcpath} && ${configure.env} cmake ${configure.args} ${worksrcpath}" }
    4242configure.args  \
    43         -DBUILD_SHARED_LIBS:BOOL=ON \
    44         -DVTK_USE_RPATH:BOOL=ON \
    45         -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_USE_LINK_PATH:BOOL=ON \
    49         -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
    50         -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
    51         -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
    52         -DVTK_INSTALL_PREFIX:PATH=${prefix} \
    53         -DVTK_USE_HYBRID:BOOL=ON \
    54         -DVTK_WRAP_TCL:BOOL=ON \
    55         -DTCL_INCLUDE_PATH=${prefix}/include \
    56         -DTCL_LIBRARY=${prefix}/lib/libtcl.dylib \
    57         -DTK_INCLUDE_PATH=${prefix}/include \
    58         -DTK_LIBRARY=${prefix}/lib/libtk.dylib \
    59         -DVTK_USE_CARBON:BOOL=OFF \
    60         -DVTK_USE_COCOA:BOOL=ON \
    61         -DVTK_DATA_ROOT:PATH=${prefix}/share/VTKData \
    62         -DVTK_USE_GL2PS:BOOL=ON \
    63         -DVTK_WRAP_PYTHON:BOOL=OFF
     43    -DBUILD_SHARED_LIBS:BOOL=ON \
     44    -DVTK_USE_RPATH:BOOL=ON \
     45    -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_USE_LINK_PATH:BOOL=ON \
     49    -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
     50    -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
     51    -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
     52    -DVTK_INSTALL_PREFIX:PATH=${prefix} \
     53    -DVTK_USE_HYBRID:BOOL=ON \
     54    -DVTK_USE_CARBON:BOOL=OFF \
     55    -DVTK_USE_COCOA:BOOL=ON \
     56    -DVTK_DATA_ROOT:PATH=${prefix}/share/VTKData \
     57    -DVTK_USE_GL2PS:BOOL=ON \
     58    -DVTK_WRAP_TCL:BOOL=OFF \
     59    -DVTK_WRAP_PYTHON:BOOL=OFF
    6460
    6561configure.env   \
    66         LDFLAGS="-L${prefix}/lib" \
    67         CPPFLAGS="-I${prefix}/include"
     62    LDFLAGS="-L${prefix}/lib" \
     63    CPPFLAGS="-I${prefix}/include"
    6864
    6965post-configure {
    7066    reinplace "s|c++|c++ -L${prefix}/lib |" \
    71     ${worksrcpath}/Infovis/Testing/Cxx/CMakeFiles/InfovisCxxTests.dir/link.txt \
    72     ${worksrcpath}/IO/Testing/Cxx/CMakeFiles/IOCxxTests.dir/link.txt \
    73     ${worksrcpath}/Views/Testing/Cxx/CMakeFiles/ViewsCxxTests.dir/link.txt \
    74     ${worksrcpath}/Wrapping/Tcl/CMakeFiles/vtk.dir/link.txt
     67        ${worksrcpath}/Infovis/Testing/Cxx/CMakeFiles/InfovisCxxTests.dir/link.txt \
     68        ${worksrcpath}/IO/Testing/Cxx/CMakeFiles/IOCxxTests.dir/link.txt \
     69        ${worksrcpath}/Views/Testing/Cxx/CMakeFiles/ViewsCxxTests.dir/link.txt
     70   
     71    if {[variant_isset tcl]} {
     72        reinplace "s|c++|c++ -L${prefix}/lib |" \
     73            ${worksrcpath}/Wrapping/Tcl/CMakeFiles/vtk.dir/link.txt
     74    }
    7575}
    7676
    7777build.env-append DYLD_LIBRARY_PATH=${worksrcpath}/bin
     
    8888
    8989variant x11 description {use X11} {
    9090    depends_build-append    port:xorg-libs
    91     configure.args-delete   -DVTK_USE_COCOA:BOOL=ON
     91    configure.args-delete   \
     92        -DVTK_USE_COCOA:BOOL=ON \
     93        -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
     94        -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include
    9295    configure.args-append   \
    9396        -DVTK_USE_COCOA:BOOL=OFF \
    9497        -DVTK_USE_X:BOOL=ON \
     98        -DCMAKE_LIBRARY_PATH:PATH=${x11prefix}/lib \
     99        -DCMAKE_INCLUDE_PATH:PATH=${x11prefix}/include \
    95100        -DOPENGL_gl_LIBRARY:FILEPATH=${x11prefix}/lib/libGL.dylib \
    96101        -DOPENGL_glu_LIBRARY:FILEPATH=${x11prefix}/lib/libGLU.dylib
    97102}
    98103
     104variant tcl description {builds tcl wrappers} {
     105    depends_build-append    port:tk
     106    configure.args-delete   \
     107        -DVTK_WRAP_TCL:BOOL=OFF
     108    configure.args-append   \
     109        -DVTK_WRAP_TCL:BOOL=ON \
     110        -DTCL_INCLUDE_PATH=${prefix}/include \
     111        -DTCL_LIBRARY=${prefix}/lib/libtcl.dylib \
     112        -DTK_INCLUDE_PATH=${prefix}/include \
     113        -DTK_LIBRARY=${prefix}/lib/libtk.dylib
     114}
     115
    99116variant python description {builds python wrappers} {
    100117    depends_build-append    port:python25
    101118    configure.args-delete   \