Ticket #44897: Portfile.diff

File Portfile.diff, 2.0 KB (added by lockhart (Thomas Lockhart), 10 years ago)

Install server startup script from port contents rather than from worksrcpath. This should fix the problem with installing from a pre-built binary.

  • Portfile

    old new  
    1313name                tao
    1414set name_package    ACE+TAO
    1515version             6.2.6
     16revision            1
    1617distname            ${name_package}-${version}
    1718categories          devel
    1819platforms           darwin
     
    7778add_users ${taouser} group=${taouser} realname=TAO\ Server
    7879
    7980post-extract {
    80     copy ${filespath}/org.macports.${taodaemon}.plist \
    81         ${worksrcpath}/
     81    copy ${filespath}/org.macports.${taodaemon}.plist ${worksrcpath}/
    8282}
    8383
    8484post-patch {
     
    131131            ${worksrcpath}/org.macports.${taodaemon}.plist
    132132    }
    133133
    134     pre-install {
    135         file delete ${destroot}${daemondir}/org.macports.${taodaemon}.plist
    136         file delete ${destroot}${daemondir}/${taodaemon}.wrapper
    137         copy ${worksrcpath}/org.macports.${taodaemon}.plist \
    138             ${destroot}${daemondir}/org.macports.${taodaemon}.plist
    139     }
    140 
    141134    startupitem.create  yes
    142135    startupitem.name    ${taodaemon}
    143136}
     
    167160        destroot.dir ${worksrcpath}/${subdir}
    168161        command_exec destroot
    169162    }
     163    xinstall -d -m 0755 ${destroot}${daemondir}
     164    copy ${worksrcpath}/org.macports.${taodaemon}.plist \
     165        ${destroot}${daemondir}/org.macports.${taodaemon}.plist
    170166    # Files required to build CosEvent classes but not installed
    171167    copy ${worksrcpath}/TAO/orbsvcs/orbsvcs/ESF ${destroot}/${prefix}/include/orbsvcs/ESF
    172168}
    173169
     170pre-activate {
     171    if { [file exists ${daemondir}/org.macports.${taodaemon}.plist] } {
     172        catch {[file delete -force ${daemondir}/org.macports.${taodaemon}.plist]}
     173    }
     174}
     175
     176pre-deactivate {
     177    if { [file exists ${daemondir}/org.macports.${taodaemon}.plist] } {
     178        catch {system "launchctl unload ${daemondir}/org.macports.${taodaemon}.plist"}
     179    }
     180}
     181
    174182livecheck.type      regex
    175183livecheck.url       ${master_sites}
    176184livecheck.regex     "ACE\\+TAO-(\[0-9.\]+\[0-9\]+)${extract.suffix}"