Ticket #23456: use_dmg-raimue.diff

File use_dmg-raimue.diff, 1.8 KB (added by raimue (Rainer Müller), 15 years ago)
  • 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