Changeset 50228


Ignore:
Timestamp:
Apr 27, 2009, 11:47:37 PM (8 years ago)
Author:
dweber@…
Message:

changed variant conflict syntax; removed obsolete hacks from post-destroot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/graphics/vtk-devel/Portfile

    r50222 r50228  
    235235
    236236
    237 # ---------------------------------------------------------
    238 # There is a problem with RPATH config for the shared libs.
    239 # Until this is fixed, it will not be a default variant.
    240 
    241237variant shared description {Build shared libraries [default]} {
    242238    configure.args-delete \
     
    253249
    254250#  -DVTK_INSTALL_LIB_DIR:STRING=${prefix}/lib/vtk-5.2
    255 #  -DVTK_USE_RPATH=ON \
    256 #  -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \
    257 
    258 # -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
    259 # Cannot use this RPATH setting because the build tree is
    260 # used to bootstrap the build process, eg:
    261 #
    262 #[  4%] Generating vtkGLSLShaderLibrary.h
    263 #dyld: Library not loaded: "/opt/local/lib/vtk-5.2"/libvtksys.5.2.dylib
    264 #  Referenced from: /opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk5/work/VTK/Utilities/MaterialLibrary/../../bin/ProcessShader
    265 #  Reason: image not found
    266 
    267 # Might need variants for carbon vs. cocoa.  When doing a shared library
    268 # build, must use carbon, not cocoa.
    269 
    270 
    271 variant carbon conflicts {cocoa x11} description {Build with Carbon} {
     251
     252
     253variant carbon conflicts cocoa x11 description {Build with Carbon} {
    272254    configure.args-delete   \
    273255        -DVTK_USE_COCOA:BOOL=ON \
     
    275257    configure.args-append   \
    276258        -DVTK_USE_COCOA:BOOL=OFF \
    277         -DVTK_USE_CARBON:BOOL=ON \
    278 }
    279 
    280 
    281 variant cocoa conflicts {carbon x11} description {Build with Cocoa [Default]} {
    282 }
    283 
    284 
    285 variant x11 conflicts {cocoa carbon} description {Build with X11} {
     259        -DVTK_USE_CARBON:BOOL=ON
     260}
     261
     262
     263variant cocoa conflicts carbon x11 description {Build with Cocoa [default]} {
     264}
     265
     266
     267variant x11 conflicts cocoa carbon description {Build with X11} {
    286268    #depends_build-append    \
    287269        port:xorg-libs \
     
    305287# assumption here is that it's more likely to work with it than without it.
    306288
    307 variant mesaOpenGL requires {x11} description {Use mesa OpenGL} {
     289variant mesaOpenGL requires x11 description {Use mesa OpenGL} {
    308290    depends_build-append \
    309291        port:mesa
     
    355337set vtkDocPath  ${destroot}${prefix}/share/doc/${distname}
    356338set vtkDataPath ${destroot}${prefix}/share/${distname}-data
    357 
    358 # Define variables used by install_name_tool for
    359 # the shared libary installation RPATH
    360 set libdestStr ${destroot}${prefix}/bin/libvtk
    361 set libinstStr ${prefix}/lib/${distname}/libvtk
    362339
    363340post-destroot {
     
    400377    }
    401378   
    402     #if {[variant_isset shared]} {
    403         # Must set RPATH on all .dylib for shared variant; the RPATH settings
    404         # in the build are hi-jacked by the DESTDIR set by macports during
    405         # 'make install'.  Add some system code here to correct the RPATH
    406         # settings for shared libs?  Perhaps add the system code to the shared
    407         # variant only.
    408        
    409         # Use install_name_tool to change the
    410         # RPATH settings for each .dylib file.
    411 
    412         # This doesn't work!
    413         #system "cd ${destroot}${prefix}/bin; install_name_tool -change $libdestStr $libinstStr $*{version}.dylib"
    414         # See
    415         # http://qin.laya.com/tech_coding_help/dylib_linking.html
    416 
    417         #for f in `otool -L libvtkRendering.5.2.0.dylib`; do
    418         #    echo $f | grep $libdestStr;
    419         #done
    420    
    421         # otool -L ${dylib} | grep ${libdestStr} | sed s/.dylib.*/.dylib/
    422 
    423         # http://guide.macports.org/chunked/reference.phases.html
    424         # During the destroot phase, macports issues:
    425         # make install DESTDIR=${destroot}
    426         # in ${worksrcpath}.
    427     #}
    428379}
    429380
Note: See TracChangeset for help on using the changeset viewer.