[MacPorts] #60504: muniversal PG failure combined with github PG

MacPorts noreply at macports.org
Sun May 17 15:45:48 UTC 2020


#60504: muniversal PG failure combined with github PG
--------------------+--------------------
 Reporter:  RJVB    |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:
--------------------+--------------------
 The muniversal PG makes a copy of the patched worksrcpath in its configure
 block. That's a good idea but not appropriate if worksrcpath is a symlink
 (as likely when using the github PG) and build.dir==worksrcpath.

 In that case only the 1st architecture gets build, as I discovered after
 upgrading port:legacy-support+universal (I got a universal dylib
 containing only the i386 binary).

 The proper thing to do would be something like

 {{{
 diff --git a/_resources/port1.0/group/muniversal-1.0.tcl
 b/_resources/port1.0/group/muniversal-1.0.tcl
 index
 d3d886b03c8d5ab3347047cc325c96b23dbcc57a..039f0b1668e0f3f7bb9cbcd8dc5c9b0422dc0683
 100644
 --- a/_resources/port1.0/group/muniversal-1.0.tcl
 +++ b/_resources/port1.0/group/muniversal-1.0.tcl
 @@ -186,7 +186,21 @@ variant universal {
              set muniversal.current_arch ${arch}

              if {![file exists ${worksrcpath}-${arch}]} {
 -                copy ${worksrcpath} ${worksrcpath}-${arch}
 +                if {[file type ${worksrcpath}] eq "link" && ${build.dir}
 eq "${worksrcpath}"} {
 +                    set target [file link ${worksrcpath}]
 +                    if {![file exists ${target}]} {
 +                        set fulltarget [file join [file dirname
 ${worksrcpath}] ${target}]
 +                        if {![file exists ${fulltarget}]} {
 +                            ui_error "${worksrcpath} is a link not
 pointing to an absolute directory or to a directory in the same parent
 directory"
 +                            return -code error "unsupported worksrcpath
 link target"
 +                        } else {
 +                            set target ${fulltarget}
 +                        }
 +                    }
 +                    copy ${target} ${worksrcpath}-${arch}
 +                } else {
 +                    copy ${worksrcpath} ${worksrcpath}-${arch}
 +                }
              }

              set archf [muniversal_get_arch_flag ${arch}]
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/60504>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list