Revision
103441
Author
cal@macports.org
Date
2013-02-25 15:56:48 -0800 (Mon, 25 Feb 2013)

Log Message

ocaml-cudf: simulate depends_test

Modified Paths

Diff

Modified: trunk/dports/devel/libCUDF/Portfile (103440 => 103441)


--- trunk/dports/devel/libCUDF/Portfile	2013-02-25 23:49:54 UTC (rev 103440)
+++ trunk/dports/devel/libCUDF/Portfile	2013-02-25 23:56:48 UTC (rev 103441)
@@ -44,15 +44,20 @@
     depends_lib-append  port:camlp5 \
                         port:ocaml-findlib \
                         port:ocaml-extlib
-    
+
     build.target-append opt
-    
-    variant tests description {Build the test suite} {
-        depends_build-append    port:ocaml-ounit
-        test.target             test
-        test.run                yes
+
+    test.target         test
+    test.run            yes
+
+    pre-test {
+        if {[catch {registry_active ocaml-ounit}]} {
+            ui_error "Testing requires ocaml-ounit, but it isn't installed."
+            ui_error "Please install the ocaml-ounit port and try again."
+            error "missing dependency"
+        }
     }
-    
+
     livecheck.type      none
 }