Index: files/patch-Makefile.diff
===================================================================
--- files/patch-Makefile.diff	(revision 74482)
+++ files/patch-Makefile.diff	(working copy)
@@ -1,5 +1,5 @@
---- oldMakefile	2004-08-18 02:18:45.000000000 +0200
-+++ Makefile	2008-08-16 17:55:20.000000000 +0200
+--- Makefile.orig	2004-08-17 19:18:45.000000000 -0500
++++ Makefile	2010-12-19 01:54:10.000000000 -0600
 @@ -50,7 +50,7 @@
  # These four are typical settings for optimized code with gcc.  The
  # last two also work with icc/ecc.
@@ -18,3 +18,94 @@
  # Gcc 3.2.2 or higher on i686.
  #XCFLAGS	= -mcpu=pentium4 -malign-double -DHAVE_IEEE_754 -DBSD
  # Icc on i686.
+@@ -219,7 +219,7 @@
+ 	@for dir in $(DIRS); do \
+ 		(cd $$dir; \
+ 		echo Making $$dir ...; \
+-		make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
++		make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
+ 	done
+ 
+ nanotrav: build
+@@ -229,7 +229,7 @@
+ 	@for dir in mnemosyne $(DIRS); do \
+ 		(cd $$dir; \
+ 		echo Making $$dir ...; \
+-		make CC=$(CC) RANLIB=$(RANLIB) MFLAG=$(MFLAG) MNEMLIB=$(MNEMLIB) ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" EXE="$(EXE)" )\
++		make CC="$(CC)" RANLIB=$(RANLIB) MFLAG=$(MFLAG) MNEMLIB=$(MNEMLIB) ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" EXE="$(EXE)" )\
+ 	done
+ 
+ optimize_dec:
+@@ -237,7 +237,7 @@
+ 	@for dir in $(DIRS); do \
+ 		(cd $$dir; \
+ 		echo Making $$dir ...; \
+-		make CC=$(CC) RANLIB=$(RANLIB) XCFLAGS="$(XCFLAGS)" LDFLAGS="$(LDFLAGS)" optimize_dec )\
++		make CC="$(CC)" RANLIB=$(RANLIB) XCFLAGS="$(XCFLAGS)" LDFLAGS="$(LDFLAGS)" optimize_dec )\
+ 	done
+ 
+ lint:
+@@ -245,7 +245,7 @@
+ 	@for dir in $(DIRS) obj; do \
+ 		(cd $$dir; \
+ 		echo Making lint in $$dir ...; \
+-		make CC=$(CC) lint )\
++		make CC="$(CC)" lint )\
+ 	done
+ 
+ tags:
+@@ -253,7 +253,7 @@
+ 	@for dir in $(DIRS) obj; do \
+ 		(cd $$dir; \
+ 		echo Making tags in $$dir ...; \
+-		make CC=$(CC) tags )\
++		make CC="$(CC)" tags )\
+ 	done
+ 
+ all:
+@@ -261,7 +261,7 @@
+ 	@for dir in $(DIRS); do \
+ 		(cd $$dir; \
+ 		echo Making all in $$dir ...; \
+-		make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" all )\
++		make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" all )\
+ 	done
+ 
+ testcudd:
+@@ -269,18 +269,18 @@
+ 	@for dir in util st mtr epd; do \
+ 		(cd $$dir; \
+ 		echo Making $$dir ...; \
+-		make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
++		make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
+ 	done
+ 	@(cd cudd; \
+ 	echo Making testcudd ...; \
+-	make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testcudd$(EXE) )
++	make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testcudd$(EXE) )
+ 
+ objlib:
+ 	sh ./setup.sh
+ 	@for dir in $(BDIRS); do \
+ 		(cd $$dir; \
+ 		echo Making $$dir ...; \
+-		make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
++		make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
+ 	done
+ 	@(cd obj; \
+ 	echo Making obj ...; \
+@@ -294,12 +294,12 @@
+ testdddmp: build
+ 	@(cd dddmp; \
+ 	echo Making testdddmp ...; \
+-	make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testdddmp$(EXE) )
++	make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testdddmp$(EXE) )
+ 
+ testmtr: build
+ 	@(cd mtr; \
+ 	echo Making testmtr ...; \
+-	make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testmtr$(EXE) )
++	make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testmtr$(EXE) )
+ 
+ clean:
+ 	@for dir in mnemosyne $(DIRS) obj; do	\
Index: Portfile
===================================================================
--- Portfile	(revision 74482)
+++ Portfile	(working copy)
@@ -32,16 +32,18 @@
 }
 
 build.target        build
-build.args          CC=${configure.cc} CXX=${configure.cxx} CPP=${configure.cxx}
+build.args          CC="${configure.cc} ${configure.cc_archflags}" \
+                    CXX="${configure.cxx} ${configure.cxx_archflags}" \
+                    CPP="${configure.cxx} ${configure.cxx_archflags}"
 
 post-build {
     # generate dylib for C interface
-    exec /bin/sh -c "${configure.cc} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcudd.dylib -o ${worksrcpath}/libcudd.dylib `find ${worksrcpath}/cudd ${worksrcpath}/dddmp ${worksrcpath}/epd ${worksrcpath}/mtr ${worksrcpath}/st ${worksrcpath}/util -name '*.o'`"
+    exec /bin/sh -c "${configure.cc} ${configure.cc_archflags} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcudd.dylib -o ${worksrcpath}/libcudd.dylib `find ${worksrcpath}/cudd ${worksrcpath}/dddmp ${worksrcpath}/epd ${worksrcpath}/mtr ${worksrcpath}/st ${worksrcpath}/util -name '*.o'`"
 
     # compile the additional C++ interface
-    system "cd ${worksrcpath}/obj && make distclean && make ${build.args}"
+    system "cd ${worksrcpath}/obj && make distclean && make [join ${build.args}]"
     # generate dylib for C++ interface
-    exec /bin/sh -c "${configure.cxx} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
+    exec /bin/sh -c "${configure.cxx} ${configure.cxx_archflags} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
 }
 
 destroot {
