Revision
80122
Author
ryandesign@macports.org
Date
2011-07-04 13:08:06 -0700 (Mon, 04 Jul 2011)

Log Message

zlib: ensure zlib does not complete installation without libz.dylib, to prevent problems like #29137

Modified Paths

Diff

Modified: trunk/dports/archivers/zlib/Portfile (80121 => 80122)


--- trunk/dports/archivers/zlib/Portfile	2011-07-04 20:04:52 UTC (rev 80121)
+++ trunk/dports/archivers/zlib/Portfile	2011-07-04 20:08:06 UTC (rev 80122)
@@ -39,6 +39,13 @@
 destroot.destdir        prefix=${destroot}${prefix}
 
 post-destroot {
+    foreach {neededfile} "${prefix}/lib/libz.dylib" {
+        if {![file exists ${destroot}${neededfile}]} {
+            ui_error "${neededfile} is not in the destroot. Please clean ${name} and try again."
+            return -code error "missing ${neededfile} in destroot"
+        }
+    }
+    
     set docdir ${prefix}/share/doc/${name}
     xinstall -d ${destroot}${docdir}
     xinstall -m 0644 -W ${worksrcpath} ChangeLog FAQ README zlib.3.pdf ${destroot}${docdir}