#12302 closed enhancement (fixed)
RFE: "platform" info target
Reported by: | afb@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.7.0 |
Component: | base | Version: | 1.6.0 |
Keywords: | Cc: | jmpalacios (Juan Manuel Palacios) | |
Port: |
Description
Similar to "port version", a "port platform" target to tell the current platform.
$ port platform Platform: darwin 8 i386
Good for knowing what to put into Portfile platform variants, or for bug reports ?
Change History (9)
comment:1 Changed 17 years ago by afb@…
comment:2 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | Needs developer review → MacPorts base bugs |
---|
Milestone Needs developer review deleted
comment:3 Changed 17 years ago by nox@…
Milestone: | MacPorts base bugs → MacPorts base enhancements |
---|---|
Priority: | Expected → Normal |
Summary: | "platform" info target → RFE: "platform" info target |
comment:4 Changed 17 years ago by afb@…
Version: | 1.5.0 |
---|
comment:5 Changed 17 years ago by afb@…
Cc: | jmpp@… added |
---|
Did you have any feedback on this ? (especially changing i686 to i386)
comment:7 Changed 17 years ago by afb@…
Version: | → 1.6.0 |
---|
Cleaned up version:
proc action_platform { action portlist opts } { # global os.platform os.major os.arch global tcl_platform set os_platform [string tolower $tcl_platform(os)] set os_version $tcl_platform(osVersion) set os_arch $tcl_platform(machine) if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" } if {$os_arch == "i586" || $os_arch == "i686"} { set os_arch "i386" } set os_major [lindex [split $tcl_platform(osVersion) .] 0] # puts "Platform: ${os.platform} ${os.major} ${os.arch}" puts "Platform: ${os_platform} ${os_major} ${os_arch}" return 0 }
comment:9 Changed 16 years ago by blb@…
Milestone: | MacPorts base enhancements → MacPorts 1.7.0 |
---|
Note: See
TracTickets for help on using
tickets.
Not sure about the actual implementation, my Tcl skills failed me so I just hacked it: