Index: Portfile
===================================================================
--- Portfile	(revision 141025)
+++ Portfile	(working copy)
@@ -2,8 +2,9 @@
 PortGroup               compiler_blacklist_versions 1.0
 
 name                    libcxxabi
+epoch                   1
 version                 3.9.1
-epoch                   1
+revision                1
 categories              lang
 platforms               darwin
 license                 MIT NCSA
@@ -49,7 +50,13 @@
 
     if {${os.major} < 11} {
         post-activate {
-            system "cd / && tar xzf ${roots_path}/${root_name}.tgz"
+            set dirs /
+            if {${os.subplatform} eq "macosx"} {
+                lappend dirs ${developer_dir}/SDKs/MacOSX${macosx_version}.sdk
+            }
+            foreach d ${dirs} {
+                system -W ${d} "tar xzf ${roots_path}/${root_name}.tgz"
+            }
         }
     }
 }
@@ -77,7 +84,7 @@
     # cmake would choose either cxa_exceptions or cxa_noexceptions
     # but the buildit script just builds every file in the src directory and you can't have both
     post-extract {
-        system "rm ${worksrcpath}/src/cxa_noexception.cpp"
+        delete ${worksrcpath}/src/cxa_noexception.cpp
     }
 
     if {${os.major} < 10} {
@@ -122,8 +129,8 @@
         xinstall -m 644 ${worksrcpath}/include/__cxxabi_config.h ${destroot}${roots_path}/${root_name}/usr/include
         xinstall -m 644 ${worksrcpath}/include/cxxabi.h ${destroot}${roots_path}/${root_name}/usr/include
 
-        system "cd ${destroot}${roots_path}/${root_name} && tar czf ../${root_name}.tgz ."
-        file delete -force ${destroot}${roots_path}/${root_name}
+        system -W ${destroot}${roots_path}/${root_name} "tar czf ../${root_name}.tgz ."
+        delete ${destroot}${roots_path}/${root_name}
     }
 } else {
     distfiles
