Skip to content
Permalink
Browse files

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

platform/architecture/os name

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@957 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
landonf committed Oct 5, 2002
1 parent adf1f05 commit ce8cefcf9e47391ecebb072fdfd7d00c3e3ab024
Showing with 21 additions and 23 deletions.
  1. +3 −3 src/port1.0/portbuild.tcl
  2. +3 −3 src/port1.0/portfetch.tcl
  3. +15 −17 src/port1.0/portmain.tcl
@@ -49,21 +49,21 @@ default build.target.all all
set UI_PREFIX "---> "

proc build_getmaketype {args} {
global build.type build.cmd os.name
global build.type build.cmd os.platform

if ![info exists build.type] {
return make
}
switch -exact -- ${build.type} {
bsd {
if {${os.name} == "darwin"} {
if {${os.platform} == "darwin"} {
return bsdmake
} else {
return make
}
}
gnu {
if {${os.name} == "darwin"} {
if {${os.platform} == "darwin"} {
return gnumake
} else {
return gmake
@@ -209,16 +209,16 @@ proc cvsfetch {args} {
# Perform a standard fetch, assembling fetch urls from
# the listed url varable and associated distfile
proc fetchfiles {args} {
global distpath all_dist_files UI_PREFIX ports_verbose fetch_urls fetch.cmd os.name fetch.pre_args
global distpath all_dist_files UI_PREFIX ports_verbose fetch_urls fetch.cmd os.platform fetch.pre_args
global distfile site

# Override curl in the case of FreeBSD
if {${os.name} == "freebsd"} {
if {${os.platform} == "freebsd"} {
set fetch.cmd "fetch"
}
if [tbool ports_verbose] {
set fetch.pre_args -v
} elseif {${os.name} == "darwin" } {
} elseif {${os.platform} == "darwin" } {
set fetch.pre_args "-s -S"
}

@@ -39,41 +39,39 @@ register com.apple.main target main
register com.apple.main provides main

# define options
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
options prefix portname portversion portrevision categories maintainers workdir worksrcdir filedir distname portdbpath libpath distpath sources_conf os.platform os.version os.arch os.endian platforms
# Export options via PortInfo
options_export portname portversion portrevision categories maintainers platforms

global os_name os_arch os_endian

set os_name [string tolower $tcl_platform(os)]

set os_arch $tcl_platform(machine)
if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }

set os_endian $tcl_platform(byteOrder)
# Remove trailing "Endian"
set os_endian [string range $os_endian 0 [expr [string length $os_endian] - 7]]

default distpath {[file join $portdbpath distfiles]}
default workdir work
default workpath {[file join $portpath $workdir]}
default prefix /opt/local
default filedir files
default portrevision 0
default os.name {$os_name}
default os.version {$tcl_platform(osVersion)}
default os.arch {$os_arch}
default os.endian {$os_endian}
default distname {${portname}-${portversion}}
default worksrcdir {$distname}
default filesdir {files}
default filespath {[file join $portpath $filesdir]}
default worksrcpath {[file join $workpath $worksrcdir]}


# Platform Settings
set os_arch $tcl_platform(machine)
if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }

set os_endian $tcl_platform(byteOrder)
default os.platform {[string tolower $tcl_platform(os)]}
default os.version {$tcl_platform(osVersion)}
default os.arch {$os_arch}
default os.endian {[string range $os_endian 0 [expr [string length $os_endian] - 7]]}


# Select implicit variants
global variations
if {![info exists variations($os_name)]} { variant_set $os_name }
if {![info exists variations($os_arch)]} { variant_set $os_arch }
if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }

proc main {args} {
return 0

0 comments on commit ce8cefc

Please sign in to comment.
You can’t perform that action at this time.