Changeset 52007


Ignore:
Timestamp:
Jun 8, 2009, 5:28:30 AM (11 years ago)
Author:
blb@…
Message:

Merge from trunk

Location:
branches/images-and-archives/base
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/images-and-archives/base

  • branches/images-and-archives/base/configure

    r51899 r52007  
    725725HDIUTIL
    726726MAKE
     727BSDMAKE
    727728ZIP
    728729UNZIP
     
    731732RSYNC
    732733RMDIR
     734PATCH
     735NICE
     736LIPO
    733737GZIP
     738HG
    734739GIT
    735740SVN
    736741CVS
     742FILE
     743DSCL
    737744DITTO
     745DIFF
    738746CPIO
    739747CP
     
    38793887
    38803888
     3889# Extract the first word of "diff", so it can be a program name with args.
     3890set dummy diff; ac_word=$2
     3891{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     3892$as_echo_n "checking for $ac_word... " >&6; }
     3893if test "${ac_cv_path_DIFF+set}" = set; then
     3894  $as_echo_n "(cached) " >&6
     3895else
     3896  case $DIFF in
     3897  [\\/]* | ?:[\\/]*)
     3898  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
     3899  ;;
     3900  *)
     3901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3902for as_dir in $PATH
     3903do
     3904  IFS=$as_save_IFS
     3905  test -z "$as_dir" && as_dir=.
     3906  for ac_exec_ext in '' $ac_executable_extensions; do
     3907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     3908    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
     3909    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     3910    break 2
     3911  fi
     3912done
     3913done
     3914IFS=$as_save_IFS
     3915
     3916  ;;
     3917esac
     3918fi
     3919DIFF=$ac_cv_path_DIFF
     3920if test -n "$DIFF"; then
     3921  { $as_echo "$as_me:$LINENO: result: $DIFF" >&5
     3922$as_echo "$DIFF" >&6; }
     3923else
     3924  { $as_echo "$as_me:$LINENO: result: no" >&5
     3925$as_echo "no" >&6; }
     3926fi
     3927
     3928
    38813929# Extract the first word of "ditto", so it can be a program name with args.
    38823930set dummy ditto; ac_word=$2
     
    39193967
    39203968
     3969# Extract the first word of "dscl", so it can be a program name with args.
     3970set dummy dscl; ac_word=$2
     3971{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     3972$as_echo_n "checking for $ac_word... " >&6; }
     3973if test "${ac_cv_path_DSCL+set}" = set; then
     3974  $as_echo_n "(cached) " >&6
     3975else
     3976  case $DSCL in
     3977  [\\/]* | ?:[\\/]*)
     3978  ac_cv_path_DSCL="$DSCL" # Let the user override the test with a path.
     3979  ;;
     3980  *)
     3981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3982for as_dir in $PATH
     3983do
     3984  IFS=$as_save_IFS
     3985  test -z "$as_dir" && as_dir=.
     3986  for ac_exec_ext in '' $ac_executable_extensions; do
     3987  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     3988    ac_cv_path_DSCL="$as_dir/$ac_word$ac_exec_ext"
     3989    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     3990    break 2
     3991  fi
     3992done
     3993done
     3994IFS=$as_save_IFS
     3995
     3996  ;;
     3997esac
     3998fi
     3999DSCL=$ac_cv_path_DSCL
     4000if test -n "$DSCL"; then
     4001  { $as_echo "$as_me:$LINENO: result: $DSCL" >&5
     4002$as_echo "$DSCL" >&6; }
     4003else
     4004  { $as_echo "$as_me:$LINENO: result: no" >&5
     4005$as_echo "no" >&6; }
     4006fi
     4007
     4008
     4009# Extract the first word of "file", so it can be a program name with args.
     4010set dummy file; ac_word=$2
     4011{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     4012$as_echo_n "checking for $ac_word... " >&6; }
     4013if test "${ac_cv_path_FILE+set}" = set; then
     4014  $as_echo_n "(cached) " >&6
     4015else
     4016  case $FILE in
     4017  [\\/]* | ?:[\\/]*)
     4018  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
     4019  ;;
     4020  *)
     4021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4022for as_dir in $PATH
     4023do
     4024  IFS=$as_save_IFS
     4025  test -z "$as_dir" && as_dir=.
     4026  for ac_exec_ext in '' $ac_executable_extensions; do
     4027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     4028    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
     4029    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4030    break 2
     4031  fi
     4032done
     4033done
     4034IFS=$as_save_IFS
     4035
     4036  ;;
     4037esac
     4038fi
     4039FILE=$ac_cv_path_FILE
     4040if test -n "$FILE"; then
     4041  { $as_echo "$as_me:$LINENO: result: $FILE" >&5
     4042$as_echo "$FILE" >&6; }
     4043else
     4044  { $as_echo "$as_me:$LINENO: result: no" >&5
     4045$as_echo "no" >&6; }
     4046fi
     4047
     4048
    39214049# Extract the first word of "cvs", so it can be a program name with args.
    39224050set dummy cvs; ac_word=$2
     
    40394167
    40404168
     4169# Extract the first word of "hg", so it can be a program name with args.
     4170set dummy hg; ac_word=$2
     4171{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     4172$as_echo_n "checking for $ac_word... " >&6; }
     4173if test "${ac_cv_path_HG+set}" = set; then
     4174  $as_echo_n "(cached) " >&6
     4175else
     4176  case $HG in
     4177  [\\/]* | ?:[\\/]*)
     4178  ac_cv_path_HG="$HG" # Let the user override the test with a path.
     4179  ;;
     4180  *)
     4181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4182for as_dir in $PATH
     4183do
     4184  IFS=$as_save_IFS
     4185  test -z "$as_dir" && as_dir=.
     4186  for ac_exec_ext in '' $ac_executable_extensions; do
     4187  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     4188    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
     4189    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4190    break 2
     4191  fi
     4192done
     4193done
     4194IFS=$as_save_IFS
     4195
     4196  ;;
     4197esac
     4198fi
     4199HG=$ac_cv_path_HG
     4200if test -n "$HG"; then
     4201  { $as_echo "$as_me:$LINENO: result: $HG" >&5
     4202$as_echo "$HG" >&6; }
     4203else
     4204  { $as_echo "$as_me:$LINENO: result: no" >&5
     4205$as_echo "no" >&6; }
     4206fi
     4207
     4208
    40414209# Extract the first word of "gzip", so it can be a program name with args.
    40424210set dummy gzip; ac_word=$2
     
    40794247
    40804248
     4249# Extract the first word of "lipo", so it can be a program name with args.
     4250set dummy lipo; ac_word=$2
     4251{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     4252$as_echo_n "checking for $ac_word... " >&6; }
     4253if test "${ac_cv_path_LIPO+set}" = set; then
     4254  $as_echo_n "(cached) " >&6
     4255else
     4256  case $LIPO in
     4257  [\\/]* | ?:[\\/]*)
     4258  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
     4259  ;;
     4260  *)
     4261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4262for as_dir in $PATH
     4263do
     4264  IFS=$as_save_IFS
     4265  test -z "$as_dir" && as_dir=.
     4266  for ac_exec_ext in '' $ac_executable_extensions; do
     4267  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     4268    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
     4269    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4270    break 2
     4271  fi
     4272done
     4273done
     4274IFS=$as_save_IFS
     4275
     4276  ;;
     4277esac
     4278fi
     4279LIPO=$ac_cv_path_LIPO
     4280if test -n "$LIPO"; then
     4281  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
     4282$as_echo "$LIPO" >&6; }
     4283else
     4284  { $as_echo "$as_me:$LINENO: result: no" >&5
     4285$as_echo "no" >&6; }
     4286fi
     4287
     4288
     4289# Extract the first word of "nice", so it can be a program name with args.
     4290set dummy nice; ac_word=$2
     4291{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     4292$as_echo_n "checking for $ac_word... " >&6; }
     4293if test "${ac_cv_path_NICE+set}" = set; then
     4294  $as_echo_n "(cached) " >&6
     4295else
     4296  case $NICE in
     4297  [\\/]* | ?:[\\/]*)
     4298  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
     4299  ;;
     4300  *)
     4301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4302for as_dir in $PATH
     4303do
     4304  IFS=$as_save_IFS
     4305  test -z "$as_dir" && as_dir=.
     4306  for ac_exec_ext in '' $ac_executable_extensions; do
     4307  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     4308    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
     4309    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4310    break 2
     4311  fi
     4312done
     4313done
     4314IFS=$as_save_IFS
     4315
     4316  ;;
     4317esac
     4318fi
     4319NICE=$ac_cv_path_NICE
     4320if test -n "$NICE"; then
     4321  { $as_echo "$as_me:$LINENO: result: $NICE" >&5
     4322$as_echo "$NICE" >&6; }
     4323else
     4324  { $as_echo "$as_me:$LINENO: result: no" >&5
     4325$as_echo "no" >&6; }
     4326fi
     4327
     4328
     4329# Extract the first word of "patch", so it can be a program name with args.
     4330set dummy patch; ac_word=$2
     4331{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     4332$as_echo_n "checking for $ac_word... " >&6; }
     4333if test "${ac_cv_path_PATCH+set}" = set; then
     4334  $as_echo_n "(cached) " >&6
     4335else
     4336  case $PATCH in
     4337  [\\/]* | ?:[\\/]*)
     4338  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
     4339  ;;
     4340  *)
     4341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4342for as_dir in $PATH
     4343do
     4344  IFS=$as_save_IFS
     4345  test -z "$as_dir" && as_dir=.
     4346  for ac_exec_ext in '' $ac_executable_extensions; do
     4347  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     4348    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
     4349    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4350    break 2
     4351  fi
     4352done
     4353done
     4354IFS=$as_save_IFS
     4355
     4356  ;;
     4357esac
     4358fi
     4359PATCH=$ac_cv_path_PATCH
     4360if test -n "$PATCH"; then
     4361  { $as_echo "$as_me:$LINENO: result: $PATCH" >&5
     4362$as_echo "$PATCH" >&6; }
     4363else
     4364  { $as_echo "$as_me:$LINENO: result: no" >&5
     4365$as_echo "no" >&6; }
     4366fi
     4367
     4368
    40814369# Extract the first word of "rmdir", so it can be a program name with args.
    40824370set dummy rmdir; ac_word=$2
     
    43134601  { $as_echo "$as_me:$LINENO: result: $ZIP" >&5
    43144602$as_echo "$ZIP" >&6; }
     4603else
     4604  { $as_echo "$as_me:$LINENO: result: no" >&5
     4605$as_echo "no" >&6; }
     4606fi
     4607
     4608
     4609# Extract the first word of "bsdmake", so it can be a program name with args.
     4610set dummy bsdmake; ac_word=$2
     4611{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     4612$as_echo_n "checking for $ac_word... " >&6; }
     4613if test "${ac_cv_path_BSDMAKE+set}" = set; then
     4614  $as_echo_n "(cached) " >&6
     4615else
     4616  case $BSDMAKE in
     4617  [\\/]* | ?:[\\/]*)
     4618  ac_cv_path_BSDMAKE="$BSDMAKE" # Let the user override the test with a path.
     4619  ;;
     4620  *)
     4621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4622for as_dir in $PATH
     4623do
     4624  IFS=$as_save_IFS
     4625  test -z "$as_dir" && as_dir=.
     4626  for ac_exec_ext in '' $ac_executable_extensions; do
     4627  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     4628    ac_cv_path_BSDMAKE="$as_dir/$ac_word$ac_exec_ext"
     4629    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4630    break 2
     4631  fi
     4632done
     4633done
     4634IFS=$as_save_IFS
     4635
     4636  ;;
     4637esac
     4638fi
     4639BSDMAKE=$ac_cv_path_BSDMAKE
     4640if test -n "$BSDMAKE"; then
     4641  { $as_echo "$as_me:$LINENO: result: $BSDMAKE" >&5
     4642$as_echo "$BSDMAKE" >&6; }
    43154643else
    43164644  { $as_echo "$as_me:$LINENO: result: no" >&5
  • branches/images-and-archives/base/configure.ac

    r51899 r52007  
    9191AC_PATH_PROG(CP, [cp], [])
    9292AC_PATH_PROG(CPIO, [cpio], [])
     93AC_PATH_PROG(DIFF, [diff], [])
    9394AC_PATH_PROG(DITTO, [ditto], [])
     95AC_PATH_PROG(DSCL, [dscl], [])
     96AC_PATH_PROG(FILE, [file], [])
    9497AC_PATH_PROG(CVS, [cvs], [])
    9598AC_PATH_PROG(SVN, [svn], [])
    9699AC_PATH_PROG(GIT, [git], [])
     100AC_PATH_PROG(HG, [hg], [])
    97101AC_PATH_PROG(GZIP, [gzip], [])
     102AC_PATH_PROG(LIPO, [lipo], [])
     103AC_PATH_PROG(NICE, [nice], [])
     104AC_PATH_PROG(PATCH, [patch], [])
    98105AC_PATH_PROG(RMDIR, [rmdir], [])
    99106AC_PATH_PROG(RSYNC, [rsync], [])
     
    102109AC_PATH_PROG(UNZIP, [unzip])
    103110AC_PATH_PROG(ZIP, [zip])
     111AC_PATH_PROG(BSDMAKE, [bsdmake])
    104112AC_PATH_PROG(MAKE, [make])
    105113AC_PATH_PROG(HDIUTIL, [hdiutil], [])
  • branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in

    r51899 r52007  
    3535        variable cp_path "@CP@"
    3636        variable cpio_path "@CPIO@"
     37        variable diff_path "@DIFF@"
    3738        variable ditto_path "@DITTO@"
     39        variable dscl_path "@DSCL@"
     40        variable file_path "@FILE@"
    3841        variable cvs_path "@CVS@"
    3942        variable svn_path "@SVN@"
    4043        variable git_path "@GIT@"
     44        variable hg_path "@HG@"
    4145        variable gzip_path "@GZIP@"
     46        variable lipo_path "@LIPO@"
     47        variable nice_path "@NICE@"
     48        variable patch_path "@PATCH@"
    4249        variable rmdir_path "@RMDIR@"
    4350        variable rsync_path "@RSYNC@"
     
    4552        variable zip_path "@ZIP@"
    4653        variable lsbom_path "@LSBOM@"
     54        variable make_path "@MAKE@"
     55        variable gnumake_path "@GNUMAKE@"
     56        variable bsdmake_path "@BSDMAKE@"
    4757        variable mkbom_path "@MKBOM@"
    4858        variable mtree_path "@MTREE@"
  • branches/images-and-archives/base/src/port1.0/portbuild.tcl

    r51936 r52007  
    6363proc portbuild::build_getmaketype {args} {
    6464    if {![exists build.type]} {
    65         return make
     65        return [findBinary make $portutil::autoconf::make_path]
    6666    }
    6767    switch -exact -- [option build.type] {
    6868        bsd {
    6969            if {[option os.platform] == "darwin"} {
    70                 return bsdmake
     70                return [findBinary bsdmake $portutil::autoconf::bsdmake_path]
    7171            } elseif {[option os.platform] == "freebsd"} {
    72                 return make
     72                return [binaryInPath make]
    7373            } else {
    74                 return pmake
     74                return [binaryInPath pmake]
    7575            }
    7676        }
    7777        gnu {
    7878            if {[option os.platform] == "darwin"} {
    79                 return gnumake
     79                return [findBinary gnumake $portutil::autoconf::gnumake_path]
    8080            } elseif {[option os.platform] == "linux"} {
    81                 return make
     81                return [binaryInPath make]
    8282            } else {
    83                 return gmake
     83                return [binaryInPath gmake]
    8484            }
    8585        }
    8686        pbx {
    87             set pbxbuild "pbxbuild"
    88             set xcodebuild "xcodebuild"
    89 
    9087            if {[option os.platform] != "darwin"} {
    9188                return -code error "[format [msgcat::mc "This port requires 'pbxbuild/xcodebuild', which is not available on %s."] [option os.platform]]"
    9289            }
    9390
    94             if {[catch {set xcodebuild [binaryInPath $xcodebuild]}] == 0} {
     91            if {[catch {set xcodebuild [binaryInPath xcodebuild]}] == 0} {
    9592                return $xcodebuild
    96             } elseif {[catch {set pbxbuild [binaryInPath $pbxbuild]}] == 0} {
     93            } elseif {[catch {set pbxbuild [binaryInPath pbxbuild]}] == 0} {
    9794                return $pbxbuild
    9895            } else {
     
    10299        default {
    103100            ui_warn "[format [msgcat::mc "Unknown build.type %s, using 'gnumake'"] [option build.type]]"
    104             return gnumake
     101            return [findBinary gnumake $portutil::autoconf::gnumake_path]
    105102        }
    106103    }
     
    115112        return ""
    116113    }
    117     return "nice -n $nice "
     114    return "[findBinary nice $portutil::autoconf::nice_path] -n $nice "
    118115}
    119116
  • branches/images-and-archives/base/src/port1.0/portdestroot.tcl

    r51936 r52007  
    300300                    lpush pathsToCheck $dfile
    301301                } else {
    302                     # these files are outside of the prefix
    303                     switch $dfile {
    304                         $applications_dir -
    305                         $developer_dir { ui_debug "port installs files in $dfile" }
    306                         default {
    307                             ui_warn "violation by $dfile"
    308                             set mtree_violation "yes"
    309                         }
     302                    set dir_allowed no
     303                    # these files are (at least potentially) outside of the prefix
     304                    foreach dir "$applications_dir $frameworks_dir /Library/LaunchAgents /Library/LaunchDaemons /Library/StartupItems" {
     305                        if {[string equal -length [expr [string length $dfile] + 1] $dfile/ $dir]} {
     306                            # it's a prefix of one of the allowed paths
     307                            set dir_allowed yes
     308                            break
     309                        }
     310                    }
     311                    if {$dir_allowed} {
     312                        lpush pathsToCheck $dfile
     313                    } else {
     314                        # not a prefix of an allowed path, so it's either the path itself or a violation
     315                        switch $dfile \
     316                            $applications_dir - \
     317                            $frameworks_dir - \
     318                            /Library/LaunchAgents - \
     319                            /Library/LaunchDaemons - \
     320                            /Library/StartupItems { ui_debug "port installs files in $dfile" } \
     321                            default {
     322                                ui_warn "violation by $dfile"
     323                                set mtree_violation "yes"
     324                            }
    310325                    }
    311326                }
  • branches/images-and-archives/base/src/port1.0/portfetch.tcl

    r51936 r52007  
    5959    cvs.module cvs.root cvs.password cvs.date cvs.tag cvs.method \
    6060    svn.url svn.revision svn.method \
    61     git.url git.branch \
    62     hg.url hg.tag
     61    git.cmd git.url git.branch \
     62    hg.cmd hg.url hg.tag
    6363
    6464# XXX we use the command framework to buy us some useful features,
     
    7171default fetch.type standard
    7272
    73 default cvs.cmd {$portutil::autoconf::cvs_path}
     73default cvs.cmd {[findBinary cvs $portutil::autoconf::cvs_path]}
    7474default cvs.password ""
    7575default cvs.dir {${workpath}}
     
    8383default cvs.post_args {"${cvs.module}"}
    8484
    85 default svn.cmd {$portutil::autoconf::svn_path}
     85default svn.cmd {[findBinary svn $portutil::autoconf::svn_path]}
    8686default svn.dir {${workpath}}
    8787default svn.method {export}
     
    9292default svn.post_args {"${svn.url}"}
    9393
     94default git.cmd {[findBinary git $portutil::autoconf::git_path]}
    9495default git.dir {${workpath}}
    9596default git.branch {}
    9697
     98default hg.cmd {[findBinary hg $portutil::autoconf::hg_path]}
    9799default hg.dir {${workpath}}
    98100default hg.tag {tip}
     
    484486        set saveargs ${cvs.args}
    485487        set savepost_args ${cvs.post_args}
    486         set cvs.cmd "echo ${cvs.password} | $portutil::autoconf::cvs_path"
     488        set cvs.cmd "echo ${cvs.password} | ${cvs.cmd}"
    487489        set cvs.args login
    488490        set cvs.post_args ""
     
    509511# Perform an svn fetch
    510512proc portfetch::svnfetch {args} {
    511     global workpath prefix_frozen
    512     global svn.env svn.cmd svn.args svn.post_args svn.revision svn.url svn.method
    513 
    514     # Look for the svn command, either in the path or in the prefix
    515     set goodcmd 0
    516     foreach svncmd "${svn.cmd} ${prefix_frozen}/bin/svn svn" {
    517         if { [file executable ${svncmd}] } {
    518             set svn.cmd $svncmd
    519             set goodcmd 1
    520             break;
    521         }
    522     }
    523     if { !$goodcmd } {
    524         ui_error "The subversion tool (svn) is required to fetch ${svn.url}."
    525         ui_error "Please install the subversion port before proceeding."
    526         return -code error [msgcat::mc "Subversion check out failed"]
    527     }
     513    global svn.args svn.revision svn.method
    528514
    529515    set svn.args "${svn.method} ${svn.args}"
     
    545531# Perform a git fetch
    546532proc portfetch::gitfetch {args} {
    547     global worksrcpath prefix_frozen
    548     global git.url git.branch git.sha1
    549 
    550     # Look for the git command
    551     set git.cmd {}
    552     foreach gitcmd "$portutil::autoconf::git_path $prefix_frozen/bin/git git" {
    553         if {[file executable $gitcmd]} {
    554             set git.cmd $gitcmd
    555             break
    556         }
    557     }
    558     if {${git.cmd} == {}} {
    559         ui_error "git is required to fetch ${git.url}"
    560         ui_error "Please install the git-core port before proceeding."
    561         return -code error [msgcat::mc "Git command not found"]
    562     }
     533    global worksrcpath
     534    global git.url git.branch git.sha1 git.cmd
    563535
    564536    set options "-q"
     
    592564proc portfetch::hgfetch {args} {
    593565    global worksrcpath prefix_frozen
    594     global hg.url hg.tag
    595 
    596     # Look for the hg command.
    597     set hg.cmd {}
    598     foreach hgcmd "$prefix_frozen/bin/hg hg" {
    599         if {[file executable $hgcmd]} {
    600             set hg.cmd $hgcmd
    601             break
    602         }
    603     }
    604     if {${hg.cmd} == {}} {
    605         ui_error "hg is required to fetch ${hg.url}"
    606         ui_error "Please install the mercurial port before proceeding."
    607         return -code error [msgcat::mc "Mercurial command not found"]
    608     }
     566    global hg.url hg.tag hg.cmd
    609567
    610568    set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${worksrcpath} 2>&1"
  • branches/images-and-archives/base/src/port1.0/portlivecheck.tcl

    r51654 r52007  
    122122            set livecheck.type "fallback"
    123123        }
    124         # If livecheck.name is still "default", set it to $name.
    125         if {${livecheck.name} eq "default"} {
    126             set livecheck.name $name
    127         }
     124    }
     125    # If livecheck.name is still "default", set it to $name.
     126    if {${livecheck.name} eq "default"} {
     127        set livecheck.name $name
    128128    }
    129129    if {[lsearch -exact [split $available_types "|"] ${livecheck.type}] != -1} {
  • branches/images-and-archives/base/src/port1.0/portpatch.tcl

    r51936 r52007  
    5050default patch.asroot no
    5151default patch.dir {${worksrcpath}}
    52 default patch.cmd patch
     52default patch.cmd {[findBinary patch $portutil::autoconf::patch_path]}
    5353default patch.pre_args -p0
    5454
     
    5858    # First make sure that patchfiles exists and isn't stubbed out.
    5959    if {![exists patchfiles]} {
    60     return 0
     60        return 0
    6161    }
    6262
     
    6464
    6565    foreach patch [option patchfiles] {
    66     set patch_file [getdistname $patch]
    67     if {[file exists [option filespath]/$patch_file]} {
    68         lappend patchlist [option filespath]/$patch_file
    69     } elseif {[file exists [option distpath]/$patch_file]} {
    70         lappend patchlist [option distpath]/$patch_file
    71     } else {
    72         return -code error [format [msgcat::mc "Patch file %s is missing"] $patch]
    73     }
     66        set patch_file [getdistname $patch]
     67        if {[file exists [option filespath]/$patch_file]} {
     68            lappend patchlist [option filespath]/$patch_file
     69        } elseif {[file exists [option distpath]/$patch_file]} {
     70            lappend patchlist [option distpath]/$patch_file
     71        } else {
     72            return -code error [format [msgcat::mc "Patch file %s is missing"] $patch]
     73        }
    7474    }
    7575    if {![info exists patchlist]} {
    76     return -code error [msgcat::mc "Patch files missing"]
     76        return -code error [msgcat::mc "Patch files missing"]
    7777    }
    7878    _cd [option worksrcpath]
     79    set gzcat "[findBinary gzip $portutil::autoconf::gzip_path] -dc"
     80    set bzcat "[findBinary bzip2 $portutil::autoconf::bzip2_path] -dc"
    7981    foreach patch $patchlist {
    80     ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $patch]"
    81     if {[option os.platform] == "linux"} {
    82         set gzcat "zcat"
    83     } else {
    84         set gzcat "gzcat"
    85     }
    86     switch -glob -- [file tail $patch] {
    87         *.Z -
    88         *.gz {command_exec patch "$gzcat \"$patch\" | (" ")"}
    89         *.bz2 {command_exec patch "bzcat \"$patch\" | (" ")"}
    90         default {command_exec patch "" "< '$patch'"}
    91     }
     82        ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $patch]"
     83        switch -- [file extension $patch] {
     84            .Z -
     85            .gz {command_exec patch "$gzcat \"$patch\" | (" ")"}
     86            .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"}
     87            default {command_exec patch "" "< '$patch'"}
     88        }
    9289    }
    9390    return 0
  • branches/images-and-archives/base/src/port1.0/portutil.tcl

    r51936 r52007  
    11731173            append lipoSources "-arch ${arch} ${workpath}/${arch}/${file} "
    11741174        }
    1175         system "lipo ${lipoSources}-create -output ${file}"
     1175        system "[findBinary lipo $portutil::autoconf::lipo_path] ${lipoSources}-create -output ${file}"
    11761176    }
    11771177}
     
    20692069
    20702070    if {${os.platform} eq "darwin"} {
    2071         exec dscl . -create /Users/${name} Password ${passwd}
    2072         exec dscl . -create /Users/${name} UniqueID ${uid}
    2073         exec dscl . -create /Users/${name} PrimaryGroupID ${gid}
    2074         exec dscl . -create /Users/${name} RealName ${realname}
    2075         exec dscl . -create /Users/${name} NFSHomeDirectory ${home}
    2076         exec dscl . -create /Users/${name} UserShell ${shell}
     2071        set dscl [findBinary dscl $portutil::autoconf::dscl_path]
     2072        exec $dscl . -create /Users/${name} Password ${passwd}
     2073        exec $dscl . -create /Users/${name} UniqueID ${uid}
     2074        exec $dscl . -create /Users/${name} PrimaryGroupID ${gid}
     2075        exec $dscl . -create /Users/${name} RealName ${realname}
     2076        exec $dscl . -create /Users/${name} NFSHomeDirectory ${home}
     2077        exec $dscl . -create /Users/${name} UserShell ${shell}
    20772078    } else {
    20782079        # XXX adduser is only available for darwin, add more support here
     
    21002101
    21012102    if {${os.platform} eq "darwin"} {
    2102         exec dscl . -create /Groups/${name} Password ${passwd}
    2103         exec dscl . -create /Groups/${name} RealName ${realname}
    2104         exec dscl . -create /Groups/${name} PrimaryGroupID ${gid}
     2103        set dscl [findBinary dscl $portutil::autoconf::dscl_path]
     2104        exec $dscl . -create /Groups/${name} Password ${passwd}
     2105        exec $dscl . -create /Groups/${name} RealName ${realname}
     2106        exec $dscl . -create /Groups/${name} PrimaryGroupID ${gid}
    21052107        if {${users} ne ""} {
    2106             exec dscl . -create /Groups/${name} GroupMembership ${users}
     2108            exec $dscl . -create /Groups/${name} GroupMembership ${users}
    21072109        }
    21082110    } else {
     
    21952197    }
    21962198    set exec-lipo [concat ${exec-lipo}]
    2197     system "/usr/bin/lipo ${exec-lipo} -create -output ${target}${file}"
     2199    system "[findBinary lipo $portutil::autoconf::lipo_path] ${exec-lipo} -create -output ${target}${file}"
    21982200}
    21992201
     
    22192221    foreach arch [lrange ${archs} 1 end] {
    22202222        # checking for differences; TODO: error more gracefully on non-equal files
    2221         exec "/usr/bin/diff" "-q" "${base}/${basearch}${file}" "${base}/${arch}${file}"
     2223        exec [findBinary diff $portutil::autoconf::diff_path] "-q" "${base}/${basearch}${file}" "${base}/${arch}${file}"
    22222224    }
    22232225    ui_debug "ba: '${basearch}'"
     
    22482250        if {${fpath} != ""} {
    22492251            # determine the type (dir/file/link)
    2250             set filetype [exec "/usr/bin/file" "-b" "${basepath}${fpath}"]
     2252            set filetype [exec [findBinary file $portutil::autoconf::file_path] "-b" "${basepath}${fpath}"]
    22512253            switch -regexp ${filetype} {
    22522254                directory {
Note: See TracChangeset for help on using the changeset viewer.