[MacPorts] #56295: Correctly represent 64-bit platform as x86_64 in ${os.arch} and pre-generated PortIndex

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #56295: Correctly represent 64-bit platform as x86_64 in ${os.arch} and pre-generated PortIndex

MacPorts
#56295: Correctly represent 64-bit platform as x86_64 in ${os.arch} and pre-
generated PortIndex
-------------------------+--------------------
 Reporter:  raimue       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:               |       Port:
-------------------------+--------------------
 This initialization code in [https://github.com/macports/macports-
 base/blob/eb7a2827a625aed7e47fd32f7776dcd2d5384dab/src/macports1.0/macports.tcl#L675
 macports1.0] is currently folding all x86 platforms into the i386 arch:
 {{{
 if {$os_arch eq "i586" || $os_arch eq "i686" || $os_arch eq "x86_64"} {set
 os_arch "i386"}
 }}}

 However, it seems incorrect to do that for x86_64. Especially now that
 Apple is about to [https://support.apple.com/en-us/HT208436 remove support
 for 32-bit apps], this should be corrected in the output of `port
 platform` to avoid confusion.

 Portfiles may use it in a `platform ... {}` block, and a couple of
 Portfiles are using it in the ports tree with `i386`, although the current
 meaning is actually any of `i386` or `x86_64`. The actual intention of
 these platform blocks would probably be to match on `${build_arch}` and
 not on `${os.arch}` anyway.

 Furthermore, this value is also used to fetch a matching PortIndex for the
 current platform. When the mentioned change in Portfiles was done, the
 PortIndex files should also be built based on `${build_arch}` and not
 `${os.arch}`. Therefore this also requires changes to the jobs creating
 the PortIndex to additionally provide `x86_64` where appropriate.

--
Ticket URL: <https://trac.macports.org/ticket/56295>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56295: Correctly represent 64-bit platform as x86_64 in ${os.arch} and pre-generated PortIndex

MacPorts
#56295: Correctly represent 64-bit platform as x86_64 in ${os.arch} and pre-
generated PortIndex
--------------------------+--------------------
  Reporter:  raimue       |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------

Comment (by ryandesign):

 Who's to say that how we're currently handling `os.arch` is "incorrect"?
 Up to now, it has always been the case that `os.arch` is "powerpc" on
 32-bit or 64-bit PowerPC systems, and "i386" on 32-bit or 64-bit Intel
 systems. This is neither "correct" nor "incorrect", it's just what we
 decided to do, a long time ago. Hopefully every part of base and most
 ports interpret it that way. Why do we want to go to all the effort of
 changing it and possibly breaking things that rely on the existing
 behavior?

--
Ticket URL: <https://trac.macports.org/ticket/56295#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS