Ticket #30992: patch-Portfile.diff

File patch-Portfile.diff, 1.3 KB (added by carsomyr@…, 13 years ago)

The Portfile patch (revision 4).

  • Portfile

    old new  
    6767set kext_dir                /Library/Extensions
    6868set startup_items_dir       /Library/StartupItems
    6969
    70 pre-extract {
    71 
    72     set head_path ${applications_dir}
    73 
    74     while {${head_path} != "/"} {
    75 
    76         if {[file attributes ${head_path} -owner] != "root" || [file attributes ${head_path} -group] != "admin"} {
    77             error "VirtualBox requires the \"${applications_dir}\" directory and its parent directories to have\
    78 root:admin ownership."
    79         }
    80 
    81         set head_path [file dirname ${head_path}]
    82     }
    83 }
    84 
    8570post-patch {
    8671
    8772    reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" \
     
    135120    }
    136121}
    137122
     123pre-activate {
     124
     125    set head_path ${applications_dir}
     126
     127    while {${head_path} != "/"} {
     128
     129        if {[file attributes ${head_path} -owner] != "root" || [file attributes ${head_path} -group] != "admin"
     130            || [expr [file attributes ${head_path} -permissions] & 00002] != 0} {
     131            error "VirtualBox requires the \"${applications_dir}\" directory and its parent directories to be\
     132root:admin owned and not world writeable."
     133        }
     134
     135        set head_path [file dirname ${head_path}]
     136    }
     137}
     138
    138139variant vde2 description {Enable support for VDE} {
    139140
    140141    depends_lib-append      port:vde2