Changeset 957


Ignore:
Timestamp:
Oct 5, 2002, 3:44:19 PM (18 years ago)
Author:
landonf (Landon Fuller)
Message:

os.name -> os.platform to conform to other naming standards regarding
platform/architecture/os name

Location:
trunk/base/src/port1.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portbuild.tcl

    r950 r957  
    5050
    5151proc build_getmaketype {args} {
    52     global build.type build.cmd os.name
     52    global build.type build.cmd os.platform
    5353
    5454    if ![info exists build.type] {
     
    5757    switch -exact -- ${build.type} {
    5858        bsd {
    59             if {${os.name} == "darwin"} {
     59            if {${os.platform} == "darwin"} {
    6060                return bsdmake
    6161            } else {
     
    6464        }
    6565        gnu {
    66             if {${os.name} == "darwin"} {
     66            if {${os.platform} == "darwin"} {
    6767                return gnumake
    6868            } else {
  • trunk/base/src/port1.0/portfetch.tcl

    r953 r957  
    210210# the listed url varable and associated distfile
    211211proc fetchfiles {args} {
    212     global distpath all_dist_files UI_PREFIX ports_verbose fetch_urls fetch.cmd os.name fetch.pre_args
     212    global distpath all_dist_files UI_PREFIX ports_verbose fetch_urls fetch.cmd os.platform fetch.pre_args
    213213    global distfile site
    214214
    215215    # Override curl in the case of FreeBSD
    216     if {${os.name} == "freebsd"} {
     216    if {${os.platform} == "freebsd"} {
    217217        set fetch.cmd "fetch"
    218218    }
    219219    if [tbool ports_verbose] {
    220220        set fetch.pre_args -v
    221     } elseif {${os.name} == "darwin" } {
     221    } elseif {${os.platform} == "darwin" } {
    222222        set fetch.pre_args "-s -S"
    223223    }
  • trunk/base/src/port1.0/portmain.tcl

    r954 r957  
    4040
    4141# define options
    42 options prefix portname portversion portrevision categories maintainers workdir worksrcdir filedir distname portdbpath libpath distpath sources_conf os.name os.version os.arch os.endian platforms
     42options prefix portname portversion portrevision categories maintainers workdir worksrcdir filedir distname portdbpath libpath distpath sources_conf os.platform os.version os.arch os.endian platforms
    4343# Export options via PortInfo
    4444options_export portname portversion portrevision categories maintainers platforms
    4545
    46 global os_name os_arch os_endian
    47 
    48 set os_name [string tolower $tcl_platform(os)]
    49 
    50 set os_arch $tcl_platform(machine)
    51 if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
    52 
    53 set os_endian $tcl_platform(byteOrder)
    5446# Remove trailing "Endian"
    55 set os_endian [string range $os_endian 0 [expr [string length $os_endian] - 7]]
    5647
    5748default distpath {[file join $portdbpath distfiles]}
     
    6152default filedir files
    6253default portrevision 0
    63 default os.name {$os_name}
    64 default os.version {$tcl_platform(osVersion)}
    65 default os.arch {$os_arch}
    66 default os.endian {$os_endian}
    6754default distname {${portname}-${portversion}}
    6855default worksrcdir {$distname}
     
    7158default worksrcpath {[file join $workpath $worksrcdir]}
    7259
     60
     61# Platform Settings
     62set os_arch $tcl_platform(machine)
     63if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
     64
     65set os_endian $tcl_platform(byteOrder)
     66default os.platform {[string tolower $tcl_platform(os)]}
     67default os.version {$tcl_platform(osVersion)}
     68default os.arch {$os_arch}
     69default os.endian {[string range $os_endian 0 [expr [string length $os_endian] - 7]]}
     70
     71
    7372# Select implicit variants
    74 global variations
    75 if {![info exists variations($os_name)]} { variant_set $os_name }
    76 if {![info exists variations($os_arch)]} { variant_set $os_arch }
     73if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
     74if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }
    7775
    7876proc main {args} {
Note: See TracChangeset for help on using the changeset viewer.