Ticket #23456: use_dmg.diff

File use_dmg.diff, 2.5 KB (added by ryandesign (Ryan Carsten Schmidt), 15 years ago)
  • src/port1.0/portextract.tcl

     
    7474}
    7575
    7676proc portextract::extract_init {args} {
    77     global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_lzma use_xz use_zip use_7z use_dmg workpath
     77    global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir use_bzip2 use_lzma use_xz use_zip use_7z use_dmg
    7878
    7979    # should the distfiles be extracted to worksrcpath instead?
    8080    if {[tbool extract.mkdir]} {
     
    9999        option extract.pre_args x
    100100        option extract.post_args ""
    101101    } elseif {[tbool use_dmg]} {
    102         global worksrcdir
    103         set dmg_tmp_dir [mkdtemp "/tmp/mports.XXXXXXXX"]
    104         set dmg_mount ${dmg_tmp_dir}/${worksrcdir}
    105         file mkdir ${dmg_mount}
     102        global distname
     103        set dmg_mount [mkdtemp "/tmp/mports.XXXXXXXX"]
    106104        option extract.cmd [findBinary hdiutil ${portutil::autoconf::hdiutil_path}]
    107105        option extract.pre_args attach
    108         option extract.post_args "-private -readonly -nobrowse -mountpoint ${dmg_mount} && [findBinary cp  ${portutil::autoconf::cp_path}] -Rp ${dmg_mount} ${extract.dir} && ${extract.cmd} detach ${dmg_mount} && [findBinary rmdir  ${portutil::autoconf::rmdir_path}] ${dmg_mount} ${dmg_tmp_dir}"
     106        option extract.post_args "-private -readonly -nobrowse -mountpoint \"${dmg_mount}\" && [findBinary cp ${portutil::autoconf::cp_path}] -Rp \"${dmg_mount}\" \"${extract.dir}/${distname}\" && ${extract.cmd} detach \"${dmg_mount}\" && [findBinary rmdir ${portutil::autoconf::rmdir_path}] \"${dmg_mount}\""
    109107    }
    110108}
    111109
  • src/port1.0/portutil.tcl

     
    303303    }
    304304
    305305    if {[info exists ${command}.cmd]} {
    306         foreach string [set ${command}.cmd] {
    307             append cmdstring " $string"
    308         }
     306        append cmdstring " " [set ${command}.cmd]
    309307    } else {
    310         append cmdstring " ${command}"
     308        append cmdstring " " ${command}
    311309    }
    312310
    313311    foreach var "${command}.pre_args ${command}.args ${command}.post_args" {
    314312        if {[info exists $var]} {
    315             foreach string [set ${var}] {
    316                 append cmdstring " ${string}"
    317             }
     313            append cmdstring " " [set ${var}]
    318314        }
    319315    }
    320316