Index: Portfile
===================================================================
--- Portfile	(revision 32177)
+++ Portfile	(working copy)
@@ -27,7 +27,6 @@
 
 platform darwin {
 	post-destroot {
-		cd ${destroot}${prefix}/lib
 
 		# get the library version as it shows up in the library names:
 		# eg. 1_34_1
@@ -36,14 +35,14 @@
 		# ensure the identification name of the dynamic libraries agree
 		# with their final destination path (not the destroot path that
 		# they've just been installed to)
-		foreach lib [glob *-${libver}.dylib] {
+		foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
 			system "install_name_tool -id ${prefix}/lib/${lib} ${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 *-${libver}.dylib] {
+		foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
 			set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
 			set libext [file extension ${lib}]
 			set liblink "${libname}${libext}"
@@ -52,12 +51,12 @@
 					file delete -force ${liblink}
 				}
 			}
-			system "ln -s ${lib} ${liblink}"
+			system "cd  ${destroot}${prefix}/lib;ln -s ${lib} ${liblink}"
 		}
 
 		# change the duplicated non-version-named .a libraries to
 		# symbolic links to the version-named .a libraries
-		foreach lib [glob *-${libver}.a] {
+		foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.a] {
 			set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
 			set libext [file extension ${lib}]
 			set liblink "${libname}${libext}"
@@ -66,12 +65,12 @@
 				file delete -force ${liblink}
 			}
 			# add a symbolic link instead
-			system "ln -s ${lib} ${liblink}"
+			system "cd  ${destroot}${prefix}/lib; ln -s ${lib} ${liblink}"
 		}
 		
 		# create a symbolic link in the include directory pointing to the current
 		# version of the boost include directory (e.g. boost-1_34_1/boost -> include/boost)
-		system "ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost"
+		system "cd  ${destroot}${prefix}/lib; ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost"
 	}
 }
 

