--- Portfile.orig	2009-12-04 12:01:51.000000000 -0800
+++ Portfile	2009-12-04 15:52:35.000000000 -0800
@@ -1,6 +1,8 @@
 # $Id: Portfile 59458 2009-10-15 11:37:40Z jmr@macports.org $
 
 PortSystem	1.0
+PortGroup muniversal 1.0
+PortGroup archcheck 1.0
 
 name			cyrus-sasl2
 version			2.1.23
@@ -48,17 +50,24 @@
 
 use_parallel_build  yes
 
-universal_variant no
+#universal_variant no
 
 # This is a start towards universal... lib/Makefile.am and sasldb/Makefile.am need to be updated to not do blind ar-fu
 #post-extract {
 #	system "rm ${worksrcpath}/config/libtool.m4"
 #}
-#
+
 #use_autoreconf yes
 #autoreconf.args -fvi
 #autoreconf.env ACLOCAL="aclocal -I${worksrcpath}/cmulocal -I${worksrcpath}/config"
 
+# This is a horrible hackaround as replacing the ar-fu as mentioned above is non-trivial
+pre-build {    
+    if {[variant_isset universal] && [file exists ${worksrcpath}-i386/libtool]} {
+        reinplace -E -- "s|^CC=\\\"(\[^\\\"\]+)\\\"|CC=\"\\1 -arch i386\"|g" ${worksrcpath}-i386/libtool
+    }
+}
+
 destroot.keepdirs \
     ${destroot}${prefix}/var/state/saslauthd \
     ${destroot}${prefix}/var/pwcheck
