[119594] trunk/base/src/port1.0/portdestroot.tcl

jmr at macports.org jmr at macports.org
Thu May 1 16:44:55 PDT 2014


Revision: 119594
          https://trac.macports.org/changeset/119594
Author:   jmr at macports.org
Date:     2014-05-01 16:44:55 -0700 (Thu, 01 May 2014)
Log Message:
-----------
handle absolute links to .la files (#40935)

Modified Paths:
--------------
    trunk/base/src/port1.0/portdestroot.tcl

Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl	2014-05-01 22:52:06 UTC (rev 119593)
+++ trunk/base/src/port1.0/portdestroot.tcl	2014-05-01 23:44:55 UTC (rev 119594)
@@ -173,15 +173,20 @@
     ui_debug "Fixing glibtool .la files in destroot for ${subport}"
     set la_file_list [list]
     fs-traverse -depth fullpath ${destroot} {
-        # XXX checking only relative symlinks - rewriting absolute links to point to destroot would be tricky
-        if {[file extension $fullpath] eq ".la" && ([file type $fullpath] eq "file" || ([file type $fullpath] eq "link" && [file pathtype [file link $fullpath]] eq "relative"))} {
+        if {[file extension $fullpath] eq ".la" && ([file type $fullpath] eq "file" || [file type $fullpath] eq "link")} {
+            if {[file type $fullpath] eq "link" && [file pathtype [file link $fullpath]] ne "relative"} {
+                # prepend $destroot to target of absolute symlinks
+                set checkpath ${destroot}${fullpath}
+            } else {
+                set checkpath $fullpath
+            }
             # Make sure it is from glibtool ... "a libtool library file" will appear in the first line
-            if {![catch {set fp [open $fullpath]}]} {
+            if {![catch {set fp [open $checkpath]}]} {
                 if {[gets $fp line] > 0 && [string first "a libtool library file" $line] != -1} {
                     lappend la_file_list $fullpath
                 }
             } else {
-                ui_debug "Failed to open $fullpath"
+                ui_debug "Failed to open $checkpath"
             }
             catch {close $fp}
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140501/a498f66d/attachment.html>


More information about the macports-changes mailing list