Changeset 143403 for trunk/dports


Ignore:
Timestamp:
Dec 12, 2015, 8:26:33 AM (3 years ago)
Author:
ryandesign@…
Message:

nedi: fix activation failure when nedi < 1.0.9 was previously installed (#49989); use expansion operator instead of eval

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/net/nedi/Portfile

    r143393 r143403  
    77name                nedi
    88version             1.0.9
    9 revision            1
     9revision            2
    1010license             GPL-3
    1111categories          net
     
    6363
    6464# copy content to destroot
    65     eval copy [glob ${worksrcpath}/*] ${destroot}${nedidir}
     65    copy {*}[glob ${worksrcpath}/*] ${destroot}${nedidir}
    6666}
    6767
     
    6969
    7070# Fix general paths
    71     eval reinplace "s|^#!.*|#!${perl5.bin}|" \
    72         [glob ${destroot}${nedidir}/*.pl] \
    73         [glob ${destroot}${nedidir}/contrib/*.pl] \
    74         [glob ${destroot}${nedidir}/inc/*.pl]
     71    reinplace "s|^#!.*|#!${perl5.bin}|" \
     72        {*}[glob ${destroot}${nedidir}/*.pl] \
     73        {*}[glob ${destroot}${nedidir}/contrib/*.pl] \
     74        {*}[glob ${destroot}${nedidir}/inc/*.pl]
    7575
    7676    reinplace "s|netstat|/usr/sbin/netstat|g" \
     
    117117}
    118118
     119pre-activate {
     120    # nedi < 1.0.9 installed this symlink directly, bypassing the destroot.
     121    # Remove it if found to prevent activation failure.
     122    set f /Library/LaunchDaemons/org.macports.nedisyslog.plist
     123    if {![catch {file type ${f}}] && [registry_file_registered ${f}] == "0"} {
     124        if {[catch {delete ${f}}]} {
     125            ui_warn "Cannot delete ${f}; please remove it manually"
     126        }
     127    }
     128}
     129
    119130notes \
    120131  "**** To complete the NeDi OS X installation ****
Note: See TracChangeset for help on using the changeset viewer.