Ticket #23436: patch-fetch_type_bzr.diff
File patch-fetch_type_bzr.diff, 4.7 KB (added by lperry (Perry Lee), 15 years ago) |
---|
-
configure
698 698 GIT 699 699 SVN 700 700 CVS 701 BZR 701 702 FILE 702 703 DSCL 703 704 DIFF … … 4410 4411 fi 4411 4412 4412 4413 4414 # Extract the first word of "bzr", so it can be a program name with args. 4415 set dummy bzr; ac_word=$2 4416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4417 $as_echo_n "checking for $ac_word... " >&6; } 4418 if test "${ac_cv_path_BZR+set}" = set; then : 4419 $as_echo_n "(cached) " >&6 4420 else 4421 case $BZR in 4422 [\\/]* | ?:[\\/]*) 4423 ac_cv_path_BZR="$BZR" # Let the user override the test with a path. 4424 ;; 4425 *) 4426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4427 for as_dir in $PATH 4428 do 4429 IFS=$as_save_IFS 4430 test -z "$as_dir" && as_dir=. 4431 for ac_exec_ext in '' $ac_executable_extensions; do 4432 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4433 ac_cv_path_BZR="$as_dir/$ac_word$ac_exec_ext" 4434 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4435 break 2 4436 fi 4437 done 4438 done 4439 IFS=$as_save_IFS 4440 4441 ;; 4442 esac 4443 fi 4444 BZR=$ac_cv_path_BZR 4445 if test -n "$BZR"; then 4446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZR" >&5 4447 $as_echo "$BZR" >&6; } 4448 else 4449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4450 $as_echo "no" >&6; } 4451 fi 4452 4453 4413 4454 # Extract the first word of "cvs", so it can be a program name with args. 4414 4455 set dummy cvs; ac_word=$2 4415 4456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -
src/port1.0/portfetch.tcl
50 50 options master_sites patch_sites extract.suffix distfiles patchfiles use_bzip2 use_lzma use_xz use_zip use_7z use_dmg dist_subdir \ 51 51 fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \ 52 52 master_sites.mirror_subdir patch_sites.mirror_subdir \ 53 bzr.url bzr.revision \ 53 54 cvs.module cvs.root cvs.password cvs.date cvs.tag cvs.method \ 54 55 svn.url svn.revision svn.method \ 55 56 git.cmd git.url git.branch \ … … 57 58 58 59 # XXX we use the command framework to buy us some useful features, 59 60 # but this is not a user-modifiable command 61 commands bzr 60 62 commands cvs 61 63 commands svn 62 64 … … 64 66 default extract.suffix .tar.gz 65 67 default fetch.type standard 66 68 69 default bzr.cmd {[findBinary bzr $portutil::autoconf::bzr_path]} 70 default bzr.dir {${workpath}} 71 default bzr.revision {-1} 72 default bzr.args {"checkout --lightweight"} 73 default bzr.post_args {"-r ${bzr.revision} ${bzr.url} ${worksrcdir}"} 74 67 75 default cvs.cmd {[findBinary cvs $portutil::autoconf::cvs_path]} 68 76 default cvs.password "" 69 77 default cvs.dir {${workpath}} … … 160 168 global os.platform os.major 161 169 if {[string equal ${action} "set"]} { 162 170 switch $args { 171 bzr { 172 depends_fetch-append bin:bzr:bzr 173 } 163 174 cvs { 164 175 depends_fetch-append bin:cvs:cvs 165 176 } … … 196 207 proc portfetch::suffix {distname} { 197 208 global extract.suffix fetch.type 198 209 switch -- "${fetch.type}" { 210 bzr - 199 211 cvs - 200 212 svn - 201 213 git - … … 271 283 checkdistfiles fetch_urls 272 284 } 273 285 286 # Perform a bzr fetch 287 proc portfetch::bzrfetch {args} { 288 if {[catch {command_exec bzr "" "2>&1"} result]} { 289 return -code error [msgcat::mc "Bazaar checkout failed"] 290 } 291 292 if {[info exists patchfiles]} { 293 return [portfetch::fetchfiles] 294 } 295 296 return 0 297 } 298 274 299 # Perform a CVS login and fetch, storing the CVS login 275 300 # information in a custom .cvspass file 276 301 proc portfetch::cvsfetch {args} { … … 541 566 542 567 # Fetch the files 543 568 switch -- "${fetch.type}" { 569 bzr { return [bzrfetch] } 544 570 cvs { return [cvsfetch] } 545 571 svn { return [svnfetch] } 546 572 git { return [gitfetch] } -
src/port1.0/port_autoconf.tcl.in
37 37 variable diff_path "@DIFF@" 38 38 variable dscl_path "@DSCL@" 39 39 variable file_path "@FILE@" 40 variable bzr_path "@BZR@" 40 41 variable cvs_path "@CVS@" 41 42 variable svn_path "@SVN@" 42 43 variable git_path "@GIT@" -
configure.ac
93 93 AC_PATH_PROG(DIFF, [diff], []) 94 94 AC_PATH_PROG(DSCL, [dscl], []) 95 95 AC_PATH_PROG(FILE, [file], []) 96 AC_PATH_PROG(BZR, [bzr], []) 96 97 AC_PATH_PROG(CVS, [cvs], []) 97 98 AC_PATH_PROG(SVN, [svn], []) 98 99 AC_PATH_PROG(GIT, [git], [])