Ticket #23436: patch-fetch_type_bzr.diff

File patch-fetch_type_bzr.diff, 4.7 KB (added by lperry (Perry Lee), 14 years ago)
  • configure

     
    698698GIT
    699699SVN
    700700CVS
     701BZR
    701702FILE
    702703DSCL
    703704DIFF
     
    44104411fi
    44114412
    44124413
     4414# Extract the first word of "bzr", so it can be a program name with args.
     4415set 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; }
     4418if test "${ac_cv_path_BZR+set}" = set; then :
     4419  $as_echo_n "(cached) " >&6
     4420else
     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
     4427for as_dir in $PATH
     4428do
     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
     4437done
     4438  done
     4439IFS=$as_save_IFS
     4440
     4441  ;;
     4442esac
     4443fi
     4444BZR=$ac_cv_path_BZR
     4445if test -n "$BZR"; then
     4446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZR" >&5
     4447$as_echo "$BZR" >&6; }
     4448else
     4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     4450$as_echo "no" >&6; }
     4451fi
     4452
     4453
    44134454# Extract the first word of "cvs", so it can be a program name with args.
    44144455set dummy cvs; ac_word=$2
    44154456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  • src/port1.0/portfetch.tcl

     
    5050options master_sites patch_sites extract.suffix distfiles patchfiles use_bzip2 use_lzma use_xz use_zip use_7z use_dmg dist_subdir \
    5151    fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \
    5252    master_sites.mirror_subdir patch_sites.mirror_subdir \
     53    bzr.url bzr.revision \
    5354    cvs.module cvs.root cvs.password cvs.date cvs.tag cvs.method \
    5455    svn.url svn.revision svn.method \
    5556    git.cmd git.url git.branch \
     
    5758
    5859# XXX we use the command framework to buy us some useful features,
    5960# but this is not a user-modifiable command
     61commands bzr
    6062commands cvs
    6163commands svn
    6264
     
    6466default extract.suffix .tar.gz
    6567default fetch.type standard
    6668
     69default bzr.cmd {[findBinary bzr $portutil::autoconf::bzr_path]}
     70default bzr.dir {${workpath}}
     71default bzr.revision {-1}
     72default bzr.args {"checkout --lightweight"}
     73default bzr.post_args {"-r ${bzr.revision} ${bzr.url} ${worksrcdir}"}
     74
    6775default cvs.cmd {[findBinary cvs $portutil::autoconf::cvs_path]}
    6876default cvs.password ""
    6977default cvs.dir {${workpath}}
     
    160168    global os.platform os.major
    161169    if {[string equal ${action} "set"]} {
    162170        switch $args {
     171            bzr {
     172                depends_fetch-append bin:bzr:bzr
     173            }
    163174            cvs {
    164175                depends_fetch-append bin:cvs:cvs
    165176            }
     
    196207proc portfetch::suffix {distname} {
    197208    global extract.suffix fetch.type
    198209    switch -- "${fetch.type}" {
     210        bzr         -
    199211        cvs         -
    200212        svn         -
    201213        git         -
     
    271283    checkdistfiles fetch_urls
    272284}
    273285
     286# Perform a bzr fetch
     287proc 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
    274299# Perform a CVS login and fetch, storing the CVS login
    275300# information in a custom .cvspass file
    276301proc portfetch::cvsfetch {args} {
     
    541566
    542567    # Fetch the files
    543568    switch -- "${fetch.type}" {
     569        bzr     { return [bzrfetch] }
    544570        cvs     { return [cvsfetch] }
    545571        svn     { return [svnfetch] }
    546572        git     { return [gitfetch] }
  • src/port1.0/port_autoconf.tcl.in

     
    3737        variable diff_path "@DIFF@"
    3838        variable dscl_path "@DSCL@"
    3939        variable file_path "@FILE@"
     40        variable bzr_path "@BZR@"
    4041        variable cvs_path "@CVS@"
    4142        variable svn_path "@SVN@"
    4243        variable git_path "@GIT@"
  • configure.ac

     
    9393AC_PATH_PROG(DIFF, [diff], [])
    9494AC_PATH_PROG(DSCL, [dscl], [])
    9595AC_PATH_PROG(FILE, [file], [])
     96AC_PATH_PROG(BZR, [bzr], [])
    9697AC_PATH_PROG(CVS, [cvs], [])
    9798AC_PATH_PROG(SVN, [svn], [])
    9899AC_PATH_PROG(GIT, [git], [])