Revision
86836
Author
devans@macports.org
Date
2011-11-05 07:30:01 -0700 (Sat, 05 Nov 2011)

Log Message

podofo: don't allow build if previous version is active (#31379), builds universal.

Modified Paths

Diff

Modified: trunk/dports/graphics/podofo/Portfile (86835 => 86836)


--- trunk/dports/graphics/podofo/Portfile	2011-11-05 14:26:00 UTC (rev 86835)
+++ trunk/dports/graphics/podofo/Portfile	2011-11-05 14:30:01 UTC (rev 86836)
@@ -42,16 +42,14 @@
                 -DCMAKE_INCLUDE_PATH=${prefix}/include/ \
                 -DCMAKE_LIBRARY_PATH=${prefix}/lib
 
-#
-# FIXME: will build universal if there is no
-# previous non-universal build installed
-# but will not upgrade from non-universal
-# to universal (previously installed libraries
-# override newly built ones)
-#
+pre-build {
+    if {[file exists ${prefix}/lib//libpodofo.dylib]} {
+        ui_error "${name} cannot be built while a previous version is installed and active."
+        ui_error "Please deactivate the currently active version of ${name} first."
+            return -code error "previous ${name} version active"
+    }
+}
 
-universal_variant no
-
 livecheck.type  regex
 livecheck.url   http://podofo.sourceforge.net/download.html
 livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"