--- /Users/mr/Portfile	2009-10-01 13:36:27.000000000 +0200
+++ Portfile	2009-10-01 15:30:25.000000000 +0200
@@ -4,8 +4,7 @@
 PortSystem 1.0
 
 name            gutenprint
-version         5.2.3
-revision        1
+version         5.2.4
 set branch      [join [lrange [split ${version} .] 0 1] .]
 categories      print
 maintainers     devans
@@ -14,33 +13,22 @@
 
 description     Gimp Print Plugin
 long_description \
-    Gutenprint plugin for the Gimp.
+    Gutenprint cups drivers and plugin for the Gimp.
 
 universal_variant no
 
 master_sites    sourceforge:gimp-print
 use_bzip2       yes
 
-checksums       md5     4db2605739b3cbc6fc72bb1665731aeb \
-                sha1    e4ddb21665578835d58267d59b57d8d970c3ee86 \
-                rmd160  ae6edf1dea2cd88572736bf0784a4353b59e7113
-
-depends_lib     lib:libgimp-2.0:gimp2
-
-pre-fetch {
-    ui_msg "
-            This port only installs the Gutenprint plugin for the Gimp.
-            You can get the complete Gutenprint drivers and utilities - except the gimp plugin - from
-            http://gimp-print.sourceforge.net
-            "
-}
+checksums           md5     4b0ecc20f3fc68e67c76991cc8516fe7 \
+                    sha1    ae680314650dd9a52df5fd11cd0282cc6f9662e6 \
+                    rmd160  c42cfc847d3886c2a299a30dbcdf66a119a282de
 
 configure.args  --disable-escputil \
                 --disable-samples \
                 --disable-test \
                 --without-cups \
-                --without-readline \
-                --with-gimp2-as-gutenprint
+                --without-readline
 
 post-configure {
     foreach i {iconv intl} {
@@ -49,6 +37,30 @@
     }
 }
 
+default_variants +cups
+
+variant cups description {Builds cups driver} {
+	configure.args-delete --without-cups
+	configure.args-append	--with-cups=${prefix} \
+				--enable-cups-ppds \
+				--enable-translated-cups-ppds \
+				--enable-nls-macosx
+	
+	destroot.violate_mtree yes 
+}
+
+variant gimp description {Builds Gimp plugin} {
+	depends_lib-append     lib:libgimp-2.0:gimp2 
+	
+	configure.args-append --with-gimp2-as-gutenprint
+}
+
+variant epson description {Builds epson utility} {
+	configure.args-delete --disable-escputil
+	configure.args-append --enable-escputil
+
+}
+
 livecheck.type          regex
 livecheck.url           http://sourceforge.net/export/rss2_projfiles.php?project=gimp-print
 livecheck.regex         <title>${name}-${branch} (\[0-9.\]+) released.*</title>

