Changeset 1500 for trunk/base


Ignore:
Timestamp:
Dec 23, 2002, 6:44:41 PM (17 years ago)
Author:
landonf (Landon Fuller)
Message:

Merge in landonf-1_0

Location:
trunk/base
Files:
3 added
2 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Makefile

    r648 r1500  
    11SUBDIR= doc src
    22
    3 .PHONY : all
    4 .PHONY : clean
    5 .PHONY : install
    6 
    7 all:
    8         @for subdir in $(SUBDIR); do\
    9                 echo making $@ in $$subdir; \
    10                 ( cd $$subdir && $(MAKE) $@) || exit 1; \
    11         done
    12 
    13 clean:
    14         @for subdir in $(SUBDIR); do\
    15                 echo making $@ in $$subdir; \
    16                 ( cd $$subdir && $(MAKE) $@) || exit 1; \
    17         done
    18 
    19 install:
    20         @for subdir in $(SUBDIR); do\
    21                 echo making $@ in $$subdir; \
    22                 ( cd $$subdir && $(MAKE) $@) || exit 1; \
    23         done
     3include Mk/dports.subdir.mk
  • trunk/base/doc/Makefile

    r1225 r1500  
    1 PREFIX?=        /opt/local
    2 ETCDIR=         /etc/ports
    31MAN7=           portfile.7 portstyle.7
    4 DSTUSR?=        root
    5 DSTGRP?=        wheel
    62
    73all:
     
    106
    117install:
    12         mkdir -p /etc/defaults
    138        mkdir -p ${ETCDIR}
    149        mkdir -p ${PREFIX}
     
    2419        fi
    2520        install -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${ETCDIR}
    26         install -o ${DSTUSR} -g ${DSTGRP} -m 644 ports.conf.default /etc/defaults/ports.conf
    2721        install -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7 ${PREFIX}/man/man7
    2822        install -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7 ${PREFIX}/man/man7
     23
     24include ../Mk/dports.mk
  • trunk/base/doc/ports.conf

    r773 r1500  
    55portdbpath              /opt/local/var/db/dports
    66
    7 # Print debug messages - You probably want 'yes' if
    8 # you're maintaining ports
    9 ports_debug             no
    10 
    11 # Print informational messages - You probably want
    12 # 'yes' if you're maintaining ports
    13 ports_verbose           no
    14 
    157# Set the directory in which to install ports
    168prefix                  /opt/local
  • trunk/base/doc/prefix.mtree

    r1453 r1500  
    246246                ..
    247247            ..
    248         ..
    249         log
    250248        ..
    251249    ..
  • trunk/base/src/Makefile

    r407 r1500  
    22SUBDIR=         ${TCLPKG} port
    33
    4 all:
    5         @for subdir in $(SUBDIR); do\
    6                 echo making $@ in $$subdir; \
    7                 ( cd $$subdir && $(MAKE) $@) || exit 1; \
    8         done
    9 
    10 clean:
    11         @for subdir in $(SUBDIR); do\
    12                 echo making $@ in $$subdir; \
    13                 ( cd $$subdir && $(MAKE) $@) || exit 1; \
    14         done
    15 
    16 install:
    17         @for subdir in $(SUBDIR); do\
    18                 echo making $@ in $$subdir; \
    19                 ( cd $$subdir && $(MAKE) $@) || exit 1; \
    20         done
     4include ../Mk/dports.subdir.mk
  • trunk/base/src/darwinports1.0/Makefile

    r971 r1500  
    1 SRCS=           darwinports.tcl darwinportsui.tcl
    2 DSTUSR?=        root
    3 DSTGRP?=        wheel
     1SRCS=           darwinports.tcl
    42
    53all:
     
    1311        done
    1412        @../pkg_mkindex.tcl `./tcldir.sh`
     13
     14include ../../Mk/dports.mk
  • trunk/base/src/darwinports1.0/darwinports.tcl

    r1378 r1500  
    3030#
    3131package provide darwinports 1.0
    32 package require darwinportsui 1.0
    3332
    3433namespace eval darwinports {
    3534    namespace export bootstrap_options portinterp_options uniqid 0
    3635    variable bootstrap_options "portdbpath libpath auto_path sources_conf prefix"
    37     variable portinterp_options "portdbpath portpath auto_path portconf portdefaultconf"
     36    variable portinterp_options "portdbpath portpath auto_path prefix"
    3837    variable uniqid 0
    3938}
    4039
     40# Provided UI instantiations
     41# For standard messages, the following priorities are defined
     42#     debug, info, msg, warn, error
     43# Clients of the library are expected to provide ui_puts with the following prototype:
     44#     proc ui_puts {priority string nonl}
     45# ui_puts should handle the above defined priorities
     46
     47proc ui_debug {str {nonl ""}} {
     48    ui_puts debug "$str" $nonl
     49}
     50
     51proc ui_info {str {nonl ""}} {
     52    ui_puts info "$str" $nonl
     53}
     54
     55proc ui_msg {str {nonl ""}} {
     56    ui_puts msg "$str" $nonl
     57}
     58
     59proc ui_error {str {nonl ""}} {
     60    ui_puts error "$str" $nonl
     61}
     62
     63proc ui_warn {str {nonl ""}} {
     64    ui_puts warn "$str" $nonl
     65}
     66
    4167proc dportinit {args} {
    42     global auto_path env darwinports::portdbpath darwinports::bootstrap_options darwinports::uniqid darwinports::portinterp_options darwinports::portconf darwinports::portdefaultconf darwinports::sources darwinports::sources_conf
    43 
    44     if [file isfile /etc/defaults/ports.conf] {
    45         set portdefaultconf /etc/defaults/ports.conf
    46         lappend conf_files /etc/defaults/ports.conf
    47     }
     68    global auto_path env darwinports::portdbpath darwinports::bootstrap_options darwinports::uniqid darwinports::portinterp_options darwinports::portconf darwinports::sources darwinports::sources_conf
    4869
    4970    if {[llength [array names env HOME]] > 0} {
     
    117138
    118139proc darwinports::worker_init {workername portpath options variations} {
    119     global darwinports::uniqid darwinports::portinterp_options darwinports::portdbpath darwinports::portconf darwinports::portdefaultconf auto_path
     140    global darwinports::uniqid darwinports::portinterp_options darwinports::portdbpath darwinports::portconf auto_path
    120141    # Create package require abstraction procedure
    121142    $workername eval "proc PortSystem \{version\} \{ \n\
     
    127148
    128149    # instantiate the UI functions
    129     foreach proc {ui_init ui_enable ui_disable ui_enabled ui_puts ui_debug ui_info ui_msg ui_error ui_gets ui_yesno ui_confirm ui_display} {
    130         $workername alias $proc $proc
    131     }
    132 
    133     foreach proc {ports_verbose ports_quiet ports_debug ports_force} {
     150    foreach proc {ui_debug ui_info ui_warn ui_msg ui_error ui_gets ui_yesno ui_confirm ui_display} {
    134151        $workername alias $proc $proc
    135152    }
     
    204221
    205222proc dportopen {porturl {options ""} {variations ""}} {
    206     global darwinports::uniqid darwinports::portinterp_options darwinports::portdbpath darwinports::portconf darwinports::portdefaultconf auto_path
     223    global darwinports::uniqid darwinports::portinterp_options darwinports::portdbpath darwinports::portconf auto_path
    207224    set portdir [darwinports::getportdir $porturl]
    208225    cd $portdir
     
    215232    }
    216233    $workername eval source Portfile
    217 
    218     # initialize the UI for the new port
    219     $workername eval ui_init
    220234
    221235    return $workername
     
    307321}
    308322
    309 proc dportmatch {regexp} {
    310         return -code error "dportmatch has been deprecated, use dportsearch instead."
    311 }
    312 
    313323proc dportinfo {workername} {
    314324    return [$workername eval array get PortInfo]
  • trunk/base/src/pextlib1.0/Makefile

    r1049 r1500  
    22SHLIB_NAME=     Pextlib
    33LDADD+=         -ltcl
    4 PREFIX?=        /opt/local
    54INSTALLDIR= ${PREFIX}/share/darwinports/Tcl/pextlib1.0
    6 DSTUSR?=        root
    7 DSTGRP?=        wheel
    85
    96.c.o:
     
    1815        rm -f ${OBJS} `./link.sh -n ${SHLIB_NAME}`
    1916
    20 install:
     17install: all
    2118        mkdir -p ${INSTALLDIR}
    2219        install -c -o "${DSTUSR}" -g "${DSTGRP}" -m 444 `./link.sh -n ${SHLIB_NAME}` ${INSTALLDIR}
    2320        ../pkg_mkindex.tcl ${INSTALLDIR}
     21
     22include ../../Mk/dports.mk
  • trunk/base/src/pextlib1.0/Pextlib.c

    r1085 r1500  
    129129        int ret;
    130130        pid_t pid;
     131        Tcl_Obj *tcl_result;
    131132#if defined(__APPLE__)
    132133        char **environ;
     
    184185                if (WEXITSTATUS(ret) == 0)
    185186                        return TCL_OK;
    186                 else
     187                else {
     188                        tcl_result = Tcl_NewStringObj("shell command \"", -1);
     189                        Tcl_AppendToObj(tcl_result, cmdstring, -1);
     190                        Tcl_AppendToObj(tcl_result, "\" returned error ", -1);
     191                        Tcl_AppendObjToObj(tcl_result, Tcl_NewIntObj(WEXITSTATUS(ret)));
     192                        Tcl_SetObjResult(interp, tcl_result);
    187193                        return TCL_ERROR;
     194                }
    188195        } else
    189196                return TCL_ERROR;
  • trunk/base/src/pkg_mkindex.tcl

    r1466 r1500  
    3030
    3131if {$argc < 1} {
    32         puts "Usage: [exec basename $argv0] <directory list>"
     32        puts "Usage: $argv0 <directory list>"
    3333        exit
    3434}
  • trunk/base/src/port/Makefile

    r1224 r1500  
    1 PREFIX?=        /opt/local
    21MAN1=           port.1
    3 DSTUSR?=        root
    4 DSTGRP?=        wheel
    52
    63mkdirs:
     
    1613        install -c -o ${DSTUSR} -g ${DSTGRP} -m 555 portall.tcl ${PREFIX}/bin/portall
    1714        install -c -o ${DSTUSR} -g ${DSTGRP} -m 555 portindex.tcl ${PREFIX}/bin/portindex
     15
     16include ../../Mk/dports.mk
  • trunk/base/src/port/port.1

    r1330 r1500  
    3636.Sh SYNOPSIS
    3737.Nm
    38 .Op Fl vDqf
     38.Op Fl vdqf
    3939.Op Ar target
    4040.Op Ar portname
    41 .Op Fl d Ar portdir
     41.Op Fl D Ar portdir
    4242.Op Ar options ...
    4343.Op Ar variations ...
     
    6363.It Fl v
    6464verbose mode (generate verbose messages)
    65 .It Fl D
     65.It Fl d
    6666debug mode (generate debugging messages)
    6767.It Fl q
    6868quiet mode (suppress messages)
    69 .It Fl d
     69.It Fl D
    7070specify
    7171.Ar portdir
  • trunk/base/src/port/port.tcl

    r1466 r1500  
    3434set portdir .
    3535
     36# UI Instantiations
     37# ui_options(ports_debug) - If set, output debugging messages.
     38# ui_options(ports_verbose) - If set, output info messages (ui_info)
     39# ui_options(ports_quiet) - If set, don't output "standard messages"
     40
     41# ui_options accessor
     42proc ui_isset {val} {
     43    global ui_options
     44    if {[info exists ui_options($val)]} {
     45        if {$ui_options($val) == "yes"} {
     46            return 1
     47        }
     48    }
     49    return 0
     50}
     51
     52# Output string "str"
     53# If you don't want newlines to be output, you must pass "-nonewline"
     54# as the second argument.
     55
     56proc ui_puts {priority str nonl} {
     57    set channel stdout
     58    switch $priority {
     59        debug {
     60            if [ui_isset ports_debug] {
     61                set channel stderr
     62                set str "DEBUG: $str"
     63            } else {
     64                return
     65            }
     66        }
     67        info {
     68            if ![ui_isset ports_verbose] {
     69                return
     70            }
     71        }
     72        msg {
     73            if [ui_isset ports_quiet] {
     74                return
     75            }
     76        }
     77        error {
     78            set str "Error: $str"
     79            set channel stderr
     80        }
     81        warn {
     82            set str "Warning: $str"
     83        }
     84    }
     85    if {$nonl == "-nonewline"} {
     86        puts -nonewline $channel "$str"
     87        flush $channel
     88    } else {
     89        puts "$str"
     90    }
     91}
     92
     93# Get a line of input from the user and store in str, returning the
     94# number of bytes input.
     95proc ui_gets {str} {
     96    upvar $str in_string
     97    gets stdin in_string
     98}
     99
     100# Ask a boolean "yes/no" question of the user, using "promptstr" as
     101# the prompt.  It should contain a trailing space and/or anything else
     102# you want to precede the user's input string.  Returns 1 for "yes" or
     103# 0 for "no".  This implementation also assumes an english yes/no or
     104# y/n response, but that is not mandated by the spec.  If "defvalue"
     105# is passed, it will be used as the default value if none is supplied
     106# by the user.
     107proc ui_yesno {promptstr {defvalue ""}} {
     108    set satisfaction no
     109    while {$satisfaction == "no"} {
     110        ui_puts $promptstr -nonewline
     111        if {[ui_gets mystr] == 0} {
     112            if {[string length $defvalue] > 0} {
     113                set mystr $defvalue
     114            } else {
     115                continue
     116            }
     117        }
     118        if {[string compare -nocase -length 1 $mystr y] == 0} {
     119            set rval 1
     120            set satisfaction yes
     121        } elseif {[string compare -nocase -length 1 $mystr n] == 0} {
     122            set rval 0
     123            set satisfaction yes
     124        }
     125    }
     126    return $rval
     127}
     128
     129# Put up a simple confirmation dialog, requesting nothing more than
     130# the user's acknowledgement of the prompt string passed in
     131# "promptstr".  There is no return value.
     132proc ui_confirm {promptstr} {
     133    ui_puts "$promptstr" -nonewline
     134    ui_gets garbagestr
     135}
     136
     137# Display the contents of a file, ideally in a manner which allows the
     138# user to scroll through and read it comfortably (e.g. a license
     139# text).  For the "simple UI" version of this, we simply punt this to
     140# less(1) since rewriting a complete pager for the simple case would
     141# be a waste of time.  It's expected in a more complex UI case, a
     142# scrolling display widget of some type will be used.
     143proc ui_display {filename} {
     144    if [file exists $filename] {
     145        system "/usr/bin/less $filename"
     146    }
     147}
     148
    36149# Standard procedures
    37150proc print_usage args {
    38151    global argv0
    39     puts "Usage: [exec basename $argv0] \[-vDq\] \[action\] \[-d portdir\] \[options\]"
     152    puts "Usage: $argv0 \[-vdq\] \[action\] \[-D portdir\] \[options\]"
    40153}
    41154
    42155proc fatal args {
    43156    global argv0
    44     puts stderr "[exec basename $argv0]: $args"
     157    puts stderr "$argv0: $args"
    45158    exit
    46159}
     
    60173            foreach c [split $opt {}] {
    61174                if {$c == "v"} {
    62                     set options(ports_verbose) yes
     175                    set ui_options(ports_verbose) yes
    63176                } elseif {$c == "f"} {
    64177                    set options(ports_force) yes
    65                 } elseif {$c == "D"} {
    66                     set options(ports_debug) yes
     178                } elseif {$c == "d"} {
     179                    set ui_options(ports_debug) yes
     180                    # debug infers verbose
     181                    set ui_options(ports_verbose) yes
    67182                } elseif {$c == "q"} {
    68                     set options(ports_quiet) yes
    69                     set options(ports_verbose) no
    70                     set options(ports_debug) no
    71                 } elseif {$opt == "d"} {
     183                    set ui_options(ports_quiet) yes
     184                    set ui_options(ports_verbose) no
     185                    set ui_options(ports_debug) no
     186                } elseif {$opt == "D"} {
    72187                    incr i
    73188                    set porturl "file://[lindex $argv $i]"
     
    153268        set target $action
    154269        if {[info exists portname]} {
    155             # Escape regex special characters
    156             regsub -all "(\\(){1}|(\\)){1}|(\\{1}){1}|(\\+){1}|(\\{1}){1}|(\\{){1}|(\\}){1}|(\\^){1}|(\\$){1}|(\\.){1}|(\\\\){1}" $portname "\\\\&" search_string
     270                # Escape regex special characters
     271                regsub -all "(\\(){1}|(\\)){1}|(\\{1}){1}|(\\+){1}|(\\{1}){1}|(\\{){1}|(\\}){1}|(\\^){1}|(\\$){1}|(\\.){1}|(\\\\){1}" $portname "\\\\&" search_string
    157272            if {[catch {set res [dportsearch ^$search_string\$]} result]} {
    158                 puts $result
     273                puts "port search failed: $result"
    159274                exit 1
    160275            }
  • trunk/base/src/port/portall.tcl

    r1370 r1500  
    88
    99global target
     10
     11# UI Instantiations
     12# ui_options(ports_debug) - If set, output debugging messages.
     13# ui_options(ports_verbose) - If set, output info messages (ui_info)
     14# ui_options(ports_quiet) - If set, don't output "standard messages"
     15
     16# ui_options accessor
     17proc ui_isset {val} {
     18    global ui_options
     19    if {[info exists ui_options($val)]} {
     20        if {$ui_options($val) == "yes"} {
     21            return 1
     22        }
     23    }
     24    return 0
     25}
     26
     27# Output string "str"
     28# If you don't want newlines to be output, you must pass "-nonewline"
     29# as the second argument.
     30
     31proc ui_puts {priority str nonl} {
     32    set channel stdout
     33    switch $priority {
     34        debug {
     35            if [ui_isset ports_debug] {
     36                set channel stderr
     37                set str "DEBUG: $str"
     38            } else {
     39                return
     40            }
     41        }
     42        info {
     43            if ![ui_isset ports_verbose] {
     44                return
     45            }
     46        }
     47        msg {
     48            if [ui_isset ports_quiet] {
     49                return
     50            }
     51        }
     52        error {
     53            set str "Error: $str"
     54            set channel stderr
     55        }
     56        warn {
     57            set str "Warning: $str"
     58        }
     59    }
     60    if {$nonl == "-nonewline"} {
     61        puts -nonewline $channel "$str"
     62        flush $channel
     63    } else {
     64        puts "$str"
     65    }
     66}
     67
     68# Get a line of input from the user and store in str, returning the
     69# number of bytes input.
     70proc ui_gets {str} {
     71    upvar $str in_string
     72    gets stdin in_string
     73}
     74
     75# Ask a boolean "yes/no" question of the user, using "promptstr" as
     76# the prompt.  It should contain a trailing space and/or anything else
     77# you want to precede the user's input string.  Returns 1 for "yes" or
     78# 0 for "no".  This implementation also assumes an english yes/no or
     79# y/n response, but that is not mandated by the spec.  If "defvalue"
     80# is passed, it will be used as the default value if none is supplied
     81# by the user.
     82proc ui_yesno {promptstr {defvalue ""}} {
     83    set satisfaction no
     84    while {$satisfaction == "no"} {
     85        ui_puts $promptstr -nonewline
     86        if {[ui_gets mystr] == 0} {
     87            if {[string length $defvalue] > 0} {
     88                set mystr $defvalue
     89            } else {
     90                continue
     91            }
     92        }
     93        if {[string compare -nocase -length 1 $mystr y] == 0} {
     94            set rval 1
     95            set satisfaction yes
     96        } elseif {[string compare -nocase -length 1 $mystr n] == 0} {
     97            set rval 0
     98            set satisfaction yes
     99        }
     100    }
     101    return $rval
     102}
     103
     104# Put up a simple confirmation dialog, requesting nothing more than
     105# the user's acknowledgement of the prompt string passed in
     106# "promptstr".  There is no return value.
     107proc ui_confirm {promptstr} {
     108    ui_puts "$promptstr" -nonewline
     109    ui_gets garbagestr
     110}
     111
     112# Display the contents of a file, ideally in a manner which allows the
     113# user to scroll through and read it comfortably (e.g. a license
     114# text).  For the "simple UI" version of this, we simply punt this to
     115# less(1) since rewriting a complete pager for the simple case would
     116# be a waste of time.  It's expected in a more complex UI case, a
     117# scrolling display widget of some type will be used.
     118proc ui_display {filename} {
     119    if [file exists $filename] {
     120        system "/usr/bin/less $filename"
     121    }
     122}
    10123
    11124proc port_traverse {func {dir .}} {
     
    74187    return 1
    75188}
    76 
  • trunk/base/src/port/portindex.tcl

    r1466 r1500  
    77package require Pextlib
    88
     9# Globals
    910set archive 0
    1011set depth 0
     12
     13# UI Instantiations
     14# ui_options(ports_debug) - If set, output debugging messages.
     15# ui_options(ports_verbose) - If set, output info messages (ui_info)
     16# ui_options(ports_quiet) - If set, don't output "standard messages"
     17
     18# ui_options accessor
     19proc ui_isset {val} {
     20    global ui_options
     21    if {[info exists ui_options($val)]} {
     22        if {$ui_options($val) == "yes"} {
     23            return 1
     24        }
     25    }
     26    return 0
     27}
     28
     29# Output string "str"
     30# If you don't want newlines to be output, you must pass "-nonewline"
     31# as the second argument.
     32
     33proc ui_puts {priority str nonl} {
     34    set channel stdout
     35    switch $priority {
     36        debug {
     37            if [ui_isset ports_debug] {
     38                set channel stderr
     39                set str "DEBUG: $str"
     40            } else {
     41                return
     42            }
     43        }
     44        info {
     45            if ![ui_isset ports_verbose] {
     46                return
     47            }
     48        }
     49        msg {
     50            if [ui_isset ports_quiet] {
     51                return
     52            }
     53        }
     54        error {
     55            set str "Error: $str"
     56            set channel stderr
     57        }
     58        warn {
     59            set str "Warning: $str"
     60        }
     61    }
     62    if {$nonl == "-nonewline"} {
     63        puts -nonewline $channel "$str"
     64        flush $channel
     65    } else {
     66        puts "$str"
     67    }
     68}
     69
     70# These ui procedures should never be called during an index operation
     71foreach proc {ui_gets ui_yesno ui_confirm ui_display} {
     72        eval proc $proc \{args\} \{return -code error \"Interactive procedure '$proc' called during index\"\}
     73}
    1174
    1275# Standard procedures
    1376proc print_usage args {
    1477    global argv0
    15     puts "Usage: [exec basename $argv0] \[-a\] \[-o output directory\] \[directory\]"
     78    puts "Usage: $argv0 \[-ad\] \[-o output directory\] \[directory\]"
    1679    puts "-a:\tArchive port directories (for remote sites). Requires -o option"
    1780    puts "-o:\tOutput all files to specified directory"
     81    puts "-d:\tOutput debugging information"
    1882}
    1983
     
    84148            if {$arg == "-a"} { # Turn on archiving
    85149                set archive 1
     150            } elseif {$arg == "-d"} { # Turn on debug output
     151                set ui_options(ports_debug) yes
    86152            } elseif {$arg == "-o"} { # Set output directory
    87153                incr i
  • trunk/base/src/port1.0/port.tcl

    r1047 r1500  
    4646package require portpackage 1.0
    4747package require portcontents 1.0
    48 
    49 # System wide default configuration
    50 if [info exists portdefaultconf] {
    51     source $portdefaultconf
    52 }
    53 
    54 # System wide user configuration
    55 if [info exists portconf] {
    56     source $portconf
    57 }
  • trunk/base/src/port1.0/portbuild.tcl

    r1360 r1500  
    7575        }
    7676        default {
    77             ui_warning "Unknown build.type ${build.type}, using 'gnumake'"
     77            ui_warn "Unknown build.type ${build.type}, using 'gnumake'"
    7878            return gnumake
    7979        }
  • trunk/base/src/port1.0/portfetch.tcl

    r1360 r1500  
    211211# the listed url varable and associated distfile
    212212proc fetchfiles {args} {
    213     global distpath all_dist_files UI_PREFIX ports_verbose fetch_urls fetch.cmd os.platform fetch.pre_args
     213    global distpath all_dist_files UI_PREFIX fetch_urls fetch.cmd os.platform fetch.pre_args
    214214    global distfile site
    215215
     
    217217    if {${os.platform} == "freebsd"} {
    218218        set fetch.cmd "fetch"
    219     }
    220     if [tbool ports_verbose] {
    221         set fetch.pre_args -v
    222     } elseif {${os.platform} == "darwin" } {
    223         set fetch.pre_args "-s -S"
    224219    }
    225220
  • trunk/base/src/port1.0/portmain.tcl

    r1231 r1500  
    4848option_proc default_variants handle_default_variants
    4949
    50 # Remove trailing "Endian"
    51 
    5250default distpath {[file join $portdbpath distfiles]}
    5351default workdir work
     
    7270if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
    7371
    74 set os_endian $tcl_platform(byteOrder)
    7572default os.platform {[string tolower $tcl_platform(os)]}
    7673default os.version {$tcl_platform(osVersion)}
    7774default os.arch {$os_arch}
    78 default os.endian {[string range $os_endian 0 [expr [string length $os_endian] - 7]]}
     75# Remove trailing "Endian"
     76default os.endian {[string range $tcl_platform(byteOrder) 0 [expr [string length $tcl_platform(byteOrder)] - 7]]}
    7977
    8078
  • trunk/base/src/port1.0/portpackage.tcl

    r1355 r1500  
    7373# method.
    7474proc package_tarball {portname portversion entry} {
    75     global ports_verbose portdbpath package.dir
     75    global portdbpath package.dir
    7676
    7777    set rfile [registry_exists $portname $portversion]
     
    8787        puts $pfile $rfile
    8888        close $pfile
    89         if [tbool ports_verbose] {
    90             set verbose v
    91         } else {
    92             set verbose ""
    93         }
     89
    9490        if [file isdirectory ${package.dir}] {
    9591            set ptarget ${package.dir}/${portname}-${portversion}.tar.gz
     
    9793            set ptarget ${portname}-${portversion}.tar.gz
    9894        }
    99         if [catch {system "gnutar -T [lindex $plist 1] -czPp${verbose}f ${ptarget}"} err] {
     95        if [catch {system "gnutar -T [lindex $plist 1] -czPpf ${ptarget}"} err] {
    10096            ui_error "Package creation failed - gnutar returned error status: $err"
    10197            ui_info "Failed packing list left in [lindex $plist 1]"
  • trunk/base/src/port1.0/portutil.tcl

    r1452 r1500  
    10731073}
    10741074
     1075# build the specified portfile with default workpath
     1076proc portfile_run {this} {
     1077    set portname [$this get name]
     1078        if {[portexec_int $portname install] == 0} {
     1079                portexec_int $portname clean
     1080    }
     1081}
     1082
    10751083# builds the specified port (looked up in the index) to the specified target
    10761084# doesn't yet support options or variants...
     
    10851093        set options(workpath) ${newworkpath}
    10861094    }
    1087 
    10881095        # Escape regex special characters
    1089         regsub -all "(\\(){1}|(\\)){1}|(\\{1}){1}|(\\+){1}|(\\{1}){1}|(\\{){1}|(\\}){1}|(\\^){1}|(\\$){1}|(\\.){1}|(\\\\){1}" $portname "\\\\&" search_string
     1096        regsub -all "(\\(){1}|(\\)){1}|(\\{1}){1}|(\\+){1}|(\\{1}){1}|(\\{){1}|(\\}){1}|(\\^){1}|(\\$){1}|(\\.){1}|(\\\\){1}" $portname "\\\\&" search_string 
    10901097
    10911098    set res [dportsearch ^$search_string\$]
    10921099    if {[llength $res] < 2} {
    1093         ui_error "Portfile $portname not found"
     1100        ui_error "Dependency $portname not found"
    10941101        return -1
    10951102    }
     1103
    10961104    array set portinfo [lindex $res 1]
    10971105    set porturl $portinfo(porturl)
     
    11071115}
    11081116
    1109 # build the specified portfile
    1110 proc portfile_run {this} {
    1111     set portname [$this get name]
    1112         if {[portexec_int $portname install] == 0} {
    1113                 portexec_int $portname clean
    1114     }
    1115 }
    1116 
    11171117proc portfile_test {this} {
    11181118    set receipt [registry_exists [$this get name]]
     
    11891189            lappend search_path $env(DYLD_LIBRARY_PATH)
    11901190        } else {
    1191             lappend search_path /lib /usr/local/lib /lib /usr/lib /opt/local/lib /usr/X11R6/lib ${prefix}/lib
     1191            lappend search_path /lib /usr/local/lib /lib /usr/lib /op/local/lib /usr/X11R6/lib ${prefix}/lib
    11921192        }
    11931193        if {[info exists env(DYLD_FALLBACK_LIBRARY_PATH)]} {
     
    13061306    } else {
    13071307        # XXX adduser is only available for darwin, add more support here
    1308         ui_warning "WARNING: adduser is not implemented on ${os.platform}."
    1309         ui_warning "The requested user was not created."
     1308        ui_warn "WARNING: adduser is not implemented on ${os.platform}."
     1309        ui_warn "The requested user was not created."
    13101310    }
    13111311}
     
    13361336    } else {
    13371337        # XXX addgroup is only available for darwin, add more support here
    1338         ui_warning "WARNING: addgroup is not implemented on ${os.platform}."
    1339         ui_warning "The requested group was not created."
    1340     }
    1341 }
     1338        ui_warn "WARNING: addgroup is not implemented on ${os.platform}."
     1339        ui_warn "The requested group was not created."
     1340    }
     1341}
Note: See TracChangeset for help on using the changeset viewer.