Ticket #36749: Portfile-patch_wrt_startupitem.diff

File Portfile-patch_wrt_startupitem.diff, 1.6 KB (added by mkae (Marko Käning), 12 years ago)

UNTESTED patch in order to enable the port to respect startupitem settings

  • Portfile

     
    66
    77name                kdelibs4
    88version             4.8.5
     9revision            1
    910categories          kde kde4
    1011maintainers         sharky michaelld nicos
    1112license             GPL-2+
     
    102103        ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist
    103104   
    104105    xinstall -d -m 755 ${destroot}${startup_root}/Library/LaunchAgents
    105     ln -s ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist ${destroot}${startup_root}/Library/LaunchAgents
    106106}
    107107
    108108post-activate {
     109        # set user permissions for root install
    109110    if { ![variant_isset no_root] } {
    110         file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel
     111       file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel
    111112    }
     113
     114    # delete leftover file, if any
     115    if [file exists /Library/LaunchDaemons/org.macports.kdecache.plist] {
     116                file delete -force /Library/LaunchDaemons/org.macports.kdecache.plist}
     117        }
     118        # The startupitem.install keyword does not exist in MacPorts < 2.1.
     119    if {![info exists startupitem.install]} {
     120       set startupitem.install yes
     121    }
     122    # If "startupitem.install" is set to "no" in macports.conf then do not link.
     123    if {${startupitem.install} != "no"} {
     124        ln -s ${destroot}${startup_root}/Library/LaunchAgents/org.macports.kdecache.plist /Library/LaunchDaemons
     125    }
    112126}
    113127
    114128notes " ##########################################################################