[34338] trunk/dports/devel/boost/Portfile

gui_dos at macports.org gui_dos at macports.org
Thu Feb 21 13:29:55 PST 2008


Revision: 34338
          http://trac.macosforge.org/projects/macports/changeset/34338
Author:   gui_dos at macports.org
Date:     2008-02-21 13:29:53 -0800 (Thu, 21 Feb 2008)

Log Message:
-----------
boost: define correctly the final prefix used by install_name_tool
and avoid absolute links after destroot (closes #14365 and #14388)

Modified Paths:
--------------
    trunk/dports/devel/boost/Portfile

Modified: trunk/dports/devel/boost/Portfile
===================================================================
--- trunk/dports/devel/boost/Portfile	2008-02-21 20:44:40 UTC (rev 34337)
+++ trunk/dports/devel/boost/Portfile	2008-02-21 21:29:53 UTC (rev 34338)
@@ -4,7 +4,7 @@
 
 name			boost
 version			1.34.1
-revision		1
+revision		2
 categories		devel
 maintainers		sanchom at gmail.com
 description		Collection of portable C++ source libraries
@@ -36,36 +36,41 @@
 		# with their final destination path (not the destroot path that
 		# they've just been installed to)
 		foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
-			system "install_name_tool -id ${prefix}/lib/${lib} ${lib}"
+			set libtail [file tail ${lib}]
+			system "install_name_tool -id ${prefix}/lib/${libtail} ${lib}"
 		}
 
 		# create relative symbolic links to the versioned libraries (.dylib only;
 		# .a were built with unversioned extensions that are duplicate files of the
 		# versioned extensions... handled next)
 		foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
-			set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
+			set libtail [file tail ${lib}]
+			set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
+			set libname [file tail ${libroot}]
 			set libext [file extension ${lib}]
-			set liblink "${libname}${libext}"
+			set liblink "${libroot}${libext}"
 			if {![catch {set libtype [file type ${liblink}]}]} {
 				if {${libtype} == "link"} {
 					file delete -force ${liblink}
 				}
 			}
-			system "cd  ${destroot}${prefix}/lib;ln -s ${lib} ${liblink}"
+			system "cd  ${destroot}${prefix}/lib;ln -s ${libtail} ${libname}${libext}"
 		}
 
 		# change the duplicated non-version-named .a libraries to
 		# symbolic links to the version-named .a libraries
 		foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.a] {
-			set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
+			set libtail [file tail ${lib}]
+			set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
+			set libname [file tail ${libroot}]
 			set libext [file extension ${lib}]
-			set liblink "${libname}${libext}"
+			set liblink "${libroot}${libext}"
 			# if this file is around, it is a duplicate, delete it
 			if {[file exists ${liblink}]} {
 				file delete -force ${liblink}
 			}
 			# add a symbolic link instead
-			system "cd  ${destroot}${prefix}/lib; ln -s ${lib} ${liblink}"
+			system "cd  ${destroot}${prefix}/lib; ln -s ${libtail} ${libname}${libext}"
 		}
 		
 		# create a symbolic link in the include directory pointing to the current

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080221/bff7863d/attachment.html 


More information about the macports-changes mailing list