[MacPorts] #62023: python39 @3.9.1 does not build universal on BigSur

MacPorts noreply at macports.org
Sun Jan 10 20:02:51 UTC 2021


#62023: python39 @3.9.1 does not build universal on BigSur
-----------------------+------------------------------
  Reporter:  kencu     |      Owner:  jmroot
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:  BigSur universal
      Port:  python39  |
-----------------------+------------------------------

Comment (by kencu):

 This patch to the portfile allows a universal arm/x86_64 build to finish.
 I tried to handle the 32bit situation, but I have not as yet tested it:
 {{{
 % diff -u `port file python39` Portfile
 ---
 /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/python39/Portfile
 2020-12-08 03:30:58.000000000 -0800
 +++ Portfile    2021-01-10 11:52:59.000000000 -0800
 @@ -174,12 +174,20 @@

  variant universal {
      post-patch {
 +
 +        # first null out any existing lipo extract archs
 +        reinplace \
 +          "s|LIPO_32BIT_FLAGS=\".*\"|LIPO_32BIT_FLAGS=\"\"|" \
 +          ${worksrcpath}/configure
 +
          set universal_arch_flags {}
          set arch_run_32bit {}
 +        set lipo_32bit_flags {}
          foreach arch ${universal_archs} {
              lappend universal_arch_flags -arch ${arch}
              if {${arch} eq "i386" || ${arch} eq "ppc"} {
                  lappend arch_run_32bit -${arch}
 +                lappend lipo_32bit_flags -extract ${arch}
              }
          }
          reinplace \
 @@ -189,6 +197,9 @@
              reinplace \
                "s|ARCH_RUN_32BIT=\".*\"|ARCH_RUN_32BIT=\"arch
 ${arch_run_32bit}\"|" \
                ${worksrcpath}/configure
 +            reinplace \
 +
 "s|LIPO_32BIT_FLAGS=\".*\"|LIPO_32BIT_FLAGS=\"${lipo_32bit_flags}\"|" \
 +              ${worksrcpath}/configure
          }
      }
      if {${configure.sdkroot} ne ""} {
 }}}

 I will attach the diff for the pre-patch and post-patch source tree.

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


More information about the macports-tickets mailing list