Index: Portfile
===================================================================
--- Portfile	(revision 135161)
+++ Portfile	(working copy)
@@ -5,7 +5,7 @@
                 
 name                imlib2
 version             1.4.6
-revision            1
+revision            2
 categories          graphics devel
 license             Permissive
 platforms           darwin
@@ -33,9 +33,6 @@
                     port:jpeg \
                     port:freetype \
                     port:tiff \
-                    port:xorg-libsm \
-                    port:xorg-libX11 \
-                    port:xorg-libXext \
                     port:zlib
 
 patchfiles          patch-imlib2-config.in.diff
@@ -43,8 +40,18 @@
 use_autoreconf      yes
 autoreconf.args     -fvi
 
-configure.args      --disable-amd64
+configure.args      --disable-amd64 \
+                    --without-x
 
+variant x11 {
+    depends_lib-append      port:xorg-libX11 \
+                            port:xorg-libsm \
+                            port:xorg-libXext
+    configure.args-delete   --without-x
+}
+
+default_variants +x11
+
 post-destroot {
     set docdir ${prefix}/share/doc/${name}
     xinstall -d ${destroot}${docdir}
