Ticket #29707: extract.patch
File extract.patch, 3.2 KB (added by mtalexander (Mike Alexander), 13 years ago) |
---|
-
base/src/port1.0/portfetch.tcl
120 120 default global_mirror_site "macports_distfiles" 121 121 default mirror_sites.listfile {"mirror_sites.tcl"} 122 122 default mirror_sites.listpath {"port1.0/fetch"} 123 default extract.cmd {[findBinary gzip ${portutil::autoconf::gzip_path}]} 124 default extract.pre_args -dc 125 default extract.post_args {"| ${portutil::autoconf::tar_command} -xf -"} 123 126 124 127 # Deprecation 125 128 option_deprecate svn.tag svn.revision … … 135 138 option_proc fetch.type portfetch::set_fetch_type 136 139 137 140 proc portfetch::set_extract_type {option action args} { 138 global extract.suffix 141 global extract.suffix extract.cmd extract.pre_args extract.post_args 139 142 if {[string equal ${action} "set"] && [tbool args]} { 140 143 switch $option { 141 144 use_bzip2 { 142 145 set extract.suffix .tar.bz2 146 set extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}] 143 147 } 144 148 use_lzma { 145 149 set extract.suffix .tar.lzma 150 set extract.cmd [binaryInPath "lzma"] 146 151 depends_extract-append bin:lzma:xz 147 152 } 148 153 use_xz { 149 154 set extract.suffix .tar.xz 155 set extract.cmd [binaryInPath "xz"] 150 156 depends_extract-append bin:xz:xz 151 157 } 152 158 use_zip { 153 159 set extract.suffix .zip 160 set extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}] 161 set extract.pre_args -q 162 set extract.post_args "-d ${extract.dir}" 154 163 depends_extract-append bin:unzip:unzip 155 164 } 156 165 use_7z { 157 166 set extract.suffix .7z 167 set extract.cmd [binaryInPath "7za"] 168 set extract.pre_args x 169 set extract.post_args "" 158 170 depends_extract-append bin:7za:p7zip 159 171 } 160 172 use_dmg { 161 173 set extract.suffix .dmg 174 global distname 175 set dmg_mount [mkdtemp "/tmp/mports.XXXXXXXX"] 176 set extract.cmd [findBinary hdiutil ${portutil::autoconf::hdiutil_path}] 177 set extract.pre_args attach 178 set 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}\\\"" 162 179 } 163 180 } 164 181 } -
base/src/port1.0/portextract.tcl
53 53 default extract.only {[portextract::disttagclean $distfiles]} 54 54 55 55 default extract.dir {${workpath}} 56 default extract.cmd {[findBinary gzip ${portutil::autoconf::gzip_path}]}57 default extract.pre_args -dc58 default extract.post_args {"| ${portutil::autoconf::tar_command} -xf -"}59 56 default extract.mkdir no 60 57 61 58 set_ui_prefix