Index: www/ZendFramework/Portfile
===================================================================
--- www/ZendFramework/Portfile	(revision 95607)
+++ www/ZendFramework/Portfile	(working copy)
@@ -5,6 +5,7 @@
 
 name                ZendFramework
 version             1.11.12
+revision            1
 categories          www lang
 license             BSD
 maintainers         snc openmaintainer
@@ -18,42 +19,61 @@
 homepage            http://framework.zend.com/
 
 platforms           darwin freebsd
-depends_run         path:bin/php:php5 \
-                    port:php5-apc \
-                    port:php5-calendar \
-                    port:php5-curl \
-                    port:php5-dba \
-                    port:php5-exif \
-                    port:php5-ftp \
-                    port:php5-gd \
-                    port:php5-gettext \
-                    port:php5-gmp \
-                    port:php5-iconv \
-                    port:php5-imap \
-                    port:php5-mbstring \
-                    port:php5-mcrypt \
-                    port:php5-memcache \
-                    port:php5-mssql \
-                    port:php5-mysql \
-                    port:php5-odbc \
-                    port:php5-openssl \
-                    port:php5-pcntl \
-                    port:php5-posix \
-                    port:php5-postgresql \
-                    port:php5-soap \
-                    port:php5-sockets \
-                    port:php5-SPL_Types \
-                    port:php5-sqlite \
-                    port:php5-tidy \
-                    port:php5-wddx \
-                    port:php5-xmlrpc \
-                    port:php5-xsl \
-                    port:php5-zip
 
-variant manual_extensions description {Let me pick my own php extensions} {
-    depends_run         path:bin/php:php5
+set php_versions    {php5 php53 php54}
+# The php variants deliberately do not conflict
+
+foreach php_version ${php_versions} {
+    variant ${php_version} conflicts manual_extensions description {Use ${php_version}} {
+    }
+    if {[variant_isset ${php_version}]} {
+        depends_run-append  port:${php_version} \
+                            port:${php_version}-apc \
+                            port:${php_version}-calendar \
+                            port:${php_version}-curl \
+                            port:${php_version}-dba \
+                            port:${php_version}-exif \
+                            port:${php_version}-ftp \
+                            port:${php_version}-gd \
+                            port:${php_version}-gettext \
+                            port:${php_version}-gmp \
+                            port:${php_version}-iconv \
+                            port:${php_version}-imap \
+                            port:${php_version}-mbstring \
+                            port:${php_version}-mcrypt \
+                            port:${php_version}-memcache \
+                            port:${php_version}-mssql \
+                            port:${php_version}-mysql \
+                            port:${php_version}-odbc \
+                            port:${php_version}-openssl \
+                            port:${php_version}-pcntl \
+                            port:${php_version}-posix \
+                            port:${php_version}-postgresql \
+                            port:${php_version}-soap \
+                            port:${php_version}-sockets \
+                            port:${php_version}-SPL_Types \
+                            port:${php_version}-sqlite \
+                            port:${php_version}-tidy \
+                            port:${php_version}-wddx \
+                            port:${php_version}-xmlrpc \
+                            port:${php_version}-xsl \
+                            port:${php_version}-zip
+    }
 }
 
+variant manual_extensions conflicts ${php_versions} description {Let me pick my own php and extensions} {
+}
+
+if {![variant_isset php5] && ![variant_isset php53] && ![variant_isset php54]} {
+    default_variants +[lindex ${php_versions} 0]
+}
+
+pre-fetch {
+    if {![variant_isset php5] && ![variant_isset php53] && ![variant_isset php54] && ![variant_isset manual_extensions]} {
+        return -code error "${name} ${version} requires one of +php5, +php53, +php54 or +manual_extensions variants."
+    }
+}
+
 master_sites        http://framework.zend.com/releases/${name}-${version}/
 
 checksums           rmd160  36ae9b6b4a0b2d4b39584e9c196418f08086b8b7 \
