Ticket #57802: muniversal.diff
File muniversal.diff, 2.7 KB (added by RJVB (René Bertin), 6 years ago) |
---|
-
_resources/port1.0/group/muniversal-1.0.tcl
old new 100 100 variant universal { 101 101 global universal_archs_to_use 102 102 103 if {${supported_archs} eq "noarch"} { 104 ui_warn "Port ${subport} is architecture-agnostic and shouldn't have nor use the +universal variant" 105 #return 106 } 107 108 if {[string match macports-clang* ${configure.compiler}]} { 109 depends_build-append port:cctools 110 } 111 103 112 foreach arch ${universal_archs} { 104 113 configure.universal_cflags-delete -arch ${arch} 105 114 configure.universal_cxxflags-delete -arch ${arch} … … 546 556 # merger_dont_diff: list of files for which /usr/bin/diff ${diffFormat} will not merge correctly 547 557 # diffFormat: format used by diff to merge two text files 548 558 proc merge2Dir {base1 base2 base prefixDir arch1 arch2 merger_dont_diff diffFormat} { 559 global configure.compiler prefix 560 549 561 set dir1 ${base1}/${prefixDir} 550 562 set dir2 ${base2}/${prefixDir} 551 563 set dir ${base}/${prefixDir} 552 564 565 if {[string match macports-clang* ${configure.compiler}]} { 566 set lipo_cmd ${prefix}/bin/lipo 567 set libtool_cmd ${prefix}/bin/libtool 568 } else { 569 set lipo_cmd /usr/bin/lipo 570 set libtool_cmd /usr/bin/libtool 571 } 572 553 573 xinstall -d -m 0755 ${dir} 554 574 555 575 foreach fl [glob -directory ${dir2} -tails -nocomplain * .*] { … … 600 620 } else { 601 621 # Actually try to merge the files 602 622 # First try lipo, then libtool 603 if { ! [catch {system " /usr/bin/lipo-create \"${dir1}/${fl}\" \"${dir2}/${fl}\" -output \"${dir}/${fl}\""}] } {623 if { ! [catch {system "${lipo_cmd} -create \"${dir1}/${fl}\" \"${dir2}/${fl}\" -output \"${dir}/${fl}\""}] } { 604 624 # lipo worked 605 625 ui_debug "universal: merge: lipo created ${prefixDir}/${fl}" 606 } elseif { ! [catch {system " /usr/bin/libtool\"${dir1}/${fl}\" \"${dir2}/${fl}\" -o \"${dir}/${fl}\""}] } {626 } elseif { ! [catch {system "${libtool_cmd} \"${dir1}/${fl}\" \"${dir2}/${fl}\" -o \"${dir}/${fl}\""}] } { 607 627 # libtool worked 608 628 ui_debug "universal: merge: libtool created ${prefixDir}/${fl}" 609 629 } else {