[109843] trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl
jeremyhu at macports.org
jeremyhu at macports.org
Tue Aug 20 10:06:43 PDT 2013
Revision: 109843
https://trac.macports.org/changeset/109843
Author: jeremyhu at macports.org
Date: 2013-08-20 10:06:43 -0700 (Tue, 20 Aug 2013)
Log Message:
-----------
muniversal: Deal with arch flags in pkgconfig (and legacy -config) files
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl 2013-08-20 16:25:15 UTC (rev 109842)
+++ trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl 2013-08-20 17:06:43 UTC (rev 109843)
@@ -568,7 +568,28 @@
}
*.pc -
*-config {
- return -code error "${prefixDir}/${fl} differs in ${base1} and ${base2} and cannot be merged"
+ set known_file "yes"
+
+ set tempdir [mkdtemp "/tmp/muniversal.XXXXXXXX"]
+ set tempfile1 "${tempdir}/${arch1}-${fl}"
+ set tempfile2 "${tempdir}/${arch2}-${fl}"
+
+ copy ${dir1}/${fl} ${tempfile1}
+ copy ${dir2}/${fl} ${tempfile2}
+
+ reinplace {s:-arch *[^ ][^ ]*::} ${tempfile1} ${tempfile2}
+ reinplace {s:-m32::} ${tempfile1} ${tempfile2}
+ reinplace {s:-m64::} ${tempfile1} ${tempfile2}
+
+ if { ! [catch {system "/usr/bin/cmp -s \"${tempfile1}\" \"${tempfile2}\""}] } {
+ # modified files are identical
+ ui_debug "universal: merge: ${prefixDir}/${fl} differs in ${base1} and ${base2} but are the same when stripping out -m32, -m64, and -arch XXX"
+ copy ${tempfile1} ${dir}/${fl}
+ } else {
+ return -code error "${prefixDir}/${fl} differs in ${base1} and ${base2} and cannot be merged (see ${tempdir})"
+ }
+
+ delete ${tempfile1} ${tempfile2} ${tempdir}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130820/29dae2c5/attachment.html>
More information about the macports-changes
mailing list