Ticket #23115: cgnslib.diff

File cgnslib.diff, 1.2 KB (added by ryandesign (Ryan Carsten Schmidt), 15 years ago)

fix

  • Portfile

     
    44
    55name                cgnslib
    66version             2.5.4
     7revision            1
    78set branch          [join [lrange [split ${version} .] 0 1] .]
    89set minor           [lindex [split ${version} .] end]
    910categories          science
     
    3536    system "cd ${worksrcpath}/tools && make"
    3637}
    3738
    38 destroot.destdir    PREFIX=${destroot}${prefix}
     39destroot.destdir    INCLUDEDIR=${destroot}${prefix}/include \
     40                    LIBDIR=${destroot}${prefix}/lib
    3941
    4042post-destroot {
    4143    xinstall -m 755 -W ${worksrcpath}/tools \
     
    5254        README \
    5355        ${docdir}
    5456}
     57
     58post-install {
     59    # cgnslib 2.5.4_0 installed items directly in ${prefix}; remove them if found
     60    foreach file {include/cgnslib.h include/cgnslib_f.h include/cgnswin_f.h lib/libcgns.a} {
     61        set filepath ${prefix}/${file}
     62        if {[file exists ${filepath}]} {
     63            if {[catch {delete ${filepath}}]} {
     64                ui_warn "Cannot delete ${filepath}; please remove it manually"
     65            }
     66        }
     67    }
     68}