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
74 74 } 75 75 76 76 proc 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 workpath77 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 78 78 79 79 # should the distfiles be extracted to worksrcpath instead? 80 80 if {[tbool extract.mkdir]} { … … 99 99 option extract.pre_args x 100 100 option extract.post_args "" 101 101 } 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"] 106 104 option extract.cmd [findBinary hdiutil ${portutil::autoconf::hdiutil_path}] 107 105 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}\"" 109 107 } 110 108 } 111 109 -
src/port1.0/portutil.tcl
303 303 } 304 304 305 305 if {[info exists ${command}.cmd]} { 306 foreach string [set ${command}.cmd] { 307 append cmdstring " $string" 308 } 306 append cmdstring " " [set ${command}.cmd] 309 307 } else { 310 append cmdstring " ${command}"308 append cmdstring " " ${command} 311 309 } 312 310 313 311 foreach var "${command}.pre_args ${command}.args ${command}.post_args" { 314 312 if {[info exists $var]} { 315 foreach string [set ${var}] { 316 append cmdstring " ${string}" 317 } 313 append cmdstring " " [set ${var}] 318 314 } 319 315 } 320 316