--- Portfile.orig	2008-10-27 16:30:13.000000000 -0400
+++ Portfile	2009-04-28 18:08:50.000000000 -0400
@@ -1,6 +1,7 @@
 # $Id: Portfile 41197 2008-10-27 20:30:13Z dluke@macports.org $
 
 PortSystem 1.0
+PortGroup  muniversal 1.0
 
 name		apr-util
 version		1.3.4
@@ -36,6 +37,20 @@
 	use_parallel_build	no
 }
 
+# See also post-install in apr Portfile
+post-configure {
+	if {[variant_isset universal] && ${os.arch}=="i386"} {
+		system "cp /usr/local/share/apr-1/build/i386-apr_rules.mk ${worksrcpath}-i386/build/rules.mk"
+		system "cp /usr/local/share/apr-1/build/x86_64-apr_rules.mk ${worksrcpath}-x86_64/build/rules.mk"
+	}
+}
+
+# muniversal bug(?): scripts for archs are merged/diffed but non-executable after install
+if {[variant_isset universal] && ${os.arch}=="i386"} {
+    post-install {
+        system "chmod 755 ${prefix}/bin/apu-1-config"
+    }
+}
 
 variant no_bdb	description {Build without BerkeleyDB support} {
 			depends_lib-delete port:db46
